SHA256
1
0
forked from pool/systemd

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
This commit is contained in:
Robert Milasan 2013-02-01 18:07:17 +00:00 committed by Git OBS Bridge
parent e44ca8a27c
commit 4ded6e1300
4 changed files with 75 additions and 9 deletions

View File

@ -0,0 +1,47 @@
From 18cf1a1be5ae6985f211ec6f02504506da36b223 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
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 @@
</varlistentry>
<varlistentry>
- <term><varname>read-only</varname></term>
+ <term><varname>read-only</varname></term><term><varname>readonly</varname></term>
<listitem><para>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

View File

@ -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);

View File

@ -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

View File

@ -257,6 +257,8 @@ Patch123: tmpfiles-X-type.patch
Patch124: systemd-fix-merge-ignore-dependencies.patch
# 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