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

Commit 6089473

Browse files
committed
tidy
1 parent eeec0b8 commit 6089473

File tree

3 files changed

+66
-40
lines changed

3 files changed

+66
-40
lines changed

packaging/fedora/build

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ rpmbuild root: %(rpmbuild)s
204204
rpm_path = rpms[p][0]
205205
rpm_ext = rpms[p][-1]
206206
file = '%s/%s-%s.%s' % (rpm_path, p, rpm_vr, rpm_ext)
207-
cmd(container, "rpm", "--install", file)
207+
cmd(container, "rpm", "--install", "--force", file)
208208
cmd(container, "rpm", "-qa", "charliecloud*")
209209

210210
# Lint RPMs and spec file. Last so problems that don’t result in program

packaging/fedora/charliecloud.spec

+19-11
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BuildRequires: gcc rsync bash findutils
2020
%if 0%{?el7}
2121
Patch0: el7-pkgdir.patch
2222
%endif
23-
%if 0%{?fedora} > 36 || 0%{?rhel} > 8
23+
%if 0%{!?el7} && 0%{!?el8}
2424
Requires: fuse3 squashfuse
2525
BuildRequires: fuse3-libs fuse3-devel squashfuse-devel
2626
Patch1: no-squashfuse-rpath.patch
@@ -45,12 +45,13 @@ BuildRequires: python%{python3_pkgversion}-requests
4545
Requires: %{name}
4646
Requires: python3
4747
Requires: python%{python3_pkgversion}-requests
48-
# For some reason this expressio is not respected in centos_7ch; thus, we
49-
# just specify any git.
50-
%if 1%{?el7}
48+
49+
%if 0%{?el7}
5150
Requires: git
52-
#Requires: git >= 2.28.1
51+
%else
52+
Requires: git >= 2.28.1
5353
%endif
54+
5455
Provides: bundled(python%{python3_pkgversion}-lark-parser) = 1.1.9
5556

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

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

7979
%description test
8080
Test fixtures for %{name}.
81-
%endif
8281

8382
%prep
8483
%setup -q
@@ -87,23 +86,24 @@ Test fixtures for %{name}.
8786
%patch0 -p1
8887
%endif
8988

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

9493
%build
9594
# Use old inlining behavior, see:
9695
# https://github.com/hpc/charliecloud/issues/735
9796
CFLAGS=${CFLAGS:-%optflags -fgnu89-inline}; export CFLAGS
97+
# FIXME: use --disable test when https://github.com/hpc/charliecloud/issues/1836
98+
# is resolved.
9899
%configure --docdir=%{_pkgdocdir} \
99100
--libdir=%{_prefix}/lib \
100101
--with-python=/usr/bin/python3 \
101-
%if 0%{?fedora} > 34 || 0%{?rhel} > 7
102102
--with-libsquashfusei=/usr \
103-
%endif
104103
%if 0%{?el7}
105104
--with-sphinx-build=%{_bindir}/sphinx-build-3.6
106105
%else
106+
--with-libsquashfusei=/usr \
107107
--with-sphinx-build=%{_bindir}/sphinx-build
108108
%endif
109109

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

143+
# FIXME: unnecessary after #1836 is resolved
144+
%if 0%{?el7}
145+
%{__rm} -f %{buildroot}%{_bindir}/ch-test
146+
%{__rm} -rf %{buildroot}%{_libexecdir}/%{name}
147+
%{__rm} -f %{buildroot}%{_mandir}/man1/ch-test.1*
148+
%endif
149+
143150
%files
144151
%license LICENSE
145152
%doc README.rst %{?el7:README.EL7}
@@ -183,8 +190,9 @@ ln -s "${sphinxdir}/js" %{buildroot}%{_pkgdocdir}/html/_static/js
183190
%{_pkgdocdir}/html
184191
%{?el7:%exclude %{_pkgdocdir}/examples/*/__pycache__}
185192

186-
%if 1%{?el7}
187193
%files test
194+
%if 0%{?el7}
195+
%else
188196
%{_bindir}/ch-test
189197
%{_libexecdir}/%{name}
190198
%{_mandir}/man1/ch-test.1*

packaging/fedora/upstream.diff

+46-28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- charliecloud.spec 2024-02-09 17:33:04.983698614 -0700
2-
+++ upstream.spec 2024-02-09 14:32:41.000000000 -0700
3-
@@ -10,16 +10,14 @@
1+
--- packaging/fedora/charliecloud.spec 2024-02-12 11:46:23.034342881 -0700
2+
+++ packaging/fedora/upstream.spec 2024-02-09 14:32:41.000000000 -0700
3+
@@ -10,17 +10,15 @@
44
%{?el7:%global __python %__python3}
55

66
Name: charliecloud
@@ -16,30 +16,29 @@
1616
-%if 0%{?el7}
1717
Patch0: el7-pkgdir.patch
1818
-%endif
19-
%if 0%{?fedora} > 36 || 0%{?rhel} > 8
19+
-%if 0%{!?el7} && 0%{!?el8}
20+
+%if 0%{?fedora} > 36 || 0%{?rhel} > 8
2021
Requires: fuse3 squashfuse
2122
BuildRequires: fuse3-libs fuse3-devel squashfuse-devel
22-
@@ -45,13 +43,11 @@
23+
Patch1: no-squashfuse-rpath.patch
24+
@@ -45,14 +43,11 @@
2325
Requires: %{name}
2426
Requires: python3
2527
Requires: python%{python3_pkgversion}-requests
26-
-# For some reason this expressio is not respected in centos_7ch; thus, we
27-
-# just specify any git.
28-
%if 1%{?el7}
28+
-
29+
-%if 0%{?el7}
2930
-Requires: git
30-
-#Requires: git >= 2.28.1
31-
+Requires: git >= 2.28.1
31+
-%else
32+
+%if 1%{?el7}
33+
Requires: git >= 2.28.1
3234
%endif
35+
-
3336
Provides: bundled(python%{python3_pkgversion}-lark-parser) = 1.1.9
3437
+%{?el7:BuildArch: noarch}
3538

3639
%description builder
3740
This package provides ch-image, Charliecloud's completely unprivileged container
38-
@@ -69,16 +65,14 @@
39-
%description doc
40-
Html and man page documentation for %{name}.
41-
42-
-%if 1%{?el7}
41+
@@ -73,7 +68,7 @@
4342
%package test
4443
Summary: Charliecloud test suite
4544
License: ASL 2.0
@@ -48,35 +47,54 @@
4847
Obsoletes: %{name}-test < %{version}-%{release}
4948

5049
%description test
51-
Test fixtures for %{name}.
52-
-%endif
53-
54-
%prep
55-
%setup -q
56-
@@ -87,7 +81,7 @@
50+
@@ -86,7 +81,7 @@
5751
%patch0 -p1
5852
%endif
5953

60-
-%if 0%{?fedora} > 36 || 0%{?rhel} > 8
54+
-%if 0%{!?el7}
6155
+%if 0%{?fedora} > 36
6256
%patch 1 -p1
6357
%endif
6458

65-
@@ -98,7 +92,7 @@
59+
@@ -94,16 +89,15 @@
60+
# Use old inlining behavior, see:
61+
# https://github.com/hpc/charliecloud/issues/735
62+
CFLAGS=${CFLAGS:-%optflags -fgnu89-inline}; export CFLAGS
63+
-# FIXME: use --disable test when https://github.com/hpc/charliecloud/issues/1836
64+
-# is resolved.
6665
%configure --docdir=%{_pkgdocdir} \
6766
--libdir=%{_prefix}/lib \
6867
--with-python=/usr/bin/python3 \
69-
-%if 0%{?fedora} > 34 || 0%{?rhel} > 7
7068
+%if 0%{?fedora} > 34 || 0%{?rhel} > 8
7169
--with-libsquashfusei=/usr \
72-
%endif
70+
+%endif
7371
%if 0%{?el7}
74-
@@ -183,13 +177,225 @@
75-
%{_pkgdocdir}/html
72+
--with-sphinx-build=%{_bindir}/sphinx-build-3.6
73+
%else
74+
- --with-libsquashfusei=/usr \
75+
--with-sphinx-build=%{_bindir}/sphinx-build
76+
%endif
77+
78+
@@ -140,13 +134,6 @@
79+
%{__rm} -f %{buildroot}%{_pkgdocdir}/LICENSE
80+
%{__rm} -f %{buildroot}%{_pkgdocdir}/README.rst
81+
82+
-# FIXME: unnecessary after #1836 is resolved
83+
-%if 0%{?el7}
84+
-%{__rm} -f %{buildroot}%{_bindir}/ch-test
85+
-%{__rm} -rf %{buildroot}%{_libexecdir}/%{name}
86+
-%{__rm} -f %{buildroot}%{_mandir}/man1/ch-test.1*
87+
-%endif
88+
-
89+
%files
90+
%license LICENSE
91+
%doc README.rst %{?el7:README.EL7}
92+
@@ -191,13 +178,224 @@
7693
%{?el7:%exclude %{_pkgdocdir}/examples/*/__pycache__}
7794

78-
-%if 1%{?el7}
7995
%files test
96+
-%if 0%{?el7}
97+
-%else
8098
%{_bindir}/ch-test
8199
%{_libexecdir}/%{name}
82100
%{_mandir}/man1/ch-test.1*

0 commit comments

Comments
 (0)