[gentoo-commits] repo/gentoo:master commit in: www-servers/sniproxy/files/, www-servers/sniproxy/

2020-11-28 Thread David Seifert
commit: 4b9142d25d28c969e823177916b5319a8f808a7b
Author: Jakov Smolic  sartura  hr>
AuthorDate: Sat Nov 28 23:09:21 2020 +
Commit: David Seifert  gentoo  org>
CommitDate: Sat Nov 28 23:09:21 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b9142d2

www-servers/sniproxy: fix build with gcc-10, port to GLEP 81

Closes: https://bugs.gentoo.org/707530
Package-Manager: Portage-3.0.9, Repoman-3.0.1
Signed-off-by: Jakov Smolic  sartura.hr>
Signed-off-by: David Seifert  gentoo.org>

 .../sniproxy/files/sniproxy-0.6.0-fno-common.patch | 24 +++
 ...proxy-0.6.0.ebuild => sniproxy-0.6.0-r1.ebuild} | 36 +-
 2 files changed, 39 insertions(+), 21 deletions(-)

diff --git a/www-servers/sniproxy/files/sniproxy-0.6.0-fno-common.patch 
b/www-servers/sniproxy/files/sniproxy-0.6.0-fno-common.patch
new file mode 100644
index 000..f718bfca736
--- /dev/null
+++ b/www-servers/sniproxy/files/sniproxy-0.6.0-fno-common.patch
@@ -0,0 +1,24 @@
+Taken from: 
https://github.com/dlundquist/sniproxy/commit/822bb80df9b7b345cc9eba55df74a07b498819ba
+Author: Pierre-Olivier Mercier 
+
+--- a/src/http.h
 b/src/http.h
+@@ -29,6 +29,6 @@
+ #include 
+ #include "protocol.h"
+ 
+-const struct Protocol *const http_protocol;
++extern const struct Protocol *const http_protocol;
+ 
+ #endif
+--- a/src/tls.h
 b/src/tls.h
+@@ -28,6 +28,6 @@
+ 
+ #include "protocol.h"
+ 
+-const struct Protocol *const tls_protocol;
++extern const struct Protocol *const tls_protocol;
+ 
+ #endif
+

diff --git a/www-servers/sniproxy/sniproxy-0.6.0.ebuild 
b/www-servers/sniproxy/sniproxy-0.6.0-r1.ebuild
similarity index 82%
rename from www-servers/sniproxy/sniproxy-0.6.0.ebuild
rename to www-servers/sniproxy/sniproxy-0.6.0-r1.ebuild
index 458f1e8ac79..9dc8e5a03ef 100644
--- a/www-servers/sniproxy/sniproxy-0.6.0.ebuild
+++ b/www-servers/sniproxy/sniproxy-0.6.0-r1.ebuild
@@ -1,15 +1,14 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit autotools user
+inherit autotools
 
-if [[ ${PV} == * ]]; then
+if [[ ${PV} == * ]]; then
EGIT_REPO_URI="https://github.com/dlundquist/sniproxy.git";
EGIT_BRANCH="master"
inherit git-r3
-   KEYWORDS=""
 else
