package/polkit: bump to version 0.120
- Drop upstreamed patches - change the location of polkit.its and polkit.loc to match their new locations. Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
e821078031
commit
079528bb9c
@ -1,124 +0,0 @@
|
||||
From 6c8022392713955c5ae0061e22b50a16a1c2252a Mon Sep 17 00:00:00 2001
|
||||
From: Simon McVittie <smcv@collabora.com>
|
||||
Date: Thu, 15 Jul 2021 12:36:05 +0000
|
||||
Subject: [PATCH] Improve meson_post_install script
|
||||
|
||||
[Retrieved from:
|
||||
https://gitlab.freedesktop.org/polkit/polkit/-/commit/6c8022392713955c5ae0061e22b50a16a1c2252a]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
.gitlab-ci.yml | 3 +--
|
||||
meson_post_install.py | 58 +++++++++++++++++++++++++++++++++++--------
|
||||
2 files changed, 49 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
|
||||
index 8ac3e9f..6d0abb4 100644
|
||||
--- a/.gitlab-ci.yml
|
||||
+++ b/.gitlab-ci.yml
|
||||
@@ -26,8 +26,6 @@ build_stable:
|
||||
before_script:
|
||||
- dnf upgrade -y --nogpgcheck fedora-release fedora-repos*
|
||||
- dnf update -y && dnf install -y $DEPENDENCIES
|
||||
- - getent group polkitd >/dev/null || groupadd -r polkitd
|
||||
- - getent passwd polkitd >/dev/null || useradd -r -g polkitd -d / -s /sbin/nologin -c "User for polkitd" polkitd
|
||||
|
||||
script:
|
||||
- meson setup
|
||||
@@ -43,6 +41,7 @@ build_stable:
|
||||
- meson compile -C builddir
|
||||
- meson test -C builddir
|
||||
- meson install -C builddir
|
||||
+ - DESTDIR=$(pwd)/DESTDIR meson install -C builddir
|
||||
artifacts:
|
||||
name: 'test logs'
|
||||
when: 'always'
|
||||
diff --git a/meson_post_install.py b/meson_post_install.py
|
||||
index 0a0fccf..0ab7469 100644
|
||||
--- a/meson_post_install.py
|
||||
+++ b/meson_post_install.py
|
||||
@@ -1,20 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
-import getpass
|
||||
import os
|
||||
import pwd
|
||||
import sys
|
||||
|
||||
+destdir = os.environ.get('DESTDIR')
|
||||
prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX']
|
||||
|
||||
-bindir = os.path.join(prefix, sys.argv[1])
|
||||
-pkgdatadir = os.path.join(prefix, sys.argv[2])
|
||||
-pkglibdir = os.path.join(prefix, sys.argv[3])
|
||||
-pkgsysconfdir = os.path.join(prefix, sys.argv[4])
|
||||
+def destdir_path(p):
|
||||
+ if os.path.isabs(p):
|
||||
+ if destdir is None:
|
||||
+ return p
|
||||
+ else:
|
||||
+ return os.path.join(destdir, os.path.relpath(p, '/'))
|
||||
+ else:
|
||||
+ return os.path.join(prefix, p)
|
||||
|
||||
-polkitd_uid = pwd.getpwnam(sys.argv[5]).pw_uid
|
||||
+bindir = destdir_path(sys.argv[1])
|
||||
+pkgdatadir = destdir_path(sys.argv[2])
|
||||
+pkglibdir = destdir_path(sys.argv[3])
|
||||
+pkgsysconfdir = destdir_path(sys.argv[4])
|
||||
+polkitd_user = sys.argv[5]
|
||||
|
||||
-os.chmod(os.path.join(bindir, 'pkexec'), 0o4775)
|
||||
+try:
|
||||
+ polkitd_uid = pwd.getpwnam(polkitd_user).pw_uid
|
||||
+except KeyError:
|
||||
+ polkitd_uid = None
|
||||
+
|
||||
+dst = os.path.join(bindir, 'pkexec')
|
||||
+
|
||||
+if os.geteuid() == 0:
|
||||
+ os.chmod(dst, 0o4755)
|
||||
+ os.chown(dst, 0, -1)
|
||||
+else:
|
||||
+ print(
|
||||
+ 'Owner and mode of {} need to be setuid root (04755) after '
|
||||
+ 'installation'.format(
|
||||
+ dst,
|
||||
+ )
|
||||
+ )
|
||||
|
||||
dst_dirs = [
|
||||
os.path.join(pkgsysconfdir, 'rules.d'),
|
||||
@@ -24,13 +48,27 @@ dst_dirs = [
|
||||
for dst in dst_dirs:
|
||||
if not os.path.exists(dst):
|
||||
os.makedirs(dst, mode=0o700)
|
||||
- if getpass.getuser() == "root":
|
||||
+ if os.geteuid() == 0 and polkitd_uid is not None:
|
||||
os.chown(dst, polkitd_uid, -1)
|
||||
+ else:
|
||||
+ print(
|
||||
+ 'Owner of {} needs to be set to {} after installation'.format(
|
||||
+ dst, polkitd_user,
|
||||
+ )
|
||||
+ )
|
||||
|
||||
# polkit-agent-helper-1 need to be setuid root because it's used to
|
||||
# authenticate not only the invoking user, but possibly also root
|
||||
# and/or other users.
|
||||
dst = os.path.join(pkglibdir, 'polkit-agent-helper-1')
|
||||
-os.chmod(dst, 0o4755)
|
||||
-if getpass.getuser() == "root":
|
||||
+
|
||||
+if os.geteuid() == 0:
|
||||
+ os.chmod(dst, 0o4755)
|
||||
os.chown(dst, 0, -1)
|
||||
+else:
|
||||
+ print(
|
||||
+ 'Owner and mode of {} need to be setuid root (04755) after '
|
||||
+ 'installation'.format(
|
||||
+ dst,
|
||||
+ )
|
||||
+ )
|
||||
--
|
||||
GitLab
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 9fa097f4dde92a0c1675400228b4cb965ed3e123 Mon Sep 17 00:00:00 2001
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Thu, 3 Jun 2021 18:55:29 +0100
|
||||
Subject: [PATCH] build: Remove redundant computation of dbus data directory
|
||||
|
||||
We were asking pkg-config "if I define ${datadir} to pk_prefix/pk_datadir,
|
||||
what would ${datadir} be?" but the answer is obviously always going to be
|
||||
pk_prefix/pk_datadir.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
|
||||
[Retrieved (and slightly updated for duktape fork) from:
|
||||
https://gitlab.freedesktop.org/polkit/polkit/-/commit/9fa097f4dde92a0c1675400228b4cb965ed3e123]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
meson.build | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 6a6799e..03a7683 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -136,8 +136,7 @@ assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t fin
|
||||
endif
|
||||
|
||||
dbus_dep = dependency('dbus-1')
|
||||
-dbus_confdir = dbus_dep.get_pkgconfig_variable('datadir', define_variable: ['datadir', pk_prefix / pk_datadir]) #changed from sysconfdir with respect to commit#8eada3836465838
|
||||
-dbus_policydir = dbus_confdir / 'dbus-1/system.d'
|
||||
+dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d'
|
||||
dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
|
||||
|
||||
# check OS
|
||||
--
|
||||
GitLab
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 4bb2157adae620c8b07caf5a24b177d1f90f2fbb Mon Sep 17 00:00:00 2001
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Thu, 3 Jun 2021 18:57:00 +0100
|
||||
Subject: [PATCH] build: Don't require dbus development files
|
||||
|
||||
We don't actually need libdbus, only the dbus-daemon's installation
|
||||
directory for system services, which in practice is always going to be
|
||||
/usr/share/dbus-1/system-services.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
|
||||
[Retrieved (and slightly updated for duktape fork) from:
|
||||
https://gitlab.freedesktop.org/polkit/polkit/-/commit/4bb2157adae620c8b07caf5a24b177d1f90f2fbb]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
meson.build | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 03a7683..539ec7a 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -135,9 +135,14 @@ assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t fin
|
||||
js_dep = dependency('mozjs-78')
|
||||
endif
|
||||
|
||||
-dbus_dep = dependency('dbus-1')
|
||||
+dbus_dep = dependency('dbus-1', required: false)
|
||||
dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d'
|
||||
-dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
|
||||
+if dbus_dep.found()
|
||||
+ dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
|
||||
+else
|
||||
+ # libdbus development files not installed, assume a standard layout
|
||||
+ dbus_system_bus_services_dir = pk_prefix / pk_datadir / 'dbus-1' / 'system-services'
|
||||
+endif
|
||||
|
||||
# check OS
|
||||
host_system = host_machine.system()
|
||||
--
|
||||
GitLab
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
sha256 88d078f1d1f653fd31fe42e46cc3d9b7dd468e70684075e32fe1766dc7ece517 polkit-0.119.tar.gz
|
||||
sha256 0a30dbc0ff798ff45f5bb303b4b40160f56679e81b139287cc0efb32aa5dfc1b polkit-0.120.tar.gz
|
||||
|
||||
# Locally calculated
|
||||
sha256 d2e2aa973e29c75e1b492e67ea7b7da9de2d501d49a934657971fd74f9a0b0a8 COPYING
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
POLKIT_VERSION = 0.119
|
||||
POLKIT_VERSION = 0.120
|
||||
POLKIT_SITE = $(call github,aduskett,polkit-duktape,v$(POLKIT_VERSION))
|
||||
POLKIT_LICENSE = GPL-2.0
|
||||
POLKIT_LICENSE_FILES = COPYING
|
||||
@ -39,9 +39,9 @@ endif
|
||||
# polkit.{its,loc} are needed for gvfs and must be installed in $(HOST_DIR)
|
||||
# and not $(STAGING_DIR)
|
||||
define POLKIT_INSTALL_ITS
|
||||
$(INSTALL) -D -m 644 $(@D)/data/polkit.its \
|
||||
$(INSTALL) -D -m 644 $(@D)/gettext/its/polkit.its \
|
||||
$(HOST_DIR)/share/gettext/its/polkit.its
|
||||
$(INSTALL) -D -m 644 $(@D)/data/polkit.loc \
|
||||
$(INSTALL) -D -m 644 $(@D)/gettext/its/polkit.loc \
|
||||
$(HOST_DIR)/share/gettext/its/polkit.loc
|
||||
endef
|
||||
POLKIT_POST_INSTALL_TARGET_HOOKS += POLKIT_INSTALL_ITS
|
||||
|
Loading…
Reference in New Issue
Block a user