~ubuntu-branches/ubuntu/maverick/samba/maverick-security

2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
1
#!/usr/bin/make -f
2
3
# This has to be exported to make some magic below work.
4
export DH_OPTIONS
5
6
# Set the host and build architectures for use with config.cache loading,
7
# cross-building, etc.
8
DEB_HOST_GNU_TYPE	:= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9
DEB_BUILD_GNU_TYPE	:= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
10
DEB_HOST_ARCH_OS	:= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
11
12
export DEB_HOST_GNU_TYPE
13
export DEB_BUILD_GNU_TYPE
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
14
export DEB_HOST_ARCH_OS
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
15
5 by Michael Vogt
Resynchronise with Debian.
16
CFLAGS = -g -Wall
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
17
18
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19
  CFLAGS += -O0
20
else
21
  CFLAGS += -O2
22
endif
23
86 by Kees Cook
debian/rules: add BIND_NOW to maximize benefit of RELRO hardening.
24
# Enable BIND_NOW to maximize benefit of RELRO hardening
116 by Steve Langasek
Fix up BIND_NOW handling to not clobber other LDFLAGS from
25
LDFLAGS += -Wl,-z,now
86 by Kees Cook
debian/rules: add BIND_NOW to maximize benefit of RELRO hardening.
26
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
27
DESTDIR=`pwd`/debian/tmp
28
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
29
conf_args = \
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
30
		--cache-file=./config.cache \
31
		--with-fhs \
32
		--enable-shared \
33
		--enable-static \
34
		--prefix=/usr \
35
		--sysconfdir=/etc \
45 by Chuck Short
* Merge from debian unstable, remaining changes:
36
		--libdir=/usr/lib/samba \
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
37
		--with-privatedir=/etc/samba \
38
		--with-piddir=/var/run/samba \
39
		--localstatedir=/var \
15 by Andrew Mitchell
* Merge from debian unstable.
40
		--with-rootsbindir=/sbin \
41
		--with-pammodulesdir=/lib/security \
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
42
		--with-pam \
43
		--with-syslog \
44
		--with-utmp \
45
		--with-readline \
46
		--with-pam_smbpass \
47
		--with-libsmbclient \
48
		--with-winbind \
0.28.7 by Christian Perrier, Debconf translations, Steve Langasek, Jelmer Vernooij
[ Debconf translations ]
49
		--with-shared-modules=idmap_rid,idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_tdb2 \
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
50
		--with-automount \
51
		--with-ldap \
