[PATCH] www/apache20,www/apache22 Strip Binaries
Jeremy Chadwick
freebsd at jdc.parodius.com
Tue Aug 16 10:20:17 UTC 2011
On Tue, Aug 16, 2011 at 05:55:36PM +0900, Takefu wrote:
> >Submitter-Id: current-users
> >Originator: Takefu
> >Organization: FOX Amateur Radio Club
> >Confidential: no
> >Synopsis: [PATCH] www/apache20,www/apache22 Strip Binaries
> >Severity: non-critical
> >Priority: low
> >Category: ports
> >Class: update
> >Release: FreeBSD 6.4-STABLE i386
> >Description:
> www/apache20,www/apache22 Strip Binaries
> >Fix:
> --- apache20.patch begins here ---
> diff -ruN /usr/ports/www/apache20/files/patch-build__instdso.sh www/apache20/files/patch-build__instdso.sh
> --- /usr/ports/www/apache20/files/patch-build__instdso.sh 1970-01-01 09:00:00.000000000 +0900
> +++ www/apache20/files/patch-build__instdso.sh 2011-08-16 17:04:24.000000000 +0900
> @@ -0,0 +1,11 @@
> +--- build/instdso.sh.orig 2006-07-12 16:40:55.000000000 +0900
> ++++ build/instdso.sh 2011-08-16 17:02:40.000000000 +0900
> +@@ -49,7 +49,7 @@
> + $CMD || exit $?
> + fi
> +
> +-CMD="$SH_LIBTOOL --mode=install cp $DSOARCHIVE $TARGETDIR/"
> ++CMD="$SH_LIBTOOL --mode=install install -s $DSOARCHIVE $TARGETDIR/"
> + echo $CMD
> + $CMD || exit $?
> +
> diff -ruN /usr/ports/www/apache20/files/patch-build__rules.mk.in www/apache20/files/patch-build__rules.mk.in
> --- /usr/ports/www/apache20/files/patch-build__rules.mk.in 2010-05-07 08:10:19.000000000 +0900
> +++ www/apache20/files/patch-build__rules.mk.in 2011-08-16 17:04:02.000000000 +0900
> @@ -1,5 +1,5 @@
> ---- ./build/rules.mk.in.orig 2006-07-12 03:40:55.000000000 -0400
> -+++ ./build/rules.mk.in 2010-05-06 16:06:03.734831750 -0400
> +--- build/rules.mk.in.orig 2006-07-12 16:40:55.000000000 +0900
> ++++ build/rules.mk.in 2011-08-16 17:03:28.000000000 +0900
> @@ -45,7 +45,7 @@
>
> LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
> @@ -9,3 +9,13 @@
>
> # Cross compile commands
>
> +@@ -54,7 +54,8 @@
> + MKINSTALLDIRS = $(abs_srcdir)/build/mkdir.sh
> + INSTALL = $(LIBTOOL) --mode=install $(abs_srcdir)/build/install.sh -c
> + INSTALL_DATA = $(INSTALL) -m 644
> +-INSTALL_PROGRAM = $(INSTALL) -m 755 $(INSTALL_PROG_FLAGS)
> ++INSTALL_PROGRAM = $(INSTALL) -s -m 755 $(INSTALL_PROG_FLAGS)
> ++INSTALL_SCRIPT = $(INSTALL) -m 755 $(INSTALL_PROG_FLAGS)
> +
> + #
> + # Standard build rules
> --- apache20.patch ends here ---
>
> --- apache22.patch begins here ---
> diff -ruN /usr/ports/www/apache22/files/patch-Makefile.in www/apache22/files/patch-Makefile.in
> --- /usr/ports/www/apache22/files/patch-Makefile.in 2010-05-07 12:15:44.000000000 +0900
> +++ www/apache22/files/patch-Makefile.in 2011-08-16 16:26:21.000000000 +0900
> @@ -1,5 +1,5 @@
> ---- ./Makefile.in.orig 2008-11-25 15:24:49.000000000 -0500
> -+++ ./Makefile.in 2010-05-06 19:37:54.211730130 -0400
> +--- Makefile.in.orig 2008-11-26 05:24:49.000000000 +0900
> ++++ Makefile.in 2011-08-16 16:25:58.000000000 +0900
> @@ -31,9 +31,11 @@
> install-conf:
> @echo Installing configuration files
> @@ -31,6 +31,15 @@
> fi; \
> fi; \
> done ; \
> +@@ -101,7 +103,7 @@
> + @for f in $(top_builddir)/config.nice \
> + $(top_srcdir)/build/mkdir.sh \
> + $(top_srcdir)/build/instdso.sh; do \
> +- $(INSTALL_PROGRAM) $$f $(DESTDIR)$(installbuilddir); \
> ++ $(INSTALL_SCRIPT) $$f $(DESTDIR)$(installbuilddir); \
> + done
> + @$(INSTALL_DATA) build/config_vars.out $(DESTDIR)$(installbuilddir)/config_vars.mk
> + @rm build/config_vars.out
> @@ -120,48 +122,29 @@
> doxygen $(top_srcdir)/docs/doxygen.conf
>
> diff -ruN /usr/ports/www/apache22/files/patch-build__instdso.sh www/apache22/files/patch-build__instdso.sh
> --- /usr/ports/www/apache22/files/patch-build__instdso.sh 1970-01-01 09:00:00.000000000 +0900
> +++ www/apache22/files/patch-build__instdso.sh 2011-08-16 16:57:40.000000000 +0900
> @@ -0,0 +1,11 @@
> +--- build/instdso.sh.orig 2006-07-12 12:38:44.000000000 +0900
> ++++ build/instdso.sh 2011-08-16 16:57:13.000000000 +0900
> +@@ -49,7 +49,7 @@
> + $CMD || exit $?
> + fi
> +
> +-CMD="$SH_LIBTOOL --mode=install cp $DSOARCHIVE $TARGETDIR/"
> ++CMD="$SH_LIBTOOL --mode=install install -s $DSOARCHIVE $TARGETDIR/"
> + echo $CMD
> + $CMD || exit $?
> +
> diff -ruN /usr/ports/www/apache22/files/patch-build__rules.mk.in www/apache22/files/patch-build__rules.mk.in
> --- /usr/ports/www/apache22/files/patch-build__rules.mk.in 1970-01-01 09:00:00.000000000 +0900
> +++ www/apache22/files/patch-build__rules.mk.in 2011-08-16 16:09:05.000000000 +0900
> @@ -0,0 +1,12 @@
> +--- build/rules.mk.in.orig 2006-07-12 12:38:44.000000000 +0900
> ++++ build/rules.mk.in 2011-08-16 16:09:01.000000000 +0900
> +@@ -55,7 +55,8 @@
> + # Helper programs
> +
> + INSTALL_DATA = $(INSTALL) -m 644
> +-INSTALL_PROGRAM = $(INSTALL) -m 755 $(INSTALL_PROG_FLAGS)
> ++INSTALL_PROGRAM = $(INSTALL) -s -m 755 $(INSTALL_PROG_FLAGS)
> ++INSTALL_SCRIPT = $(INSTALL) -m 755 $(INSTALL_PROG_FLAGS)
> +
> + #
> + # Standard build rules
> --- apache22.patch ends here ---
FWIW, my opinion of this patch is that it should be optionally applied
via the port Makefile. It should not be unconditional. We prefer to
run with non-stripped binaries as it makes debugging httpd segfaults
obviously easier.
So if this patch set is considered, please ensure that the port Makefile
has some knob to toggle use of it on/off.
--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, US |
| Making life hard for others since 1977. PGP 4BD6C0CB |
More information about the freebsd-apache
mailing list