[Git][java-team/tomcat9][master] 2 commits: do not add the comment; requested by ebourg
mirabilos
gitlab at salsa.debian.org
Tue Apr 2 21:57:06 BST 2019
mirabilos pushed to branch master at Debian Java Maintainers / tomcat9
Commits:
253f2735 by mirabilos at 2019-04-02T20:50:54Z
do not add the comment; requested by ebourg
- - - - -
ca0f08fc by mirabilos at 2019-04-02T20:54:21Z
Revert "extract system user … creation into a separate script":
In the discussion around it, ebourg indicated that he prefers
the inline code over a separate script, if it needs to be present
at all (which IMHO is necessary).
I kept the “do nothing if the user exists” check first, though;
there’s no need to try to create it over and over on every upgrade.
This reverts commit 036902fe40f2f3b1fa4ff1c9457b2f3bc5193caa
and c8966d77392d6eb929cebaa854d5f2c25a456f31.
- - - - -
5 changed files:
- debian/changelog
- − debian/libexec/create-sysuser.sh
- debian/tomcat9.install
- + debian/tomcat9.lintian-overrides
- debian/tomcat9.postinst
Changes:
=====================================
debian/changelog
=====================================
@@ -13,9 +13,8 @@ tomcat9 (9.0.16-4) unstable; urgency=medium
a suitable GC automatically anyway (Closes: #925928)
* Correct the ownership and permissions on the log directory:
group adm and setgid (Closes: #925929)
- * Reduce postinst complexity: extract user creation into separate script
- -- Thorsten Glaser <tg at mirbsd.de> Tue, 02 Apr 2019 16:55:12 +0200
+ -- Thorsten Glaser <tg at mirbsd.de> Tue, 02 Apr 2019 22:54:17 +0200
tomcat9 (9.0.16-3) unstable; urgency=medium
=====================================
debian/libexec/create-sysuser.sh deleted
=====================================
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# Create the tomcat system user
-#
-
-set -e
-
-if id tomcat >/dev/null 2>&1; then
- # The user already exists
- exit 0
-fi
-
-if which systemd-sysusers >/dev/null; then
- # Use /usr/lib/sysusers.d/tomcat9.conf and systemd
- systemd-sysusers
-else
- # Use adduser instead, takes care of user and group both
- adduser --system --home /var/lib/tomcat9 \
- --shell /usr/sbin/nologin --no-create-home \
- --group --disabled-password --disabled-login \
- --gecos 'Apache Tomcat' tomcat
-fi
=====================================
debian/tomcat9.install
=====================================
@@ -8,7 +8,6 @@ debian/default.template /usr/share/tomcat9/
debian/logrotate.template /usr/share/tomcat9/
debian/sysusers/*.conf /usr/lib/sysusers.d/
-debian/libexec/create-sysuser.sh /usr/libexec/tomcat9/
debian/libexec/sysv-* /usr/libexec/tomcat9/
debian/libexec/tomcat-start.sh /usr/libexec/tomcat9/
debian/libexec/tomcat-update-policy.sh /usr/libexec/tomcat9/
=====================================
debian/tomcat9.lintian-overrides
=====================================
@@ -0,0 +1,2 @@
+# handled in dependencies and maintainer script as alternative
+tomcat9: maintainer-script-needs-depends-on-adduser postinst
=====================================
debian/tomcat9.postinst
=====================================
@@ -5,7 +5,6 @@
set -e
-# Note these are no longer configurable (as of commit 243d00dc688ea47f4c7cde570ccaaa70efe269bf)
TOMCAT_USER="tomcat"
TOMCAT_GROUP="tomcat"
@@ -13,8 +12,19 @@ CONFFILES="tomcat-users.xml web.xml server.xml logging.properties context.xml ca
case "$1" in
configure)
- # Create the tomcat user
- /usr/libexec/tomcat9/create-sysuser.sh
+ # Check whether the tomcat user needs to be created
+ if id tomcat >/dev/null 2>&1; then
+ : no, it already exists
+ elif which systemd-sysusers >/dev/null; then
+ # Create the tomcat user as defined in /usr/lib/sysusers.d/tomcat9.conf
+ systemd-sysusers
+ else
+ # Create the tomcat user without systemd
+ adduser --system --home /var/lib/tomcat9 \
+ --shell /usr/sbin/nologin --no-create-home \
+ --group --disabled-password --disabled-login \
+ --gecos 'Apache Tomcat' tomcat
+ fi
# Install the configuration files
for conffile in $CONFFILES;
View it on GitLab: https://salsa.debian.org/java-team/tomcat9/compare/c8966d77392d6eb929cebaa854d5f2c25a456f31...ca0f08fc57c5617268815752f3d206a5b9358a0b
--
View it on GitLab: https://salsa.debian.org/java-team/tomcat9/compare/c8966d77392d6eb929cebaa854d5f2c25a456f31...ca0f08fc57c5617268815752f3d206a5b9358a0b
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-java-commits/attachments/20190402/8d114dfd/attachment.html>
More information about the pkg-java-commits
mailing list