[packages/systemd] Patch to fix the 'Overwriting existing symlink'
jajcus
jajcus at pld-linux.org
Thu May 14 09:36:05 CEST 2015
commit 5e012f76a2cd4ef1a0f433106a71b03236a85b3c
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Thu May 14 09:33:00 2015 +0200
Patch to fix the 'Overwriting existing symlink'
This should fix the annoying warnings in journal.
http://cgit.freedesktop.org/systemd/systemd/commit/?id=4e558983
Release: 1.1
systemd.spec | 4 +++-
sysv-symlinks-warning.patch | 28 ++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
---
diff --git a/systemd.spec b/systemd.spec
index f011937..15e1a6a 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -25,7 +25,7 @@ Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa
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
@@ -71,6 +71,7 @@ Patch16: systemd-configfs.patch
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
@@ -684,6 +685,7 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
%patch17 -p1
%patch18 -p1
%patch19 -p1
+%patch20 -p1
cp -p %{SOURCE2} src/systemd_booted.c
%build
diff --git a/sysv-symlinks-warning.patch b/sysv-symlinks-warning.patch
new file mode 100644
index 0000000..77a02bf
--- /dev/null
+++ b/sysv-symlinks-warning.patch
@@ -0,0 +1,28 @@
+
+based on:
+
+From 4e5589836c9e143796c3f3d81e67ab7a9209e2b0 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt at 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);
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/5e012f76a2cd4ef1a0f433106a71b03236a85b3c
More information about the pld-cvs-commit
mailing list