Call chmod recursively

This commit is contained in:
Lubomír Sedlář 2018-06-04 13:27:01 +02:00
parent 68ff828f02
commit 127f28e132
7 changed files with 54 additions and 6 deletions

View File

@ -1,7 +1,7 @@
From c6bb04041867c242629c9becd83d47f2722b2432 Mon Sep 17 00:00:00 2001 From c6bb04041867c242629c9becd83d47f2722b2432 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com> From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 11 Apr 2018 09:18:59 +0200 Date: Wed, 11 Apr 2018 09:18:59 +0200
Subject: [PATCH 1/5] Revert "Move ostree phase and pipelines for running Subject: [PATCH 1/6] Revert "Move ostree phase and pipelines for running
phases" phases"
This reverts commit 660c04368ba1abed310f121d01f0fa029eea5f11. This reverts commit 660c04368ba1abed310f121d01f0fa029eea5f11.

View File

@ -1,7 +1,7 @@
From 376f52f1c18e5c8500fa8afd9c91ba9a6e4c4ae0 Mon Sep 17 00:00:00 2001 From 376f52f1c18e5c8500fa8afd9c91ba9a6e4c4ae0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com> From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 11 Apr 2018 09:19:53 +0200 Date: Wed, 11 Apr 2018 09:19:53 +0200
Subject: [PATCH 2/5] Revert "Other repo for OstreeInstaller" Subject: [PATCH 2/6] Revert "Other repo for OstreeInstaller"
This reverts commit 5c081cb545715c2a912ff50fa57554e89d905868. This reverts commit 5c081cb545715c2a912ff50fa57554e89d905868.
--- ---

View File

@ -1,7 +1,7 @@
From 836750b9c53aa4c6330b986e7fb28f92d940df55 Mon Sep 17 00:00:00 2001 From 836750b9c53aa4c6330b986e7fb28f92d940df55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com> From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 11 Apr 2018 09:20:51 +0200 Date: Wed, 11 Apr 2018 09:20:51 +0200
Subject: [PATCH 3/5] Revert "Ostree can use pkgset repos" Subject: [PATCH 3/6] Revert "Ostree can use pkgset repos"
This reverts commit c7cc200246300c6a3946b2e3a9f5f7693896a7d6. This reverts commit c7cc200246300c6a3946b2e3a9f5f7693896a7d6.
--- ---

View File

@ -1,7 +1,7 @@
From c8e03cfba196719e80c953c3d197653ef84716ed Mon Sep 17 00:00:00 2001 From c8e03cfba196719e80c953c3d197653ef84716ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com> From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Tue, 29 May 2018 08:38:09 +0200 Date: Tue, 29 May 2018 08:38:09 +0200
Subject: [PATCH 4/5] kojiwrapper: Make result of runroot world readable Subject: [PATCH 4/6] kojiwrapper: Make result of runroot world readable
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 80cb233b2225abd8fcb687aa61a522e6e8280617 Mon Sep 17 00:00:00 2001 From 80cb233b2225abd8fcb687aa61a522e6e8280617 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com> From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Thu, 31 May 2018 14:50:03 +0200 Date: Thu, 31 May 2018 14:50:03 +0200
Subject: [PATCH 5/5] kojiwrapper: Don't mark runroot as successful by chmod Subject: [PATCH 5/6] kojiwrapper: Don't mark runroot as successful by chmod
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit

View File

@ -0,0 +1,44 @@
From 210037ad48aa7f91d0391dc7c9330d4fd5c7172e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Mon, 4 Jun 2018 08:31:08 +0200
Subject: [PATCH 6/6] kojiwrapper: Call chmod recursively
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Related: https://pagure.io/pungi/issue/932
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/wrappers/kojiwrapper.py | 2 +-
tests/test_koji_wrapper.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pungi/wrappers/kojiwrapper.py b/pungi/wrappers/kojiwrapper.py
index bcfb5303..abcdecb9 100644
--- a/pungi/wrappers/kojiwrapper.py
+++ b/pungi/wrappers/kojiwrapper.py
@@ -113,7 +113,7 @@ class KojiWrapper(object):
command = "rm -f /var/lib/rpm/__db*; rm -rf /var/cache/yum/*; set -x; " + command
if destdir:
- command += " && chmod a+r %s" % shlex_quote(destdir)
+ command += " && chmod -R a+r %s" % shlex_quote(destdir)
cmd.append(command)
return cmd
diff --git a/tests/test_koji_wrapper.py b/tests/test_koji_wrapper.py
index 30037b27..0f20562a 100644
--- a/tests/test_koji_wrapper.py
+++ b/tests/test_koji_wrapper.py
@@ -427,7 +427,7 @@ class RunrootKojiWrapperTest(KojiWrapperBaseTestCase):
self.assertEqual(cmd[-2], 's390x')
self.assertEqual(
cmd[-1],
- "rm -f /var/lib/rpm/__db*; rm -rf /var/cache/yum/*; set -x; /bin/echo '&' && chmod a+r '/output dir'"
+ "rm -f /var/lib/rpm/__db*; rm -rf /var/cache/yum/*; set -x; /bin/echo '&' && chmod -R a+r '/output dir'"
)
self.assertItemsEqual(cmd[3:-3],
['--channel-override=chan', '--quiet', '--use-shell',
--
2.14.3

View File

@ -1,6 +1,6 @@
Name: pungi Name: pungi
Version: 4.1.25 Version: 4.1.25
Release: 3%{?dist} Release: 4%{?dist}
Summary: Distribution compose tool Summary: Distribution compose tool
Group: Development/Tools Group: Development/Tools
@ -12,6 +12,7 @@ Patch1: 0002-Revert-Other-repo-for-OstreeInstaller.patch
Patch2: 0003-Revert-Ostree-can-use-pkgset-repos.patch Patch2: 0003-Revert-Ostree-can-use-pkgset-repos.patch
Patch3: 0004-kojiwrapper-Make-result-of-runroot-world-readable.patch Patch3: 0004-kojiwrapper-Make-result-of-runroot-world-readable.patch
Patch4: 0005-kojiwrapper-Don-t-mark-runroot-as-successful-by-chmo.patch Patch4: 0005-kojiwrapper-Don-t-mark-runroot-as-successful-by-chmo.patch
Patch5: 0006-kojiwrapper-Call-chmod-recursively.patch
BuildRequires: python3-nose BuildRequires: python3-nose
BuildRequires: python3-mock BuildRequires: python3-mock
@ -178,6 +179,9 @@ nosetests-3 --exe
%{_bindir}/%{name}-wait-for-signed-ostree-handler %{_bindir}/%{name}-wait-for-signed-ostree-handler
%changelog %changelog
* Mon Jun 04 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.25-4
- Call chmod recursively
* Thu May 31 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.25-3 * Thu May 31 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.25-3
- Don't mark all runroots as successful by chmod - Don't mark all runroots as successful by chmod