[Pkg-samba-maint] [Git][samba-team/samba][vfs-modules] 5 commits: split out samba-vfs-glusterfs from samba-vfs-modules (pick up and rework ubuntu changes)

Michael Tokarev (@mjt) gitlab at salsa.debian.org
Mon Jun 24 13:18:56 BST 2024



Michael Tokarev pushed to branch vfs-modules at Debian Samba Team / samba


Commits:
741c308a by Michael Tokarev at 2024-06-24T15:17:10+03:00
split out samba-vfs-glusterfs from samba-vfs-modules (pick up and rework ubuntu changes)

   + d/control: new samba-vfs-glusterfs package
   + d/rules: glusterfs vfs modules and manpages are now in the
     samba-vfs-glusterfs package
   + d/samba-vfs-glusterfs.install: add glusterfs vfs modules and manpage
   + d/samba-vfs-glusterfs.lintian-overrides: add 'spare manual page' override

Ubuntu planned to use samba-vfs-modules-glusterfs package but used
samba-vfs-modules-extra instead.  Since this does not work for other optional
modules with extra dependencies (eg, ceph), and other modules might need other
special handling, create per-module package(s) instead, as initially planned in
ubuntu, but using a bit shorter name.

Also, refine/rewords a few other parts which rerefences the module, refine the
architecture list, add loong64, drop ia64 from glusterfs build-deps (ia64 is dead).

- - - - -
5f101a91 by Michael Tokarev at 2024-06-24T15:17:49+03:00
split out samba-vfs-ceph from samba-vfs-modules

move ceph and ceph_snapshots vfs modules out of samba-vfs-modules to
separate samba-vfs-ceph package, in a way similar to how glusterfs
modules are split out.

- - - - -
eab9d280 by Michael Tokarev at 2024-06-24T15:17:52+03:00
the only remaining "extra" vfs module, snapper, does not need extra handling

- - - - -
ca0c1dfe by Michael Tokarev at 2024-06-24T15:17:52+03:00
merge samba-vfs-modules (remaining) into main samba package

Make samba-vfs-modules to be transitional package, and add
NEWS entry describing vfs modules rearrangements.

- - - - -
bad5ad9c by Michael Tokarev at 2024-06-24T15:17:52+03:00
update changelog

- - - - -


12 changed files:

- debian/changelog
- debian/control
- debian/rules
- + debian/samba-vfs-ceph.install
- + debian/samba-vfs-ceph.lintian-overrides
- + debian/samba-vfs-glusterfs.install
- + debian/samba-vfs-glusterfs.lintian-overrides
- + debian/samba-vfs-modules.NEWS
- − debian/samba-vfs-modules.install
- − debian/samba-vfs-modules.lintian-overrides
- debian/samba.install
- debian/samba.lintian-overrides


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,18 @@
+samba (2:4.20.2+dfsg-3) UNRELEASED; urgency=medium
+
+  * split out samba-vfs-glusterfs from samba-vfs-modules
+    (pick up and rework ubuntu changes)
+  * split out samba-vfs-ceph from samba-vfs-modules
+  * merge samba-vfs-modules (remaining) into main samba package
+  * the only remaining extra vfs module, snapper, does not need extra handling
+  * d/*.service: provide empty value for referenced environment vars
+    (Closes: #1073969)
+  * d/dirs: remove leftover file
+  * d/samba-common-bin.dirs: stop creating /etc/samba/tls/
+  * d/samba.dirs: stop creating bin & sbin
+
+ -- Michael Tokarev <mjt at tls.msk.ru>  Mon, 24 Jun 2024 14:03:32 +0300
+
 samba (2:4.20.2+dfsg-2) unstable; urgency=medium
 
   * tilde-in-version.diff - allow tilde in version string


=====================================
debian/control
=====================================
@@ -37,13 +37,13 @@ Build-Depends-Arch:
 	libblkid-dev,
 	libbsd-dev,
 	libcap-dev [linux-any],
-# the same [arch list] is in rules (with-ceph) and ctdb.install
+# the same [arch list] is in ctdb.install
 	libcephfs-dev [amd64 arm64 mips64el ppc64el riscv64 s390x],
 	librados-dev  [amd64 arm64 mips64el ppc64el riscv64 s390x],
 	libcmocka-dev,
 	libcups2-dev,
 	libdbus-1-dev,
-	libglusterfs-dev [amd64 arm64 ppc64el ppc64 riscv64 mips64el s390x ia64 sparc64],
+	libglusterfs-dev [amd64 arm64 loong64 mips64el ppc64 ppc64el riscv64 s390x sparc64],
 	libgnutls28-dev,
 	libgpgme11-dev,
 	libicu-dev,
@@ -92,12 +92,18 @@ Depends: passwd,
          ${python3:Depends},
          ${shlibs:Depends}
 Recommends: attr,
-            samba-vfs-modules,
             python3-samba,
 Suggests: ctdb,
           ufw,
-          winbind
-Breaks: samba-ad-provision (<< ${source:Upstream-Version})
+          winbind,
+          samba-vfs-ceph, samba-vfs-glusterfs,
+# move libdfs-server-ad-samba4.so.0 samba-libs=>samba-vfs-modules in 4.19.0~rc1
+# swallow samba-vfs-modules by samba in 4.20.2-dfsg-3
+Replaces: samba-libs (<< 2:4.19.0~),
+          samba-vfs-modules (<< 2:4.20.2-dfsg-3~),
+Breaks:   samba-ad-provision (<< ${source:Upstream-Version}),
+          samba-libs (<< 2:4.19.0~),
+          samba-vfs-modules (<< 2:4.20.2-dfsg-3~),
 Description: SMB/CIFS file, print, and login server for Unix
  Samba is an implementation of the SMB/CIFS protocol for Unix systems,
  providing support for cross-platform file and printer sharing with
@@ -187,7 +193,6 @@ Depends: samba (= ${binary:Version}),
 	 python3-samba (= ${binary:Version}),
 	 python3-dnspython,
 	 samba-dsdb-modules (= ${binary:Version}),
-	 samba-vfs-modules (= ${binary:Version}),
 	 winbind (= ${binary:Version}),
 	 krb5-kdc (>= 1.21.0~) <pkg.samba.mitkrb5>,
 	 ${python3:Depends},
@@ -352,31 +357,59 @@ Description: Samba Directory Services Database
  Directory features to the LDB library.
 
 Package: samba-vfs-modules
+# Remove this package for trixie+1
 Architecture: any
 Multi-Arch: same
-Depends: samba-libs (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
-Recommends: ${vfsmods:Depends}
-# move libdfs-server-ad-samba4.so.0 samba-libs=>samba-vfs-modules in 4.19.0~rc1
-Replaces: samba-libs (<< 2:4.19.0~)
-Breaks:   samba-libs (<< 2:4.19.0~)
+Description: Samba Virtual FileSystem plugins (transitional package)
+ Samba is an implementation of the SMB/CIFS protocol for Unix systems,
+ providing support for cross-platform file sharing with Microsoft Windows, OS X,
+ and other Unix systems.  Samba can also function as a domain controller
+ or member server in Active Directory or NT4-style domains.
+ .
+ Virtual FileSystem modules are stacked shared libraries extending the
+ functionality of Samba.  This package used to provide VFS modules for
+ samba, but since version 4.20.2+dfsg-3, most of the modules were merged
+ into main samba package, or into their own separate packages -
+ samba-vfs-ceph and samba-vfs-glusterfs.
+ .
+ This package can safely be removed.
+
+Package: samba-vfs-ceph
+Architecture: amd64 arm64 mips64el ppc64el riscv64 s390x
+Multi-Arch: same
+Depends: samba (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+# ceph modules moved from samba-vfs-modules in 4.20.2+dfsg-3
+Replaces: samba-vfs-modules (<< 4.20.2+dfsg-3~)
+Breaks:   samba-vfs-modules (<< 4.20.2+dfsg-3~)
+Enhances: samba
+Description: Samba Virtual FileSystem ceph modules
+ Samba is an implementation of the SMB/CIFS protocol for Unix systems,
+ providing support for cross-platform file sharing with Microsoft Windows, OS X,
+ and other Unix systems.  Samba can also function as a domain controller
+ or member server in Active Directory or NT4-style domains.
+ .
+ Virtual FileSystem modules are stacked shared libraries extending the
+ functionality of Samba. This package provides vfs_ceph and vfs_ceph_snapshots
+ modules.
+
+Package: samba-vfs-glusterfs
+Architecture: amd64 arm64 loong64 mips64el ppc64 ppc64el riscv64 s390x sparc64
+Multi-Arch: same
+Depends: samba (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+# glusterfs modules moved from samba-vfs-modules in 4.20.2+dfsg-3 (4.19.4+dfsg-2ubuntu1)
+# in ubuntu, glusterfs was in samba-vfs-modules-extra temporarily
+Replaces: samba-vfs-modules (<< 4.20.2+dfsg-3~), samba-vfs-modules-extra (<< 4.20.2+dfsg-3~)
+Breaks:   samba-vfs-modules (<< 4.20.2+dfsg-3~), samba-vfs-modules-extra (<< 4.20.2+dfsg-3~)
 Enhances: samba
-Description: Samba Virtual FileSystem plugins
+Description: Samba Virtual FileSystem glusterfs modules
  Samba is an implementation of the SMB/CIFS protocol for Unix systems,
  providing support for cross-platform file sharing with Microsoft Windows, OS X,
  and other Unix systems.  Samba can also function as a domain controller
  or member server in Active Directory or NT4-style domains.
  .
  Virtual FileSystem modules are stacked shared libraries extending the
- functionality of Samba. Some examples are:
-  * vfs_acl_xattr: Save NTFS-ACLs in Extended Attributes
-  * vfs_audit: record selected Samba VFS operations in the system log
-  * vfs_readonly: Make a Samba share read only for a specified time period
-  * vfs_recycle: Give the same effect as the Recycle Bin on Windows computers
-  * vfs_shadow_copy2: Expose snapshots to Windows clients as shadow copies
-  * vfs_worm: Disallow writes for older file
- .
- Note: The runtime dependencies of vfs_ceph, vfs_glusterfs and vfs_snapper are
- moved to Recommends.
+ functionality of Samba. This package provides vfs_glusterfs and
+ vfs_glusterfs_fuse modules.
 
 Package: libsmbclient0
 Provides: ${t64:Provides}
@@ -536,8 +569,9 @@ Depends: iproute2 [linux-any],
          time,
          ${misc:Depends},
          ${shlibs:Depends}
-Recommends: ethtool [linux-any], python3:any, python3-etcd, ${rados:Depends}
-Suggests: lsof
+Recommends: ethtool [linux-any], python3:any, python3-etcd,
+Suggests: lsof,
+	${rados:Depends}, samba-vfs-ceph [amd64 arm64 mips64el ppc64el riscv64 s390x],
 Description: clustered database to store temporary data
  CTDB is a cluster implementation of the TDB database used by Samba and other
  projects to store temporary data. If an application is already using TDB for


=====================================
debian/rules
=====================================
@@ -33,9 +33,6 @@ LDB_DEPENDS = libldb2 (= ${LDB_DEB_VERSION})
 LDB_PACKAGES = libldb2 libldb-dev ldb-tools python3-ldb python3-ldb-dev
 
 omit-pkgs =
-with-glusterfs =
-with-ceph =
-with-snapper =
 
 config-args = \
 	--vendor-name=${DEB_VENDOR}-${DEB_VERSION_UPSTREAM_REVISION} \
@@ -76,9 +73,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 \
@@ -88,7 +82,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}))
@@ -116,10 +110,6 @@ 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
@@ -137,7 +127,7 @@ 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-dsdb-modules
 mitkrb5-dep-pkgs += ${libsmbclient} smbclient
 mitkrb5-dep-pkgs += libnss-winbind libpam-winbind
 mitkrb5-dep-pkgs += winbind libwbclient0
@@ -153,10 +143,14 @@ 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 $*
-
 configure: bin/configured.stamp
 .PHONY: configure
 bin/configured.stamp:
@@ -268,6 +262,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:
@@ -346,7 +349,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},)
@@ -354,15 +357,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)


=====================================
debian/samba-vfs-ceph.install
=====================================
@@ -0,0 +1,4 @@
+usr/lib/${DEB_HOST_MULTIARCH}/samba/vfs/ceph.so
+usr/lib/${DEB_HOST_MULTIARCH}/samba/vfs/ceph_snapshots.so
+usr/share/man/man8/vfs_ceph.8
+usr/share/man/man8/vfs_ceph_snapshots.8


=====================================
debian/samba-vfs-ceph.lintian-overrides
=====================================
@@ -0,0 +1 @@
+samba-vfs-ceph: spare-manual-page */man/man8/vfs_*


=====================================
debian/samba-vfs-glusterfs.install
=====================================
@@ -0,0 +1,4 @@
+usr/lib/${DEB_HOST_MULTIARCH}/samba/vfs/glusterfs.so
+usr/lib/${DEB_HOST_MULTIARCH}/samba/vfs/glusterfs_fuse.so
+usr/share/man/man8/vfs_glusterfs.8
+usr/share/man/man8/vfs_glusterfs_fuse.8


=====================================
debian/samba-vfs-glusterfs.lintian-overrides
=====================================
@@ -0,0 +1 @@
+samba-vfs-glusterfs: spare-manual-page */man/man8/vfs_*


=====================================
debian/samba-vfs-modules.NEWS
=====================================
@@ -0,0 +1,15 @@
+samba-vfs-modules (2:4.20.2+dfsg-3) unstable; urgency=medium
+
+  samba-vfs-modules package has been dropped in this release.
+  Instead, all common vfs modules are now part of regular samba
+  package, so are always installed (so there is not need to install
+  samba-vfs-modules for, say, wide links = yes to work, ad-dc always
+  works too and so on).
+
+  At the same time, glusterfs and ceph vfs modules are now shipped in
+  their own separate packages, samba-vfs-glusterfs and samba-vfs-ceph
+  (samba-vfs-glusterfs in universe in ubuntu).  If you need ceph or
+  glusterfs functionality, please install samba-vfs-ceph and/or
+  samba-vfs-glusterfs package(s) separately.
+
+ -- Michael Tokarev <mjt at tls.msk.ru>  Mon, 24 Jun 2024 12:48:23 +0300


=====================================
debian/samba-vfs-modules.install deleted
=====================================
@@ -1,3 +0,0 @@
-usr/lib/*/samba/vfs/*.so
-usr/share/man/man8/vfs_*.8
-usr/lib/*/samba/libdfs-server-ad-private-samba.so.0


=====================================
debian/samba-vfs-modules.lintian-overrides deleted
=====================================
@@ -1,7 +0,0 @@
-# False positives, see #896012
-samba-vfs-modules: library-not-linked-against-libc *
-# manpages describing vfs modules:
-samba-vfs-modules: spare-manual-page */man/man8/vfs_*
-# intentional: was a typo in old config parser so we allow old config to work:
-samba-vfs-modules: hardening-no-fortify-functions */samba/vfs/expand_msdfs.so*
-samba-vfs-modules: hardening-no-fortify-functions */samba/vfs/fileid.so*


=====================================
debian/samba.install
=====================================
@@ -32,3 +32,8 @@ usr/share/man/man8/smbd.8
 usr/share/samba/admx/
 usr/share/samba/mdssvc/elasticsearch_mappings.json
 usr/share/samba/update-apparmor-samba-profile
+
+# vfs modules
+usr/lib/*/samba/vfs/*.so
+usr/share/man/man8/vfs_*.8
+usr/lib/*/samba/libdfs-server-ad-private-samba.so.0


=====================================
debian/samba.lintian-overrides
=====================================
@@ -1 +1,7 @@
 samba: hardening-no-fortify-functions */samba/libmscat-private-samba.so.*
+# False positives, see #896012
+samba: library-not-linked-against-libc *
+# manpages describing vfs modules (they're named vfs_foo while the module is vfs/foo.so):
+samba: spare-manual-page */man/man8/vfs_*
+samba: hardening-no-fortify-functions */samba/vfs/expand_msdfs.so*
+samba: hardening-no-fortify-functions */samba/vfs/fileid.so*



View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/616c78cbc3ee7b730bb757c8e025e2314cae41fd...bad5ad9c303cad5bb4164908b3cce2be04830bd5

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/616c78cbc3ee7b730bb757c8e025e2314cae41fd...bad5ad9c303cad5bb4164908b3cce2be04830bd5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-samba-maint/attachments/20240624/0b9600a1/attachment-0001.htm>


More information about the Pkg-samba-maint mailing list