summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/TODO37
-rwxr-xr-xdebian/addshare.py46
-rw-r--r--debian/changelog129
-rw-r--r--debian/control86
-rw-r--r--debian/not-installed3
-rwxr-xr-x[-rw-r--r--]debian/panic-action0
-rw-r--r--debian/patches/make-python-optional.diff25
-rw-r--r--debian/patches/series1
-rw-r--r--debian/python3-samba.install5
-rwxr-xr-xdebian/rules13
-rwxr-xr-x[-rw-r--r--]debian/samba-ad-dc.init (renamed from debian/samba.samba-ad-dc.init)0
-rw-r--r--debian/samba-ad-dc.install6
-rw-r--r--debian/samba-ad-dc.lintian-overrides3
-rw-r--r--debian/samba-ad-dc.postinst15
-rw-r--r--debian/samba-ad-dc.preinst15
-rw-r--r--debian/samba-ad-dc.service (renamed from debian/samba.samba-ad-dc.service)0
-rw-r--r--debian/samba-common-bin.NEWS9
-rw-r--r--debian/samba-common-bin.install8
-rw-r--r--debian/samba-common-bin.lintian-override2
-rw-r--r--debian/samba-common.install3
-rw-r--r--debian/samba.NEWS10
-rwxr-xr-xdebian/samba.install11
-rw-r--r--debian/samba.postinst17
-rwxr-xr-xdebian/setoption.py47
-rw-r--r--debian/source_samba.py170
25 files changed, 290 insertions, 371 deletions
diff --git a/debian/TODO b/debian/TODO
index 7671a1a..5d424a8 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,32 +1,25 @@
-
This is an incomplete list of a number of issues that need to be fixed.
-
-TODOs before upload to unstable
-
- make a list of basic tests that should be done to ensure that the package is
acceptable for unstable (and run these tests)
- investigate impact of changes to libraries to reverse dependencies and plan
- transitions (if there are any)
- - sssd
- fixed in git (#725992)
- - openchange
- - evolution-mapi
-
-Other TODOs
-
-- handle ad-dc stuff
- - have debconf question to configure ad dc
- - the packaging from the old samba4/samba-ad-dc packages can help there
- - convert the users to the new db, or document that this doesn't happen
- automatically
-
-- what is the status of the docs?
-
- - documentation2.patch is upstream
- - The former documentation.patch needs to be rewritten against the xml input
+ transitions (if there are any).
+ - sssd: uses libndr which changes soname without transition (semi-private lib)
+ Especially painful for backports.
+ We're now emitting proper soname for libndrN at least (before it was just part
+ of samba-libs), so breakage will be at least visible before installing new
+ samba-libs
- Add script to verify that headers are usable through current dependencies
(to prevent bugs like #525888)
+- Investigate which binaries should go to which packages:
+
+ - Some libs and shared objects are specific to samba-ad-dc
+ (eg usr/lib/x86_64-linux-gnu/samba/service/kdc, ntp_signd)
+ - dlz_*: should these go to samba-ad-dc too? multiarch dlz?
+ - samba_kcc: where should it go?
+ - samba-ad-client files: should samba-dnsupdate and samba-spnupdate
+ be there?
+
diff --git a/debian/addshare.py b/debian/addshare.py
deleted file mode 100755
index 8b5e3c4..0000000
--- a/debian/addshare.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/python3
-# Helper to add a share in the samba configuration file
-# Eventually this should be replaced by a call to samba-tool, but
-# for the moment that doesn't support setting individual configuration options.
-
-import optparse
-import os
-import re
-import shutil
-import stat
-import sys
-import tempfile
-
-parser = optparse.OptionParser()
-parser.add_option("--configfile", type=str, metavar="CONFFILE",
- help="Configuration file to use", default="/etc/samba/smb.conf")
-
-(opts, args) = parser.parse_args()
-if len(args) != 2:
- parser.print_usage()
-
-(share, path) = args
-done = False
-
-inf = open(opts.configfile, 'r')
-(fd, fn) = tempfile.mkstemp()
-outf = os.fdopen(fd, 'w')
-
-for l in inf.readlines():
- m = re.match(r"^\s*\[([^]]+)\]$", l)
- if m:
- name = m.groups(1)[0]
- if name.lower() == share.lower():
- sys.exit(0)
- outf.write(l)
-
-if not os.path.isdir(path):
- os.makedirs(path)
-outf.write("[%s]\n" % share)
-outf.write(" path = %s\n" % path)
-outf.write(" read only = no\n")
-outf.write("\n")
-
-os.fchmod(fd, stat.S_IMODE(os.stat(opts.configfile).st_mode))
-outf.close()
-shutil.move(fn, opts.configfile)
diff --git a/debian/changelog b/debian/changelog
index 106c9f9..af74eee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,132 @@
+samba (2:4.20.1+dfsg-5~progress7.99u1) graograman-backports; urgency=medium
+
+ * Uploading to graograman-backports, remaining changes:
+ - Updating maintainer field.
+ - Updating uploaders field.
+ - Updating bugs field.
+ - Updating vcs fields.
+ - Building without dpkg-vendor.
+ - Reverting t64 migration for backports.
+ * Merging debian version 2:4.20.1+dfsg-5.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 11 Jun 2024 18:48:14 +0200
+
+samba (2:4.20.1+dfsg-5) unstable; urgency=medium
+
+ * Build-Depends: dpkg-dev>=trixie for Arch packages only (for t64 rename)
+ * d/samba.NEWS: reword the last entry a bit
+ * d/samba-ad-dc.init: chmod +x
+ * d/control: bump Standards-Version to 4.7.0 (no changes needed)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Mon, 10 Jun 2024 20:17:53 +0300
+
+samba (2:4.20.1+dfsg-4~progress7.99u1) graograman-backports; urgency=medium
+
+ * Uploading to graograman-backports, remaining changes:
+ - Updating maintainer field.
+ - Updating uploaders field.
+ - Updating bugs field.
+ - Updating vcs fields.
+ - Building without dpkg-vendor.
+ - Reverting t64 migration for backports.
+ * Merging debian version 2:4.20.1+dfsg-4.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Thu, 30 May 2024 05:32:07 +0200
+
+samba (2:4.20.1+dfsg-4) unstable; urgency=medium
+
+ [ Helmut Grohne ]
+ * Mitigate ineffective replaces due to /usr-move (DEP17 P1)
+ (Closes: #1072102)
+
+ [ Michael Tokarev ]
+ * d/control: mark libkeyutils-dev as linux-only [linux-any]
+ * d/control: drop old versions of versioned dependencies
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Wed, 29 May 2024 20:31:41 +0300
+
+samba (2:4.20.1+dfsg-3~progress7.99u1) graograman-backports; urgency=medium
+
+ * Uploading to graograman-backports, remaining changes:
+ - Updating maintainer field.
+ - Updating uploaders field.
+ - Updating bugs field.
+ - Updating vcs fields.
+ - Building without dpkg-vendor.
+ - Reverting t64 migration for backports.
+ * Merging debian version 2:4.20.1+dfsg-3.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Thu, 30 May 2024 05:31:42 +0200
+
+samba (2:4.20.1+dfsg-3) unstable; urgency=medium
+
+ * d/rules: move samba-common install to d/samba-common.install
+ * d/rules: install samba-ad-dc init files for the right package
+ * d/samba.postinst: remove nmbd_error_handler for the initscript
+ (it is not used in systemd case)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sun, 26 May 2024 18:48:17 +0300
+
+samba (2:4.20.1+dfsg-2~progress7.99u1) graograman-backports; urgency=medium
+
+ * Uploading to graograman-backports, remaining changes:
+ - Updating maintainer field.
+ - Updating uploaders field.
+ - Updating bugs field.
+ - Updating vcs fields.
+ - Building without dpkg-vendor.
+ - Reverting t64 migration for backports.
+ * Merging debian version 2:4.20.1+dfsg-2.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Thu, 30 May 2024 05:29:56 +0200
+
+samba (2:4.20.1+dfsg-2) unstable; urgency=medium
+
+ * move many files from samba package to samba-ad-dc package.
+ From now on, samba-ad-dc isn't just a meta-package, it is actually
+ needed for AD-DC functionality. If you run AD-DC, please ensure
+ that samba-ad-dc package is installed (it is not recommended by samba)
+ Closes: #1051770
+ * move samba-tool and samba-gpupdate from samba-common-bin and samba
+ packages to python3-samba. This is an Active Directory stuff, not
+ needed for a stand-alone server or a client, but might be useful
+ for auth-only (neither file-server nor file-client) AD installs
+ Closes: #1068360
+ * remove addshare.py, setoption.py and source_samba.py python scripts
+ These aren't used by samba packages and are hardly useful generally, esp.
+ having in mind their unusual locations. The apport hook (source_samba.py)
+ is mostly obsolete, it hasn't been updated for a very long time.
+ * add make-python-optional.diff, so python3 can be made optional
+ for samba-common-bin
+ * remove python3-samba and python from Depends of samba and samba-common-bin
+ packages, moving it to Recommends. This lets the user to install a stand-
+ alone samba file server without any Active Directory bits and even without
+ python interpreter
+ * d/samba.install: do not install samba_downgrade_db (to old pre-4.8 version)
+ * move smbcontrol binary from samba to samba-common-bin,
+ since it can also be used to control winbindd
+ * d/control: tdb-tools (tdbbackup) are run from python modules,
+ move from samba:Depends to python3-samba:Recommends
+ * d/control: samba: no need to depend on libpam-runtime or libpam-modules
+ * d/control: samba: no need to recommend samba-ad-provision
+ * debian/TODO: update a bit, remove many obsolete entries
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sun, 26 May 2024 17:48:13 +0300
+
+samba (2:4.20.1+dfsg-1~progress7.99u1) graograman-backports; urgency=medium
+
+ * Uploading to graograman-backports, remaining changes:
+ - Updating maintainer field.
+ - Updating uploaders field.
+ - Updating bugs field.
+ - Updating vcs fields.
+ - Building without dpkg-vendor.
+ - Reverting t64 migration for backports.
+ * Merging upstream version 2:4.20.1+dfsg.
+ * Merging debian version 2:4.20.1+dfsg-1.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 08 May 2024 15:06:44 +0200
+
samba (2:4.20.1+dfsg-1) unstable; urgency=medium
* new upstream major release
diff --git a/debian/control b/debian/control
index b22e64c..c40492c 100644
--- a/debian/control
+++ b/debian/control
@@ -11,13 +11,13 @@ XSBC-Original-Uploaders: Steve Langasek <vorlon@debian.org>,
Michael Tokarev <mjt@tls.msk.ru>
Bugs: mailto:maintainers@lists.progress-linux.org
Homepage: https://www.samba.org
-Standards-Version: 4.6.2
+Standards-Version: 4.7.0
Build-Depends:
- dpkg-dev (>= 1.22.5) <!pkg.samba.before-trixie>,
debhelper-compat (= 13),
dh-exec,
Build-Depends-Arch:
dh-sequence-python3,
+ dpkg-dev (>= 1.22.5) <!pkg.samba.before-trixie>,
# tools:
bison,
docbook-xml, docbook-xsl, xsltproc,
@@ -43,7 +43,7 @@ Build-Depends-Arch:
# the same [arch list] is in rules (with-ceph) and ctdb.install
libcephfs-dev [amd64 arm64 mips64el ppc64el riscv64 s390x],
librados-dev [amd64 arm64 mips64el ppc64el riscv64 s390x],
- libcmocka-dev (>= 1.1.3),
+ libcmocka-dev,
libcups2-dev,
libdbus-1-dev,
libglusterfs-dev [amd64 arm64 ppc64el ppc64 riscv64 mips64el s390x ia64 sparc64],
@@ -51,7 +51,7 @@ Build-Depends-Arch:
libgpgme11-dev,
libicu-dev,
libjansson-dev,
- libkeyutils-dev,
+ libkeyutils-dev [linux-any],
libkrb5-dev (>= 1.21.0~) <pkg.samba.mitkrb5>,
libldap2-dev,
liblmdb-dev,
@@ -62,11 +62,11 @@ Build-Depends-Arch:
libreadline-dev,
libtirpc-dev,
libsystemd-dev [linux-any],
- libtasn1-6-dev (>= 3.8),
+ libtasn1-6-dev,
libtasn1-bin,
liburing-dev [linux-any],
xfslibs-dev [linux-any],
- zlib1g-dev (>= 1:1.2.3),
+ zlib1g-dev,
# python (+#904999):
python3-dev:any | python3-dev, libpython3-dev,
python3-dnspython,
@@ -90,31 +90,18 @@ Package: samba
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: passwd,
- libpam-modules,
- libpam-runtime (>= 1.0.1-11),
procps,
- python3,
- python3-dnspython,
- python3-samba (= ${binary:Version}),
samba-common (= ${source:Version}),
samba-common-bin (=${binary:Version}),
- tdb-tools,
${misc:Depends},
${python3:Depends},
${shlibs:Depends}
Recommends: attr,
- python3-markdown,
- samba-dsdb-modules,
samba-vfs-modules,
- samba-ad-provision,
-Suggests: bind9 (>= 1:9.5.1),
- bind9utils,
- ctdb,
- ldb-tools,
- ntp | chrony (>= 3.0-1),
+ python3-samba,
+Suggests: ctdb,
ufw,
winbind
-Enhances: bind9, ntp
Breaks: samba-ad-provision (<< ${source:Upstream-Version})
Description: SMB/CIFS file, print, and login server for Unix
Samba is an implementation of the SMB/CIFS protocol for Unix systems,
@@ -177,21 +164,16 @@ Description: common files used by both the Samba server and client
Package: samba-common-bin
Architecture: any
-Depends: python3,
- python3-samba,
- samba-common (=${source:Version}),
- samba-libs (= ${binary:Version}),
+Depends: samba-common (= ${source:Version}),
${misc:Depends},
${python3:Depends},
${shlibs:Depends}
-Recommends: samba-dsdb-modules
+Recommends: python3-samba,
Suggests: heimdal-clients,
- python3-markdown,
- python3-dnspython
-# moved samba-dcerpcd samba=>samba-common-bin in in 4.16.2+dfsg-1
# moved libnet-keytab-samba4.so.0 & libRPC-WORKER-samba4.so.0 samba-libs=>samba-common-bin in 4.19.0~r1
-Replaces: samba (<< 2:4.16.2+dfsg-1~), samba-libs (<< 2:4.19.0~)
-Breaks: samba (<< 2:4.16.2+dfsg-1~), samba-libs (<< 2:4.19.0~)
+# moved smbcontrol samba=>samba-common-bin in 4.20.0-2
+Replaces: samba (<< 2:4.20.1+dfsg-2~), samba-libs (<< 2:4.19.0~)
+Breaks: samba (<< 2:4.20.1+dfsg-2~), samba-libs (<< 2:4.19.0~)
Description: Samba common files used by both the server and the client
Samba is an implementation of the SMB/CIFS protocol for Unix systems,
providing support for cross-platform file sharing with Microsoft Windows, OS X,
@@ -203,17 +185,33 @@ Description: Samba common files used by both the server and the client
package).
Package: samba-ad-dc
-Architecture: all
+Architecture: any
Multi-Arch: foreign
Pre-Depends: ${misc:Pre-Depends}
-Depends: samba (>= ${source:Version}~), samba-dsdb-modules, samba-vfs-modules,
- winbind,
- krb5-kdc (>= 1.21.0~) <pkg.samba.mitkrb5>,
- ${misc:Depends}
+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},
+ ${shlibs:Depends},
+ ${misc:Depends}
Recommends: libnss-winbind, libpam-winbind,
# samba-ad-provision is needed for setup only
samba-ad-provision
-Breaks: samba-ad-provision (<< ${source:Upstream-Version})
+Suggests: bind9,
+ bind9utils,
+ ldb-tools,
+ ntp | chrony,
+Enhances: bind9, ntp
+Breaks: samba-ad-provision (<< ${source:Upstream-Version}),
+# files moved from samba & samba-common-bin in 4.20.1-2:
+ samba-common-bin (<< 2:4.20.1+dfsg-2~),
+Replaces: samba-common-bin (<< 2:4.20.1+dfsg-2~),
+# Breaks+Replaces upgraded to Conflicts for DEP17 + /usr-move
+Conflicts: samba (<< 2:4.20.1+dfsg-2~),
Description: Samba control files to run AD Domain Controller
Samba is an implementation of the SMB/CIFS protocol for Unix systems,
providing support for cross-platform file and printer sharing with
@@ -292,7 +290,7 @@ Package: samba-dev
Architecture: any
Multi-Arch: same
Depends: libc6-dev,
- libldb-dev (>= 2:2),
+ libldb-dev,
libpopt-dev,
libtalloc-dev,
libtdb-dev,
@@ -323,10 +321,15 @@ Depends: python3-ldb,
${misc:Depends},
${python3:Depends},
${shlibs:Depends}
+Breaks:
+# samba-tool & samba-gpupdate moved from samba-common-bin & samba in 4.20.1-2:
+ samba-common-bin (<< 2:4.20.1+dfsg-2~), samba (<< 2:4.20.1+dfsg-2~),
Replaces:
+ samba-common-bin (<< 2:4.20.1+dfsg-2~), samba (<< 2:4.20.1+dfsg-2~),
# libsamba-policy & helpers and dckeytab python libs moved to python3-samba
- samba-libs (<< 2:4.16.0+dfsg-1~), samba (<< 2:4.16.0+dfsg-1~)
-Recommends: python3-gpg
+ samba-libs (<< 2:4.16.0+dfsg-1~),
+Recommends: python3-gpg,
+ tdb-tools,
Description: Python 3 bindings for Samba
Samba is an implementation of the SMB/CIFS protocol for Unix systems,
providing support for cross-platform file sharing with Microsoft Windows, OS X,
@@ -459,8 +462,7 @@ Section: admin
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
-Depends: libpam-runtime (>= 1.0.1-6),
- libpam0g (>= 1.1.3-2~),
+Depends: libpam-runtime,
winbind:any (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
diff --git a/debian/not-installed b/debian/not-installed
index 4e8df92..98436ec 100644
--- a/debian/not-installed
+++ b/debian/not-installed
@@ -5,3 +5,6 @@ usr/share/samba/setup
# new experimental windows search client
usr/bin/wspsearch
usr/share/man/man1/wspsearch.1
+# downgrade db to pre-4.8 version, hardly needed anymore:
+usr/sbin/samba_downgrade_db
+usr/share/man/man8/samba_downgrade_db.8
diff --git a/debian/panic-action b/debian/panic-action
index 7b73024..7b73024 100644..100755
--- a/debian/panic-action
+++ b/debian/panic-action
diff --git a/debian/patches/make-python-optional.diff b/debian/patches/make-python-optional.diff
new file mode 100644
index 0000000..4cf50f6
--- /dev/null
+++ b/debian/patches/make-python-optional.diff
@@ -0,0 +1,25 @@
+From: Michael Tokarev <mjt@tls.msk.ru>
+Subject: samba-log-parser: make python optional
+Date: Sun, 26 May 2024 14:40:40 +0300
+Forwarded: not-needed
+Debian-Specific: yes
+
+samba-log-parser is a rarely used utility written in python.
+It is the only python program in the samba-common-bin package.
+By using this simple trick (wrapping the script into #!/bin/sh)
+we can make the python package optional, to be able to install
+minimal samba client.
+
+--- a/source3/script/samba-log-parser
++++ b/source3/script/samba-log-parser
+@@ -1,4 +1,9 @@
+-#!/usr/bin/env python3
++#! /bin/sh
++""":"
++[ -x /usr/bin/python3 ] && exec /usr/bin/python3 "$0" "$@"
++echo "This program requires python3. Please install python3 package to use it." >&2
++exit 42
++":"""
+ #
+ #######################################################################
+ #
diff --git a/debian/patches/series b/debian/patches/series
index b06c91a..681595b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -25,3 +25,4 @@ silence-can-not-convert-group-sid.diff
edns0.patch
passchange-error-message.patch
lower-dns-lookup-mismatch-messages.patch
+make-python-optional.diff
diff --git a/debian/python3-samba.install b/debian/python3-samba.install
index 2a0e9a6..7eaff83 100644
--- a/debian/python3-samba.install
+++ b/debian/python3-samba.install
@@ -2,3 +2,8 @@ usr/lib/python3*/*-packages/samba
usr/lib/*/libsamba-policy.cpython-*.so.*
usr/lib/*/samba/libsamba-net.cpython-*.so.*
usr/lib/*/samba/libsamba-python.cpython-*.so.0
+
+usr/bin/samba-tool
+usr/share/man/man8/samba-tool.8
+usr/sbin/samba-gpupdate
+usr/share/man/man8/samba-gpupdate.8
diff --git a/debian/rules b/debian/rules
index bd00724..1142fe1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -252,12 +252,8 @@ override_dh_auto_install-arch:
# pam stuff
install -Dp -m0644 debian/winbind.pam-config debian/tmp/usr/share/pam-configs/winbind
mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnss_* debian/tmp/lib/$(DEB_HOST_MULTIARCH)/
- # Debian goodies to set global option in smb.conf and add a share
- install -p -m0755 debian/setoption.py -t debian/tmp/usr/share/samba/
- install -p -m0755 debian/addshare.py -t debian/tmp/usr/share/samba/
install -p -m755 debian/update-apparmor-samba-profile -t debian/tmp/usr/share/samba/
install -Dp -m0644 debian/samba.ufw.profile debian/tmp/etc/ufw/applications.d/samba
- install -Dp -m0644 debian/source_samba.py -t debian/tmp/usr/share/apport/package-hooks/
# install-and-rename docs for ctdb (also arch-specific)
mkdir -p debian/tmp/ctdb
install -p ctdb/config/events/README debian/tmp/ctdb/README.notification
@@ -291,9 +287,6 @@ override_dh_auto_install-indep:
ifeq (${DEB_VENDOR}, Ubuntu)
patch debian/samba-common/usr/share/samba/smb.conf debian/smb.conf.ubuntu.diff
endif
- install -Dp -m0755 debian/panic-action -t debian/samba-common/usr/share/samba/
- install -Dp -m0755 debian/is-configured -t debian/samba-common/usr/share/samba/
- install -Dp -m0644 debian/gdbcommands -t debian/samba-common/etc/samba/
# we wrongly have pam file in samba-common instead of samba
install -Dp -m0644 debian/samba.pam debian/samba-common/etc/pam.d/samba
@@ -312,8 +305,8 @@ ifpkg = $(if $(filter ${1},${build-pkgs}),${2})
override_dh_installinit:
ifneq (,$(filter samba, ${build-pkgs}))
dh_installinit -psamba --name smbd
- dh_installinit -psamba --name nmbd --error-handler nmbd_error_handler
- dh_installinit -psamba --name samba-ad-dc
+ dh_installinit -psamba --name nmbd
+ dh_installinit -psamba-ad-dc
endif
$(call ifpkg, winbind, dh_installinit -pwinbind)
ifneq (,$(filter ctdb, ${build-pkgs}))
@@ -326,7 +319,7 @@ override_dh_installsystemd:
ifneq (,$(filter samba, ${build-pkgs}))
dh_installsystemd -psamba --name=smbd
dh_installsystemd -psamba --name=nmbd
- dh_installsystemd -psamba --name=samba-ad-dc
+ dh_installsystemd -psamba-ad-dc
endif
$(call ifpkg, winbind, dh_installsystemd -pwinbind)
$(call ifpkg, ctdb, dh_installsystemd -pctdb --no-start --no-stop-on-upgrade)
diff --git a/debian/samba.samba-ad-dc.init b/debian/samba-ad-dc.init
index d88ca31..d88ca31 100644..100755
--- a/debian/samba.samba-ad-dc.init
+++ b/debian/samba-ad-dc.init
diff --git a/debian/samba-ad-dc.install b/debian/samba-ad-dc.install
new file mode 100644
index 0000000..baa0849
--- /dev/null
+++ b/debian/samba-ad-dc.install
@@ -0,0 +1,6 @@
+usr/sbin/samba
+usr/share/man/man8/samba.8
+usr/sbin/samba_dnsupdate
+usr/sbin/samba_spnupdate
+usr/sbin/samba_upgradedns
+usr/sbin/samba_kcc
diff --git a/debian/samba-ad-dc.lintian-overrides b/debian/samba-ad-dc.lintian-overrides
new file mode 100644
index 0000000..f3c2287
--- /dev/null
+++ b/debian/samba-ad-dc.lintian-overrides
@@ -0,0 +1,3 @@
+# begin-remove-after: trixie
+diversion-for-unknown-file lib/systemd/system/samba-ad-dc.service [preinst:*]
+# end-remove-after
diff --git a/debian/samba-ad-dc.postinst b/debian/samba-ad-dc.postinst
new file mode 100644
index 0000000..ddc75ea
--- /dev/null
+++ b/debian/samba-ad-dc.postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# begin-remove-after: released:trixie
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+ dpkg-divert --package #PACKAGE# --no-rename \
+ --divert /lib/systemd/system/samba-ad-dc.service.usr-is-merged \
+ --remove /lib/systemd/system/samba-ad-dc.service
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/samba-ad-dc.preinst b/debian/samba-ad-dc.preinst
new file mode 100644
index 0000000..b6f6b71
--- /dev/null
+++ b/debian/samba-ad-dc.preinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# begin-remove-after: released:trixie
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "upgrade" ] || [ "$1" = "install" ]; then
+ dpkg-divert --package #PACKAGE# --no-rename \
+ --divert /lib/systemd/system/samba-ad-dc.service.usr-is-merged \
+ --add /lib/systemd/system/samba-ad-dc.service
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/samba.samba-ad-dc.service b/debian/samba-ad-dc.service
index fdee735..fdee735 100644
--- a/debian/samba.samba-ad-dc.service
+++ b/debian/samba-ad-dc.service
diff --git a/debian/samba-common-bin.NEWS b/debian/samba-common-bin.NEWS
new file mode 100644
index 0000000..de3a2c9
--- /dev/null
+++ b/debian/samba-common-bin.NEWS
@@ -0,0 +1,9 @@
+samba (2:4.20.1+dfsg-1) unstable; urgency=medium
+
+ The tool samba-tool (python-based) has been moved from samba-common-bin
+ to python3-samba package. This is to avoid dependency on python modules
+ for minimal samba client installation. If you rely on samba-tool, please
+ ensure that the (optional in some configurations) python3-samba package is
+ also installed.
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sun, 26 May 2024 13:59:14 +0300
diff --git a/debian/samba-common-bin.install b/debian/samba-common-bin.install
index 696aa04..0a95d76 100644
--- a/debian/samba-common-bin.install
+++ b/debian/samba-common-bin.install
@@ -3,25 +3,21 @@ usr/bin/net
usr/bin/nmblookup
usr/bin/samba-log-parser
usr/bin/samba-regedit
-usr/bin/samba-tool
+usr/bin/smbcontrol
usr/bin/smbpasswd
usr/bin/testparm
-usr/sbin/samba_kcc
-usr/share/apport/package-hooks/source_samba.py
usr/share/man/man1/dbwrap_tool.1
usr/share/man/man1/nmblookup.1
usr/share/man/man1/samba-log-parser.1
usr/share/man/man1/testparm.1
usr/share/man/man5/lmhosts.5
usr/share/man/man5/smb.conf.5
+usr/share/man/man1/smbcontrol.1
usr/share/man/man5/smbpasswd.5
usr/share/man/man7/samba.7
usr/share/man/man8/net.8
usr/share/man/man8/samba-regedit.8
-usr/share/man/man8/samba-tool.8
usr/share/man/man8/smbpasswd.8
-usr/share/samba/addshare.py
-usr/share/samba/setoption.py
# used by usr/bin/net only:
usr/lib/*/samba/libnet-keytab-private-samba.so.0
# used by usr/libexec/samba/rpcd_*:
diff --git a/debian/samba-common-bin.lintian-override b/debian/samba-common-bin.lintian-override
index b8e510a..79287f6 100644
--- a/debian/samba-common-bin.lintian-override
+++ b/debian/samba-common-bin.lintian-override
@@ -1,2 +1,4 @@
# deliberate, a synonym for misspelled parameter
samba-common-bin: typo-in-manual-page prefered preferred */man/man5/smb.conf.5*
+# python script wrapped in #!/bin/sh
+samba-common-bin: bash-term-in-posix-shell *usr/bin/samba-log-parser*
diff --git a/debian/samba-common.install b/debian/samba-common.install
new file mode 100644
index 0000000..7986e10
--- /dev/null
+++ b/debian/samba-common.install
@@ -0,0 +1,3 @@
+debian/is-configured usr/share/samba/
+debian/panic-action usr/share/samba/
+debian/gdbcommands etc/samba/
diff --git a/debian/samba.NEWS b/debian/samba.NEWS
index 5f4c14f..ddf0709 100644
--- a/debian/samba.NEWS
+++ b/debian/samba.NEWS
@@ -1,3 +1,13 @@
+samba (2:4.20.1+dfsg-2) unstable; urgency=medium
+
+ Active Directory Domain Controller (AD-DC) functionality has been split out
+ of main samba (the file server) package into its own separate package named
+ samba-ad-dc. This includes the samba binary, the startup files and a few
+ support executables. Please additionally install samba-ad-dc package if
+ you need AD-DC functionality on your system.
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sun, 26 May 2024 13:44:07 +0300
+
samba (2:4.6.5+dfsg-5) unstable; urgency=medium
The samba service has been removed. Use the individual services instead:
diff --git a/debian/samba.install b/debian/samba.install
index 498557c..e58aecf 100755
--- a/debian/samba.install
+++ b/debian/samba.install
@@ -6,7 +6,6 @@ usr/bin/oLschema2ldif
usr/bin/pdbedit
usr/bin/profiles
usr/bin/sharesec
-usr/bin/smbcontrol
usr/bin/smbstatus
<!pkg.samba.mitkrb5> usr/lib/*/samba/libHDB-SAMBA4-private-samba.so.0
<!pkg.samba.mitkrb5> usr/lib/*/samba/libgss-preauth-private-samba.so.0
@@ -18,27 +17,17 @@ usr/libexec/samba/samba-bgqd
usr/lib/*/samba/service/*.so
usr/sbin/eventlogadm
usr/sbin/nmbd
-usr/sbin/samba
-usr/sbin/samba-gpupdate
-usr/sbin/samba_dnsupdate
-usr/sbin/samba_downgrade_db
-usr/sbin/samba_spnupdate
-usr/sbin/samba_upgradedns
usr/sbin/smbd
usr/share/man/man1/log2pcap.1
usr/share/man/man1/mvxattr.1
usr/share/man/man1/oLschema2ldif.1
usr/share/man/man1/profiles.1
usr/share/man/man1/sharesec.1
-usr/share/man/man1/smbcontrol.1
usr/share/man/man1/smbstatus.1
usr/share/man/man8/eventlogadm.8
usr/share/man/man8/nmbd.8
usr/share/man/man8/pdbedit.8
usr/share/man/man8/samba-bgqd.8
-usr/share/man/man8/samba_downgrade_db.8
-usr/share/man/man8/samba-gpupdate.8
-usr/share/man/man8/samba.8
usr/share/man/man8/smbd.8
usr/share/samba/admx/
usr/share/samba/mdssvc/elasticsearch_mappings.json
diff --git a/debian/samba.postinst b/debian/samba.postinst
index ceb0b64..f15dfa5 100644
--- a/debian/samba.postinst
+++ b/debian/samba.postinst
@@ -2,23 +2,6 @@
set -e
-nmbd_error_handler() {
- if [ -d /sys/class/net/lo ] && ls /sys/class/net | grep -qv ^lo$; then
- # https://bugs.debian.org/893762
- echo 'WARNING: nmbd failed to start as there is no non-loopback interfaces available.'
- echo 'Either add an interface or set "disable netbios = yes" in smb.conf'
- return 0
- elif command -v ip > /dev/null && ip a show | grep '^[[:space:]]*inet ' | grep -vq ' lo$'; then
- # https://bugs.debian.org/859526
- echo 'WARNING: nmbd failed to start as there is no local IPv4 non-loopback interfaces available.'
- echo 'Either add an IPv4 address or set "disable netbios = yes" in smb.conf'
- return 0
- else
- echo 'ERROR: nmbd failed to start.'
- return 1 # caught by set -e
- fi
-}
-
# We generate several files during the postinst, and we don't want
# them to be readable only by root.
umask 022
diff --git a/debian/setoption.py b/debian/setoption.py
deleted file mode 100755
index a3f3695..0000000
--- a/debian/setoption.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/python3
-# Helper to set a global option in the samba configuration file
-# Eventually this should be replaced by a call to samba-tool, but
-# for the moment that doesn't support setting individual configuration options.
-
-import optparse
-import os
-import re
-import shutil
-import stat
-import tempfile
-
-parser = optparse.OptionParser()
-parser.add_option("--configfile", type=str, metavar="CONFFILE",
- help="Configuration file to use", default="/etc/samba/smb.conf")
-
-(opts, args) = parser.parse_args()
-if len(args) != 2:
- parser.print_usage()
-
-(key, value) = args
-inglobal = False
-done = False
-
-inf = open(opts.configfile, 'r')
-(fd, fn) = tempfile.mkstemp()
-outf = os.fdopen(fd, 'w')
-
-for l in inf.readlines():
- m = re.match(r"^\s*\[([^]]+)\]$", l)
- if m:
- if inglobal and not done:
- outf.write(" %s = %s\n" % (key, value))
- done = True
- inglobal = (m.groups(1)[0] in ("global", "globals"))
- elif inglobal and re.match(r"^(\s*)" + key + r"(\s*)=.*$", l):
- l = re.sub(r"^(\s*)" + key + r"(\s*)=.*$",
- r"\1" + key + r"\2=\2" + value, l)
- done = True
- outf.write(l)
-
-if not done:
- outf.write("%s = %s\n" % (key, value))
-
-os.fchmod(fd, stat.S_IMODE(os.stat(opts.configfile).st_mode))
-outf.close()
-shutil.move(fn, opts.configfile)
diff --git a/debian/source_samba.py b/debian/source_samba.py
deleted file mode 100644
index 1d30625..0000000
--- a/debian/source_samba.py
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/python3
-
-'''Samba Apport interface
-
-Copyright (C) 2010 Canonical Ltd/
-Author: Chuck Short <chuck.short@canonical.com>
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2 of the License, or (at your
-option) any later version. See http://www.gnu.org/copyleft/gpl.html for
-the full text of the license.
-'''
-
-import os
-from subprocess import PIPE, Popen
-from apport.hookutils import *
-
-def run_testparm():
- '''
- Run the samba testparm(1) utility against /etc/samba/smb.conf.
-
- We do not use apport's command_output() method here because:
- - we need to discard stdout, as that includes smb.conf
- - we want to know if its exit status is not zero, but that in itself
- is not an error in the test itself. command_output() would say the
- command failed and that would be confusing.
-
- Returns stderr and the exit code (as a string) of testparm as a tuple or
- None in the case of an error.
- '''
- command = ['testparm', '-s', '/etc/samba/smb.conf']
- try:
- testparm = Popen(command, stdout=PIPE, stderr=PIPE)
- except OSError:
- return None
- _, err = testparm.communicate()
- exit_code = testparm.wait()
- return (err, str(exit_code))
-
-
-def recent_smblog(pattern):
- '''Extract recent messages from log.smbd or messages which match a regex
- pattern should be a "re" object. '''
- lines = ''
- if os.path.exists('/var/log/samba/log.smbd'):
- file = '/var/log/samba/log.smbd'
- else:
- return lines
-
- for line in open(file):
- if pattern.search(line):
- lines += line
- return lines
-
-def recent_nmbdlog(pattern):
- ''' Extract recent messages from log.nmbd or messages which match regex
- pattern should be a "re" object. '''
- lines = ''
- if os.path.exists('/var/log/samba/log.nmbd'):
- file = '/var/log/samba/log.nmbd'
- else:
- return lines
-
- for line in open(file):
- if pattern.search(line):
- lines += line
- return lines
-
-def add_info(report, ui):
- packages = ['samba', 'samba-common-bin', 'samba-common', 'samba-tools', 'smbclient', 'swat',
- 'samba-doc', 'samba-doc-pdf', 'smbfs', 'libpam-smbpass', 'libsmbclient', 'libsmbclient-dev',
- 'winbind', 'samba-dbg', 'libwbclient0']
-
- versions = ''
- for package in packages:
- try:
- version = packaging.get_version(package)
- except ValueError:
- version = 'N/A'
- if version is None:
- version = 'N/A'
- versions += '%s %s\n' %(package, version)
- report['SambaInstalledVersions'] = versions
-
-
- # Interactive report
- # start by checking if /etc/samba/smb.conf exists
- if not os.path.exists ('/etc/samba/smb.conf'):
- ui.information("The configuration file '/etc/samba/smb.conf' does not exist. This file, and its contents, are critical for the operation of the SAMBA package(s). A common situation for this is:\n * you removed (but did not purge) SAMBA;\n * later on, you (or somebody) manually deleted '/etc/samba/smb.conf;\n * you reinstalled SAMBA.\nAs a result, this file is *not* reinstalled. If this is your case, please purge samba-common (e.g., sudo apt-get purge samba-common) and then reinstall SAMBA.\nYou may want to check other sources, like: https://answers.launchpad.net, https://help.ubuntu.com, and http://ubuntuforums.org. Please press any key to end apport's bug collection.")
- raise StopIteration # we are out
-
- ui.information("As a part of the bug reporting process, you'll be asked as series of questions to help provide a more descriptive bug report. Please answer the following questions to the best of your abilities. Afterwards, a browser will be opened to finish filing this as a bug in the Launchpad bug tracking system.")
-
- response = ui.choice("How would you best describe your setup?", ["I am running a Windows File Server.", "I am connecting to a Windows File Server."], False)
-
- if response == None:
- raise StopIteration # user has canceled
- elif response[0] == 0: #its a server
- response = ui.yesno("Did this used to work properly with a previous release?")
- if response == None: # user has canceled
- raise StopIteration
- if response == False:
- report['SambaServerRegression'] = "No"
- if response == True:
- report['SambaServerRegression'] = 'Yes'
-
- response = ui.choice("Which clients are failing to connect?", ["Windows", "Ubuntu", "Both", "Other"], False)
- if response == None:
- raise StopIteration # user has canceled
- if response[0] == 0:
- report['UbuntuFailedConnect'] = 'Yes'
- if response[0] == 1:
- report['WindowsFailedConnect'] = 'Yes'
- if response[0] == 2:
- report['BothFailedConnect'] = 'Yes'
- if response[0] == 3:
- report['OtherFailedConnect'] = 'Yes'
-
- response = ui.yesno("The contents of your /etc/samba/smb.conf file may help developers diagnose your bug more quickly. However, it may contain sensitive information. Do you want to include it in your bug report?")
- if response == None:
- raise StopIteration
- if response == False:
- report['SmbConfIncluded'] = 'No'
- if response == True:
- report['SmbConfIncluded'] = 'Yes'
- attach_file_if_exists(report, '/etc/samba/smb.conf', key='SMBConf')
- if command_available('testparm') and os.path.exists('/etc/samba/smb.conf'):
- testparm_result = run_testparm()
- testparm_response = ui.yesno("testparm(1) is a samba utility that will check /etc/samba/smb.conf for correctness and report issues it may find. Do you want to include its stderr output in your bug report? If you answer no, then we will only include its numeric exit status.")
- if testparm_response == None:
- raise StopIteration
- if testparm_response == True:
- if testparm_result:
- report['TestparmStderr'], report['TestparmExitCode'] = testparm_result
- else: # only include the exit code
- report['TestparmExitCode'] = testparm_result[1]
-
- response = ui.yesno("The contents of your /var/log/samba/log.smbd and /var/log/samba/log.nmbd may help developers diagnose your bug more quickly. However, it may contain sensitive information. Do you want to include it in your bug report?")
- if response == None:
- raise StopIteration
- elif response == False:
- ui.information("The contents of your /var/log/samba/log.smbd and /var/log/samba/log.nmbd will NOT be included in the bug report.")
- elif response == True:
- sec_re = re.compile('failed', re.IGNORECASE)
- report['SmbLog'] = recent_smblog(sec_re)
- report['NmbdLog'] = recent_nmbdlog(sec_re)
-
- elif response[0] == 1: #its a client
- response = ui.yesno("Did this used to work properly with a previous release?")
- if response == None: #user has canceled
- raise StopIteration
- if response == False:
- report['SambaClientRegression'] = "No"
- if response == True:
- report['SambaClientRegression'] = "Yes"
-
- response = ui.choice("How is the remote share accessed from the Ubuntu system?", ["Nautilus (or other GUI Client)", "smbclient (from the command line)", "cifs filesystem mount (from /etc/fstab or a mount command)"], False)
- if response == None: #user has canceled
- raise StopIteration
- if response[0] == 0:
- attach_related_packages(report, ['nautilus', 'gvfs'])
- if response[0] == 1:
- ui.information("Please attach the output of 'smbclient -L localhost' to the end of this bug report.")
- if response[0] == 2:
- report['CIFSMounts'] = command_output(['findmnt', '-n', '-t', 'cifs'])
- if os.path.exists('/proc/fs/cifs/DebugData'):
- report['CifsVersion'] = command_output(['cat', '/proc/fs/cifs/DebugData'])
-
- ui.information("After apport finishes collecting information, please document your steps to reproduce the issue when filling out the bug report.")