29 by Steve Langasek
* Merge from debian unstable (LP: #165072), remaining changes:
52
		--with-ads \
45 by Chuck Short
* Merge from debian unstable, remaining changes:
53
		--with-dnsupdate \
54
		--without-libtdb \
54 by Chuck Short, Jamie Strandboge
* Merge from debian unstable, remaining changes:
55
		--without-libnetapi \
0.25.13 by Christian Perrier
Upload to unstable
56
		--with-modulesdir=/usr/lib/samba \
57
		--datarootdir=/usr/share \
0.31.1 by Christian Perrier
* New upstream pre-release
58
		--datadir=/usr/share/samba \
0.25.13 by Christian Perrier
Upload to unstable
59
		--with-swatdir=/usr/share/samba/swat \
60
		--with-lockdir=/var/run/samba \
0.31.1 by Christian Perrier
* New upstream pre-release
61
		--with-statedir=/var/lib/samba \
62
		--with-cachedir=/var/cache/samba \
0.31.4 by Christian Perrier
* New upstream pre-release
63
		--with-codepagedir=/usr/share/samba \
0.28.8 by Steve Langasek
Move /etc/pam.d/samba back to samba-common, because it's shared with
64
		--enable-external-libtalloc \
65
		--without-libtalloc \
0.31.2 by Christian Perrier, Christian Perrier, Mathieu Parent, Steve Langasek
[ Christian Perrier ]
66
		--disable-avahi
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
67
68
ifeq ($(DEB_HOST_ARCH_OS),linux)
69
  conf_args += \
70
		--with-acl-support \
0.34.8 by Christian Perrier, Christian Perrier, Debconf translations, Steve Langasek
[ Christian Perrier ]
71
		--with-quotas \
72
		--without-cifsmount \
73
		--without-cifsupcall          
74
	  else
30 by Steve Langasek
* Merge from debian unstable (LP: #174296), remaining changes:
75
  conf_args +=	--without-quotas --without-cifsmount
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
76
endif
77
78
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
15 by Andrew Mitchell
* Merge from debian unstable.
79
  conf_args += --build $(DEB_BUILD_GNU_TYPE)
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
80
else
81
  conf_args += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
82
endif
83
0.34.3 by Christian Perrier, Christian Perrier, Steve Langasek
[ Christian Perrier ]
84
configure:
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
85
	dh_testdir
86
87
	if [ -f debian/config.cache ]; then \
0.31.1 by Christian Perrier
* New upstream pre-release
88
		cp -f debian/config.cache source3/config.cache; \
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
89
	fi
90
116 by Steve Langasek
Fix up BIND_NOW handling to not clobber other LDFLAGS from
91
	[ -f source3/Makefile ] || (cd source3 && LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" ./configure $(conf_args))
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
92
93
	touch configure-stamp
94
7 by Adam Conrad
* Sync with Debian's new upstream release (UVF exception granted by Colin),
95
build: configure build-stamp
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
96
build-stamp:
97
	dh_testdir
98
0.31.1 by Christian Perrier
* New upstream pre-release
99
	$(MAKE) -C source3 # headers
100
	$(MAKE) -C source3 everything
101
	$(MAKE) -C source3 nsswitch
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
102
103
	touch build-stamp
104
0.34.3 by Christian Perrier, Christian Perrier, Steve Langasek
[ Christian Perrier ]
105
clean:
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
106
	dh_testdir
107
	dh_testroot
108
	rm -f build-stamp configure-stamp
109
0.31.1 by Christian Perrier
* New upstream pre-release
110
	[ ! -f source3/Makefile ] || $(MAKE) -C source3 distclean
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
111
112
	# Delete stuff left after a build that is not deleted by 'make clean'
0.34.8 by Christian Perrier, Christian Perrier, Debconf translations, Steve Langasek
[ Christian Perrier ]
113
	rm -f source3/pkgconfig/*.pc \
0.28.8 by Steve Langasek
Move /etc/pam.d/samba back to samba-common, because it's shared with
114
	      source3/exports/libsmbclient.syms \
115
	      source3/exports/libsmbsharemodes.syms
23 by Soren Hansen
* Dropped patches:
116
18 by Michael Vogt
* Merge from debian unstable, remaining changes:
117
	debconf-updatepo
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
118
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
119
	dh_clean
120
21 by Kees Cook
* Merge from debian unstable, remaining changes:
121
install: DH_OPTIONS=$(DH_EXTRAS)
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
122
install: build
123
	dh_testdir
124
	dh_testroot
125
	dh_clean -k
126
	dh_installdirs
127
15 by Andrew Mitchell
* Merge from debian unstable.
128
	mkdir -p $(DESTDIR)/usr/lib/cups/backend $(DESTDIR)/usr/share/samba \
54 by Chuck Short, Jamie Strandboge
* Merge from debian unstable, remaining changes:
129
	         $(DESTDIR)/etc/pam.d $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d \
111 by Steve Langasek
merge version 2:3.5.4~dfsg-1
130
	         $(DESTDIR)/etc/ufw/applications.d
15 by Andrew Mitchell
* Merge from debian unstable.
131
0.31.1 by Christian Perrier
* New upstream pre-release
132
	$(MAKE) -C source3 install DESTDIR=$(DESTDIR)
15 by Andrew Mitchell
* Merge from debian unstable.
133
0.25.13 by Christian Perrier
Upload to unstable
134
	# Rename to *.samba3 for alternatives
135
	mv $(DESTDIR)/usr/bin/smbstatus $(DESTDIR)/usr/bin/smbstatus.samba3
136
	mv $(DESTDIR)/usr/bin/nmblookup $(DESTDIR)/usr/bin/nmblookup.samba3
137
	mv $(DESTDIR)/usr/share/man/man1/nmblookup.1 $(DESTDIR)/usr/share/man/man1/nmblookup.samba3.1
0.28.7 by Christian Perrier, Debconf translations, Steve Langasek, Jelmer Vernooij
[ Debconf translations ]
138
	mv $(DESTDIR)/usr/share/man/man1/smbstatus.1 $(DESTDIR)/usr/share/man/man1/smbstatus.samba3.1
0.25.13 by Christian Perrier
Upload to unstable
139
	mv $(DESTDIR)/usr/bin/net $(DESTDIR)/usr/bin/net.samba3
140
	mv $(DESTDIR)/usr/share/man/man8/net.8 $(DESTDIR)/usr/share/man/man8/net.samba3.8
141
	mv $(DESTDIR)/usr/bin/testparm $(DESTDIR)/usr/bin/testparm.samba3
142
	mv $(DESTDIR)/usr/share/man/man1/testparm.1 $(DESTDIR)/usr/share/man/man1/testparm.samba3.1
143
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
144
	# Starting with Samba 3.0.6 libsmbclient.so is installed in
145
	# /usr/lib/samba. We don't want it there since it is not in the
146
	# default library path. Here we move it to /usr/lib/.
15 by Andrew Mitchell
* Merge from debian unstable.
147
	mv $(DESTDIR)/usr/lib/samba/libsmbclient* $(DESTDIR)/usr/lib/
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
148
45 by Chuck Short
* Merge from debian unstable, remaining changes:
149
	# same problem with libwbclient.
54 by Chuck Short, Jamie Strandboge
* Merge from debian unstable, remaining changes:
150
	mv $(DESTDIR)/usr/lib/samba/libwbclient* $(DESTDIR)/usr/lib/
45 by Chuck Short
* Merge from debian unstable, remaining changes:
151
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
152
	# Install other stuff not installed by "make install"
153
	install -m 0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd
15 by Andrew Mitchell
* Merge from debian unstable.
154
	install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8
0.31.1 by Christian Perrier
* New upstream pre-release
155
	install -m 0644 nsswitch/libnss_winbind.so $(DESTDIR)/lib/libnss_winbind.so.2
156
	install -m 0644 nsswitch/libnss_wins.so $(DESTDIR)/lib/libnss_wins.so.2
45 by Chuck Short
* Merge from debian unstable, remaining changes:
157
	# Install torture stuff
0.31.1 by Christian Perrier
* New upstream pre-release
158
	install -m 0755 source3/bin/smbtorture $(DESTDIR)/usr/bin/smbtorture
159
	install -m 0755 source3/bin/msgtest $(DESTDIR)/usr/bin/msgtest
160
	install -m 0755 source3/bin/masktest $(DESTDIR)/usr/bin/masktest
161
	install -m 0755 source3/bin/locktest $(DESTDIR)/usr/bin/locktest
162
	install -m 0755 source3/bin/locktest2 $(DESTDIR)/usr/bin/locktest2
163
	install -m 0755 source3/bin/nsstest $(DESTDIR)/usr/bin/nsstest
164
	install -m 0755 source3/bin/vfstest $(DESTDIR)/usr/bin/vfstest
165
	install -m 0755 source3/bin/pdbtest $(DESTDIR)/usr/bin/pdbtest
166
	install -m 0755 source3/bin/replacetort $(DESTDIR)/usr/bin/replacetort
114 by Steve Langasek
Readd tdbtorture, which was dropped without explanation
167
	install -m 0755 source3/bin/tdbtorture $(DESTDIR)/usr/bin/tdbtorture
0.31.1 by Christian Perrier
* New upstream pre-release
168
	install -m 0755 source3/bin/smbconftort $(DESTDIR)/usr/bin/smbconftort
50 by Steve Langasek
* debian/libpam-smbpass.pam-config, debian/libpam-smbpass.postinst,
169
	mkdir -p $(DESTDIR)/usr/share/pam-configs
170
	install -m 0644 debian/libpam-smbpass.pam-config $(DESTDIR)/usr/share/pam-configs/smbpasswd-migrate
0.34.7 by Christian Perrier, Steve Langasek, Christian Perrier
[ Steve Langasek ]
171
	install -m 0644 debian/winbind.pam-config $(DESTDIR)/usr/share/pam-configs/winbind
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
172
173
	# For CUPS to support printing to samba printers, it's necessary
174
	#	to make the following symlink (according to
175
	#	Erich Schubert <debian@vitavonni.de> in #109509):
176
	ln -s ../../../bin/smbspool $(DESTDIR)/usr/lib/cups/backend/smb
177
104 by Chuck Short, Chuck Short
* Merge from Debian Experimental, remaining changes:
178
54 by Chuck Short, Jamie Strandboge
* Merge from debian unstable, remaining changes:
179
	# ufw integration
180
	install -m644 debian/samba.ufw.profile $(DESTDIR)/etc/ufw/applications.d/samba
181
34 by Steve Langasek
* Merge from Debian unstable, remaining changes:
182
	cp debian/smb.conf* $(DESTDIR)/usr/share/samba/
0.28.6 by Christian Perrier, Christian Perrier, Debconf translations
[ Christian Perrier ]
183
	install -m755 debian/panic-action $(DESTDIR)/usr/share/samba/panic-action
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
184
	# Install samba-common's conffiles - they'll get moved later to their
15 by Andrew Mitchell
* Merge from debian unstable.
185
	# correct place by dh_movefiles.
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
186
	cp debian/gdbcommands $(DESTDIR)/etc/samba/
187
	install -m755 debian/samba-common.dhcp $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d/samba
0.34.8 by Christian Perrier, Christian Perrier, Debconf translations, Steve Langasek
[ Christian Perrier ]
188
	mkdir -p $(DESTDIR)/etc/network/if-up.d
189
	install -o root -g root debian/samba.if-up $(DESTDIR)/etc/network/if-up.d/samba
90 by Chuck Short
debian/rules, debian/samba.dirs, debian/samba-common-bin.dirs,
190
	install -D -m 644 debian/source_samba.py $(DESTDIR)/usr/share/apport/package-hooks/source_samba.py
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
191
192
	dh_movefiles
0.28.8 by Steve Langasek
Move /etc/pam.d/samba back to samba-common, because it's shared with
193
	dh_installpam --name=samba
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
194
195
# Build architecture-independent files here.
196
# Pass -i to all debhelper commands in this target to reduce clutter.
197
binary-indep: DH_OPTIONS=-i
198
binary-indep: build install
199
	dh_testdir
200
	dh_testroot
201
	dh_installdebconf
202
	dh_installdocs -A debian/README.build
6 by Adam Conrad
* Resyncronise with Debian, resolving many merge conflicts (#20710)
203
	# Ignore COPYING. Otherwise, an extra copy of the GPL licence 
204
	# in smbldap-tools example is included in samba-doc
23 by Soren Hansen
* Dropped patches:
205
	dh_installexamples -Xsmbldap-tools-* -XCOPYING
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
206
	dh_installchangelogs
207
	dh_link
208
	dh_compress
209
	dh_fixperms
210
	dh_installdeb
211
	dh_gencontrol
212
	dh_md5sums
213
	dh_builddeb
214
215
# Build architecture-dependent files here.
216
# Pass -a to all debhelper commands in this target to reduce clutter.
4 by Adam Conrad
Resynchronise with Debian, resolving merge conflicts (#12360)
217
218
binary-arch: DH_OPTIONS=-a $(DH_EXTRAS)
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
219
binary-arch: build install
220
	dh_testdir
221
	dh_testroot
222
	dh_installdebconf
223
	dh_installdocs -A debian/README.build
6 by Adam Conrad
* Resyncronise with Debian, resolving many merge conflicts (#20710)
224
	dh_installexamples
7 by Adam Conrad
* Sync with Debian's new upstream release (UVF exception granted by Colin),
225
	dh_installlogrotate
15 by Andrew Mitchell
* Merge from debian unstable.
226
	dh_installlogcheck
94 by Steve Langasek
* Switch smbd and nmbd over to upstart jobs, to ensure nmbd starts reliably
227
	DH_OPTIONS= dh_installinit -psamba --upstart-only --name smbd
228
	DH_OPTIONS= dh_installinit -psamba --upstart-only --name nmbd
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
229
	DH_OPTIONS= dh_installinit -pwinbind
230
	dh_installcron 
0.34.5 by Christian Perrier, Steve langasek, Christian Perrier
[ Steve langasek ]
231
	dh_lintian
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
232
	dh_installchangelogs -Nlibpam-smbpass
0.31.1 by Christian Perrier
* New upstream pre-release
233
	DH_OPTIONS= dh_installchangelogs -plibpam-smbpass source3/pam_smbpass/CHANGELOG
0.28.6 by Christian Perrier, Christian Perrier, Debconf translations
[ Christian Perrier ]
234
	DH_OPTIONS= dh_strip -psamba -psmbclient -pwinbind -psamba-common-bin --dbg-package=samba-dbg
235
	DH_OPTIONS= dh_strip -Nsamba -Nsmbclient -Nwinbind -Nsamba-common-bin
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
236
	dh_link
237
	dh_compress
238
	dh_fixperms
239
7 by Adam Conrad
* Sync with Debian's new upstream release (UVF exception granted by Colin),
240
	# Upstream makefile installs this using "install" without -m, so
241
	# it becomes executable
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
242
	chmod a-x debian/libsmbclient-dev/usr/include/libsmbclient.h
243
244
	# Set some reasonable default perms for the samba logdir.
15 by Andrew Mitchell
* Merge from debian unstable.
245
	chmod 0750 debian/samba-common/var/log/samba/
246
	chown root:adm debian/samba-common/var/log/samba/
247
	chmod 1777 debian/samba/var/spool/samba/
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
248
45 by Chuck Short
* Merge from debian unstable, remaining changes:
249
	DH_OPTIONS= dh_makeshlibs -plibsmbclient -V'libsmbclient (>= 2:3.2.0)'
250
	DH_OPTIONS= dh_makeshlibs -plibwbclient0
2 by Martin Pitt
Added patch prefer_device_uri: change smbspool to prefer DEVICE_URI over
251
	dh_installdeb
252
	dh_shlibdeps
253
	dh_gencontrol
254
	dh_md5sums
255
	dh_builddeb
256
257
binary: binary-indep binary-arch
30 by Steve Langasek
* Merge from debian unstable (LP: #174296), remaining changes:
258
259
update-archs:
0.28.8 by Steve Langasek
Move /etc/pam.d/samba back to samba-common, because it's shared with
260
	sed -i -e "s/libacl1-dev\( ([^)]\+)\)* \[[^]]\+\]/libacl1-dev \1 [`type-handling any linux-gnu`]/g" \
261
	       -e "s/libkeyutils-dev\( ([^)]\+)\)* \[[^]]\+\]/libkeyutils-dev \1 [`type-handling any linux-gnu`]/g" \
262
	       -e "s/libcap2-dev\( ([^)]\+)\)* \[[^]]\+\]/libcap2-dev \1 [`type-handling any linux-gnu`]/g" \
30 by Steve Langasek
* Merge from debian unstable (LP: #174296), remaining changes:
263
		debian/control
264
0.34.3 by Christian Perrier, Christian Perrier, Steve Langasek
[ Christian Perrier ]
265
.PHONY: build clean binary-indep binary-arch binary install configure update-archs