From 4ded6e13009cf60b00ecda4f24a544a692ab36a1d6d6724a7d3015ce28f6ce1a Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Fri, 1 Feb 2013 18:07:17 +0000 Subject: [PATCH] Accepting request 150752 from home:fcrozat:branches:Base:System - Add cryptsetup-accept-read-only.patch: accept "read-only" in addition to "readonly" in crypttab - Update parse-multiline-env-file.patch to correctly handle commented lines (bnc#793411) OBS-URL: https://build.opensuse.org/request/show/150752 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=340 --- cryptsetup-accept-read-only.patch | 47 +++++++++++++++++++++++++++++++ parse-multiline-env-file.patch | 24 ++++++++++------ systemd.changes | 8 ++++++ systemd.spec | 5 +++- 4 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 cryptsetup-accept-read-only.patch diff --git a/cryptsetup-accept-read-only.patch b/cryptsetup-accept-read-only.patch new file mode 100644 index 00000000..279b4482 --- /dev/null +++ b/cryptsetup-accept-read-only.patch @@ -0,0 +1,47 @@ +From 18cf1a1be5ae6985f211ec6f02504506da36b223 Mon Sep 17 00:00:00 2001 +From: Michal Schmidt +Date: Thu, 31 Jan 2013 11:03:09 +0100 +Subject: [PATCH] cryptsetup: accept both "read-only" and "readonly" spellings + +Mukund Sivaraman pointed out that cryptsetup(5) mentions the "read-only" +option, while the code understands "readonly". + +We could just fix the manpage, but for consistency in naming of +multi-word options it would be prettier to have "read-only". So let's +accept both spellings. + +BZ: https://bugzilla.redhat.com/show_bug.cgi?id=903463 +--- + man/crypttab.xml | 2 +- + src/cryptsetup/cryptsetup.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/man/crypttab.xml b/man/crypttab.xml +index 2379fc0..f976bda 100644 +--- a/man/crypttab.xml ++++ b/man/crypttab.xml +@@ -182,7 +182,7 @@ + + + +- read-only ++ read-onlyreadonly + + Set up the encrypted + block device in read-only +diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c +index f332843..a8cdf10 100644 +--- a/src/cryptsetup/cryptsetup.c ++++ b/src/cryptsetup/cryptsetup.c +@@ -111,7 +111,7 @@ static int parse_one_option(const char *option) { + return 0; + } + +- } else if (streq(option, "readonly")) ++ } else if (streq(option, "readonly") || streq(option, "read-only")) + opt_readonly = true; + else if (streq(option, "verify")) + opt_verify = true; +-- +1.7.10.4 + diff --git a/parse-multiline-env-file.patch b/parse-multiline-env-file.patch index c0369e3f..6a6ad986 100644 --- a/parse-multiline-env-file.patch +++ b/parse-multiline-env-file.patch @@ -41,7 +41,7 @@ Index: systemd-195/src/shared/util.c =================================================================== --- systemd-195.orig/src/shared/util.c +++ systemd-195/src/shared/util.c -@@ -876,33 +876,55 @@ fail: +@@ -876,69 +876,89 @@ fail: return r; } @@ -101,30 +101,38 @@ Index: systemd-195/src/shared/util.c + b = strappend(c, l); + if (!b) + return log_oom(); -+ + +- if (!*p) +- continue; + free(c); + c = b; + } + + p = strstrip(c ? c : l); - if (!*p) - continue; -@@ -910,35 +932,27 @@ int load_env_file( - if (strchr(COMMENTS, *p)) +- if (strchr(COMMENTS, *p)) ++ if (!*p) { ++ free(c); ++ c = NULL; continue; ++ } - if (!(u = normalize_env_assignment(p))) { - r = log_oom(); - goto finish; -- } ++ if (strchr(COMMENTS, *p)) { ++ free(c); ++ c = NULL; ++ continue; + } + + u = normalize_env_assignment(p); + if (!u) + return log_oom(); + + free(c); + c = NULL; - ++ t = strv_append(m, u); free(u); diff --git a/systemd.changes b/systemd.changes index 2d31a58c..bb00736a 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Feb 1 16:27:45 UTC 2013 - fcrozat@suse.com + +- Add cryptsetup-accept-read-only.patch: accept "read-only" in + addition to "readonly" in crypttab +- Update parse-multiline-env-file.patch to correctly handle + commented lines (bnc#793411) + ------------------------------------------------------------------- Tue Jan 29 13:32:30 UTC 2013 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 7d0e568e..f0731945 100644 --- a/systemd.spec +++ b/systemd.spec @@ -255,8 +255,10 @@ Patch122: improve-man-environment.patch Patch123: tmpfiles-X-type.patch # PATCH-FIX-UPSTREAM systemd-fix-merge-ignore-dependencies.patch fcrozat@suse.com bnc#800365 -- fix merging with --ignore-dependencies waiting for dependencies Patch124: systemd-fix-merge-ignore-dependencies.patch -# PATCH-FIX-UPSTREAM journalctl-require-argument-for-priority +# PATCH-FIX-UPSTREAM journalctl-require-argument-for-priority Patch125: journalctl-require-argument-for-priority +# PATCH-FIX-UPSTREAM cryptsetup-accept-read-only.patch fcrozat@suse.com -- Accept read-only as well as readonly as parameters for crypttab +Patch126: cryptsetup-accept-read-only.patch # udev patches # PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch @@ -565,6 +567,7 @@ cp %{SOURCE7} m4/ %patch123 -p1 %patch124 -p1 %patch125 -p1 +%patch126 -p1 %build autoreconf -fiv