URL: https://github.com/freeipa/freeipa/pull/602
Author: tjaalton
 Title: #602: configure: Use ODS_USER and NAMED_GROUP in 
daemons/dnssec/*.service.in
Action: opened

PR body:
"""
These are platform specific, add values for Debian and default values
for Fedora/RHEL.

Also, use prettier output when checking the extra python install options.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/602/head:pr602
git checkout pr602
From 40026185382efaed65b6ad604b21d8790f38aa33 Mon Sep 17 00:00:00 2001
From: Timo Aaltonen <tjaal...@debian.org>
Date: Wed, 15 Mar 2017 16:41:50 +0200
Subject: [PATCH] configure: Use ODS_USER and NAMED_GROUP in
 daemons/dnssec/*.service.in

These are platform specific, add values for Debian and default values
for Fedora/RHEL.

Also, use prettier output when checking the extra python install options.
---
 configure.ac                               | 20 +++++++++++++++++++-
 daemons/dnssec/Makefile.am                 |  2 ++
 daemons/dnssec/ipa-dnskeysyncd.service.in  |  6 +++---
 daemons/dnssec/ipa-ods-exporter.service.in |  2 +-
 4 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 81f74f1..a590e3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -291,13 +291,31 @@ AC_SUBST([IPAPLATFORM])
 AC_MSG_RESULT([${IPAPLATFORM}])
 
 if test "x${IPAPLATFORM}" == "xdebian"; then
+    NAMED_GROUP="bind"
+    ODS_USER="opendnssec"
     # see https://www.debian.org/doc/packaging-manuals/python-policy/ap-packaging_tools.html
     PYTHON_INSTALL_EXTRA_OPTIONS="--install-layout=deb"
 else
+    NAMED_GROUP="named"
+    ODS_USER="ods"
     PYTHON_INSTALL_EXTRA_OPTIONS=""
 fi
+
+AC_MSG_CHECKING([NAMED_GROUP])
+AC_SUBST([NAMED_GROUP])
+AC_MSG_RESULT([${NAMED_GROUP}])
+
+AC_MSG_CHECKING([ODS_USER])
+AC_SUBST([ODS_USER])
+AC_MSG_RESULT([${ODS_USER}])
+
+AC_MSG_CHECKING([python setup.py install extra options])
 AC_SUBST([PYTHON_INSTALL_EXTRA_OPTIONS])
-AC_MSG_RESULT([python setup.py install extra options ${PYTHON_INSTALL_EXTRA_OPTIONS}])
+if test "x${PYTHON_INSTALL_EXTRA_OPTIONS}" == "x"; then
+    AC_MSG_RESULT([none])
+else
+    AC_MSG_RESULT([${PYTHON_INSTALL_EXTRA_OPTIONS}])
+fi
 
 dnl ---------------------------------------------------------------------------
 dnl Version information from VERSION.m4 and command line
diff --git a/daemons/dnssec/Makefile.am b/daemons/dnssec/Makefile.am
index 37a0dcf..b0db4e1 100644
--- a/daemons/dnssec/Makefile.am
+++ b/daemons/dnssec/Makefile.am
@@ -25,6 +25,8 @@ CLEANFILES = $(systemdsystemunit_DATA)
 		-e 's|@libexecdir[@]|$(libexecdir)|g' \
 		-e 's|@localstatedir[@]|$(localstatedir)|g' \
 		-e 's|@sysconfenvdir[@]|$(sysconfenvdir)|g' \
+		-e 's|@ODS_USER[@]|$(ODS_USER)|g' \
+		-e 's|@NAMED_GROUP[@]|$(NAMED_GROUP)|g' \
 		'$(srcdir)/$@.in' >$@
 
 dnssecconfdir = $(IPA_SYSCONF_DIR)/dnssec
diff --git a/daemons/dnssec/ipa-dnskeysyncd.service.in b/daemons/dnssec/ipa-dnskeysyncd.service.in
index f39c3ce..38c6f92 100644
--- a/daemons/dnssec/ipa-dnskeysyncd.service.in
+++ b/daemons/dnssec/ipa-dnskeysyncd.service.in
@@ -4,9 +4,9 @@ Description=IPA key daemon
 [Service]
 EnvironmentFile=@sysconfenvdir@/ipa-dnskeysyncd
 ExecStart=@libexecdir@/ipa/ipa-dnskeysyncd
-User=ods
-Group=named
-SupplementaryGroups=ods
+User=@ODS_USER@
+Group=@NAMED_GROUP@
+SupplementaryGroups=@ODS_USER@
 PrivateTmp=yes
 Restart=on-failure
 RestartSec=60s
diff --git a/daemons/dnssec/ipa-ods-exporter.service.in b/daemons/dnssec/ipa-ods-exporter.service.in
index 5ec7317..ef74287 100644
--- a/daemons/dnssec/ipa-ods-exporter.service.in
+++ b/daemons/dnssec/ipa-ods-exporter.service.in
@@ -6,7 +6,7 @@ After=ipa-ods-exporter.socket
 [Service]
 EnvironmentFile=@sysconfenvdir@/ipa-ods-exporter
 ExecStart=@libexecdir@/ipa/ipa-ods-exporter
-User=ods
+User=@ODS_USER@
 PrivateTmp=yes
 Restart=on-failure
 RestartSec=60s
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to