summaryrefslogtreecommitdiff
path: root/core/systemd
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-01-14 03:47:29 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-01-14 03:47:29 +0000
commit271da49386e259723ef574713339f04886630604 (patch)
tree3357a1b3aa15cfd25145095c41b0a94612ce3635 /core/systemd
parentbcefa96cbc68f340b2aa11c108353993db074e76 (diff)
Tue Jan 14 03:40:13 UTC 2014
Diffstat (limited to 'core/systemd')
-rw-r--r--core/systemd/0001-Make-hibernation-test-work-for-swap-files.patch28
-rw-r--r--core/systemd/0001-acpi-fpdt-break-on-zero-or-negative-length-read.patch26
-rw-r--r--core/systemd/0001-fstab-generator-Do-not-try-to-fsck-non-devices.patch33
-rw-r--r--core/systemd/0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch41
-rw-r--r--core/systemd/PKGBUILD27
-rw-r--r--core/systemd/systemd.install14
6 files changed, 162 insertions, 7 deletions
diff --git a/core/systemd/0001-Make-hibernation-test-work-for-swap-files.patch b/core/systemd/0001-Make-hibernation-test-work-for-swap-files.patch
new file mode 100644
index 000000000..e780e01b6
--- /dev/null
+++ b/core/systemd/0001-Make-hibernation-test-work-for-swap-files.patch
@@ -0,0 +1,28 @@
+From 0c6f1f4ea4980ff719979d36f10bd6ea3e464c02 Mon Sep 17 00:00:00 2001
+From: Jan Janssen <medhefgo@web.de>
+Date: Thu, 31 Oct 2013 17:22:03 +0100
+Subject: [PATCH] Make hibernation test work for swap files
+
+Suspend to disk works for swap files too (even if it is located
+on an ecrypted file system):
+https://www.kernel.org/doc/Documentation/power/swsusp-and-swap-files.txt
+---
+ src/shared/sleep-config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
+index d068bfc..2bb0493 100644
+--- a/src/shared/sleep-config.c
++++ b/src/shared/sleep-config.c
+@@ -206,7 +206,7 @@ static int hibernation_partition_size(size_t *size, size_t *used) {
+ if (!d)
+ return -ENOMEM;
+
+- if (!streq(type, "partition")) {
++ if (!streq(type, "partition") && !streq(type, "file")) {
+ log_debug("Partition %s has type %s, ignoring.", d, type);
+ continue;
+ }
+--
+1.8.5.2
+
diff --git a/core/systemd/0001-acpi-fpdt-break-on-zero-or-negative-length-read.patch b/core/systemd/0001-acpi-fpdt-break-on-zero-or-negative-length-read.patch
new file mode 100644
index 000000000..2594d5066
--- /dev/null
+++ b/core/systemd/0001-acpi-fpdt-break-on-zero-or-negative-length-read.patch
@@ -0,0 +1,26 @@
+From f576cd2092bc40f9998415cdc3caf10035d4743a Mon Sep 17 00:00:00 2001
+From: Pavel Holica <conscript89@gmail.com>
+Date: Wed, 6 Nov 2013 23:24:16 +0100
+Subject: [PATCH] acpi-fpdt: break on zero or negative length read
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1027478
+---
+ src/shared/acpi-fpdt.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c
+index 75648b4..7bae47f 100644
+--- a/src/shared/acpi-fpdt.c
++++ b/src/shared/acpi-fpdt.c
+@@ -109,6 +109,8 @@ int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) {
+ for (rec = (struct acpi_fpdt_header *)(buf + sizeof(struct acpi_table_header));
+ (char *)rec < buf + l;
+ rec = (struct acpi_fpdt_header *)((char *)rec + rec->length)) {
++ if (rec->length <= 0)
++ break;
+ if (rec->type != ACPI_FPDT_TYPE_BOOT)
+ continue;
+ if (rec->length != sizeof(struct acpi_fpdt_header))
+--
+1.8.5.2
+
diff --git a/core/systemd/0001-fstab-generator-Do-not-try-to-fsck-non-devices.patch b/core/systemd/0001-fstab-generator-Do-not-try-to-fsck-non-devices.patch
new file mode 100644
index 000000000..e0f3d4ce3
--- /dev/null
+++ b/core/systemd/0001-fstab-generator-Do-not-try-to-fsck-non-devices.patch
@@ -0,0 +1,33 @@
+From 92e94a2b145eb3bee7035907cd8482285bb680ef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
+Date: Sun, 22 Dec 2013 09:17:14 +0100
+Subject: [PATCH] fstab-generator: Do not try to fsck non-devices
+
+This fixes a regression introduced in 64e70e4 where the mount fails
+when fstab is misconfigured with fs_passno > 0 on a virtual file
+system like nfs, and the type is specified as "auto".
+
+This is a backport of e2f123b97, but it since not all fsck-related patches
+have been backported to this version, the implementation is a bit different.
+---
+ src/fstab-generator/fstab-generator.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
+index c0c2992..cf8b371 100644
+--- a/src/fstab-generator/fstab-generator.c
++++ b/src/fstab-generator/fstab-generator.c
+@@ -210,7 +210,9 @@ static int add_mount(
+ post);
+
+ if (passno > 0) {
+- if (streq(where, "/")) {
++ if(!is_device_path(what)) {
++ log_warning("Checking was requested for \"%s\", but it is not a device.", what);
++ } else if (streq(where, "/")) {
+ lnk = strjoin(arg_dest, "/", SPECIAL_LOCAL_FS_TARGET, ".wants/", "systemd-fsck-root.service", NULL);
+ if (!lnk)
+ return log_oom();
+--
+1.8.5.2
+
diff --git a/core/systemd/0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch b/core/systemd/0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch
new file mode 100644
index 000000000..6e7f37bfe
--- /dev/null
+++ b/core/systemd/0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch
@@ -0,0 +1,41 @@
+From 77009452cfd25208509b14ea985e81fdf9f7d40e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 3 Oct 2013 22:15:08 -0400
+Subject: [PATCH] systemd: order remote mounts from mountinfo before
+ remote-fs.target
+
+Usually the network is stopped before filesystems are umounted.
+Ordering network filesystems before remote-fs.target means that their
+unmounting will be performed earlier, and can terminate sucessfully.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=70002
+---
+ src/core/mount.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/mount.c b/src/core/mount.c
+index 3d46557..93bfa99 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -1440,6 +1440,9 @@ static int mount_add_one(
+
+ u = manager_get_unit(m, e);
+ if (!u) {
++ const char* const target =
++ fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
++
+ delete = true;
+
+ u = unit_new(m, sizeof(Mount));
+@@ -1466,7 +1469,7 @@ static int mount_add_one(
+ goto fail;
+ }
+
+- r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true);
++ r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
+ if (r < 0)
+ goto fail;
+
+--
+1.8.5.2
+
diff --git a/core/systemd/PKGBUILD b/core/systemd/PKGBUILD
index a109f375d..a194968ef 100644
--- a/core/systemd/PKGBUILD
+++ b/core/systemd/PKGBUILD
@@ -4,10 +4,10 @@
pkgbase=systemd
pkgname=('systemd' 'systemd-sysvcompat')
pkgver=208
-pkgrel=3
+pkgrel=10
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
-makedepends=('acl' 'cryptsetup' 'dbus-core' 'docbook-xsl' 'gobject-introspection' 'gperf'
+makedepends=('acl' 'cryptsetup' 'libdbus' 'docbook-xsl' 'gobject-introspection' 'gperf'
'gtk-doc' 'intltool' 'kmod' 'libcap' 'libgcrypt' 'libmicrohttpd' 'libxslt'
'linux-api-headers' 'pam' 'python' 'quota-tools' 'xz')
options=('strip' 'debug')
@@ -15,6 +15,8 @@ source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
'initcpio-hook-udev'
'initcpio-install-systemd'
'initcpio-install-udev'
+ '0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch'
+ '0001-Make-hibernation-test-work-for-swap-files.patch'
'0001-fix-lingering-references-to-var-lib-backlight-random.patch'
'0001-mount-check-for-NULL-before-reading-pm-what.patch'
'0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch'
@@ -25,11 +27,15 @@ source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
'0004-Remove-FsckPassNo-from-systemd-fsck-root.service.patch'
'0005-mount-service-drop-FsckPassNo-support.patch'
'0006-efi-boot-generator-hookup-to-fsck.patch'
- '0007-fsck-root-only-run-when-requested-in-fstab.patch')
+ '0007-fsck-root-only-run-when-requested-in-fstab.patch'
+ '0001-fstab-generator-Do-not-try-to-fsck-non-devices.patch'
+ '0001-acpi-fpdt-break-on-zero-or-negative-length-read.patch')
md5sums=('df64550d92afbffb4f67a434193ee165'
'29245f7a240bfba66e2b1783b63b6b40'
'8b68b0218a3897d4d37a6ccf47914774'
'bde43090d4ac0ef048e3eaee8202a407'
+ '8f1182afa1156f0076a912b23e761e02'
+ 'a5c6564d5435ee99814effd2aa9baf93'
'1b191c4e7a209d322675fd199e3abc66'
'a693bef63548163ffc165f4c4801ebf7'
'ccafe716d87df9c42af0d1960b5a4105'
@@ -40,10 +46,13 @@ md5sums=('df64550d92afbffb4f67a434193ee165'
'2096f33bd36dfa0a7f0431d0a429787a'
'd2481a6ea199b581e243a950125b0ca6'
'c2aee634a3a6c50778968f0d5c756f40'
- 'ef8b8212d504bb73c10bf4e85f0703b2')
+ 'ef8b8212d504bb73c10bf4e85f0703b2'
+ '4ba2317bf4d7708fca406f49482b1bf3'
+ '078f10d6fc315b329844cd20fa742eee')
prepare() {
cd "$pkgname-$pkgver"
+
patch -Np1 < "$srcdir"/0001-fix-lingering-references-to-var-lib-backlight-random.patch
patch -Np1 < "$srcdir"/0001-mount-check-for-NULL-before-reading-pm-what.patch
patch -Np1 < "$srcdir"/0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
@@ -59,6 +68,14 @@ prepare() {
patch -Np1 < "$srcdir"/0005-mount-service-drop-FsckPassNo-support.patch
patch -Np1 < "$srcdir"/0006-efi-boot-generator-hookup-to-fsck.patch
patch -Np1 < "$srcdir"/0007-fsck-root-only-run-when-requested-in-fstab.patch
+ # Fix FS#38210 (result of the previous backport)
+ patch -Np1 < "$srcdir"/0001-fstab-generator-Do-not-try-to-fsck-non-devices.patch
+ # Fix FS#38123
+ patch -Np1 < "$srcdir"/0001-Make-hibernation-test-work-for-swap-files.patch
+ # Fix FS#35671
+ patch -Np1 <"$srcdir"/0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch
+ # Fix FS#38403
+ patch -Np1 <"$srcdir"/0001-acpi-fpdt-break-on-zero-or-negative-length-read.patch
autoreconf
}
@@ -117,8 +134,6 @@ package_systemd() {
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
- printf "d /run/console 0755 root root\n" > "$pkgdir/usr/lib/tmpfiles.d/console.conf"
-
# fix .so links in manpage stubs
find "$pkgdir/usr/share/man" -type f -name '*.[[:digit:]]' \
-exec sed -ri '1s|^\.so (.*)\.([0-9]+)|.so man\2/\1.\2|' {} +
diff --git a/core/systemd/systemd.install b/core/systemd/systemd.install
index 1e79585d7..38a28f2c9 100644
--- a/core/systemd/systemd.install
+++ b/core/systemd/systemd.install
@@ -1,7 +1,7 @@
#!/bin/sh
sd_booted() {
- [ -e sys/fs/cgroup/systemd ]
+ [[ -d /run/systemd/systemd/ ]]
}
add_privs() {
@@ -11,6 +11,12 @@ add_privs() {
fi
}
+add_journal_acls() {
+ # ignore errors, since the filesystem might not support ACLs
+ setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/ 2>/dev/null
+ :
+}
+
post_common() {
systemd-machine-id-setup
@@ -54,6 +60,8 @@ _208_changes() {
post_install() {
post_common
+ add_journal_acls
+
# enable getty@tty1 by default, but don't track the file
systemctl enable getty@tty1.service
@@ -115,6 +123,10 @@ post_upgrade() {
if [ "$(vercmp 208-1 "$2")" -eq 1 ]; then
_208_changes
fi
+
+ if [ "$(vercmp 208-8 "$2")" -eq 1 ]; then
+ add_journal_acls
+ fi
}
# vim:set ts=2 sw=2 et: