Release 4.9.3
Merges: https://src.fedoraproject.org/rpms/pungi/pull-request/11 (cherry picked from commit e0a9959d1f7478a0357f76d8d31c96b9d8cda895)
This commit is contained in:
parent
e33373f74c
commit
e164c6ed14
122
1840.patch
122
1840.patch
@ -1,122 +0,0 @@
|
||||
From ab11e0e4a9e0b70e1b78399931d357f92f3a27aa Mon Sep 17 00:00:00 2001
|
||||
From: Lubomír Sedlář <lsedlar@redhat.com>
|
||||
Date: May 21 2025 13:45:18 +0000
|
||||
Subject: linker: Drop ability to link dirs recursively
|
||||
|
||||
|
||||
Nothing in the code base uses this functionality, and the semantins are
|
||||
not well defined anyway when it comes to symlinks.
|
||||
|
||||
Now the tests are failing in Python 3.14 rebuild when hardlinking
|
||||
symlinks. Rather than trying to fix the unused code, we could just drop
|
||||
it.
|
||||
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2367780
|
||||
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/pungi/linker.py b/pungi/linker.py
|
||||
index 0bcadc4..097e52b 100644
|
||||
--- a/pungi/linker.py
|
||||
+++ b/pungi/linker.py
|
||||
@@ -228,20 +228,7 @@ class Linker(kobo.log.LoggingBase):
|
||||
raise ValueError("Unknown link_type: %s" % link_type)
|
||||
|
||||
def link(self, src, dst, link_type="hardlink-or-copy"):
|
||||
- """Link directories recursively."""
|
||||
- if os.path.isfile(src) or os.path.islink(src):
|
||||
- self._link_file(src, dst, link_type)
|
||||
- return
|
||||
-
|
||||
- if os.path.isfile(dst):
|
||||
- raise OSError(errno.EEXIST, "File exists")
|
||||
-
|
||||
- if not self.test:
|
||||
- if not os.path.exists(dst):
|
||||
- makedirs(dst)
|
||||
- shutil.copystat(src, dst)
|
||||
+ if os.path.isdir(src):
|
||||
+ raise RuntimeError("Linking directories recursively is not supported")
|
||||
|
||||
- for i in os.listdir(src):
|
||||
- src_path = os.path.join(src, i)
|
||||
- dst_path = os.path.join(dst, i)
|
||||
- self.link(src_path, dst_path, link_type)
|
||||
+ self._link_file(src, dst, link_type)
|
||||
diff --git a/tests/test_linker.py b/tests/test_linker.py
|
||||
index 87c5a3c..7dcd74d 100644
|
||||
--- a/tests/test_linker.py
|
||||
+++ b/tests/test_linker.py
|
||||
@@ -280,70 +280,3 @@ class TestLinkerLink(TestLinkerBase):
|
||||
self.file2,
|
||||
link_type="hardlink-or-copy",
|
||||
)
|
||||
-
|
||||
- def test_link_dir_hardlink(self):
|
||||
- self.linker.link(self.src_dir, self.dst_dir, link_type="hardlink")
|
||||
- self.assertTrue(os.path.isfile(self.dst_file1))
|
||||
- self.assertTrue(self.same_inode(self.file1, self.dst_file1))
|
||||
- self.assertTrue(self.same_inode(self.file3, self.dst_file3))
|
||||
- self.assertSameStat(
|
||||
- os.path.dirname(self.file3), os.path.dirname(self.dst_file3)
|
||||
- )
|
||||
-
|
||||
- # always preserve symlinks
|
||||
- self.assertEqual(os.readlink(self.dst_symlink1), "../file1")
|
||||
- self.assertEqual(os.readlink(self.dst_symlink2), "subdir")
|
||||
- self.assertEqual(os.readlink(self.dst_symlink3), "does-not-exist")
|
||||
-
|
||||
- def test_link_dir_copy(self):
|
||||
- self.linker.link(self.src_dir, self.dst_dir, link_type="copy")
|
||||
- self.assertTrue(os.path.isfile(self.dst_file1))
|
||||
- self.assertFalse(self.same_inode(self.file1, self.dst_file1))
|
||||
- self.assertFalse(self.same_inode(self.file3, self.dst_file3))
|
||||
- self.assertSameStat(
|
||||
- os.path.dirname(self.file3), os.path.dirname(self.dst_file3)
|
||||
- )
|
||||
-
|
||||
- # always preserve symlinks
|
||||
- self.assertEqual(os.readlink(self.dst_symlink1), "../file1")
|
||||
- self.assertEqual(os.readlink(self.dst_symlink2), "subdir")
|
||||
- self.assertEqual(os.readlink(self.dst_symlink3), "does-not-exist")
|
||||
-
|
||||
- def test_link_dir_copy_test_mode(self):
|
||||
- # turn test mode on
|
||||
- self.linker = linker.Linker(logger=self.logger, test=True)
|
||||
- self.linker.link(self.src_dir, self.dst_dir, link_type="copy")
|
||||
-
|
||||
- # dst_dir should not even exist
|
||||
- self.assertFalse(os.path.isdir(self.dst_dir))
|
||||
-
|
||||
- def test_link_dir_symlink(self):
|
||||
- self.linker.link(self.src_dir, self.dst_dir, link_type="symlink")
|
||||
- self.assertTrue(os.path.isfile(self.dst_file1))
|
||||
- self.assertTrue(os.path.islink(self.dst_file1))
|
||||
- self.assertTrue(os.path.isdir(os.path.dirname(self.file3)))
|
||||
-
|
||||
- # always preserve symlinks
|
||||
- self.assertEqual(os.readlink(self.dst_symlink1), "../file1")
|
||||
- self.assertEqual(os.readlink(self.dst_symlink2), "subdir")
|
||||
- self.assertEqual(os.readlink(self.dst_symlink3), "does-not-exist")
|
||||
-
|
||||
- def test_link_dir_abspath_symlink(self):
|
||||
- self.linker.link(self.src_dir, self.dst_dir, link_type="abspath-symlink")
|
||||
- self.assertTrue(os.path.isfile(self.dst_file1))
|
||||
- self.assertTrue(os.path.islink(self.dst_file1))
|
||||
- self.assertEqual(os.readlink(self.dst_file1), self.file1)
|
||||
- self.assertSameStat(
|
||||
- os.path.dirname(self.file3), os.path.dirname(self.dst_file3)
|
||||
- )
|
||||
- self.assertTrue(os.path.isdir(os.path.dirname(self.file3)))
|
||||
-
|
||||
- # always preserve symlinks
|
||||
- self.assertEqual(os.readlink(self.dst_symlink1), "../file1")
|
||||
- self.assertEqual(os.readlink(self.dst_symlink2), "subdir")
|
||||
- self.assertEqual(os.readlink(self.dst_symlink3), "does-not-exist")
|
||||
-
|
||||
- def test_copy_preserve_hardlinks(self):
|
||||
- self.assertTrue(self.same_inode(self.file1, self.hardlink1))
|
||||
- self.linker.link(self.src_dir, self.dst_dir, link_type="copy")
|
||||
- self.assertTrue(self.same_inode(self.dst_file1, self.dst_hardlink1))
|
||||
|
27
pungi.spec
27
pungi.spec
@ -1,21 +1,17 @@
|
||||
%{?python_enable_dependency_generator}
|
||||
|
||||
Name: pungi
|
||||
Version: 4.9.2
|
||||
Release: 3%{?dist}.alma.1
|
||||
Version: 4.9.3
|
||||
Release: 1%{?dist}.alma.1
|
||||
Summary: Distribution compose tool
|
||||
|
||||
License: GPL-2.0-only
|
||||
URL: https://pagure.io/pungi
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Patch: https://pagure.io/pungi/pull-request/1840.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: python3-pytest
|
||||
# replaced by unittest.mock
|
||||
# BuildRequires: python3-mock
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-productmd >= 1.33
|
||||
BuildRequires: python3-kobo-rpmlib >= 0.18.0
|
||||
BuildRequires: createrepo_c >= 0.20.1
|
||||
@ -121,8 +117,11 @@ no guarantees about API stability.
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
cd doc
|
||||
make epub SPHINXBUILD=/usr/bin/sphinx-build-3
|
||||
make text SPHINXBUILD=/usr/bin/sphinx-build-3
|
||||
@ -130,7 +129,7 @@ make man SPHINXBUILD=/usr/bin/sphinx-build-3
|
||||
gzip _build/man/pungi.1
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install
|
||||
%{__install} -d %{buildroot}/var/cache/pungi/createrepo_c
|
||||
%{__install} -d %{buildroot}%{_mandir}/man1
|
||||
%{__install} -m 0644 doc/_build/man/pungi.1.gz %{buildroot}%{_mandir}/man1
|
||||
@ -152,13 +151,13 @@ gzip _build/man/pungi.1
|
||||
%{_bindir}/%{name}-make-ostree
|
||||
%{_mandir}/man1/pungi.1.gz
|
||||
%{_datadir}/pungi
|
||||
%{_localstatedir}/cache/pungi
|
||||
%dir %{_localstatedir}/cache/pungi
|
||||
%dir %attr(1777, root, root) %{_localstatedir}/cache/pungi/createrepo_c
|
||||
%{_tmpfilesdir}/pungi-clean-cache.conf
|
||||
|
||||
%files -n python3-%{name}
|
||||
%{python3_sitelib}/%{name}
|
||||
%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info
|
||||
%{python3_sitelib}/%{name}-%{version}.dist-info
|
||||
|
||||
%files utils
|
||||
%{python3_sitelib}/%{name}_utils
|
||||
@ -173,6 +172,14 @@ gzip _build/man/pungi.1
|
||||
%{_bindir}/%{name}-cache-cleanup
|
||||
|
||||
%changelog
|
||||
* Thu Jun 12 2025 Lubomír Sedlář <lsedlar@redhat.com> - 4.9.3-1
|
||||
- Recognize wsl2 images produced by koji (lsedlar)
|
||||
- Specify data_files with relative paths (lsedlar)
|
||||
- Crossreference `koji_cache` from the Koji cache page (ahills)
|
||||
- Add documentation for `koji_cache` configuration (ahills)
|
||||
- Record exceptions for top level OTel span (lsedlar)
|
||||
- Update spec to match current python packaging guidelines
|
||||
|
||||
* Wed Jun 04 2025 Python Maint <python-maint@redhat.com> - 4.9.2-3
|
||||
- Rebuilt for Python 3.14
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (pungi-4.9.2.tar.bz2) = dce9c51f8c9a7441e6182e81120cf4cb770ece5b840a96359cefa709576578960efe1eb983feb88bd92e3cb98414bc29b49b631c11b2bd1adc1ea30aa671a31c
|
||||
SHA512 (pungi-4.9.3.tar.bz2) = ec86c61d28e6927fd2a8bb2655efcd2e1774aed95e2e0bf92e30525e25ec7322bea8589c2dcf610d9ba1db9dd002d5e5d4152e41e45e110253bf14b63af32428
|
||||
|
Loading…
Reference in New Issue
Block a user