Merge ~ahasenack/ubuntu/+source/tomcat9:jammy-tomcat9-logging-fix into ubuntu/+source/tomcat9:ubuntu/jammy-devel

Proposed by Andreas Hasenack
Status: Merged
Merge reported by: Andreas Hasenack
Merged at revision: 3850e4a70f0bdd008ecdd1bcfead6c1a88e2ac80
Proposed branch: ~ahasenack/ubuntu/+source/tomcat9:jammy-tomcat9-logging-fix
Merge into: ubuntu/+source/tomcat9:ubuntu/jammy-devel
Diff against target: 74 lines (+21/-4)
5 files modified
debian/changelog (+13/-0)
debian/control (+2/-1)
debian/logrotate.template (+2/-2)
debian/rsyslog/tomcat9.conf (+1/-1)
debian/tomcat9.postinst (+3/-0)
Reviewer Review Type Date Requested Status
Robie Basak ubuntu-sru Approve
Canonical Server Reporter Pending
Review via email: mp+427217@code.launchpad.net

Description of the change

Apply the kinetic[1] fix

The linked bug[2] has the SRU template filled out including test cases.

Unfortunately git range-diff is not useful to compare this branch with the kinetic fix because this package suffers from the git empty directory problem and the rich history was not imported into launchpad upon the kinetic upload.

1. https://code.launchpad.net/~ahasenack/ubuntu/+source/tomcat9/+git/tomcat9/+merge/425340
2. https://bugs.launchpad.net/ubuntu/+source/tomcat9/+bug/1964881

To post a comment you must log in.
Revision history for this message
Robie Basak (racb) wrote :

+1, including for SRU accept

review: Approve (ubuntu-sru)
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks, jammy uploaded

$ dput ubuntu ../tomcat9_9.0.58-1ubuntu0.1_source.changes
Uploading tomcat9 using ftp to ubuntu (host: upload.ubuntu.com; directory: /ubuntu)
running check-debs: makes sure the upload contains a binary package
running supported-distribution: check whether the target distribution is currently supported (using distro-info)
{'allowed': ['release', 'proposed', 'backports', 'security'], 'known': ['release', 'proposed', 'updates', 'backports', 'security']}
running badauthor: Stop if uploading with root@ or ubuntu@ email adresses.
running gitubuntu: Warn if uploading without git-ubuntu Vcs-* entries.
running releasemismatch: Warn about mismatching suffixesg e.g. focal with a XX.YY not being 20.04
running gpg: check GnuPG signatures before the upload
running nobug: Stop if uploading without any bug reference.
running updatemaintainer: Stop if ubuntu changes are without ubuntu maintainer.
running placeholderbug: Stop if using common placeholder numbers as bug reference.
running checksum: verify checksums before uploading
running required-fields: check whether a field is present and non-empty in the changes file
running ppaforppaonly: Stop uploads to the archive with or to ppa without ~ppa suffix.
running suite-mismatch: check the target distribution for common errors
Uploading tomcat9_9.0.58-1ubuntu0.1.dsc
Uploading tomcat9_9.0.58-1ubuntu0.1.debian.tar.xz
Uploading tomcat9_9.0.58-1ubuntu0.1_source.buildinfo
Uploading tomcat9_9.0.58-1ubuntu0.1_source.changes

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This was accepted by the SRU team, marking as merged.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index c80fe74..eb14427 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,16 @@
6+tomcat9 (9.0.58-1ubuntu0.1) jammy; urgency=medium
7+
8+ * Fix logging for unprivileged rsyslogd (LP: #1964881):
9+ - d/logrotate.template: use syslog:adm for log rotation so that
10+ rsyslog can write to the file
11+ - d/rsyslog/tomcat9.conf: drop "fileOwner" as it cannot be set by an
12+ unprivileged rsyslogd
13+ - d/tomcat9.postinst: adjust ownership of catalina.out so that
14+ rsyslogd can write to it. Also change the rotated log files for
15+ consistency.
16+
17+ -- Andreas Hasenack <andreas@canonical.com> Wed, 20 Jul 2022 16:05:45 -0300
18+
19 tomcat9 (9.0.58-1) unstable; urgency=medium
20
21 * Team upload.
22diff --git a/debian/control b/debian/control
23index d2e67d6..ac98f0d 100644
24--- a/debian/control
25+++ b/debian/control
26@@ -1,7 +1,8 @@
27 Source: tomcat9
28 Section: java
29 Priority: optional
30-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
31+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
32+XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
33 Uploaders:
34 tony mancill <tmancill@debian.org>,
35 Emmanuel Bourg <ebourg@apache.org>
36diff --git a/debian/logrotate.template b/debian/logrotate.template
37index 1cf0315..3d76318 100644
38--- a/debian/logrotate.template
39+++ b/debian/logrotate.template
40@@ -5,6 +5,6 @@
41 compress
42 delaycompress
43 missingok
44- create 640 tomcat adm
45- su tomcat adm
46+ create 640 syslog adm
47+ su syslog adm
48 }
49diff --git a/debian/rsyslog/tomcat9.conf b/debian/rsyslog/tomcat9.conf
50index f09f4f9..0ed099e 100644
51--- a/debian/rsyslog/tomcat9.conf
52+++ b/debian/rsyslog/tomcat9.conf
53@@ -2,6 +2,6 @@
54 $template TomcatFormat,"[%timegenerated:::date-year%-%timegenerated:::date-month%-%timegenerated:::date-day% %timegenerated:::date-hour%:%timegenerated:::date-minute%:%timegenerated:::date-second%] [%syslogseverity-text%]%msg%\n"
55
56 :programname, startswith, "tomcat9" {
57- action(type="omfile" file="/var/log/tomcat9/catalina.out" Template="TomcatFormat" fileOwner="tomcat" fileCreateMode="0640")
58+ action(type="omfile" file="/var/log/tomcat9/catalina.out" Template="TomcatFormat" fileCreateMode="0640")
59 stop
60 }
61diff --git a/debian/tomcat9.postinst b/debian/tomcat9.postinst
62index 7e4c9ba..2dad7e2 100644
63--- a/debian/tomcat9.postinst
64+++ b/debian/tomcat9.postinst
65@@ -64,6 +64,9 @@ case "$1" in
66
67 # Grant read/write access to tomcat to the log and cache directories
68 chown -Rh $TOMCAT_USER:adm /var/log/tomcat9/
69+ # catalina.out is written to by rsyslogd, which runs as the "syslog" user in Ubuntu
70+ # also include rotated catalina.out files, usually with an extension of [0-9]+[.gz]
71+ chown syslog:adm /var/log/tomcat9/catalina.out* 2>/dev/null || : # file might not exist yet
72 chmod 2770 /var/log/tomcat9/
73 chown -Rh $TOMCAT_USER:$TOMCAT_GROUP /var/cache/tomcat9/
74 chmod 750 /var/cache/tomcat9/

Subscribers

People subscribed via source and target branches