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

Re: Freeze exception request: systemd 44-4



]] Philipp Kern 

> On Sun, Jul 01, 2012 at 10:18:41AM +0200, Tollef Fog Heen wrote:
> > 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
> 
> That doesn't fit the diff you posted.

Indeed.  Correct patch attached.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are
diff --git a/Makefile.am b/Makefile.am
index 079c118..eb58476 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -294,7 +294,6 @@ dist_systemunit_DATA = \
 	units/sys-kernel-security.mount \
 	units/sys-fs-fuse-connections.mount \
 	units/var-run.mount \
-	units/media.mount \
 	units/remount-rootfs.service \
 	units/printer.target \
 	units/sound.target \
@@ -2306,13 +2305,11 @@ systemd-install-data-hook:
 		rm -f systemd-remount-api-vfs.service \
 			fsck-root.service \
 			remount-rootfs.service \
-			var-run.mount \
-			media.mount && \
+			var-run.mount && \
 		$(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
 		$(LN_S) ../fsck-root.service fsck-root.service && \
 		$(LN_S) ../remount-rootfs.service remount-rootfs.service && \
-		$(LN_S) ../var-run.mount var-run.mount && \
-		$(LN_S) ../media.mount media.mount )
+		$(LN_S) ../var-run.mount var-run.mount )
 	( cd $(DESTDIR)$(userunitdir) && \
 		rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
 		$(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
diff --git a/TODO b/TODO
index d33ae7f..4bdbb93 100644
--- a/TODO
+++ b/TODO
@@ -18,6 +18,8 @@ Bugfixes:
 
 Features:
 
+* dbus upstream still refers to dbus.target and shouldn't
+
 * journald: make configurable "store-on-var", "store-on-run", "dont-store", "auto"
   (store-persistent, store-volatile?)
 
diff --git a/debian/changelog b/debian/changelog
index 535d27a..6622eb6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+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
+
 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#
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 87390bd..7d798d9 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -329,7 +329,10 @@ static void server_rotate(Server *s) {
         if (s->runtime_journal) {
                 r = journal_file_rotate(&s->runtime_journal);
                 if (r < 0)
-                        log_error("Failed to rotate %s: %s", s->runtime_journal->path, strerror(-r));
+                        if (s->runtime_journal)
+                                log_error("Failed to rotate %s: %s", s->runtime_journal->path, strerror(-r));
+                        else
+                                log_error("Failed to create new runtime journal: %s", strerror(-r));
                 else
                         server_fix_perms(s, s->runtime_journal, 0);
         }
@@ -337,7 +340,11 @@ static void server_rotate(Server *s) {
         if (s->system_journal) {
                 r = journal_file_rotate(&s->system_journal);
                 if (r < 0)
-                        log_error("Failed to rotate %s: %s", s->system_journal->path, strerror(-r));
+                        if (s->system_journal)
+                                log_error("Failed to rotate %s: %s", s->system_journal->path, strerror(-r));
+                        else
+                                log_error("Failed to create new system journal: %s", strerror(-r));
+
                 else
                         server_fix_perms(s, s->system_journal, 0);
         }
@@ -345,7 +352,10 @@ static void server_rotate(Server *s) {
         HASHMAP_FOREACH_KEY(f, k, s->user_journals, i) {
                 r = journal_file_rotate(&f);
                 if (r < 0)
-                        log_error("Failed to rotate %s: %s", f->path, strerror(-r));
+                        if (f->path)
+                                log_error("Failed to rotate %s: %s", f->path, strerror(-r));
+                        else
+                                log_error("Failed to create user journal: %s", strerror(-r));
                 else {
                         hashmap_replace(s->user_journals, k, f);
                         server_fix_perms(s, s->system_journal, PTR_TO_UINT32(k));
diff --git a/units/media.mount b/units/media.mount
deleted file mode 100644
index 66a5a5c..0000000
--- a/units/media.mount
+++ /dev/null
@@ -1,16 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Media Directory
-Before=local-fs.target
-
-[Mount]
-What=tmpfs
-Where=/media
-Type=tmpfs
-Options=mode=755,nosuid,nodev,noexec

Reply to: