Commit ff2f5d38 authored by Jari Aalto's avatar Jari Aalto

2.0-9: All hardened build flags

Signed-off-by: 's avatarJari Aalto <jari.aalto@cante.net>
parent a45c6796
corkscrew (2.0-9) unstable; urgency=low
* debian/control
- (Build-Depends): Rm dpkg-dev; not needed with debhelper 9.
- (standards-Version): Update to 3.9.3.1.
* debian/copyright
- Update to format 1.0.
* debian/patches
- (20): Refresh. Fix spelling mistake in code.
* debian/rules
- Enable all hardening flags.
- Use DEB_*_MAINT_* variables.
* debian/*.mk
- Minor updates.
-- Jari Aalto <jari.aalto@cante.net> Thu, 22 Mar 2012 15:18:09 -0400
corkscrew (2.0-8) unstable; urgency=low
* debian/compat
......
......@@ -2,8 +2,8 @@ Source: corkscrew
Section: net
Priority: optional
Maintainer: Jari Aalto <jari.aalto@cante.net>
Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1), autotools-dev
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 9), autotools-dev
Standards-Version: 3.9.3.1
Homepage: http://freshmeat.net/projects/corkscrew
Vcs-Browser: http://git.debian.org/?p=collab-maint/corkscrew.git
Vcs-Git: git://git.debian.org/git/collab-maint/corkscrew.git
......
Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0
X-Format: http://dep.debian.net/deps/dep5
Upstream-Name: corkscrew
Upstream-Contact: Pat Padgett <agroman@agroman.net>
......@@ -6,13 +6,13 @@ Source: http://freshmeat.net/projects/corkscrew
Files: *
Copyright:
2001 Pat Padgett <agroman@agroman.net>
2001 Pat Padgett <agroman@agroman.net>
License: GPL-2+
Files: debian/*
Copyright:
2010-2012 Jari Aalto <jari.aalto@cante.net>
2002-2005 Seyrat <tomasera@debian.org>
2010-2012 Jari Aalto <jari.aalto@cante.net>
2002-2005 Seyrat <tomasera@debian.org>
License: GPL-2+
License: GPL-2+
......
#!/usr/bin/make -f
#
# debian-autotools.mk -- Common settings for Autotoolsx
# debian-autotools.mk -- Common tasks for Autotools
#
# Copyright
#
# Copyright (C) 2008-2010 Jari Aalto <jari.aalto@cante.net>
# Copyright (C) 2008-2010 Jari Aalto <jari.aalto@cante.net>
#
# License
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Description
#
# This is GNU makefile part that defines common variables,
# targets and macros to be used from debian/rules.
# This is GNU makefile part that defines common variables,
# targets and macros to be used in debian/rules.
#
# Dealing with packages that have old Autotools config.* files
# we can: (1) Save package's config.* (2) Copy the latest from
# Debian (3) restore package's config.* files. This way the
# DEbian *diff.gz stays clean and understandable to examine.
# we can: (1) Save package's config.* (2) Copy the latest from
# Debian (3) restore package's config.* files. This way the
# Debian *diff.gz stays clean and understandable to examine. In
# addition if sources are kept in version control, they are not
# flagged as modified.
#
# To install, add macro calls like this:
#
# config.status: configure
# dh_testdir
# $(make-depend-save)
# $(config-prepare)
# CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
# override_dh_auto_configure:
# $(make-depend-save)
# $(config-prepare)
# dh_auto_configure
#
# binary-arch: build install
# $(make-depend-restore)
# $(config-restore)
# ...
# dh_builddeb
# override_dh_auto_clean:
# $(config-restore)
# $(make-depend-restore)
# dh_auto_clean
ifneq (,)
This makefile requires GNU Make.
......@@ -52,79 +52,86 @@ endif
# ...................................................... make.depend ...
define make-depend-save
# Save original file
[ -f make.depend.original ] || cp -v make.depend make.depend.original
# make-depend-save: Save original file
[ -f make.depend.original ] || cp -v make.depend make.depend.original
endef
define make-depend-restore
# Restore original file
[ ! -f make.depend.original ] || mv -v make.depend.original make.depend
# make-depend-restore: Restore original file
[ ! -f make.depend.original ] || mv -v make.depend.original make.depend
endef
# ...................................................... config-h-in ...
define config-h-in-save
# Save original file
[ -f config.h.in.original ] || cp -v config.h.in config.h.in.original
# config-h-in-save: Save original file
[ -f config.h.in.original ] || cp -v config.h.in config.h.in.original
endef
define config-h-in-restore
# Restore original file
[ ! -f config.h.in.original ] || mv -v config.h.in.original config.h.in
# config-h-in-restore: Restore original file
[ ! -f config.h.in.original ] || mv -v config.h.in.original config.h.in
endef
# ........................................................ configure ...
define config-configure-save
# Save original file
[ -f configure.original ] || cp -v configure configure.original
# config-configure-save: Save original file
[ -f configure.original ] || cp -v configure configure.original
endef
define config-configure-restore
# Restore original file
[ ! -f configure.original ] || mv -v configure.original configure
# config-configure-restore: Restore original file
[ ! -f configure.original ] || mv -v configure.original configure
endef
# ........................................ Debian config.{sub,guess} ...
define config-patch-sub
# Use latest version from Debian
# config-patch-sub: Use latest version from Debian
[ ! -f /usr/share/misc/config.sub ] || \
cp -vf /usr/share/misc/config.sub .
endef
define config-patch-guess
# Use latest version from Debian
# config-patch-guess: Use latest version from Debian
[ ! -f /usr/share/misc/config.guess ] || \
cp -vf /usr/share/misc/config.guess config.guess
cp -vf /usr/share/misc/config.guess .
endef
# ............................................... config.{sub,guess} ...
define config-save
# Save original files
[ -f config.sub.original ] || cp -v config.sub config.sub.original
[ -f config.guess.original ] || cp -v config.guess config.guess.original
# config-save: Save original files
[ ! -f config.sub ] || cp -v config.sub config.sub.original
[ ! -f config.guess ] || cp -v config.guess config.guess.original
endef
define config-restore
# Restore original files
[ ! -f config.sub.original ] || mv -v config.sub.original config.sub
[ ! -f config.guess.original ] || mv -v config.guess.original config.guess
# config-restore: Restore original files
[ ! -f config.sub.original ] || mv -v config.sub.original config.sub
[ ! -f config.guess.original ] || mv -v config.guess.original config.guess
endef
define config-restore-copy
# config-restore-copy: Copy original files
[ ! -f config.sub.original ] || cp -v config.sub.original config.sub
[ ! -f config.guess.original ] || cp -v config.guess.original config.guess
endef
define config-delete
# Delete config files
rm -f config.sub config.guess
# config-delete: Delete config files
rm -f config.sub config.guess
endef
define config-patch
# config-patch: copy latest
$(config-patch-sub)
$(config-patch-guess)
# config-patch: copy latest
$(config-patch-sub)
$(config-patch-guess)
endef
define config-prepare
# config-prepare: save and patch
$(config-save)
$(config-patch)
endef
......
......@@ -5,14 +5,12 @@ Subject: [PATCH] Debian change (Thomas Seyrat)
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
corkscrew.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
corkscrew.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/corkscrew.c b/corkscrew.c
index d81d14e..78a4a62 100644
--- a/corkscrew.c
+++ b/corkscrew.c
@@ -176,6 +176,7 @@ char *argv[];
@@ -176,6 +176,7 @@
#endif
char *host = NULL, *desthost = NULL, *destport = NULL;
char *up = NULL;
......@@ -20,8 +18,12 @@ index d81d14e..78a4a62 100644
int port, sent, setup, code, csock;
fd_set rfd, sfd;
struct timeval tv;
@@ -262,6 +263,11 @@ char *argv[];
fprintf(stderr, "Proxy could not open connnection to %s: %s\n", desthost, descr);
@@ -259,9 +260,14 @@
else {
if ((strncmp(version,"HTTP/",5) == 0) && (code >= 407)) {
}
- fprintf(stderr, "Proxy could not open connnection to %s: %s\n", desthost, descr);
+ fprintf(stderr, "Proxy could not open connection to %s: %s\n", desthost, descr);
exit(-1);
}
+ if (tmp = strstr(buffer,"\r\n\r\n"))
......@@ -32,6 +34,3 @@ index d81d14e..78a4a62 100644
}
}
if (FD_ISSET(csock, &sfd) && (sent == 0)) {
--
1.6.6.1
......@@ -2,29 +2,33 @@
#
# Copyright information
#
# Copyright (C) 2008-2010 Jari Aalto
# Copyright (C) 2008-2012 Jari Aalto
#
# License
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Description
#
# Convert *.pod files to manual pages. Write this to 'install'
# target:
# Convert *.pod files to manual pages. Add this to Makefile:
#
# install: build $(MANPAGE)
# PACKAGE = package
#
# man:
# make -f pod2man.mk PACKAGE=$(PACKAGE) makeman
#
# build: man
ifneq (,)
This makefile requires GNU Make.
......@@ -35,18 +39,18 @@ PACKAGE ?= package
# Optional variables to set
MANSECT ?= 1
PODCENTER =
PODDATE = $$(date "+%Y-%m-%d")
PODCENTER ?= User Commands
PODDATE ?= $$(date "+%Y-%m-%d")
# Directories
MANSRC =
MANDEST = $(MANSRC)
MANSRC ?=
MANDEST ?= $(MANSRC)
MANPOD = $(MANSRC)$(PACKAGE).$(MANSECT).pod
MANPAGE = $(MANDEST)$(PACKAGE).$(MANSECT)
MANPOD ?= $(MANSRC)$(PACKAGE).$(MANSECT).pod
MANPAGE ?= $(MANDEST)$(PACKAGE).$(MANSECT)
POD2MAN = pod2man
POD2MAN_FLAGS = --utf8
POD2MAN ?= pod2man
POD2MAN_FLAGS ?= --utf8
makeman: $(MANPAGE)
......
......@@ -5,15 +5,13 @@ PACKAGE = corkscrew
include debian/pod2man.mk
include debian/debian-autotools.mk
include /usr/share/dpkg/buildflags.mk
CFLAGS += -Wall -pedantic
LDFLAGS += -Wl,--as-needed
export CFLAGS LDFLAGS
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
man:
# target: man - convert *.pod to manual page
$(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) \
PODCENTER=Networking MANSECT=1 makeman
PODCENTER=Networking makeman
override_dh_auto_configure: man
$(config-prepare)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment