Index: head/www/tinyproxy/Makefile =================================================================== --- head/www/tinyproxy/Makefile (revision 385949) +++ head/www/tinyproxy/Makefile (revision 385950) @@ -1,58 +1,47 @@ # Created by: Mitsuru Yoshida # $FreeBSD$ PORTNAME= tinyproxy PORTVERSION= 1.8.3 PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= https://banu.com/pub/tinyproxy/${PORTVERSION:R}/ \ LOCAL/sunpoet MAINTAINER= sunpoet@FreeBSD.org COMMENT= Small, efficient HTTP proxy server LICENSE= GPLv2 GPLv3 LICENSE_COMB= dual OPTIONS_DEFINE= REVERSE TRANSPARENT XHEADER REVERSE_DESC= Reverse proxy support TRANSPARENT_DESC= Transparent proxy support XHEADER_DESC= X-Tinyproxy header CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \ --disable-silent-rules \ - --localstatedir=/var \ --program-transform-name="" GNU_CONFIGURE= yes USE_RC_SUBR= ${PORTNAME} USES= gmake REVERSE_CONFIGURE_ENABLE= reverse TRANSPARENT_CONFIGURE_ENABLE= transparent XHEADER_CONFIGURE_ENABLE= xtinyproxy post-patch: @${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|tinyproxy/tinyproxy|tinyproxy|g; s|/etc/tinyproxy|${PREFIX}&|' \ ${WRKSRC}/docs/man5/tinyproxy.conf.txt.in \ ${WRKSRC}/docs/man8/tinyproxy.txt.in \ ${WRKSRC}/etc/tinyproxy.conf.in @${REINPLACE_CMD} -e '/\/usr\/share\/tinyproxy/d' ${WRKSRC}/etc/tinyproxy.conf.in -# @${REINPLACE_CMD} \ -# -e 's|/etc/tinyproxy/tinyproxy.conf|${PREFIX}/etc/tinyproxy.conf|' \ -# -e 's|/var/log/tinyproxy/tinyproxy.log|/var/log/tinyproxy.log|' \ -# 's|/var/run/tinyproxy/tinyproxy.pid|/var/run/tinyproxy.pid|' \ -# ${WRKSRC}/docs/man5/tinyproxy.conf.txt.in ${WRKSRC}/docs/man8/tinyproxy.txt.in -# @${REINPLACE_CMD} \ -# -e 's|/log/tinyproxy/|/log/|' \ -# -e 's|/run/tinyproxy/|/run/|' \ -# -e 's|/usr/share/tinyproxy|${DATADIR}|' \ -# ${WRKSRC}/etc/tinyproxy.conf.in post-install: ${INSTALL_DATA} ${WRKSRC}/etc/tinyproxy.conf ${STAGEDIR}${PREFIX}/etc/tinyproxy.conf.sample ${INSTALL_MAN} ${FILESDIR}/tinyproxy.conf.5 ${STAGEDIR}${PREFIX}/man/man5/ ${INSTALL_MAN} ${FILESDIR}/tinyproxy.8 ${STAGEDIR}${PREFIX}/man/man8/ .include Index: head/www/tinyproxy/files/patch-src__main.c =================================================================== --- head/www/tinyproxy/files/patch-src__main.c (revision 385949) +++ head/www/tinyproxy/files/patch-src__main.c (nonexistent) @@ -1,32 +0,0 @@ ---- ./src/main.c.orig 2010-06-21 13:39:34.000000000 -0400 -+++ ./src/main.c 2010-06-21 13:40:20.000000000 -0400 -@@ -407,12 +407,9 @@ - exit (EX_OSERR); - } - -- /* Switch to a different user if we're running as root */ -- if (geteuid () == 0) -- change_user (argv[0]); -- else -- log_message (LOG_WARNING, -- "Not running as root, so not changing UID/GID."); -+ /*To get this to run correctly on FreeBSD, we must -+ ceate the PID and log files before we drop privileges. -+ Other ideas are welcome */ - - /* Create log file after we drop privileges */ - if (setup_logging ()) { -@@ -427,6 +424,13 @@ - exit (EX_OSERR); - } - } -+ /* Switch to a different user if we're running as root */ -+ if (geteuid () == 0) -+ change_user (argv[0]); -+ else -+ log_message (LOG_WARNING, -+ "Not running as root, so not changing UID/GID."); -+ - - if (child_pool_create () < 0) { - fprintf (stderr, Property changes on: head/www/tinyproxy/files/patch-src__main.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/tinyproxy/files/patch-etc__Makefile.in =================================================================== --- head/www/tinyproxy/files/patch-etc__Makefile.in (revision 385949) +++ head/www/tinyproxy/files/patch-etc__Makefile.in (nonexistent) @@ -1,15 +0,0 @@ ---- ./etc/Makefile.in.orig 2010-06-21 10:10:59.000000000 -0400 -+++ ./etc/Makefile.in 2010-06-21 10:11:42.000000000 -0400 -@@ -248,8 +248,10 @@ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ -- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ -- $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ -+ nfile="$$files.sample"; \ -+ cp $$files $$nfile; \ -+ echo " $(INSTALL_DATA) $$nfile '$(DESTDIR)$(sysconfdir)'"; \ -+ $(INSTALL_DATA) $$nfile "$(DESTDIR)$(sysconfdir)" || exit $$?; \ - done - - uninstall-sysconfDATA: Property changes on: head/www/tinyproxy/files/patch-etc__Makefile.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/tinyproxy/files/patch-Makefile.in =================================================================== --- head/www/tinyproxy/files/patch-Makefile.in (revision 385949) +++ head/www/tinyproxy/files/patch-Makefile.in (revision 385950) @@ -1,10 +1,10 @@ ---- ./Makefile.in.orig 2011-08-16 08:27:58.000000000 -0400 -+++ ./Makefile.in 2011-10-22 08:11:22.000000000 -0400 -@@ -222,7 +222,6 @@ +--- Makefile.in.orig 2011-08-16 12:27:58 UTC ++++ Makefile.in +@@ -222,7 +222,6 @@ SUBDIRS = \ src \ data \ etc \ - docs \ m4macros \ tests Index: head/www/tinyproxy/files/patch-configure =================================================================== --- head/www/tinyproxy/files/patch-configure (revision 385949) +++ head/www/tinyproxy/files/patch-configure (revision 385950) @@ -1,15 +1,47 @@ ---- ./configure.orig 2011-10-22 08:06:07.000000000 -0400 -+++ ./configure 2011-10-22 08:06:26.000000000 -0400 -@@ -6865,11 +6865,7 @@ +--- configure.orig 2011-08-16 12:27:59 UTC ++++ configure +@@ -3626,13 +3626,13 @@ if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then +- CFLAGS="-g -O2" ++ CFLAGS="-g " + else + CFLAGS="-g" + fi + else + if test "$GCC" = yes; then +- CFLAGS="-O2" ++ CFLAGS="" + else + CFLAGS= + fi +@@ -4889,13 +4889,13 @@ if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then +- CFLAGS="-g -O2" ++ CFLAGS="-g " + else + CFLAGS="-g" + fi + else + if test "$GCC" = yes; then +- CFLAGS="-O2" ++ CFLAGS="" + else + CFLAGS= + fi +@@ -6865,11 +6865,7 @@ else HAVE_A2X_FALSE= fi -if test x"$A2X" = x"no"; then - as_fn_error $? "Test for asciidoc failed. See the file 'INSTALL' for help." "$LINENO" 5 -fi - -ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile data/templates/Makefile etc/Makefile docs/Makefile docs/man5/Makefile docs/man5/tinyproxy.conf.txt docs/man8/Makefile docs/man8/tinyproxy.txt m4macros/Makefile tests/Makefile tests/scripts/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile data/templates/Makefile etc/Makefile m4macros/Makefile tests/Makefile tests/scripts/Makefile" cat >confcache <<\_ACEOF Index: head/www/tinyproxy/files/patch-etc-Makefile.in =================================================================== --- head/www/tinyproxy/files/patch-etc-Makefile.in (nonexistent) +++ head/www/tinyproxy/files/patch-etc-Makefile.in (revision 385950) @@ -0,0 +1,15 @@ +--- etc/Makefile.in.orig 2011-08-16 12:27:58 UTC ++++ etc/Makefile.in +@@ -248,8 +248,10 @@ install-sysconfDATA: $(sysconf_DATA) + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ +- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ +- $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ ++ nfile="$$files.sample"; \ ++ cp $$files $$nfile; \ ++ echo " $(INSTALL_DATA) $$nfile '$(DESTDIR)$(sysconfdir)'"; \ ++ $(INSTALL_DATA) $$nfile "$(DESTDIR)$(sysconfdir)" || exit $$?; \ + done + + uninstall-sysconfDATA: Property changes on: head/www/tinyproxy/files/patch-etc-Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/tinyproxy/files/patch-src-main.c =================================================================== --- head/www/tinyproxy/files/patch-src-main.c (nonexistent) +++ head/www/tinyproxy/files/patch-src-main.c (revision 385950) @@ -0,0 +1,32 @@ +--- src/main.c.orig 2011-08-16 12:14:34 UTC ++++ src/main.c +@@ -407,12 +407,9 @@ main (int argc, char **argv) + exit (EX_OSERR); + } + +- /* Switch to a different user if we're running as root */ +- if (geteuid () == 0) +- change_user (argv[0]); +- else +- log_message (LOG_WARNING, +- "Not running as root, so not changing UID/GID."); ++ /*To get this to run correctly on FreeBSD, we must ++ ceate the PID and log files before we drop privileges. ++ Other ideas are welcome */ + + /* Create log file after we drop privileges */ + if (setup_logging ()) { +@@ -427,6 +424,13 @@ main (int argc, char **argv) + exit (EX_OSERR); + } + } ++ /* Switch to a different user if we're running as root */ ++ if (geteuid () == 0) ++ change_user (argv[0]); ++ else ++ log_message (LOG_WARNING, ++ "Not running as root, so not changing UID/GID."); ++ + + if (child_pool_create () < 0) { + fprintf (stderr, Property changes on: head/www/tinyproxy/files/patch-src-main.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property