Skip to content

Commit 493d03b

Browse files
authored
Merge pull request #26 from DrDaveD/add-fedora
add Fedora 41 & 42 and AlmaLinux 10
2 parents 81d2a1d + 878b9e3 commit 493d03b

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

rpm/cvmfs-contrib-release.spec

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: cvmfs-contrib-release
2-
Version: 1.20
2+
Version: 1.21
33
# The release_prefix macro is used in the OBS prjconf, don't change its name
44
%define release_prefix 1
55
# %{?dist} is left off intentionally; this rpm works on multiple OS releases
@@ -42,16 +42,20 @@ install -pm 644 obs-signing-key.pub \
4242
# be used, so can't use $releasevar inside .repo file.
4343
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
4444
mkdir -p $RPM_BUILD_ROOT%{_datarootdir}/%{name}
45-
for RHEL in 7 8 9; do
45+
for OSNUM in 7 8 9 10 41 42; do
4646
# make it mode 444 so hopefully admins won't accidentally edit it
4747
# without breaking the symlink and making a copy
48-
if [ $RHEL = 7 ]; then
48+
DIST="el$OSNUM"
49+
if [ $OSNUM = 7 ]; then
4950
DISTRO=CentOS
51+
elif [ "$OSNUM" -gt 40 ]; then
52+
DISTRO=Fedora
53+
DIST=fedora$OSNUM
5054
else
5155
DISTRO=AlmaLinux
5256
fi
53-
bash -c "install -m 444 <(sed -e s/{distro}/$DISTRO/ -e s/{rhel}/$RHEL/ rpm/cvmfs-contrib.repo.in) \
54-
$RPM_BUILD_ROOT%{_datarootdir}/%{name}/cvmfs-contrib-el$RHEL.repo"
57+
bash -c "install -m 444 <(sed -e s/{distro}/$DISTRO/ -e s/{osnum}/$OSNUM/ rpm/cvmfs-contrib.repo.in) \
58+
$RPM_BUILD_ROOT%{_datarootdir}/%{name}/cvmfs-contrib-$DIST.repo"
5559
done
5660
# this is just because a default is needed for %ghost files; the real
5761
# one is installed in the %post rule
@@ -74,15 +78,23 @@ if [ -L $REPO ]; then
7478
fi
7579
if [ ! -e $REPO ]; then
7680
. /etc/os-release
77-
EL="`echo $VERSION_ID|cut -d. -f1`"
78-
if [ -z "$EL" ]; then
81+
OSNUM="`echo $VERSION_ID|cut -d. -f1`"
82+
if [ -z "$OSNUM" ]; then
7983
echo "Could not find OS version from /etc/os-release" >&2
8084
exit 2
8185
fi
82-
ln -s %{_datarootdir}/%{name}/cvmfs-contrib-el$EL.repo %{_sysconfdir}/yum.repos.d/cvmfs-contrib.repo
86+
if [[ "$NAME" == *Fedora* ]]; then
87+
DIST="fedora$OSNUM"
88+
else
89+
DIST="el$OSNUM"
90+
fi
91+
ln -s %{_datarootdir}/%{name}/cvmfs-contrib-$DIST.repo %{_sysconfdir}/yum.repos.d/cvmfs-contrib.repo
8392
fi
8493

8594
%changelog
95+
* Tue Sep 2 2025 Dave Dykstra <dwd@fnal.gov> - 1.21-1
96+
- Add support for AlmaLinux 10 and Fedora 41 and 42.
97+
8698
* Wed Mar 20 2024 Dave Dykstra <dwd@fnal.gov> - 1.20-1
8799
- Replace expired gpg key. This one expires 2026-05-29. It was extended
88100
with the command "osc signkey --extend home:cvmfs", downloaded with

rpm/cvmfs-contrib.repo.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@
44
[cvmfs-contrib]
55
name=CernVM Filesystem Contributions
66
type=rpm-md
7-
# browsable alternate at http://download.opensuse.org/repositories/home:/cvmfs:/contrib/{distro}_{rhel}/
8-
baseurl=http://downloadcontent.opensuse.org/repositories/home:/cvmfs:/contrib/{distro}_{rhel}/
7+
# browsable alternate at http://download.opensuse.org/repositories/home:/cvmfs:/contrib/{distro}_{osnum}/
8+
baseurl=http://downloadcontent.opensuse.org/repositories/home:/cvmfs:/contrib/{distro}_{osnum}/
99
gpgcheck=1
1010
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CVMFS-CONTRIB
1111
enabled=1
1212

1313
[cvmfs-contrib-testing]
1414
name=CernVM Filesystem Contributions testing
1515
type=rpm-md
16-
# browsable alternate at http://download.opensuse.org/repositories/home:/cvmfs:/contrib-testing/{distro}_{rhel}/
17-
baseurl=http://downloadcontent.opensuse.org/repositories/home:/cvmfs:/contrib-testing/{distro}_{rhel}/
16+
# browsable alternate at http://download.opensuse.org/repositories/home:/cvmfs:/contrib-testing/{distro}_{osnum}/
17+
baseurl=http://downloadcontent.opensuse.org/repositories/home:/cvmfs:/contrib-testing/{distro}_{osnum}/
1818
gpgcheck=1
1919
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CVMFS-CONTRIB
2020
enabled=0
2121

2222
[cvmfs-contrib-egi]
2323
name=CernVM Filesystem Contributions for EGI
2424
type=rpm-md
25-
# browsable alternate at http://download.opensuse.org/repositories/home:/cvmfs:/contrib-egi/{distro}_{rhel}/
26-
baseurl=http://downloadcontent.opensuse.org/repositories/home:/cvmfs:/contrib-egi/{distro}_{rhel}/
25+
# browsable alternate at http://download.opensuse.org/repositories/home:/cvmfs:/contrib-egi/{distro}_{osnum}/
26+
baseurl=http://downloadcontent.opensuse.org/repositories/home:/cvmfs:/contrib-egi/{distro}_{osnum}/
2727
gpgcheck=1
2828
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CVMFS-CONTRIB
2929
enabled=0
3030

3131
[cvmfs-contrib-egi-testing]
3232
name=CernVM Filesystem Contributions for EGI testing
3333
type=rpm-md
34-
# browsable alternate at http://download.opensuse.org/repositories/home:/cvmfs:/contrib-egi-testing/{distro}_{rhel}/
35-
baseurl=http://downloadcontent.opensuse.org/repositories/home:/cvmfs:/contrib-egi-testing/{distro}_{rhel}/
34+
# browsable alternate at http://download.opensuse.org/repositories/home:/cvmfs:/contrib-egi-testing/{distro}_{osnum}/
35+
baseurl=http://downloadcontent.opensuse.org/repositories/home:/cvmfs:/contrib-egi-testing/{distro}_{osnum}/
3636
gpgcheck=1
3737
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CVMFS-CONTRIB
3838
enabled=0

0 commit comments

Comments
 (0)