diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | debian/rules | 67 | ||||
-rw-r--r-- | version.h | 7 |
3 files changed, 59 insertions, 17 deletions
diff --git a/debian/changelog b/debian/changelog index 5b8f58a62..359f28bb1 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -46,6 +46,8 @@ openssh (1:4.7p1-1) UNRELEASED; urgency=low | |||
46 | * Create /var/run/sshd on start even if /etc/ssh/sshd_not_to_be_run exists | 46 | * Create /var/run/sshd on start even if /etc/ssh/sshd_not_to_be_run exists |
47 | (closes: #453285). | 47 | (closes: #453285). |
48 | * Fix "overriden" typo in ssh(1) (thanks, A. Costa; closes: #390699). | 48 | * Fix "overriden" typo in ssh(1) (thanks, A. Costa; closes: #390699). |
49 | * Refactor debian/rules configure and make invocations to make development | ||
50 | easier. | ||
49 | 51 | ||
50 | -- Colin Watson <cjwatson@debian.org> Sun, 23 Dec 2007 12:53:46 +0000 | 52 | -- Colin Watson <cjwatson@debian.org> Sun, 23 Dec 2007 12:53:46 +0000 |
51 | 53 | ||
diff --git a/debian/rules b/debian/rules index 46c1344bb..cbb119d23 100755 --- a/debian/rules +++ b/debian/rules | |||
@@ -69,16 +69,6 @@ PAMSUBST := yes | |||
69 | PAMDEP := libpam-runtime | 69 | PAMDEP := libpam-runtime |
70 | endif | 70 | endif |
71 | 71 | ||
72 | # The Hurd needs libcrypt for res_query et al. | ||
73 | ifeq ($(DEB_HOST_ARCH_OS),hurd) | ||
74 | FORCE_LIBS := LIBS=-lcrypt | ||
75 | endif | ||
76 | |||
77 | # SELinux support? | ||
78 | ifeq ($(DEB_HOST_ARCH_OS),linux) | ||
79 | SELINUX := --with-selinux | ||
80 | endif | ||
81 | |||
82 | # Change the version string to include the Debian version | 72 | # Change the version string to include the Debian version |
83 | SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//') | 73 | SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//') |
84 | 74 | ||
@@ -90,13 +80,62 @@ DEFAULT_PATH := /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games | |||
90 | endif | 80 | endif |
91 | SUPERUSER_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 | 81 | SUPERUSER_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 |
92 | 82 | ||
83 | # Common path configuration. | ||
84 | confflags += --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --mandir=/usr/share/man | ||
85 | |||
86 | # Common build options. | ||
87 | confflags += --with-4in6 | ||
88 | confflags += --with-privsep-path=/var/run/sshd | ||
89 | confflags += --without-rand-helper | ||
90 | |||
91 | # The Hurd needs libcrypt for res_query et al. | ||
92 | ifeq ($(DEB_HOST_ARCH_OS),hurd) | ||
93 | confflags += --with-libs=-lcrypt | ||
94 | endif | ||
95 | |||
96 | # Everything above here is common to the deb and udeb builds. | ||
97 | confflags_udeb := $(confflags) | ||
98 | |||
99 | # Options specific to the deb build. | ||
100 | confflags += --with-tcp-wrappers | ||
101 | confflags += --with-pam | ||
102 | confflags += --with-libedit | ||
103 | confflags += --with-kerberos5=/usr | ||
104 | confflags += --with-ssl-engine | ||
105 | ifeq ($(DEB_HOST_ARCH_OS),linux) | ||
106 | confflags += --with-selinux | ||
107 | endif | ||
108 | |||
109 | # The deb build wants xauth; the udeb build doesn't. | ||
110 | confflags += --with-xauth=/usr/bin/X11/xauth | ||
111 | confflags_udeb += --without-xauth | ||
112 | |||
113 | # Default paths. The udeb build has /usr/bin/X11 and /usr/games removed. | ||
114 | confflags += --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUSER_PATH) | ||
115 | confflags_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 | ||
116 | |||
117 | # Compiler flags. | ||
118 | cflags := $(OPTFLAGS) $(PIE_CFLAGS) | ||
119 | cflags += -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT | ||
120 | cflags += -DSSHD_PAM_SERVICE=\"ssh\" | ||
121 | cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\" | ||
122 | cflags_udeb := -Os | ||
123 | cflags_udeb += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\" | ||
124 | confflags += --with-cflags='$(cflags)' | ||
125 | confflags_udeb += --with-cflags='$(cflags_udeb)' | ||
126 | |||
127 | # Linker flags. | ||
128 | ifneq ($(PIE_LDFLAGS),) | ||
129 | confflags += --with-ldflags='$(PIE_LDFLAGS)' | ||
130 | endif | ||
131 | |||
93 | build: build-deb build-udeb | 132 | build: build-deb build-udeb |
94 | 133 | ||
95 | build-deb: build-deb-stamp | 134 | build-deb: build-deb-stamp |
96 | build-deb-stamp: | 135 | build-deb-stamp: |
97 | dh_testdir | 136 | dh_testdir |
98 | mkdir -p build-deb | 137 | mkdir -p build-deb |
99 | cd build-deb && $(FORCE_LIBS) LDFLAGS='$(PIE_LDFLAGS)' ../configure $(confflags) --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) | 138 | cd build-deb && ../configure $(confflags) |
100 | 139 | ||
101 | ifeq ($(DEB_HOST_ARCH_OS),linux) | 140 | ifeq ($(DEB_HOST_ARCH_OS),linux) |
102 | # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999). | 141 | # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999). |
@@ -105,7 +144,7 @@ endif | |||
105 | # Debian's /var/log/btmp has inappropriate permissions. | 144 | # Debian's /var/log/btmp has inappropriate permissions. |
106 | perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-deb/config.h | 145 | perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-deb/config.h |
107 | 146 | ||
108 | $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='$(OPTFLAGS) $(PIE_CFLAGS) -g -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -std=gnu99 -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -DSSH_EXTRAVERSION="\" $(SSH_EXTRAVERSION)\""' | 147 | $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' |
109 | # Support building on Debian 3.0 (with GNOME 1.4) and later. | 148 | # Support building on Debian 3.0 (with GNOME 1.4) and later. |
110 | if [ -f /usr/include/libgnomeui-2.0/gnome.h ]; then \ | 149 | if [ -f /usr/include/libgnomeui-2.0/gnome.h ]; then \ |
111 | $(MAKE) -C contrib gnome-ssh-askpass2 CC='gcc $(OPTFLAGS) -g -Wall'; \ | 150 | $(MAKE) -C contrib gnome-ssh-askpass2 CC='gcc $(OPTFLAGS) -g -Wall'; \ |
@@ -119,13 +158,13 @@ build-udeb: build-udeb-stamp | |||
119 | build-udeb-stamp: | 158 | build-udeb-stamp: |
120 | dh_testdir | 159 | dh_testdir |
121 | mkdir -p build-udeb | 160 | mkdir -p build-udeb |
122 | cd build-udeb && $(FORCE_LIBS) ../configure $(confflags) --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --without-xauth --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper | 161 | cd build-udeb && ../configure $(confflags_udeb) |
123 | # Debian's /var/log/btmp has inappropriate permissions. | 162 | # Debian's /var/log/btmp has inappropriate permissions. |
124 | perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-udeb/config.h | 163 | perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-udeb/config.h |
125 | # Avoid libnsl linkage. Ugh. | 164 | # Avoid libnsl linkage. Ugh. |
126 | perl -pi -e 's/ +-lnsl//' build-udeb/config.status | 165 | perl -pi -e 's/ +-lnsl//' build-udeb/config.status |
127 | cd build-udeb && ./config.status | 166 | cd build-udeb && ./config.status |
128 | $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='-Os -g -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -std=gnu99 -DSSH_EXTRAVERSION="\" $(SSH_EXTRAVERSION)\""' ssh scp sftp sshd ssh-keygen | 167 | $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen |
129 | touch build-udeb-stamp | 168 | touch build-udeb-stamp |
130 | 169 | ||
131 | clean: | 170 | clean: |
@@ -3,7 +3,8 @@ | |||
3 | #define SSH_VERSION "OpenSSH_4.7" | 3 | #define SSH_VERSION "OpenSSH_4.7" |
4 | 4 | ||
5 | #define SSH_PORTABLE "p1" | 5 | #define SSH_PORTABLE "p1" |
6 | #ifndef SSH_EXTRAVERSION | 6 | #ifdef SSH_EXTRAVERSION |
7 | #define SSH_EXTRAVERSION | 7 | #define SSH_RELEASE SSH_VERSION SSH_PORTABLE " " SSH_EXTRAVERSION |
8 | #else | ||
9 | #define SSH_RELEASE SSH_VERSION SSH_PORTABLE | ||
8 | #endif | 10 | #endif |
9 | #define SSH_RELEASE SSH_VERSION SSH_PORTABLE SSH_EXTRAVERSION | ||