[Pkg-samba-maint] [samba] 06/11: Remove pre-jessie maintscript snipsets

Mathieu Parent sathieu at moszumanska.debian.org
Thu Jun 29 08:02:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

sathieu pushed a commit to branch master
in repository samba.

commit faf7fac1d26e57e39ed3351d979b3ac307054ecb
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Wed Jun 28 11:27:48 2017 +0200

    Remove pre-jessie maintscript snipsets
---
 debian/samba-ad-dc.config        | 10 ----------
 debian/samba-ad-dc.postinst      | 14 ++------------
 debian/samba-ad-dc.templates     |  8 --------
 debian/samba-common-bin.postinst | 16 ----------------
 debian/samba-common.maintscript  |  1 -
 debian/samba-common.postinst     | 10 ----------
 debian/samba-common.preinst      | 11 -----------
 debian/samba-libs.preinst        |  9 ---------
 debian/samba.maintscript         |  1 -
 debian/samba.postinst            | 41 ----------------------------------------
 debian/samba.preinst             | 18 ------------------
 11 files changed, 2 insertions(+), 137 deletions(-)

diff --git a/debian/samba-ad-dc.config b/debian/samba-ad-dc.config
index aef1cf0..44e337b 100755
--- a/debian/samba-ad-dc.config
+++ b/debian/samba-ad-dc.config
@@ -21,16 +21,6 @@ if [ -z "$REALM" ]; then
 fi
 db_set samba4/realm "$REALM"
 
-#
-# Are we upgrading from Samba 3, and already have a configuration file?
-# If so, the user might want to try the automatic upgrading.
-#
-if [ -n "$2" ] && dpkg --compare-versions "$2" lt "3.9.0"; then
-	if [ -f /etc/samba/smb.conf ]; then
-		db_input medium samba4/upgrade-from-v3 || true
-	fi
-fi
-
 db_input high samba4/server-role || true
 db_go
 db_get samba4/server-role
diff --git a/debian/samba-ad-dc.postinst b/debian/samba-ad-dc.postinst
index 1f8921f..7a5c273 100644
--- a/debian/samba-ad-dc.postinst
+++ b/debian/samba-ad-dc.postinst
@@ -23,23 +23,13 @@ if [ "$1" = "configure" -a "$SERVER_ROLE" != "none" ]; then
 		fi
 	fi
 
-	# See if we're upgrading from Samba 3
-	if [ ! -z "$2" ] && dpkg --compare-versions "$2" lt "3.9.0"; then
-		db_get samba4/upgrade-from-v3 || true
-		if [ "$RET" = "true" ]; then
-			samba-tool domain samba3upgrade --dbdir=/var/lib/samba
-		fi
-	elif [ ! -z "$2" ] && dpkg --compare-versions "$2" lt "4.0.0~alpha12"; then
-		# Upgrade from previous Samba 4 installation
-		if [ -f /etc/samba/smb.conf ]; then
-			samba-tool domain upgradeprovision --full
-		fi
-	elif [ -e /var/lib/samba/private/sam.ldb ]; then
+	if [ -e /var/lib/samba/private/sam.ldb ]; then
 		# Upgrade from previous Samba 4 installation
 		if [ -f /etc/samba/smb.conf ]; then
 			samba-tool dbcheck --fix --yes
 		fi
 	fi
+
 	# Provision from scratch if we need to
 	if [ ! -e /var/lib/samba/private/sam.ldb ]; then
 		db_get samba4/admin_password
diff --git a/debian/samba-ad-dc.templates b/debian/samba-ad-dc.templates
index af24031..0f5bac7 100644
--- a/debian/samba-ad-dc.templates
+++ b/debian/samba-ad-dc.templates
@@ -1,11 +1,3 @@
-Template: samba4/upgrade-from-v3
-Type: boolean
-Default: true
-_Description: Upgrade from Samba 3?
- It is possible to migrate the existing configuration files from Samba 3 to
- Samba 4. This is likely to fail for complex setups, but should provide a
- good starting point for most existing installations.
-
 Template: samba4/server-role
 Type: select
 Choices: domain controller, member, standalone, none
diff --git a/debian/samba-common-bin.postinst b/debian/samba-common-bin.postinst
deleted file mode 100644
index 7b8c3be..0000000
--- a/debian/samba-common-bin.postinst
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-set -e 
-
-if dpkg --compare-versions "$2" lt-nl 2:4.0.12+dfsg-2~; then
-	for alternative in nmblookup net testparm; do
-		if update-alternatives --list $alternative >/dev/null 2>&1
-		then
-			update-alternatives --remove-all $alternative
-		fi
-	done
-fi
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/samba-common.maintscript b/debian/samba-common.maintscript
index 82d329c..e69de29 100644
--- a/debian/samba-common.maintscript
+++ b/debian/samba-common.maintscript
@@ -1 +0,0 @@
-mv_conffile /etc/dhcp3/dhclient-enter-hooks.d/samba /etc/dhcp/dhclient-enter-hooks.d/samba 2:4.1.4+dfsg-2~
diff --git a/debian/samba-common.postinst b/debian/samba-common.postinst
index e28c318..56d7a64 100644
--- a/debian/samba-common.postinst
+++ b/debian/samba-common.postinst
@@ -96,13 +96,3 @@ fi
 db_stop
 
 #DEBHELPER#
-
-# Clean up the now-empty dir which our conffile was previously in,
-# since it wasn't empty at the time dpkg could automatically remove it
-# for us.
-if dpkg --compare-versions "$2" lt-nl 2:4.1.4+dfsg-2~
-then
-	rmdir -p --ignore-fail-on-non-empty /etc/dhcp3/dhclient-enter-hooks.d
-fi
-
-
diff --git a/debian/samba-common.preinst b/debian/samba-common.preinst
deleted file mode 100644
index c4d0482..0000000
--- a/debian/samba-common.preinst
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ "$(readlink -f /etc/dhcp/dhclient-enter-hooks.d/samba)" = /etc/dhcp3/dhclient-enter-hooks.d/samba ] \
-   && dpkg --compare-versions "$2" le-nl 2:4.1.4+dfsg-2~
-then
-	rm -f /etc/dhcp/dhclient-enter-hooks.d/samba
-fi
-
-#DEBHELPER#
diff --git a/debian/samba-libs.preinst b/debian/samba-libs.preinst
index 5f419fe..accfe61 100644
--- a/debian/samba-libs.preinst
+++ b/debian/samba-libs.preinst
@@ -37,15 +37,6 @@ then
 			fi
 		fi
 	done
-
-	# bug #454770
-	# this is only relevant for upgrades from versions before 2:3.6.13-2
-	# this bug was never present in a stable release
-	if [ -e /etc/samba/idmap2.tdb ] \
-		&& ! [ -e /var/lib/samba/private/idmap2.tdb ]
-	then
-		mv /etc/samba/idmap2.tdb /var/lib/samba/private/idmap2.tdb
-	fi
 fi
 
 
diff --git a/debian/samba.maintscript b/debian/samba.maintscript
deleted file mode 100644
index 91bcd64..0000000
--- a/debian/samba.maintscript
+++ /dev/null
@@ -1 +0,0 @@
-rm_conffile /etc/network/if-up.d/samba 2:3.6.5-6~ samba
diff --git a/debian/samba.postinst b/debian/samba.postinst
index 787d802..6eb641b 100644
--- a/debian/samba.postinst
+++ b/debian/samba.postinst
@@ -10,47 +10,6 @@ set -e
 #	them to be readable only by root.
 umask 022
 
-if dpkg --compare-versions "$2" gt 2:4.0 &&
-	dpkg --compare-versions "$2" lt-nl 2:4.0.11+dfsg ; then
-	# CVE-2013-4475
-	KEYFILE=/var/lib/samba/private/tls/key.pem
-	if [ -e $KEYFILE ]
-	then
-		KEYPERMS=`stat -c %a $KEYFILE`
-		if [ "$KEYPERMS" != "600" ]
-		then
-			echo "moving world readable public key to /var/lib/samba/private/tls/CVE-2013-4475"
-			mkdir -m 700 /var/lib/samba/private/tls/CVE-2013-4475
-			mv -n /var/lib/samba/private/tls/*pem /var/lib/samba/private/tls/CVE-2013-4475
-		fi
-	fi
-fi
-
-if dpkg --compare-versions "$2" lt-nl 2:3.6.15-2; then
-	if [ -e /etc/default/samba ]; then
-		# this config file's one setting is now obsolete; remove it
-		# unconditionally
-		rm -f /etc/default/samba
-	fi
-
-	# Remove NetBIOS entries from /etc/inetd.conf
-	if [ -x "`which update-inetd 2>/dev/null`" ]; then
-		update-inetd --remove netbios-ssn
-	fi
-fi
-
-if dpkg --compare-versions "$2" lt-nl 2:4.0.12+dfsg-2~; then
-	if update-alternatives --list smbstatus >/dev/null 2>&1; then
-		update-alternatives --remove-all smbstatus
-	fi
-fi
-
-if dpkg --compare-versions "$2" lt-nl 2:4.1.13+dfsg-2~; then
-	# on upgrades from wheezy to jessie, the samba init script should not stay
-	# active, see #766690
-	update-rc.d samba remove
-fi
-
 # add the sambashare group
 if ! getent group sambashare > /dev/null 2>&1
 then
diff --git a/debian/samba.preinst b/debian/samba.preinst
deleted file mode 100644
index ae8cfaa..0000000
--- a/debian/samba.preinst
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-set -e
-
-# Deactivate the old qtsmbstatusd initscript that has dependencies
-# incompatible with the new samba initscript. This will allow to
-# configure the new samba package and qtsmbstatus-server afterwards.
-if [ "$1" = "upgrade" ] || [ "$1" = "install" ]; then
-	if [ -x "/etc/init.d/qtsmbstatusd" ]; then
-		version=$(dpkg-query -f '${Config-Version} ${Version}' -W qtsmbstatus-server 2>/dev/null | awk '{ print $1 }')
-		if dpkg --compare-versions "$version" lt-nl "2.2.1-3~" ; then
-			echo "Deactivating qtsmbstatusd temporarily..."
-			invoke-rc.d qtsmbstatusd stop
-			update-rc.d -f qtsmbstatusd remove
-		fi
-	fi
-fi
-
-#DEBHELPER#

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list