diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-apps/tt-rss | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-apps/tt-rss')
-rw-r--r-- | www-apps/tt-rss/Manifest | 2 | ||||
-rw-r--r-- | www-apps/tt-rss/files/postinstall-en-with-daemon.txt | 19 | ||||
-rw-r--r-- | www-apps/tt-rss/files/postinstall-en.txt | 6 | ||||
-rw-r--r-- | www-apps/tt-rss/files/ttrssd.confd-r1 | 15 | ||||
-rw-r--r-- | www-apps/tt-rss/files/ttrssd.initd-r1 | 73 | ||||
-rw-r--r-- | www-apps/tt-rss/files/ttrssd.initd-r2 | 83 | ||||
-rw-r--r-- | www-apps/tt-rss/files/ttrssd.logrotated | 8 | ||||
-rw-r--r-- | www-apps/tt-rss/metadata.xml | 12 | ||||
-rw-r--r-- | www-apps/tt-rss/tt-rss-20150304.ebuild | 89 | ||||
-rw-r--r-- | www-apps/tt-rss/tt-rss-20150624.ebuild | 89 |
10 files changed, 396 insertions, 0 deletions
diff --git a/www-apps/tt-rss/Manifest b/www-apps/tt-rss/Manifest new file mode 100644 index 000000000000..ce27bc1cacd3 --- /dev/null +++ b/www-apps/tt-rss/Manifest @@ -0,0 +1,2 @@ +DIST tt-rss-20150304.tar.bz2 2021676 SHA256 72ec8863c0697a311c3a7b641ade8be4a0e85674aead50bdf03637d76b4eeac3 SHA512 6b26e6a4e0c41bd48efa3506b441adec7ef95c80c208784482e77a382ab4473d152f9ef6436c5e398563c76de634b99a1e1b13efeeb82d30659d4ccf21117ff7 WHIRLPOOL 799c8df18fb5b10c76ce3eb97be77611c0438be7f9b3cd9d4d85cde2d4951c5690b905b3938b574c1810d0ec81d1c246c62769b199a93c72ec0bb4564e56358f +DIST tt-rss-20150624.tar.bz2 2071177 SHA256 544833ffbdb83497270aa3c3599ad78f58b23bbaf9d492a3b73bd156b806edc7 SHA512 270f88ae84778cf2a5df1dcda2bdc58a0ed8f4988c124728d4aad29324dc86b1b0245c5b651c738febc9447a5533ca68e2655966409a45651c6df3a08e203c1e WHIRLPOOL 8e30b32beb6eba33e6f87c06900804f6f1f3a11ec0ce4c565e7558577f2bea813e082e7d76acb83f0c0aa5a387ef8266f3fc218def482e9508c492e7df5b3b7a diff --git a/www-apps/tt-rss/files/postinstall-en-with-daemon.txt b/www-apps/tt-rss/files/postinstall-en-with-daemon.txt new file mode 100644 index 000000000000..7d269d7165f2 --- /dev/null +++ b/www-apps/tt-rss/files/postinstall-en-with-daemon.txt @@ -0,0 +1,19 @@ +Please read http://tt-rss.org/redmine/projects/tt-rss/wiki/InstallationNotes + +Once you have configured TT-RSS, put the path to this instance into +the INSTANCE_DIRS variable in /etc/conf.d/ttrssd. Make sure that +the ttrssd user can access the path, and then start the update daemon +with + + /etc/init.d/ttrssd start + +to get your feeds updated. Add the daemon to your default runlevel, +so that it gets launched after a system restart: + + rc-update add ttrssd default + + +With the update to 1.7.0 the 'magpie' RSS parser has been removed. +That means TT-RSS will use the 'simplepie' parser. If you have been +using 'magpie' so far, the switch might cause lots of duplicate +articles - it's a one-time thing for each instance. diff --git a/www-apps/tt-rss/files/postinstall-en.txt b/www-apps/tt-rss/files/postinstall-en.txt new file mode 100644 index 000000000000..7b4b279e5be4 --- /dev/null +++ b/www-apps/tt-rss/files/postinstall-en.txt @@ -0,0 +1,6 @@ +Please read http://tt-rss.org/redmine/projects/tt-rss/wiki/InstallationNotes + +With the update to 1.7.0 the 'magpie' RSS parser has been removed. +That means TT-RSS will use the 'simplepie' parser. If you have been +using 'magpie' so far, the switch might cause lots of duplicate +articles - it's a one-time thing for each instance. diff --git a/www-apps/tt-rss/files/ttrssd.confd-r1 b/www-apps/tt-rss/files/ttrssd.confd-r1 new file mode 100644 index 000000000000..2987c4338fc5 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.confd-r1 @@ -0,0 +1,15 @@ +# Copyright 1999-2013 Gentoo Foundation +# # Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Path to TT-RSS instances which should have running update daemon. +# EXAMPLE: INSTANCE_DIRS="/some/webhost/htdocs/tt-rss /some/otherwebhost/htdocs/newsreader" +INSTANCE_DIRS="" + +# Path to log file. Remember to alter logrotate file if you change it here. +LOGFILE="/var/log/ttrssd.log" + +# User and group which run the update daemon. +# NOTE: you should really avoid running it as root. +TTRSSD_USER="ttrssd" +TTRSSD_GROUP="ttrssd" diff --git a/www-apps/tt-rss/files/ttrssd.initd-r1 b/www-apps/tt-rss/files/ttrssd.initd-r1 new file mode 100644 index 000000000000..28d430612550 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.initd-r1 @@ -0,0 +1,73 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need logger net + after postgres mysql +} + +LOGFILE=${LOGFILE:-"/var/log/ttrssd.log"} +TTRSSD_USER=${TTRSSD_USER:-"ttrssd"} +TTRSSD_GROUP=${TTRSSD_GROUP:-"ttrssd"} +INSTANCE_FOLDERS="cache lock feed-icons" + +checkconfig() { + local instance dir + + # check instances + if [ -z "${INSTANCE_DIRS}" ]; then + eerror "There is no defined instance directory in /etc/conf.d/ttrssd" + return 1 + fi + + # verify log file accessibility + if [ ! -e "${LOGFILE}" ]; then + touch "${LOGFILE}" || return 1 + fi + chown "${TTRSSD_USER}":"${TTRSSD_GROUP}" "${LOGFILE}" || return 1 + + # check instances for errors + for instance in ${INSTANCE_DIRS}; do + if [ ! -f "${instance}/update_daemon2.php" ]; then + eerror "\"${instance}\" does not contain update_daemon2.php script." + eerror "Please check your installation or the INSTANCE_DIRS variable." + return 1 + fi + + # FIXME: This should be done by webapp-config during install + for dir in ${INSTANCE_FOLDERS}; do + if [ -d "${instance}/${dir}" ]; then + chgrp -R "${TTRSSD_GROUP}" "${instance}/${dir}" || return 1 + chmod -R g+w "${instance}/${dir}" || return 1 + fi + done + done +} + +start () { + local instance + + checkconfig || return 1 + + for instance in ${INSTANCE_DIRS}; do + ebegin "Starting TT-RSS update daemon in \"${instance}\"" + start-stop-daemon --start --user "${TTRSSD_USER}":"${TTRSSD_GROUP}" --background \ + --stdout "${LOGFILE}" --stderr "${LOGFILE}" \ + --exec /usr/bin/php -- -f "${instance}/update_daemon2.php" + eend $? + done +} + +stop() { + local instance + + for instance in ${INSTANCE_DIRS}; do + ebegin "Stopping TT-RSS update daemon in \"${instance}\"" + start-stop-daemon --stop --retry 30 \ + --exec /usr/bin/php -- -f "${instance}/update_daemon2.php" + eend $? + rm -f ${instance}/lock/*.lock + done +} diff --git a/www-apps/tt-rss/files/ttrssd.initd-r2 b/www-apps/tt-rss/files/ttrssd.initd-r2 new file mode 100644 index 000000000000..3ebadb45b4c8 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.initd-r2 @@ -0,0 +1,83 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need logger net + after postgres mysql +} + +LOGFILE=${LOGFILE:-"/var/log/ttrssd.log"} +TTRSSD_USER=${TTRSSD_USER:-"ttrssd"} +TTRSSD_GROUP=${TTRSSD_GROUP:-"ttrssd"} +INSTANCE_FOLDERS="cache lock feed-icons" +BASE_PID="/run/ttrssd" + +checkconfig() { + local instance instancepidname dir + + # check instances + if [ -z "${INSTANCE_DIRS}" ]; then + eerror "There is no defined instance directory in /etc/conf.d/ttrssd" + return 1 + fi + + # verify log file accessibility + if [ ! -e "${LOGFILE}" ]; then + touch "${LOGFILE}" || return 1 + fi + chown "${TTRSSD_USER}":"${TTRSSD_GROUP}" "${LOGFILE}" || return 1 + + mkdir -p "${BASE_PID}" + + # check instances for errors + for instance in ${INSTANCE_DIRS}; do + instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g') + + if [ ! -f "${instance}/update_daemon2.php" ]; then + eerror "\"${instance}\" does not contain update_daemon2.php script." + eerror "Please check your installation or the INSTANCE_DIRS variable." + return 1 + fi + + # NOTE: This can't be done by webapp-config if we want runtime configurable TTRSSD_GROUP + for dir in ${INSTANCE_FOLDERS}; do + if [ -d "${instance}/${dir}" ]; then + chown -R ":${TTRSSD_GROUP}" "${instance}/${dir}" || return 1 + chmod -R g+w "${instance}/${dir}" || return 1 + fi + done + done +} + +start () { + local instance instancepidname + + checkconfig || return 1 + + for instance in ${INSTANCE_DIRS}; do + instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g') + mypid="${BASE_PID}/${instancepidname}" + ebegin "Starting TT-RSS update daemon in \"${instance}\"" + start-stop-daemon --start --user "${TTRSSD_USER}":"${TTRSSD_GROUP}" --background \ + --stdout "${LOGFILE}" --stderr "${LOGFILE}" \ + --make-pidfile --pidfile "${mypid}" \ + --exec /usr/bin/php -- -f "${instance}/update_daemon2.php" + eend $? + done +} + +stop() { + local instance instancepidname + + for instance in ${INSTANCE_DIRS}; do + instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g') + mypid="${BASE_PID}/${instancepidname}" + ebegin "Stopping TT-RSS update daemon in \"${instance}\"" + start-stop-daemon --stop \ + --pidfile "${mypid}" \ + --exec /usr/bin/php -- -f "${instance}/update_daemon2.php" + eend $? + rm -f ${instance}/lock/*.lock + done +} diff --git a/www-apps/tt-rss/files/ttrssd.logrotated b/www-apps/tt-rss/files/ttrssd.logrotated new file mode 100644 index 000000000000..9616a98c3029 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.logrotated @@ -0,0 +1,8 @@ +/var/log/ttrssd.log { + daily + missingok + notifempty + postrotate + /etc/init.d/ttrssd restart > /dev/null + endscript +} diff --git a/www-apps/tt-rss/metadata.xml b/www-apps/tt-rss/metadata.xml new file mode 100644 index 000000000000..901fe7e11083 --- /dev/null +++ b/www-apps/tt-rss/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>tomka@gentoo.org</email> + <name>Thomas Kahle</name> + <description>Maintainer</description> +</maintainer> +<use> + <flag name="daemon">Install additional init scripts for automated RSS updates</flag> +</use> +</pkgmetadata> diff --git a/www-apps/tt-rss/tt-rss-20150304.ebuild b/www-apps/tt-rss/tt-rss-20150304.ebuild new file mode 100644 index 000000000000..70cc6c4c97f7 --- /dev/null +++ b/www-apps/tt-rss/tt-rss-20150304.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit user eutils webapp vcs-snapshot + +DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX" +HOMEPAGE="http://tt-rss.org/" +SRC_URI="http://dev.gentoo.org/~tomka/files/${P}.tar.bz2" + +LICENSE="GPL-3" +KEYWORDS="~amd64 ~mips ~x86" +IUSE="daemon +mysql postgres" + +DEPEND=" + daemon? ( dev-lang/php:*[mysql?,postgres?,pcntl,curl] ) + !daemon? ( dev-lang/php:*[mysql?,postgres?,curl] ) + virtual/httpd-php:* +" +RDEPEND="${DEPEND}" + +REQUIRED_USE="|| ( mysql postgres )" + +need_httpd_cgi + +pkg_setup() { + webapp_pkg_setup + + if use daemon; then + enewgroup ttrssd + enewuser ttrssd -1 /bin/sh /dev/null ttrssd + fi +} + +src_prepare() { + # Customize config.php-dist so that the right 'DB_TYPE' is already set (according to the USE flag) + einfo "Customizing config.php-dist..." + + if use mysql && ! use postgres; then + sed -i \ + -e "/define('DB_TYPE',/{s:pgsql:mysql:}" \ + config.php-dist || die + fi + + sed -i \ + -e "/define('DB_TYPE',/{s:// \(or mysql\):// pgsql \1:}" \ + config.php-dist || die + + # per 462578 + epatch_user +} + +src_install() { + webapp_src_preinst + + insinto "/${MY_HTDOCSDIR}" + doins -r * + keepdir "/${MY_HTDOCSDIR}"/feed-icons + + for DIR in cache lock feed-icons; do + webapp_serverowned -R "${MY_HTDOCSDIR}/${DIR}" + done + + # In the old days we put a config.php directly and tried to + # protect it with the following which did not work reliably. + # These days we only install the config.php-dist file. + # webapp_configfile "${MY_HTDOCSDIR}"/config.php + + if use daemon; then + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-with-daemon.txt + newinitd "${FILESDIR}"/ttrssd.initd-r2 ttrssd + newconfd "${FILESDIR}"/ttrssd.confd-r1 ttrssd + insinto /etc/logrotate.d/ + newins "${FILESDIR}"/ttrssd.logrotated ttrssd + + elog "After upgrading, please restart ttrssd" + else + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + fi + + webapp_src_install +} + +pkg_postinst() { + elog "You need to merge config.php and config.php-dist manually now." + webapp_pkg_postinst +} diff --git a/www-apps/tt-rss/tt-rss-20150624.ebuild b/www-apps/tt-rss/tt-rss-20150624.ebuild new file mode 100644 index 000000000000..3f956d8d941d --- /dev/null +++ b/www-apps/tt-rss/tt-rss-20150624.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit user eutils webapp vcs-snapshot + +DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX" +HOMEPAGE="http://tt-rss.org/" +SRC_URI="http://dev.gentoo.org/~tomka/files/${P}.tar.bz2" + +LICENSE="GPL-3" +KEYWORDS="~amd64 ~mips ~x86" +IUSE="daemon +mysql postgres" + +DEPEND=" + daemon? ( dev-lang/php:*[mysql?,postgres?,pcntl,curl] ) + !daemon? ( dev-lang/php:*[mysql?,postgres?,curl] ) + virtual/httpd-php:* +" +RDEPEND="${DEPEND}" + +REQUIRED_USE="|| ( mysql postgres )" + +need_httpd_cgi # From webapp.eclass + +pkg_setup() { + webapp_pkg_setup + + if use daemon; then + enewgroup ttrssd + enewuser ttrssd -1 /bin/sh /dev/null ttrssd + fi +} + +src_prepare() { + # Customize config.php-dist so that the right 'DB_TYPE' is already set (according to the USE flag) + einfo "Customizing config.php-dist..." + + if use mysql && ! use postgres; then + sed -i \ + -e "/define('DB_TYPE',/{s:pgsql:mysql:}" \ + config.php-dist || die + fi + + sed -i \ + -e "/define('DB_TYPE',/{s:// \(or mysql\):// pgsql \1:}" \ + config.php-dist || die + + # per 462578 + epatch_user +} + +src_install() { + webapp_src_preinst + + insinto "/${MY_HTDOCSDIR}" + doins -r * + keepdir "/${MY_HTDOCSDIR}"/feed-icons + + for DIR in cache lock feed-icons; do + webapp_serverowned -R "${MY_HTDOCSDIR}/${DIR}" + done + + # In the old days we put a config.php directly and tried to + # protect it with the following which did not work reliably. + # These days we only install the config.php-dist file. + # webapp_configfile "${MY_HTDOCSDIR}"/config.php + + if use daemon; then + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-with-daemon.txt + newinitd "${FILESDIR}"/ttrssd.initd-r2 ttrssd + newconfd "${FILESDIR}"/ttrssd.confd-r1 ttrssd + insinto /etc/logrotate.d/ + newins "${FILESDIR}"/ttrssd.logrotated ttrssd + + elog "After upgrading, please restart ttrssd" + else + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + fi + + webapp_src_install +} + +pkg_postinst() { + elog "You need to merge config.php and config.php-dist manually now." + webapp_pkg_postinst +} |