aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2021-10-20 00:22:45 +0200
committerJakub Jirutka <jakub@jirutka.cz>2021-10-20 00:23:43 +0200
commitb0914d853bf842f250055396fe3b1e415a312864 (patch)
tree54df879af9789b676d749cc6dbd034ea39f882b8
parent25a2c798eac9879436e0ea355e3d75e4075081e8 (diff)
downloadaports-b0914d853bf842f250055396fe3b1e415a312864.tar.gz
aports-b0914d853bf842f250055396fe3b1e415a312864.tar.bz2
aports-b0914d853bf842f250055396fe3b1e415a312864.tar.xz
community/elogind: fix circular dependency between polkit and elogind
Resolves #13095
-rw-r--r--community/elogind/APKBUILD15
-rw-r--r--community/elogind/remove-polkit-gobject-1-check.patch54
2 files changed, 62 insertions, 7 deletions
diff --git a/community/elogind/APKBUILD b/community/elogind/APKBUILD
index 264c17c2ce..27a2cc8394 100644
--- a/community/elogind/APKBUILD
+++ b/community/elogind/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer:
pkgname=elogind
pkgver=246.10
-pkgrel=3
+pkgrel=4
pkgdesc="Standalone fork of systemd's elogind"
url="https://github.com/elogind/elogind"
arch="all"
@@ -41,14 +41,12 @@ source="https://github.com/elogind/elogind/archive/v$pkgver/elogind-v$pkgver.tar
elogind.initd
fix-mips-detection.patch
fix-version.patch
+ remove-polkit-gobject-1-check.patch
"
-case "$CARCH" in
- s390x|mips|mips64|riscv64) ;;
- *) makedepends="$makedepends polkit-dev" ;;
-esac
build() {
case "$CARCH" in
+ # polkit is not available on these arches
s390x|mips|mips64|riscv64) _polkit=false; export CFLAGS="$CFLAGS -D__IGNORE_pkey_mprotect -DSO_PEERSEC=31" ;;
*) _polkit=true ;;
esac
@@ -102,7 +100,10 @@ bashcomp() {
mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
}
-sha512sums="9db0f068ed94ec07bab4d764ccb38840af3d05a4b7c9c539721906f5381b509cb9a3cbfb0453a978210d306136368de6162578c600d522416ef2a7ac1b9f348b elogind-v246.10.tar.gz
+sha512sums="
+9db0f068ed94ec07bab4d764ccb38840af3d05a4b7c9c539721906f5381b509cb9a3cbfb0453a978210d306136368de6162578c600d522416ef2a7ac1b9f348b elogind-v246.10.tar.gz
e73738488e78af099fdbb7c93a411a3e8d69080a93f89c245cb8c6de5fe4cb7fe724687d19e21eb6be52ccc795ec200d9c6e499efb1afd2b27467f7f541a7dd1 elogind.initd
0fda4318afc6db9c9d00121ed4f8267286e692cca04acf4c1006fab99267cdd6228e1d176293f99db043384ae6fa192fc8109a365bf221dda7f2c4177d104820 fix-mips-detection.patch
-178c33608f0d69fde8558c521aea9981e0a0bd4a6666d2e1b4f0714dbb7038955ceb86cf323ea741ee67f89218a2e7d332aa05507c2a06eb01fd0785dd81716b fix-version.patch"
+178c33608f0d69fde8558c521aea9981e0a0bd4a6666d2e1b4f0714dbb7038955ceb86cf323ea741ee67f89218a2e7d332aa05507c2a06eb01fd0785dd81716b fix-version.patch
+5cf63f50e8623a4a6e403924860ba76b5dcd19220514c382175afb6f07dbbccc97a27f858ae0c7bc6869f7558255fffc3174e3ac468e5d47333d9cf1db9a5ac1 remove-polkit-gobject-1-check.patch
+"
diff --git a/community/elogind/remove-polkit-gobject-1-check.patch b/community/elogind/remove-polkit-gobject-1-check.patch
new file mode 100644
index 0000000000..f58f08b65c
--- /dev/null
+++ b/community/elogind/remove-polkit-gobject-1-check.patch
@@ -0,0 +1,54 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Wed, 20 Oct 2021 00:18:47 +0200
+Subject: [PATCH] Remove build-time check for polkit-gobject-1
+
+polkit-gobject-1 is actually not needed for building elogind with PolKit
+support; elogind binaries are not dynamically linked against polkit
+libraries, there's only runtime dependency.
+
+I've verified that building without polkit-dev installed won't change the
+resulting binaries.
+
+We need to remove polkit-dev dependency from elogind to avoid circular
+dependency between polkit and elogind.
+
+See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13095
+
+--- a/meson.build
++++ b/meson.build
+@@ -1148,21 +1148,21 @@
+ install_polkit_pkla = false
+ if want_polkit != 'false' and not skip_deps
+ install_polkit = true
+-
+- libpolkit = dependency('polkit-gobject-1',
+- required : false)
+- if libpolkit.found() and libpolkit.version().version_compare('< 0.106')
+- message('Old polkit detected, will install pkla files')
+- install_polkit_pkla = true
+- endif
++# XXX-Patched: libpolkit is actually not needed for building with polkit support
++# libpolkit = dependency('polkit-gobject-1',
++# required : false)
++# if libpolkit.found() and libpolkit.version().version_compare('< 0.106')
++# message('Old polkit detected, will install pkla files')
++# install_polkit_pkla = true
++# endif
+ #if 1 /// Disable polkit completely if libpolkit is not there. See elogind issue #167
+- if not libpolkit.found()
+- if want_polkit != 'auto'
+- error('Polkit requested but libpolkit was not found.')
+- endif
+- install_polkit = false
+- want_polkit = false
+- endif
++# if not libpolkit.found()
++# if want_polkit != 'auto'
++# error('Polkit requested but libpolkit was not found.')
++# endif
++# install_polkit = false
++# want_polkit = false
++# endif
+ #endif // 1
+ endif
+ conf.set10('ENABLE_POLKIT', install_polkit)