From 378742206f9e50ecec3f5871b1ce9658a5e8c889 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 12 Jun 2007 19:38:29 +0000 Subject: * If building on Ubuntu, add /sbin, /usr/sbin, and /usr/local/sbin to the default path. --- debian/changelog | 2 ++ debian/rules | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b95d21709..dcb30fc30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -65,6 +65,8 @@ openssh (1:4.6p1-1) UNRELEASED; urgency=low * Belatedly build-depend on zlib1g-dev (>= 1:1.2.3-1) (closes: #333447). * Build position-independent executables (only for debs, not for udebs) to take advantage of address space layout randomisation. + * If building on Ubuntu, add /sbin, /usr/sbin, and /usr/local/sbin to the + default path. -- Colin Watson Tue, 12 Jun 2007 14:31:01 +0100 diff --git a/debian/rules b/debian/rules index 76dc5d83c..6e335cf6e 100755 --- a/debian/rules +++ b/debian/rules @@ -62,13 +62,21 @@ endif # Change the version string to include the Debian version SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//') +DISTRIBUTOR := $(shell lsb_release -is || echo Debian) +ifeq ($(DISTRIBUTOR),Ubuntu) +DEFAULT_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games +else +DEFAULT_PATH := /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games +endif +SUPERUSER_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 + build: build-deb build-udeb build-deb: build-deb-stamp build-deb-stamp: dh_testdir mkdir -p build-deb - cd build-deb && $(FORCE_LIBS) LDFLAGS='$(PIE_LDFLAGS)' ../configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 --with-pam --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper --with-libedit --with-kerberos5=/usr --with-ssl-engine $(SELINUX) + cd build-deb && $(FORCE_LIBS) LDFLAGS='$(PIE_LDFLAGS)' ../configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUSER_PATH) --with-pam --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper --with-libedit --with-kerberos5=/usr --with-ssl-engine $(SELINUX) ifeq ($(DEB_HOST_ARCH_OS),linux) # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999). -- cgit v1.2.3