diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/debian/rules b/debian/rules index cbc2168..ddc885a 100755 --- a/debian/rules +++ b/debian/rules @@ -35,10 +35,9 @@ LDB_DEB_VERSION = ${LDB_EPOCH}${LDB_VERSION}+samba${DEB_VERSION_UPSTREAM_REVISIO LDB_DEPENDS = libldb2 (= ${LDB_DEB_VERSION}) LDB_PACKAGES = libldb2 libldb-dev ldb-tools python3-ldb python3-ldb-dev +before-trixie := $(filter pkg.samba.before-trixie, ${DEB_BUILD_PROFILES}) + omit-pkgs = -with-glusterfs = -with-ceph = -with-snapper = config-args = \ --vendor-name=${DEB_VENDOR}-${DEB_VERSION_UPSTREAM_REVISION} \ @@ -79,9 +78,6 @@ config-args = \ --with-logdir=/var/log/ctdb \ ifeq (${DEB_HOST_ARCH_OS}, linux) # extra linux-specific features -with-glusterfs = $(if $(filter amd64 arm64 ppc64el ppc64 riscv64 mips64el s390x ia64 sparc64,${DEB_HOST_ARCH}),yes) -with-ceph = $(if $(filter amd64 arm64 mips64el ppc64el riscv64 s390x, ${DEB_HOST_ARCH}),yes) -with-snapper = yes config-args += \ --with-quota \ @@ -91,7 +87,7 @@ endif # Ubuntu i386 binary compatibility only effort: Disable some i386 packages and modules ifeq (${DEB_VENDOR}-${DEB_HOST_ARCH}, Ubuntu-i386) -omit-pkgs += ctdb libpam-winbind samba samba-ad-dc samba-testsuite samba-vfs-modules +omit-pkgs += ctdb libpam-winbind samba samba-ad-dc samba-testsuite samba-vfs-modules samba-vfs-ceph samba-vfs-glusterfs endif ifneq (,$(filter armel mipsel m68k powerpc sh4,${DEB_HOST_ARCH})) @@ -119,16 +115,8 @@ endif # build is done in bin/default/ subdir CFLAGS += -ffile-prefix-map=../../= -config-args += $(if ${with-ceph},\ - --enable-cephfs --enable-ceph-reclock,\ - --disable-cephfs) - # we had t64 transition (libsmbclient => libsmbclient0) for trixie -ifneq (,$(filter pkg.samba.before-trixie, ${DEB_BUILD_PROFILES})) -libsmbclient := libsmbclient -else -libsmbclient := libsmbclient0 -endif +libsmbclient := $(if ${before-trixie},libsmbclient,libsmbclient0) with_mitkrb5 = $(filter pkg.samba.mitkrb5, ${DEB_BUILD_PROFILES}) ifneq (,${with_mitkrb5}) @@ -140,7 +128,8 @@ config-args += \ mitkrb5-samba-ver = ${DEB_VERSION}mitkrb5 mitkrb5-dep-pkgs = samba-libs samba-dev mitkrb5-dep-pkgs += samba samba-common-bin python3-samba -mitkrb5-dep-pkgs += samba-dsdb-modules samba-vfs-modules +mitkrb5-dep-pkgs += samba-vfs-ceph samba-vfs-glusterfs +mitkrb5-dep-pkgs += samba-dsdb-modules mitkrb5-dep-pkgs += ${libsmbclient} smbclient mitkrb5-dep-pkgs += libnss-winbind libpam-winbind mitkrb5-dep-pkgs += winbind libwbclient0 @@ -156,6 +145,11 @@ endif # ${build-pkgs} will honour arch/indep and the above list in ${DH_OPTIONS} build-pkgs := $(shell dh_listpackages) +with-ceph := $(filter samba-vfs-ceph,${build-pkgs}) +config-args += $(if ${with-ceph},\ + --enable-cephfs --enable-ceph-reclock,\ + --disable-cephfs) + binary binary-arch binary-indep \ install install-arch install-indep: %: dh $* @@ -271,6 +265,15 @@ endif dh_link -plibldb2 /usr/lib/${DEB_HOST_MULTIARCH}/ldb/modules/ldb \ /usr/lib/${DEB_HOST_MULTIARCH}/samba/ldb/compat +execute_after_dh_install: +# some vfs modules are in separate packages. Removing them here avoids having +# explicit list of other modules in d/samba.install + rm -f \ + debian/samba/usr/lib/${DEB_HOST_MULTIARCH}/samba/vfs/glusterfs*.so \ + debian/samba/usr/share/man/man8/vfs_glusterfs*.8 \ + debian/samba/usr/lib/${DEB_HOST_MULTIARCH}/samba/vfs/ceph*.so \ + debian/samba/usr/share/man/man8/vfs_ceph*.8 + provision-dest := debian/samba-ad-provision/usr/share/samba/setup override_dh_auto_install-indep: @@ -349,7 +352,7 @@ override_dh_shlibdeps: # for specific executables/modules, put dependencies in separate variables # to change Depends to Recommends for them in d/control dh_shlibdeps -l/usr/lib/${DEB_HOST_MULTIARCH}/samba \ - -Xceph.so -Xglusterfs.so -Xsnapper.so -Xctdb_mutex_ceph_rados_helper + -Xctdb_mutex_ceph_rados_helper ifneq (,$(filter ctdb, ${build-pkgs})) echo "rados:Depends=" >> debian/ctdb.substvars ifneq (${with-ceph},) @@ -357,15 +360,6 @@ ifneq (${with-ceph},) debian/ctdb/usr/libexec/ctdb/ctdb_mutex_ceph_rados_helper endif endif -ifneq (,$(filter samba-vfs-modules,${build-pkgs})) - echo "vfsmods:Depends=" >> debian/samba-vfs-modules.substvars -ifneq (${with-snapper}${with-ceph}${with-glusterfs},) - dpkg-shlibdeps -Tdebian/samba-vfs-modules.substvars -pvfsmods \ - $(if ${with-snapper}, debian/samba-vfs-modules/usr/lib/*/samba/vfs/snapper.so) \ - $(if ${with-ceph}, debian/samba-vfs-modules/usr/lib/*/samba/vfs/ceph.so) \ - $(if ${with-glusterfs}, debian/samba-vfs-modules/usr/lib/*/samba/vfs/glusterfs.so) -endif -endif # after shlibdeps run, check that we don't have wrong depdendencies $(call depcheck, samba-libs, samba|winbind|smbclient|ctdb) $(call depcheck, smbclient, samba|winbind|ctdb) @@ -381,8 +375,10 @@ ifneq (,$(filter ${build-pkgs}, ${mitkrb5-dep-pkgs})) dh_gencontrol $(addprefix -p, $(filter ${build-pkgs}, ${mitkrb5-dep-pkgs})) -- -v${mitkrb5-samba-ver} -Vldb:Depends="${LDB_DEPENDS}" endif dh_gencontrol --remaining-packages -- -Vldb:Depends="${LDB_DEPENDS}" -# move files from / to /usr if needed (#1059187): - if command -v dh_movetousr >/dev/null; then dh_movetousr -plibpam-winbind -plibnss-winbind; fi +ifeq (,${before-trixie}) +# run dh_movetousr only on trixie and up, not before + dh_movetousr -plibpam-winbind -plibnss-winbind +endif clean: # see also debian/clean |