Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
j-ogas committed Feb 12, 2024
1 parent eeec0b8 commit 6089473
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 40 deletions.
2 changes: 1 addition & 1 deletion packaging/fedora/build
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ rpmbuild root: %(rpmbuild)s
rpm_path = rpms[p][0]
rpm_ext = rpms[p][-1]
file = '%s/%s-%s.%s' % (rpm_path, p, rpm_vr, rpm_ext)
cmd(container, "rpm", "--install", file)
cmd(container, "rpm", "--install", "--force", file)
cmd(container, "rpm", "-qa", "charliecloud*")

# Lint RPMs and spec file. Last so problems that don’t result in program
Expand Down
30 changes: 19 additions & 11 deletions packaging/fedora/charliecloud.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BuildRequires: gcc rsync bash findutils
%if 0%{?el7}
Patch0: el7-pkgdir.patch
%endif
%if 0%{?fedora} > 36 || 0%{?rhel} > 8
%if 0%{!?el7} && 0%{!?el8}
Requires: fuse3 squashfuse
BuildRequires: fuse3-libs fuse3-devel squashfuse-devel
Patch1: no-squashfuse-rpath.patch
Expand All @@ -45,12 +45,13 @@ BuildRequires: python%{python3_pkgversion}-requests
Requires: %{name}
Requires: python3
Requires: python%{python3_pkgversion}-requests
# For some reason this expressio is not respected in centos_7ch; thus, we
# just specify any git.
%if 1%{?el7}

%if 0%{?el7}
Requires: git
#Requires: git >= 2.28.1
%else
Requires: git >= 2.28.1
%endif

Provides: bundled(python%{python3_pkgversion}-lark-parser) = 1.1.9

%description builder
Expand All @@ -69,7 +70,6 @@ Requires: python%{python3_pkgversion}-sphinx_rtd_theme
%description doc
Html and man page documentation for %{name}.

%if 1%{?el7}
%package test
Summary: Charliecloud test suite
License: ASL 2.0
Expand All @@ -78,7 +78,6 @@ Obsoletes: %{name}-test < %{version}-%{release}

%description test
Test fixtures for %{name}.
%endif

%prep
%setup -q
Expand All @@ -87,23 +86,24 @@ Test fixtures for %{name}.
%patch0 -p1
%endif

%if 0%{?fedora} > 36 || 0%{?rhel} > 8
%if 0%{!?el7}
%patch 1 -p1
%endif

%build
# Use old inlining behavior, see:
# https://github.com/hpc/charliecloud/issues/735
CFLAGS=${CFLAGS:-%optflags -fgnu89-inline}; export CFLAGS
# FIXME: use --disable test when https://github.com/hpc/charliecloud/issues/1836
# is resolved.
%configure --docdir=%{_pkgdocdir} \
--libdir=%{_prefix}/lib \
--with-python=/usr/bin/python3 \
%if 0%{?fedora} > 34 || 0%{?rhel} > 7
--with-libsquashfusei=/usr \
%endif
%if 0%{?el7}
--with-sphinx-build=%{_bindir}/sphinx-build-3.6
%else
--with-libsquashfusei=/usr \
--with-sphinx-build=%{_bindir}/sphinx-build
%endif

Expand Down Expand Up @@ -140,6 +140,13 @@ ln -s "${sphinxdir}/js" %{buildroot}%{_pkgdocdir}/html/_static/js
%{__rm} -f %{buildroot}%{_pkgdocdir}/LICENSE
%{__rm} -f %{buildroot}%{_pkgdocdir}/README.rst

# FIXME: unnecessary after #1836 is resolved
%if 0%{?el7}
%{__rm} -f %{buildroot}%{_bindir}/ch-test
%{__rm} -rf %{buildroot}%{_libexecdir}/%{name}
%{__rm} -f %{buildroot}%{_mandir}/man1/ch-test.1*
%endif

%files
%license LICENSE
%doc README.rst %{?el7:README.EL7}
Expand Down Expand Up @@ -183,8 +190,9 @@ ln -s "${sphinxdir}/js" %{buildroot}%{_pkgdocdir}/html/_static/js
%{_pkgdocdir}/html
%{?el7:%exclude %{_pkgdocdir}/examples/*/__pycache__}

%if 1%{?el7}
%files test
%if 0%{?el7}
%else
%{_bindir}/ch-test
%{_libexecdir}/%{name}
%{_mandir}/man1/ch-test.1*
Expand Down
74 changes: 46 additions & 28 deletions packaging/fedora/upstream.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- charliecloud.spec 2024-02-09 17:33:04.983698614 -0700
+++ upstream.spec 2024-02-09 14:32:41.000000000 -0700
@@ -10,16 +10,14 @@
--- packaging/fedora/charliecloud.spec 2024-02-12 11:46:23.034342881 -0700
+++ packaging/fedora/upstream.spec 2024-02-09 14:32:41.000000000 -0700
@@ -10,17 +10,15 @@
%{?el7:%global __python %__python3}

Name: charliecloud
Expand All @@ -16,30 +16,29 @@
-%if 0%{?el7}
Patch0: el7-pkgdir.patch
-%endif
%if 0%{?fedora} > 36 || 0%{?rhel} > 8
-%if 0%{!?el7} && 0%{!?el8}
+%if 0%{?fedora} > 36 || 0%{?rhel} > 8
Requires: fuse3 squashfuse
BuildRequires: fuse3-libs fuse3-devel squashfuse-devel
@@ -45,13 +43,11 @@
Patch1: no-squashfuse-rpath.patch
@@ -45,14 +43,11 @@
Requires: %{name}
Requires: python3
Requires: python%{python3_pkgversion}-requests
-# For some reason this expressio is not respected in centos_7ch; thus, we
-# just specify any git.
%if 1%{?el7}
-
-%if 0%{?el7}
-Requires: git
-#Requires: git >= 2.28.1
+Requires: git >= 2.28.1
-%else
+%if 1%{?el7}
Requires: git >= 2.28.1
%endif
-
Provides: bundled(python%{python3_pkgversion}-lark-parser) = 1.1.9
+%{?el7:BuildArch: noarch}

%description builder
This package provides ch-image, Charliecloud's completely unprivileged container
@@ -69,16 +65,14 @@
%description doc
Html and man page documentation for %{name}.

-%if 1%{?el7}
@@ -73,7 +68,7 @@
%package test
Summary: Charliecloud test suite
License: ASL 2.0
Expand All @@ -48,35 +47,54 @@
Obsoletes: %{name}-test < %{version}-%{release}

%description test
Test fixtures for %{name}.
-%endif

%prep
%setup -q
@@ -87,7 +81,7 @@
@@ -86,7 +81,7 @@
%patch0 -p1
%endif

-%if 0%{?fedora} > 36 || 0%{?rhel} > 8
-%if 0%{!?el7}
+%if 0%{?fedora} > 36
%patch 1 -p1
%endif

@@ -98,7 +92,7 @@
@@ -94,16 +89,15 @@
# Use old inlining behavior, see:
# https://github.com/hpc/charliecloud/issues/735
CFLAGS=${CFLAGS:-%optflags -fgnu89-inline}; export CFLAGS
-# FIXME: use --disable test when https://github.com/hpc/charliecloud/issues/1836
-# is resolved.
%configure --docdir=%{_pkgdocdir} \
--libdir=%{_prefix}/lib \
--with-python=/usr/bin/python3 \
-%if 0%{?fedora} > 34 || 0%{?rhel} > 7
+%if 0%{?fedora} > 34 || 0%{?rhel} > 8
--with-libsquashfusei=/usr \
%endif
+%endif
%if 0%{?el7}
@@ -183,13 +177,225 @@
%{_pkgdocdir}/html
--with-sphinx-build=%{_bindir}/sphinx-build-3.6
%else
- --with-libsquashfusei=/usr \
--with-sphinx-build=%{_bindir}/sphinx-build
%endif

@@ -140,13 +134,6 @@
%{__rm} -f %{buildroot}%{_pkgdocdir}/LICENSE
%{__rm} -f %{buildroot}%{_pkgdocdir}/README.rst

-# FIXME: unnecessary after #1836 is resolved
-%if 0%{?el7}
-%{__rm} -f %{buildroot}%{_bindir}/ch-test
-%{__rm} -rf %{buildroot}%{_libexecdir}/%{name}
-%{__rm} -f %{buildroot}%{_mandir}/man1/ch-test.1*
-%endif
-
%files
%license LICENSE
%doc README.rst %{?el7:README.EL7}
@@ -191,13 +178,224 @@
%{?el7:%exclude %{_pkgdocdir}/examples/*/__pycache__}

-%if 1%{?el7}
%files test
-%if 0%{?el7}
-%else
%{_bindir}/ch-test
%{_libexecdir}/%{name}
%{_mandir}/man1/ch-test.1*
Expand Down

0 comments on commit 6089473

Please sign in to comment.