diff --git a/0002-allow-multiple-mounts-of-same-device.patch b/0002-allow-multiple-mounts-of-same-device.patch new file mode 100644 index 0000000..7a7e54a --- /dev/null +++ b/0002-allow-multiple-mounts-of-same-device.patch @@ -0,0 +1,21 @@ +Author: Ignaz Forster +Date: Wed Jan 14 17:57:52 2020 +0100 +Upstream: Ticket opened [gh#coreos/ignition#890] + + Implement poor man's solution for mounting a device multiple times, + e.g. to mount several subvolumes from a Btrfs device or bind mounting + the device to multiple places, by also adding the path to the key. + +diff --git a/config/v3_1_experimental/types/filesystem.go b/config/v3_1_experimental/types/filesystem.go +index 964dfca..bd301f8 100644 +--- a/config/v3_1_experimental/types/filesystem.go ++++ b/config/v3_1_experimental/types/filesystem.go +@@ -23,7 +23,7 @@ import ( + ) + + func (f Filesystem) Key() string { +- return f.Device ++ return f.Device + *f.Path + } + + func (f Filesystem) IgnoreDuplicates() map[string]struct{} { diff --git a/ignition.changes b/ignition.changes index 098daa4..c8ea0e1 100644 --- a/ignition.changes +++ b/ignition.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jan 14 17:05:19 UTC 2020 - Ignaz Forster + +- Add 0002-allow-multiple-mounts-of-same-device.patch: + Allow mounting a device multiple times, e.g. to mount several + subvolumes from a Btrfs device or bind mounting the device to + multiple places, by also adding the path to the key. + [Workaround for gh#coreos/ignition#890] + ------------------------------------------------------------------- Wed Jan 8 17:47:30 UTC 2020 - Ignaz Forster diff --git a/ignition.spec b/ignition.spec index 0994f0d..14a8a1c 100644 --- a/ignition.spec +++ b/ignition.spec @@ -25,6 +25,7 @@ Group: System/Management URL: https://github.com/coreos/ignition Source: %{name}-%{version}.tar.xz Patch1: 0001-Throw-error-if-SSH-keys-could-not-be-written.patch +Patch2: 0002-allow-multiple-mounts-of-same-device.patch Requires: dracut BuildRequires: dracut BuildRequires: libblkid-devel @@ -42,6 +43,7 @@ applies the configuration. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build sed -i -e 's|go build -ldflags|go build -buildmode=pie -ldflags|g' build