New upstream release 4.1.20

This commit is contained in:
Lubomír Sedlář 2017-11-01 15:22:07 +01:00
parent 3f825bd282
commit e9ca7f5c5b
7 changed files with 44 additions and 367 deletions

View File

@ -1,196 +0,0 @@
From be39dc3caf3b61ee77fda0bf15e753854283c7b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Mon, 23 Oct 2017 16:05:54 +0200
Subject: [PATCH] buildinstall: Expose template arguments for lorax
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This would be useful for modularity. The templates can be added now and
variables set via the existing `lorax_option`.
It's not possible to use custom templates not shipped with lorax, as
passing the path to a random directory is a little bit more tricky.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
doc/configuration.rst | 4 ++++
pungi/checks.py | 4 ++++
pungi/phases/buildinstall.py | 12 ++++++++++++
tests/test_buildinstall.py | 28 +++++++++++++++++++++++++++-
4 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/doc/configuration.rst b/doc/configuration.rst
index 950a98c..76b03a1 100644
--- a/doc/configuration.rst
+++ b/doc/configuration.rst
@@ -486,6 +486,10 @@ Options
* ``bugurl`` -- *str* (default ``None``)
* ``nomacboot`` -- *bool* (default ``True``)
* ``noupgrade`` -- *bool* (default ``True``)
+ * ``add_template`` -- *[str]* (default empty)
+ * ``add_arch_template`` -- *[str]* (default empty)
+ * ``add_template_var`` -- *[str]* (default empty)
+ * ``add_arch_template_var`` -- *[str]* (default empty)
**buildinstall_kickstart**
(:ref:`scm_dict <scm_support>`) -- If specified, this kickstart file will
be copied into each file and pointed to in boot configuration.
diff --git a/pungi/checks.py b/pungi/checks.py
index acb3f4b..3a68ef9 100644
--- a/pungi/checks.py
+++ b/pungi/checks.py
@@ -997,6 +997,10 @@ def make_schema():
"bugurl": {"type": "string"},
"nomacboot": {"type": "boolean"},
"noupgrade": {"type": "boolean"},
+ 'add_template': {"$ref": "#/definitions/list_of_strings"},
+ 'add_arch_template': {"$ref": "#/definitions/list_of_strings"},
+ 'add_template_var': {"$ref": "#/definitions/list_of_strings"},
+ 'add_arch_template_var': {"$ref": "#/definitions/list_of_strings"},
},
"additionalProperties": False,
}),
diff --git a/pungi/phases/buildinstall.py b/pungi/phases/buildinstall.py
index 1bacc16..2539e6d 100644
--- a/pungi/phases/buildinstall.py
+++ b/pungi/phases/buildinstall.py
@@ -58,6 +58,10 @@ class BuildinstallPhase(PhaseBase):
noupgrade = True
bugurl = None
nomacboot = True
+ add_template = []
+ add_arch_template = []
+ add_template_var = []
+ add_arch_template_var = []
for data in get_arch_variant_data(self.compose.conf, 'lorax_options', arch, variant):
if not data.get('noupgrade', True):
noupgrade = False
@@ -65,6 +69,10 @@ class BuildinstallPhase(PhaseBase):
bugurl = data.get('bugurl')
if not data.get('nomacboot', True):
nomacboot = False
+ add_template.extend(data.get('add_template', []))
+ add_arch_template.extend(data.get('add_arch_template', []))
+ add_template_var.extend(data.get('add_template_var', []))
+ add_arch_template_var.extend(data.get('add_arch_template_var', []))
output_dir = os.path.join(output_dir, variant.uid)
# The paths module will modify the filename (by inserting arch). But we
@@ -86,6 +94,10 @@ class BuildinstallPhase(PhaseBase):
volid=volid,
nomacboot=nomacboot,
bugurl=bugurl,
+ add_template=add_template,
+ add_arch_template=add_arch_template,
+ add_template_var=add_template_var,
+ add_arch_template_var=add_arch_template_var,
noupgrade=noupgrade,
log_dir=log_dir)
return 'rm -rf %s && %s' % (pipes.quote(output_dir),
diff --git a/tests/test_buildinstall.py b/tests/test_buildinstall.py
index 338c854..e80fd3a 100644
--- a/tests/test_buildinstall.py
+++ b/tests/test_buildinstall.py
@@ -91,18 +91,24 @@ class TestBuildinstallPhase(PungiTestCase):
buildarch='x86_64', is_final=True, nomacboot=True, noupgrade=True,
volid='vol_id', variant='Server', buildinstallpackages=['bash', 'vim'],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/x86_64/buildinstall-Server-logs'),
mock.call('Test', '1', '1', self.topdir + '/work/amd64/repo',
self.topdir + '/work/amd64/buildinstall/Server',
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=True,
volid='vol_id', variant='Server', buildinstallpackages=['bash', 'vim'],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/amd64/buildinstall-Server-logs'),
mock.call('Test', '1', '1', self.topdir + '/work/amd64/repo',
self.topdir + '/work/amd64/buildinstall/Client',
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=True,
volid='vol_id', variant='Client', buildinstallpackages=[],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/amd64/buildinstall-Client-logs')])
self.assertItemsEqual(
get_volid.mock_calls,
@@ -145,6 +151,8 @@ class TestBuildinstallPhase(PungiTestCase):
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=True,
volid='vol_id', variant='Client', buildinstallpackages=[],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/amd64/buildinstall-Client-logs')],
any_order=True)
self.assertItemsEqual(
@@ -202,7 +210,13 @@ class TestBuildinstallPhase(PungiTestCase):
'buildinstall_method': 'lorax',
'lorax_options': [
('^Server$', {
- 'x86_64': {'bugurl': 'http://example.com'},
+ 'x86_64': {
+ 'bugurl': 'http://example.com',
+ 'add_template': ['foo', 'FOO'],
+ 'add_arch_template': ['bar'],
+ 'add_template_var': ['baz=1'],
+ 'add_arch_template_var': ['quux=2'],
+ },
'amd64': {'noupgrade': False}
}),
('^Client$', {
@@ -235,6 +249,8 @@ class TestBuildinstallPhase(PungiTestCase):
self.topdir + '/work/x86_64/buildinstall/Server',
buildarch='x86_64', is_final=True, nomacboot=True, noupgrade=True,
volid='vol_id', variant='Server', buildinstallpackages=['bash', 'vim'],
+ add_template=['foo', 'FOO'], add_arch_template=['bar'],
+ add_template_var=['baz=1'], add_arch_template_var=['quux=2'],
bugurl='http://example.com',
log_dir=self.topdir + '/logs/x86_64/buildinstall-Server-logs'),
mock.call('Test', '1', '1', self.topdir + '/work/amd64/repo',
@@ -242,12 +258,16 @@ class TestBuildinstallPhase(PungiTestCase):
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=False,
volid='vol_id', variant='Server', buildinstallpackages=['bash', 'vim'],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/amd64/buildinstall-Server-logs'),
mock.call('Test', '1', '1', self.topdir + '/work/amd64/repo',
self.topdir + '/work/amd64/buildinstall/Client',
buildarch='amd64', is_final=True, nomacboot=False, noupgrade=True,
volid='vol_id', variant='Client', buildinstallpackages=[],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/amd64/buildinstall-Client-logs')])
self.assertItemsEqual(
get_volid.mock_calls,
@@ -299,18 +319,24 @@ class TestBuildinstallPhase(PungiTestCase):
buildarch='x86_64', is_final=True, nomacboot=False, noupgrade=False,
volid='vol_id', variant='Server', buildinstallpackages=['bash', 'vim'],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/x86_64/buildinstall-Server-logs'),
mock.call('Test', '1', '1', self.topdir + '/work/amd64/repo',
self.topdir + '/work/amd64/buildinstall/Server',
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=False,
volid='vol_id', variant='Server', buildinstallpackages=['bash', 'vim'],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/amd64/buildinstall-Server-logs'),
mock.call('Test', '1', '1', self.topdir + '/work/amd64/repo',
self.topdir + '/work/amd64/buildinstall/Client',
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=False,
volid='vol_id', variant='Client', buildinstallpackages=[],
bugurl=None,
+ add_template=[], add_arch_template=[],
+ add_template_var=[], add_arch_template_var=[],
log_dir=self.topdir + '/logs/amd64/buildinstall-Client-logs')])
self.assertItemsEqual(
get_volid.mock_calls,
--
2.13.6

View File

@ -1,47 +0,0 @@
From 2819311d6e2151fd25a2d66fb3513341d0f7da05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Wed, 18 Oct 2017 15:22:41 +0200
Subject: [PATCH] config: Allow comps_file for any gather_source
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It only affects gathering packages when gather_source is set to comps,
but it could still make sense to include the file in the repository even
if the not used for gathering.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/checks.py | 1 -
tests/test_config.py | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/pungi/checks.py b/pungi/checks.py
index d9f82c1..acb3f4b 100644
--- a/pungi/checks.py
+++ b/pungi/checks.py
@@ -1138,7 +1138,6 @@ CONFIG_DEPS = {
"gather_source": {
"conflicts": [
(lambda val: val != 'json', ['gather_source_mapping']),
- (lambda val: val != 'comps', ['comps_file']),
],
"requires": [
(lambda val: val == 'json', ['gather_source_mapping']),
diff --git a/tests/test_config.py b/tests/test_config.py
index 24bc72d..5f7d04b 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -247,8 +247,7 @@ class GatherConfigTestCase(ConfigTestCase):
self.assertValidation(
cfg,
- [checks.REQUIRES.format('gather_source', 'json', 'gather_source_mapping'),
- checks.CONFLICTS.format('gather_source', 'json', 'comps_file')])
+ [checks.REQUIRES.format('gather_source', 'json', 'gather_source_mapping')])
class OSBSConfigTestCase(ConfigTestCase):
--
2.13.6

View File

@ -1,34 +0,0 @@
From 32ca02efd6f59a271c660027c4576ab8ea09aef7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Thu, 20 Jul 2017 13:11:06 +0200
Subject: [PATCH 1/3] gather: Stop requiring comps file in nodeps
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When there are no groups, we shouldn't try to read comps file (because
it may very well not be there).
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/phases/gather/methods/method_nodeps.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pungi/phases/gather/methods/method_nodeps.py b/pungi/phases/gather/methods/method_nodeps.py
index 2979cd7..4b164be 100644
--- a/pungi/phases/gather/methods/method_nodeps.py
+++ b/pungi/phases/gather/methods/method_nodeps.py
@@ -103,6 +103,10 @@ def expand_groups(compose, arch, groups):
:returns: A set of tuples (pkg_name, arch)
"""
+ if not groups:
+ # No groups, nothing to do (this also covers case when there is no
+ # comps file.
+ return set()
comps_file = compose.paths.work.comps(arch, create_dir=False)
comps = CompsWrapper(comps_file)
packages = set()
--
2.9.4

View File

@ -1,28 +0,0 @@
From 5dd6b1b0e7a49d2fa71a98f653e117400d27c173 Mon Sep 17 00:00:00 2001
From: Jan Kaluza <jkaluza@redhat.com>
Date: Thu, 20 Jul 2017 13:35:53 +0200
Subject: [PATCH 2/3] GatherSourceModule: return rpm_obj instead of the
rpm_obj.name
Merges: https://pagure.io/pungi/pull-request/680
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
---
pungi/phases/gather/sources/source_module.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pungi/phases/gather/sources/source_module.py b/pungi/phases/gather/sources/source_module.py
index 2845ea5..b39814c 100644
--- a/pungi/phases/gather/sources/source_module.py
+++ b/pungi/phases/gather/sources/source_module.py
@@ -65,7 +65,7 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase):
if (srpm in mmd.components.rpms.keys() and
rpm_obj.name not in mmd.filter.rpms and
rpm_obj.nevra in mmd.artifacts.rpms):
- packages.add((rpm_obj.name, None))
+ packages.add((rpm_obj, None))
added_rpms.setdefault(mmd_id, [])
added_rpms[mmd_id].append(str(rpm_obj.nevra))
--
2.9.4

View File

@ -1,54 +0,0 @@
From 65078ef9cfdc204994fdd4ab7c202b45b9631340 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Thu, 20 Jul 2017 14:54:54 +0200
Subject: [PATCH 3/3] gather: Don't pull multiple debuginfo packages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When there is a noarch subpackage, all compatible debuginfo would be
pulled in, which is not desirable.
Example: Server.x86_64 needs pkg.x86_64 and pkg-data.noarch. We only
want pkg-debuginfo.x86_64, but without this patch even
pkg-debuginfo.i686 would get in.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/phases/gather/methods/method_nodeps.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/pungi/phases/gather/methods/method_nodeps.py b/pungi/phases/gather/methods/method_nodeps.py
index 4b164be..c7dd891 100644
--- a/pungi/phases/gather/methods/method_nodeps.py
+++ b/pungi/phases/gather/methods/method_nodeps.py
@@ -50,9 +50,9 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
pkg = global_pkgset[i]
if not pkg_is_rpm(pkg):
continue
+ if pkg.arch not in valid_arches:
+ continue
for gathered_pkg, pkg_arch in packages:
- if pkg.arch not in valid_arches:
- continue
if (type(gathered_pkg) in [str, unicode]
and pkg.name != gathered_pkg):
continue
@@ -86,8 +86,12 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
continue
if pkg.sourcerpm not in seen_srpms:
continue
- if not set(compatible_arches[pkg.arch]) & set(seen_srpms[pkg.sourcerpm]):
- # this handles stuff like i386 debuginfo in a i686 package
+ pkg_arches = set(compatible_arches[pkg.arch]) - set(['noarch'])
+ seen_arches = set(seen_srpms[pkg.sourcerpm]) - set(['noarch'])
+ if not (pkg_arches & seen_arches):
+ # We only want to pull in a debuginfo if we have a binary
+ # package for a compatible arch. Noarch packages should not
+ # pull debuginfo (they would pull in all architectures).
continue
result["debuginfo"].append({
"path": pkg.file_path,
--
2.9.4

View File

@ -1,15 +1,12 @@
Name: pungi
Version: 4.1.19
Release: 4%{?dist}
Version: 4.1.20
Release: 1%{?dist}
Summary: Distribution compose tool
Group: Development/Tools
License: GPLv2
URL: https://pagure.io/pungi
Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2
Patch0: 0001-config-Allow-comps_file-for-any-gather_source.patch
Patch1: 0001-buildinstall-Expose-template-arguments-for-lorax.patch
BuildRequires: python-nose, python-mock
BuildRequires: python-devel, python-setuptools, python2-productmd >= 1.3
BuildRequires: python-lockfile, kobo-rpmlib, createrepo_c
@ -102,8 +99,6 @@ notification to Fedora Message Bus.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%{__python} setup.py build
@ -158,6 +153,47 @@ cd tests && ./test_compose.sh
%{_bindir}/%{name}-wait-for-signed-ostree-handler
%changelog
* Wed Nov 01 2017 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.20-1
- image-build: Drop suffixes from configuration (lsedlar)
- kojiwrapper: Deal with multiple values for image-build (lsedlar)
- Add modulemd to the missing module error (patrick)
- notification: Add more info into the messages (lsedlar)
- notification: Fix running on Python 3 (lsedlar)
- remove remaining hard coded createrepo threads (onosek)
- tests: Fix remaining missing assertions (lsedlar)
- tests: Work with older unittest2 (lsedlar)
- tests: Skip testing pdc logs if dependencies are not installed (lsedlar)
- Log PDC communications and info for modular composes (dowang)
- Update documentation section "Contributing to Pungi". (onosek)
- Reject yum gather backend on Python 3 (lsedlar)
- Stop using deprecated pipes.quote (lsedlar)
- Convert configparser values to string (lsedlar)
- Explicitly decode test files as UTF-8 (lsedlar)
- Use universal_newlines when running other commands (lsedlar)
- Port to Python 3 (lsedlar)
- checks: Use list of release types from productmd (patrick)
- Add an option to make pungi-koji print its compose_dir to stdout (patrick)
- buildinstall: Expose template arguments for lorax (lsedlar)
- Add support for new modules naming policy with colon delimiter (jkaluza)
- Catch the issue when PDC does not contain RPMs, but the module definition
says there should be some. (jkaluza)
- pkgset: Cherry-pick packages from Koji when we know already what packages
will end up in compose (jkaluza)
- config: Allow comps_file for any gather_source (lsedlar)
- pkgset: Allow unsigned packages by empty key (lsedlar)
- gather: Nodeps should allow noarch packages (lsedlar)
- pkgset: Clean up path generation (lsedlar)
- createiso: Fix logging for media split (lsedlar)
- Raise the Exception when a symlink cannot be created. (randy)
- Use variant UID for subvariant fallback (lsedlar)
- Fixup for opening config dumps (lsedlar)
- Open and close file descriptors. (rbean)
- live-images: Honor global settings for target (lsedlar)
- unified-isos: Stop erasing metadata on failure (lsedlar)
- Add directory name for checksum file (lsedlar)
- createrepo: Allow customizing number of threads (lsedlar)
- Make ostree installer before cloud images (lsedlar)
* Mon Oct 23 2017 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.19-4
- Expose template arguments for lorax

View File

@ -1 +1 @@
SHA512 (pungi-4.1.19.tar.bz2) = fcd85211f5bbe7f6b5192734a23a644980ef30452f0719819d9cf7342b9b55e7e73b14c395c66adf79bf1e189d921a7a71b57ea212458741f83f564b851a1977
SHA512 (pungi-4.1.20.tar.bz2) = a34ad87da99a1b78531f6f31509fb5d08fd771fdef7517aaf9485dbce23b72fb6a03150c145ec1585d749456ec2d5aff15a79ca1918bd4cb9d6d51b08f2551f2