From 114d53a02d053749bcca9f9aebac3a499e796df9 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Mon, 10 Jul 2017 22:12:47 -0700 Subject: [PATCH] vmcheck: fixes for CentOS 7 The `install` command in CentOS 7 is too old to understand that `-Dt foo/bar` means creating both `foo` and `bar`, which is useful so that we avoid an explicit `mkdir` before. But we can't do that here. Closes: #871 Approved by: cgwalters --- tests/vmcheck/test-layering-non-root-caps.sh | 6 ++++-- tests/vmcheck/test-livefs.sh | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/vmcheck/test-layering-non-root-caps.sh b/tests/vmcheck/test-layering-non-root-caps.sh index f874d2ff..c45ed166 100755 --- a/tests/vmcheck/test-layering-non-root-caps.sh +++ b/tests/vmcheck/test-layering-non-root-caps.sh @@ -36,9 +36,11 @@ vm_build_rpm nonrootcap \ done" \ pre "groupadd -r nrcgroup useradd -r nrcuser -g nrcgroup -s /sbin/nologin" \ - install "install -Dt %{buildroot}/etc nrc.conf + install "mkdir -p %{buildroot}/etc + install nrc.conf %{buildroot}/etc ln -sr %{buildroot}/etc/nrc.conf %{buildroot}/etc/nrc-link.conf - install -Dt %{buildroot}/usr/bin *.sh + mkdir -p %{buildroot}/usr/bin + install *.sh %{buildroot}/usr/bin ln -sr %{buildroot}/usr/bin/{nrc-user.sh,nrc-user-link.sh} mkdir -p %{buildroot}/var/lib/nonrootcap mkdir -p %{buildroot}/run/nonrootcap diff --git a/tests/vmcheck/test-livefs.sh b/tests/vmcheck/test-livefs.sh index 4ceee801..ef961f7f 100755 --- a/tests/vmcheck/test-livefs.sh +++ b/tests/vmcheck/test-livefs.sh @@ -52,7 +52,8 @@ echo "ok livefs stage1" vm_build_rpm test-livefs-with-etc \ build 'echo "A config file for %{name}" > %{name}.conf' \ - install 'install -Dt %{buildroot}/etc %{name}.conf + install 'mkdir -p %{buildroot}/etc + install %{name}.conf %{buildroot}/etc mkdir -p %{buildroot}/etc/%{name}/ echo subconfig-one > %{buildroot}/etc/%{name}/subconfig-one.conf echo subconfig-two > %{buildroot}/etc/%{name}/subconfig-two.conf