Update to 1.8.2.
Add transparent proxy support. Don't be so silent when building. Feature safe: yes
This commit is contained in:
+30
-9
@@ -6,25 +6,32 @@
|
||||
#
|
||||
|
||||
PORTNAME= tinyproxy
|
||||
PORTVERSION= 1.6.5
|
||||
PORTVERSION= 1.8.2
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= https://www.banu.com/pub/tinyproxy/1.6/
|
||||
MASTER_SITES= https://www.banu.com/pub/tinyproxy/1.8/
|
||||
|
||||
MAINTAINER= wxs@FreeBSD.org
|
||||
COMMENT= A small, efficient HTTP proxy server
|
||||
|
||||
BUILD_DEPENDS= asciidoc:${PORTSDIR}/textproc/asciidoc\
|
||||
xsltproc:${PORTSDIR}/textproc/libxslt\
|
||||
xmllint:${PORTSDIR}/textproc/libxml2 \
|
||||
${LOCALBASE}/share/xsl/docbook/lib/lib.xsl:${PORTSDIR}/textproc/docbook-xsl
|
||||
|
||||
USE_RC_SUBR= tinyproxy.sh
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \
|
||||
--with-config=${PREFIX}/etc/tinyproxy.conf \
|
||||
--program-transform-name=""
|
||||
MAKE_JOBS_SAFE= yes
|
||||
CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \
|
||||
--program-transform-name="" \
|
||||
--disable-silent-rules
|
||||
|
||||
MAN8= tinyproxy.8
|
||||
MAN5= tinyproxy.conf.5
|
||||
|
||||
OPTIONS= REVERSE "Enable reverse proxy support" Off
|
||||
OPTIONS= REVERSE "Enable reverse proxy support" Off \
|
||||
TRANSPARENT "Enable transparent proxy support" Off
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
@@ -32,16 +39,30 @@ OPTIONS= REVERSE "Enable reverse proxy support" Off
|
||||
CONFIGURE_ARGS+= --enable-reverse
|
||||
.endif
|
||||
|
||||
.if defined(WITH_TRANSPARENT)
|
||||
CONFIGURE_ARGS+= --enable-transparent
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/configure
|
||||
@${REINPLACE_CMD} -e 's|/etc/tinyproxy/tinyproxy.conf|${PREFIX}/etc/tinyproxy.conf|' \
|
||||
${WRKSRC}/doc/tinyproxy.8
|
||||
${WRKSRC}/docs/man8/tinyproxy.txt.in
|
||||
@${REINPLACE_CMD} -e 's|/var/run/tinyproxy/tinyproxy.pid|/var/run/tinyproxy.pid|' \
|
||||
${WRKSRC}/docs/man8/tinyproxy.txt.in
|
||||
@${REINPLACE_CMD} -e 's|/var/log/tinyproxy/tinyproxy.log|/var/log/tinyproxy.log|' \
|
||||
${WRKSRC}/docs/man8/tinyproxy.txt.in
|
||||
@${REINPLACE_CMD} -e 's|/etc/tinyproxy/tinyproxy.conf|${PREFIX}/etc/tinyproxy.conf|' \
|
||||
${WRKSRC}/docs/man5/tinyproxy.conf.txt.in
|
||||
@${REINPLACE_CMD} -e 's|/usr/share/tinyproxy|${DATADIR}|' \
|
||||
${WRKSRC}/doc/tinyproxy.conf
|
||||
${WRKSRC}/etc/tinyproxy.conf.in
|
||||
@${REINPLACE_CMD} -e 's|/run/tinyproxy/|/run/|' \
|
||||
${WRKSRC}/etc/tinyproxy.conf.in
|
||||
@${REINPLACE_CMD} -e 's|/log/tinyproxy/|/log/|' \
|
||||
${WRKSRC}/etc/tinyproxy.conf.in
|
||||
|
||||
post-install:
|
||||
@if [ ! -f ${PREFIX}/etc/tinyproxy.conf ]; then \
|
||||
${CP} -p ${PREFIX}/etc/tinyproxy.conf-dist \
|
||||
${CP} -p ${PREFIX}/etc/tinyproxy.conf.sample \
|
||||
${PREFIX}/etc/tinyproxy.conf ; \
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
MD5 (tinyproxy-1.6.5.tar.gz) = 2b2862ba33d2939e4572688d442ba415
|
||||
SHA256 (tinyproxy-1.6.5.tar.gz) = d6449d8c2e9a5d4afb1a705c351d1de69d07d64554f48c43ac2cfd7883c03d04
|
||||
SIZE (tinyproxy-1.6.5.tar.gz) = 318645
|
||||
MD5 (tinyproxy-1.8.2.tar.gz) = 7066f8192ba1307f79b363f60968e552
|
||||
SHA256 (tinyproxy-1.8.2.tar.gz) = 5520f9b726f004b32abee621aad03ff0c8db2ba2680b7afba05dd6ccad1d6b14
|
||||
SIZE (tinyproxy-1.8.2.tar.gz) = 268190
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ./configure.orig 2010-06-21 10:54:53.000000000 -0400
|
||||
+++ ./configure 2010-06-21 10:55:11.000000000 -0400
|
||||
@@ -764,7 +764,7 @@
|
||||
datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
-localstatedir='${prefix}/var'
|
||||
+localstatedir='/var'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
@@ -0,0 +1,15 @@
|
||||
--- ./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:
|
||||
@@ -0,0 +1,32 @@
|
||||
--- ./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,
|
||||
@@ -1,12 +1,8 @@
|
||||
@unexec if cmp -s %D/etc/tinyproxy.conf-dist %D/etc/tinyproxy.conf; then rm -f %D/etc/tinyproxy.conf; fi
|
||||
etc/tinyproxy.conf-dist
|
||||
@unexec if cmp -s %D/etc/tinyproxy.conf.sample %D/etc/tinyproxy.conf; then rm -f %D/etc/tinyproxy.conf; fi
|
||||
etc/tinyproxy.conf.sample
|
||||
@exec if [ ! -f %D/etc/tinyproxy.conf ] ; then cp -p %D/%F %B/tinyproxy.conf; fi
|
||||
sbin/tinyproxy
|
||||
%%DATADIR%%/HTML_VARIABLES
|
||||
%%DATADIR%%/debug.html
|
||||
%%DATADIR%%/debug.html.dist
|
||||
%%DATADIR%%/default.html
|
||||
%%DATADIR%%/default.html.dist
|
||||
%%DATADIR%%/stats.html
|
||||
%%DATADIR%%/stats.html.dist
|
||||
@dirrm %%DATADIR%%
|
||||
|
||||
Reference in New Issue
Block a user