Freeze exception request: systemd 44-4
(please Cc me on replies, I'm not subscribed)
Hiya,
I've got a couple important fixes for systemd I would like to get into
wheezy:
systemd (44-4) unstable; urgency=low
* Move diversion removal from postinst to preinst. Closes: #679728
* Prevent the journal from crashing when running out of disk space.
This is 499fb21 from upstream. Closes: #668047.
* Stop mounting a tmpfs on /media. Closes: #665943
-- Tollef Fog Heen <tfheen@debian.org> Sun, 01 Jul 2012 08:17:50 +0200
This is on top of yesterday's upload to unstable (44-2 is in testing
already):
systemd (44-3) unstable; urgency=low
[ Michael Biebl ]
* Bump to debhelper 9.
* Convert to Multi-Arch: same where possible. Closes: #676615
[ Tollef Fog Heen ]
* Cherry-pick d384c7 from upstream to stop journald from leaking
memory. Thanks to Andreas Henriksson for testing. Closes: #677701
* Ship lsb init script override/integration in /lib/lsb/init-functions.d
rather than diverting /lib/lsb/init-functions itself. Add appropriate
Breaks to ensure upgrades happen.
-- Tollef Fog Heen <tfheen@debian.org> Fri, 29 Jun 2012 22:34:16 +0200
I have not yet uploaded 44-4, so this is a request for pre-approval for
an unblock.
Full patches are attached.
Cheers,
--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are
diff --git a/debian/changelog b/debian/changelog
index a0e237e..535d27a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+systemd (44-3) unstable; urgency=low
+
+ [ Michael Biebl ]
+ * Bump to debhelper 9.
+ * Convert to Multi-Arch: same where possible. Closes: #676615
+
+ [ Tollef Fog Heen ]
+ * Cherry-pick d384c7 from upstream to stop journald from leaking
+ memory. Thanks to Andreas Henriksson for testing. Closes: #677701
+ * Ship lsb init script override/integration in /lib/lsb/init-functions.d
+ rather than diverting /lib/lsb/init-functions itself. Add appropriate
+ Breaks to ensure upgrades happen.
+
+ -- Tollef Fog Heen <tfheen@debian.org> Fri, 29 Jun 2012 22:34:16 +0200
+
systemd (44-2) unstable; urgency=low
[ Michael Biebl ]
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index 7638583..33717aa 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Standards-Version: 3.9.2
Vcs-Git: git://git.err.no/systemd/
Vcs-Browser: http://git.err.no/cgi-bin/gitweb.cgi?p=systemd;a=summary
Homepage: http://www.freedesktop.org/wiki/Software/systemd
-Build-Depends: debhelper (>= 8.1.0),
+Build-Depends: debhelper (>= 9),
libcap-dev,
pkg-config,
libudev-dev (>= 172),
@@ -42,7 +42,7 @@ Recommends: libpam-systemd
Suggests: systemd-gui, python, python-dbus, python-cairo
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, util-linux (>= 2.19.1-2), initscripts (>= 2.88dsf-17), udev
-Breaks: lvm2 (<< 2.02.84-1)
+Breaks: lvm2 (<< 2.02.84-1), lsb-base (<< 4.1+Debian4)
Conflicts: klogd
Description: system and service manager
systemd is a replacement for sysvinit. It is dependency-based and
@@ -74,8 +74,10 @@ Description: system and service manager - SysV links
Package: libpam-systemd
Architecture: linux-any
+Multi-Arch: same
Section: admin
Priority: extra
+Pre-Depends: ${misc:Pre-Depends}
Depends: systemd (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: system and service manager - PAM module
systemd is a replacement for sysvinit. It is dependency-based and
@@ -107,7 +109,9 @@ Description: system and service manager - GUI
Package: libsystemd-login0
Architecture: linux-any
+Multi-Arch: same
Section: libs
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: systemd login utility library
The libsystemd-login library provides an interface for the
@@ -125,7 +129,9 @@ Description: systemd login utility library - development files
Package: libsystemd-daemon0
Architecture: linux-any
+Multi-Arch: same
Section: libs
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: systemd utility library
The sd-daemon library provides a reference implementation of various
@@ -143,7 +149,9 @@ Description: systemd utility library - development files
Package: libsystemd-journal0
Architecture: linux-any
+Multi-Arch: same
Section: libs
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: systemd journal utility library
The libsystemd-journal library provides an interface for the
@@ -161,7 +169,9 @@ Description: systemd journal utility library - development files
Package: libsystemd-id128-0
Architecture: linux-any
+Multi-Arch: same
Section: libs
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: systemd 128 bit ID utility library
The libsystemd-id128 library provides utility functions for generating
diff --git a/debian/init-functions b/debian/init-functions
deleted file mode 100644
index c7de8e0..0000000
--- a/debian/init-functions
+++ /dev/null
@@ -1,86 +0,0 @@
-# -*-Shell-script-*-
-# /lib/lsb/init-functions
-
-. /lib/lsb/init-functions.systemd
-
-if [ -e /sys/fs/cgroup/systemd ]; then
- # Some init scripts use "set -e" and "set -u", we don't want that
- # here
- set +e
- set +u
-
- if [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ]; then
- # If we are called by a maintainer script, chances are good that a
- # new or updated sysv init script was installed. Reload daemon to
- # pick up any changes.
- systemctl daemon-reload
- fi
-
- # Redirect SysV init scripts when executed by the user
- if [ $PPID -ne 1 ] && [ -z "$init" ] && [ -z "$_SYSTEMCTL_SKIP_REDIRECT" ]; then
- case $(readlink -f "$0") in
- /etc/init.d/*)
- _use_systemctl=1
- # Some services can't reload through the .service file,
- # but can through the init script.
- if [ "$(systemctl -p CanReload show $service 2>/dev/null)" = "CanReload=no" ] && [ "$1" = "reload" ]; then
- _use_systemctl=0
- fi
- ;;
- esac
- else
- export _SYSTEMCTL_SKIP_REDIRECT="true"
- fi
-else
- _use_systemctl=0
-fi
-
-systemctl_redirect () {
- local s
- local rc
- local prog=${1##*/}
- local command=$2
-
- case "$command" in
- start)
- s="Starting $prog (via systemctl)"
- ;;
- stop)
- s="Stopping $prog (via systemctl)"
- ;;
- reload|force-reload)
- s="Reloading $prog configuration (via systemctl)"
- ;;
- restart)
- s="Restarting $prog (via systemctl)"
- ;;
- esac
-
- service="${prog%.sh}.service"
-
- # Don't try to run masked services. Don't check for errors, if
- # this errors, we'll just call systemctl and possibly explode
- # there.
- state=$(systemctl -p LoadState show $service 2>/dev/null)
- [ "$state" = "LoadState=masked" ] && return 0
-
- [ "$command" = status ] || log_daemon_msg "$s" "$service"
- /bin/systemctl $command "$service"
- rc=$?
- [ "$command" = status ] || log_end_msg $rc
-
- return $rc
-}
-
-if [ "$_use_systemctl" = "1" ]; then
- if [ "x$1" = xstart -o \
- "x$1" = xstop -o \
- "x$1" = xrestart -o \
- "x$1" = xreload -o \
- "x$1" = xforce-reload -o \
- "x$1" = xstatus ] ; then
-
- systemctl_redirect $0 $1
- exit $?
- fi
-fi
diff --git a/debian/init-functions.d/40-systemd b/debian/init-functions.d/40-systemd
new file mode 100644
index 0000000..5ab4d8d
--- /dev/null
+++ b/debian/init-functions.d/40-systemd
@@ -0,0 +1,84 @@
+# -*-Shell-script-*-
+# /lib/lsb/init-functions
+
+if [ -e /sys/fs/cgroup/systemd ]; then
+ # Some init scripts use "set -e" and "set -u", we don't want that
+ # here
+ set +e
+ set +u
+
+ if [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ]; then
+ # If we are called by a maintainer script, chances are good that a
+ # new or updated sysv init script was installed. Reload daemon to
+ # pick up any changes.
+ systemctl daemon-reload
+ fi
+
+ # Redirect SysV init scripts when executed by the user
+ if [ $PPID -ne 1 ] && [ -z "$init" ] && [ -z "$_SYSTEMCTL_SKIP_REDIRECT" ]; then
+ case $(readlink -f "$0") in
+ /etc/init.d/*)
+ _use_systemctl=1
+ # Some services can't reload through the .service file,
+ # but can through the init script.
+ if [ "$(systemctl -p CanReload show $service 2>/dev/null)" = "CanReload=no" ] && [ "$1" = "reload" ]; then
+ _use_systemctl=0
+ fi
+ ;;
+ esac
+ else
+ export _SYSTEMCTL_SKIP_REDIRECT="true"
+ fi
+else
+ _use_systemctl=0
+fi
+
+systemctl_redirect () {
+ local s
+ local rc
+ local prog=${1##*/}
+ local command=$2
+
+ case "$command" in
+ start)
+ s="Starting $prog (via systemctl)"
+ ;;
+ stop)
+ s="Stopping $prog (via systemctl)"
+ ;;
+ reload|force-reload)
+ s="Reloading $prog configuration (via systemctl)"
+ ;;
+ restart)
+ s="Restarting $prog (via systemctl)"
+ ;;
+ esac
+
+ service="${prog%.sh}.service"
+
+ # Don't try to run masked services. Don't check for errors, if
+ # this errors, we'll just call systemctl and possibly explode
+ # there.
+ state=$(systemctl -p LoadState show $service 2>/dev/null)
+ [ "$state" = "LoadState=masked" ] && return 0
+
+ [ "$command" = status ] || log_daemon_msg "$s" "$service"
+ /bin/systemctl $command "$service"
+ rc=$?
+ [ "$command" = status ] || log_end_msg $rc
+
+ return $rc
+}
+
+if [ "$_use_systemctl" = "1" ]; then
+ if [ "x$1" = xstart -o \
+ "x$1" = xstop -o \
+ "x$1" = xrestart -o \
+ "x$1" = xreload -o \
+ "x$1" = xforce-reload -o \
+ "x$1" = xstatus ] ; then
+
+ systemctl_redirect $0 $1
+ exit $?
+ fi
+fi
diff --git a/debian/libpam-systemd.install b/debian/libpam-systemd.install
index 18b8af9..0796a22 100644
--- a/debian/libpam-systemd.install
+++ b/debian/libpam-systemd.install
@@ -1,2 +1,2 @@
-lib/security/pam_systemd.so
+lib/*/security/pam_systemd.so
usr/share/man/man8/pam_systemd.8
diff --git a/debian/libsystemd-daemon-dev.install b/debian/libsystemd-daemon-dev.install
index 3a20bfc..b4b7f0d 100644
--- a/debian/libsystemd-daemon-dev.install
+++ b/debian/libsystemd-daemon-dev.install
@@ -1,3 +1,3 @@
-usr/lib/libsystemd-daemon.so
-usr/lib/pkgconfig/libsystemd-daemon.pc
+usr/lib/*/libsystemd-daemon.so
+usr/lib/*/pkgconfig/libsystemd-daemon.pc
usr/include/systemd/sd-daemon.h
diff --git a/debian/libsystemd-daemon0.install b/debian/libsystemd-daemon0.install
index 48d464a..6f94e20 100644
--- a/debian/libsystemd-daemon0.install
+++ b/debian/libsystemd-daemon0.install
@@ -1 +1 @@
-lib/libsystemd-daemon.so.*
+lib/*/libsystemd-daemon.so.*
diff --git a/debian/libsystemd-id128-0.install b/debian/libsystemd-id128-0.install
index 2bfcaf1..8dd964e 100644
--- a/debian/libsystemd-id128-0.install
+++ b/debian/libsystemd-id128-0.install
@@ -1 +1 @@
-lib/libsystemd-id128.so.*
+lib/*/libsystemd-id128.so.*
diff --git a/debian/libsystemd-id128-dev.install b/debian/libsystemd-id128-dev.install
index a6f9ee3..68e0829 100644
--- a/debian/libsystemd-id128-dev.install
+++ b/debian/libsystemd-id128-dev.install
@@ -1,3 +1,3 @@
-usr/lib/libsystemd-id128.so
-usr/lib/pkgconfig/libsystemd-id128.pc
+usr/lib/*/libsystemd-id128.so
+usr/lib/*/pkgconfig/libsystemd-id128.pc
usr/include/systemd/sd-id128.h
diff --git a/debian/libsystemd-journal-dev.install b/debian/libsystemd-journal-dev.install
index c57f054..e16e187 100644
--- a/debian/libsystemd-journal-dev.install
+++ b/debian/libsystemd-journal-dev.install
@@ -1,4 +1,4 @@
-usr/lib/libsystemd-journal.so
-usr/lib/pkgconfig/libsystemd-journal.pc
+usr/lib/*/libsystemd-journal.so
+usr/lib/*/pkgconfig/libsystemd-journal.pc
usr/include/systemd/sd-journal.h
usr/include/systemd/sd-messages.h
diff --git a/debian/libsystemd-journal0.install b/debian/libsystemd-journal0.install
index f72ef37..99c2c52 100644
--- a/debian/libsystemd-journal0.install
+++ b/debian/libsystemd-journal0.install
@@ -1 +1 @@
-lib/libsystemd-journal.so.*
+lib/*/libsystemd-journal.so.*
diff --git a/debian/libsystemd-login-dev.install b/debian/libsystemd-login-dev.install
index d6a0367..8090778 100644
--- a/debian/libsystemd-login-dev.install
+++ b/debian/libsystemd-login-dev.install
@@ -1,3 +1,3 @@
-usr/lib/libsystemd-login.so
-usr/lib/pkgconfig/libsystemd-login.pc
+usr/lib/*/libsystemd-login.so
+usr/lib/*/pkgconfig/libsystemd-login.pc
usr/include/systemd/sd-login.h
diff --git a/debian/libsystemd-login0.install b/debian/libsystemd-login0.install
index 02ccaf8..18c1228 100644
--- a/debian/libsystemd-login0.install
+++ b/debian/libsystemd-login0.install
@@ -1 +1 @@
-lib/libsystemd-login.so.*
+lib/*/libsystemd-login.so.*
diff --git a/debian/rules b/debian/rules
index 9be2c36..3b00888 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,10 +3,12 @@
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS="nostrip"
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
override_dh_auto_configure:
dh_auto_configure -- \
--with-rootprefix= \
- --with-rootlibdir=/lib \
+ --with-rootlibdir=/lib/$(DEB_HOST_MULTIARCH) \
--with-udevrulesdir=/lib/udev/rules.d \
--enable-gtk \
--enable-libcryptsetup \
@@ -24,9 +26,8 @@ override_dh_auto_clean:
override_dh_install:
rm debian/tmp/usr/share/doc/systemd/LICENSE
- rm debian/tmp/lib/security/pam_systemd.la
- rm debian/tmp/usr/lib/*.la
rm debian/tmp/lib/systemd/system/sysinit.target.wants/systemd-vconsole-setup.service
+ find debian/tmp/ -name '*.la' -delete
chmod +x debian/debian-fixup
dh_install -O--parallel --fail-missing
dh_install -plibpam-systemd debian/pam-configs /usr/share
diff --git a/debian/systemd.install b/debian/systemd.install
index 8003e35..102e3f2 100644
--- a/debian/systemd.install
+++ b/debian/systemd.install
@@ -39,8 +39,9 @@ usr/lib/binfmt.d
usr/lib/modules-load.d
usr/lib/sysctl.d
usr/lib/systemd
+usr/lib/*/systemd
usr/lib/tmpfiles.d
-debian/init-functions lib/lsb
+debian/init-functions.d/40-systemd /lib/lsb/init-functions.d
debian/debian-fixup lib/systemd/
debian/debian-fixup.service lib/systemd/system
debian/tmpfiles.d/debian.conf usr/lib/tmpfiles.d
diff --git a/debian/systemd.postinst b/debian/systemd.postinst
index 366f7f5..778f60b 100644
--- a/debian/systemd.postinst
+++ b/debian/systemd.postinst
@@ -59,6 +59,12 @@ if dpkg --compare-versions "$2" lt "40-1"; then
fi
fi
+if [ "$1" = "configure" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt "44-3"; then
+ rm -f /lib/lsb/init-functions
+ dpkg-divert --remove --package systemd --rename \
+ --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
+fi
+
systemd-machine-id-setup
#DEBHELPER#
diff --git a/debian/systemd.postrm b/debian/systemd.postrm
deleted file mode 100644
index c7fe8a6..0000000
--- a/debian/systemd.postrm
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if [ "$1" = remove ] || [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt 25-1; then
- dpkg-divert --remove --package systemd --rename \
- --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
-fi
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/systemd.preinst b/debian/systemd.preinst
deleted file mode 100644
index 0e8d30d..0000000
--- a/debian/systemd.preinst
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if [ "$1" = install ] || [ "$1" = upgrade ]; then
- dpkg-divert --add --package systemd --rename \
- --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
-fi
-
-#DEBHELPER#
-
-exit 0
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 5d540a7..20a0193 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -67,9 +67,12 @@ void journal_file_close(JournalFile *f) {
assert(f);
- if (f->header && f->writable)
- f->header->state = STATE_OFFLINE;
+ if (f->header) {
+ if (f->writable)
+ f->header->state = STATE_OFFLINE;
+ munmap(f->header, PAGE_ALIGN(sizeof(Header)));
+ }
for (t = 0; t < _WINDOW_MAX; t++)
if (f->windows[t].ptr)
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index af9c12d..084c51f 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -627,7 +627,7 @@ static int session_terminate_cgroup(Session *s) {
r = manager_get_session_by_pid(s->manager, s->leader, &t);
if (r > 0 && t == s) {
- kill(s->leader, SIGTERM); /* for normal processes */
+ /*kill(s->leader, SIGTERM); */ /* for normal processes */
kill(s->leader, SIGHUP); /* for shells */
kill(s->leader, SIGCONT); /* in case they are stopped */
}
diff --git a/debian/changelog b/debian/changelog
index 535d27a..efcedea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+systemd (44-4) unstable; urgency=low
+
+ * Move diversion removal from postinst to preinst. Closes: #679728
+
+ -- Tollef Fog Heen <tfheen@debian.org> Sun, 01 Jul 2012 08:17:50 +0200
+
systemd (44-3) unstable; urgency=low
[ Michael Biebl ]
diff --git a/debian/systemd.postinst b/debian/systemd.postinst
index 778f60b..366f7f5 100644
--- a/debian/systemd.postinst
+++ b/debian/systemd.postinst
@@ -59,12 +59,6 @@ if dpkg --compare-versions "$2" lt "40-1"; then
fi
fi
-if [ "$1" = "configure" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt "44-3"; then
- rm -f /lib/lsb/init-functions
- dpkg-divert --remove --package systemd --rename \
- --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
-fi
-
systemd-machine-id-setup
#DEBHELPER#
diff --git a/debian/systemd.preinst b/debian/systemd.preinst
new file mode 100644
index 0000000..22b4e36
--- /dev/null
+++ b/debian/systemd.preinst
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+set -e
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt "44-3"; then
+ rm -f /lib/lsb/init-functions
+ dpkg-divert --remove --package systemd --rename \
+ --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
+fi
+
+#DEBHELPER#
Reply to: