summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog7
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules31
3 files changed, 13 insertions, 27 deletions
diff --git a/debian/changelog b/debian/changelog
index 462543f7b..114d2199a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1openssh (1:5.9p1-5) UNRELEASED; urgency=low
2
3 * Use dpkg-buildflags, including for hardening support; drop use of
4 hardening-includes.
5
6 -- Colin Watson <cjwatson@debian.org> Sat, 31 Mar 2012 11:13:09 +0100
7
1openssh (1:5.9p1-4) unstable; urgency=low 8openssh (1:5.9p1-4) unstable; urgency=low
2 9
3 * Disable OpenSSL version check again, as its SONAME is sufficient 10 * Disable OpenSSL version check again, as its SONAME is sufficient
diff --git a/debian/control b/debian/control
index 9d947e2c8..feff00209 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: openssh
2Section: net 2Section: net
3Priority: standard 3Priority: standard
4Maintainer: Debian OpenSSH Maintainers <debian-ssh@lists.debian.org> 4Maintainer: Debian OpenSSH Maintainers <debian-ssh@lists.debian.org>
5Build-Depends: libwrap0-dev | libwrap-dev, zlib1g-dev (>= 1:1.2.3-1), libssl-dev (>= 0.9.8g), libpam0g-dev | libpam-dev, libgtk2.0-dev, libedit-dev, debhelper (>= 7.4.2~), libselinux1-dev [linux-any], libkrb5-dev | heimdal-dev, hardening-includes 5Build-Depends: libwrap0-dev | libwrap-dev, zlib1g-dev (>= 1:1.2.3-1), libssl-dev (>= 0.9.8g), libpam0g-dev | libpam-dev, libgtk2.0-dev, libedit-dev, debhelper (>= 7.4.2~), libselinux1-dev [linux-any], libkrb5-dev | heimdal-dev, dpkg (>= 1.16.1~)
6Standards-Version: 3.8.4 6Standards-Version: 3.8.4
7Uploaders: Colin Watson <cjwatson@debian.org>, Matthew Vernon <matthew@debian.org> 7Uploaders: Colin Watson <cjwatson@debian.org>, Matthew Vernon <matthew@debian.org>
8Homepage: http://www.openssh.org/ 8Homepage: http://www.openssh.org/
diff --git a/debian/rules b/debian/rules
index ce56fdea4..0200d48d7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,17 +3,9 @@
3# Uncomment this to turn on verbose mode. 3# Uncomment this to turn on verbose mode.
4# export DH_VERBOSE=1 4# export DH_VERBOSE=1
5 5
6include /usr/share/hardening-includes/hardening.make
7
8# This has to be exported to make some magic below work. 6# This has to be exported to make some magic below work.
9export DH_OPTIONS 7export DH_OPTIONS
10 8
11ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
12OPTFLAGS := -O2
13else
14OPTFLAGS := -O0
15endif
16
17ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) 9ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
18 RUN_TESTS := yes 10 RUN_TESTS := yes
19else 11else
@@ -31,7 +23,6 @@ else
31endif 23endif
32 24
33DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) 25DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
34DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
35 26
36# Take account of old dpkg-architecture output. 27# Take account of old dpkg-architecture output.
37ifeq ($(DEB_HOST_ARCH_OS),) 28ifeq ($(DEB_HOST_ARCH_OS),)
@@ -40,20 +31,6 @@ ifeq ($(DEB_HOST_ARCH_OS),)
40 DEB_HOST_ARCH_OS := hurd 31 DEB_HOST_ARCH_OS := hurd
41 endif 32 endif
42endif 33endif
43ifeq ($(DEB_HOST_ARCH_CPU),)
44 DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
45 ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
46 DEB_HOST_ARCH_CPU := amd64
47 endif
48endif
49
50ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:))
51 ifneq (,$(findstring :$(DEB_HOST_ARCH_CPU):,:mips:mipsel:))
52 # Apparently this is not implied by -fPIE, at least on the mipsen.
53 PIC_CFLAGS := -fPIC
54 PIC_LDFLAGS := -fPIC
55 endif
56endif
57 34
58# Change the version string to include the Debian version 35# Change the version string to include the Debian version
59SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//') 36SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//')
@@ -108,7 +85,9 @@ confflags += --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUS
108confflags_udeb += --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 85confflags_udeb += --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
109 86
110# Compiler flags. 87# Compiler flags.
111cflags := $(OPTFLAGS) $(PIC_CFLAGS) $(HARDENING_CFLAGS) 88export DEB_BUILD_MAINT_OPTIONS := hardening=+all
89default_cflags := $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS)
90cflags := $(default_cflags)
112cflags += -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT 91cflags += -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT
113cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\" 92cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\"
114cflags_udeb := -Os 93cflags_udeb := -Os
@@ -117,7 +96,7 @@ confflags += --with-cflags='$(cflags)'
117confflags_udeb += --with-cflags='$(cflags_udeb)' 96confflags_udeb += --with-cflags='$(cflags_udeb)'
118 97
119# Linker flags. 98# Linker flags.
120confflags += --with-ldflags='$(strip -Wl,--as-needed $(PIC_LDFLAGS) $(HARDENING_LDFLAGS))' 99confflags += --with-ldflags='$(strip -Wl,--as-needed $(shell dpkg-buildflags --get LDFLAGS))'
121confflags_udeb += --with-ldflags='-Wl,--as-needed' 100confflags_udeb += --with-ldflags='-Wl,--as-needed'
122 101
123%: 102%:
@@ -139,7 +118,7 @@ override_dh_auto_build:
139 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' 118 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass'
140 $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen 119 $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen
141 120
142 $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(OPTFLAGS) -g -Wall -Wl,--as-needed' 121 $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(default_cflags) -Wall -Wl,--as-needed'
143 122
144override_dh_auto_test: 123override_dh_auto_test:
145ifeq ($(RUN_TESTS),yes) 124ifeq ($(RUN_TESTS),yes)