.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=639
This commit is contained in:
parent
41d5ba7e50
commit
bc75b9d246
6590
0001-hwdb-update.patch
Normal file
6590
0001-hwdb-update.patch
Normal file
File diff suppressed because it is too large
Load Diff
104
0001-journal-cleanup-up-error-handling-in-update_catalog.patch
Normal file
104
0001-journal-cleanup-up-error-handling-in-update_catalog.patch
Normal file
@ -0,0 +1,104 @@
|
||||
From e3b9d9c8027a7c4c55cf1614e0fe9423fad69e8f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Fri, 11 Apr 2014 08:44:55 -0400
|
||||
Subject: [PATCH] journal: cleanup up error handling in update_catalog()
|
||||
|
||||
- Negative/positive errno mixup caused duplicates not to be detected properly.
|
||||
Now we get a warning about some duplicate entries in our own catalogs...
|
||||
- Errors in update_catalog would be ignored, but they should not be.
|
||||
---
|
||||
src/journal/catalog.c | 25 +++++++++++++------------
|
||||
src/journal/test-catalog.c | 3 ++-
|
||||
2 files changed, 15 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git src/journal/catalog.c src/journal/catalog.c
|
||||
index 3ed0b7e..02dedc4 100644
|
||||
--- src/journal/catalog.c
|
||||
+++ src/journal/catalog.c
|
||||
@@ -103,7 +103,7 @@ static int finish_item(
|
||||
const char *payload) {
|
||||
|
||||
ssize_t offset;
|
||||
- CatalogItem *i;
|
||||
+ _cleanup_free_ CatalogItem *i = NULL;
|
||||
int r;
|
||||
|
||||
assert(h);
|
||||
@@ -126,13 +126,14 @@ static int finish_item(
|
||||
i->offset = htole64((uint64_t) offset);
|
||||
|
||||
r = hashmap_put(h, i, i);
|
||||
- if (r == EEXIST) {
|
||||
+ if (r == -EEXIST) {
|
||||
log_warning("Duplicate entry for " SD_ID128_FORMAT_STR ".%s, ignoring.",
|
||||
SD_ID128_FORMAT_VAL(id), language ? language : "C");
|
||||
- free(i);
|
||||
return 0;
|
||||
- }
|
||||
+ } else if (r < 0)
|
||||
+ return r;
|
||||
|
||||
+ i = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -383,8 +384,8 @@ error:
|
||||
int catalog_update(const char* database, const char* root, const char* const* dirs) {
|
||||
_cleanup_strv_free_ char **files = NULL;
|
||||
char **f;
|
||||
- Hashmap *h;
|
||||
struct strbuf *sb = NULL;
|
||||
+ _cleanup_hashmap_free_free_ Hashmap *h = NULL;
|
||||
_cleanup_free_ CatalogItem *items = NULL;
|
||||
CatalogItem *i;
|
||||
Iterator j;
|
||||
@@ -406,13 +407,17 @@ int catalog_update(const char* database, const char* root, const char* const* di
|
||||
}
|
||||
|
||||
STRV_FOREACH(f, files) {
|
||||
- log_debug("reading file '%s'", *f);
|
||||
- catalog_import_file(h, sb, *f);
|
||||
+ log_debug("Reading file '%s'", *f);
|
||||
+ r = catalog_import_file(h, sb, *f);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Failed to import file '%s': %s.",
|
||||
+ *f, strerror(-r));
|
||||
+ goto finish;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (hashmap_size(h) <= 0) {
|
||||
log_info("No items in catalog.");
|
||||
- r = 0;
|
||||
goto finish;
|
||||
} else
|
||||
log_debug("Found %u items in catalog.", hashmap_size(h));
|
||||
@@ -443,11 +448,7 @@ int catalog_update(const char* database, const char* root, const char* const* di
|
||||
log_debug("%s: wrote %u items, with %zu bytes of strings, %ld total size.",
|
||||
database, n, sb->len, r);
|
||||
|
||||
- r = 0;
|
||||
-
|
||||
finish:
|
||||
- if (h)
|
||||
- hashmap_free_free(h);
|
||||
if (sb)
|
||||
strbuf_cleanup(sb);
|
||||
|
||||
diff --git src/journal/test-catalog.c src/journal/test-catalog.c
|
||||
index b087a8b..967ab67 100644
|
||||
--- src/journal/test-catalog.c
|
||||
+++ src/journal/test-catalog.c
|
||||
@@ -157,7 +157,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
setlocale(LC_ALL, "de_DE.UTF-8");
|
||||
|
||||
- log_set_max_level(LOG_DEBUG);
|
||||
+ log_parse_environment();
|
||||
+ log_open();
|
||||
|
||||
test_catalog_file_lang();
|
||||
|
||||
--
|
||||
1.7.9.2
|
||||
|
2058
0002-hwdb-update.patch
Normal file
2058
0002-hwdb-update.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,99 @@
|
||||
From baf167ee0a2953f98e4e7d4c35752ef737832674 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Fri, 11 Apr 2014 20:57:27 -0400
|
||||
Subject: [PATCH] journal: properly detect language specified in line
|
||||
|
||||
... it turns out that the duplicates in our own catalog were not real
|
||||
duplicates, but translations.
|
||||
---
|
||||
TODO | 2 ++
|
||||
src/journal/catalog.c | 53 +++++++++++++++++++++++++++++++------------------
|
||||
2 files changed, 36 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git TODO TODO
|
||||
index 0343b94..a7307f7 100644
|
||||
--- TODO
|
||||
+++ TODO
|
||||
@@ -709,6 +709,8 @@ External:
|
||||
|
||||
* fedora: update policy to declare access mode and ownership of unit files to root:root 0644, and add an rpmlint check for it
|
||||
|
||||
+* register catalog database signature as file magic
|
||||
+
|
||||
Regularly:
|
||||
|
||||
* look for close() vs. close_nointr() vs. close_nointr_nofail()
|
||||
diff --git src/journal/catalog.c src/journal/catalog.c
|
||||
index 02dedc4..f03357d 100644
|
||||
--- src/journal/catalog.c
|
||||
+++ src/journal/catalog.c
|
||||
@@ -159,6 +159,37 @@ int catalog_file_lang(const char* filename, char **lang) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static int catalog_entry_lang(const char* filename, int line,
|
||||
+ const char* t, const char* deflang, char **lang) {
|
||||
+ size_t c;
|
||||
+
|
||||
+ c = strlen(t);
|
||||
+ if (c == 0) {
|
||||
+ log_error("[%s:%u] Language too short.", filename, line);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ if (c > 31) {
|
||||
+ log_error("[%s:%u] language too long.", filename, line);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (deflang) {
|
||||
+ if (streq(t, deflang)) {
|
||||
+ log_warning("[%s:%u] language specified unnecessarily",
|
||||
+ filename, line);
|
||||
+ return 0;
|
||||
+ } else
|
||||
+ log_warning("[%s:%u] language differs from default for file",
|
||||
+ filename, line);
|
||||
+ }
|
||||
+
|
||||
+ *lang = strdup(t);
|
||||
+ if (!*lang)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path) {
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
_cleanup_free_ char *payload = NULL;
|
||||
@@ -238,25 +269,9 @@ int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path) {
|
||||
if (with_language) {
|
||||
t = strstrip(line + 2 + 1 + 32 + 1);
|
||||
|
||||
- c = strlen(t);
|
||||
- if (c <= 0) {
|
||||
- log_error("[%s:%u] Language too short.", path, n);
|
||||
- return -EINVAL;
|
||||
- }
|
||||
- if (c > 31) {
|
||||
- log_error("[%s:%u] language too long.", path, n);
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
- if (deflang) {
|
||||
- log_warning("[%s:%u] language %s", path, n,
|
||||
- streq(t, deflang) ?
|
||||
- "specified unnecessarily" :
|
||||
- "differs from default for file");
|
||||
- lang = strdup(t);
|
||||
- if (!lang)
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
+ r = catalog_entry_lang(path, n, t, deflang, &lang);
|
||||
+ if (r < 0)
|
||||
+ return r;
|
||||
}
|
||||
|
||||
got_id = true;
|
||||
--
|
||||
1.7.9.2
|
||||
|
51583
0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch
Normal file
51583
0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch
Normal file
File diff suppressed because it is too large
Load Diff
40
0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch
Normal file
40
0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 05a2f6fefedd7254fd799502191d025d2908cf74 Mon Sep 17 00:00:00 2001
|
||||
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
|
||||
Date: Sat, 12 Apr 2014 08:37:38 +0300
|
||||
Subject: [PATCH] man: mention XDG_CONFIG_HOME in systemd.unit
|
||||
|
||||
---
|
||||
man/systemd.unit.xml | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git man/systemd.unit.xml man/systemd.unit.xml
|
||||
index 07a73fd..bcd4ba8 100644
|
||||
--- man/systemd.unit.xml
|
||||
+++ man/systemd.unit.xml
|
||||
@@ -70,7 +70,8 @@
|
||||
<filename>...</filename>
|
||||
</literallayout></para>
|
||||
|
||||
- <para><literallayout><filename>$HOME/.config/systemd/user/*</filename>
|
||||
+ <para><literallayout><filename>$XDG_CONFIG_HOME/systemd/user/*</filename>
|
||||
+<filename>$HOME/.config/systemd/user/*</filename>
|
||||
<filename>/etc/systemd/user/*</filename>
|
||||
<filename>/run/systemd/user/*</filename>
|
||||
<filename>/usr/lib/systemd/user/*</filename>
|
||||
@@ -320,8 +321,12 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
+ <entry><filename>$XDG_CONFIG_HOME/systemd/user</filename></entry>
|
||||
+ <entry>User configuration (only used when $XDG_CONFIG_HOME is set)</entry>
|
||||
+ </row>
|
||||
+ <row>
|
||||
<entry><filename>$HOME/.config/systemd/user</filename></entry>
|
||||
- <entry>User configuration</entry>
|
||||
+ <entry>User configuration (only used when $XDG_CONFIG_HOME is not set)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><filename>/etc/systemd/user</filename></entry>
|
||||
--
|
||||
1.7.9.2
|
||||
|
3964
0004-hwdb-update.patch
Normal file
3964
0004-hwdb-update.patch
Normal file
File diff suppressed because it is too large
Load Diff
1560
0005-hwdb-update.patch
Normal file
1560
0005-hwdb-update.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 21 10:23:14 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches
|
||||
0001-journal-cleanup-up-error-handling-in-update_catalog.patch
|
||||
0002-journal-properly-detect-language-specified-in-line.patch
|
||||
0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 21 10:14:32 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches to update usb and pci company identifiers
|
||||
0001-hwdb-update.patch
|
||||
0002-hwdb-update.patch
|
||||
0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch
|
||||
0004-hwdb-update.patch
|
||||
0005-hwdb-update.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 21 08:33:34 UTC 2014 - werner@suse.de
|
||||
|
||||
|
@ -477,8 +477,24 @@ Patch242: 0004-machined-make-sure-GetMachineAddresses-is-available-.patch
|
||||
Patch243: 0005-core-Filter-by-state-behind-the-D-Bus-API-not-in-the.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/20
|
||||
Patch244: 0006-login-add-mir-to-the-list-of-session-types.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/20
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/20
|
||||
Patch245: 0007-logind-fix-Display-property-of-user-objects.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch246: 0001-hwdb-update.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch247: 0002-hwdb-update.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch248: 0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch249: 0004-hwdb-update.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch250: 0005-hwdb-update.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch251: 0001-journal-cleanup-up-error-handling-in-update_catalog.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch252: 0002-journal-properly-detect-language-specified-in-line.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch253: 0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -916,6 +932,14 @@ cp %{SOURCE7} m4/
|
||||
%patch243 -p0
|
||||
%patch244 -p0
|
||||
%patch245 -p0
|
||||
%patch246 -p0
|
||||
%patch247 -p0
|
||||
%patch248 -p0
|
||||
%patch249 -p0
|
||||
%patch250 -p0
|
||||
%patch251 -p0
|
||||
%patch252 -p0
|
||||
%patch253 -p0
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
|
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 21 10:23:14 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches
|
||||
0001-journal-cleanup-up-error-handling-in-update_catalog.patch
|
||||
0002-journal-properly-detect-language-specified-in-line.patch
|
||||
0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 21 10:14:32 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches to update usb and pci company identifiers
|
||||
0001-hwdb-update.patch
|
||||
0002-hwdb-update.patch
|
||||
0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch
|
||||
0004-hwdb-update.patch
|
||||
0005-hwdb-update.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 21 08:33:34 UTC 2014 - werner@suse.de
|
||||
|
||||
|
26
systemd.spec
26
systemd.spec
@ -472,8 +472,24 @@ Patch242: 0004-machined-make-sure-GetMachineAddresses-is-available-.patch
|
||||
Patch243: 0005-core-Filter-by-state-behind-the-D-Bus-API-not-in-the.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/20
|
||||
Patch244: 0006-login-add-mir-to-the-list-of-session-types.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/20
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/20
|
||||
Patch245: 0007-logind-fix-Display-property-of-user-objects.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch246: 0001-hwdb-update.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch247: 0002-hwdb-update.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch248: 0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch249: 0004-hwdb-update.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch250: 0005-hwdb-update.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch251: 0001-journal-cleanup-up-error-handling-in-update_catalog.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch252: 0002-journal-properly-detect-language-specified-in-line.patch
|
||||
# PATCHFIX-UPSTREAM added at 2014/05/21
|
||||
Patch253: 0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -911,6 +927,14 @@ cp %{SOURCE7} m4/
|
||||
%patch243 -p0
|
||||
%patch244 -p0
|
||||
%patch245 -p0
|
||||
%patch246 -p0
|
||||
%patch247 -p0
|
||||
%patch248 -p0
|
||||
%patch249 -p0
|
||||
%patch250 -p0
|
||||
%patch251 -p0
|
||||
%patch252 -p0
|
||||
%patch253 -p0
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user