Name: systemd
# Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often)
Version: 219
-Release: 1
+Release: 1.1
Epoch: 1
License: GPL v2+ (udev), LGPL v2.1+ (the rest)
Group: Base
Patch17: pld-boot_efi_mount.patch
Patch18: optional-tmp-on-tmpfs.patch
Patch19: uids_gids.patch
+Patch20: sysv-symlinks-warning.patch
URL: http://www.freedesktop.org/wiki/Software/systemd
BuildRequires: acl-devel
BuildRequires: attr-devel
%patch17 -p1
%patch18 -p1
%patch19 -p1
+%patch20 -p1
cp -p %{SOURCE2} src/systemd_booted.c
%build
--- /dev/null
+
+based on:
+
+From 4e5589836c9e143796c3f3d81e67ab7a9209e2b0 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu, 19 Feb 2015 11:06:24 +0100
+Subject: sysv-generator: fix wrong "Overwriting existing symlink" warnings
+
+Fix result testing of is_symlink() to ignore negative results, which happen if
+the file name does not exist at all. In this case we do not want a warning and
+unlink the non-existing link.
+
+https://bugs.debian.org/778700
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index 2091854..bd67f32 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -166,7 +166,7 @@ static int generate_unit_file(SysvStub *s) {
+ /* We might already have a symlink with the same name from a Provides:,
+ * or from backup files like /etc/init.d/foo.bak. Real scripts always win,
+ * so remove an existing link */
+- if (is_symlink(unit)) {
++ if (is_symlink(unit) > 0) {
+ log_warning("Overwriting existing symlink %s with real service", unit);
+ (void) unlink(unit);
+ }
+