pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/sniproxy



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Fri Jan 11 23:09:54 UTC 2019

Modified Files:
        pkgsrc/net/sniproxy: Makefile distinfo
Added Files:
        pkgsrc/net/sniproxy/files: sniproxy.sh
        pkgsrc/net/sniproxy/patches: patch-man_sniproxy.8
            patch-man_sniproxy.conf.5 patch-sniproxy.conf patch-src_sniproxy.c

Log Message:
Support PKG_SYSCONFDIR and VARBASE. Add SNIPROXY_{USER,GROUP}, both
defaulting to "sniproxy." Add rc.d script. Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/net/sniproxy/Makefile \
    pkgsrc/net/sniproxy/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/sniproxy/files/sniproxy.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/net/sniproxy/patches/patch-man_sniproxy.8 \
    pkgsrc/net/sniproxy/patches/patch-man_sniproxy.conf.5 \
    pkgsrc/net/sniproxy/patches/patch-sniproxy.conf \
    pkgsrc/net/sniproxy/patches/patch-src_sniproxy.c

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

Modified files:

Index: pkgsrc/net/sniproxy/Makefile
diff -u pkgsrc/net/sniproxy/Makefile:1.7 pkgsrc/net/sniproxy/Makefile:1.8
--- pkgsrc/net/sniproxy/Makefile:1.7    Tue Jan  8 14:41:16 2019
+++ pkgsrc/net/sniproxy/Makefile        Fri Jan 11 23:09:53 2019
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2019/01/08 14:41:16 wiedi Exp $
+# $NetBSD: Makefile,v 1.8 2019/01/11 23:09:53 schmonz Exp $
 
 DISTNAME=      sniproxy-0.6.0
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=dlundquist/}
 
@@ -22,6 +23,21 @@ CONF_FILES=  ${EGDIR}/sniproxy.conf ${PKG
 CPPFLAGS.SunOS+=       -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
 LDFLAGS.SunOS+=                -lsocket -lnsl
 
+SUBST_CLASSES+=                pkgvars
+SUBST_STAGE.pkgvars=   do-configure
+SUBST_FILES.pkgvars=   src/sniproxy.c sniproxy.conf \
+                       man/sniproxy.8 man/sniproxy.conf.5
+SUBST_VARS.pkgvars=    PKG_SYSCONFDIR VARBASE SNIPROXY_USER SNIPROXY_GROUP
+
+PKG_USERS_VARS+=       SNIPROXY_USER
+PKG_GROUPS_VARS+=      SNIPROXY_GROUP
+PKG_GROUPS+=           ${SNIPROXY_GROUP}
+PKG_USERS+=            ${SNIPROXY_USER}:${SNIPROXY_GROUP}
+
+RCD_SCRIPTS=           sniproxy
+
+BUILD_DEFS+=           VARBASE PKG_SYSCONFBASE
+
 pre-configure:
        cd ${WRKSRC} && autoreconf --install && automake --add-missing --copy
 
Index: pkgsrc/net/sniproxy/distinfo
diff -u pkgsrc/net/sniproxy/distinfo:1.7 pkgsrc/net/sniproxy/distinfo:1.8
--- pkgsrc/net/sniproxy/distinfo:1.7    Tue Jan  8 14:41:16 2019
+++ pkgsrc/net/sniproxy/distinfo        Fri Jan 11 23:09:53 2019
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.7 2019/01/08 14:41:16 wiedi Exp $
+$NetBSD: distinfo,v 1.8 2019/01/11 23:09:53 schmonz Exp $
 
 SHA1 (sniproxy-0.6.0.tar.gz) = 26ff187c46eb4f98f9f1731cd26f341383ea6454
 RMD160 (sniproxy-0.6.0.tar.gz) = 24e9126e100bdc6a04a4dd5fbe7379b642e04ff2
 SHA512 (sniproxy-0.6.0.tar.gz) = 8a99573673bdd57e528c5781cb166d39c80daed699382b24c3fa18a6011d074a1d9e470fee404d24b4450cf067c9995125910b2941b5216d88d189a1d79ebf73
 Size (sniproxy-0.6.0.tar.gz) = 78515 bytes
+SHA1 (patch-man_sniproxy.8) = 6c23fd3a826cfdd37b656e235392263995f0bad0
+SHA1 (patch-man_sniproxy.conf.5) = d18a997fe2d3bf570c3c3e8530ec2c6487e35ba0
+SHA1 (patch-sniproxy.conf) = 7a7c596ec2947cc94271dbd7298dd3e9896260f7
+SHA1 (patch-src_sniproxy.c) = d3aa00bd393ceaeba81ce9d15cdafd24ab63eaf1

Added files:

Index: pkgsrc/net/sniproxy/files/sniproxy.sh
diff -u /dev/null pkgsrc/net/sniproxy/files/sniproxy.sh:1.1
--- /dev/null   Fri Jan 11 23:09:54 2019
+++ pkgsrc/net/sniproxy/files/sniproxy.sh       Fri Jan 11 23:09:53 2019
@@ -0,0 +1,17 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: sniproxy.sh,v 1.1 2019/01/11 23:09:53 schmonz Exp $
+
+# PROVIDE: sniproxy
+# REQUIRE: NETWORKING
+
+. /etc/rc.subr
+
+name="sniproxy"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}"
+required_files="@PKG_SYSCONFDIR@/sniproxy.conf"
+pidfile="@VARBASE@/run/${name}.pid"
+
+load_rc_config $name
+run_rc_command "$1"

