[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#774635: unblock: openstack-pkg-tools/21



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Dear release team,

Version 20 of openstack-pkg-tools indeed fixed the issues with systemd, and
daemons are started properly with it now, though it broke the creation of
/var/run/${PROJECT_NAME}, because the init scripts are using $USER, which
doesn't seem to be available in sysv-rc scripts.

This version 21 replaces the use of $USER by a call to `whoami` which fixes
the issue (eg: no error displayed on boot failing to create the PID file,
when I tested it using sysv-init-core).

This version 21 also fixes a minor issue with upstart (though I'm not sure
if this even has consequence, I felt bad to leave it unfixed).

Please unblock package openstack-pkg-tools version 21. Debdiff attached.

Cheers,

Thomas Goirand (zigo)
diff -Nru openstack-pkg-tools-20/debian/changelog openstack-pkg-tools-21/debian/changelog
--- openstack-pkg-tools-20/debian/changelog	2014-12-14 07:57:40.000000000 +0000
+++ openstack-pkg-tools-21/debian/changelog	2015-01-05 15:48:09.000000000 +0000
@@ -1,3 +1,10 @@
+openstack-pkg-tools (21) unstable; urgency=medium
+
+  * Fixed mix-up with SYSTEM_USER and SYSTEM_GROUP in pkgos-gen-upstart-job.
+  * Fixed creation of /var/run/${PROJECT_NAME} if using sysv-rc.
+
+ -- Thomas Goirand <zigo@debian.org>  Mon, 15 Dec 2014 15:53:43 +0800
+
 openstack-pkg-tools (20) unstable; urgency=medium
 
   * Now using a forking daemon anymore when using systemd. Thanks to Mikaël
diff -Nru openstack-pkg-tools-20/init-template/init-script-template openstack-pkg-tools-21/init-template/init-script-template
--- openstack-pkg-tools-20/init-template/init-script-template	2014-12-14 07:57:40.000000000 +0000
+++ openstack-pkg-tools-21/init-template/init-script-template	2015-01-05 15:48:09.000000000 +0000
@@ -36,8 +36,8 @@
 # Exit if the package is not installed
 [ -x $DAEMON ] || exit 0
 
-# If ran as root, create /var/lock/X, /var/run/X, /var/lib/X and /var/log/X
-if [ "x$USER" = "xroot" ] ; then
+# If ran as root, create /var/lock/X, /var/run/X, /var/lib/X and /var/log/X as needed
+if [ `whoami` = "root" ] ; then
 	for i in lock run log lib ; do
 		mkdir -p /var/$i/${PROJECT_NAME}
 		chown ${SYSTEM_USER} /var/$i/${PROJECT_NAME}
diff -Nru openstack-pkg-tools-20/init-template/pkgos-gen-upstart-job openstack-pkg-tools-21/init-template/pkgos-gen-upstart-job
--- openstack-pkg-tools-20/init-template/pkgos-gen-upstart-job	2014-12-14 07:57:40.000000000 +0000
+++ openstack-pkg-tools-21/init-template/pkgos-gen-upstart-job	2015-01-05 15:48:09.000000000 +0000
@@ -26,7 +26,7 @@
 if [ -z "${SYSTEM_USER}" ] ; then
 	SYSTEM_USER=${PROJECT_NAME}
 fi
-if [ -z "${SYSTEM_USER}" ] ; then
+if [ -z "${SYSTEM_GROUP}" ] ; then
 	SYSTEM_GROUP=${PROJECT_NAME}
 fi
 if [ "${SYSTEM_USER}" != "root" ] ; then

Reply to: