diff --git a/packaging/fedora/build b/packaging/fedora/build index fb75e67cc..dfcd0c84d 100755 --- a/packaging/fedora/build +++ b/packaging/fedora/build @@ -181,6 +181,8 @@ rpmbuild root: %(rpmbuild)s 'charliecloud-test': [rpms_arch, '%s.%s.rpm' % (rpms_dist, ARCH)]} rpm_specs = "/usr/local/src/SPECS" rpm_sources = "/usr/local/src/SOURCES" + # Map el# to rhel# to avoid unresolved macro errors. + rpmbuild_args += ["--define", "rhel " % rpm_dist[-1]] rpmbuild_args += ["--define", "_topdir /usr/local/src"] rpmlint_args += ["--file", "%s/charliecloud.rpmlintrc" % rpm_specs] container += [CH_BASE + "/bin/ch-run", "-w", diff --git a/packaging/fedora/charliecloud.spec b/packaging/fedora/charliecloud.spec index 604f290f1..0a3df4dc1 100644 --- a/packaging/fedora/charliecloud.spec +++ b/packaging/fedora/charliecloud.spec @@ -17,8 +17,13 @@ License: ASL 2.0 URL: https://hpc.github.io/%{name}/ Source0: https://github.com/hpc/%{name}/releases/downloads/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc rsync bash -Requires: squashfuse squashfs-tools -Patch1: el7-pkgdir.patch +Requires: squashfuse squashfs-tools findutils +Patch0: el7-pkgdir.patch +%if 0%{?fedora} > 36 || 0%{?rhel} > 8 +BuildRequires: fuse3 fuse3-libs fuse3-devel squashfuse-devel +Requires: fuse3-libs squashfuse +Patch1: no-rpath.patch +%endif %description Charliecloud uses Linux user namespaces to run containers with no privileged @@ -34,15 +39,18 @@ For more information: https://hpc.github.io/charliecloud %package builder Summary: Charliecloud container image building tools License: ASL 2.0 and MIT -BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python%{python3_pkgversion}-lark-parser BuildRequires: python%{python3_pkgversion}-requests Requires: %{name} Requires: python3 -Requires: python%{python3_pkgversion}-lark-parser Requires: python%{python3_pkgversion}-requests -Provides: bundled(python%{python3_pkgversion}-lark-parser) = 1.1.9 +Provides: bundled(python%{python3_pkgversion}-lark-parser) = 0.11.3 +%if 0%{?fedora} > 34 || 0%{?rhel} > 8 +Requires: git >= 2.28.1 +%endif +%{?el7:BuildArch: noarch} +%{?el8:Requires: git >= 2.28.1} +%{?el9:Requires: git >= 2.28.1} %description builder This package provides ch-image, Charliecloud's completely unprivileged container @@ -73,7 +81,13 @@ Test fixtures for %{name}. %setup -q %if 0%{?el7} -%patch1 -p1 +# el7 mock builds use "%patchN". +%patch0 -p1 +%endif + +%if 0%{?fedora} > 36 +# fedora/rhel use "%patch N". +%patch 1 -p1 %endif %build @@ -165,7 +179,6 @@ ln -s "${sphinxdir}/js" %{buildroot}%{_pkgdocdir}/html/_static/js %{_pkgdocdir}/html %{?el7:%exclude %{_pkgdocdir}/examples/*/__pycache__} - %files test %{_bindir}/ch-test %{_libexecdir}/%{name} diff --git a/packaging/fedora/el7-pkgdir.patch b/packaging/fedora/el7-pkgdir.patch index 1dee3889a..ccc8bf2d2 100644 --- a/packaging/fedora/el7-pkgdir.patch +++ b/packaging/fedora/el7-pkgdir.patch @@ -1,7 +1,6 @@ -diff -ru charliecloud/bin/ch-test charliecloud-lib/bin/ch-test ---- charliecloud/bin/ch-test 2020-04-07 12:19:37.054609706 -0600 -+++ charliecloud-lib/bin/ch-test 2020-04-15 16:36:55.128831767 -0600 -@@ -662,7 +662,7 @@ +--- charliecloud-0.32/bin/ch-test 2023-03-22 17:36:46.000000000 -0400 ++++ charliecloud-0.32.patch/bin/ch-test 2023-04-03 10:51:53.677205658 -0400 +@@ -767,7 +767,7 @@ CHTEST_INSTALLED=yes CHTEST_GITWD= CHTEST_DIR=${ch_base}/libexec/charliecloud/test diff --git a/packaging/fedora/no-rpath.patch b/packaging/fedora/no-rpath.patch new file mode 100644 index 000000000..e6ea132db --- /dev/null +++ b/packaging/fedora/no-rpath.patch @@ -0,0 +1,11 @@ +--- charliecloud-0.32/configure 2023-03-24 18:49:49.000000000 -0400 ++++ charliecloud-0.32.patch/configure 2023-04-03 09:55:31.756259159 -0400 +@@ -5880,7 +5880,7 @@ + else + rpath_libsquashfuse= + fi +- CH_RUN_LIBS="-lsquashfuse_ll -lfuse3 $rpath_libsquashfuse $CH_RUN_LIBS" ++ CH_RUN_LIBS="-lsquashfuse_ll -lfuse3 $CH_RUN_LIBS" + else + have_libsquashfuse=no + fi diff --git a/packaging/fedora/printf.patch b/packaging/fedora/printf.patch deleted file mode 100644 index cd6536d01..000000000 --- a/packaging/fedora/printf.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur charliecloud/bin/ch_misc.c charliecloud-patch/bin/ch_misc.c ---- charliecloud/bin/ch_misc.c 2022-01-24 13:12:23.980046774 -0500 -+++ charliecloud-patch/bin/ch_misc.c 2022-01-24 13:25:34.854133321 -0500 -@@ -252,7 +252,7 @@ - if (path == NULL) { - T_ (where = strdup(line)); - } else { -- T_ (1 <= asprintf(&where, "%s:%lu", path, lineno)); -+ T_ (1 <= asprintf(&where, "%s:%zu", path, lineno)); - } - - // Split line into variable name and value. diff --git a/packaging/fedora/upstream.spec b/packaging/fedora/upstream.spec index 2c18743cd..cf63544e6 100644 --- a/packaging/fedora/upstream.spec +++ b/packaging/fedora/upstream.spec @@ -10,16 +10,20 @@ %{?el7:%global __python %__python3} Name: charliecloud -Version: 0.26 -Release: 1%{?dist} +Version: 0.32 +Release: 2%{?dist} Summary: Lightweight user-defined software stacks for high-performance computing License: ASL 2.0 URL: https://hpc.github.io/%{name}/ Source0: https://github.com/hpc/%{name}/releases/downloads/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc rsync bash -Requires: squashfuse squashfs-tools -Patch1: el7-pkgdir.patch -Patch2: printf.patch +Requires: squashfuse squashfs-tools findutils +Patch0: el7-pkgdir.patch +%if 0%{?fedora} > 36 || 0%{?rhel} > 8 +BuildRequires: fuse3 fuse3-libs fuse3-devel squashfuse-devel +Requires: fuse3-libs squashfuse +Patch1: no-rpath.patch +%endif %description Charliecloud uses Linux user namespaces to run containers with no privileged @@ -35,15 +39,18 @@ For more information: https://hpc.github.io/charliecloud %package builder Summary: Charliecloud container image building tools License: ASL 2.0 and MIT -BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python%{python3_pkgversion}-lark-parser BuildRequires: python%{python3_pkgversion}-requests Requires: %{name} Requires: python3 -Requires: python%{python3_pkgversion}-lark-parser Requires: python%{python3_pkgversion}-requests Provides: bundled(python%{python3_pkgversion}-lark-parser) = 0.11.3 +%if 0%{?fedora} > 34 || 0%{?rhel} > 8 +Requires: git >= 2.28.1 +%endif +%{?el7:BuildArch: noarch} +%{?el8:Requires: git >= 2.28.1} +%{?el9:Requires: git >= 2.28.1} %description builder This package provides ch-image, Charliecloud's completely unprivileged container @@ -74,10 +81,12 @@ Test fixtures for %{name}. %setup -q %if 0%{?el7} -%patch1 -p1 +%patch0 -p1 %endif -%patch2 -p1 +%if 0%{?fedora} > 36 +%patch 1 -p1 +%endif %build # Use old inlining behavior, see: @@ -148,14 +157,18 @@ ln -s "${sphinxdir}/js" %{buildroot}%{_pkgdocdir}/html/_static/js %{_bindir}/ch-image %{_mandir}/man1/ch-image.1* %{_prefix}/lib/%{name}/build.py +%{_prefix}/lib/%{name}/build_cache.py %{_prefix}/lib/%{name}/charliecloud.py -%{_prefix}/lib/%{name}/fakeroot.py +%{_prefix}/lib/%{name}/filesystem.py +%{_prefix}/lib/%{name}/force.py +%{_prefix}/lib/%{name}/image.py %{_prefix}/lib/%{name}/lark %{_prefix}/lib/%{name}/lark-1.1.8.dist-info %{_prefix}/lib/%{name}/lark-stubs %{_prefix}/lib/%{name}/misc.py %{_prefix}/lib/%{name}/pull.py %{_prefix}/lib/%{name}/push.py +%{_prefix}/lib/%{name}/registry.py %{_prefix}/lib/%{name}/version.py %{?el7:%{_prefix}/lib/%{name}/__pycache__} @@ -171,7 +184,24 @@ ln -s "${sphinxdir}/js" %{buildroot}%{_pkgdocdir}/html/_static/js %{_mandir}/man1/ch-test.1* %changelog -* Mon Jan 24 2022 Jordan Ogas 0.32-2 +- fix macro conditionals + +* Fri Mar 31 2023 Jordan Ogas 0.32-1 +- edit el7 patch: update ch-test path +- add patch: prevent rpath of standard path +- update builder package files +- add dependency: findutils +- add conditional dependencies: fuse3, squashfuse-devel, & git +- new version 0.32 + +* Wed Jan 18 2023 Fedora Release Engineering - 0.26-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jul 20 2022 Fedora Release Engineering - 0.26-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jan 24 2022 Jordan Ogas 0.26-1 - add printf patch for 32-bit - add ch-convert script - new version 0.26 @@ -179,7 +209,7 @@ ln -s "${sphinxdir}/js" %{buildroot}%{_pkgdocdir}/html/_static/js * Wed Jan 19 2022 Fedora Release Engineering - 0.25-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild -* Mon Sep 20 2021 Jordan Ogas 0.25-1 - bundle python lark parser - new version @@ -355,3 +385,4 @@ ln -s "${sphinxdir}/js" %{buildroot}%{_pkgdocdir}/html/_static/js * Thu Mar 14 2019 0.9.8-1 - Add initial Fedora/EPEL package +