pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update tinyproxy with SMF manifest and fixed some minor build bugs.



Module Name:	pkgsrc-wip
Committed By:	Juraj Lutter <juraj%lutter.sk@localhost>
Pushed By:	otis
Date:		Sat Jul 13 11:48:45 2019 +0000
Changeset:	d33cfdc0166b4f1c042ef35b36376919735a1a06

Modified Files:
	cronolog-devel/Makefile
Added Files:
	tinyproxy/DESCR
	tinyproxy/Makefile
	tinyproxy/PLIST
	tinyproxy/distinfo
	tinyproxy/files/smf/manifest.xml
	tinyproxy/files/tinyproxy.sh
	tinyproxy/patches/patch-docs_man5_tinyproxy.conf.txt.in
	tinyproxy/patches/patch-docs_man8_tinyproxy.txt.in
	tinyproxy/patches/patch-etc_Makefile.in
	tinyproxy/patches/patch-etc_tinyproxy.conf.in

Log Message:
Update tinyproxy with SMF manifest and fixed some minor build bugs.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d33cfdc0166b4f1c042ef35b36376919735a1a06

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cronolog-devel/Makefile                            |  2 +-
 tinyproxy/DESCR                                    |  5 ++
 tinyproxy/Makefile                                 | 64 ++++++++++++++++++++++
 tinyproxy/PLIST                                    | 21 +++++++
 tinyproxy/distinfo                                 | 10 ++++
 tinyproxy/files/smf/manifest.xml                   | 35 ++++++++++++
 tinyproxy/files/tinyproxy.sh                       | 18 ++++++
 .../patches/patch-docs_man5_tinyproxy.conf.txt.in  | 15 +++++
 tinyproxy/patches/patch-docs_man8_tinyproxy.txt.in | 15 +++++
 tinyproxy/patches/patch-etc_Makefile.in            | 15 +++++
 tinyproxy/patches/patch-etc_tinyproxy.conf.in      | 26 +++++++++
 11 files changed, 225 insertions(+), 1 deletion(-)

diffs:
diff --git a/cronolog-devel/Makefile b/cronolog-devel/Makefile
index 827d6d119d..7c9e3ec8de 100644
--- a/cronolog-devel/Makefile
+++ b/cronolog-devel/Makefile
@@ -1,7 +1,7 @@
 # $NetBSD$
 #
 
-PKGNAME=	cronolog-devel-1.7.1
+PKGNAME=	cronolog-devel-1.7.1-beta
 DISTNAME=	cronolog-1.7.1-beta
 CATEGORIES=	www
 MASTER_SITES=	http://BSDforge.com/projects/source/sysutils/cronolog-devel/