SRC_URI="https://github.com/dlundquist/sniproxy/archive/${PV}.tar.gz -> 
${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
@@ -24,18 +23,18 @@ IUSE="+dns +largefile rfc3339 test"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
+   acct-group/sniproxy
+   acct-user/sniproxy
dev-libs/libev
>=dev-libs/libpcre-3
-   dns? ( net-libs/udns )
-"
+   dns? ( net-libs/udns )"
+DEPEND="${RDEPEND}
+   test? ( net-misc/curl )"
 BDEPEND="
-   ${RDEPEND}
sys-devel/gettext
-   virtual/pkgconfig
-"
-DEPEND="
-   test? ( net-misc/curl )
-"
+   virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
 
 src_prepare() {
default
@@ -55,6 +54,10 @@ src_configure() {
econf "${my_conf[@]}"
 }
 
+src_test() {
+   emake -j1 check
+}
+
 src_install() {
default
 
@@ -72,12 +75,3 @@ src_install() {
doman man/sniproxy.8
doman man/sniproxy.conf.5
 }
-
-src_test() {
-   emake -j1 check
-}
-
-pkg_postinst() {
-   enewgroup "${PN}"
-   enewuser "${PN}" -1 -1 /var/lib/sniproxy "${PN}"
-}



[gentoo-commits] repo/gentoo:master commit in: www-servers/sniproxy/files/, www-servers/sniproxy/

2017-08-22 Thread Michał Górny
commit: 19d06018d3582b671272b5b6ddc6b346ade37187
Author: Pierre-Olivier Mercier  nemunai  re>
AuthorDate: Sun Aug 13 18:18:34 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Aug 22 09:06:57 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19d06018

www-servers/sniproxy: new package

Closes: https://github.com/gentoo/gentoo/pull/5410
Package-Manager: Portage-2.3.6, Repoman-2.3.1

 www-servers/sniproxy/Manifest  |  1 +
 www-servers/sniproxy/files/sniproxy.init   | 17 
 www-servers/sniproxy/metadata.xml  | 23 +++
 www-servers/sniproxy/sniproxy-0.5.0.ebuild | 65 ++
 4 files changed, 106 insertions(+)

diff --git a/www-servers/sniproxy/Manifest b/www-servers/sniproxy/Manifest
new file mode 100644
index 000..df051b80aef
--- /dev/null
+++ b/www-servers/sniproxy/Manifest
@@ -0,0 +1 @@
+DIST sniproxy-0.5.0.tar.gz 72654 SHA256 
0b8dd06f9aa9e1c4151b572caf645ffceacdd35a139ded16a7fb0035452c17e5 SHA512 
52dbb217193d2b7bf9dea37b13fde395b5c56d0a6627508a245f2807920deb282aae3c1ae7e6b5fa68432990e48998989fd28027b65cb7310f214b29f98e5e5d
 WHIRLPOOL 
c353326d5a25123da9c6fbfb85c2a9435f036792f8442adb6650b91b9d51d8916eaded75aa68fdf05768db72bc4f9cccf5dae256e21559d7b5d26ccff6c48b41

diff --git a/www-servers/sniproxy/files/sniproxy.init 
b/www-servers/sniproxy/files/sniproxy.init
new file mode 100644
index 000..db9c99bfabe
--- /dev/null
+++ b/www-servers/sniproxy/files/sniproxy.init
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+name="sniproxy daemon"
+description="Proxies incoming HTTP and TLS connections based on the hostname 
contained in the initial request."
+
+SNIPROXY_CONFFILE=${SNIPROXY_CONFFILE:-/etc/sniproxy/${SVCNAME}.conf}
+
+command="/usr/sbin/sniproxy"
+command_args="-c \"${SNIPROXY_CONFFILE}\""
+pidfile=${SNIPROXY_PIDFILE:-/var/run/sniproxy.pid}
+
+depend() {
+   need net
+   use logger
+}

diff --git a/www-servers/sniproxy/metadata.xml 
b/www-servers/sniproxy/metadata.xml
new file mode 100644
index 000..9a5095f6d43
--- /dev/null
+++ b/www-servers/sniproxy/metadata.xml
@@ -0,0 +1,23 @@
+
+http://www.gentoo.org/dtd/metadata.dtd";>
+
+   
+   nemuna...@nemunai.re
+   Pierre-Olivier Mercier
+   
+   
+   proxy-ma...@gentoo.org
+   Proxy Maintainers
+   
+   
+   
+   Enable DNS resolver via net-libs/udns
+   
+   
+   Enable large file support (so we can log more than 2GB)
+   
+   
+   Use RFC3339 timestamp format in log.
+   
+   
+

diff --git a/www-servers/sniproxy/sniproxy-0.5.0.ebuild 
b/www-servers/sniproxy/sniproxy-0.5.0.ebuild
new file mode 100644
index 000..c5b9a45f2ea
--- /dev/null
+++ b/www-servers/sniproxy/sniproxy-0.5.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools user
+
+if [[ ${PV} == * ]]; then
+   EGIT_REPO_URI="https://github.com/dlundquist/sniproxy.git";
+   EGIT_BRANCH="master"
+   inherit git-r3
+   KEYWORDS=""
+else
+   SRC_URI="https://github.com/dlundquist/sniproxy/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+   KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Proxies incoming HTTP and TLS connections based on the hostname"
+HOMEPAGE="https://github.com/dlundquist/sniproxy";
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="+dns +largefile rfc3339"
+
+RDEPEND="
+   dev-libs/libev
+   >=dev-libs/libpcre-3
+   dns? ( net-libs/udns )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+   default
+   eautoreconf
+
+   sed -i "/user/s/daemon/sniproxy/" debian/sniproxy.conf || die "Unable 
to replace configuration"
+   sed -i "/create/s/daemon/sniproxy/" debian/logrotate.conf || die 
"Unable to replace logrotate configuration"
+}
+
+src_install() {
+   default
+
+   newinitd "${FILESDIR}/sniproxy.init" sniproxy
+
+   insinto /etc/sniproxy
+   doins debian/sniproxy.conf
+
+   keepdir /var/log/sniproxy
+
+   insinto /etc/logrotate.d
+   newins debian/logrotate.conf sniproxy
+
+   dodoc ARCHITECTURE.md AUTHORS README.md
+   doman man/sniproxy.8
+   doman man/sniproxy.conf.5
+}
+
+src_test() {
+   emake -j1 check
+}
+
+pkg_postinst() {
+   enewgroup ${PN}
+   enewuser ${PN} -1 -1 /var/lib/sniproxy ${PN}
+}