New upstream release 4.1.25

This commit is contained in:
Lubomír Sedlář 2018-05-22 14:59:47 +02:00
parent 10af6668b1
commit 46ca04148a
10 changed files with 97 additions and 813 deletions

View File

@ -1,24 +1,24 @@
From fa0ed11ee0c733e9c3e4785f6526ef889109111c 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>
Date: Wed, 11 Apr 2018 09:18:59 +0200
Subject: [PATCH 1/8] Revert "Move ostree phase and pipelines for running
Subject: [PATCH 1/3] Revert "Move ostree phase and pipelines for running
phases"
This reverts commit 660c04368ba1abed310f121d01f0fa029eea5f11.
---
bin/pungi-koji | 52 +++++---
doc/_static/phases.svg | 339 ++++++++++++++++++++++-------------------------
pungi/phases/__init__.py | 19 ++-
pungi/phases/weaver.py | 72 ----------
tests/test_phase_base.py | 129 ++++--------------
5 files changed, 230 insertions(+), 381 deletions(-)
bin/pungi-koji | 54 +++++++++-------
doc/_static/phases.svg | 162 +++++++++++++++++++++++++++++++++++------------
pungi/phases/__init__.py | 19 +++++-
pungi/phases/weaver.py | 72 ---------------------
tests/test_phase_base.py | 129 ++++++++-----------------------------
5 files changed, 198 insertions(+), 238 deletions(-)
delete mode 100644 pungi/phases/weaver.py
diff --git a/bin/pungi-koji b/bin/pungi-koji
index 9dd1cd65..0bb66d2c 100755
index b3b49de5..e797ce86 100755
--- a/bin/pungi-koji
+++ b/bin/pungi-koji
@@ -358,27 +358,41 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None):
@@ -365,27 +365,41 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None):
# Store the password
compose.conf["signing_key_password"] = signing_key_password
@ -71,12 +71,13 @@ index 9dd1cd65..0bb66d2c 100755
# write treeinfo before ISOs are created
for variant in compose.get_variants():
@@ -394,16 +408,11 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None):
@@ -401,17 +415,12 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None):
pungi.metadata.write_media_repo(compose, arch, variant, timestamp)
# Start all phases for image artifacts
- compose_images_schema = (
- createiso_phase,
- extra_isos_phase,
- liveimages_phase,
- image_build_phase,
- livemedia_phase,
@ -86,6 +87,7 @@ index 9dd1cd65..0bb66d2c 100755
- compose_images_phase.start()
- compose_images_phase.stop()
+ pungi.phases.run_all([createiso_phase,
+ extra_isos_phase,
+ liveimages_phase,
+ image_build_phase,
+ livemedia_phase,
@ -93,7 +95,7 @@ index 9dd1cd65..0bb66d2c 100755
image_checksum_phase.start()
image_checksum_phase.stop()
@@ -412,6 +421,7 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None):
@@ -420,6 +429,7 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None):
compose.im.dump(compose.paths.compose.metadata("images.json"))
osbs_phase.dump_metadata()
@ -102,51 +104,10 @@ index 9dd1cd65..0bb66d2c 100755
test_phase.stop()
diff --git a/doc/_static/phases.svg b/doc/_static/phases.svg
index 66184b15..072e5dd2 100644
index 7bbc5e1f..611eb06b 100644
--- a/doc/_static/phases.svg
+++ b/doc/_static/phases.svg
@@ -14,7 +14,7 @@
viewBox="0 0 839.33334 220.33335"
id="svg2"
version="1.1"
- inkscape:version="0.91 r13725"
+ inkscape:version="0.92+devel unknown"
sodipodi:docname="phases.svg"
inkscape:export-filename="/home/lsedlar/repos/pungi/doc/_static/phases.png"
inkscape:export-xdpi="90"
@@ -26,16 +26,16 @@
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:zoom="1.6532468"
- inkscape:cx="337.4932"
- inkscape:cy="70.825454"
+ inkscape:zoom="0.8266234"
+ inkscape:cx="226.63066"
+ inkscape:cy="201.60264"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
- inkscape:window-height="1020"
- inkscape:window-x="1920"
- inkscape:window-y="31"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
inkscape:window-maximized="1"
units="px"
inkscape:document-rotation="0"
@@ -67,7 +67,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -100,7 +100,87 @@
@@ -104,7 +104,87 @@
style="font-size:13.14787769px;line-height:1.25">Pkgset</tspan></text>
</g>
<g
@ -235,17 +196,7 @@ index 66184b15..072e5dd2 100644
id="g3446">
<rect
y="554.10059"
@@ -115,8 +195,7 @@
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="556.95709"
y="971.54041"
- id="text3384-0"
- sodipodi:linespacing="0%"><tspan
+ id="text3384-0"><tspan
y="971.54041"
x="556.95709"
sodipodi:role="line"
@@ -124,7 +203,7 @@
@@ -127,7 +207,7 @@
style="font-size:13.14749908px;line-height:1.25">ImageChecksum</tspan></text>
</g>
<g
@ -254,17 +205,7 @@ index 66184b15..072e5dd2 100644
id="g3398">
<rect
y="553.98242"
@@ -139,8 +218,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="557.61566"
y="971.33813"
- id="text3396"
- sodipodi:linespacing="0%"><tspan
+ id="text3396"><tspan
sodipodi:role="line"
id="tspan3398"
x="557.61566"
@@ -148,209 +226,107 @@
@@ -150,14 +230,15 @@
style="font-size:13.14787769px;line-height:1.25">Test</tspan></text>
</g>
<g
@ -283,14 +224,8 @@ index 66184b15..072e5dd2 100644
transform="matrix(0,1,1,0,0,0)" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- x="6.2600794"
- y="891.1604"
- id="text3356"
- sodipodi:linespacing="0%"><tspan
+ x="1.1060941"
+ y="971.63348"
+ id="text3356"><tspan
@@ -167,8 +248,8 @@
id="text3356"><tspan
sodipodi:role="line"
id="tspan3358"
- x="6.2600794"
@ -300,12 +235,9 @@ index 66184b15..072e5dd2 100644
style="font-size:13.14787769px;line-height:1.25">Init</tspan></text>
</g>
<path
inkscape:connector-curvature="0"
id="path3642"
- d="m 100.90864,859.8891 553.31842,0"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.17466855px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" />
+ d="M 100.90864,859.8891 H 712.42335"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.23489845px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" />
@@ -177,40 +258,41 @@
d="M 100.90864,859.8891 H 654.22706"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.17466855px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" />
<g
- id="g241"
- transform="translate(-60.108974,42.1407)">
@ -325,7 +257,6 @@ index 66184b15..072e5dd2 100644
+ y="254.60153"
transform="matrix(0,1,1,0,0,0)" />
<text
- sodipodi:linespacing="0%"
xml:space="preserve"
- style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- x="403.15945"
@ -366,87 +297,10 @@ index 66184b15..072e5dd2 100644
+ id="rect3350"
+ style="fill:#a40000;fill-rule:evenodd;stroke:none;stroke-width:1.10477591px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<text
- sodipodi:linespacing="0%"
- id="text3364"
- y="891.06732"
- x="105.76799"
- style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- xml:space="preserve"><tspan
- style="font-size:13.14787769px;line-height:1.25"
- y="891.06732"
- x="105.76799"
- id="tspan3366"
- sodipodi:role="line">Buildinstall</tspan></text>
- </g>
- <g
- id="g3639">
- <rect
- transform="matrix(0,1,1,0,0,0)"
- y="103.28194"
- x="905.2099"
- height="54.197887"
- width="26.295755"
- id="rect3344"
- style="fill:#729fcf;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <text
- sodipodi:linespacing="0%"
- id="text3368"
- y="923.25934"
- x="106.1384"
- style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- xml:space="preserve"><tspan
- style="font-size:13.14787769px;line-height:1.25"
- y="923.25934"
- x="106.1384"
- id="tspan3370"
- sodipodi:role="line">Gather</tspan></text>
- </g>
- <g
- id="g3647">
- <g
- id="g3644">
- <rect
- style="fill:#ad7fa8;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- id="rect3346"
- width="26.295755"
- height="72.729973"
- x="905.2099"
- y="162.92607"
- transform="matrix(0,1,1,0,0,0)" />
- </g>
- <text
- sodipodi:linespacing="0%"
- id="text3372"
- y="923.25934"
- x="165.23042"
- style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- xml:space="preserve"><tspan
- style="font-size:13.14787769px;line-height:1.25"
- y="923.25934"
- x="165.23042"
- id="tspan3374"
- sodipodi:role="line">ExtraFiles</tspan></text>
- </g>
- <g
- id="g3658">
- <rect
- transform="matrix(0,1,1,0,0,0)"
- y="241.10229"
- x="905.2099"
- height="78.636055"
- width="26.295755"
- id="rect3348"
- style="fill:#e9b96e;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <text
- sodipodi:linespacing="0%"
- id="text3376"
- y="921.86945"
- x="243.95874"
- style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="text3380"
+ y="847.65234"
+ x="403.15945"
+ style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text3364"
y="891.06732"
@@ -287,22 +369,22 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-size:13.14787769px;line-height:1.25"
- y="921.86945"
@ -477,119 +331,13 @@ index 66184b15..072e5dd2 100644
+ id="rect3428"
+ style="fill:#fcaf3e;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<text
- sodipodi:linespacing="0%"
- id="text3380-2"
- y="840.3219"
- x="256.90588"
- style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="text3430"
+ y="1039.4121"
+ x="492.642"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.99999714px;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
- style="font-size:13.14787769px;line-height:1.25"
- id="tspan3406"
- sodipodi:role="line"
- x="256.90588"
- y="840.3219">OSTree</tspan></text>
- </g>
- <g
- transform="translate(-328.39105,-85.517823)"
- id="g288">
- <g
- transform="translate(0.56706579,0)"
- id="g3653">
- <rect
- style="fill:#fcaf3e;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- id="rect3428"
- width="26.295755"
- height="101.85102"
- x="1022.637"
- y="490.33765"
- transform="matrix(0,1,1,0,0,0)" />
- <text
- sodipodi:linespacing="0%"
- xml:space="preserve"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.99999714px;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- x="492.642"
y="1039.4121"
- id="text3430"><tspan
- id="tspan283"
- sodipodi:role="line"
- x="492.642"
- y="1039.4121">OSTreeInstaller</tspan></text>
- </g>
+ x="492.642"
+ sodipodi:role="line"
+ id="tspan283">OSTreeInstaller</tspan></text>
</g>
</g>
<g
id="g236"
- transform="translate(-60.108974,42.1407)">
+ transform="translate(0,42.1407)">
<g
transform="translate(88.832932,-122.61379)"
id="g3458">
@@ -367,8 +343,7 @@
y="971.54041"
x="422.99252"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- xml:space="preserve"
- sodipodi:linespacing="0%"><tspan
+ xml:space="preserve"><tspan
y="971.54041"
x="422.99252"
id="tspan3386"
@@ -391,8 +366,7 @@
y="1006.4276"
x="422.69772"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- xml:space="preserve"
- sodipodi:linespacing="0%"><tspan
+ xml:space="preserve"><tspan
y="1006.4276"
x="422.69772"
id="tspan3390"
@@ -415,8 +389,7 @@
y="1042.8416"
x="422.69772"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- xml:space="preserve"
- sodipodi:linespacing="0%"><tspan
+ xml:space="preserve"><tspan
y="1042.8416"
x="422.69772"
id="tspan3394"
@@ -439,8 +412,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="423.40482"
y="1079.6111"
- id="text3424"
- sodipodi:linespacing="0%"><tspan
+ id="text3424"><tspan
id="tspan3434"
sodipodi:role="line"
x="423.40482"
@@ -460,11 +432,10 @@
transform="matrix(0,1,1,0,0,0)" />
<text
xml:space="preserve"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.99999714px;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.99999714px;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="492.642"
y="1065.7078"
- id="text294"
- sodipodi:linespacing="0%"><tspan
+ id="text294"><tspan
y="1065.7078"
x="492.642"
sodipodi:role="line"
id="text3380-2"
y="840.3219"
diff --git a/pungi/phases/__init__.py b/pungi/phases/__init__.py
index 90765be5..044aa467 100644
index 0ed3e564..77720f80 100644
--- a/pungi/phases/__init__.py
+++ b/pungi/phases/__init__.py
@@ -16,7 +16,6 @@
@@ -17,7 +17,6 @@ import sys
# phases in runtime order
from .init import InitPhase # noqa
@ -597,10 +345,10 @@ index 90765be5..044aa467 100644
from .pkgset import PkgsetPhase # noqa
from .gather import GatherPhase # noqa
from .createrepo import CreaterepoPhase # noqa
@@ -32,3 +31,21 @@ from .livemedia_phase import LiveMediaPhase # noqa
from .ostree import OSTreePhase # noqa
from .ostree_installer import OstreeInstallerPhase # noqa
from .osbs import OSBSPhase # noqa
@@ -39,3 +38,21 @@ from .phases_metadata import gather_phases_metadata # noqa
this_module = sys.modules[__name__]
PHASES_NAMES = gather_phases_metadata(this_module)
+
+
+def run_all(phases):

View File

@ -1,7 +1,7 @@
From c62eb8dd27bc17406649e3560223f20b690de63f 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>
Date: Wed, 11 Apr 2018 09:19:53 +0200
Subject: [PATCH 2/8] Revert "Other repo for OstreeInstaller"
Subject: [PATCH 2/3] Revert "Other repo for OstreeInstaller"
This reverts commit 5c081cb545715c2a912ff50fa57554e89d905868.
---
@ -12,10 +12,10 @@ This reverts commit 5c081cb545715c2a912ff50fa57554e89d905868.
4 files changed, 28 insertions(+), 57 deletions(-)
diff --git a/pungi/checks.py b/pungi/checks.py
index d84f24ad..0c0623d6 100644
index 2ddd7164..03cab460 100644
--- a/pungi/checks.py
+++ b/pungi/checks.py
@@ -944,7 +944,7 @@ def make_schema():
@@ -998,7 +998,7 @@ def make_schema():
"tag_ref": {"type": "boolean"},
"ostree_ref": {"type": "string"},
},
@ -24,7 +24,7 @@ index d84f24ad..0c0623d6 100644
"additionalProperties": False,
}),
]
@@ -965,6 +965,7 @@ def make_schema():
@@ -1019,6 +1019,7 @@ def make_schema():
"template_repo": {"type": "string"},
"template_branch": {"type": "string"},
},
@ -33,7 +33,7 @@ index d84f24ad..0c0623d6 100644
}),
diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py
index a78fccad..9bf5e255 100644
index 2eac49f7..abcb1572 100644
--- a/pungi/phases/ostree_installer.py
+++ b/pungi/phases/ostree_installer.py
@@ -9,7 +9,7 @@ from kobo import shortcuts
@ -45,7 +45,7 @@ index a78fccad..9bf5e255 100644
from ..wrappers import kojiwrapper, iso, lorax, scm
@@ -64,14 +64,7 @@ class OstreeInstallerThread(WorkerThread):
@@ -62,14 +62,7 @@ class OstreeInstallerThread(WorkerThread):
self.pool.log_info('[BEGIN] %s' % msg)
self.logdir = compose.paths.log.topdir('%s/%s/ostree_installer-%s' % (arch, variant, self.num))
@ -62,10 +62,10 @@ index a78fccad..9bf5e255 100644
output_dir = os.path.join(compose.paths.work.topdir(arch), variant.uid, 'ostree_installer')
util.makedirs(os.path.dirname(output_dir))
diff --git a/pungi/util.py b/pungi/util.py
index 19df1f49..431c9978 100644
index ea0f6e48..3150e26c 100644
--- a/pungi/util.py
+++ b/pungi/util.py
@@ -683,8 +683,6 @@ def get_repo_url(compose, repo, arch='$basearch'):
@@ -686,8 +686,6 @@ def get_repo_url(compose, repo, arch='$basearch'):
Convert repo to repo URL.
@param compose - required for access to variants
@ -74,7 +74,7 @@ index 19df1f49..431c9978 100644
@param repo - string or a dict which at least contains 'baseurl' key
@param arch - string to be used as arch in repo url
"""
@@ -695,17 +693,14 @@ def get_repo_url(compose, repo, arch='$basearch'):
@@ -698,17 +696,14 @@ def get_repo_url(compose, repo, arch='$basearch'):
raise RuntimeError('Baseurl is required in repo dict %s' % str(repo))
if '://' not in repo:
# this is a variant name
@ -96,7 +96,7 @@ index 19df1f49..431c9978 100644
"""
Convert repos to a list of repo URLs.
@@ -716,11 +711,7 @@ def get_repo_urls(compose, repos, arch='$basearch', logger=None):
@@ -719,11 +714,7 @@ def get_repo_urls(compose, repos, arch='$basearch', logger=None):
urls = []
for repo in repos:
repo = get_repo_url(compose, repo, arch=arch)
@ -109,7 +109,7 @@ index 19df1f49..431c9978 100644
return urls
@@ -778,7 +769,7 @@ def get_repo_dicts(repos, logger=None):
@@ -781,7 +772,7 @@ def get_repo_dicts(repos, logger=None):
repo_dict = get_repo_dict(repo)
if repo_dict == {}:
if logger:
@ -119,7 +119,7 @@ index 19df1f49..431c9978 100644
repo_dicts.append(repo_dict)
return repo_dicts
diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py
index e3af4468..ba56d8c7 100644
index ee3294e5..f44ca4ef 100644
--- a/tests/test_ostree_installer_phase.py
+++ b/tests/test_ostree_installer_phase.py
@@ -14,7 +14,6 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
@ -130,7 +130,7 @@ index e3af4468..ba56d8c7 100644
LOG_PATH = 'logs/x86_64/Everything/ostree_installer-1'
@@ -59,9 +58,6 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -96,9 +95,6 @@ class OstreeThreadTest(helpers.PungiTestCase):
'koji_profile': 'koji',
'runroot_tag': 'rrt',
'image_volid_formats': ['{release_short}-{variant}-{arch}'],
@ -140,7 +140,7 @@ index e3af4468..ba56d8c7 100644
})
def assertImageAdded(self, compose, ImageCls, iso):
@@ -88,7 +84,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -125,7 +121,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
]
for s in force_list(sources):
@ -149,7 +149,7 @@ index e3af4468..ba56d8c7 100644
lorax_cmd.append('--variant=Everything')
lorax_cmd.append('--nomacboot')
@@ -141,7 +137,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -179,7 +175,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
self.compose.supported = False
pool = mock.Mock()
cfg = {
@ -158,7 +158,7 @@ index e3af4468..ba56d8c7 100644
'release': '20160321.n.0',
}
koji = KojiWrapper.return_value
@@ -159,8 +155,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -197,8 +193,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1)
self.assertRunrootCall(koji,
@ -168,7 +168,7 @@ index e3af4468..ba56d8c7 100644
cfg['release'],
extra=['--logfile=%s/%s/lorax.log' % (self.topdir, LOG_PATH)])
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
@@ -195,12 +190,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -233,12 +228,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1)
@ -182,7 +182,7 @@ index e3af4468..ba56d8c7 100644
extra=['--logfile=%s/%s/lorax.log' % (self.topdir, LOG_PATH)])
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
self.assertImageAdded(self.compose, ImageCls, iso)
@@ -219,7 +209,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -257,7 +247,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
cfg = {
'release': '20160321.n.0',
'repo': [
@ -191,7 +191,7 @@ index e3af4468..ba56d8c7 100644
'https://example.com/extra-repo1.repo',
'https://example.com/extra-repo2.repo',
],
@@ -236,10 +226,9 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -274,10 +264,9 @@ class OstreeThreadTest(helpers.PungiTestCase):
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1)
sources = [
@ -204,7 +204,7 @@ index e3af4468..ba56d8c7 100644
]
self.assertRunrootCall(koji, sources, cfg['release'], isfinal=True,
@@ -258,8 +247,8 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -296,8 +285,8 @@ class OstreeThreadTest(helpers.PungiTestCase):
cfg = {
'release': '20160321.n.0',
'repo': [
@ -215,7 +215,7 @@ index e3af4468..ba56d8c7 100644
'https://example.com/extra-repo1.repo',
'https://example.com/extra-repo2.repo',
],
@@ -276,10 +265,10 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -314,10 +303,10 @@ class OstreeThreadTest(helpers.PungiTestCase):
t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1)
sources = [
@ -229,7 +229,7 @@ index e3af4468..ba56d8c7 100644
]
self.assertRunrootCall(koji, sources, cfg['release'], isfinal=True,
@@ -330,7 +319,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -368,7 +357,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
get_dir_from_scm):
pool = mock.Mock()
cfg = {
@ -238,7 +238,7 @@ index e3af4468..ba56d8c7 100644
'release': '20160321.n.0',
'add_template': ['some_file.txt'],
'add_arch_template': ['other_file.txt'],
@@ -357,8 +346,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -395,8 +384,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
'branch': 'f24', 'dir': '.'},
templ_dir, logger=pool._logger)])
self.assertRunrootCall(koji,
@ -248,8 +248,8 @@ index e3af4468..ba56d8c7 100644
cfg['release'],
isfinal=True,
extra=['--add-template=%s/some_file.txt' % templ_dir,
@@ -379,7 +367,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
get_file_size, get_mtime, ImageCls, run):
@@ -417,7 +405,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
get_file_size, get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
- 'repo': 'Everything', # this variant-type repo is deprecated, in result will be replaced with default repo
@ -257,7 +257,7 @@ index e3af4468..ba56d8c7 100644
'release': '!RELEASE_FROM_LABEL_DATE_TYPE_RESPIN',
"installpkgs": ["fedora-productimg-atomic"],
"add_template": ["/spin-kickstarts/atomic-installer/lorax-configure-repo.tmpl"],
@@ -411,8 +399,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -449,8 +437,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
self.assertRunrootCall(
koji,
@ -267,8 +267,8 @@ index e3af4468..ba56d8c7 100644
'20151203.t.0',
isfinal=True,
extra=['--installpkgs=fedora-productimg-atomic',
@@ -441,7 +428,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
get_file_size, get_mtime, ImageCls, run):
@@ -479,7 +466,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
get_file_size, get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
- 'repo': 'Everything', # this variant-type repo is deprecated, in result will be replaced with default repo
@ -276,7 +276,7 @@ index e3af4468..ba56d8c7 100644
'release': None,
"installpkgs": ["fedora-productimg-atomic"],
"add_template": ["/spin-kickstarts/atomic-installer/lorax-configure-repo.tmpl"],
@@ -473,8 +460,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@@ -511,8 +498,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
self.assertRunrootCall(
koji,

View File

@ -1,7 +1,7 @@
From f51543a24a35145ecbc60e86951accf5369df364 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>
Date: Wed, 11 Apr 2018 09:20:51 +0200
Subject: [PATCH 3/8] Revert "Ostree can use pkgset repos"
Subject: [PATCH 3/3] Revert "Ostree can use pkgset repos"
This reverts commit c7cc200246300c6a3946b2e3a9f5f7693896a7d6.
---
@ -31,10 +31,10 @@ index 2918fff8..0550b18c 100644
# copy the original config and update before save to a json file
new_config = copy.copy(config)
diff --git a/pungi/util.py b/pungi/util.py
index 431c9978..61a13244 100644
index 3150e26c..7cfbb4e6 100644
--- a/pungi/util.py
+++ b/pungi/util.py
@@ -723,16 +723,19 @@ def _translate_url_to_repo_id(url):
@@ -726,16 +726,19 @@ def _translate_url_to_repo_id(url):
return ''.join([s if s in list(_REPOID_CHARS) else '_' for s in url])
@ -59,7 +59,7 @@ index 431c9978..61a13244 100644
"""
repo_dict = {}
if isinstance(repo, dict):
@@ -742,8 +745,10 @@ def get_repo_dict(repo):
@@ -745,8 +748,10 @@ def get_repo_dict(repo):
if name is None:
name = _translate_url_to_repo_id(url)
else:
@ -72,7 +72,7 @@ index 431c9978..61a13244 100644
repo['name'] = name
repo['baseurl'] = url
return repo
@@ -754,24 +759,24 @@ def get_repo_dict(repo):
@@ -757,24 +762,24 @@ def get_repo_dict(repo):
repo_dict['name'] = _translate_url_to_repo_id(repo)
repo_dict['baseurl'] = repo
else:

View File

@ -1,102 +0,0 @@
From c2fb790652ab9b6f1b03ebd61e70838c0695d1fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 2 May 2018 15:36:52 +0200
Subject: [PATCH 4/8] Update tests for libmodulemd 1.4.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It got a little picky about allowed inputs. We need full RPM NEVRA in
all tests.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
tests/test_createrepophase.py | 6 +++---
tests/test_gather_source_module.py | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tests/test_createrepophase.py b/tests/test_createrepophase.py
index 6a2847a0..fa46272b 100644
--- a/tests/test_createrepophase.py
+++ b/tests/test_createrepophase.py
@@ -723,9 +723,9 @@ class TestCreateVariantRepo(PungiTestCase):
variant = compose.variants['Server']
variant.arch_mmds["x86_64"] = {}
variant.arch_mmds["x86_64"]["test-f27"] = variant.add_fake_module(
- "test:f27:1:2017", rpm_nvrs=["pkg-1.0.0-1"])
+ "test:f27:1:2017", rpm_nvrs=["pkg-0:1.0.0-1.x86_64"])
variant.arch_mmds["x86_64"]["test-f28"] = variant.add_fake_module(
- "test:f28:1:2017", rpm_nvrs=["pkg-2.0.0-1"])
+ "test:f28:1:2017", rpm_nvrs=["pkg-0:2.0.0-1.x86_64"])
def mocked_modifyrepo_cmd(repodir, mmd_path, **kwargs):
modules = Modulemd.Module.new_all_from_file(mmd_path)
@@ -767,7 +767,7 @@ class TestCreateVariantRepo(PungiTestCase):
variant.arch_mmds["x86_64"]["test-f27"] = variant.add_fake_module(
"test:f27:1:2017", rpm_nvrs=["bash-0:4.3.30-2.fc21.x86_64"])
variant.arch_mmds["x86_64"]["test-f28"] = variant.add_fake_module(
- "test:f28:1:2017", rpm_nvrs=["pkg-2.0.0-1"])
+ "test:f28:1:2017", rpm_nvrs=["pkg-0:2.0.0-1.x86_64"])
def mocked_modifyrepo_cmd(repodir, mmd_path, **kwargs):
modules = Modulemd.Module.new_all_from_file(mmd_path)
diff --git a/tests/test_gather_source_module.py b/tests/test_gather_source_module.py
index e656f875..ae2a6bb7 100644
--- a/tests/test_gather_source_module.py
+++ b/tests/test_gather_source_module.py
@@ -24,17 +24,17 @@ class TestGatherSourceModule(helpers.PungiTestCase):
self.compose = helpers.DummyCompose(self.topdir, {})
self.compose.DEBUG = False
self.mmd = self.compose.variants["Server"].add_fake_module(
- "testmodule:master:1:2017", rpm_nvrs=["pkg-1.0.0-1.x86_64", "pkg-1.0.0-1.i686"])
+ "testmodule:master:1:2017", rpm_nvrs=["pkg-0:1.0.0-1.x86_64", "pkg-0:1.0.0-1.i686"])
mock_rpm = mock.Mock(version='1.0.0', release='1',
epoch=0, excludearch=None, exclusivearch=None,
- sourcerpm='pkg-1.0.0-1', nevra='pkg-1.0.0-1.x86_64',
+ sourcerpm='pkg-1.0.0-1', nevra='pkg-0:1.0.0-1.x86_64',
arch="x86_64")
mock_rpm.name = 'pkg'
self.compose.variants['Server'].pkgset.rpms_by_arch['x86_64'] = [mock_rpm]
mock_rpm = mock.Mock(version='1.0.0', release='1',
epoch=0, excludearch=None, exclusivearch=None,
- sourcerpm='pkg-1.0.0-1', nevra='pkg-1.0.0-1.i686',
+ sourcerpm='pkg-1.0.0-1', nevra='pkg-0:1.0.0-1.i686',
arch="i686")
mock_rpm.name = 'pkg'
self.compose.variants['Server'].pkgset.rpms_by_arch['i686'] = [mock_rpm]
@@ -43,13 +43,13 @@ class TestGatherSourceModule(helpers.PungiTestCase):
source = GatherSourceModule(self.compose)
packages, groups = source("x86_64", self.compose.variants["Server"])
self.assertEqual(len(packages), 1)
- self.assertEqual(list(packages)[0][0].nevra, "pkg-1.0.0-1.x86_64")
+ self.assertEqual(list(packages)[0][0].nevra, "pkg-0:1.0.0-1.x86_64")
self.assertEqual(len(groups), 0)
variant = self.compose.variants["Server"]
arch_mmd = variant.arch_mmds["x86_64"]["testmodule-master"]
self.assertEqual(set(arch_mmd.get_rpm_artifacts().get()),
- set(["pkg-1.0.0-1.x86_64"]))
+ set(["pkg-0:1.0.0-1.x86_64"]))
def test_gather_multilib(self):
multilib = Modulemd.SimpleSet()
@@ -60,13 +60,13 @@ class TestGatherSourceModule(helpers.PungiTestCase):
packages, groups = source("x86_64", self.compose.variants["Server"])
self.assertEqual(len(packages), 2)
self.assertEqual(set(package[0].nevra for package in packages),
- set(["pkg-1.0.0-1.x86_64", "pkg-1.0.0-1.i686"]))
+ set(["pkg-0:1.0.0-1.x86_64", "pkg-0:1.0.0-1.i686"]))
self.assertEqual(len(groups), 0)
variant = self.compose.variants["Server"]
arch_mmd = variant.arch_mmds["x86_64"]["testmodule-master"]
self.assertEqual(set(arch_mmd.get_rpm_artifacts().get()),
- set(["pkg-1.0.0-1.x86_64", "pkg-1.0.0-1.i686"]))
+ set(["pkg-0:1.0.0-1.x86_64", "pkg-0:1.0.0-1.i686"]))
def test_gather_filtered_module(self):
filter_set = Modulemd.SimpleSet()
--
2.14.3

View File

@ -1,48 +0,0 @@
From 52a3c87c71522db59191f1f7e4e66cee72e67bf5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Fri, 4 May 2018 08:58:34 +0200
Subject: [PATCH 5/8] ostree-installer: Copy files without owner
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The files created in koji runroot will be owned by root. If the compose
is done under different user, there could be a problem with copying the
files preserving the owner. Let's just copy them without that.
Fixes: https://pagure.io/pungi/issue/932
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/phases/ostree_installer.py | 2 +-
tests/test_ostree_installer_phase.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py
index 9bf5e255..58eede96 100644
--- a/pungi/phases/ostree_installer.py
+++ b/pungi/phases/ostree_installer.py
@@ -98,7 +98,7 @@ class OstreeInstallerThread(WorkerThread):
os_path = compose.paths.compose.os_tree(arch, variant)
boot_iso = os.path.join(output_dir, 'images', 'boot.iso')
- shortcuts.run('cp -av %s/* %s/' %
+ shortcuts.run('cp -rv %s/* %s/' %
(shlex_quote(output_dir), shlex_quote(os_path)))
try:
os.link(boot_iso, iso_path)
diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py
index ba56d8c7..62598315 100644
--- a/tests/test_ostree_installer_phase.py
+++ b/tests/test_ostree_installer_phase.py
@@ -123,7 +123,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
self.assertTrue(os.path.isdir(self.topdir + '/work/x86_64/Everything/'))
self.assertFalse(os.path.isdir(self.topdir + '/work/x86_64/Everything/ostree_installer'))
self.assertEqual(run.call_args_list,
- [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))])
+ [mock.call('cp -rv {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))])
@mock.patch('kobo.shortcuts.run')
@mock.patch('productmd.images.Image')
--
2.14.3

View File

@ -1,48 +0,0 @@
From 155e60563a6f1a2d593525e563a8e45a4fc4f38c Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <puiterwijk@redhat.com>
Date: Wed, 9 May 2018 23:17:59 +0200
Subject: [PATCH 6/8] Make wait-for-signed-ostree repeat the fedmsg in case the
signer crashed
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
---
bin/pungi-wait-for-signed-ostree-handler | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/bin/pungi-wait-for-signed-ostree-handler b/bin/pungi-wait-for-signed-ostree-handler
index 98c02031..25997993 100755
--- a/bin/pungi-wait-for-signed-ostree-handler
+++ b/bin/pungi-wait-for-signed-ostree-handler
@@ -5,6 +5,7 @@ from __future__ import print_function
import argparse
import datetime
+import fedmsg.config
import json
import os
import sys
@@ -29,9 +30,21 @@ if __name__ == '__main__':
commit = data['commitid']
path = '%s/objects/%s/%s.commitmeta' % (repo, commit[:2], commit[2:])
+ config = fedmsg.config.load_config()
+ config['active'] = True # Connect out to a fedmsg-relay instance
+ config['cert_prefix'] = 'releng' # Use this cert.
+ fedmsg.init(**config)
+ topic = 'compose.%s' % opts.cmd.replace('-', '.').lower()
+
+ count = 0
while not os.path.exists(path):
print('%s: Commit not signed yet, waiting...'
% datetime.datetime.utcnow())
+ count += 1
+ if count >= 60: # Repeat every 5 minutes
+ print('Repeating notification')
+ fedmsg.publish(topic=topic, modname='pungi', msg=data)
+ count = 0
time.sleep(5)
print('Found signature.')
--
2.14.3

View File

@ -1,38 +0,0 @@
From 5d0e7911e080d4244a071b9af441bcff88b8c6cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Thu, 10 May 2018 08:58:33 +0200
Subject: [PATCH 7/8] init: Stop filtering comps environments all the time
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For variants that contain all packages (Fedora's Everything) we don't
want to lose any environments.
Fixes: https://pagure.io/pungi/issue/940
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/phases/init.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pungi/phases/init.py b/pungi/phases/init.py
index a8dcc967..4b9916d1 100644
--- a/pungi/phases/init.py
+++ b/pungi/phases/init.py
@@ -128,7 +128,12 @@ def write_variant_comps(compose, arch, variant):
unmatched = comps.filter_groups(variant.groups)
for grp in unmatched:
compose.log_warning(UNMATCHED_GROUP_MSG % (variant.uid, arch, grp))
- if compose.conf["comps_filter_environments"]:
+ contains_all = not variant.groups and not variant.environments
+ if compose.conf["comps_filter_environments"] and not contains_all:
+ # We only want to filter environments if it's enabled by configuration
+ # and it's a variant with some groups and environements defined. If
+ # there are none, all packages should go in there and also all
+ # environments should be preserved.
comps.filter_environments(variant.environments)
comps.write_comps()
--
2.14.3

View File

@ -1,246 +0,0 @@
From 038dc1ff00cb566034b1a264a1af1b7d15cd37e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Tue, 15 May 2018 09:26:54 +0200
Subject: [PATCH 8/8] ostree-installer: Use Python function to copy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This should give us better error reporting. The `copy_all` function
should preserve permissions on all files.
Relates: https://pagure.io/pungi/issue/932
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/phases/ostree_installer.py | 3 +-
tests/test_ostree_installer_phase.py | 57 ++++++++++++++++++------------------
2 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py
index 58eede96..0384a600 100644
--- a/pungi/phases/ostree_installer.py
+++ b/pungi/phases/ostree_installer.py
@@ -98,8 +98,7 @@ class OstreeInstallerThread(WorkerThread):
os_path = compose.paths.compose.os_tree(arch, variant)
boot_iso = os.path.join(output_dir, 'images', 'boot.iso')
- shortcuts.run('cp -rv %s/* %s/' %
- (shlex_quote(output_dir), shlex_quote(os_path)))
+ util.copy_all(output_dir, os_path)
try:
os.link(boot_iso, iso_path)
except OSError:
diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py
index 62598315..51fac7d5 100644
--- a/tests/test_ostree_installer_phase.py
+++ b/tests/test_ostree_installer_phase.py
@@ -117,15 +117,16 @@ class OstreeThreadTest(helpers.PungiTestCase):
self.assertEqual(get_file_size.call_args_list, [mock.call(final_iso_path)])
self.assertEqual(get_mtime.call_args_list, [mock.call(final_iso_path)])
- def assertAllCopied(self, run):
+ def assertAllCopied(self, copy_all):
self.assertEqual(self.compose.get_image_name.call_args_list,
[mock.call('x86_64', self.compose.variants['Everything'], disc_type='ostree')])
self.assertTrue(os.path.isdir(self.topdir + '/work/x86_64/Everything/'))
self.assertFalse(os.path.isdir(self.topdir + '/work/x86_64/Everything/ostree_installer'))
- self.assertEqual(run.call_args_list,
- [mock.call('cp -rv {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))])
+ self.assertEqual(copy_all.call_args_list,
+ [mock.call('{0}/work/x86_64/Everything/ostree_installer'.format(self.topdir),
+ '{0}/compose/Everything/x86_64/os'.format(self.topdir))])
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -133,7 +134,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_run(self, KojiWrapper, link, iso,
- get_file_size, get_mtime, ImageCls, run):
+ get_file_size, get_mtime, ImageCls, copy_all):
self.compose.supported = False
pool = mock.Mock()
cfg = {
@@ -160,9 +161,9 @@ class OstreeThreadTest(helpers.PungiTestCase):
extra=['--logfile=%s/%s/lorax.log' % (self.topdir, LOG_PATH)])
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
self.assertImageAdded(self.compose, ImageCls, iso)
- self.assertAllCopied(run)
+ self.assertAllCopied(copy_all)
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -170,7 +171,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_run_external_source(self, KojiWrapper, link, iso,
- get_file_size, get_mtime, ImageCls, run):
+ get_file_size, get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
'repo': 'http://example.com/repo/$arch/',
@@ -194,9 +195,9 @@ class OstreeThreadTest(helpers.PungiTestCase):
extra=['--logfile=%s/%s/lorax.log' % (self.topdir, LOG_PATH)])
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
self.assertImageAdded(self.compose, ImageCls, iso)
- self.assertAllCopied(run)
+ self.assertAllCopied(copy_all)
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -204,7 +205,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_run_with_repo_key(self, KojiWrapper, link, iso,
- get_file_size, get_mtime, ImageCls, run):
+ get_file_size, get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
'release': '20160321.n.0',
@@ -234,7 +235,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
self.assertRunrootCall(koji, sources, cfg['release'], isfinal=True,
extra=['--logfile=%s/%s/lorax.log' % (self.topdir, LOG_PATH)])
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -242,7 +243,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_run_with_multiple_variant_repos(self, KojiWrapper, link, iso,
- get_file_size, get_mtime, ImageCls, run):
+ get_file_size, get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
'release': '20160321.n.0',
@@ -274,7 +275,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
self.assertRunrootCall(koji, sources, cfg['release'], isfinal=True,
extra=['--logfile=%s/%s/lorax.log' % (self.topdir, LOG_PATH)])
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -283,7 +284,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_fail_with_relative_template_path_but_no_repo(self, KojiWrapper, link,
iso, get_file_size,
- get_mtime, ImageCls, run):
+ get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
'repo': 'Everything',
@@ -307,7 +308,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
self.assertIn('template_repo', str(ctx.exception))
@mock.patch('pungi.wrappers.scm.get_dir_from_scm')
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -315,7 +316,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_run_clone_templates(self, KojiWrapper, link, iso,
- get_file_size, get_mtime, ImageCls, run,
+ get_file_size, get_mtime, ImageCls, copy_all,
get_dir_from_scm):
pool = mock.Mock()
cfg = {
@@ -354,9 +355,9 @@ class OstreeThreadTest(helpers.PungiTestCase):
'--logfile=%s/%s/lorax.log' % (self.topdir, LOG_PATH)])
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
self.assertImageAdded(self.compose, ImageCls, iso)
- self.assertAllCopied(run)
+ self.assertAllCopied(copy_all)
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -364,7 +365,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_run_with_explicitly_generated_release(self, KojiWrapper, link, iso,
- get_file_size, get_mtime, ImageCls, run):
+ get_file_size, get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
'repo': 'Everything',
@@ -415,9 +416,9 @@ class OstreeThreadTest(helpers.PungiTestCase):
)
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
self.assertImageAdded(self.compose, ImageCls, iso)
- self.assertAllCopied(run)
+ self.assertAllCopied(copy_all)
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -425,7 +426,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_run_with_implicit_release(self, KojiWrapper, link, iso,
- get_file_size, get_mtime, ImageCls, run):
+ get_file_size, get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
'repo': 'Everything',
@@ -476,9 +477,9 @@ class OstreeThreadTest(helpers.PungiTestCase):
)
self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path)
self.assertImageAdded(self.compose, ImageCls, iso)
- self.assertAllCopied(run)
+ self.assertAllCopied(copy_all)
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -486,7 +487,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_fail_crash(self, KojiWrapper, link, iso, get_file_size,
- get_mtime, ImageCls, run):
+ get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
'repo': 'Everything',
@@ -504,7 +505,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
mock.call('BOOM')
])
- @mock.patch('kobo.shortcuts.run')
+ @mock.patch('pungi.util.copy_all')
@mock.patch('productmd.images.Image')
@mock.patch('pungi.util.get_mtime')
@mock.patch('pungi.util.get_file_size')
@@ -512,7 +513,7 @@ class OstreeThreadTest(helpers.PungiTestCase):
@mock.patch('os.link')
@mock.patch('pungi.wrappers.kojiwrapper.KojiWrapper')
def test_fail_runroot_fail(self, KojiWrapper, link, iso,
- get_file_size, get_mtime, ImageCls, run):
+ get_file_size, get_mtime, ImageCls, copy_all):
pool = mock.Mock()
cfg = {
'repo': 'Everything',
--
2.14.3

View File

@ -1,6 +1,6 @@
Name: pungi
Version: 4.1.24
Release: 4%{?dist}
Version: 4.1.25
Release: 1%{?dist}
Summary: Distribution compose tool
Group: Development/Tools
@ -10,11 +10,6 @@ Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2
Patch0: 0001-Revert-Move-ostree-phase-and-pipelines-for-running-p.patch
Patch1: 0002-Revert-Other-repo-for-OstreeInstaller.patch
Patch2: 0003-Revert-Ostree-can-use-pkgset-repos.patch
Patch3: 0004-Update-tests-for-libmodulemd-1.4.0.patch
Patch4: 0005-ostree-installer-Copy-files-without-owner.patch
Patch5: 0006-Make-wait-for-signed-ostree-repeat-the-fedmsg-in-cas.patch
Patch6: 0007-init-Stop-filtering-comps-environments-all-the-time.patch
Patch7: 0008-ostree-installer-Use-Python-function-to-copy.patch
BuildRequires: python3-nose
BuildRequires: python3-mock
@ -181,6 +176,29 @@ nosetests-3 --exe
%{_bindir}/%{name}-wait-for-signed-ostree-handler
%changelog
* Tue May 22 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.25-1
- comps-wrapper: Make tests pass on EL6 (lsedlar)
- pkgset: Add option to ignore noarch in ExclusiveArch (lsedlar)
- Handling multiple modules with the same NSV - PDC (onosek)
- createrepo: Allow disabling SQLite database (lsedlar)
- init: Drop database from comps repo (lsedlar)
- createrepo: Add module arch to metadata (lsedlar)
- arch: Drop mapping ppc64 -> ppc64p7 (lsedlar)
- arch: Make i386 map to i686 instead of athlon (lsedlar)
- Add a phase for creating extra ISOs (lsedlar)
- Stop using .message attribute on exceptions (lsedlar)
- Validation of parameter skip_phases (onosek)
- Capture sigterm and mark the compose as DOOMED (puiterwijk)
- createiso: Remove useless method (lsedlar)
- createiso: Refactor code into smaller functions (lsedlar)
- arch: Remove mocks in tests (lsedlar)
- ostree-installer: Allow overwriting buildinstall (lsedlar)
- ostree-installer: Work with skipped buildinstall (lsedlar)
- createrepo: Use less verbose logs (lsedlar)
- pkgset: Create global repo in parallel to merging pkgsets (lsedlar)
- createiso: Skip if buildinstall fails (lsedlar)
- Update tests for libmodulemd 1.4.0 (lsedlar)
* Wed May 16 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.24-4
- Use python function to copy ostree installer output

View File

@ -1 +1 @@
SHA512 (pungi-4.1.24.tar.bz2) = 91b192467fdd09d0f2ef99a1194f3b9a2fe7f316549c6ec844984f4eeefbf776e95f4f5cdbb9338c4dd32c9fd5a57262d9761cf1d14843f4c6b8775ea49698eb
SHA512 (pungi-4.1.25.tar.bz2) = 6f58f6693619345fd517cab9ad833f961a544772d9f16ed75cf37d3c9b3905ea9c7c372c1906c1900bd18311a0ed0c182100e2017716db65f80595b51914ba96