1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Update to 1.10.0

- Update manpages

Note that the security fix for CVE-2017-11747 to generate pid file before
dropping privilege is already done in the src/main.c patch.

Changes:	https://github.com/tinyproxy/tinyproxy/releases
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2019-01-06 20:39:53 +00:00
parent 06e735460e
commit 5e4fb3aeb5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=489530
6 changed files with 129 additions and 71 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= tinyproxy
PORTVERSION= 1.8.4
PORTVERSION= 1.10.0
PORTEPOCH= 1
CATEGORIES= www
@ -12,18 +12,19 @@ COMMENT= Small, efficient HTTP proxy server
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
USE_GITHUB= yes
OPTIONS_DEFINE= REVERSE TRANSPARENT XHEADER
REVERSE_DESC= Reverse proxy support
TRANSPARENT_DESC= Transparent proxy support
XHEADER_DESC= X-Tinyproxy header
USES= autoreconf gmake
CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \
--program-transform-name=""
GNU_CONFIGURE= yes
USE_RC_SUBR= ${PORTNAME}
USES= autoreconf gmake
USE_GITHUB= yes
REVERSE_CONFIGURE_ENABLE= reverse
TRANSPARENT_CONFIGURE_ENABLE= transparent
@ -34,8 +35,8 @@ post-patch:
${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/^#LogFile/LogFile/; s/^#PidFile/PidFile/' ${WRKSRC}/etc/tinyproxy.conf.in
@${REINPLACE_CMD} -e 's|pkgsysconf_DATA|sysconf_DATA|' ${WRKSRC}/etc/Makefile.am
@${REINPLACE_CMD} -e '/\/usr\/share\/tinyproxy/d; s|^#\(LogFile \)|\1|; s|^#\(PidFile \)|\1|' ${WRKSRC}/etc/tinyproxy.conf.in
post-install:
${INSTALL_DATA} ${WRKSRC}/etc/tinyproxy.conf ${STAGEDIR}${PREFIX}/etc/tinyproxy.conf.sample

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1479837510
SHA256 (tinyproxy-tinyproxy-1.8.4_GH0.tar.gz) = 1999c88c43e31ff4cb5e8379b76776a65fa3d326eea868cb5f88ef58a8f631de
SIZE (tinyproxy-tinyproxy-1.8.4_GH0.tar.gz) = 124634
TIMESTAMP = 1546784454
SHA256 (tinyproxy-tinyproxy-1.10.0_GH0.tar.gz) = ff4f3d1331d6d855d8b6ed794c22ab0a4285dd81fe9c98a7aa7ed591248d4ab9
SIZE (tinyproxy-tinyproxy-1.10.0_GH0.tar.gz) = 102337

View File

@ -1,15 +1,31 @@
--- configure.ac.orig 2014-12-13 00:57:23 UTC
--- configure.ac.orig 2018-09-01 02:06:59 UTC
+++ configure.ac
@@ -284,24 +284,12 @@ AC_SUBST(CPPFLAGS)
@@ -190,60 +190,15 @@ AC_SUBST(CPPFLAGS)
AC_SUBST(LIBS)
AC_SUBST(ADDITIONAL_OBJECTS)
-# Check for xml tools
-AC_PATH_PROG(XSLTPROC, xsltproc, no)
-AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno")
-
-# Check for asciidoc
-AC_PATH_PROG(A2X, a2x, no)
-AM_CONDITIONAL(HAVE_A2X, test "x$A2X" != "xno")
-if test x"$A2X" = x"no"; then
- AC_MSG_ERROR([Test for asciidoc failed. See the file 'INSTALL' for help.])
-
-# checking xmllint
-AC_PATH_PROG(XMLLINT, xmllint, no)
-if test "x$XMLLINT" != "xno"; then
- AS_ECHO_N("testing xmllint... ")
- echo "TEST" > conftest.txt
- if $A2X -f docbook conftest.txt 2>/dev/null; then
- AS_ECHO("ok")
- else
- AS_ECHO("failed")
- XMLLINT="no"
- fi
- rm -f conftest.txt conftest.xml
-fi
-AM_CONDITIONAL(HAVE_XMLLINT, test "x$XMLLINT" != "xno")
-
AC_CONFIG_FILES([
Makefile
@ -25,3 +41,23 @@
m4macros/Makefile
tests/Makefile
tests/scripts/Makefile
])
AC_OUTPUT
-
-# the manpages are shipped in the release tarball and we don't want them to
-# get regenerated if a2x is not available. the intermediate files from
-# AC_CONFIG_FILES are created with config.status, which is created at configure
-# runtime, so we need to touch them after config.status terminated to prevent
-# make from rebuild them.
-
-if test "x$A2X" = "xno"; then
- touch docs/man5/tinyproxy.conf.txt
- touch docs/man8/tinyproxy.txt
- if test -e docs/man5/tinyproxy.conf.5 ; then
- touch docs/man5/tinyproxy.conf.5
- fi
- if test -e docs/man8/tinyproxy.8 ; then
- touch docs/man8/tinyproxy.8
- fi
-fi

View File

@ -1,32 +1,26 @@
--- src/main.c.orig 2014-12-13 00:57:23 UTC
--- src/main.c.orig 2018-09-01 02:06:59 UTC
+++ src/main.c
@@ -417,12 +417,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
+ create the PID and log files before we drop privileges.
+ Other ideas are welcome */
/* Create log file after we drop privileges */
if (setup_logging ()) {
@@ -438,6 +435,13 @@ main (int argc, char **argv)
@@ -395,6 +395,11 @@ main (int argc, char **argv)
}
}
+ /* 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.");
+ /* Create log file before we drop privileges */
+ if (setup_logging ()) {
+ exit (EX_SOFTWARE);
+ }
+
/* Switch to a different user if we're running as root */
if (geteuid () == 0)
change_user (argv[0]);
@@ -402,11 +407,6 @@ main (int argc, char **argv)
log_message (LOG_WARNING,
"Not running as root, so not changing UID/GID.");
- /* Create log file after we drop privileges */
- if (setup_logging ()) {
- exit (EX_SOFTWARE);
- }
-
if (child_pool_create () < 0) {
fprintf (stderr,
"%s: Could not create the pool of children.\n",

View File

@ -1,13 +1,22 @@
'\" t
.\" Title: tinyproxy
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 07/16/2011
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 01/06/2019
.\" Manual: Tinyproxy manual
.\" Source: Version 1.8.3
.\" Source: Version 1.10.0
.\" Language: English
.\"
.TH "TINYPROXY" "8" "07/16/2011" "Version 1\&.8\&.3" "Tinyproxy manual"
.TH "TINYPROXY" "8" "01/06/2019" "Version 1\&.10\&.0" "Tinyproxy manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@ -45,11 +54,6 @@ Don\(cqt daemonize and stay in the foreground\&. Useful for debugging purposes\&
Display a short help screen of command line arguments and exit\&.
.RE
.PP
\fB\-l\fR
.RS 4
Display the licensing agreement\&.
.RE
.PP
\fB\-v\fR
.RS 4
Display version information and exit\&.
@ -147,15 +151,15 @@ The stat file template can be changed at runtime through the configuration varia
/usr/local/etc/tinyproxy\&.conf, /var/run/tinyproxy\&.pid, /var/log/tinyproxy\&.log
.SH "BUGS"
.sp
To report bugs in Tinyproxy, please visit <https://www\&.banu\&.com/tinyproxy/>\&.
To report bugs in Tinyproxy, please visit <https://tinyproxy\&.github\&.io/>\&.
.SH "SEE ALSO"
.sp
tinyproxy\&.conf(5)
.SH "AUTHOR"
.sp
Written by the Tinyproxy project team\&.
This manpage was written by the Tinyproxy project team\&.
.SH "COPYRIGHT"
.sp
Copyright (c) 1998\-2000 Steven Young; Copyright (c) 2000\-2001 Robert James Kaes; Copyright (c) 2009\-2010 Mukund Sivaraman; Copyright (c) 2009\-2010 Michael Adam\&.
Copyright (c) 1998\-2018 the Tinyproxy authors\&.
.sp
This program is distributed under the terms of the GNU General Public License version 2 or above\&. See the COPYING file for additional information\&.

View File

@ -1,13 +1,22 @@
'\" t
.\" Title: tinyproxy.conf
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 07/16/2011
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 01/06/2019
.\" Manual: Tinyproxy manual
.\" Source: Version 1.8.3
.\" Source: Version 1.10.0
.\" Language: English
.\"
.TH "TINYPROXY\&.CONF" "5" "07/16/2011" "Version 1\&.8\&.3" "Tinyproxy manual"
.TH "TINYPROXY\&.CONF" "5" "01/06/2019" "Version 1\&.10\&.0" "Tinyproxy manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@ -203,9 +212,9 @@ X\-Tinyproxy
containing the client\(cqs IP address to the request\&.
.RE
.PP
\fBUpstream\fR, \fBNo Upstream\fR
\fBUpstream\fR
.RS 4
This option allows you to set up a set of rules for deciding whether an upstream proxy server is to be used, based on the host or domain of the site being accessed\&. The rules are stored in the order encountered in the configuration file and the LAST matching rule wins\&. There are three possible forms for specifying upstream rules:
This option allows you to set up a set of rules for deciding whether an upstream proxy server is to be used, based on the host or domain of the site being accessed\&. The rules are stored in the order encountered in the configuration file and the LAST matching rule wins\&. The following forms for specifying upstream rules exist:
.sp
.RS 4
.ie n \{\
@ -215,8 +224,7 @@ This option allows you to set up a set of rules for deciding whether an upstream
.sp -1
.IP \(bu 2.3
.\}
\fIupstream host:port\fR
\fIupstream type host:port\fR
turns proxy upstream support on generally\&.
.RE
.sp
@ -228,10 +236,8 @@ turns proxy upstream support on generally\&.
.sp -1
.IP \(bu 2.3
.\}
\fIupstream host:port "site_spec"\fR
turns on the upstream proxy for the sites matching
site_spec\&.
\fIupstream type user:pass@host:port\fR
does the same, but uses the supplied credentials for authentication\&.
.RE
.sp
.RS 4
@ -242,8 +248,30 @@ site_spec\&.
.sp -1
.IP \(bu 2.3
.\}
\fIno upstream "site_spec"\fR
\fIupstream type host:port "site_spec"\fR
turns on the upstream proxy for the sites matching
site_spec\&.
.sp
.if n \{\
.RS 4
.\}
.nf
`type` can be one of `http`, `socks4`, `socks5`, `none`\&.
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIupstream none "site_spec"\fR
turns off upstream support for sites matching
site_spec\&.
.sp
@ -267,7 +295,6 @@ name or as an IP range:
.sp -1
.IP \(bu 2.3
.\}
\fIname\fR
matches host exactly
.RE
@ -280,7 +307,6 @@ matches host exactly
.sp -1
.IP \(bu 2.3
.\}
\fI\&.name\fR
matches any host in domain "name"
.RE
@ -293,7 +319,6 @@ matches any host in domain "name"
.sp -1
.IP \(bu 2.3
.\}
\fI\&.\fR
matches any host with no domain (in
\fIempty\fR
@ -308,7 +333,6 @@ domain)
.sp -1
.IP \(bu 2.3
.\}
\fIIP/bits\fR
matches network/mask
.RE
@ -321,7 +345,6 @@ matches network/mask
.sp -1
.IP \(bu 2.3
.\}
\fIIP/mask\fR
matches network/mask
.RE
@ -526,15 +549,15 @@ The URL that is used to access this reverse proxy\&. The URL is used to rewrite
.RE
.SH "BUGS"
.sp
To report bugs in Tinyproxy, please visit <https://www\&.banu\&.com/tinyproxy/>\&.
To report bugs in Tinyproxy, please visit <https://tinyproxy\&.github\&.io/>\&.
.SH "SEE ALSO"
.sp
tinyproxy(8)
.SH "AUTHOR"
.sp
Written by the Tinyproxy project team\&.
This manpage was written by the Tinyproxy project team\&.
.SH "COPYRIGHT"
.sp
Copyright (c) 1998\-2000 Steven Young; Copyright (c) 2000\-2001 Robert James Kaes; Copyright (c) 2009\-2010 Mukund Sivaraman; Copyright (c) 2009\-2010 Michael Adam\&.
Copyright (c) 1998\-2018 the Tinyproxy authors\&.
.sp
This program is distributed under the terms of the GNU General Public License version 2 or above\&. See the COPYING file for additional information\&.