summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/cross-pkg-config.patch129
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules9
4 files changed, 141 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 114d2199a..edc7ac99f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,11 @@ openssh (1:5.9p1-5) UNRELEASED; urgency=low
2 2
3 * Use dpkg-buildflags, including for hardening support; drop use of 3 * Use dpkg-buildflags, including for hardening support; drop use of
4 hardening-includes. 4 hardening-includes.
5 * Fix cross-building:
6 - Allow using a cross-architecture pkg-config.
7 - Pass default LDFLAGS to contrib/Makefile.
8 - Allow dh_strip to strip gnome-ssh-askpass, rather than calling
9 'install -s'.
5 10
6 -- Colin Watson <cjwatson@debian.org> Sat, 31 Mar 2012 11:13:09 +0100 11 -- Colin Watson <cjwatson@debian.org> Sat, 31 Mar 2012 11:13:09 +0100
7 12
diff --git a/debian/patches/cross-pkg-config.patch b/debian/patches/cross-pkg-config.patch
new file mode 100644
index 000000000..87818cd95
--- /dev/null
+++ b/debian/patches/cross-pkg-config.patch
@@ -0,0 +1,129 @@
1Description: Allow using a cross-architecture pkg-config
2Author: Colin Watson <cjwatson@debian.org>
3Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1996
4Forwarded: https://bugzilla.mindrot.org/show_bug.cgi?id=1996
5Last-Update: 2011-04-02
6
7Index: b/configure
8===================================================================
9--- a/configure
10+++ b/configure
11@@ -8739,8 +8739,9 @@
12 if test "${with_libedit+set}" = set; then :
13 withval=$with_libedit; if test "x$withval" != "xno" ; then
14 if test "x$withval" = "xyes" ; then
15- # Extract the first word of "pkg-config", so it can be a program name with args.
16-set dummy pkg-config; ac_word=$2
17+ if test -n "$ac_tool_prefix"; then
18+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
20 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21 $as_echo_n "checking for $ac_word... " >&6; }
22 if ${ac_cv_path_PKGCONFIG+:} false; then :
23@@ -8766,7 +8767,6 @@
24 done
25 IFS=$as_save_IFS
26
27- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
28 ;;
29 esac
30 fi
31@@ -8780,6 +8780,63 @@
32 fi
33
34
35+fi
36+if test -z "$ac_cv_path_PKGCONFIG"; then
37+ ac_pt_PKGCONFIG=$PKGCONFIG
38+ # Extract the first word of "pkg-config", so it can be a program name with args.
39+set dummy pkg-config; ac_word=$2
40+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41+$as_echo_n "checking for $ac_word... " >&6; }
42+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
43+ $as_echo_n "(cached) " >&6
44+else
45+ case $ac_pt_PKGCONFIG in
46+ [\\/]* | ?:[\\/]*)
47+ ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
48+ ;;
49+ *)
50+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51+for as_dir in $PATH
52+do
53+ IFS=$as_save_IFS
54+ test -z "$as_dir" && as_dir=.
55+ for ac_exec_ext in '' $ac_executable_extensions; do
56+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
57+ ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
58+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59+ break 2
60+ fi
61+done
62+ done
63+IFS=$as_save_IFS
64+
65+ ;;
66+esac
67+fi
68+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
69+if test -n "$ac_pt_PKGCONFIG"; then
70+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
71+$as_echo "$ac_pt_PKGCONFIG" >&6; }
72+else
73+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
74+$as_echo "no" >&6; }
75+fi
76+
77+ if test "x$ac_pt_PKGCONFIG" = x; then
78+ PKGCONFIG="no"
79+ else
80+ case $cross_compiling:$ac_tool_warned in
81+yes:)
82+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
83+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
84+ac_tool_warned=yes ;;
85+esac
86+ PKGCONFIG=$ac_pt_PKGCONFIG
87+ fi
88+else
89+ PKGCONFIG="$ac_cv_path_PKGCONFIG"
90+fi
91+
92 if test "x$PKGCONFIG" != "xno"; then
93 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
94 $as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
95Index: b/configure.ac
96===================================================================
97--- a/configure.ac
98+++ b/configure.ac
99@@ -1349,7 +1349,7 @@
100 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
101 [ if test "x$withval" != "xno" ; then
102 if test "x$withval" = "xyes" ; then
103- AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
104+ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
105 if test "x$PKGCONFIG" != "xno"; then
106 AC_MSG_CHECKING([if $PKGCONFIG knows about libedit])
107 if "$PKGCONFIG" libedit; then
108Index: b/contrib/Makefile
109===================================================================
110--- a/contrib/Makefile
111+++ b/contrib/Makefile
112@@ -1,3 +1,5 @@
113+PKG_CONFIG = pkg-config
114+
115 all:
116 @echo "Valid targets: gnome-ssh-askpass1 gnome-ssh-askpass2"
117
118@@ -7,9 +9,9 @@
119 `gnome-config --libs gnome gnomeui`
120
121 gnome-ssh-askpass2: gnome-ssh-askpass2.c
122- $(CC) `pkg-config --cflags gtk+-2.0` \
123+ $(CC) `$(PKG_CONFIG) --cflags gtk+-2.0` \
124 gnome-ssh-askpass2.c -o gnome-ssh-askpass2 \
125- `pkg-config --libs gtk+-2.0 x11`
126+ `$(PKG_CONFIG) --libs gtk+-2.0 x11`
127
128 clean:
129 rm -f *.o gnome-ssh-askpass1 gnome-ssh-askpass2 gnome-ssh-askpass
diff --git a/debian/patches/series b/debian/patches/series
index 11059c095..ceeb32499 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -37,6 +37,7 @@ doc-hash-tab-completion.patch
37 37
38# Miscellaneous bug fixes 38# Miscellaneous bug fixes
39auth-log-verbosity.patch 39auth-log-verbosity.patch
40cross-pkg-config.patch
40 41
41# Debian-specific configuration 42# Debian-specific configuration
42no-openssl-version-check.patch 43no-openssl-version-check.patch
diff --git a/debian/rules b/debian/rules
index 0200d48d7..889b5a079 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,8 +17,10 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
17 17
18ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) 18ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
19 CC := gcc 19 CC := gcc
20 PKG_CONFIG = pkg-config
20else 21else
21 CC := $(DEB_HOST_GNU_TYPE)-gcc 22 CC := $(DEB_HOST_GNU_TYPE)-gcc
23 PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config
22 RUN_TESTS := 24 RUN_TESTS :=
23endif 25endif
24 26
@@ -96,7 +98,8 @@ confflags += --with-cflags='$(cflags)'
96confflags_udeb += --with-cflags='$(cflags_udeb)' 98confflags_udeb += --with-cflags='$(cflags_udeb)'
97 99
98# Linker flags. 100# Linker flags.
99confflags += --with-ldflags='$(strip -Wl,--as-needed $(shell dpkg-buildflags --get LDFLAGS))' 101default_ldflags := $(shell dpkg-buildflags --get LDFLAGS)
102confflags += --with-ldflags='$(strip -Wl,--as-needed $(default_ldflags))'
100confflags_udeb += --with-ldflags='-Wl,--as-needed' 103confflags_udeb += --with-ldflags='-Wl,--as-needed'
101 104
102%: 105%:
@@ -118,7 +121,7 @@ override_dh_auto_build:
118 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' 121 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass'
119 $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen 122 $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen
120 123
121 $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(default_cflags) -Wall -Wl,--as-needed' 124 $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(default_cflags) -Wall -Wl,--as-needed $(default_ldflags)' PKG_CONFIG=$(PKG_CONFIG)
122 125
123override_dh_auto_test: 126override_dh_auto_test:
124ifeq ($(RUN_TESTS),yes) 127ifeq ($(RUN_TESTS),yes)
@@ -144,7 +147,7 @@ override_dh_install:
144 dh_install -popenssh-client-udeb -popenssh-server-udeb \ 147 dh_install -popenssh-client-udeb -popenssh-server-udeb \
145 --sourcedir=build-udeb 148 --sourcedir=build-udeb
146 149
147 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/openssh/gnome-ssh-askpass 150 install -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/openssh/gnome-ssh-askpass
148 151
149 install -o root -g root debian/openssh-server.if-up debian/openssh-server/etc/network/if-up.d/openssh-server 152 install -o root -g root debian/openssh-server.if-up debian/openssh-server/etc/network/if-up.d/openssh-server
150 install -o root -g root -m 644 debian/openssh-server.ufw.profile debian/openssh-server/etc/ufw/applications.d/openssh-server 153 install -o root -g root -m 644 debian/openssh-server.ufw.profile debian/openssh-server/etc/ufw/applications.d/openssh-server