diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-perl/Mail-SRS | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-perl/Mail-SRS')
-rw-r--r-- | dev-perl/Mail-SRS/Mail-SRS-0.310.0-r2.ebuild | 48 | ||||
-rw-r--r-- | dev-perl/Mail-SRS/Manifest | 5 | ||||
-rw-r--r-- | dev-perl/Mail-SRS/files/srsd.conf | 56 | ||||
-rw-r--r-- | dev-perl/Mail-SRS/files/srsd.init | 53 | ||||
-rw-r--r-- | dev-perl/Mail-SRS/metadata.xml | 18 |
5 files changed, 180 insertions, 0 deletions
diff --git a/dev-perl/Mail-SRS/Mail-SRS-0.310.0-r2.ebuild b/dev-perl/Mail-SRS/Mail-SRS-0.310.0-r2.ebuild new file mode 100644 index 000000000000..658dfa157066 --- /dev/null +++ b/dev-perl/Mail-SRS/Mail-SRS-0.310.0-r2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +MODULE_AUTHOR=SHEVEK +MODULE_VERSION=0.31 +inherit perl-module + +DESCRIPTION="Interface to Sender Rewriting Scheme" + +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="test" + +RDEPEND=" + >=dev-perl/Digest-HMAC-1.01-r1 + >=dev-perl/MLDBM-2.01 + >=virtual/perl-DB_File-1.807 + >=virtual/perl-Digest-MD5-2.33 + >=virtual/perl-Storable-2.04-r1" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Simple )" + +SRC_TEST="do" + +src_install() { + perl-module_src_install + + newinitd "${FILESDIR}/srsd.init" srsd + newconfd "${FILESDIR}/srsd.conf" srsd +} + +pkg_postinst() { + einfo 'NOTE: srsd default configuration is to use a secret string.' + einfo 'You can configure this value in /etc/conf.d/srsd.' + einfo '' + einfo 'You cannot use both --secret and --secretfile options combined.' + einfo 'The former will override the latter.' + einfo '' + einfo 'If you want to use a secret file, make sure the file' + einfo 'is NOT empty and contains characters.' +} + +src_test() { + perl_rm_files t/10_pod.t t/11_pod_coverage.t + perl-module_src_test +} diff --git a/dev-perl/Mail-SRS/Manifest b/dev-perl/Mail-SRS/Manifest new file mode 100644 index 000000000000..590e4dc50d44 --- /dev/null +++ b/dev-perl/Mail-SRS/Manifest @@ -0,0 +1,5 @@ +AUX srsd.conf 1731 BLAKE2B 94a080cd47f9e559b9cd8b0f85fdf3fa26acf7429a9dcbd894af6ffae8dca40cddfe1b860089f2af706f36d3add0f25f8f6eebb64df27f67b32dc41164092372 SHA512 6db42d2ddcefdb3860009964062d75dae8af05deabf294f936b896d1b7ea67c7b712d08cae0eef5205af325fdf249f192e01ea48512a0b46964ee97ed27b180f +AUX srsd.init 1185 BLAKE2B 7b03c2564b2aab0bcdc99522e634b3af34cc5380d002ab87f711303b3dd8e3ad362d154ae146b667a92304056a0b43e667e192edd8875f2a444ee5560e6a7443 SHA512 fccb86eced6044eb97ba5c76fddc9e5275a95bd6a0bceaa9e231444967b951f77bb7a75a852e4cdd3dcbf07762a2499083d79dcf6e6fc2e689fbc464b3831a63 +DIST Mail-SRS-0.31.tar.gz 26605 BLAKE2B 9d81c647dd3fa63666ed721b0f83478f4bc814f591c0f586933ddac0b0c17c2d67fcc7954e55be78b3ce51b0346a02ebdbbe3da80f479552682a7a5a21ac2831 SHA512 d9810563cb512ba2e5441895c5ceac61bbfa44d1308a5f8521a2e9c49d35f22d77a8f03878c7016823ad996f061071ca82486f4e0dd21a98cdb8398a9208915d +EBUILD Mail-SRS-0.310.0-r2.ebuild 1108 BLAKE2B 435ea658239e324c7500e468528180edff17d2c4581272656756bce6a3b4621de45ae5ae2403af6781066e31cee25fb2d1472bb84d1031cb5ef460fc8f65a43d SHA512 a5964bbf699e43d1b3e93dfe4e52ed48546e1dfafe4797b19577151b7a78f9bdcddcbcac411c48b61317886509aa961bae479c218614a76e04ff31a140f30385 +MISC metadata.xml 779 BLAKE2B d2e063ec69839ec50dc8260f9485cbdabf7c4d25bc5a99b48a49a28a246a996c33a35a495a0570e12606675c4d6f4faa7b323c3ad8e7aa493916f630432ab81c SHA512 f8644ce3087a95f47854147d3f03ed4778d40ec6182e331c7d4fb7d2ac99f952aed92770bfe79db2bfdf633ae7ceb40f3390afc45754d8e246dcdf3c2118d3fc diff --git a/dev-perl/Mail-SRS/files/srsd.conf b/dev-perl/Mail-SRS/files/srsd.conf new file mode 100644 index 000000000000..6d40344866fb --- /dev/null +++ b/dev-perl/Mail-SRS/files/srsd.conf @@ -0,0 +1,56 @@ +# conf.d file for srsd +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Options available (copied from the man page): +# +# --separator +# String, specified at most once. Defaults to $SRSSEP ("="). +# Specify the initial separator for the SRS address. See Mail::SRS for +# details. +# +SRSD_SEPARATOR='=' + +# +# --secret +# String, may be specified multiple times, at least one of --secret or +# --secretfile must be specified. +# +# --secret will specify a primary secret and override --secretfile if both are +# specified. However, secrets read from --secretfile will still be used for +# decoding if both are specified. +# +# Specify an SRS secret. The first specified secret is used for encoding. All +# secrets are used for decoding. +# +# This is a dummy value. Change it to something more relevant. +SRSD_SECRET_STRING='mysecretstring' + +# +# --secretfile +# String, specified at most once, at least one of --secret or --secretfile must +# be specified. +# +# A file to read for secrets. Secrets are specified once per line. The first +# specified secret is used for encoding. Secrets are written one per line. Blank +# lines and lines starting with a # are ignored. If --secret is not given, then +# the secret file must be nonempty. +# +# This is a dummy value. Change the value as you see fit. +# SRSD_SECRET_FILE='/etc/mysecretfile' + +# +# --hashlength +# Integer, may be specified at most once, defaults to 4. +SRSD_HASHLENGHT=4 + +# +# Note: You cannot use both --secret and --secretfile options. +# The former will override the latter. + +# Stick options you wish to use in SRSD_OPTS +SRSD_OPTS=" +--secret=${SRSD_SECRET_STRING} +--separator=${SRSD_SEPARATOR} +--hashlength=${SRSD_HASHLENGHT} +" diff --git a/dev-perl/Mail-SRS/files/srsd.init b/dev-perl/Mail-SRS/files/srsd.init new file mode 100644 index 000000000000..9862a29da2f9 --- /dev/null +++ b/dev-perl/Mail-SRS/files/srsd.init @@ -0,0 +1,53 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/var/run/srsd.pid" +command="/usr/bin/srsd" +command_args="${SRSD_OPTS}" + +depend() { + use logger +} + +start_pre() { + if [[ ! -z ${SRSD_SECRET_FILE} ]]; then + # check for secret file + checkpath --file --owner root:root --mode 0644 ${SRSD_SECRET_FILE} + + # srsd complains if the secret file is empty + # check for characters in it + grep -q '.' ${SRSD_SECRET_FILE} + + # grep returns 0 if a match has been found + # 1 otherwise + local retval=$? + if [[ $retval -ne 0 ]]; then + eerror "Secret file \"${SRSD_SECRET_FILE}\" must NOT be empty." + return 1 + fi + fi + + return 0 +} + +start() { + ebegin 'Starting srsd' + start-stop-daemon \ + --start \ + --background \ + --pidfile ${pidfile} \ + --make-pidfile \ + --exec ${command} \ + -- ${command_args} + eend $? +} + +stop() { + ebegin 'Stopping srsd' + start-stop-daemon \ + --stop \ + --pidfile ${pidfile} \ + --exec ${command} + eend $? +} diff --git a/dev-perl/Mail-SRS/metadata.xml b/dev-perl/Mail-SRS/metadata.xml new file mode 100644 index 000000000000..c929b3c36774 --- /dev/null +++ b/dev-perl/Mail-SRS/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>perl@gentoo.org</email> + <name>Gentoo Perl Project</name> + </maintainer> + <upstream> + <remote-id type="cpan">Mail-SRS</remote-id> + <remote-id type="cpan-module">Mail::SRS</remote-id> + <remote-id type="cpan-module">Mail::SRS::DB</remote-id> + <remote-id type="cpan-module">Mail::SRS::Daemon</remote-id> + <remote-id type="cpan-module">Mail::SRS::Guarded</remote-id> + <remote-id type="cpan-module">Mail::SRS::Reversable</remote-id> + <remote-id type="cpan-module">Mail::SRS::Reversible</remote-id> + <remote-id type="cpan-module">Mail::SRS::Shortcut</remote-id> + </upstream> +</pkgmetadata> |