View | Details | Raw Unified | Return to bug 207051 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-9 / +8 lines)
Lines 2-20 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	tinyproxy
4
PORTNAME=	tinyproxy
5
PORTVERSION=	1.8.3
5
PORTVERSION=	1.8.4
6
PORTREVISION=	1
7
PORTEPOCH=	1
6
PORTEPOCH=	1
8
CATEGORIES=	www
7
CATEGORIES=	www
9
MASTER_SITES=	https://banu.com/pub/tinyproxy/${PORTVERSION:R}/ \
10
		LOCAL/sunpoet
11
8
12
MAINTAINER=	sunpoet@FreeBSD.org
9
MAINTAINER=	jason.mann+freebsd-ports@gmail.com
13
COMMENT=	Small, efficient HTTP proxy server
10
COMMENT=	Small, efficient HTTP proxy server
14
11
15
LICENSE=	GPLv2 GPLv3
12
LICENSE=	GPLv2
16
LICENSE_COMB=	dual
13
LICENSE_FILE=	${WRKSRC}/COPYING
17
14
15
USE_GITHUB=	yes
16
18
OPTIONS_DEFINE=	REVERSE TRANSPARENT XHEADER
17
OPTIONS_DEFINE=	REVERSE TRANSPARENT XHEADER
19
REVERSE_DESC=		Reverse proxy support
18
REVERSE_DESC=		Reverse proxy support
20
TRANSPARENT_DESC=	Transparent proxy support
19
TRANSPARENT_DESC=	Transparent proxy support
Lines 25-31 Link Here
25
		--program-transform-name=""
24
		--program-transform-name=""
26
GNU_CONFIGURE=	yes
25
GNU_CONFIGURE=	yes
27
USE_RC_SUBR=	${PORTNAME}
26
USE_RC_SUBR=	${PORTNAME}
28
USES=		gmake
27
USES=		autoreconf gmake
29
28
30
REVERSE_CONFIGURE_ENABLE=	reverse
29
REVERSE_CONFIGURE_ENABLE=	reverse
31
TRANSPARENT_CONFIGURE_ENABLE=	transparent
30
TRANSPARENT_CONFIGURE_ENABLE=	transparent
Lines 32-43 Link Here
32
XHEADER_CONFIGURE_ENABLE=	xtinyproxy
31
XHEADER_CONFIGURE_ENABLE=	xtinyproxy
33
32
34
post-patch:
33
post-patch:
35
	@${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/configure
36
	@${REINPLACE_CMD} -e 's|tinyproxy/tinyproxy|tinyproxy|g; s|/etc/tinyproxy|${PREFIX}&|' \
34
	@${REINPLACE_CMD} -e 's|tinyproxy/tinyproxy|tinyproxy|g; s|/etc/tinyproxy|${PREFIX}&|' \
37
		${WRKSRC}/docs/man5/tinyproxy.conf.txt.in \
35
		${WRKSRC}/docs/man5/tinyproxy.conf.txt.in \
38
		${WRKSRC}/docs/man8/tinyproxy.txt.in \
36
		${WRKSRC}/docs/man8/tinyproxy.txt.in \
39
		${WRKSRC}/etc/tinyproxy.conf.in
37
		${WRKSRC}/etc/tinyproxy.conf.in
40
	@${REINPLACE_CMD} -e '/\/usr\/share\/tinyproxy/d' ${WRKSRC}/etc/tinyproxy.conf.in
38
	@${REINPLACE_CMD} -e '/\/usr\/share\/tinyproxy/d' ${WRKSRC}/etc/tinyproxy.conf.in
39
	@${REINPLACE_CMD} -e 's/^#LogFile/LogFile/; s/^#PidFile/PidFile/' ${WRKSRC}/etc/tinyproxy.conf.in
41
40
42
post-install:
41
post-install:
43
	${INSTALL_DATA} ${WRKSRC}/etc/tinyproxy.conf ${STAGEDIR}${PREFIX}/etc/tinyproxy.conf.sample
42
	${INSTALL_DATA} ${WRKSRC}/etc/tinyproxy.conf ${STAGEDIR}${PREFIX}/etc/tinyproxy.conf.sample
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (tinyproxy-1.8.3.tar.gz) = 682416c8f0f733a8106c87bb395c631222569751fe4617bc381d0499b0f0c017
1
SHA256 (tinyproxy-tinyproxy-1.8.4_GH0.tar.gz) = 1999c88c43e31ff4cb5e8379b76776a65fa3d326eea868cb5f88ef58a8f631de
2
SIZE (tinyproxy-1.8.3.tar.gz) = 266744
2
SIZE (tinyproxy-tinyproxy-1.8.4_GH0.tar.gz) = 124634
(-)files/patch-Makefile.am (+10 lines)
Line 0 Link Here
1
--- Makefile.am.orig	2014-12-13 00:57:23 UTC
2
+++ Makefile.am
3
@@ -2,7 +2,6 @@ SUBDIRS = \
4
 	src \
5
 	data \
6
 	etc \
7
-	docs \
8
 	m4macros \
9
 	tests
10
 
(-)files/patch-Makefile.in (-10 lines)
Lines 1-10 Link Here
1
--- Makefile.in.orig	2011-08-16 12:27:58 UTC
2
+++ Makefile.in
3
@@ -222,7 +222,6 @@ SUBDIRS = \
4
 	src \
5
 	data \
6
 	etc \
7
-	docs \
8
 	m4macros \
9
 	tests
10
 
(-)files/patch-configure (-47 lines)
Lines 1-47 Link Here
1
--- configure.orig	2011-08-16 12:27:59 UTC
2
+++ configure
3
@@ -3626,13 +3626,13 @@ if test "$ac_test_CFLAGS" = set; then
4
   CFLAGS=$ac_save_CFLAGS
5
 elif test $ac_cv_prog_cc_g = yes; then
6
   if test "$GCC" = yes; then
7
-    CFLAGS="-g -O2"
8
+    CFLAGS="-g "
9
   else
10
     CFLAGS="-g"
11
   fi
12
 else
13
   if test "$GCC" = yes; then
14
-    CFLAGS="-O2"
15
+    CFLAGS=""
16
   else
17
     CFLAGS=
18
   fi
19
@@ -4889,13 +4889,13 @@ if test "$ac_test_CFLAGS" = set; then
20
   CFLAGS=$ac_save_CFLAGS
21
 elif test $ac_cv_prog_cc_g = yes; then
22
   if test "$GCC" = yes; then
23
-    CFLAGS="-g -O2"
24
+    CFLAGS="-g "
25
   else
26
     CFLAGS="-g"
27
   fi
28
 else
29
   if test "$GCC" = yes; then
30
-    CFLAGS="-O2"
31
+    CFLAGS=""
32
   else
33
     CFLAGS=
34
   fi
35
@@ -6865,11 +6865,7 @@ else
36
   HAVE_A2X_FALSE=
37
 fi
38
 
39
-if test x"$A2X" = x"no"; then
40
-  as_fn_error $? "Test for asciidoc failed. See the file 'INSTALL' for help." "$LINENO" 5
41
-fi
42
-
43
-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"
44
+ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile data/templates/Makefile etc/Makefile m4macros/Makefile tests/Makefile tests/scripts/Makefile"
45
 
46
 
47
 cat >confcache <<\_ACEOF
(-)files/patch-configure.ac (+27 lines)
Line 0 Link Here
1
--- configure.ac.orig	2014-12-13 00:57:23 UTC
2
+++ configure.ac
3
@@ -284,24 +284,12 @@ AC_SUBST(CPPFLAGS)
4
 AC_SUBST(LIBS)
5
 AC_SUBST(ADDITIONAL_OBJECTS)
6
 
7
-# Check for asciidoc
8
-AC_PATH_PROG(A2X, a2x, no)
9
-AM_CONDITIONAL(HAVE_A2X, test "x$A2X" != "xno")
10
-if test x"$A2X" = x"no"; then
11
-  AC_MSG_ERROR([Test for asciidoc failed. See the file 'INSTALL' for help.])
12
-fi
13
-
14
 AC_CONFIG_FILES([
15
 Makefile
16
 src/Makefile
17
 data/Makefile
18
 data/templates/Makefile
19
 etc/Makefile
20
-docs/Makefile
21
-docs/man5/Makefile
22
-docs/man5/tinyproxy.conf.txt
23
-docs/man8/Makefile
24
-docs/man8/tinyproxy.txt
25
 m4macros/Makefile
26
 tests/Makefile
27
 tests/scripts/Makefile
(-)files/patch-etc-Makefile.in (-15 lines)
Lines 1-15 Link Here
1
--- etc/Makefile.in.orig	2011-08-16 12:27:58 UTC
2
+++ etc/Makefile.in
3
@@ -248,8 +248,10 @@ install-sysconfDATA: $(sysconf_DATA)
4
 	  echo "$$d$$p"; \
5
 	done | $(am__base_list) | \
6
 	while read files; do \
7
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
8
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
9
+	  nfile="$$files.sample"; \
10
+	  cp $$files $$nfile; \
11
+	  echo " $(INSTALL_DATA) $$nfile '$(DESTDIR)$(sysconfdir)'"; \
12
+	  $(INSTALL_DATA) $$nfile "$(DESTDIR)$(sysconfdir)" || exit $$?; \
13
 	done
14
 
15
 uninstall-sysconfDATA:
(-)files/patch-src-main.c (-8 / +8 lines)
Lines 1-6 Link Here
1
--- src/main.c.orig	2011-08-16 12:14:34 UTC
1
--- src/main.c.orig	2014-12-13 00:57:23 UTC
2
+++ src/main.c
2
+++ src/main.c
3
@@ -407,12 +407,9 @@ main (int argc, char **argv)
3
@@ -417,12 +417,9 @@ main (int argc, char **argv)
4
                 exit (EX_OSERR);
4
                 exit (EX_OSERR);
5
         }
5
         }
6
 
6
 
Lines 10-25 Link Here
10
-        else
10
-        else
11
-                log_message (LOG_WARNING,
11
-                log_message (LOG_WARNING,
12
-                             "Not running as root, so not changing UID/GID.");
12
-                             "Not running as root, so not changing UID/GID.");
13
+	/*To get this to run correctly on FreeBSD, we must
13
+	/* To get this to run correctly on FreeBSD, we must
14
+	  ceate the PID and log files before we drop privileges. 
14
+	   create the PID and log files before we drop privileges.
15
+	  Other ideas are welcome */
15
+	   Other ideas are welcome */
16
 
16
 
17
         /* Create log file after we drop privileges */
17
         /* Create log file after we drop privileges */
18
         if (setup_logging ()) {
18
         if (setup_logging ()) {
19
@@ -427,6 +424,13 @@ main (int argc, char **argv)
19
@@ -438,6 +435,13 @@ main (int argc, char **argv)
20
                         exit (EX_OSERR);
21
                 }
20
                 }
22
         }
