summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure63
-rw-r--r--configure.ac2
-rw-r--r--contrib/Makefile6
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/cross-pkg-config.patch129
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules9
7 files changed, 206 insertions, 9 deletions
diff --git a/configure b/configure
index c15fdc3cf..12babe9be 100755
--- a/configure
+++ b/configure
@@ -8739,8 +8739,9 @@ LIBEDIT_MSG="no"
8739if test "${with_libedit+set}" = set; then : 8739if test "${with_libedit+set}" = set; then :
8740 withval=$with_libedit; if test "x$withval" != "xno" ; then 8740 withval=$with_libedit; if test "x$withval" != "xno" ; then
8741 if test "x$withval" = "xyes" ; then 8741 if test "x$withval" = "xyes" ; then
8742 # Extract the first word of "pkg-config", so it can be a program name with args. 8742 if test -n "$ac_tool_prefix"; then
8743set dummy pkg-config; ac_word=$2 8743 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8744set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8745$as_echo_n "checking for $ac_word... " >&6; } 8746$as_echo_n "checking for $ac_word... " >&6; }
8746if ${ac_cv_path_PKGCONFIG+:} false; then : 8747if ${ac_cv_path_PKGCONFIG+:} false; then :
@@ -8766,7 +8767,6 @@ done
8766 done 8767 done
8767IFS=$as_save_IFS 8768IFS=$as_save_IFS
8768 8769
8769 test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
8770 ;; 8770 ;;
8771esac 8771esac
8772fi 8772fi
@@ -8780,6 +8780,63 @@ $as_echo "no" >&6; }
8780fi 8780fi
8781 8781
8782 8782
8783fi
8784if test -z "$ac_cv_path_PKGCONFIG"; then
8785 ac_pt_PKGCONFIG=$PKGCONFIG
8786 # Extract the first word of "pkg-config", so it can be a program name with args.
8787set dummy pkg-config; ac_word=$2
8788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8789$as_echo_n "checking for $ac_word... " >&6; }
8790if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
8791 $as_echo_n "(cached) " >&6
8792else
8793 case $ac_pt_PKGCONFIG in
8794 [\\/]* | ?:[\\/]*)
8795 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
8796 ;;
8797 *)
8798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8799for as_dir in $PATH
8800do
8801 IFS=$as_save_IFS
8802 test -z "$as_dir" && as_dir=.
8803 for ac_exec_ext in '' $ac_executable_extensions; do
8804 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8805 ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
8806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8807 break 2
8808 fi
8809done
8810 done
8811IFS=$as_save_IFS
8812
8813 ;;
8814esac
8815fi
8816ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
8817if test -n "$ac_pt_PKGCONFIG"; then
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
8819$as_echo "$ac_pt_PKGCONFIG" >&6; }
8820else
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822$as_echo "no" >&6; }
8823fi
8824
8825 if test "x$ac_pt_PKGCONFIG" = x; then
8826 PKGCONFIG="no"
8827 else
8828 case $cross_compiling:$ac_tool_warned in
8829yes:)
8830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8832ac_tool_warned=yes ;;
8833esac
8834 PKGCONFIG=$ac_pt_PKGCONFIG
8835 fi
8836else
8837 PKGCONFIG="$ac_cv_path_PKGCONFIG"
8838fi
8839
8783 if test "x$PKGCONFIG" != "xno"; then 8840 if test "x$PKGCONFIG" != "xno"; then
8784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5 8841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
8785$as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; } 8842$as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
diff --git a/configure.ac b/configure.ac
index 58da1f167..e040a3d54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1349,7 +1349,7 @@ AC_ARG_WITH([libedit],
1349 [ --with-libedit[[=PATH]] Enable libedit support for sftp], 1349 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
1350 [ if test "x$withval" != "xno" ; then 1350 [ if test "x$withval" != "xno" ; then
1351 if test "x$withval" = "xyes" ; then 1351 if test "x$withval" = "xyes" ; then
1352 AC_PATH_PROG([PKGCONFIG], [pkg-config], [no]) 1352 AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
1353 if test "x$PKGCONFIG" != "xno"; then 1353 if test "x$PKGCONFIG" != "xno"; then
1354 AC_MSG_CHECKING([if $PKGCONFIG knows about libedit]) 1354 AC_MSG_CHECKING([if $PKGCONFIG knows about libedit])
1355 if "$PKGCONFIG" libedit; then 1355 if "$PKGCONFIG" libedit; then
diff --git a/contrib/Makefile b/contrib/Makefile
index 8b34eb221..c6c48e78a 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -1,3 +1,5 @@
1PKG_CONFIG = pkg-config
2
1all: 3all:
2 @echo "Valid targets: gnome-ssh-askpass1 gnome-ssh-askpass2" 4 @echo "Valid targets: gnome-ssh-askpass1 gnome-ssh-askpass2"
3 5
@@ -7,9 +9,9 @@ gnome-ssh-askpass1: gnome-ssh-askpass1.c
7 `gnome-config --libs gnome gnomeui` 9 `gnome-config --libs gnome gnomeui`
8 10
9gnome-ssh-askpass2: gnome-ssh-askpass2.c 11gnome-ssh-askpass2: gnome-ssh-askpass2.c
10 $(CC) `pkg-config --cflags gtk+-2.0` \ 12 $(CC) `$(PKG_CONFIG) --cflags gtk+-2.0` \
11 gnome-ssh-askpass2.c -o gnome-ssh-askpass2 \ 13 gnome-ssh-askpass2.c -o gnome-ssh-askpass2 \
12 `pkg-config --libs gtk+-2.0 x11` 14 `$(PKG_CONFIG) --libs gtk+-2.0 x11`
13 15
14clean: 16clean:
15 rm -f *.o gnome-ssh-askpass1 gnome-ssh-askpass2 gnome-ssh-askpass 17 rm -f *.o gnome-ssh-askpass1 gnome-ssh-askpass2 gnome-ssh-askpass
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