diff options
Diffstat (limited to 'net-misc/bopm')
-rw-r--r-- | net-misc/bopm/Manifest | 11 | ||||
-rw-r--r-- | net-misc/bopm/bopm-3.1.3-r3.ebuild | 64 | ||||
-rw-r--r-- | net-misc/bopm/files/bopm-3.1.3-autotools.patch | 218 | ||||
-rw-r--r-- | net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch | 28 | ||||
-rw-r--r-- | net-misc/bopm/files/bopm.conf.d | 6 | ||||
-rw-r--r-- | net-misc/bopm/files/bopm.conf.d-r1 | 8 | ||||
-rw-r--r-- | net-misc/bopm/files/bopm.init.d | 22 | ||||
-rw-r--r-- | net-misc/bopm/files/bopm.init.d-r1 | 16 | ||||
-rw-r--r-- | net-misc/bopm/metadata.xml | 15 |
9 files changed, 388 insertions, 0 deletions
diff --git a/net-misc/bopm/Manifest b/net-misc/bopm/Manifest new file mode 100644 index 000000000000..87e26a6d22df --- /dev/null +++ b/net-misc/bopm/Manifest @@ -0,0 +1,11 @@ +AUX bopm-3.1.3-autotools.patch 7563 SHA256 9b63f8f82dbb3e57b42ffcfecac8e41a4da9137acd9432ad0dd81d3974166786 SHA512 1a44edcc1c9bf154e3d5763bb8e7937050781623d2311bd404efbea96c9949e9bc1472d5c22ab598152195a933146585a3efaaf28a5e7fb369e471167e571d8c WHIRLPOOL 062690bedf89bd3f805ef94b943b1f4733dd10b5fd2f4833275fa6d0153f69d3d93022300765b418aaf2304534c7810ab53eef39d3c847cc853b17031ee3338b +AUX bopm-3.1.3-remove-njabl.patch 816 SHA256 566c8c9866dd449a8d88051a2671dca54327783434f37f12eb0ed0d8203bd8a7 SHA512 d74ccfa25c5f70b852647e90e8d9a80d8d848cf0e488004fc8dc0fdc196271659c7b53d47bfa79321f159ec374ecb7626b98b91de82aa62649c3a3c449c4aef3 WHIRLPOOL 348885b0b18cde0e1b77ac4310c57aa1ca40ae5cc9190f0bfddaa6c599362c7a9d3fdc455424d83c2533278b571321b5e8a4b1f4f1e90884badd621921460207 +AUX bopm.conf.d 158 SHA256 2c788cdc23767b1dc2209e4290c1404635ae7875a9370d40a9f0274f3b8ce9a7 SHA512 f47dbcc6c46b9bc4269ebfa0015e3827360f8e78f2485a3217a5b4775d2890b31fb0d6bb56815547aa91208c412079f81bff8c086a0f947ef48171fee1caeb6d WHIRLPOOL 3c97959f0bbca02cac8e9c46730ec84d067fdde2d08b535ac3fea770a51753ad9766dbca281df9a4e4c82204d677d0d8a26bd0a31ac118251510ecd565df9cfe +AUX bopm.conf.d-r1 221 SHA256 888a8abb73ef3ba977edac00f525c08681c7bd2ad963ec36788e3837312e0684 SHA512 6070b84b90a905be88cf8ac64c67bf057be4c369e9129c877f643e4154c81699ac7084c5377c22afb673e44c696b890d1dc16e653e6bcaa46368a93a09414ec2 WHIRLPOOL 6b2d0a06e0973b9028418866ae72794a13ed56cb74357cd98553f44568b8a61c801b4f947e115bf933799ce4ed669499de9bf2bc763a661d307458da67d32493 +AUX bopm.init.d 450 SHA256 9bdc44a21aa9894488f4a4557c359347a53cdc5a34942107b8cb5a0496e6cf4f SHA512 14f310b94d66d904b83b475210b5b78730a0d7776b725a46c01f3da1a62599fffd964231133e9f4514d49c770bb406e94ce748cf7d67d2b6a3b174c71b8d0e6e WHIRLPOOL 99e51d73eaafae588b6d9cac402572052dbf0b21d442f00525ceedc40f8a5257ef1b50403894ac20341b5d12d9271687d95d29d5148dc68ab851eb98a268497a +AUX bopm.init.d-r1 362 SHA256 c5b70bffec57c178765f7c40a13d2cb057629ca2e9bf5d82c8f9b8c0b8142abb SHA512 33665898874ad63bbbe9e204952b25d8619013b4599c0566352ffb70a7b02dee9756bb4db5bf171925634ab1c0a237a350e2cb1663e075b0ac56d81e3823bea7 WHIRLPOOL 3e9281cac2084e497cc3369c9134021d23a9394b8ee5a9bc7631d6d01c97ce8e304cf83d8921a717f14a1c62d3890194fb4e32284d87338028401c91287a08a9 +DIST bopm-3.1.3.tar.gz 819273 SHA256 6062e80e57785b7f992f71c1d1b4c99c12ea0f20bd7c4d2c0fe2c1f57fdcbf59 SHA512 974c243e4fb7e184d3aa570dda2d919cea33df71215746d156b37b7fa3d6f45cd5448c847a7321d4ca22356fffa372f5486e6c3cd958698e173d79731f8ef8af WHIRLPOOL 57e91221e5af5d6eb009aec1bffdbaa1360b0cef4146eb432a971bade1c668195fd50167989acf3ab63ff13197cfd3d933bb96c09069413098ca65d73b2d8820 +EBUILD bopm-3.1.3-r3.ebuild 1333 SHA256 854b43702bef9ff8b2e52dca025a268b9b02923891c13d47685d9ea06176eb96 SHA512 6cae1524c733299bc1a9d9fd7244c5f10ac750408b477faaa8367ccdb084aae5cdcbb395c6ab38f84614da2f4930074b2b91b55a67e812f9f803ccded314d3d5 WHIRLPOOL 858179d32f35c3f1c014f1da9998b818bcaec60c2cdb4e3b3e542a9a037c103a94457a706818a8a2f54f32e12b44a4ae0acb16c19d27d2ddead8c04255b2fff0 +MISC ChangeLog 4797 SHA256 5f6cd07aff0857bffd6319f95604e27489474c559ccf816d1f4958363158357f SHA512 8a1d72556ac841848a5bd4c0d68b538fc94d38b57ae672455f04dda41b92fc822e41143fe5347d679644e13f5b26aecb9097e008a3271d26de29af93bcb1c2e0 WHIRLPOOL 3025d3b7546e1aa8ac364098881edfff70045a23240e28b21bab22f21d1d21d859e27d255e5b2a42ea79ec342521b4c4a8af7e28f936771df8d0cdfd65555bb5 +MISC ChangeLog-2015 1347 SHA256 1a0faa6b2fcc9173020c14cd7f5f4a4dede4d66f439fd8ee4e2ab08d18ead2df SHA512 8ffd0ebc09f14fa60e7a12eb050223b08e00b0e7235863c1cf499c58df4273f31176d57f9ec076b6ff7dfd72e4b8ddd816a0e41eb7075a69c70d6afa8c99c6f0 WHIRLPOOL a247afe91fcf47df177700c7ba88968d48557a28eb51fd102cdb7b4f023b453b6823d144f3864bfe3ecafb5e4df54e3286e912e13f1ff70dad8d0f49d285bc3f +MISC metadata.xml 440 SHA256 757426a5e58d5c01767736972bb5a3532d3d4b01acea35eb32245c0b7558fbb6 SHA512 f55f7dd218a0d3998a847750bad43fc58e947c292f0c31f8a89b5d05bdd2accb8f132b734787f2b4c8802752561dca7ddac07dfea3eaf16a15116ece2301d797 WHIRLPOOL 841904b80c1f0787f1cd0682724935fcf041b0cb70b37f26b7bd01b79beb7f22a061ce132cdd3b99ef4630a56c183f0e33a83f34beefe05331b4fb2375333cff diff --git a/net-misc/bopm/bopm-3.1.3-r3.ebuild b/net-misc/bopm/bopm-3.1.3-r3.ebuild new file mode 100644 index 000000000000..5e306a502712 --- /dev/null +++ b/net-misc/bopm/bopm-3.1.3-r3.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools user + +DESCRIPTION="Blitzed Open Proxy Monitor" +HOMEPAGE="https://github.com/blitzed-org/bopm" +SRC_URI="http://static.blitzed.org/www.blitzed.org/${PN}/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~x86" +IUSE="" + +RDEPEND="" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-remove-njabl.patch + "${FILESDIR}"/${P}-autotools.patch +) + +pkg_setup() { + enewuser bopm +} + +src_prepare() { + sed -i \ + -e "s!/some/path/bopm.pid!/run/${PN}/${PN}.pid!" \ + -e "s!/some/path/scan.log!/var/log/${PN}/scan.log!" \ + bopm.conf.sample || die + + mv configure.{in,ac} || die + mv src/libopm/configure.{in,ac} || die + + default + cp bopm.conf{.sample,} || die + + eautoreconf +} + +src_configure() { + econf --localstatedir="${EPREFIX}"/var/log/${PN} +} + +src_install() { + default + + # Remove libopm related files, because bopm links statically to it + # If anybody wants libopm, please install net-libs/libopm + rm -r "${ED}"usr/$(get_libdir) "${ED}"usr/include || die + + newinitd "${FILESDIR}"/bopm.init.d-r1 ${PN} + newconfd "${FILESDIR}"/bopm.conf.d-r1 ${PN} + + dodir /var/log/bopm + fperms 700 /var/log/bopm + fowners bopm:root /var/log/bopm + + fperms 600 /etc/bopm.conf + fowners bopm:root /etc/bopm.conf +} diff --git a/net-misc/bopm/files/bopm-3.1.3-autotools.patch b/net-misc/bopm/files/bopm-3.1.3-autotools.patch new file mode 100644 index 000000000000..e2927b0b74b6 --- /dev/null +++ b/net-misc/bopm/files/bopm-3.1.3-autotools.patch @@ -0,0 +1,218 @@ +--- bopm-3.1.3/configure.ac ++++ bopm-3.1.3/configure.ac +@@ -1,5 +1,6 @@ + dnl Process this file with autoconf to produce a configure script. + AC_INIT(bopm, [3.1.3]) ++AC_CONFIG_MACRO_DIR([src/libopm/m4]) + AC_CONFIG_SRCDIR(src/opercmd.h) + AM_CONFIG_HEADER(src/setup.h) + AM_INIT_AUTOMAKE() +--- bopm-3.1.3/Makefile.am ++++ bopm-3.1.3/Makefile.am +@@ -2,22 +2,9 @@ + + SUBDIRS = src + +-data_DATA = bopm.conf.sample bopm.conf.blitzed ++dist_doc_DATA = bopm.conf.sample bopm.conf.blitzed + +-EXTRA_DIST = ChangeLog contrib INSTALL README bopm.conf.sample bopm.conf.blitzed network-bopm ++EXTRA_DIST = ChangeLog contrib INSTALL README network-bopm + +-install-data-local: +- @if test -f $(sysconfdir)/bopm.conf ; then \ +- echo "$@ will not overwrite existing $(sysconfdir)/bopm.conf"; \ +- else \ +- $(mkinstalldirs) $(sysconfdir); \ +- echo "$(INSTALL_DATA) bopm.conf.sample $(sysconfdir)/bopm.conf"; \ +- $(INSTALL_DATA) bopm.conf.sample $(sysconfdir)/bopm.conf; \ +- fi +- $(mkinstalldirs) $(localstatedir) ++dist_sysconf_DATA = bopm.conf + +-uninstall-local: +- @if test -f $(sysconfdir)/bopm.conf ; then \ +- echo "rm -f $(sysconfdir)/bopm.conf"; \ +- $(RM) -f $(sysconfdir)/bopm.conf; \ +- fi +--- bopm-3.1.3/src/libopm/configure.ac ++++ bopm-3.1.3/src/libopm/configure.ac +@@ -1,5 +1,6 @@ + dnl Process this file with autoconf to produce a configure script. + AC_INIT(libopm, [0.1]) ++AC_CONFIG_MACRO_DIR([m4]) + AC_CONFIG_SRCDIR(src/libopm.h) + AM_CONFIG_HEADER(src/setup.h) + AM_INIT_AUTOMAKE() +--- bopm-3.1.3/src/libopm/m4/ax_func_snprintf.m4 ++++ bopm-3.1.3/src/libopm/m4/ax_func_snprintf.m4 +@@ -0,0 +1,85 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_func_snprintf.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_FUNC_SNPRINTF ++# ++# DESCRIPTION ++# ++# Checks for a fully C99 compliant snprintf, in particular checks whether ++# it does bounds checking and returns the correct string length; does the ++# same check for vsnprintf. If no working snprintf or vsnprintf is found, ++# request a replacement and warn the user about it. Note: the mentioned ++# replacement is freely available and may be used in any project ++# regardless of it's license. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Ruediger Kuhlmann <info@ruediger-kuhlmann.de> ++# ++# Copying and distribution of this file, with or without modification, are ++# permitted in any medium without royalty provided the copyright notice ++# and this notice are preserved. This file is offered as-is, without any ++# warranty. ++ ++#serial 5 ++ ++AU_ALIAS([AC_FUNC_SNPRINTF], [AX_FUNC_SNPRINTF]) ++AC_DEFUN([AX_FUNC_SNPRINTF], ++[AC_CHECK_FUNCS(snprintf vsnprintf) ++AC_MSG_CHECKING(for working snprintf) ++AC_CACHE_VAL(ac_cv_have_working_snprintf, ++[AC_TRY_RUN( ++[#include <stdio.h> ++ ++int main(void) ++{ ++ char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; ++ char bufd[5] = { 'x', 'x', 'x', '\0', '\0' }; ++ int i; ++ i = snprintf (bufs, 2, "%s", "111"); ++ if (strcmp (bufs, "1")) exit (1); ++ if (i != 3) exit (1); ++ i = snprintf (bufd, 2, "%d", 111); ++ if (strcmp (bufd, "1")) exit (1); ++ if (i != 3) exit (1); ++ exit(0); ++}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)]) ++AC_MSG_RESULT([$ac_cv_have_working_snprintf]) ++AC_MSG_CHECKING(for working vsnprintf) ++AC_CACHE_VAL(ac_cv_have_working_vsnprintf, ++[AC_TRY_RUN( ++[#include <stdio.h> ++#include <stdarg.h> ++ ++int my_vsnprintf (char *buf, const char *tmpl, ...) ++{ ++ int i; ++ va_list args; ++ va_start (args, tmpl); ++ i = vsnprintf (buf, 2, tmpl, args); ++ va_end (args); ++ return i; ++} ++ ++int main(void) ++{ ++ char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; ++ char bufd[5] = { 'x', 'x', 'x', '\0', '\0' }; ++ int i; ++ i = my_vsnprintf (bufs, "%s", "111"); ++ if (strcmp (bufs, "1")) exit (1); ++ if (i != 3) exit (1); ++ i = my_vsnprintf (bufd, "%d", 111); ++ if (strcmp (bufd, "1")) exit (1); ++ if (i != 3) exit (1); ++ exit(0); ++}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)]) ++AC_MSG_RESULT([$ac_cv_have_working_vsnprintf]) ++if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then ++ AC_LIBOBJ(snprintf) ++ AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.]) ++ AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken") ++fi]) +--- bopm-3.1.3/src/libopm/m4/etr_socket_nsl.m4 ++++ bopm-3.1.3/src/libopm/m4/etr_socket_nsl.m4 +@@ -0,0 +1,81 @@ ++dnl @synopsis ETR_SOCKET_NSL ++dnl ++dnl @obsoleted Use LIB_SOCKET_NSL instead. ++dnl ++dnl This macro figures out what libraries are required on this platform ++dnl to link sockets programs. It's usually -lsocket and/or -lnsl or ++dnl neither. We test for all three combinations. ++dnl ++dnl @category Obsolete ++dnl @author Warren Young <warren@etr-usa.com> ++dnl @version 2005-09-02 ++dnl @license AllPermissive ++ ++AC_DEFUN([ETR_SOCKET_NSL], ++[ ++AC_CACHE_CHECK(for libraries containing socket functions, ++ac_cv_socket_libs, [ ++ oCFLAGS=$CFLAGS ++ ++ AC_TRY_LINK([ ++ #include <sys/types.h> ++ #include <sys/socket.h> ++ #include <netinet/in.h> ++ #include <arpa/inet.h> ++ ], ++ [ ++ struct in_addr add; ++ int sd = socket(AF_INET, SOCK_STREAM, 0); ++ inet_ntoa(add); ++ ], ++ ac_cv_socket_libs=-lc, ac_cv_socket_libs=no) ++ ++ if test x"$ac_cv_socket_libs" = "xno" ++ then ++ CFLAGS="$oCFLAGS -lsocket" ++ AC_TRY_LINK([ ++ #include <sys/types.h> ++ #include <sys/socket.h> ++ #include <netinet/in.h> ++ #include <arpa/inet.h> ++ ], ++ [ ++ struct in_addr add; ++ int sd = socket(AF_INET, SOCK_STREAM, 0); ++ inet_ntoa(add); ++ ], ++ ac_cv_socket_libs=-lsocket, ac_cv_socket_libs=no) ++ fi ++ ++ if test x"$ac_cv_socket_libs" = "xno" ++ then ++ CFLAGS="$oCFLAGS -lsocket -lnsl" ++ AC_TRY_LINK([ ++ #include <sys/types.h> ++ #include <sys/socket.h> ++ #include <netinet/in.h> ++ #include <arpa/inet.h> ++ ], ++ [ ++ struct in_addr add; ++ int sd = socket(AF_INET, SOCK_STREAM, 0); ++ inet_ntoa(add); ++ ], ++ ac_cv_socket_libs="-lsocket -lnsl", ac_cv_socket_libs=no) ++ fi ++ ++ CFLAGS=$oCFLAGS ++]) ++ ++ if test x"$ac_cv_socket_libs" = "xno" ++ then ++ AC_MSG_ERROR([Cannot find socket libraries]) ++ elif test x"$ac_cv_socket_libs" = "x-lc" ++ then ++ ETR_SOCKET_LIBS="" ++ else ++ ETR_SOCKET_LIBS="$ac_cv_socket_libs" ++ fi ++ ++ AC_SUBST(ETR_SOCKET_LIBS) ++]) dnl ETR_SOCKET_NSL diff --git a/net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch b/net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch new file mode 100644 index 000000000000..318dae660c51 --- /dev/null +++ b/net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch @@ -0,0 +1,28 @@ +Remove NJABL as an example blacklist. + +NJABL has been shut down and bopm upstream still lists it in its default +configuration. +--- +diff --git a/bopm.conf.sample b/bopm.conf.sample +index 74483e1..bc05bf4 100644 +--- a/bopm.conf.sample ++++ b/bopm.conf.sample +@@ -363,18 +363,6 @@ OPM { + # }; + + +- /* example: NJABL - please read http://www.njabl.org/use.html before +- * uncommenting */ +-# blacklist { +-# name = "dnsbl.njabl.org"; +-# type = "A record reply"; +-# reply { +-# 9 = "Open proxy"; +-# }; +-# ban_unknown = no; +-# kline = "KLINE *@%h :Open proxy found on your host, please visit www.njabl.org/cgi-bin/lookup.cgi?query=%i"; +-# }; +- + /* + * You can report the insecure proxies you find to a DNSBL also! + * The remaining directives in this section are only needed if you diff --git a/net-misc/bopm/files/bopm.conf.d b/net-misc/bopm/files/bopm.conf.d new file mode 100644 index 000000000000..48eb33790cd1 --- /dev/null +++ b/net-misc/bopm/files/bopm.conf.d @@ -0,0 +1,6 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Config file for /etc/init.d/bopm + +BOPM_UID=bopm diff --git a/net-misc/bopm/files/bopm.conf.d-r1 b/net-misc/bopm/files/bopm.conf.d-r1 new file mode 100644 index 000000000000..eb27446768c3 --- /dev/null +++ b/net-misc/bopm/files/bopm.conf.d-r1 @@ -0,0 +1,8 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Config file for /etc/init.d/bopm + +BOPM_UID=bopm +CONFFILE=/etc/${SVCNAME}.conf +PIDFILE=/run/bopm/${SVCNAME}.pid diff --git a/net-misc/bopm/files/bopm.init.d b/net-misc/bopm/files/bopm.init.d new file mode 100644 index 000000000000..7b0d0591aca5 --- /dev/null +++ b/net-misc/bopm/files/bopm.init.d @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +opts="depend start stop" + +depend() { + need net +} + +start() { + ebegin "Starting Blitzed Open Proxy Monitor" + start-stop-daemon --start --quiet --chuid ${BOPM_UID} --exec /usr/bin/bopm + eend $? +} + +stop() { + ebegin "Stopping Blitzed Open Proxy Monitor" + kill $(</var/run/bopm/bopm.pid) + eend $? + rm -f /var/run/bopm/bopm.pid +} diff --git a/net-misc/bopm/files/bopm.init.d-r1 b/net-misc/bopm/files/bopm.init.d-r1 new file mode 100644 index 000000000000..6a292f800be2 --- /dev/null +++ b/net-misc/bopm/files/bopm.init.d-r1 @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/bopm" +description="Blitzed Open Proxy Monitor" +start_stop_daemon_args="--quiet --chuid ${BOPM_UID}" +pidfile="${PIDFILE}" + +depend() { + need net +} + +start_pre() { + checkpath -o ${BOPM_UID} -d "$(dirname "${PIDFILE}")" +} diff --git a/net-misc/bopm/metadata.xml b/net-misc/bopm/metadata.xml new file mode 100644 index 000000000000..1da5439889b8 --- /dev/null +++ b/net-misc/bopm/metadata.xml @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>shentino@gmail.com</email> + <name>Shentino</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">blitzed-org/bopm</remote-id> + </upstream> +</pkgmetadata> |