From: "Baeuerle, Florian" <Florian.Baeuerle@allegion.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] [PATCH v3 2/3] polkit: add patch from upstream
Date: Sat, 22 Dec 2018 13:19:53 +0000 [thread overview]
Message-ID: <20181222131932.15277-3-florian.baeuerle@allegion.com> (raw)
In-Reply-To: <20181222131932.15277-1-florian.baeuerle@allegion.com>
This adds 29950854f from polkit upstream as a patch to install a
systemd service file for polkit.
Signed-off-by: Florian Bäuerle <florian.baeuerle@allegion.com>
---
.../0001-Add-a-systemd-.service-file.patch | 125 ++++++++++++++++++
patches/polkit-0.105/series | 1 +
rules/polkit.make | 5 +
3 files changed, 131 insertions(+)
create mode 100644 patches/polkit-0.105/0001-Add-a-systemd-.service-file.patch
diff --git a/patches/polkit-0.105/0001-Add-a-systemd-.service-file.patch b/patches/polkit-0.105/0001-Add-a-systemd-.service-file.patch
new file mode 100644
index 000000000..ef322ffb1
--- /dev/null
+++ b/patches/polkit-0.105/0001-Add-a-systemd-.service-file.patch
@@ -0,0 +1,125 @@
+From 29950854f6b9e9b8ea2d96d67c79eeec1046a4f1 Mon Sep 17 00:00:00 2001
+From: David Zeuthen <davidz@redhat.com>
+Date: Wed, 23 May 2012 16:16:20 -0400
+Subject: [PATCH] Add a systemd .service file
+
+Signed-off-by: David Zeuthen <davidz@redhat.com>
+---
+ 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 01f0a4b..16bd0bc 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -9,7 +9,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 2712e19..7c7ca7a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -180,6 +180,19 @@ AC_SUBST(LIBSYSTEMD_LOGIN_CFLAGS)
+ AC_SUBST(LIBSYSTEMD_LOGIN_LIBS)
+ AM_CONDITIONAL(HAVE_LIBSYSTEMD_LOGIN, [test "$have_libsystemd_login" = "yes"], [Using libsystemd-login])
+
++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 f0beeba..83bcc20 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 b6cd02b..fbceb3f 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 0000000..efd2948
+--- /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
+--
+2.19.2
+
diff --git a/patches/polkit-0.105/series b/patches/polkit-0.105/series
index afb3f970d..be61a9335 100644
--- a/patches/polkit-0.105/series
+++ b/patches/polkit-0.105/series
@@ -1,6 +1,7 @@
##PTXDIST:
0001-check-for-libsystemd-instead-of-libsystemd-login.patch
0002-automake-add-missing-conditional-HAVE_INTROSPECTION.patch
+0001-Add-a-systemd-.service-file.patch
##DEBIAN:
0.106/agenthelper-pam-Fix-newline-trimming-code.patch
0.108/build-Fix-.gir-generation-for-parallel-make.patch
diff --git a/rules/polkit.make b/rules/polkit.make
index 4505e0e78..4be15a243 100644
--- a/rules/polkit.make
+++ b/rules/polkit.make
@@ -73,6 +73,11 @@ $(STATEDIR)/polkit.targetinstall:
@$(call install_copy, polkit, 0, 0, 0644, -, \
/usr/share/polkit-1/actions/org.freedesktop.policykit.policy)
+ifdef PTXCONF_POLKIT_SYSTEMD
+ @$(call install_copy, polkit, 0, 0, 0644, -, \
+ /usr/lib/systemd/system/polkit.service)
+endif
+
# libs
@$(call install_lib, polkit, 0, 0, 0644, libpolkit-agent-1)
@$(call install_lib, polkit, 0, 0, 0644, libpolkit-backend-1)
--
2.19.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-12-22 13:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 14:18 [ptxdist] [PATCH 1/2] rules: polkit: Fix incorrect installation path Dold, Wolfram
2018-12-10 14:18 ` [ptxdist] [PATCH 2/2] rules: systemd: Change hardcoded polkit configure option Dold, Wolfram
2018-12-11 7:43 ` Michael Olbrich
2018-12-11 15:34 ` [ptxdist] [PATCH v2 1/2] " Dold, Wolfram
2018-12-11 7:41 ` [ptxdist] [PATCH 1/2] rules: polkit: Fix incorrect installation path Michael Olbrich
2018-12-11 15:34 ` [ptxdist] [PATCH v2 2/2] patches/polkit-0.105: Ubuntu polkit patches Dold, Wolfram
2018-12-17 8:26 ` [ptxdist] (no subject) Dold, Wolfram
2018-12-17 8:26 ` [ptxdist] [PATCH v2 2/2] patches/polkit-0.105: Ubuntu polkit patches Dold, Wolfram
2018-12-17 9:19 ` Dold, Wolfram
2018-12-17 10:53 ` Dold, Wolfram
2018-12-22 13:19 ` [ptxdist] [PATCH v3 0/3] polkit debian patches Baeuerle, Florian
2018-12-22 13:19 ` [ptxdist] [PATCH v3 1/3] polkit: add " Baeuerle, Florian
2019-01-16 9:36 ` Baeuerle, Florian
2019-01-17 8:58 ` m.olbrich
2019-01-17 10:01 ` Baeuerle, Florian
2019-01-17 13:48 ` Michael Olbrich
2018-12-22 13:19 ` Baeuerle, Florian [this message]
2018-12-22 13:19 ` [ptxdist] [PATCH v3 3/3] systemd: enable POLKIT support if polkit is selected Baeuerle, Florian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181222131932.15277-3-florian.baeuerle@allegion.com \
--to=florian.baeuerle@allegion.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox