public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: net-nntp/inn/, net-nntp/inn/files/
@ 2023-04-30 15:24 Anna Vyalkova
  0 siblings, 0 replies; only message in thread
From: Anna Vyalkova @ 2023-04-30 15:24 UTC (permalink / raw
  To: gentoo-commits

commit:     0df98f9eaebe0b4d1d29507fa31bcb5db1afd081
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Apr 20 14:12:14 2023 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sun Apr 30 14:12:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0df98f9e

net-nntp/inn: add 2.7.1

Closes: https://bugs.gentoo.org/840499
Closes: https://bugs.gentoo.org/901343
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 net-nntp/inn/Manifest              |   2 +
 net-nntp/inn/files/inn.tmpfiles-r1 |   2 +
 net-nntp/inn/files/innd.initd-r1   |  81 +++++++++++++++++++++
 net-nntp/inn/files/ovsqlite.initd  |   8 +++
 net-nntp/inn/inn-2.7.1.ebuild      | 143 +++++++++++++++++++++++++++++++++++++
 net-nntp/inn/metadata.xml          |   7 +-
 6 files changed, 239 insertions(+), 4 deletions(-)

diff --git a/net-nntp/inn/Manifest b/net-nntp/inn/Manifest
index 3aa4a7901..a268cf106 100644
--- a/net-nntp/inn/Manifest
+++ b/net-nntp/inn/Manifest
@@ -1,2 +1,4 @@
 DIST inn-2.6.5.tar.gz 2646269 BLAKE2B a7ac0016be44480a57a2603494f236d5cbfb40b2056768331b873c7ee4cc9845da7831d6ae0431dbbbc23d44561f8faadce6869a9af8f7b25235b824683814fc SHA512 7200880e179ac10dcb04ed534d2f3119ad4045e912016342e2552e3fc129a2b2d4360615bc03bc9f4e17c440cf07c8017c55f4c17400af140a8bf7b96dc52a2f
 DIST inn-2.6.5.tar.gz.asc 488 BLAKE2B 1c4899f85831ab40f359097d77c740f343c76542678753b961ff8dafb79c0277a67186163396568623c5af5fc0d1918ce7b1c0c73d936d65120039c2c72dd73a SHA512 f488554d90dcb8a4251113d7a7cc76899616797374e8e9703fffb5dd77ab83870fe6626564fe52ad6fc40b96c8b37f3aec125181008f7c2771a83715eaa06ea2
+DIST inn-2.7.1.tar.gz 2753330 BLAKE2B 9221a95673359ed146422f1431ceafefba7a043cf0deedc539bc59073704ddc49a273bd3f9980c069ad77b9a8ed18f9ec1aece073de0b78b352775520e0340e3 SHA512 7d2430e5517bf13dd2acf792e376c18af8054ea4a177e5da0bbcaffbb4b89a80ed6528ed5b11a65559e5bf43f8fe40e5f7672582e9713d7b1312c607ea7e2235
+DIST inn-2.7.1.tar.gz.asc 488 BLAKE2B 733e2649ee4647b6316e427a26595b7558c217df54b0848381a65634f82afb02bb94355fde00673b6fc7b565edaa89efdab1864bf997ca1b13202de6fc5ded53 SHA512 271c4305f1046520626e9c81accb84c1cf47262b270971d2a4159977894e851ae47c99ba19ad26cf9286387d15022c98e187a916dbc6c355f618052078757620

diff --git a/net-nntp/inn/files/inn.tmpfiles-r1 b/net-nntp/inn/files/inn.tmpfiles-r1
new file mode 100644
index 000000000..1b06b0b6e
--- /dev/null
+++ b/net-nntp/inn/files/inn.tmpfiles-r1
@@ -0,0 +1,2 @@
+d /run/news 0755 news news -
+d /var/tmp/news 0755 news news -

diff --git a/net-nntp/inn/files/innd.initd-r1 b/net-nntp/inn/files/innd.initd-r1
new file mode 100644
index 000000000..10f7e957b
--- /dev/null
+++ b/net-nntp/inn/files/innd.initd-r1
@@ -0,0 +1,81 @@
+#!/sbin/openrc-run
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+#
+# Derived from the rc.news shell script.
+# shellcheck shell=sh
+
+extra_commands="daily"
+extra_started_commands="reload"
+
+description_reload="Reload the INN configuration"
+description_daily="Perform daily Usenet maintenance tasks"
+
+command=/opt/inn/bin/innd
+command_args="${INND_OPTS}"
+pidfile=/run/news/innd.pid
+
+depend() {
+	need net
+	use ovsqlite innwatch cnfsstat
+}
+
+daily() {
+	ebegin "Executing news.daily"
+	/opt/inn/bin/news.daily ${INND_NEWSDAILY_OPTS}
+	eend $?
+}
+
+expirerm() {
+	local rmfile=/var/log/news/expire.rm
+	for f in ${rmfile} ${rmfile}.*; do
+		if [ -s "${f}" ]; then
+			/opt/inn/bin/expirerm "${f}"
+		fi
+	done
+}
+
+start_pre() {
+	local active=/var/db/news/active
+	local old_newsdaily=$(find /var/db/news/.news.daily -mtime +1 -print 2>/dev/null)
+	if [ ! -f /var/db/news/.news.daily ] || [ -n "${old_newsdaily}" ]; then
+		daily
+	fi
+
+	if [ -f ${pidfile} ] || [ -f /run/news/.rebuildoverview ] || [ ! -s ${active} ]; then
+		# active needs to be renumbered
+		command_args="${command_args} -r"
+	fi
+
+	# active file recovery
+	if [ ! -s ${active} ]; then
+		if [ -s ${active}.tmp ]; then
+			mv ${active}.tmp ${active} || return 1
+		elif [ -s ${active}.old ]; then
+			cp ${active}.old ${active} || return 1
+		else
+			eerror "${RC_SVCNAME} failed to start: ${active} does not exist"
+			return 1
+		fi
+	fi
+
+	# remove temporary batchfiles and lock files
+	rm -f /var/spool/news/outgoing/bch*
+	rm -f /run/news/LOCK*
+	rm -f /run/news/control /run/news/nntpin /run/news/.rebuildoverview
+
+	expirerm
+}
+
+stop() {
+	ebegin "Stopping ${RC_SVCNAME}"
+	/opt/inn/bin/ctlinnd throttle "OpenRC service stop"
+	/opt/inn/bin/ctlinnd shutdown "OpenRC service stop"
+	eend $?
+}
+
+reload() {
+	ebegin "Reloading innd configuration"
+	/opt/inn/bin/ctlinnd -t 20 reload "" "OpenRC service reload"
+	eend $?
+}

diff --git a/net-nntp/inn/files/ovsqlite.initd b/net-nntp/inn/files/ovsqlite.initd
new file mode 100644
index 000000000..38d6cff89
--- /dev/null
+++ b/net-nntp/inn/files/ovsqlite.initd
@@ -0,0 +1,8 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# shellcheck shell=sh
+
+command=/opt/inn/bin/ovsqlite-server
+pidfile=/run/news/ovsqlite.pid

diff --git a/net-nntp/inn/inn-2.7.1.ebuild b/net-nntp/inn/inn-2.7.1.ebuild
new file mode 100644
index 000000000..7fa587aeb
--- /dev/null
+++ b/net-nntp/inn/inn-2.7.1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit optfeature perl-functions python-single-r1 systemd tmpfiles verify-sig
+
+DESCRIPTION="InterNetNews - the Internet meets Netnews"
+HOMEPAGE="
+	https://www.isc.org/othersoftware/#INN
+	https://www.eyrie.org/~eagle/software/inn/
+	https://github.com/InterNetNews/inn
+"
+SRC_URI="https://downloads.isc.org/isc/${PN}/${P}.tar.gz
+	verify-sig? ( https://downloads.isc.org/isc/${PN}/${P}.tar.gz.asc )"
+
+LICENSE="BSD BSD-2 BSD-4 GPL-2+ ISC MIT RSA powell public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+bzip2 cancel-locks gzip kerberos low-memory python sasl sqlite ssl test zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	app-crypt/gnupg
+	dev-lang/perl:=
+	sys-libs/gdbm:=
+	sys-libs/pam
+	virtual/libcrypt:=
+	virtual/mta
+	bzip2? ( app-alternatives/bzip2 )
+	cancel-locks? ( net-libs/canlock:= )
+	gzip? ( app-alternatives/gzip )
+	kerberos? ( virtual/krb5 )
+	python? ( ${PYTHON_DEPS} )
+	sasl? ( dev-libs/cyrus-sasl:2 )
+	sqlite? ( dev-db/sqlite:3 )
+	ssl? ( dev-libs/openssl:= )
+	zlib? ( sys-libs/zlib:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	app-alternatives/lex
+	app-alternatives/yacc
+	dev-lang/perl
+	virtual/pkgconfig
+	test? ( dev-perl/Test-Pod )
+	verify-sig? ( >=sec-keys/openpgp-keys-russallbery-20230000 )
+"
+
+DOCS=( CONTRIBUTORS HACKING INSTALL NEWS README TODO )
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/russallbery.asc"
+
+src_configure() {
+	econf_args=(
+		UUSTAT="${EPREFIX}/usr/bin/uustat"
+		inn_cv_compiler_c__g="no"
+		inn_cv_compiler_c__O3="no"
+		inn_cv_compiler_c__Werror="no"
+
+		--prefix="${EPREFIX}"/opt/${PN}
+		--includedir="${EPREFIX}"/usr/include
+		--sysconfdir="${EPREFIX}"/etc/news
+
+		--with-control-dir="${EPREFIX}"/usr/libexec/inn/control
+		--with-db-dir="${EPREFIX}"/var/db/news
+		--with-doc-dir="${EPREFIX}"/usr/share/doc/${PF}
+		--with-filter-dir="${EPREFIX}"/usr/libexec/inn/filter
+		--with-http-dir="${EPREFIX}"/usr/share/${PN}/http
+		--with-libperl-dir="$(perl_get_vendorlib)"
+		--with-log-dir="${EPREFIX}"/var/log/news
+		--with-run-dir="${EPREFIX}"/run/news
+		--with-spool-dir="${EPREFIX}"/var/spool/news
+		--with-tmp-dir="${EPREFIX}"/var/tmp/news
+
+		$(use_enable !low-memory largefiles)
+		$(use_enable low-memory tagged-hash)
+		$(use_with cancel-locks canlock)
+		$(use_with kerberos krb5)
+		$(use_with python)
+		$(use_with sasl)
+		$(use_with sqlite sqlite3)
+		$(use_with ssl openssl)
+		$(use_with zlib)
+		--disable-hardening-flags
+		--enable-keywords
+		--with-perl
+		--without-bdb # deprecated db
+		--without-blacklist # FreeBSD-only
+	)
+
+	if use bzip2; then
+		econf_args+=( --with-log-compress=bzip2 )
+	elif use gzip; then
+		econf_args+=( --with-log-compress=gzip )
+	else
+		econf_args+=( --with-log-compress=cat )
+	fi
+
+	econf "${econf_args[@]}"
+}
+
+src_install() {
+	default
+
+	keepdir /var/log/news/OLD
+	keepdir /var/spool/news/{archive,articles,incoming/bad,innfeed,outgoing,overview}
+
+	find "${ED}" -name '*.la' -delete || die
+	rm "${ED}"/usr/share/doc/${PF}/{GPL,LICENSE} || die
+	rm -r "${ED}"/run "${ED}"/var/tmp || die
+
+	if [[ ${REPLACING_VERSIONS} ]]; then
+		rm "${ED}"/var/db/news/* || die
+	fi
+
+	for svc in cnfsstat innwatch; do
+		newinitd "${FILESDIR}"/${svc}.initd ${svc}
+		newconfd "${FILESDIR}"/${svc}.confd ${svc}
+	done
+	newinitd "${FILESDIR}"/innd.initd-r1 innd
+	newconfd "${FILESDIR}"/innd.confd innd
+
+	if use sqlite; then
+		newinitd "${FILESDIR}"/ovsqlite.initd ovsqlite
+	fi
+
+	newtmpfiles "${FILESDIR}"/inn.tmpfiles-r1 inn.conf
+}
+
+pkg_postinst() {
+	optfeature "controlchan script" dev-perl/MIME-tools
+	optfeature "innreport script" dev-perl/GD
+	optfeature "send-uucp backend" net-misc/taylor-uucp
+
+	if use sqlite; then
+		optfeature "ovsqlite-util script" dev-perl/DBD-SQLite
+	fi
+
+	tmpfiles_process inn.conf
+}

diff --git a/net-nntp/inn/metadata.xml b/net-nntp/inn/metadata.xml
index 3fa0a8245..164c5bbc8 100644
--- a/net-nntp/inn/metadata.xml
+++ b/net-nntp/inn/metadata.xml
@@ -21,10 +21,9 @@ separate server, nnrpd, that is spawned for each client. Both innd and nnrpd
 have some slight variances from the NNTP protocol.
 </longdescription>
 <use>
-	<!--flag name="bzip2">Compress logs using bzip2</flag-->
-	<flag name="gzip">Compress logs using gzip</flag>
-	<flag name="keywords">Enable automatic innd keyword generation</flag>
+	<flag name="cancel-locks" restrict="&gt;=net-nntp/inn-2.7.1">Enable Cancel-Lock header functionality</flag>
+	<flag name="keywords" restrict="&lt;net-nntp/inn-2.7.1">Enable automatic innd keyword generation</flag>
 	<flag name="low-memory">Use tagged hash table for history to reduce memory footprint</flag>
-	<flag name="largefile">Support files larger than 2GB</flag>
+	<flag name="largefile" restrict="&lt;net-nntp/inn-2.7.1">Support files larger than 2GB</flag>
 </use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-30 15:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-30 15:24 [gentoo-commits] repo/proj/guru:dev commit in: net-nntp/inn/, net-nntp/inn/files/ Anna Vyalkova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox