[Pkg-samba-maint] [Git][samba-team/samba][master] 7 commits: rm d/libsamba-heimdal.install: unused file for non-existing package
Michael Tokarev (@mjt)
gitlab at salsa.debian.org
Sat Apr 2 20:48:17 BST 2022
Michael Tokarev pushed to branch master at Debian Samba Team / samba
Commits:
000a3397 by Michael Tokarev at 2022-04-02T18:17:12+03:00
rm d/libsamba-heimdal.install: unused file for non-existing package
- - - - -
3e8438ca by Michael Tokarev at 2022-04-02T21:34:21+03:00
use --libexecdir=/usr/libexec not /usr/lib/$deb-host-multiarch
We should not use arch-specific paths for helper programs
which are used in various config files. For now, there were
ctdb helper programs in there, and smbspool_krb5_wrapper.
Some of them are callable from other packages, and some
others are specified in config files. These should reside
in a path that is the same on all systems.
Use /usr/libexec/ for this like many other packages in debian.
While at it, also collapse list of files in libexec/ctdb/
into single entry in d/ctdb.install.
- - - - -
d3b03955 by Michael Tokarev at 2022-04-02T21:34:59+03:00
ctdb_etcd_lock: stop chmod-x'ing it, and add Recommends: python3 to ctdb package
- - - - -
45ce736b by Michael Tokarev at 2022-04-02T21:34:59+03:00
ctdb_etcd_lock-path.patch: fix installation path for ctdb_etcd_lock binary in docs
- - - - -
da576616 by Michael Tokarev at 2022-04-02T21:39:14+03:00
replace bug_221618_precise-64bit-prototype.patch with libsmbclient-ensure-lfs-221618.patch
instead of messing up with _LARGEFILE_SOURCE &Co #defines
when it is too late already, check if these are properly
defined and error out if not
- - - - -
2134db06 by Michael Tokarev at 2022-04-02T21:39:18+03:00
d/patches/usershare.patch: do not patch actual manpage, it is regenerated from xml source
- - - - -
eae26c64 by Michael Tokarev at 2022-04-02T21:39:18+03:00
d/rules: verify that libwbclient0 is not linked with samba[-libs] too
- - - - -
11 changed files:
- debian/control
- debian/ctdb.install
- − debian/libsamba-heimdal.install
- − debian/patches/bug_221618_precise-64bit-prototype.patch
- + debian/patches/ctdb_etcd_lock-path.patch
- + debian/patches/libsmbclient-ensure-lfs-221618.patch
- debian/patches/series
- debian/patches/usershare.patch
- debian/rules
- debian/samba.install
- debian/smbclient.install
Changes:
=====================================
debian/control
=====================================
@@ -433,7 +433,7 @@ Depends: iproute2 [linux-any],
time,
${misc:Depends},
${shlibs:Depends}
-Recommends: ethtool [linux-any], python3-etcd, ${rados:Depends}
+Recommends: ethtool [linux-any], python3:any, python3-etcd, ${rados:Depends}
Suggests: logrotate, lsof
Description: clustered database to store temporary data
CTDB is a cluster implementation of the TDB database used by Samba and other
=====================================
debian/ctdb.install
=====================================
@@ -10,22 +10,7 @@ usr/bin/ctdb_diagnostics
usr/bin/ltdbtool
usr/bin/onnode
usr/bin/ping_pong
-usr/lib/*/ctdb/ctdb-config
-usr/lib/*/ctdb/ctdb_etcd_lock
-usr/lib/*/ctdb/ctdb-event
-usr/lib/*/ctdb/ctdb-eventd
-usr/lib/*/ctdb/ctdb-path
-usr/lib/*/ctdb/ctdb_killtcp
-usr/lib/*/ctdb/ctdb_lock_helper
-usr/lib/*/ctdb/ctdb_lvs
-[amd64 arm64 armel armhf i386 mips64el mipsel ppc64el ppc64 s390x x32] usr/lib/*/ctdb/ctdb_mutex_ceph_rados_helper
-usr/lib/*/ctdb/ctdb_mutex_fcntl_helper
-usr/lib/*/ctdb/ctdb_natgw
-usr/lib/*/ctdb/ctdb_recovery_helper
-usr/lib/*/ctdb/ctdb_takeover_helper
-usr/lib/*/ctdb/smnotify
-# helper for /etc/ctdb/debug_locks.sh
-usr/lib/*/ctdb/tdb_mutex_check
+usr/libexec/ctdb/
usr/lib/*/samba/libctdb-event-client-samba4.so.0
usr/lib/tmpfiles.d/ctdb.conf
usr/sbin/ctdbd
=====================================
debian/libsamba-heimdal.install deleted
=====================================
@@ -1,22 +0,0 @@
-usr/lib/*/samba/libasn1-samba4.so.8
-usr/lib/*/samba/libasn1-samba4.so.8.0.0
-usr/lib/*/samba/libgssapi-samba4.so.2
-usr/lib/*/samba/libgssapi-samba4.so.2.0.0
-usr/lib/*/samba/libhcrypto-samba4.so.5
-usr/lib/*/samba/libhcrypto-samba4.so.5.0.1
-usr/lib/*/samba/libhdb-samba4.so.11
-usr/lib/*/samba/libhdb-samba4.so.11.0.2
-usr/lib/*/samba/libheimbase-samba4.so.1
-usr/lib/*/samba/libheimbase-samba4.so.1.0.0
-usr/lib/*/samba/libheimntlm-samba4.so.1
-usr/lib/*/samba/libheimntlm-samba4.so.1.0.1
-usr/lib/*/samba/libhx509-samba4.so.5
-usr/lib/*/samba/libhx509-samba4.so.5.0.0
-usr/lib/*/samba/libkdc-samba4.so.2
-usr/lib/*/samba/libkdc-samba4.so.2.0.0
-usr/lib/*/samba/libkrb5-samba4.so.26
-usr/lib/*/samba/libkrb5-samba4.so.26.0.0
-usr/lib/*/samba/libroken-samba4.so.19
-usr/lib/*/samba/libroken-samba4.so.19.0.1
-usr/lib/*/samba/libwind-samba4.so.0
-usr/lib/*/samba/libwind-samba4.so.0.0.0
=====================================
debian/patches/bug_221618_precise-64bit-prototype.patch deleted
=====================================
@@ -1,30 +0,0 @@
-From: Christian Perrier <bubulle at debian.org>
-Subject: 64 bit fix for libsmbclient
-
-Bug-Debian: http://bugs.debian.org/221618
-Forwarded: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=221618#27
----
- source3/include/libsmbclient.h | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h
-index c47e7c2a872..8f9eb93c97a 100644
---- a/source3/include/libsmbclient.h
-+++ b/source3/include/libsmbclient.h
-@@ -81,6 +81,16 @@ extern "C" {
- #include <time.h>
- #include <utime.h>
-
-+ /* Debian bug #221618 */
-+#ifdef _LARGEFILE64_SOURCE
-+#undef _LARGEFILE64_SOURCE
-+#endif
-+#define _LARGEFILE64_SOURCE 1
-+#ifdef _FILE_OFFSET_BITS
-+#undef _FILE_OFFSET_BITS
-+#endif
-+#define _FILE_OFFSET_BITS 64
-+
- #define SMBC_BASE_FD 10000 /* smallest file descriptor returned */
-
- #define SMBC_WORKGROUP 1
=====================================
debian/patches/ctdb_etcd_lock-path.patch
=====================================
@@ -0,0 +1,20 @@
+Subject: fix pathname for ctdb_etcd_lock
+From: Michael Tokarev <mjt at tls.msk.ru>
+Date: Sat, 02 Apr 2022 17:49:38 +0300
+
+Specify the actual installation path for this helper script.
+
+diff --git a/ctdb/doc/ctdb-etcd.7.xml b/ctdb/doc/ctdb-etcd.7.xml
+index f84989f854f..fcb3d0c3b5f 100644
+--- a/ctdb/doc/ctdb-etcd.7.xml
++++ b/ctdb/doc/ctdb-etcd.7.xml
+@@ -71 +71 @@
+-cluster lock = !/usr/local/usr/libexec/ctdb/ctdb_etcd_lock
++cluster lock = !/usr/libexec/ctdb/ctdb_etcd_lock
+diff --git a/ctdb/utils/etcd/ctdb_etcd_lock b/ctdb/utils/etcd/ctdb_etcd_lock
+index dac24361e77..e695ac7cab2 100755
+--- a/ctdb/utils/etcd/ctdb_etcd_lock
++++ b/ctdb/utils/etcd/ctdb_etcd_lock
+@@ -26 +26 @@ the following line in the ctdb.conf:
+- cluster lock = !/path/to/script
++ cluster lock = !/usr/libexec/ctdb/ctdb_etcd_lock
=====================================
debian/patches/libsmbclient-ensure-lfs-221618.patch
=====================================
@@ -0,0 +1,51 @@
+Subject: ensure libsmbclient.h is being used with LFS enabled
+From: Michael Tokarev <mjt at tls.msk.ru>
+Date: Sat, 02 Apr 2022 19:01:55 +0300
+Bug-Debian: https://bugs.debian.org/221618
+
+We build samba with LFS (Large File Support) even on 32bits.
+This means some types like off_t are 64-bit wide, again,
+even on a 32bit host. libsmbclient.h uses off_t in function
+prototypes, and thes prototypes muct match those which were
+used at samba compile time - if some other source includes
+libsmbclient.h without LFS, it'll get wrong prototypes and
+the resulting binary will most likely crash when using
+libsmbclient functions.
+
+Detect and error-out this at compile time.
+
+We can not do anything with this in the public header since
+it is alredy too late to redefine things, since we can't
+guarantee we're the first header a program #includes, and
+at the time this libsmbclient.h is included, off_t can
+already be defined so our (re)define of _FILE_OFFSET_BITS
+does nothing already.
+
+Patching libsmbclient.h to use off64_t means client program
+should change their off_t to off64_t too when storing
+file offsets returning from libsmbclient, so this is not
+an option too.
+
+With this change, we will error out even if the user source
+does not use any off_t-related functions. Namely, it was ok
+to #include <libsmbclient.h> and use smbc_open/smbc_read/
+smbc_write/smbc_close without _F_O_B=64, - neither of these
+functions uses off_t. smbc_lseek and others doesn't work,
+but if a program does not use them anyway, whole thing will
+just work even without enabling LFS. Ideally we can probably
+check each individual function which is being affected, by
+replacing it with #error if sizeof(off_t) < 8. But this
+requires quite some hackery...
+
+diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h
+index 84c98089251..5421b34d57f 100644
+--- a/source3/include/libsmbclient.h
++++ b/source3/include/libsmbclient.h
+@@ -82,4 +82,7 @@ extern "C" {
+ #include <utime.h>
+
++_Static_assert(sizeof(off_t) >= 8, /* C11 keyword */
++ "libsmbclient.h needs LFS (-D_FILE_OFFSET_BITS=64) on this platform please report to pkg-samba-maint at lists.alioth.debian.org");
++
+ #define SMBC_BASE_FD 10000 /* smallest file descriptor returned */
+
=====================================
debian/patches/series
=====================================
@@ -1,5 +1,5 @@
07_private_lib
-bug_221618_precise-64bit-prototype.patch
+libsmbclient-ensure-lfs-221618.patch
README_nosmbldap-tools.patch
smbclient-pager.patch
usershare.patch
@@ -14,3 +14,4 @@ use-bzero-instead-of-memset_s.diff
weak-crypto-allowed-clarify.diff
spelling.patch
waf-add-support-for-GNU-kFreeBSD.patch
+ctdb_etcd_lock-path.patch
=====================================
debian/patches/usershare.patch
=====================================
@@ -9,10 +9,9 @@ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/128548
Forwarded: not-needed
---
docs-xml/smbdotconf/misc/usersharemaxshares.xml | 2 +-
- docs/manpages/net.8 | 4 ++--
lib/param/loadparm.c | 2 ++
source3/param/loadparm.c | 2 +-
- 4 files changed, 6 insertions(+), 4 deletions(-)
+ 3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs-xml/smbdotconf/misc/usersharemaxshares.xml b/docs-xml/smbdotconf/misc/usersharemaxshares.xml
index 0d69bb8..e985857 100644
@@ -25,22 +24,6 @@ index 0d69bb8..e985857 100644
-<value type="default">0</value>
+<value type="default">100</value>
</samba:parameter>
-diff --git a/docs/manpages/net.8 b/docs/manpages/net.8
-index 5d9a631..5c1c8c3 100644
---- a/docs/manpages/net.8
-+++ b/docs/manpages/net.8
-@@ -1194,9 +1194,9 @@ Something we failed to parse\&. Default action is to "edit" it in interactive an
- .RE
- .SS "USERSHARE"
- .PP
--Starting with version 3\&.0\&.23, a Samba server now supports the ability for non\-root users to add user defined shares to be exported using the "net usershare" commands\&.
-+Starting with version 3\&.0\&.23, a Samba server now supports the ability for non\-root users to add user-defined shares to be exported using the "net usershare" commands\&.
- .PP
--To set this up, first set up your smb\&.conf by adding to the [global] section: usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops"\&. Set the permissions on /usr/local/samba/lib/usershares to 01770\&. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file)\&. Finally, tell smbd how many usershares you will allow by adding to the [global] section of smb\&.conf a line such as : usershare max shares = 100\&. To allow 100 usershare definitions\&. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below\&.
-+Members of the UNIX group "sambashare" can create user-defined shares on demand using the commands below\&.
- .PP
- The usershare commands are:
- .RS 4
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index a221e87..c5367fd 100644
--- a/lib/param/loadparm.c
=====================================
debian/rules
=====================================
@@ -50,7 +50,7 @@ conf_args = \
--enable-fhs \
--sysconfdir=/etc \
--localstatedir=/var \
- --libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
+ --libexecdir=/usr/libexec \
--with-privatedir=/var/lib/samba/private \
--with-smbpasswd-file=/etc/samba/smbpasswd \
--with-piddir=/run/samba \
@@ -215,11 +215,6 @@ endif
ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
install -p debian/ctdb.README.kfreebsd ${DESTDIR}/ctdb/README.kfreebsd
endif
- # FIXME: ctdb_etcd_lock is a python script which uses etcd python module,
- # it should be either packaged separately or etcd deps are added.
- # Also it should not be in arch-specific libdir,
- # and all referencs to it in docs/manpages/examples should be fixed.
- chmod -x ${DESTDIR}/usr/lib/${DEB_HOST_MULTIARCH}/ctdb/ctdb_etcd_lock
override_dh_install:
DEB_PY3_INCDIR=$$(python3-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
@@ -271,7 +266,7 @@ ifneq (,$(filter samba, ${dh_packagelist}))
chmod 1777 debian/samba/var/spool/samba/
endif
ifneq (,$(filter smbclient, ${dh_packagelist}))
- chmod 0700 debian/smbclient/usr/lib/*/samba/smbspool_krb5_wrapper
+ chmod 0700 debian/smbclient/usr/libexec/samba/smbspool_krb5_wrapper
endif
override_dh_makeshlibs:
@@ -286,7 +281,7 @@ override_dh_shlibdeps:
-Xceph.so -Xglusterfs.so -Xsnapper.so -Xctdb_mutex_ceph_rados_helper
ifeq ($(WITH_CEPH), yes)
dpkg-shlibdeps -Tdebian/ctdb.substvars -prados \
- debian/ctdb/usr/lib/${DEB_HOST_MULTIARCH}/ctdb/ctdb_mutex_ceph_rados_helper
+ debian/ctdb/usr/libexec/ctdb/ctdb_mutex_ceph_rados_helper
endif
dpkg-shlibdeps -Tdebian/samba-vfs-modules.substvars -pvfsmods \
debian/samba-vfs-modules/usr/lib/*/samba/vfs/snapper.so \
@@ -300,6 +295,9 @@ endif
# python3-samba should not depend on samba
if egrep "^shlibs.Depends=.* (samba) " debian/python3-samba.substvars; \
then echo "E: python3-samba should not depend on samba" >&2; exit 1; fi
+ # libwbclient0 should not depend on samba-libs (probably)
+ if egrep "^shlibs.Depends=.* (samba-libs|samba) " debian/libwbclient0.substvars; \
+ then echo "E: libwbclient0 should not depend on samba libs" >&2; exit 1; fi
override_dh_gencontrol:
dh_gencontrol -plibldb2 -pldb-tools -plibldb-dev -ppython3-ldb -ppython3-ldb-dev \
=====================================
debian/samba.install
=====================================
@@ -19,9 +19,9 @@ usr/lib/*/samba/libhdb-samba4.so.0
usr/lib/*/samba/libkdc-samba4.so.0
usr/lib/*/samba/libmscat-samba4.so.0
usr/lib/*/samba/libpac-samba4.so.0
-usr/lib/*/samba/rpcd_*
-usr/lib/*/samba/samba-bgqd
-usr/lib/*/samba/samba-dcerpcd
+usr/libexec/samba/rpcd_*
+usr/libexec/samba/samba-bgqd
+usr/libexec/samba/samba-dcerpcd
usr/lib/*/samba/service/*.so
usr/sbin/eventlogadm
usr/sbin/mksmbpasswd
=====================================
debian/smbclient.install
=====================================
@@ -9,7 +9,7 @@ usr/bin/smbget
usr/bin/smbspool
usr/bin/smbtar
usr/bin/smbtree
-usr/lib/*/samba/smbspool_krb5_wrapper
+usr/libexec/samba/smbspool_krb5_wrapper
#usr/share/man/man1/findsmb.1
usr/share/man/man1/mdsearch.1
usr/share/man/man1/rpcclient.1
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/e5eaefa1775fe841a5e0e81f2c25045d7c95c2bf...eae26c64551ff0d727a131e7535fed31413c44e1
--
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/e5eaefa1775fe841a5e0e81f2c25045d7c95c2bf...eae26c64551ff0d727a131e7535fed31413c44e1
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/20220402/06657da6/attachment-0001.htm>
More information about the Pkg-samba-maint
mailing list