From eebcc6a5054db3f9b3cd3617267061fdc51b4701 Mon Sep 17 00:00:00 2001 From: "Baeuerle, Florian" Date: Sat, 22 Dec 2018 13:19:53 +0000 Subject: polkit: add patch from upstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds 29950854f from polkit upstream as a patch to install a systemd service file for polkit. Signed-off-by: Florian Bäuerle Signed-off-by: Michael Olbrich --- .../0101-Add-a-systemd-.service-file.patch | 121 +++++++++++++++++++++ patches/polkit-0.105/series | 3 +- 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 patches/polkit-0.105/0101-Add-a-systemd-.service-file.patch (limited to 'patches/polkit-0.105') diff --git a/patches/polkit-0.105/0101-Add-a-systemd-.service-file.patch b/patches/polkit-0.105/0101-Add-a-systemd-.service-file.patch new file mode 100644 index 000000000..abb26ccf0 --- /dev/null +++ b/patches/polkit-0.105/0101-Add-a-systemd-.service-file.patch @@ -0,0 +1,121 @@ +From: David Zeuthen +Date: Wed, 23 May 2012 16:16:20 -0400 +Subject: [PATCH] Add a systemd .service file + +Signed-off-by: David Zeuthen +--- + Makefile.am | 7 ++++++- + configure.ac | 16 +++++++++++++++- + data/Makefile.am | 13 ++++++++++++- + data/org.freedesktop.PolicyKit1.service.in | 1 + + data/polkit.service.in | 8 ++++++++ + 5 files changed, 42 insertions(+), 3 deletions(-) + create mode 100644 data/polkit.service.in + +diff --git a/Makefile.am b/Makefile.am +index d7ad566dc5f7..f66424040277 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -11,7 +11,12 @@ EXTRA_DIST = \ + $(NULL) + + # xsltproc barfs on 'make distcheck'; disable for now +-DISTCHECK_CONFIGURE_FLAGS=--disable-man-pages --disable-gtk-doc --disable-introspection ++DISTCHECK_CONFIGURE_FLAGS= \ ++ --disable-man-pages \ ++ --disable-gtk-doc \ ++ --disable-introspection \ ++ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \ ++ $(NULL) + + sign : dist + gpg --armor --detach-sign --output polkit-$(VERSION).tar.gz.sign polkit-$(VERSION).tar.gz +diff --git a/configure.ac b/configure.ac +index f55ddb7fa002..e1a514599d0e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -180,6 +180,19 @@ AC_SUBST(SYSTEMD_CFLAGS) + AC_SUBST(SYSTEMD_LIBS) + AM_CONDITIONAL(HAVE_SYSTEMD, [test "$have_systemd" = "yes"], [Using systemd]) + ++dnl --------------------------------------------------------------------------- ++dnl - systemd unit / service files ++dnl --------------------------------------------------------------------------- ++ ++AC_ARG_WITH([systemdsystemunitdir], ++ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), ++ [], ++ [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) ++if test "x$with_systemdsystemunitdir" != "xno"; then ++ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) ++fi ++AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"]) ++ + dnl --------------------------------------------------------------------------- + dnl - Select which authentication framework to use + dnl --------------------------------------------------------------------------- +@@ -484,7 +497,8 @@ echo " + Distribution/OS: ${with_os_type} + Authentication framework: ${POLKIT_AUTHFW} + Session tracking: ${SESSION_TRACKING} +- PAM support: ${have_pam}" ++ PAM support: ${have_pam} ++ systemdsystemunitdir: ${systemdsystemunitdir}" + + if test "$have_pam" = yes ; then + echo " +diff --git a/data/Makefile.am b/data/Makefile.am +index ec41433b48d9..17e829b97421 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -20,15 +20,26 @@ endif + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = polkit-gobject-1.pc polkit-backend-1.pc polkit-agent-1.pc + ++ ++systemdservice_in_files = polkit.service.in ++ ++if HAVE_SYSTEMD ++systemdservicedir = $(systemdsystemunitdir) ++systemdservice_DATA = $(systemdservice_in_files:.service.in=.service) ++$(systemdservice_DATA): $(systemdservice_in_files) Makefile ++ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ ++endif ++ + CLEANFILES = $(BUILT_SOURCES) + + EXTRA_DIST = \ + org.freedesktop.PolicyKit1.Authority.xml \ + org.freedesktop.PolicyKit1.AuthenticationAgent.xml \ + $(service_in_files) \ ++ $(systemdservice_in_files) \ + $(dbusconf_DATA) \ + $(NULL) + + + clean-local : +- rm -f *~ $(service_DATA) ++ rm -f *~ $(service_DATA) $(systemdservice_DATA) +diff --git a/data/org.freedesktop.PolicyKit1.service.in b/data/org.freedesktop.PolicyKit1.service.in +index b6cd02b6e47c..fbceb3ffe31a 100644 +--- a/data/org.freedesktop.PolicyKit1.service.in ++++ b/data/org.freedesktop.PolicyKit1.service.in +@@ -2,3 +2,4 @@ + Name=org.freedesktop.PolicyKit1 + Exec=@libexecdir@/polkitd --no-debug + User=root ++SystemdService=polkit.service +diff --git a/data/polkit.service.in b/data/polkit.service.in +new file mode 100644 +index 000000000000..efd29481d847 +--- /dev/null ++++ b/data/polkit.service.in +@@ -0,0 +1,8 @@ ++[Unit] ++Description=Authorization Manager ++Documentation=man:polkit(8) ++ ++[Service] ++Type=dbus ++BusName=org.freedesktop.PolicyKit1 ++ExecStart=@libexecdir@/polkitd --no-debug diff --git a/patches/polkit-0.105/series b/patches/polkit-0.105/series index 19b896b01..107495884 100644 --- a/patches/polkit-0.105/series +++ b/patches/polkit-0.105/series @@ -46,4 +46,5 @@ 0043-0.116-backend-Compare-PolkitUnixProcess-uids-for-tem.patch #tag:ptxdist --start-number 100 0100-automake-add-missing-conditional-HAVE_INTROSPECTION.patch -# 37496f3f986e77c3040a96c75cf68f42 - git-ptx-patches magic +0101-Add-a-systemd-.service-file.patch +# 6f0039b018c1c5a63bb80b750d1301dd - git-ptx-patches magic -- cgit v1.2.3