[Pkg-freeipa-devel] [Git][freeipa-team/dogtag-pki][master] 2 commits: fix systemd file location, and patch upstream files instead of shipping our own

Timo Aaltonen (@tjaalton) gitlab at salsa.debian.org
Wed Sep 25 12:29:43 BST 2024



Timo Aaltonen pushed to branch master at FreeIPA packaging / dogtag-pki


Commits:
2c6883e3 by Timo Aaltonen at 2024-09-25T14:23:54+03:00
fix systemd file location, and patch upstream files instead of shipping our own

- - - - -
a0080a4b by Timo Aaltonen at 2024-09-25T14:29:35+03:00
control: Add python3-six to build-depends.

- - - - -


8 changed files:

- debian/changelog
- debian/control
- + debian/patches/debianize-service-files.diff
- debian/patches/series
- debian/pki-server.install
- − debian/pki-server.pki-tomcatd-nuxwdog at .service
- − debian/pki-server.pki-tomcatd at .service
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -9,9 +9,10 @@ dogtag-pki (11.4.3-1) UNRELEASED; urgency=medium
   * control: Bump depends on jss, tomcatjss, ldapjdk.
   * control: Drop python3-distutils from build-depends. (Closes:
     #1065850)
-  * Install systemd units only once. Thanks, Helmut Grohne! (Closes:
-    #1054480)
+  * patches, rules: Instead of shipping own service files, patch the
+    upstream ones and install them under usr/lib. (Closes: #1054480)
   * control: Add dh-sequence-movetousr to build-depends.
+  * control: Add python3-six to build-depends.
 
  -- Timo Aaltonen <tjaalton at debian.org>  Tue, 07 Feb 2023 10:55:08 +0200
 


=====================================
debian/control
=====================================
@@ -42,6 +42,7 @@ Build-Depends:
  python3-ldap,
  python3-requests,
  python3-setuptools,
+ python3-six,
  python3-sphinx,
  python3-urllib3,
  zlib1g-dev,


=====================================
debian/patches/debianize-service-files.diff
=====================================
@@ -0,0 +1,63 @@
+diff --git a/base/server/share/lib/systemd/system/pki-tomcatd-nuxwdog at .service b/base/server/share/lib/systemd/system/pki-tomcatd-nuxwdog at .service
+index 0ccc84946b..e7e10f0ea3 100644
+--- a/base/server/share/lib/systemd/system/pki-tomcatd-nuxwdog at .service
++++ b/base/server/share/lib/systemd/system/pki-tomcatd-nuxwdog at .service
+@@ -5,11 +5,11 @@ PartOf=pki-tomcatd-nuxwdog.target
+ [Service]
+ Type=simple
+ EnvironmentFile=/usr/share/pki/etc/tomcat.conf
+-EnvironmentFile=/etc/tomcat/tomcat.conf
++Environment="CATALINA_HOME=/usr/share/tomcat9"
+ Environment="NAME=%i"
+ Environment="STARTED_BY_SYSTEMD=1"
+ Environment="WD_PIPE_NAME=%i"
+-EnvironmentFile=-/etc/sysconfig/%i
++EnvironmentFile=-/etc/default/%i
+ EnvironmentFile=/usr/share/pki/etc/pki.conf
+ EnvironmentFile=/etc/pki/pki.conf
+ 
+@@ -19,13 +19,13 @@ ExecStartPre=/usr/sbin/pki-server upgrade %i
+ ExecStartPre=/usr/sbin/pki-server migrate %i
+ ExecStartPre=/usr/bin/pkidaemon start %i
+ ExecStartPost=+/usr/bin/setfacl -x u:pkiuser /run/systemd/ask-password
+-ExecStart=/usr/libexec/tomcat/server start
+-ExecStop=/usr/libexec/tomcat/server stop
++ExecStart=/bin/sh /usr/share/pki/tomcat-start.sh
+ ExecStopPost=/usr/bin/pki-server-nuxwdog --clear
+ 
+ KeyringMode=shared
+ SuccessExitStatus=143
+ TimeoutStartSec=180
++SyslogIdentifier=%i
+ User=pkiuser
+ Group=pkiuser
+ Restart=on-failure
+diff --git a/base/server/share/lib/systemd/system/pki-tomcatd at .service b/base/server/share/lib/systemd/system/pki-tomcatd at .service
+index f1d4cb692a..5a149b47c8 100644
+--- a/base/server/share/lib/systemd/system/pki-tomcatd at .service
++++ b/base/server/share/lib/systemd/system/pki-tomcatd at .service
+@@ -5,19 +5,20 @@ PartOf=pki-tomcatd.target
+ [Service]
+ Type=simple
+ EnvironmentFile=/usr/share/pki/etc/tomcat.conf
+-EnvironmentFile=/etc/tomcat/tomcat.conf
++Environment="CATALINA_HOME=/usr/share/tomcat9"
+ Environment="NAME=%i"
+-EnvironmentFile=-/etc/sysconfig/%i
++EnvironmentFile=-/etc/default/%i
+ EnvironmentFile=/usr/share/pki/etc/pki.conf
+ EnvironmentFile=/etc/pki/pki.conf
+ 
+ ExecStartPre=/usr/sbin/pki-server upgrade %i
+ ExecStartPre=/usr/sbin/pki-server migrate %i
+ ExecStartPre=/usr/bin/pkidaemon start %i
+-ExecStart=/usr/libexec/tomcat/server start
+-ExecStop=/usr/libexec/tomcat/server stop
++#ExecStartPre=+/usr/libexec/tomcat9/tomcat-update-policy.sh
++ExecStart=/bin/sh /usr/share/pki/tomcat-start.sh
+ 
+ SuccessExitStatus=143
++SyslogIdentifier=%i
+ User=pkiuser
+ Group=pkiuser
+ 


=====================================
debian/patches/series
=====================================
@@ -4,6 +4,7 @@
 
 add-freebl-headers.diff
 debian-support.diff
+debianize-service-files.diff
 use-root-homedir.diff
 use-bash.diff
 create-target-wants.diff


=====================================
debian/pki-server.install
=====================================
@@ -1,11 +1,12 @@
 etc/pki/healthcheck.conf
-lib/systemd/system/pki-tomcatd.target
-lib/systemd/system/pki-tomcatd-nuxwdog.target
-lib/systemd/system/pki-tomcatd-nuxwdog at .service
 usr/bin/pki-server-nuxwdog
 usr/bin/pkidaemon
 usr/lib/python*/dist-packages/pki/server
 usr/lib/python*/dist-packages/pkihealthcheck-*.egg-info/
+usr/lib/systemd/system/pki-tomcatd.target
+usr/lib/systemd/system/pki-tomcatd at .service
+usr/lib/systemd/system/pki-tomcatd-nuxwdog.target
+usr/lib/systemd/system/pki-tomcatd-nuxwdog at .service
 usr/sbin/pki-healthcheck
 usr/sbin/pki-server
 usr/sbin/pki-server-upgrade


=====================================
debian/pki-server.pki-tomcatd-nuxwdog at .service deleted
=====================================
@@ -1,34 +0,0 @@
-[Unit]
-Description=PKI Tomcat Server %i Started by Nuxwdog
-PartOf=pki-tomcatd-nuxwdog.target
-
-[Service]
-Type=simple
-EnvironmentFile=/usr/share/pki/etc/tomcat.conf
-Environment="CATALINA_HOME=/usr/share/tomcat9"
-Environment="NAME=%i"
-Environment="STARTED_BY_SYSTEMD=1"
-Environment="WD_PIPE_NAME=%i"
-EnvironmentFile=-/etc/default/%i
-EnvironmentFile=/usr/share/pki/etc/pki.conf
-EnvironmentFile=/etc/pki/pki.conf
-
-ExecStartPre=+/usr/bin/setfacl -m u:pkiuser:wx /run/systemd/ask-password
-ExecStartPre=/usr/bin/pki-server-nuxwdog
-ExecStartPre=/usr/sbin/pki-server upgrade %i
-ExecStartPre=/usr/sbin/pki-server migrate %i
-ExecStartPre=/usr/bin/pkidaemon start %i
-ExecStartPost=+/usr/bin/setfacl -x u:pkiuser /run/systemd/ask-password
-ExecStart=/bin/sh /usr/share/pki/tomcat-start.sh
-ExecStopPost=/usr/bin/pki-server-nuxwdog --clear
-
-KeyringMode=shared
-SuccessExitStatus=143
-TimeoutStartSec=180
-SyslogIdentifier=%i
-User=pkiuser
-Group=pkiuser
-Restart=on-failure
-
-[Install]
-WantedBy=pki-tomcatd-nuxwdog.target


=====================================
debian/pki-server.pki-tomcatd at .service deleted
=====================================
@@ -1,26 +0,0 @@
-[Unit]
-Description=PKI Tomcat Server %i
-PartOf=pki-tomcatd.target
-
-[Service]
-Type=simple
-EnvironmentFile=/usr/share/pki/etc/tomcat.conf
-Environment="CATALINA_HOME=/usr/share/tomcat9"
-Environment="NAME=%i"
-EnvironmentFile=-/etc/default/%i
-EnvironmentFile=/usr/share/pki/etc/pki.conf
-EnvironmentFile=/etc/pki/pki.conf
-
-ExecStartPre=/usr/sbin/pki-server upgrade %i
-ExecStartPre=/usr/sbin/pki-server migrate %i
-ExecStartPre=/usr/bin/pkidaemon start %i
-#ExecStartPre=+/usr/libexec/tomcat9/tomcat-update-policy.sh
-ExecStart=/bin/sh /usr/share/pki/tomcat-start.sh
-
-SuccessExitStatus=143
-SyslogIdentifier=%i
-User=pkiuser
-Group=pkiuser
-
-[Install]
-WantedBy=pki-tomcatd.target


=====================================
debian/rules
=====================================
@@ -30,7 +30,7 @@ confflags =
 confflags-core = \
 	-DJAVA_HOME=$(JAVA_HOME) \
 	-DVERSION=$(VER) \
-	-DSYSTEMD_LIB_INSTALL_DIR=/lib/systemd/system \
+	-DSYSTEMD_LIB_INSTALL_DIR=/usr/lib/systemd/system \
 	-DVAR_INSTALL_DIR:PATH=/var \
 	-DP11_KIT_TRUST=/usr/lib/$(DEB_HOST_MULTIARCH)/pkcs11/p11-kit-trust.so \
 	-DPKI_CERTSRV_JAR=$(DEB_BUILD_DIR)/core/dist/pki-certsrv.jar \
@@ -79,9 +79,7 @@ override_dh_auto_install:
 
 	find $(CURDIR)/debian/tmp/usr/share/pki -name '*.cgi' -exec chmod 755 '{}' ';'
 	find $(CURDIR)/debian/tmp/usr/share/pki -name '*.pl' -exec chmod 755 '{}' ';'
-	find $(CURDIR)/debian/tmp/lib/systemd -exec chmod 644 '{}' ';'
-
-	rm -f $(CURDIR)/debian/tmp/lib/systemd/pki-tomcatd at .service
+	find $(CURDIR)/debian/tmp/usr/lib/systemd -exec chmod 644 '{}' ';'
 
 override_dh_installinit:
 	dh_installinit -ppki-server --name=pki-tomcatd --error-handler=invoke_failure



View it on GitLab: https://salsa.debian.org/freeipa-team/dogtag-pki/-/compare/ab0f9775c5d9557a1019390915c1414d3f9495b7...a0080a4b75a42868531c929ca9e90e9631dff823

-- 
View it on GitLab: https://salsa.debian.org/freeipa-team/dogtag-pki/-/compare/ab0f9775c5d9557a1019390915c1414d3f9495b7...a0080a4b75a42868531c929ca9e90e9631dff823
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-freeipa-devel/attachments/20240925/600a456b/attachment-0001.htm>


More information about the Pkg-freeipa-devel mailing list