diff --git a/tinyproxy/DESCR b/tinyproxy/DESCR
new file mode 100644
index 0000000000..2cc2530d97
--- /dev/null
+++ b/tinyproxy/DESCR
@@ -0,0 +1,5 @@
+tinyproxy is a lightweight HTTP/SSL proxy. Designed from the ground up to be
+fast and yet small, it is an ideal solution for sites where a full-featured
+HTTP proxy is required, but the system resources required to run a more
+demanding HTTP proxy are unavailable. tinyproxy is fully compatible with all
+existing web browsers.
diff --git a/tinyproxy/Makefile b/tinyproxy/Makefile
new file mode 100644
index 0000000000..eed132d76e
--- /dev/null
+++ b/tinyproxy/Makefile
@@ -0,0 +1,64 @@
+# $NetBSD: Makefile,v 1.40 2019/05/23 19:23:21 rillig Exp $
+
+DISTNAME=	tinyproxy-1.10.0
+PKGREVISION=    2
+CATEGORIES=	www
+MASTER_SITES=	${MASTER_SITE_GITHUB:=tinyproxy/}
+GITHUB_RELEASE=	${PKGVERSION_NOREV}
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://tinyproxy.github.io/
+COMMENT=	Lightweight HTTP/SSL proxy
+LICENSE=	gnu-gpl-v2
+
+BUILD_DEPENDS+=		asciidoc-[0-9]*:../../textproc/asciidoc
+BUILD_DEFS+=		VARBASE
+
+PKG_SYSCONFSUBDIR=	tinyproxy
+
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
+CONFIGURE_ARGS+=	--enable-transparent
+
+RCD_SCRIPTS=		tinyproxy
+
+.include "../../mk/bsd.prefs.mk"
+
+TINYPROXY_USER?=	tinyproxy
+TINYPROXY_GROUP?=	tinyproxy
+PKG_GROUPS=		${TINYPROXY_GROUP}
+PKG_USERS=		${TINYPROXY_USER}:${TINYPROXY_GROUP}
+PKG_GROUPS_VARS+=	TINYPROXY_GROUP
+PKG_USERS_VARS=		TINYPROXY_USER
+FILES_SUBST+=		TINYPROXY_USER=${TINYPROXY_USER:Q}
+FILES_SUBST+=		TINYPROXY_GROUP=${TINYPROXY_GROUP:Q}
+
+EGDIR=		${PREFIX}/share/examples/tinyproxy
+CONF_FILES=	${EGDIR}/tinyproxy.conf.default ${PKG_SYSCONFDIR}/tinyproxy.conf
+
+SUBST_CLASSES+=		docs
+SUBST_STAGE.docs=	pre-configure
+SUBST_FILES.docs=	docs/man5/tinyproxy.conf.txt.in docs/man8/tinyproxy.txt.in etc/tinyproxy.conf.in
+SUBST_VARS.docs=	TINYPROXY_USER
+SUBST_VARS.docs+=	TINYPROXY_GROUP
+SUBST_VARS.docs+=	PKG_SYSCONFDIR
+SUBST_VARS.docs+=	VARBASE
+
+INSTALLATION_DIRS=	${EGDIR} share/doc/tinyproxy
+
+PLIST_SUBST+=		VARBASE=${VARBASE}
+PLIST_SUBST+=		TINYPROXY_USER=${TINYPROXY_USER:Q}
+PLIST_SUBST+=		TINYPROXY_GROUP=${TINYPROXY_GROUP:Q}
+PLIST_SUBST+=		MKDIR=${MKDIR:Q} RMDIR=${RMDIR:Q} TRUE=${TRUE:Q}
+PLIST_SUBST+=		CHMOD=${CHMOD:Q} CHOWN=${CHOWN:Q}
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/etc/tinyproxy.conf \
+		${DESTDIR}${EGDIR}/tinyproxy.conf.default
+	${INSTALL_DATA} ${WRKSRC}/docs/filter-howto.txt \
+		${DESTDIR}${PREFIX}/share/doc/tinyproxy/
+
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/tinyproxy/PLIST b/tinyproxy/PLIST
new file mode 100644
index 0000000000..f16a21f7e1
--- /dev/null
+++ b/tinyproxy/PLIST
@@ -0,0 +1,21 @@
+@comment $NetBSD: PLIST,v 1.8 2018/10/12 13:57:46 adam Exp $
+bin/tinyproxy
+man/man5/tinyproxy.conf.5
+man/man8/tinyproxy.8
+share/doc/tinyproxy/AUTHORS
+share/doc/tinyproxy/NEWS
+share/doc/tinyproxy/README
+share/doc/tinyproxy/README.md
+share/doc/tinyproxy/filter-howto.txt
+share/examples/tinyproxy/tinyproxy.conf.default
+share/tinyproxy/debug.html
+share/tinyproxy/default.html
+share/tinyproxy/stats.html
+@exec ${MKDIR} ${VARBASE}/log/tinyproxy || ${TRUE}
+@exec ${CHOWN} ${TINYPROXY_USER}:${TINYPROXY_GROUP} ${VARBASE}/log/tinyproxy || ${TRUE}
+@exec ${CHMOD} 755 ${VARBASE}/log/tinyproxy || ${TRUE}
+@exec ${MKDIR} ${VARBASE}/run/tinyproxy || ${TRUE}
+@exec ${CHOWN} ${TINYPROXY_USER}:${TINYPROXY_GROUP} ${VARBASE}/run/tinyproxy || ${TRUE}
+@exec ${CHMOD} 755 ${VARBASE}/run/tinyproxy || ${TRUE}
+@unexec ${RMDIR} ${VARBASE}/log/tinyproxy 2>/dev/null || ${TRUE}
+@unexec ${RMDIR} ${VARBASE}/run/tinyproxy 2>/dev/null || ${TRUE}
diff --git a/tinyproxy/distinfo b/tinyproxy/distinfo
new file mode 100644
index 0000000000..6e13b63b09
--- /dev/null
+++ b/tinyproxy/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.13 2018/10/12 13:57:46 adam Exp $
+
+SHA1 (tinyproxy-1.10.0.tar.xz) = c69fccde7aabd89434f94789a156847edde9aa28
+RMD160 (tinyproxy-1.10.0.tar.xz) = 8c22dadf2b50dbb841fb730395fd33244f5f2d33
+SHA512 (tinyproxy-1.10.0.tar.xz) = 8d82598c5f9c89bc672f4632139ac52696d5c7788963de51688a8aeb576c69004f8338fe1e1897bf704a21dfd25ab1effb092003b6afaa9a88c2b5d0608310f5
+Size (tinyproxy-1.10.0.tar.xz) = 176060 bytes
+SHA1 (patch-docs_man5_tinyproxy.conf.txt.in) = 1641f7c44ce84f2ebac6e945760af3ba77976f31
+SHA1 (patch-docs_man8_tinyproxy.txt.in) = 12c43d0f874a8794cbe8da7c702e406e8b10a99b
+SHA1 (patch-etc_Makefile.in) = 05586bae07900c24dd418bddcbf0157ba2b302ef
+SHA1 (patch-etc_tinyproxy.conf.in) = 19481a177119b266034280d8923ea855021d8663
diff --git a/tinyproxy/files/smf/manifest.xml b/tinyproxy/files/smf/manifest.xml
new file mode 100644
index 0000000000..68c28ff8b0
--- /dev/null
+++ b/tinyproxy/files/smf/manifest.xml
@@ -0,0 +1,35 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='export'>
+  <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='0'>
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name='network' grouping='require_all' restart_on='error' type='service'>
+      <service_fmri value='svc:/milestone/network:default' />
+    </dependency>
+    <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local:default' />
+    </dependency>
+    <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
+       <service_fmri value='file://localhost@PREFIX@/etc/tinyproxy/tinyproxy.conf'/>
+    </dependency>
+    <method_context>
+      <method_environment>
+        <envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
+      </method_environment>
+    </method_context>
+    <exec_method name='start' type='method' exec='@PREFIX@/bin/tinyproxy' timeout_seconds='300' />
+    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='300' />
+    <property_group name='startd' type='framework'>
+      <propval name='ignore_error' type='astring' value='core,signal' />
+    </property_group>
+    <template>
+      <common_name>
+        <loctext xml:lang='C'>tinyproxy HTTP proxy server</loctext>
+      </common_name>
+      <documentation>
+        <manpage title='tinyproxy' section='8' />
+      </documentation>
+    </template>
+  </service>
+</service_bundle>
diff --git a/tinyproxy/files/tinyproxy.sh b/tinyproxy/files/tinyproxy.sh
new file mode 100755
index 0000000000..a4b8e96ed6
--- /dev/null
+++ b/tinyproxy/files/tinyproxy.sh
@@ -0,0 +1,18 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: tinyproxy.sh,v 1.4 2018/10/12 13:57:46 adam Exp $
+#
+
+# PROVIDE: tinyproxy
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="tinyproxy"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+pidfile="@VARBASE@/run/tinyproxy/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/tinyproxy/patches/patch-docs_man5_tinyproxy.conf.txt.in b/tinyproxy/patches/patch-docs_man5_tinyproxy.conf.txt.in
new file mode 100644
index 0000000000..312584c95b
--- /dev/null
+++ b/tinyproxy/patches/patch-docs_man5_tinyproxy.conf.txt.in
@@ -0,0 +1,15 @@
+$NetBSD: patch-docs_man5_tinyproxy.conf.txt.in,v 1.1 2012/12/12 13:01:23 wiz Exp $
+
+Adapt path for pkgsrc.
+
+--- docs/man5/tinyproxy.conf.txt.in.orig	2011-08-16 12:14:34.000000000 +0000
++++ docs/man5/tinyproxy.conf.txt.in
+@@ -19,7 +19,7 @@ DESCRIPTION
+ -----------
+ 
+ `tinyproxy(8)` reads its configuration file, typically stored in
+-`/etc/tinyproxy/tinyproxy.conf` (or passed to Tinyproxy with -c on the
++`@PKG_SYSCONFDIR@/tinyproxy.conf` (or passed to Tinyproxy with -c on the
+ command line). This manpage describes the syntax and contents of the
+ configuration file.
+ 
diff --git a/tinyproxy/patches/patch-docs_man8_tinyproxy.txt.in b/tinyproxy/patches/patch-docs_man8_tinyproxy.txt.in
new file mode 100644
index 0000000000..3ae9e48b12
--- /dev/null
+++ b/tinyproxy/patches/patch-docs_man8_tinyproxy.txt.in
@@ -0,0 +1,15 @@
+$NetBSD: patch-docs_man8_tinyproxy.txt.in,v 1.1 2012/12/12 13:01:23 wiz Exp $
+
+Adapt path for pkgsrc.
+
+--- docs/man8/tinyproxy.txt.in.orig	2012-10-04 11:35:55.807186000 +0000
++++ docs/man8/tinyproxy.txt.in
+@@ -130,7 +130,7 @@ configuration variable `StatFile`.
+ FILES
+ -----
+ 
+-`/etc/tinyproxy/tinyproxy.conf`, `/var/run/tinyproxy/tinyproxy.pid`, `/var/log/tinyproxy/tinyproxy.log`
++`@PKG_SYSCONFDIR@/tinyproxy.conf`, `@VARBASE@/run/tinyproxy/tinyproxy.pid`, `@VARBASE@/log/tinyproxy/tinyproxy.log`
+ 
+ BUGS
+ ----
diff --git a/tinyproxy/patches/patch-etc_Makefile.in b/tinyproxy/patches/patch-etc_Makefile.in
new file mode 100644
index 0000000000..47486f0622
--- /dev/null
+++ b/tinyproxy/patches/patch-etc_Makefile.in
@@ -0,0 +1,15 @@
+$NetBSD: patch-etc_Makefile.in,v 1.2 2018/10/12 13:57:46 adam Exp $
+
+Use pkgsrc framework for config files.
+
+--- etc/Makefile.in.orig	2018-10-12 13:51:26.000000000 +0000
++++ etc/Makefile.in
+@@ -424,7 +424,7 @@ info: info-am
+ 
+ info-am:
+ 
+-install-data-am: install-pkgsysconfDATA
++install-data-am:
+ 
+ install-dvi: install-dvi-am
+ 
diff --git a/tinyproxy/patches/patch-etc_tinyproxy.conf.in b/tinyproxy/patches/patch-etc_tinyproxy.conf.in
new file mode 100644
index 0000000000..b9e1582872
--- /dev/null
+++ b/tinyproxy/patches/patch-etc_tinyproxy.conf.in
@@ -0,0 +1,26 @@
+$NetBSD: patch-etc_tinyproxy.conf.in,v 1.3 2018/10/12 13:57:46 adam Exp $
+
+Customize settings.
+
+--- etc/tinyproxy.conf.in.orig	2018-08-31 23:03:36.000000000 +0000
++++ etc/tinyproxy.conf.in
+@@ -12,8 +12,8 @@
+ # as the root user. Either the user or group name or the UID or GID
+ # number may be used.
+ #
+-User nobody
+-Group nobody
++User @TINYPROXY_USER@
++Group @TINYPROXY_GROUP@
+ 
+ #
+ # Port: Specify the port which tinyproxy will listen on.  Please note
+@@ -124,7 +124,7 @@ LogLevel Info
+ # can be used for signalling purposes.
+ # If not specified, no pidfile will be written.
+ #
+-#PidFile "@localstatedir@/run/tinyproxy/tinyproxy.pid"
++PidFile "@localstatedir@/run/tinyproxy/tinyproxy.pid"
+ 
+ #
+ # XTinyproxy: Tell Tinyproxy to include the X-Tinyproxy header, which


Home | Main Index | Thread Index | Old Index