systemd-tmpfiles-setup.service fails on 23 Alpha RC1 Server (#1250737)

This commit is contained in:
Jan Synacek 2015-09-17 13:26:32 +02:00
parent 35ec3ad770
commit 4c8e89957b
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From ad75a97f7d86ddbc1b8521ae084862013c1713b0 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 22 Jul 2015 22:02:14 +0200
Subject: [PATCH] tmpfiles: downgrade errors when a file system does not
support file attributes
This downgrades errors from setting file attributes via tmpfiles to
warnings and makes them non-fatal.
Also, as a special case, if a file system does not support file
attributes at all, then the message is downgraded to debug, so that it
is not seen at all.
With this change reiserfs should not see any messages at all anymore
(since it apparently does not implement file attributes at all), but XFS
will still get a warning but no failure. The warning is something the
XFS kernel folks should fix though, by adjusting their file attributes
behaviour to be identical to ext234's.
Fixes #560.
---
src/tmpfiles/tmpfiles.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 42f757c..271984b 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -955,9 +955,10 @@ static int path_set_attribute(Item *item, const char *path) {
r = chattr_fd(fd, f, item->attribute_mask);
if (r < 0)
- return log_error_errno(r,
- "Cannot set file attribute for '%s', value=0x%08x, mask=0x%08x: %m",
- path, item->attribute_value, item->attribute_mask);
+ log_full_errno(r == -ENOTTY ? LOG_DEBUG : LOG_WARNING,
+ r,
+ "Cannot set file attribute for '%s', value=0x%08x, mask=0x%08x: %m",
+ path, item->attribute_value, item->attribute_mask);
return 0;
}
--
2.4.3

View File

@ -13,7 +13,7 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 222
Release: 2%{?gitcommit:.git%{gitcommit}}%{?dist}
Release: 3%{?gitcommit:.git%{gitcommit}}%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
Summary: A System and Service Manager
@ -35,6 +35,7 @@ Source9: 20-yama-ptrace.conf
# Patch series is available from http://cgit.freedesktop.org/systemd/systemd-stable/log/?h=v220-stable
# GIT_DIR=~/src/systemd/.git git format-patch-ab -M -N --no-signature v220..v220-stable
# i=1; for p in 0*patch;do printf "Patch%04d: %s\n" $i $p; ((i++));done
Patch0001: 0001-tmpfiles-downgrade-errors-when-a-file-system-does-no.patch
# kernel-install patch for grubby, drop if grubby is obsolete
Patch1000: kernel-install-grubby.patch
@ -767,6 +768,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd
/usr/lib/firewalld/services/*
%changelog
* Thu Sep 17 2015 Jan Synáček <jsynacek@redhat.com> - 222-3
- Fix: systemd-tmpfiles-setup.service fails on 23 Alpha RC1 Server (#1250737)
* Thu Jul 9 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 222-2
- Remove python subpackages (python-systemd in now standalone)