Skip to content

Commit dc6b658

Browse files
committed
apply %pretrans transaction check in most subpackages
1 parent adce61f commit dc6b658

File tree

1 file changed

+42
-16
lines changed

1 file changed

+42
-16
lines changed

packaging/rpm/cvmfs-universal.spec

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
Summary: CernVM File System
7171
Name: cvmfs
7272
Version: 2.12.7
73-
Release: 1%{?dist}
73+
Release: 2%{?dist}
7474
URL: https://cernvm.cern.ch/fs/
7575
Source0: https://ecsft.cern.ch/dist/cvmfs/%{name}-%{version}/%{name}-%{version}.tar.gz
7676
%if 0%{?selinux_cvmfs}
@@ -358,23 +358,45 @@ popd
358358

359359
%if 0%{?el4}
360360
%else
361+
# apply this to all subpackages that need to stay in version sync
362+
%define check_transaction \
363+
[ -d "/var/spool/cvmfs" ] || exit 0; \
364+
[ -d "/etc/cvmfs/repositories.d/" ] || exit 0; \
365+
for repo in /var/spool/cvmfs/*; do \
366+
[ -d $repo ] && [ ! -f /etc/cvmfs/repositories.d/$(basename $repo)/replica.conf ] || continue; \
367+
if [ -f ${repo}/in_transaction.lock ] || \
368+
[ -d ${repo}/in_transaction ] || \
369+
[ -f ${repo}/in_transaction ]; then \
370+
echo " Found open CernVM-FS repository transactions." >&2; \
371+
echo " Please abort or publish them before updating CernVM-FS." >&2; \
372+
exit 1; \
373+
fi; \
374+
done
375+
376+
%pretrans
377+
%check_transaction
378+
379+
%pretrans libs
380+
%check_transaction
381+
382+
%pretrans fuse3
383+
%check_transaction
384+
385+
%pretrans devel
386+
%check_transaction
387+
361388
%pretrans server
362-
[ -d "/var/spool/cvmfs" ] || exit 0
363-
[ -d "/etc/cvmfs/repositories.d/" ] || exit 0
364-
365-
for repo in /var/spool/cvmfs/*; do
366-
[ -d $repo ] && [ ! -f /etc/cvmfs/repositories.d/$(basename $repo)/replica.conf ] || continue
367-
368-
if [ -f ${repo}/in_transaction.lock ] || \
369-
[ -d ${repo}/in_transaction ] || \
370-
[ -f ${repo}/in_transaction ]; then
371-
echo " Found open CernVM-FS repository transactions." >&2
372-
echo " Please abort or publish them before updating CernVM-FS." >&2
373-
exit 1
374-
fi
375-
done
389+
%check_transaction
390+
391+
%pretrans shrinkwrap
392+
%check_transaction
393+
394+
%pretrans unittests
395+
%check_transaction
396+
397+
%pretrans gateway
398+
%check_transaction
376399

377-
exit 0
378400
%endif
379401

380402
%pre
@@ -708,6 +730,10 @@ systemctl daemon-reload
708730
%endif
709731

710732
%changelog
733+
* Mon Mar 3 2025 Dave Dykstra <[email protected]>> - 2.12.7-2
734+
- Apply %pretrans transaction check to all subpackages that need to
735+
have their version stay in sync
736+
- Rename registry-webhook.py to registry_webhook.py to allow imports
711737
* Tue Nov 7 2023 Valentin Volkl <[email protected]> - 2.11.2
712738
- Rename registry-webhook.py to registry_webhook.py to allow imports
713739
* Wed Nov 16 2022 Jakob Blomer <[email protected]> - 2.11.0

0 commit comments

Comments
 (0)