From e3e0a00ad1e5fba0ca88e7d23fe181a1d047d0ed Mon Sep 17 00:00:00 2001 From: Peter Marquardt Date: Fri, 29 Apr 2022 12:21:44 +0200 Subject: [PATCH 1/4] polkit: clean up be0 - brushed --- polkit.be0 | 69 +++++++----------------------------------------------- 1 file changed, 8 insertions(+), 61 deletions(-) diff --git a/polkit.be0 b/polkit.be0 index 7f8341562..c54bbf8e2 100755 --- a/polkit.be0 +++ b/polkit.be0 @@ -2,53 +2,19 @@ # BEE_VERSION polkit-0.115-2 -## this file was created by bee init and should be executed to build a -## bee-package. (Additional hints are located at the end of this file.) - -############################################################################### -## The source URL(s) define the location of the sources that will be -## downloaded. Version variables may be used to simplify reuse of this bee-file. - # orig https://www.freedesktop.org/software/polkit/releases/polkit-${PKGVERSION}.tar.gz SRCURL[0]="https://beehive.molgen.mpg.de/f03b055d6ae5fc8eac76838c7d83d082/polkit-0.115.tar.gz" -############################################################################### -## Add URLs/pathes to patch files to the PATCHURL array. -## The sources will be patched in the order of the array. - PATCHURL+=("https://beehive.molgen.mpg.de/252c1b18ba86a7b05840e992321f4639/polkit-0.115-security_patch-2.patch") PATCHURL+=("https://beehive.molgen.mpg.de/bcf14dcb31568b749c4d163cf8878241/0001-GHSL-2021-074-authentication-bypass-vulnerability-in.patch") PATCHURL+=("https://beehive.molgen.mpg.de/3aa2c730edd4db0b4028a9b8fb887163/polkit-0.115-cve-2021-4034.patch") -############################################################################### -## Add filename patterns to the EXCLUDE array of files that should not -## be added to you package but may be present in the image directory. - -# EXCLUDE+=() - -############################################################################### -## Uncomment the next statement, if the software may not be able to be built -## outside the source directory and needs to be built inside the source -## directory. - # build_in_sourcedir -############################################################################### -## bee cannot detect buildtypes specified in subdirectories. -## Sometimes packages "hide" the real sources in a subdirectory named -## 'src' or 'cmake' or .. -## use 'sourcesubdir_append' to specify this directory if known. - # sourcesubdir_append src LIBEXECDIR=/usr/lib/polkit-1 -############################################################################### -## Change the default (auto-detected) steps to -## extract, patch, configure/setup, build and install the software. -## Make sure the mee_install function does install everything to the -## image directory "${D}" - #mee_extract() { # bee_extract "${@}" #} @@ -69,7 +35,6 @@ mee_configure() { #mee_install() { # bee_install #} -## by default this may be 'make install DESTDIR="${D}"' mee_install_post() { rm -v ${D}/etc/polkit-1/rules.d/50-default.rules @@ -80,31 +45,13 @@ mee_install_post() { # root user to create the configuration file for Linux PAM: start_cmd cat > /etc/pam.d/polkit-1 << "EOF" - # Begin /etc/pam.d/polkit-1 - - auth include system-auth - account include system-account - password include system-password - session include system-session - - # End /etc/pam.d/polkit-1 + # Begin /etc/pam.d/polkit-1 + + auth include system-auth + account include system-account + password include system-password + session include system-session + + # End /etc/pam.d/polkit-1 EOF } - -############################################################################### -## -## Additional hints: -## -## The name of this bee-file should follow the following naming convention: -## pkgname-pkgversion-pkgrevision.bee -## -## You may remove all comments as long as SRCURL[0] is set. -## -## Everything in this file will be executed in a bash environment. -## -## Build the package by executing -## './pkg-version-N.bee' or -## 'beesh ./pkg-version-N.bee' -## -## see http://beezinga.org/ -## From 05ca504ed56b825749452e6b8d79d750e2082f08 Mon Sep 17 00:00:00 2001 From: Peter Marquardt Date: Fri, 29 Apr 2022 13:06:03 +0200 Subject: [PATCH 2/4] polkit: disable NLS - NLS=1 --- polkit.be0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/polkit.be0 b/polkit.be0 index c54bbf8e2..f99db0bab 100755 --- a/polkit.be0 +++ b/polkit.be0 @@ -24,6 +24,8 @@ LIBEXECDIR=/usr/lib/polkit-1 #} mee_configure() { + echo "" >${S}/po/LINGUAS + bee_configure \ --disable-static } From 9fc38f1e3cb21c2bba22176bcae9436073028f0c Mon Sep 17 00:00:00 2001 From: Peter Marquardt Date: Fri, 29 Apr 2022 13:15:40 +0200 Subject: [PATCH 3/4] polkit: fix configure failure - autodetects libsystemd ?! --- polkit.be0 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/polkit.be0 b/polkit.be0 index f99db0bab..fe36d3225 100755 --- a/polkit.be0 +++ b/polkit.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION polkit-0.115-2 +# BEE_VERSION polkit-0.115-3 # orig https://www.freedesktop.org/software/polkit/releases/polkit-${PKGVERSION}.tar.gz SRCURL[0]="https://beehive.molgen.mpg.de/f03b055d6ae5fc8eac76838c7d83d082/polkit-0.115.tar.gz" @@ -27,18 +27,18 @@ mee_configure() { echo "" >${S}/po/LINGUAS bee_configure \ - --disable-static + --disable-static \ + --disable-libsystemd-login \ + --disable-libelogind } #mee_build() { # bee_build #} -#mee_install() { -# bee_install -#} +mee_install() { + bee_install -mee_install_post() { rm -v ${D}/etc/polkit-1/rules.d/50-default.rules # If you have built Polkit with Linux PAM support, you need to modify the From bcd9e37d56a807c03b107227fb1dc7ccd03790cb Mon Sep 17 00:00:00 2001 From: Peter Marquardt Date: Fri, 29 Apr 2022 13:17:00 +0200 Subject: [PATCH 4/4] pilkit: fix install bug - introduced by 2f8431d90e407856f382ca3e1b490667771d5c74 ( missing $D ) --- polkit.be0 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/polkit.be0 b/polkit.be0 index fe36d3225..7213edd09 100755 --- a/polkit.be0 +++ b/polkit.be0 @@ -46,14 +46,12 @@ mee_install() { # Polkit to work correctly with BLFS. Issue the following commands as the # root user to create the configuration file for Linux PAM: - start_cmd cat > /etc/pam.d/polkit-1 << "EOF" - # Begin /etc/pam.d/polkit-1 + start_cmd cat > ${D}/etc/pam.d/polkit-1 << "EOF" + #%PAM-1.0 - auth include system-auth - account include system-account - password include system-password - session include system-session - - # End /etc/pam.d/polkit-1 + auth include system-auth + account include system-auth + password include system-auth + session include system-auth EOF }