Skip to content

Commit

Permalink
Clean up debian packaging post ubuntu18.04 (cvmfs#3719)
Browse files Browse the repository at this point in the history
Dropping ubuntu18.04 makes a few workarounds and manual tweaks to control obsolete - mostly python3.
The logic of having python2 as default, and replacing it with python3 meant that all new distributions have to be added manually to this script, which is very cumbersome, this avoids that.
  • Loading branch information
vvolkl committed Dec 6, 2024
1 parent b134849 commit 824c122
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 52 deletions.
44 changes: 5 additions & 39 deletions ci/cvmfs/deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,50 +50,16 @@ echo "copy packaging meta information and get in place..."
cp -r ${CVMFS_SOURCE_LOCATION}/packaging/debian/cvmfs ${copied_source}/debian
cd $copied_source

# Configure control file
mv debian/control.in debian/control
echo "Debian release: $(lsb_release -sc)"
# On Ubuntu 18.04 Bionic, the insserv and initscripts packages are no longer
# available. They should be removed from the list of dependencies
if [ x"$(lsb_release -sc)" = x"bionic" ]; then
sed -i -e "s/insserv, initscripts, //g" debian/control
fi
# Fuse3 is only available as of Debian 10 "buster" and Ubuntu 20.04
if [ x"$(lsb_release -sc)" = x"bullseye" -o \
x"$(lsb_release -sc)" = x"buster" -o \
x"$(lsb_release -sc)" = x"bookworm" -o \
x"$(lsb_release -sc)" = x"focal" -o \
x"$(lsb_release -sc)" = x"noble" -o \
x"$(lsb_release -sc)" = x"jammy" ]; then
sed -i -e "s/^Build-Depends:/Build-Depends: libfuse3-dev,/g" debian/control
sed -i -e "s/^Recommends:/Recommends: cvmfs-fuse3,/g" debian/control
else
cat debian/control | awk '/#FUSE3-BEGIN/{flag=1;next}/#FUSE3-END/{flag=0;next}!flag' > debian/control.tmp
mv debian/control.tmp debian/control
fi
# Depend on python3-dev instead of python-dev on Ubuntu 22.04
if [ x"$(lsb_release -sc)" = x"jammy" ]; then
sed -i -e "s/python/python3/g" debian/control
fi
# Depend on python3-* instead of python-* on debian12
if [ x"$(lsb_release -sc)" = x"bookworm" ]; then
sed -i -e "s/python/python3/g" debian/control
fi
# Depend on python3-* instead of python-* on Ubuntu 24.04
if [ x"$(lsb_release -sc)" = x"noble" ]; then
sed -i -e "s/python/python3/g" debian/control
fi
# The cvmfs-gateway requires a go compiler
if ! go version >/dev/null 2>&1; then
cat debian/control | awk '/#GATEWAY-BEGIN/{flag=1;next}/#GATEWAY-END/{flag=0;next}!flag' > debian/control.tmp
mv debian/control.tmp debian/control
fi

cpu_cores=$(get_number_of_cpu_cores)
echo "do the build (with $cpu_cores cores)..."
dch -v $cvmfs_version -M "bumped upstream version number"
# -us -uc == skip signing
DEB_BUILD_OPTIONS=parallel=$cpu_cores debuild --prepend-path=/usr/local/go/bin \
DEBUILD_ARGS=""
if [ x"$CVMFS_LINT_PKG" = x ]; then
DEBUILD_ARGS="--no-lintian"
fi
DEB_BUILD_OPTIONS=parallel=$cpu_cores debuild ${DEBUILD_ARGS} --prepend-path=/usr/local/go/bin \
-us -uc
cd ${CVMFS_RESULT_LOCATION}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ Source: cvmfs
Section: utils
Priority: extra
Maintainer: Jakob Blomer <[email protected]>
Build-Depends: debhelper (>= 9), autotools-dev, cmake, cpio, libcap-dev, libssl-dev, libfuse-dev, pkg-config, libattr1-dev, patch, python-dev, python-setuptools, unzip, uuid-dev, valgrind, libz-dev
Build-Depends: libfuse3-dev, debhelper (>= 9), autotools-dev, cmake, cpio, libcap-dev, libssl-dev, libfuse-dev, pkg-config, libattr1-dev, patch, python3-dev, python3-setuptools, unzip, uuid-dev, valgrind, libz-dev
Standards-Version: 3.9.6.1
Homepage: http://cernvm.cern.ch/portal/filesystem

Package: cvmfs
Architecture: i386 amd64 armhf arm64
Architecture: amd64 armhf arm64
#Pre-Depends: ${misc:Pre-Depends} (preparation for multiarch support)
Depends: cvmfs-config-default | cvmfs-config, gawk, psmisc, lsof, autofs, fuse, curl, attr, libfuse2, zlib1g, gdb, uuid-dev, uuid, adduser, cvmfs-libs (= ${binary:Version}), ${misc:Depends}
Recommends: autofs (>= 5.1.2)
Recommends: cvmfs-fuse3, autofs (>= 5.1.2)
#Multi-Arch: same (preparation for multiarch support)
Homepage: http://cernvm.cern.ch
Description: CernVM File System
HTTP File System for Distributing Software to CernVM.

Package: cvmfs-libs
Architecture: i386 amd64 armhf arm64
Architecture: amd64 armhf arm64
#Pre-Depends: ${misc:Pre-Depends} (preparation for multiarch support)
Depends: ${misc:Depends}
#Multi-Arch: same (preparation for multiarch support)
Expand All @@ -28,18 +28,18 @@ Description: CernVM-FS common libraries
Common utility libraries for CernVM-FS packages.

Package: cvmfs-server
Architecture: i386 amd64 armhf arm64
Architecture: amd64 armhf arm64
#Pre-Depends: ${misc:Pre-Depends} (preparation for multiarch support)
Depends: psmisc, curl, attr, openssl, libcap2, libcap2-bin, lsof, rsync, jq, usbutils, sqlite3, cvmfs-libs (= ${binary:Version}), ${misc:Depends}
Recommends: apache2
Recommends: cvmfs-fuse3, apache2
Conflicts: cvmfs-server (<< 2.1)
#Multi-Arch: same (preparation for multiarch support)
Homepage: http://cernvm.cern.ch
Description: CernVM-FS server utilities
HTTP File System Repository Server for Distributing Software to CernVM.

Package: cvmfs-dev
Architecture: i386 amd64 armhf arm64
Architecture: amd64 armhf arm64
#Pre-Depends: ${misc:Pre-Depends} (preparation for multiarch support)
Depends: openssl, ${misc:Depends}
#Multi-Arch: same (preparation for multiarch support)
Expand All @@ -48,24 +48,23 @@ Description: CernVM-FS client library
CernVM-FS static client library

Package: cvmfs-shrinkwrap
Architecture: i386 amd64 armhf arm64
Architecture: amd64 armhf arm64
#Pre-Depends: ${misc:Pre-Depends} (preparation for multiarch support)
Depends: openssl, python, cvmfs-libs (= ${binary:Version}), ${misc:Depends}
Depends: openssl, python3, cvmfs-libs (= ${binary:Version}), ${misc:Depends}
#Multi-Arch: same (preparation for multiarch support)
Homepage: http://cernvm.cern.ch
Description: CernVM-FS shrinkwrap utility to export /cvmfs file system trees
CernVM-FS shrinkwrap utility to export /cvmfs file system trees into container images.

Package: cvmfs-unittests
Architecture: i386 amd64 armhf arm64
Architecture: amd64 armhf arm64
#Pre-Depends: ${misc:Pre-Depends} (preparation for multiarch support)
Depends: libssl-dev, uuid-dev, cvmfs-libs (= ${binary:Version}), ${misc:Depends}
#Multi-Arch: same (preparation for multiarch support)
Homepage: http://cernvm.cern.ch
Description: CernVM File System Unit Tests
HTTP File System for Distributing Software to CernVM.

#FUSE3-BEGIN
Package: cvmfs-fuse3
Architecture: i386 amd64 armhf arm64
#Pre-Depends: ${misc:Pre-Depends} (preparation for multiarch support)
Expand All @@ -74,11 +73,10 @@ Depends: fuse3, libfuse3-3, cvmfs (= ${binary:Version})
Homepage: http://cernvm.cern.ch
Description: CernVM File System fuse3 libraries
Shared libraries implementing the CernVM-FS fuse module based on libfuse3
#FUSE3-END

#GATEWAY-BEGIN
Package: cvmfs-gateway
Architecture: i386 amd64
Architecture: amd64
#Pre-Depends: ${misc:Pre-Depends} (preparation for multiarch support)
Depends: psmisc, cvmfs-server, ${misc:Depends}
#Multi-Arch: same (preparation for multiarch support)
Expand Down

0 comments on commit 824c122

Please sign in to comment.