21
         }
22
 
23
+        /* Switch to a different user if we're running as root */
23
+        /* Switch to a different user if we're running as root */
24
+        if (geteuid () == 0)
24
+        if (geteuid () == 0)
25
+                change_user (argv[0]);
25
+                change_user (argv[0]);
Lines 27-32 Link Here
27
+                log_message (LOG_WARNING,
27
+                log_message (LOG_WARNING,
28
+                             "Not running as root, so not changing UID/GID.");
28
+                             "Not running as root, so not changing UID/GID.");
29
+
29
+
30
 
31
         if (child_pool_create () < 0) {
30
         if (child_pool_create () < 0) {
32
                 fprintf (stderr,
31
                 fprintf (stderr,
32
                          "%s: Could not create the pool of children.\n",
(-)pkg-descr (-7 / +7 lines)
Lines 1-11 Link Here
1
tinyproxy is a GPLed, lightweight HTTP proxy. Designed from the ground up to be 
1
Tinyproxy is a light-weight HTTP/HTTPS proxy daemon for POSIX operating
2
fast and yet small, it is an ideal solution for sites where a full-featured 
2
systems. Designed from the ground up to be fast and yet small, it is an ideal
3
HTTP proxy is required, but the system resources required to run a more 
3
solution for use cases such as embedded deployments where a full featured HTTP
4
demanding HTTP proxy are unavailable. tinyproxy is fully compatible with all
4
proxy is required, but the system resources for a larger proxy are unavailable.
5
existing web browsers, and has a number of useful features including
6
anonymous mode.
7
5
6
Tinyproxy is distributed using the GNU GPL license (version 2 or above).
7
8
Note that tinyproxy requires configuration to run in anonymizing
8
Note that tinyproxy requires configuration to run in anonymizing
9
mode. See tinyproxy.conf.sample for detail.
9
mode. See tinyproxy.conf.sample for detail.
10
10
11
WWW: https://banu.com/tinyproxy/
11
WWW: https://tinyproxy.github.io/

Return to bug 207051