[Pkg-samba-maint] r4131 - trunk/samba/debian

idd-guest at alioth.debian.org idd-guest at alioth.debian.org
Sat Jun 23 09:46:38 UTC 2012


tags 652942 pending
tags 629406 pending
tags 649100 pending
thanks

Author: idd-guest
Date: 2012-06-23 09:46:37 +0000 (Sat, 23 Jun 2012)
New Revision: 4131

Added:
   trunk/samba/debian/samba-common.maintscript
Removed:
   trunk/samba/debian/samba-common.dhcp
   trunk/samba/debian/samba-common.links
Modified:
   trunk/samba/debian/changelog
   trunk/samba/debian/control
   trunk/samba/debian/rules
   trunk/samba/debian/samba-common.config
   trunk/samba/debian/samba-common.dirs
   trunk/samba/debian/samba-common.install
   trunk/samba/debian/samba-common.postinst
   trunk/samba/debian/samba-common.templates
Log:
Remove DHCP hook. Closes: #652942, #629406, #649100


Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/changelog	2012-06-23 09:46:37 UTC (rev 4131)
@@ -2,6 +2,7 @@
 
   * Only enable swat in inetd.conf on first install. Closes: #658245 
   * Minor lintian fixes. 
+  * Remove DHCP hook. Closes: #652942, #629406, #649100
 
  -- Ivo De Decker <ivo.dedecker at ugent.be>  Tue, 19 Jun 2012 23:11:23 +0200
 

Modified: trunk/samba/debian/control
===================================================================
--- trunk/samba/debian/control	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/control	2012-06-23 09:46:37 UTC (rev 4131)
@@ -57,6 +57,7 @@
 Package: samba-common
 Architecture: all
 Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ucf, ${misc:Depends}
 Replaces: samba (<< 3.0.20b-1), samba4-common (<< 4.0.0~alpha7-1)
 Conflicts: samba4-common (<< 4.0.0~alpha7-1)

Modified: trunk/samba/debian/rules
===================================================================
--- trunk/samba/debian/rules	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/rules	2012-06-23 09:46:37 UTC (rev 4131)
@@ -98,11 +98,6 @@
 	mkdir -p $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
 	install -m 0644 source3/pkgconfig/wbclient.pc $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
 
-	# Install samba-common's conffiles - they'll get moved later to their
-	# correct place by dh_install
-	mkdir -p $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d
-	install -m755 debian/samba-common.dhcp $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d/samba
-
 override_dh_installpam:
 	dh_installpam --name=samba
 

Modified: trunk/samba/debian/samba-common.config
===================================================================
--- trunk/samba/debian/samba-common.config	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/samba-common.config	2012-06-23 09:46:37 UTC (rev 4131)
@@ -77,32 +77,3 @@
 db_input medium samba-common/encrypt_passwords || true
 db_go
 
-DHCPPRIORITY=medium
-#if [ "$DEBCONF_RECONFIGURE" = 1 ] && [ -f /sbin/dhclient3 ]
-if [ -f /sbin/dhclient3 ]
-then
-	DHCPPRIORITY=high
-# TODO: see if we can detect that dhcp3-client is *going* to be installed,
-# even if it isn't yet.
-#elif dpkg-query -W --showformat='${Status}\n' dhcp3-client | grep ???
-# unknown ok not-installed ? 
-#	DHCPPRIORITY=high
-fi
-
-FOUND=false
-if [ -f $FILE ]; then
-	if grep -q 'include[[:space:]]*=[[:space:]]*/etc/samba/dhcp.conf' $FILE
-	then
-		FOUND=true
-	fi
-	db_set samba-common/dhcp $FOUND
-fi
-
-# we only prompt in one of three cases: the file doesn't exist yet, it
-# has the context we need to add our include line, or the include line
-# is already present.
-if [ ! -f $FILE ] || grep -q -i 'wins server' $FILE || [ "$FOUND" = "true" ];
-then
-	db_input $DHCPPRIORITY samba-common/dhcp || true
-	db_go
-fi

Deleted: trunk/samba/debian/samba-common.dhcp
===================================================================
--- trunk/samba/debian/samba-common.dhcp	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/samba-common.dhcp	2012-06-23 09:46:37 UTC (rev 4131)
@@ -1,75 +0,0 @@
-#!/bin/sh
-
-SAMBA_DHCP_CONF=/etc/samba/dhcp.conf
-
-netbios_setup() {
-	# No need to continue if we're called with an unsupported option
-
-	case $reason in
-	BOUND|RENEW|REBIND|REBOOT|EXPIRE|FAIL|RELEASE|STOP)
-		;;
-	*)
-		return
-		;;
-	esac
-
-	umask 022
-
-	local other_servers=""
-	local serverlist=""
-
-	# the destination file won't exist yet on the first run after 
-	# installing samba
-	if [ -e $SAMBA_DHCP_CONF ] && [ -s $SAMBA_DHCP_CONF ]
-	then
-		# don't continue if no settings have changed
-		if [ "$new_netbios_name_servers" = "$old_netbios_name_servers" ] \
-		   && [ "$new_netbios_scope" = "$old_netbios_scope" ] \
-		   && [ -n "$new_netbios_name_servers" ]
-		then
-			return
-		fi
-
-		# reparse our own file
-		other_servers=`sed -n -e"s/[[:space:]]$interface:[^[:space:]]*//g; \
-			s/^[[:space:]]*wins server[[:space:]]*=[[:space:]]*//pi" \
-			$SAMBA_DHCP_CONF`
-
-		serverlist="$other_servers"
-	fi
-
-	for server in $new_netbios_name_servers
-	do
-		serverlist="$serverlist $interface:$server"
-	done
-
-	echo -n > ${SAMBA_DHCP_CONF}.new
-
-	# If we're updating on failure/expire, AND there are no WINS
-	# servers for other interfaces, leave the file empty.
-	if [ -z "$other_servers" ]
-	then
-		if [ "$reason" = FAIL ] || [ "$reason" = EXPIRE ]
-		then
-			mv ${SAMBA_DHCP_CONF}.new $SAMBA_DHCP_CONF
-			return
-		fi
-	fi
-
-	if [ -n "$serverlist" ]
-	then
-		echo "   wins server =$serverlist" >> ${SAMBA_DHCP_CONF}.new
-	fi
-	if [ -n "$new_netbios_scope" ]
-	then
-		echo "   netbios scope = $new_netbios_scope" >> ${SAMBA_DHCP_CONF}.new
-	fi
-	mv ${SAMBA_DHCP_CONF}.new $SAMBA_DHCP_CONF
-
-	# reload the samba server
-	# We don't necessarily have the samba package installed. #414841
-	[ -x /etc/init.d/samba ] && /usr/sbin/invoke-rc.d samba reload
-
-}
-
-netbios_setup

Modified: trunk/samba/debian/samba-common.dirs
===================================================================
--- trunk/samba/debian/samba-common.dirs	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/samba-common.dirs	2012-06-23 09:46:37 UTC (rev 4131)
@@ -1,5 +1,4 @@
 etc/samba
-etc/dhcp3/dhclient-enter-hooks.d
 var/cache/samba
 var/lib/samba
 var/log/samba

Modified: trunk/samba/debian/samba-common.install
===================================================================
--- trunk/samba/debian/samba-common.install	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/samba-common.install	2012-06-23 09:46:37 UTC (rev 4131)
@@ -1,6 +1,5 @@
 etc/samba/
 debian/gdbcommands etc/samba
-etc/dhcp3/
 usr/share/samba/lowcase.dat
 debian/panic-action usr/share/samba
 debian/smb.conf* usr/share/samba

Deleted: trunk/samba/debian/samba-common.links
===================================================================
--- trunk/samba/debian/samba-common.links	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/samba-common.links	2012-06-23 09:46:37 UTC (rev 4131)
@@ -1 +0,0 @@
-etc/dhcp3/dhclient-enter-hooks.d/samba etc/dhcp/dhclient-enter-hooks.d/samba

Added: trunk/samba/debian/samba-common.maintscript
===================================================================
--- trunk/samba/debian/samba-common.maintscript	                        (rev 0)
+++ trunk/samba/debian/samba-common.maintscript	2012-06-23 09:46:37 UTC (rev 4131)
@@ -0,0 +1,2 @@
+rm_conffile /etc/dhcp3/dhclient-enter-hooks.d/samba 2:3.6.5-8~ samba-common
+rm_conffile /etc/samba/dhcp.conf 2:3.6.5-8~ samba-common

Modified: trunk/samba/debian/samba-common.postinst
===================================================================
--- trunk/samba/debian/samba-common.postinst	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/samba-common.postinst	2012-06-23 09:46:37 UTC (rev 4131)
@@ -50,27 +50,6 @@
 		        s/^\([[:space:]]*\)encrypt passwords[[:space:]]*=.*/\1encrypt passwords = ${ENCRYPT_PASSWORDS}/i" \
 		"$CONFIG"
 
-	# Install DHCP support
-	db_get samba-common/dhcp
-	if [ "$RET" = true ] && \
-	   ! grep -q dhcp.conf "$CONFIG"
-	then
-		sed -i -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i
-			/^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ {
-				/wins server[[:space:]]*=/a \\
-\\
-# If we receive WINS server info from DHCP, override the options above. \\
-   include = /etc/samba/dhcp.conf
-}" "$CONFIG"
-	elif [ "$RET" != true ]; then
-		sed -i -e '
-		/^#[[:space:]]*If we receive WINS server info from DHCP, override the options above/d
-		/^#*[[:space:]]*include[[:space:]]*=[[:space:]]*\/etc\/samba\/dhcp.conf/,/[^[:space:]]/ {
-			/^#*[[:space:]]*include[[:space:]]*=[[:space:]]*\/etc\/samba\/dhcp.conf/d
-			/^[[:space:]]*$/d
-		}' "$CONFIG"
-	fi
-
 }
 
 
@@ -105,3 +84,13 @@
 db_stop
 
 #DEBHELPER#
+
+if [ "$1" = "configure" ] && [ -n "$2" ] &&
+	dpkg --compare-versions "$2" lt '2:3.6.5-8~'
+then
+	# workaround for #584185
+	# rmdir will fail if dir not empty
+	rmdir /etc/dhcp3/dhclient-enter-hooks.d || true
+	rmdir /etc/dhcp3 || true
+fi
+

Modified: trunk/samba/debian/samba-common.templates
===================================================================
--- trunk/samba/debian/samba-common.templates	2012-06-19 21:56:33 UTC (rev 4130)
+++ trunk/samba/debian/samba-common.templates	2012-06-23 09:46:37 UTC (rev 4131)
@@ -2,19 +2,6 @@
 Type: title
 _Description: Samba server and utilities
 
-Template: samba-common/dhcp
-Type: boolean
-Default: false
-_Description: Modify smb.conf to use WINS settings from DHCP?
- If your computer gets IP address information from a DHCP server on the
- network, the DHCP server may also provide information about WINS servers
- ("NetBIOS name servers") present on the network.  This requires a
- change to your smb.conf file so that DHCP-provided WINS settings will
- automatically be read from /etc/samba/dhcp.conf.
- .
- The dhcp3-client package must be installed to take advantage of this
- feature.
-
 Template: samba-common/do_debconf
 Type: boolean
 Default: true





More information about the Pkg-samba-maint mailing list