From patchwork Thu Nov 9 13:51:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13451084 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0499C4332F for ; Thu, 9 Nov 2023 13:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234160AbjKINv5 (ORCPT ); Thu, 9 Nov 2023 08:51:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232285AbjKINv4 (ORCPT ); Thu, 9 Nov 2023 08:51:56 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D78D30CD for ; Thu, 9 Nov 2023 05:51:54 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9dbb3e0ff65so142917766b.1 for ; Thu, 09 Nov 2023 05:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1699537913; x=1700142713; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xjVqQGVKhasBg01e/d2CLbqMagiHE/MK9veSrf/c2y4=; b=EdEqNkH3Df7x2CKXmVSbBx03NPzZyGh9PUOzjctR1n04Mj+bnazq4tAbgTCVdQYxap 9XLpxEbYHzLoXDAHPt/J3Cw7umN5+QNofB6IqlXQz9y7Nn9ZXoehFGI3wFKi6tUKtb21 e4hk8RPvm0VdP/qzqqFCvzMtbR3i2vtwK5rcJyjmNe9xfuWYomuPlqphbvek1YU8Hx2n AbPebm6zATyHvTAeupOcQg9fYpFF7DexmCj4coeJfWnGUhPR5bUcBTuWxfiHFwm6Mjzx vnYZZBbOQkckJIKfPXr2Wjlk9p+QHR87xPCyVaqoHKnnNAvJAjnNVJ+90Sm8TRjh8/AV bu1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699537913; x=1700142713; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xjVqQGVKhasBg01e/d2CLbqMagiHE/MK9veSrf/c2y4=; b=h6PEuiECDkYV85wgX/sF7kWnigV0KZFlLrMmTl/SlpmzdZx36H53XvJkJFZLnuwaiD yYDXQk2mv0kinKat5R1dlgHBxwWLxSWv3ppPr5lPDTa9kSTB5+HbGhRdlTlAV0gbjWLH M9dju1HJUZ8sVACzPGNx/FlCIVAe8hbeLhvpL7+KCX2/dpymqD4GqDtrNR0UnuRXikll 4skKdUQlRD4Ew0CkUqZBSZ9Fw7lguHgZW/J2zh2HAFked4KfIASXXf9MZ2w3WRkCCuXx YojJjUMt3ADj+lIFad4hrNh0iZRdq4qZuYJLwjPIkVySIyenHYy6He5ki4eHnhxNQ5MJ MSnw== X-Gm-Message-State: AOJu0Yxp5hYJ9sRAOYlLq3gP4RLXdwR+JDsLuQVC8fabqCHiJ/1lhhKV Ou98DzInyUIp/jzlxWGqMkJ14zdiTWM= X-Google-Smtp-Source: AGHT+IF48bdftdm5VIJFyX+pY+Pvg31Q9NmVdW1mOceIe7kpEp4gzbnjWi1A1iNsI8NE3J/9QUnhmg== X-Received: by 2002:a17:907:94d6:b0:9d7:1388:e555 with SMTP id dn22-20020a17090794d600b009d71388e555mr4298276ejc.21.1699537913011; Thu, 09 Nov 2023 05:51:53 -0800 (PST) Received: from debian_development.DebianHome (dynamic-077-000-043-071.77.0.pool.telefonica.de. [77.0.43.71]) by smtp.gmail.com with ESMTPSA id bv15-20020a170906b1cf00b009829d2e892csm2623563ejb.15.2023.11.09.05.51.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:51:52 -0800 (PST) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 1/7] Drop LGTM.com configuration Date: Thu, 9 Nov 2023 14:51:42 +0100 Message-ID: <20231109135148.42688-1-cgzones@googlemail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org LGTM.com has been discontinued in 2022 and replaced by GitHub code scanning[1]. [1]: https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/ Signed-off-by: Christian Göttsche Acked-by: James Carter --- lgtm.yml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 lgtm.yml diff --git a/lgtm.yml b/lgtm.yml deleted file mode 100644 index f80bf146..00000000 --- a/lgtm.yml +++ /dev/null @@ -1,5 +0,0 @@ -extraction: - cpp: - index: - build_command: - - make DESTDIR="$LGTM_WORKSPACE/destdir" install From patchwork Thu Nov 9 13:51:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13451089 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27C01C4167B for ; Thu, 9 Nov 2023 13:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232193AbjKINwE (ORCPT ); Thu, 9 Nov 2023 08:52:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234119AbjKINwD (ORCPT ); Thu, 9 Nov 2023 08:52:03 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB6C930CD for ; Thu, 9 Nov 2023 05:52:00 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-9c773ac9b15so141022566b.2 for ; Thu, 09 Nov 2023 05:52:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1699537919; x=1700142719; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LFixxeXtTYJPX/sgnEqDWhRfZXDxOfF4YviIgKtDIuc=; b=Fe/3nWjECFWQG8sIL3sRuPNJMmDuihI8+U/dQgVfLRpARUeoexU+OkZFq7j8oZMw4H 9zjdOaXOI6AGjtJ2gd9sp/qq0tQh4KrLDEY/8HbQ2AT7AmVMt49LrrieVUs3jYlW3DKL aARyXHGhKJ045dy5Xng9e/lfaveHwa5f0zss/caypR5NE1EcNZJiJU9mjqvTNbPCcrp1 Z2nmLk5E5lDmJSsFcO2uYrH8iHVBli6tuZBhmwOvj3XO8tXdP7pu5X8aW1a437YvkdUi Zt1ZGxB9XZs1H9hQ6fpNsUG0NbcnNJkV3FivG49XXLy0ztYag3PFcb95GcCJMkQRwjcO /blA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699537919; x=1700142719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LFixxeXtTYJPX/sgnEqDWhRfZXDxOfF4YviIgKtDIuc=; b=RI3+iQ0gKbgSJV+T9EcZ+VuRicvcATvVaqESNgQS5d+lxxDydZ1m7iABMWxycBUV2m dUb69szjTB9qtl3YI3pHbNDAb/9uuK1zsQoF4QloSPMxsAavtPgAyFiJvFf0PHctiMQF 2z3LbU0SsfUm/TLuxwWAfH4VxWLZFZHfCYQsMzG4Y0JLzpWcVzrO1jZYjS3GuoNuVMgL SqAE1wSO01Gif77QMqYHuuMTfiLIyu5uBflT0lJ9vszu1W13YsOFTtSABSsjU+mSU+4z toRLNXkCNd3TFkT45XKNNvAiUkYB1tzIqlKe9vPePOKQTvm3TfTHszkUoJW4nxwQSWMA ifbg== X-Gm-Message-State: AOJu0YxsZ2wTzhUl4bg/fWzKswcLRO7HLWF2qm2QLzUL4FBAte5Jy8ju 7wKijJYHet/1s6VS6gtO85FAGloaIxw= X-Google-Smtp-Source: AGHT+IF0XqNth415ylNlEzBSvTzpixnHtz4bXE4ASge4es0JKWTEfRocD6s/KzDsPvkebjJmF88RaQ== X-Received: by 2002:a17:906:31da:b0:9e5:3a0:8610 with SMTP id f26-20020a17090631da00b009e503a08610mr1202328ejf.30.1699537913574; Thu, 09 Nov 2023 05:51:53 -0800 (PST) Received: from debian_development.DebianHome (dynamic-077-000-043-071.77.0.pool.telefonica.de. [77.0.43.71]) by smtp.gmail.com with ESMTPSA id bv15-20020a170906b1cf00b009829d2e892csm2623563ejb.15.2023.11.09.05.51.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:51:53 -0800 (PST) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 2/7] Drop Travis CI configuration Date: Thu, 9 Nov 2023 14:51:43 +0100 Message-ID: <20231109135148.42688-2-cgzones@googlemail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231109135148.42688-1-cgzones@googlemail.com> References: <20231109135148.42688-1-cgzones@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Travis CI stopped providing free CI services for open-source projects in 2020[1] and the last build happened more than two years ago[2]. [1]: https://www.travis-ci.com/blog/2020-11-02-travis-ci-new-billing/ [2]: https://app.travis-ci.com/github/SELinuxProject/selinux Signed-off-by: Christian Göttsche --- .travis.yml | 14 -------------- README.md | 1 - 2 files changed, 15 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1c2c7f33..00000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Define the building environment -language: c - -# Use Travis-CI Ubuntu 18.04 Bionic Beaver, "full image" variant -sudo: required -dist: bionic - -script: - - FEDORA_MAJOR=33 FEDORA_MINOR=1.2 scripts/ci/travis-kvm-setup.sh - -# Do not spam by email so long as the build succeeds -notifications: - email: - on_success: never diff --git a/README.md b/README.md index c272ce89..8c475126 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,6 @@ This can be done using [./scripts/env_use_destdir](./scripts/env_use_destdir): DESTDIR=~/obj ./scripts/env_use_destdir make test Some tests require the reference policy to be installed (for example in `python/sepolgen`). -In order to run these ones, instructions similar to the ones in section `install` of [./.travis.yml](./.travis.yml) can be executed. To install as the default system libraries and binaries (overwriting any previously installed ones - dangerous!), From patchwork Thu Nov 9 13:51:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13451090 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3A64C0018C for ; Thu, 9 Nov 2023 13:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234212AbjKINwE (ORCPT ); Thu, 9 Nov 2023 08:52:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234183AbjKINwD (ORCPT ); Thu, 9 Nov 2023 08:52:03 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9EF230CF for ; Thu, 9 Nov 2023 05:52:00 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5446c9f3a77so1503122a12.0 for ; Thu, 09 Nov 2023 05:52:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1699537919; x=1700142719; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=IGsW4jPIN3bnjXGBOVHb9DCVW8iQyZ5+EpLySpunDNQ=; b=BCAD8UQCFge7PWJG6plzPuYZhChRWW2kKFDW37/kcWPHLD8lQ9LOkIrmkzR+698gfN MGcGffbSPcMc7l0epXIbYgJtzqT16BQjidPbpUc/23LY3gX3XvPWy9KZXOkE/d+IEQX2 TzTVtKqLCjZUVSu/qDr7lAKLfEGYkhogUGzhxzy9PWRHTpuEnxv/7VriLKY2fckNODoW Kpb5oUpRuA3mjgnuvdqWpZyQUazyLW170Xda/U0Jc//CWOeLRVT9dvhecE8+xpnoExnt cMtqa5F0F1zmDY+GxZ5XMzfE9A+F44a2tFraBQ/G4QCjsMUEAu9xGNT7Hdc640tAVxnu +clA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699537919; x=1700142719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IGsW4jPIN3bnjXGBOVHb9DCVW8iQyZ5+EpLySpunDNQ=; b=Ef6Z0ebIrx+geddQVq9i4GQKGKzFtf5mmPzXltGjLHf7ktI3rGgO0+PNMqwqGVN27j xrl+YZZP1nPGdgoswchw+J4gve9QemJQnAYW7/oZZyLF7Y3p6iV0D5JmjZa+lX21FXSf Cnf0caIGoXHrzLqLuuvHv7z3L5fy7FOAWqbiuk1xz6kh886bd6oNyrRMN5GYjZEHE2sP xkUdUbVpo44PmtSCO1ZnWMS7YUhLRagZAcDwS0pYGY7Al7Zde6kZ44RziH4EbKW8BpXy oHz1r9huoM4HDHb+6p0Bpvv14wKcf4MEvQBLmEtWW78xdBsRlU6Q+25VcPmsFcMRjNfX d2og== X-Gm-Message-State: AOJu0YyqTNyTtxJp5IXr4eUWhFWRqAOgXPG5xIiEGFXx4tcKi+D+/kdC JvXNfpMu4YwzH/SkVfiqVWYt7hOi+C8= X-Google-Smtp-Source: AGHT+IETvz4/h2nYzDJRcSpmcjq8ot9Xa4rdo4ZQ34iiOQSoEvejpgEZuLYCKLHC5jjhXQOfb0Izvw== X-Received: by 2002:a17:907:94c3:b0:9ae:74d1:4b45 with SMTP id dn3-20020a17090794c300b009ae74d14b45mr4863334ejc.65.1699537914200; Thu, 09 Nov 2023 05:51:54 -0800 (PST) Received: from debian_development.DebianHome (dynamic-077-000-043-071.77.0.pool.telefonica.de. [77.0.43.71]) by smtp.gmail.com with ESMTPSA id bv15-20020a170906b1cf00b009829d2e892csm2623563ejb.15.2023.11.09.05.51.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:51:53 -0800 (PST) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 3/7] scripts: ignore unavailable interpreters Date: Thu, 9 Nov 2023 14:51:44 +0100 Message-ID: <20231109135148.42688-3-cgzones@googlemail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231109135148.42688-1-cgzones@googlemail.com> References: <20231109135148.42688-1-cgzones@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Skip running and setting environment variables for unavailable interpreters in the env_use_destdir wrapper script to avoid output like: $ ./scripts/env_use_destdir $DESTDIR/usr/sbin/getenforce ./scripts/env_use_destdir: 59: ruby: not found ./scripts/env_use_destdir: 59: ruby: not found Enforcing Signed-off-by: Christian Göttsche --- scripts/env_use_destdir | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/env_use_destdir b/scripts/env_use_destdir index 89d989a2..e8069be8 100755 --- a/scripts/env_use_destdir +++ b/scripts/env_use_destdir @@ -43,17 +43,21 @@ if [ -n "${SBINDIR:-}" ] ; then PATH="$DESTDIR$SBINDIR:$PATH" fi -NEW_PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '/usr', 'base': '/usr'}))"):$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '/usr', 'base': '/usr'}))")" -if [ -n "${PYTHONPATH:-}" ] ; then - # Prefix the PYTHONPATH with the new directories - export PYTHONPATH="$NEW_PYTHONPATH:$PYTHONPATH" -else - # Define PYTHONPATH - export PYTHONPATH="$NEW_PYTHONPATH" +if command -v "${PYTHON:-python3}" > /dev/null ; then + NEW_PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '/usr', 'base': '/usr'}))"):$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '/usr', 'base': '/usr'}))")" + if [ -n "${PYTHONPATH:-}" ] ; then + # Prefix the PYTHONPATH with the new directories + export PYTHONPATH="$NEW_PYTHONPATH:$PYTHONPATH" + else + # Define PYTHONPATH + export PYTHONPATH="$NEW_PYTHONPATH" + fi fi # shellcheck disable=SC2155 -export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')" +if command -v "${RUBY:-ruby}" > /dev/null ; then + export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')" +fi # Run the command given on the command line if [ $# -gt 0 ] ; then From patchwork Thu Nov 9 13:51:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13451085 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B9D5C4332F for ; Thu, 9 Nov 2023 13:51:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234055AbjKINv7 (ORCPT ); Thu, 9 Nov 2023 08:51:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232193AbjKINv7 (ORCPT ); Thu, 9 Nov 2023 08:51:59 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7622C272C for ; Thu, 9 Nov 2023 05:51:56 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-53db360294fso1473649a12.3 for ; Thu, 09 Nov 2023 05:51:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1699537915; x=1700142715; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OhTNOT9uR3yFuAxbYBtYVd1YZwmOtvhqXykEha1zcbg=; b=fp9iClX2a3FETDfwoc2IO5pgun0cOLpDkE9LX3QAwpd++qK7yJVbuTi9DkjULz03CY yPNjHdlNbJWYVP3BC8GZEcmHGZeyWikFUttMh4id8vNSGCFONDpbgBQ0UjdC6gRQk130 7uIS59hBzrtUIE/2mZaVjnCT8igXAcOE97WebJJ7vNXc9dkf9P9p0szQl0DoPOm/ccCZ SSqMgzGPpX8UhYipbLVvwQm3im5AZQgtv+4F774wXjF7tNR1jQYBx0j1lND4KhPvpYMU ZSq5l38Hzf12vfGbvIjbJ0K7scvAoFsSMl3HTaD7zYM3BqJDSQ6bH8OmBmba07hwHuES zpDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699537915; x=1700142715; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OhTNOT9uR3yFuAxbYBtYVd1YZwmOtvhqXykEha1zcbg=; b=tcfdgghV9YagepO6LXiaZM6yFmpnMmwJdg8Baweq64NIA/LwIy2lVxJLO4bIUPZuzO iCmxWCAls5+WOIpgcTqFjL9MvQKU8qsK67P8H9Ru5FrxvgfFZNChyVk6gx+JmSpus7Tp 8dOF8JbJChTXnHiHN6taQKh+5gGt5Z9j47yGYrRMvHs7eEAb596DiQ3YHUep6MU596GA XBo/MQaxU+Dk4qrvsG2Ve02ennlO05dc5O4UQaJtFJ2qsxLmIR7OKRRjAbIyfX2SOlcH MzWz/LmmjtjGm7qKD4YeWTQc7tyXkpwrdA54AkWxhy+G+oCpR1cMcmNKeqv4IR3+x93o lPjQ== X-Gm-Message-State: AOJu0Yy8R+LOf+db1VtWr6PcUxSIriVtvvdn+WLOowBi4kbZ7RfYohpm rNGenf0EW5soWZq0QYe4fHNVVnKhO5g= X-Google-Smtp-Source: AGHT+IFPUO/h1pR0T8zsqEO4skNpcrTJ9OzRgRb2vHduLj5NGWshEH7PoB0VFnkNr1UEmzkRDzHT3w== X-Received: by 2002:a17:906:d553:b0:9be:45b3:3116 with SMTP id cr19-20020a170906d55300b009be45b33116mr4785848ejc.71.1699537914696; Thu, 09 Nov 2023 05:51:54 -0800 (PST) Received: from debian_development.DebianHome (dynamic-077-000-043-071.77.0.pool.telefonica.de. [77.0.43.71]) by smtp.gmail.com with ESMTPSA id bv15-20020a170906b1cf00b009829d2e892csm2623563ejb.15.2023.11.09.05.51.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:51:54 -0800 (PST) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 4/7] ci: bump Fedora to version 39 Date: Thu, 9 Nov 2023 14:51:45 +0100 Message-ID: <20231109135148.42688-4-cgzones@googlemail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231109135148.42688-1-cgzones@googlemail.com> References: <20231109135148.42688-1-cgzones@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Currently the GitHub Action vm_testsuite fails: The requested URL returned error: 404 Signed-off-by: Christian Göttsche --- scripts/ci/Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/Vagrantfile b/scripts/ci/Vagrantfile index b6023367..f3c90b71 100644 --- a/scripts/ci/Vagrantfile +++ b/scripts/ci/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : # Vagrant configuration file which creates a virtual machine that can run the # test suite using fedora-test-runner.sh, in an environment similar to the one -# used for automated continuous integration tests (Travis-CI) +# used for automated continuous integration tests (GitHub Actions) # # To create a new virtual machine: # @@ -34,7 +34,7 @@ SCRIPT # backwards compatibility). Please don't change it unless you know what # you're doing. Vagrant.configure("2") do |config| - config.vm.box = "fedora/36-cloud-base" + config.vm.box = "fedora/39-cloud-base" config.vm.synced_folder "../..", "/root/selinux" config.vm.provider "virtualbox" do |v| From patchwork Thu Nov 9 13:51:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13451086 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F04B3C4167D for ; Thu, 9 Nov 2023 13:51:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234117AbjKINwA (ORCPT ); Thu, 9 Nov 2023 08:52:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232285AbjKINv7 (ORCPT ); Thu, 9 Nov 2023 08:51:59 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B96972D65 for ; Thu, 9 Nov 2023 05:51:56 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9e4675c7a5fso145375166b.0 for ; Thu, 09 Nov 2023 05:51:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1699537915; x=1700142715; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mwl/NzKvWF+/H0UbRljLtffsgM4aCSAtClSqlqfjdFk=; b=UfypZBKAiA1SgRUIgmTQTKtalAC0smGMbOwE54HjkmhNqqnw6iCR5KBdE1Z6LwqQnu NaeOwTae9Bp+BCDEO1u3HOQucn/JfyfZZ3cSEM8UBxFtXaKWP3oD/hkQXU0BPUcCxpEi pXxPqBpgVxvcsxkZvaFXcPWDLE1aob0fxOdSotByvWi0wZ4ICyRWGFMTMf7Bx+kD9HRW mLjlQKU5pG0sax7ChsbyztyHIAXY/GMPr9YmGUk/lN7WqLTJMwQGOwAPrLLH4alxs+vV axKmKSfD2f1YgpQvkRm9CFfSTQMIILUaxlG9Lz0lrwhnOIb9sbplm1ZoOv8R5w2dLzZV L19Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699537915; x=1700142715; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mwl/NzKvWF+/H0UbRljLtffsgM4aCSAtClSqlqfjdFk=; b=QusQY0JQ8RdAAKWsBLYEKKAM/h3kQc0TcUPQOFeTjPDsgEigepDEKHK7ByEFmCgsF8 +/DSPGhs6ViPu49le77yD3pNo7/lFuamOKT1QlDoUzcteD2rC9/u3cvf1fer5PUOY8oS RTKcJnHy03mqYq8bGr6+UHZKTSRSJNREZKSvo0+YyZJboTVX5nsKtN2BhOOQzE1z98U3 27n1o1TTRaJuLnzisLF2YAxsTETTRFfzSHknngisWgJ0fvOsaAKJqMUSRA31FWst/FEh Bgmr9pNkvRb8wJKigL2oVTkymirDT5FX+5wKR4QC5HWeJupSrg49sCcDNoovYWOIEapE q5Dw== X-Gm-Message-State: AOJu0Ywx2EIiur3SZANwrw4EglyzCy9igwLr7GrDTHcOnBdLLKY9JOEl EY9tnLa7gg5gcmzo7sYn4+Zmz+fhh2o= X-Google-Smtp-Source: AGHT+IFjSPLQUwEFjoPB5lH1hu2IiCpkmA1CMm2Oq81ZwOj1iextoYj+jBG308lCvbIi9zTgERe6yw== X-Received: by 2002:a17:907:7fac:b0:9bf:6200:fe33 with SMTP id qk44-20020a1709077fac00b009bf6200fe33mr4851723ejc.16.1699537915144; Thu, 09 Nov 2023 05:51:55 -0800 (PST) Received: from debian_development.DebianHome (dynamic-077-000-043-071.77.0.pool.telefonica.de. [77.0.43.71]) by smtp.gmail.com with ESMTPSA id bv15-20020a170906b1cf00b009829d2e892csm2623563ejb.15.2023.11.09.05.51.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:51:54 -0800 (PST) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 5/7] libselinux: update Python binding Date: Thu, 9 Nov 2023 14:51:46 +0100 Message-ID: <20231109135148.42688-5-cgzones@googlemail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231109135148.42688-1-cgzones@googlemail.com> References: <20231109135148.42688-1-cgzones@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Update for commit 494eb683f3d1 ("libselinux: add getpidprevcon"). Signed-off-by: Christian Göttsche --- libselinux/src/selinuxswig_python_exception.i | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libselinux/src/selinuxswig_python_exception.i b/libselinux/src/selinuxswig_python_exception.i index a02f4923..e5e55a79 100644 --- a/libselinux/src/selinuxswig_python_exception.i +++ b/libselinux/src/selinuxswig_python_exception.i @@ -79,6 +79,22 @@ } } +%exception getpidprevcon { + $action + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + SWIG_fail; + } +} + +%exception getpidprevcon_raw { + $action + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + SWIG_fail; + } +} + %exception getexeccon { $action if (result < 0) { From patchwork Thu Nov 9 13:51:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13451087 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80F9BC4167B for ; Thu, 9 Nov 2023 13:51:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232285AbjKINwA (ORCPT ); Thu, 9 Nov 2023 08:52:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233505AbjKINv7 (ORCPT ); Thu, 9 Nov 2023 08:51:59 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B1C530CD for ; Thu, 9 Nov 2023 05:51:57 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9d216597f64so149285166b.3 for ; Thu, 09 Nov 2023 05:51:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1699537915; x=1700142715; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UGQM2SEI9u/FQP01YPSBFkhEMljoDRo9HcGhfhpxNM0=; b=CUXc5Y0053pBySJxUi3e2vtwhpA7htyw0gHlR+DO19fAWGRXLGcu50J9Jg/NcFbd0h YG0Uu7YA+BYyPUCpOSdMjszQLXTJx9DetIDOhXbI3DPpPkfyUSH3JThmoSUpI/Dsjce4 0Hg29uauF+K1eZpAnm9Nh5cd1VxaYpAK7ItFBhubqzGY5HC5Bw/kpF7e7xal7gxrE5yG OzIsSdEr36bPXvODnhiTRIOhygbK+0wWjUkdhIfTVPy22tp4QPHnk6v8BXefgD/Rnh1c rfZKxohRrzgwHDWwC5sH08UnNIcGj8vr49mDhxVGjp1esPNkODLFLQPDWWZ0ngJeuYEF 9uag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699537915; x=1700142715; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UGQM2SEI9u/FQP01YPSBFkhEMljoDRo9HcGhfhpxNM0=; b=TYBapo2J6lOYaWYbaKp7EWaxyWgtHfwyQrAVkSbOUcGCAuaEf013WKbyTD4tSZ69GT 9AixnKCh0zAlXskyOCIZ/bgirWBxMSh19KRYgSSdy/njeZ9ujeSmN09n7GDPJuPDx0Qy LIonaoRgnvXka6zCHpCM7z+tokb2a/v/7PSXsU+WT077Sgz1+MC6x7gCa0b58hPJ3UXZ VvR9GKRK+octfTa2/CAPhFf2/hbWsZHUexNCm7taq6U8WmyQ337nTPoNWtU6yHZOSrwb hTU1QhbkolfO9DqcgDXFrybdWw8Lwe/8JDybPaUfq6HhLuDM95vdqyhzo+yL4PlZP6Gb BcPg== X-Gm-Message-State: AOJu0YzXAwEUEryL1k4TFxjCxYrd8jemVvrZvSo0AihOuIy6Dft9Rez4 19rNOF8Hni1yLvhzIzG7Ym4IfGByx/Y= X-Google-Smtp-Source: AGHT+IH/Xv8w6Qgkhy8tv4MrYL2FRpeZ3yQJdTlp2/Ss9kgXZ3CsKaPt0PEJO9JRMvMrd0yDVIz1Fg== X-Received: by 2002:a17:907:9802:b0:9de:32bb:fa96 with SMTP id ji2-20020a170907980200b009de32bbfa96mr4735185ejc.9.1699537915601; Thu, 09 Nov 2023 05:51:55 -0800 (PST) Received: from debian_development.DebianHome (dynamic-077-000-043-071.77.0.pool.telefonica.de. [77.0.43.71]) by smtp.gmail.com with ESMTPSA id bv15-20020a170906b1cf00b009829d2e892csm2623563ejb.15.2023.11.09.05.51.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:51:55 -0800 (PST) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 6/7] Update Python installation on Debian Date: Thu, 9 Nov 2023 14:51:47 +0100 Message-ID: <20231109135148.42688-6-cgzones@googlemail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231109135148.42688-1-cgzones@googlemail.com> References: <20231109135148.42688-1-cgzones@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Between Debian 11 and 12 the way to install Python packages into the system location under /usr, and not /usr/local, changed[1]. The previous setup argument --install-layout=deb is now unsupported and the environment variable DEB_PYTHON_INSTALL_LAYOUT needs to be set instead. See also [2]. [1]: https://lists.debian.org/debian-devel/2023/07/msg00307.html [2]: https://salsa.debian.org/selinux-team/libselinux/-/commit/cbfb31a0925e01591a9cce1eb3a0e517f42b144c Signed-off-by: Christian Göttsche --- README.md | 6 +++++- scripts/run-scan-build | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c475126..765b5626 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,11 @@ To build and install everything under a private directory, run: make DESTDIR=~/obj install install-rubywrap install-pywrap -On Debian `PYTHON_SETUP_ARGS='--install-option "--install-layout=deb"'` needs to be set when installing the python wrappers in order to create the correct python directory structure. +On Debian the environment variable `DEB_PYTHON_INSTALL_LAYOUT` needs to be set +to `deb` when installing the Python wrappers in order to create the correct +Python directory structure. +On Debian systems older than bookworm set +`PYTHON_SETUP_ARGS='--install-option "--install-layout=deb"'` instead. To run tests with the built libraries and programs, several paths (relative to `$DESTDIR`) need to be added to variables `$LD_LIBRARY_PATH`, `$PATH` and `$PYTHONPATH`. This can be done using [./scripts/env_use_destdir](./scripts/env_use_destdir): diff --git a/scripts/run-scan-build b/scripts/run-scan-build index 931ffd2a..7b731f3e 100755 --- a/scripts/run-scan-build +++ b/scripts/run-scan-build @@ -25,7 +25,7 @@ export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysc export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')" if [ -f /etc/debian_version ] && [ -z "${IS_CIRCLE_CI:-}" ] ; then - export PYTHON_SETUP_ARGS='--install-layout=deb' + export DEB_PYTHON_INSTALL_LAYOUT='deb' fi # Build and analyze From patchwork Thu Nov 9 13:51:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 13451088 X-Patchwork-Delegate: plautrba@redhat.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEBD6C0018C for ; Thu, 9 Nov 2023 13:51:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233505AbjKINwB (ORCPT ); Thu, 9 Nov 2023 08:52:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232193AbjKINwA (ORCPT ); Thu, 9 Nov 2023 08:52:00 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B62A3272C for ; Thu, 9 Nov 2023 05:51:57 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9d2e6c8b542so147101566b.0 for ; Thu, 09 Nov 2023 05:51:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1699537916; x=1700142716; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XWzqq6/bpIFYiqr3ZqZdeCyg7SgG9SRuKL1/3MfHjww=; b=nJbb/Xrn77I6skWaV1yQ6vUXjXcGxWRJB26DR7RIf0XMtkc4Wpl5H34QUwtrudib4k qC+l3MMMTAr90Mz9CHFRfiqeRhJUD6H7Xy2zPZ4MsYicsPg9Fq2EIRhet9HLFmV5ONj1 wW1tKg/RfgM8XpT7UAYG9csY5W+SfMy8xVJc6LNy/9M+/Oo0MNyl0QWow4xQZQWyrY/M m1IkjV9nu/Bhr6pB6TbrpYYPUpOouqByLpWMwaBNyowwujypXvqGc6ikHBUrb6lA4q54 IY5YeB/Qbe2l36LKCh9m93mZOFbgGeyfe/85yyFblLuEy6VOQANJhf3+pTt03r4ni3bv l+pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699537916; x=1700142716; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XWzqq6/bpIFYiqr3ZqZdeCyg7SgG9SRuKL1/3MfHjww=; b=wnM8b4MqVE1ZMEjCDHikLbdOhX8I02IazInUk+QTaWW6tfy3J/2X3Xr4XIoCWE5a6Y D5a/URjs+MIAEyEhvOWU8sn4O+3V+ayAkT/qOqRvnqRogyw+speN4xzNCwS/VY6H9zxa HSGKyyFBdGVYpg7kasG1aV71zDWFliaw9cqeT5Sc4IUhw0sQYM29vVl4MK7o0PgUFn/6 fX4ixLaTbOytY1nGf0PYUIfDgMWIk6pywd6CtVy3CuAGKL6agoSkLbgG/Ydb3uLXmDr4 HjFPx5i48sC8Fvg5cLbeeG6edZ0tOC8VoM2NgX3C/5WPKji/BS8brR1fATW+fjBY4MnR 9uIg== X-Gm-Message-State: AOJu0Yx7ShcSjoNO3PApBOtpPS3Zvbs/86/lPAm+j6d1LJi5wCUNt/Pz lOP7QkbdJ4RK2Sd/ktwwLw2SfvBqPBY= X-Google-Smtp-Source: AGHT+IFgpwm+Jggt2sMdrS80jhx+kmR3Qm1tpuyO9CprS+x+N91//clncR7MDmF+Z7efY0fnaLGRjA== X-Received: by 2002:a17:906:787:b0:9e5:31c4:f5f8 with SMTP id l7-20020a170906078700b009e531c4f5f8mr131372ejc.53.1699537916059; Thu, 09 Nov 2023 05:51:56 -0800 (PST) Received: from debian_development.DebianHome (dynamic-077-000-043-071.77.0.pool.telefonica.de. [77.0.43.71]) by smtp.gmail.com with ESMTPSA id bv15-20020a170906b1cf00b009829d2e892csm2623563ejb.15.2023.11.09.05.51.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:51:55 -0800 (PST) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Subject: [PATCH 7/7] scripts: update run-scan-build Date: Thu, 9 Nov 2023 14:51:48 +0100 Message-ID: <20231109135148.42688-7-cgzones@googlemail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231109135148.42688-1-cgzones@googlemail.com> References: <20231109135148.42688-1-cgzones@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org * Do not build test target Building the test target breaks the whole build since the tests for libsepol require checkpolicy to be build already: make[2]: *** No rule to make target '../../checkpolicy/y.tab.o', needed by 'libsepol-tests'. Stop. make[2]: *** Waiting for unfinished jobs.... Since issues in the test suites are not critical do not build them. * Update build status reporting Since the script sets the option -e scan-build will immediately exit on failure and the informative message "++ Build failed" is not printed. * Bump to fortify level 3 * Fix typo Signed-off-by: Christian Göttsche --- scripts/run-scan-build | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/run-scan-build b/scripts/run-scan-build index 7b731f3e..e4f13a2f 100755 --- a/scripts/run-scan-build +++ b/scripts/run-scan-build @@ -1,7 +1,7 @@ #!/bin/sh # Run clang's static analyzer (scan-build) and record its output in output-scan-build/ -# Allow overriding binariy names, like clang-12 +# Allow overriding binary names, like clang-12 export CC=${CC:-clang} SCAN_BUILD=${SCAN_BUILD:-scan-build} @@ -32,15 +32,12 @@ fi make -C .. clean distclean -j"$(nproc)" $SCAN_BUILD -analyze-headers -o "$OUTPUTDIR" make -C .. \ DESTDIR="$DESTDIR" \ - CFLAGS="-O2 -Wall -Wextra -D_FORTIFY_SOURCE=2 -D__CHECKER__ -I$DESTDIR/usr/include" \ + CFLAGS="-O2 -Wall -Wextra -D_FORTIFY_SOURCE=3 -D__CHECKER__ -I$DESTDIR/usr/include" \ -j"$(nproc)" \ - install install-pywrap install-rubywrap all test + install install-pywrap install-rubywrap all \ + || { echo "++ Build failed!"; exit 1; } -if [ $? -eq 0 ]; then - echo "++ Build succeeded" -else - echo "++ Build failed" -fi +echo "++ Build succeeded" # Reduce the verbosity in order to keep the message from scan-build saying # "scan-build: Run 'scan-view /.../output-scan-build/2018-...' to examine bug reports.