Index: pkgsrc/net/sniproxy/patches/patch-man_sniproxy.8
diff -u /dev/null pkgsrc/net/sniproxy/patches/patch-man_sniproxy.8:1.1
--- /dev/null   Fri Jan 11 23:09:54 2019
+++ pkgsrc/net/sniproxy/patches/patch-man_sniproxy.8    Fri Jan 11 23:09:54 2019
@@ -0,0 +1,15 @@
+$NetBSD: patch-man_sniproxy.8,v 1.1 2019/01/11 23:09:54 schmonz Exp $
+
+Support PKG_SYSCONFDIR.
+
+--- man/sniproxy.8.orig        2018-12-06 04:14:58.000000000 +0000
++++ man/sniproxy.8
+@@ -20,7 +20,7 @@ proxy machine\&.
+ 
+ .TP
+ -c \fIconfig\fR
+-Specify configuration file to use. The default is /etc/sniproxy\&.conf\&.
++Specify configuration file to use. The default is @PKG_SYSCONFDIR@/sniproxy\&.conf\&.
+ 
+ .TP
+ -f
Index: pkgsrc/net/sniproxy/patches/patch-man_sniproxy.conf.5
diff -u /dev/null pkgsrc/net/sniproxy/patches/patch-man_sniproxy.conf.5:1.1
--- /dev/null   Fri Jan 11 23:09:54 2019
+++ pkgsrc/net/sniproxy/patches/patch-man_sniproxy.conf.5       Fri Jan 11 23:09:54 2019
@@ -0,0 +1,20 @@
+$NetBSD: patch-man_sniproxy.conf.5,v 1.1 2019/01/11 23:09:54 schmonz Exp $
+
+Support PKG_SYSCONFDIR.
+
+--- man/sniproxy.conf.5.orig   2018-12-06 04:14:58.000000000 +0000
++++ man/sniproxy.conf.5
+@@ -6,11 +6,11 @@ sniproxy.conf - sniproxy configuration f
+ 
+ .SH SYNOPSIS
+ 
+-/etc/sniproxy.conf
++@PKG_SYSCONFDIR@/sniproxy.conf
+ 
+ .SH DESCRIPTION
+ 
+-/etc/sniproxy.conf is the configuration file for sniproxy. Statements are
++@PKG_SYSCONFDIR@/sniproxy.conf is the configuration file for sniproxy. Statements are
+ separated by either a new line or semi-colon. Lines starting with \&# are
+ comments. The configuration is broken down into stanzas delimited by curly
+ braces. Characters may be escaped using \&\\. Configuration directives may may
Index: pkgsrc/net/sniproxy/patches/patch-sniproxy.conf
diff -u /dev/null pkgsrc/net/sniproxy/patches/patch-sniproxy.conf:1.1
--- /dev/null   Fri Jan 11 23:09:54 2019
+++ pkgsrc/net/sniproxy/patches/patch-sniproxy.conf     Fri Jan 11 23:09:54 2019
@@ -0,0 +1,48 @@
+$NetBSD: patch-sniproxy.conf,v 1.1 2019/01/11 23:09:54 schmonz Exp $
+
+Support VARBASE and pkgsrc-configurable user and group.
+
+--- sniproxy.conf.orig 2018-12-06 04:14:58.000000000 +0000
++++ sniproxy.conf
+@@ -2,11 +2,11 @@
+ # lines that start with # are comments
+ # lines with only white space are ignored
+ 
+-user nobody
+-group nogroup
++user @SNIPROXY_USER@
++group @SNIPROXY_GROUP@
+ 
+ # PID file, needs to be placed in directory writable by user
+-pidfile /var/run/sniproxy.pid
++pidfile @VARBASE@/run/sniproxy.pid
+ 
+ # The DNS resolver is required for tables configured using wildcard or hostname
+ # targets. If no resolver is specified, the nameserver and search domain are
+@@ -38,7 +38,7 @@ error_log {
+     syslog daemon
+ 
+     # Alternatively we could log to file
+-    #filename /var/log/sniproxy.log
++    #filename @VARBASE@/log/sniproxy.log
+ 
+     # Control the verbosity of the log
+     priority notice
+@@ -109,7 +109,7 @@ listen [2001:0db8::10]:80 {
+     # this will use default table
+ }
+ 
+-listen unix:/var/run/proxy.sock {
++listen unix:@VARBASE@/run/proxy.sock {
+     protocol http
+     # this will use default table
+ }
+@@ -143,7 +143,7 @@ table https_hosts {
+     # When proxying to local sockets you should use different tables since the
+     # local socket server most likely will not detect which protocol is being
+     # used
+-    example.org unix:/var/run/server.sock
++    example.org unix:@VARBASE@/run/server.sock
+ }
+ 
+ # if no table specified the default 'default' table is defined
Index: pkgsrc/net/sniproxy/patches/patch-src_sniproxy.c
diff -u /dev/null pkgsrc/net/sniproxy/patches/patch-src_sniproxy.c:1.1
--- /dev/null   Fri Jan 11 23:09:54 2019
+++ pkgsrc/net/sniproxy/patches/patch-src_sniproxy.c    Fri Jan 11 23:09:54 2019
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_sniproxy.c,v 1.1 2019/01/11 23:09:54 schmonz Exp $
+
+Support PKG_SYSCONFDIR.
+
+--- src/sniproxy.c.orig        2018-12-06 04:14:58.000000000 +0000
++++ src/sniproxy.c
+@@ -66,7 +66,7 @@ static struct ev_signal sigterm_watcher;
+ 
+ int
+ main(int argc, char **argv) {
+-    const char *config_file = "/etc/sniproxy.conf";
++    const char *config_file = "@PKG_SYSCONFDIR@/sniproxy.conf";
+     int background_flag = 1;
+     rlim_t max_nofiles = 65536;
+     int opt;



Home | Main Index | Thread Index | Old Index