Compare commits

..

8 Commits

Author SHA1 Message Date
e17a6d7f42
- Changelog date order
- Typo
2024-10-09 12:48:48 +03:00
5152dfa764
- Add x86_64_v2 to a lisf of exclusive arches if there is any arch with base x86_64
- Changelog
- Bumbed version
2024-09-27 15:43:27 +03:00
b61614969d - Add x86_64_v2 to arch list if x86_64 in list 2024-09-16 14:59:03 +03:00
38cc2f79a0
- Unittests are fixed 2024-09-08 12:01:32 +03:00
d8b7f9210e
- Typo 2024-09-08 11:47:45 +03:00
69ec4df8f0
- Release is fixed 2024-09-06 22:30:35 +03:00
20841cfd4c
- Changelog
- Release is bumped
2024-09-06 22:29:55 +03:00
cb53de3c46
- Truncate a volume ID to 32 bytes
- Add new architecture `x86_64_v2`
2024-09-06 22:28:38 +03:00
5 changed files with 26 additions and 12 deletions

View File

@ -2,7 +2,7 @@
Name: pungi
Version: 4.7.0
Release: 3%{?dist}.alma
Release: 6%{?dist}.alma.1
Summary: Distribution compose tool
License: GPL-2.0-only
@ -174,6 +174,16 @@ rm %{buildroot}%{_bindir}/pungi
%{_bindir}/%{name}-cache-cleanup
%changelog
* Fri Sep 27 2024 Stepan Oksanichenko <soksanichenko@almalinux.org> - 4.7.0-6
- Add x86_64_v2 to a list of exclusive arches if there is any arch with base `x86_64`
* Mon Sep 16 2024 Eduard Abdullin <eabdullin@almalinux.org> - 4.7.0-5
- Add x86_64_v2 to arch list if x86_64 in list
* Fri Sep 06 2024 Stepan Oksanichenko <soksanichenko@almalinux.org> - 4.7.0-4
- Truncate a volume ID to 32 bytes
- Add new architecture `x86_64_v2`
* Thu Sep 05 2024 Stepan Oksanichenko <soksanichenko@almalinux.org> - 4.7.0-2
- Use xorriso as recommended package and genisoimage as required for RHEL8/9 and vice versa for RHEL10
@ -280,15 +290,15 @@ rm %{buildroot}%{_bindir}/pungi
- Fix minor Ruff/flake8 warnings (tim)
- osbuild: manifest type in config (cmdr)
* Mon Sep 25 2023 Lubomír Sedlář <lsedlar@redhat.com> - 4.5.0-7
- Backport patch for explicit setting of osbuild image type in metadata
* Mon Nov 21 2023 Stepan Oksanichenko <soksanichenko@almalinux.org> - 4.5.0-3
- Method `get_remote_file_content` is object's method now
* Wed Nov 15 2023 Stepan Oksanichenko <soksanichenko@almalinux.org> - 4.5.0-2
- Return empty list if a repo doesn't contain any module
* Mon Sep 25 2023 Lubomír Sedlář <lsedlar@redhat.com> - 4.5.0-7
- Backport patch for explicit setting of osbuild image type in metadata
* Thu Aug 31 2023 Lubomír Sedlář <lsedlar@redhat.com> - 4.5.0-1
- kojiwrapper: Stop being smart about local access (lsedlar)
- Fix unittest errors (ounsal)

View File

@ -93,6 +93,11 @@ def split_name_arch(name_arch):
def is_excluded(package, arches, logger=None):
"""Check if package is excluded from given architectures."""
if any(
getBaseArch(exc_arch) == 'x86_64' for exc_arch in package.exclusivearch
) and 'x86_64_v2' not in package.exclusivearch:
package.exclusivearch.append('x86_64_v2')
if package.excludearch and set(package.excludearch) & set(arches):
if logger:
logger.debug(

View File

@ -34,6 +34,8 @@ arches = {
"x86_64": "athlon",
"amd64": "x86_64",
"ia32e": "x86_64",
# x86-64-v2
"x86_64_v2": "noarch",
# ppc64le
"ppc64le": "noarch",
# ppc

View File

@ -487,10 +487,7 @@ def get_volid(compose, arch, variant=None, disc_type=False, formats=None, **kwar
tried.add(volid)
if volid and len(volid) > 32:
raise ValueError(
"Could not create volume ID longer than 32 bytes, options are %r",
sorted(tried, key=len),
)
volid = volid[:32]
if compose.conf["restricted_volid"]:
# Replace all non-alphanumeric characters and non-underscores) with

View File

@ -375,15 +375,15 @@ class TestVolumeIdGenerator(unittest.TestCase):
],
"image_volid_layered_product_formats": [],
"volume_id_substitutions": {},
"restricted_volid": False,
}
variant = mock.Mock(uid="Server", type="variant")
c = compose.Compose(conf, self.tmp_dir)
with self.assertRaises(ValueError) as ctx:
util.get_volid(c, "x86_64", variant, disc_type=False)
volid = util.get_volid(c, "x86_64", variant, disc_type=False)
self.assertEqual(len(volid), 32)
pass
self.assertIn("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", str(ctx.exception))
self.assertIn("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", str(ctx.exception))
@mock.patch("pungi.compose.ComposeInfo")
def test_apply_substitutions(self, ci):