systemd/0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch
Stephan Kulow 9fc3254595 Accepting request 238853 from Base:System
- Update of patch 0001-detect-s390-virt.patch (bnc#880438)

- Shut up stupid check scripts crying for not mentioned systemd-mini-rpmlintrc

- Add upstream patchs
  0001-core-use-correct-format-string-for-UIDs.patch
  0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch
  0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch

- Add upstream patch
  0001-units-order-network-online.target-after-network.targ.patch
  to make sure that etwork-online.target follows network.target 

- rules: re-enable dev_id conditionally in persistent rules
  (bnc#884403 and bnc#882714).
  Add 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch 

- Add upstream patches
  0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch
  0002-core-make-sure-Environment-fields-passed-in-for-tran.patch
  0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch
  0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch
  0005-man-fix-path-in-crypttab-5.patch

- Add upstream patch
  1039-udevadm-settle-fixed-return-code-for-empty-queue.patch it
  fixes udevadm settle exit code which may had roken dracut scripts
  (bnc#884271 comment#18)

- Temporary disable patch 1022 (bnc#884271 and bnc#882714).

OBS-URL: https://build.opensuse.org/request/show/238853
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=190
2014-06-30 19:43:27 +00:00

54 lines
2.2 KiB
Diff

Based on bde29068aa3815c88190a91e9867605a0aeaf9c4 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 23 Jun 2014 19:18:44 +0200
Subject: [PATCH] cryptsetup: don't add unit dependency on /dev/null devices
when it is listed as password file
As special magic, don't create device dependencies for /dev/null. Of
course, there might be similar devices we might want to include, but
given that none of them really make sense to specify as password source
there's really no point in checking for anything else here.
https://bugs.freedesktop.org/show_bug.cgi?id=75816
---
src/cryptsetup/cryptsetup-generator.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
--- src/cryptsetup/cryptsetup-generator.c
+++ src/cryptsetup/cryptsetup-generator.c 2014-06-25 17:24:14.338237375 +0000
@@ -29,6 +29,7 @@
#include "mkdir.h"
#include "strv.h"
#include "fileio.h"
+#include "path-util.h"
static const char *arg_dest = "/tmp";
static bool arg_enabled = true;
@@ -141,14 +142,18 @@ static int create_disk(
if (uu == NULL)
return log_oom();
- if (is_device_path(uu)) {
- _cleanup_free_ char *dd = unit_name_from_path(uu, ".device");
- if (dd == NULL)
- return log_oom();
-
- fprintf(f, "After=%1$s\nRequires=%1$s\n", dd);
- } else
- fprintf(f, "RequiresMountsFor=%s\n", password);
+ if (!path_equal(uu, "/dev/null")) {
+ if (is_device_path(uu)) {
+ _cleanup_free_ char *dd;
+
+ dd = unit_name_from_path(uu, ".device");
+ if (!dd)
+ return log_oom();
+
+ fprintf(f, "After=%1$s\nRequires=%1$s\n", dd);
+ } else
+ fprintf(f, "RequiresMountsFor=%s\n", password);
+ }
}
}