summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <joshua.lock@collabora.co.uk>2015-05-01 11:41:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-03 11:43:50 +0100
commitd755e76658387d20013ad9918971cf5c05fce243 (patch)
treeecaa1460e7dd28d5a6bbf6461349bf5d65ee939a
parent90972c951822922301ca9fd21e1eb7cea5435ee4 (diff)
downloadpoky-d755e76658387d20013ad9918971cf5c05fce243.tar.gz
systemd: remove unused patches
These patches are no longer required since 7bfc9891ff498bdde31aadd2449d3b4692dbc510 (From OE-Core rev: e45b8bf579f2050ebdb1aa1a4c2f9c3b530c9ad6) Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/systemd/systemd/0001-tmpfiles-avoid-creating-duplicate-acl-entries.patch134
-rw-r--r--meta/recipes-core/systemd/systemd/0002-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch86
-rw-r--r--meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch37
3 files changed, 0 insertions, 257 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-tmpfiles-avoid-creating-duplicate-acl-entries.patch b/meta/recipes-core/systemd/systemd/0001-tmpfiles-avoid-creating-duplicate-acl-entries.patch
deleted file mode 100644
index 6652e28e23..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-tmpfiles-avoid-creating-duplicate-acl-entries.patch
+++ /dev/null
@@ -1,134 +0,0 @@
1Upstream-Status: Backport
2Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
3
4From 33d36e28b0a23fb7ac33435a1329d65bff1ba4ec Mon Sep 17 00:00:00 2001
5From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
6Date: Mon, 23 Feb 2015 23:19:54 -0500
7Subject: [PATCH] tmpfiles: avoid creating duplicate acl entries
8
9https://bugs.freedesktop.org/show_bug.cgi?id=89202
10https://bugs.debian.org/778656
11
12Status quo ante can be restored with:
13 getfacl -p /var/log/journal/`cat /etc/machine-id`|grep -v '^#'|sort -u|sudo setfacl --set-file=- /var/log/journal/`cat /etc/machine-id`
14
15(cherry picked from commit 1c73f3bc29111a00738569c9d40a989b161a0624)
16---
17 src/shared/acl-util.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++--
18 src/shared/acl-util.h | 4 +++
19 2 files changed, 81 insertions(+), 2 deletions(-)
20
21diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c
22index a4ff1ab..cbe09d7 100644
23--- a/src/shared/acl-util.c
24+++ b/src/shared/acl-util.c
25@@ -282,6 +282,77 @@ int parse_acl(char *text, acl_t *acl_access, acl_t *acl_default, bool want_mask)
26 return 0;
27 }
28
29+static int acl_entry_equal(acl_entry_t a, acl_entry_t b) {
30+ acl_tag_t tag_a, tag_b;
31+
32+ if (acl_get_tag_type(a, &tag_a) < 0)
33+ return -errno;
34+
35+ if (acl_get_tag_type(b, &tag_b) < 0)
36+ return -errno;
37+
38+ if (tag_a != tag_b)
39+ return false;
40+
41+ switch (tag_a) {
42+ case ACL_USER_OBJ:
43+ case ACL_GROUP_OBJ:
44+ case ACL_MASK:
45+ case ACL_OTHER:
46+ /* can have only one of those */
47+ return true;
48+ case ACL_USER: {
49+ _cleanup_(acl_free_uid_tpp) uid_t *uid_a, *uid_b;
50+
51+ uid_a = acl_get_qualifier(a);
52+ if (!uid_a)
53+ return -errno;
54+
55+ uid_b = acl_get_qualifier(b);
56+ if (!uid_b)
57+ return -errno;
58+
59+ return *uid_a == *uid_b;
60+ }
61+ case ACL_GROUP: {
62+ _cleanup_(acl_free_gid_tpp) gid_t *gid_a, *gid_b;
63+
64+ gid_a = acl_get_qualifier(a);
65+ if (!gid_a)
66+ return -errno;
67+
68+ gid_b = acl_get_qualifier(b);
69+ if (!gid_b)
70+ return -errno;
71+
72+ return *gid_a == *gid_b;
73+ }
74+ default:
75+ assert_not_reached("Unknown acl tag type");
76+ }
77+}
78+
79+static int find_acl_entry(acl_t acl, acl_entry_t entry, acl_entry_t *out) {
80+ acl_entry_t i;
81+ int r;
82+
83+ for (r = acl_get_entry(acl, ACL_FIRST_ENTRY, &i);
84+ r > 0;
85+ r = acl_get_entry(acl, ACL_NEXT_ENTRY, &i)) {
86+
87+ r = acl_entry_equal(i, entry);
88+ if (r < 0)
89+ return r;
90+ if (r > 0) {
91+ *out = i;
92+ return 1;
93+ }
94+ }
95+ if (r < 0)
96+ return -errno;
97+ return 0;
98+}
99+
100 int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl) {
101 _cleanup_(acl_freep) acl_t old;
102 acl_entry_t i;
103@@ -297,8 +368,12 @@ int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl) {
104
105 acl_entry_t j;
106
107- if (acl_create_entry(&old, &j) < 0)
108- return -errno;
109+ r = find_acl_entry(old, i, &j);
110+ if (r < 0)
111+ return r;
112+ if (r == 0)
113+ if (acl_create_entry(&old, &j) < 0)
114+ return -errno;
115
116 if (acl_copy_entry(j, i) < 0)
117 return -errno;
118diff --git a/src/shared/acl-util.h b/src/shared/acl-util.h
119index 90e88ff..fdb9006 100644
120--- a/src/shared/acl-util.h
121+++ b/src/shared/acl-util.h
122@@ -41,5 +41,9 @@ int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl);
123 DEFINE_TRIVIAL_CLEANUP_FUNC(acl_t, acl_free);
124 #define acl_free_charp acl_free
125 DEFINE_TRIVIAL_CLEANUP_FUNC(char*, acl_free_charp);
126+#define acl_free_uid_tp acl_free
127+DEFINE_TRIVIAL_CLEANUP_FUNC(uid_t*, acl_free_uid_tp);
128+#define acl_free_gid_tp acl_free
129+DEFINE_TRIVIAL_CLEANUP_FUNC(gid_t*, acl_free_gid_tp);
130
131 #endif
132--
1332.3.1
134
diff --git a/meta/recipes-core/systemd/systemd/0002-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch b/meta/recipes-core/systemd/systemd/0002-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
deleted file mode 100644
index c195437ba0..0000000000
--- a/meta/recipes-core/systemd/systemd/0002-tmpfiles-quietly-ignore-ACLs-on-unsupported-filesyst.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1Upstream-Status: Backport
2Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
3
4From 31d05181e3a34c5c0ff6314d8eca1c3b4bb29423 Mon Sep 17 00:00:00 2001
5From: Hans-Peter Deifel <hpd@hpdeifel.de>
6Date: Tue, 3 Mar 2015 00:35:08 +0100
7Subject: [PATCH 2/2] tmpfiles: quietly ignore ACLs on unsupported filesystems
8
9A warning is printed if ACLs cannot be retrieved for any reason other
10than -ENOSYS. For -ENOSYS, debug log is printed.
11
12(cherry picked from commit d873e8778c92014c02a9122852758b436fa95c0e)
13---
14 src/tmpfiles/tmpfiles.c | 36 ++++++++++++++++++++----------------
15 1 file changed, 20 insertions(+), 16 deletions(-)
16
17diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
18index 88ba7e4..187997e 100644
19--- a/src/tmpfiles/tmpfiles.c
20+++ b/src/tmpfiles/tmpfiles.c
21@@ -704,6 +704,9 @@ static int path_set_acl(const char *path, acl_type_t type, acl_t acl, bool modif
22 int r;
23 _cleanup_(acl_free_charpp) char *t = NULL;
24
25+ /* Returns 0 for success, positive error if already warned,
26+ * negative error otherwise. */
27+
28 if (modify) {
29 r = acls_for_file(path, type, acl, &dup);
30 if (r < 0)
31@@ -731,35 +734,36 @@ static int path_set_acl(const char *path, acl_type_t type, acl_t acl, bool modif
32
33 r = acl_set_file(path, type, dup);
34 if (r < 0)
35- return log_error_errno(-errno,
36- "Setting %s ACL \"%s\" on %s failed: %m",
37- type == ACL_TYPE_ACCESS ? "access" : "default",
38- strna(t), path);
39+ return -log_error_errno(errno,
40+ "Setting %s ACL \"%s\" on %s failed: %m",
41+ type == ACL_TYPE_ACCESS ? "access" : "default",
42+ strna(t), path);
43+
44 return 0;
45 }
46 #endif
47
48 static int path_set_acls(Item *item, const char *path) {
49+ int r = 0;
50 #ifdef HAVE_ACL
51- int r;
52-
53 assert(item);
54 assert(path);
55
56- if (item->acl_access) {
57+ if (item->acl_access)
58 r = path_set_acl(path, ACL_TYPE_ACCESS, item->acl_access, item->force);
59- if (r < 0)
60- return r;
61- }
62
63- if (item->acl_default) {
64+ if (r == 0 && item->acl_default)
65 r = path_set_acl(path, ACL_TYPE_DEFAULT, item->acl_default, item->force);
66- if (r < 0)
67- return r;
68- }
69-#endif
70
71- return 0;
72+ if (r > 0)
73+ return -r; /* already warned */
74+ else if (r == -ENOTSUP) {
75+ log_debug_errno(r, "ACLs not supported by file system at %s", path);
76+ return 0;
77+ } else if (r < 0)
78+ log_error_errno(r, "ACL operation on \"%s\" failed: %m", path);
79+#endif
80+ return r;
81 }
82
83 static int write_one_file(Item *i, const char *path) {
84--
852.3.1
86
diff --git a/meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch b/meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
deleted file mode 100644
index a49d626824..0000000000
--- a/meta/recipes-core/systemd/systemd/0013-journal-fix-Inappropriate-ioctl-for-device-on-ext4.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 65eae3b76243d2dfd869f8c43b787575f7b4b994 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
3Date: Sun, 1 Mar 2015 21:13:10 -0300
4Subject: [PATCH] journal: fix Inappropriate ioctl for device on ext4
5
6Logs constantly show
7
8systemd-journald[395]: Failed to set file attributes: Inappropriate ioctl for device
9
10This is because ext4 does not support FS_NOCOW_FL.
11
12[zj: fold into one conditional as suggested on the ML and
13 fix (preexisting) r/errno confusion in error message.]
14
15Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
16---
17 src/journal/journal-file.c | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
21index 9c9a548..0e33a0f 100644
22--- a/src/journal/journal-file.c
23+++ b/src/journal/journal-file.c
24@@ -2609,8 +2609,8 @@ int journal_file_open(
25 * shouldn't be too bad, given that we do our own
26 * checksumming). */
27 r = chattr_fd(f->fd, true, FS_NOCOW_FL);
28- if (r < 0)
29- log_warning_errno(errno, "Failed to set file attributes: %m");
30+ if (r < 0 && r != -ENOTTY)
31+ log_warning_errno(r, "Failed to set file attributes: %m");
32
33 /* Let's attach the creation time to the journal file,
34 * so that the vacuuming code knows the age of this
35--
361.9.3
37