From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- www-apps/tt-rss/Manifest | 12 +++ .../tt-rss/files/postinstall-en-with-daemon.txt | 19 +++++ www-apps/tt-rss/files/postinstall-en.txt | 6 ++ www-apps/tt-rss/files/ttrssd.confd-r1 | 14 ++++ www-apps/tt-rss/files/ttrssd.initd-r2 | 83 ++++++++++++++++++++ www-apps/tt-rss/files/ttrssd.logrotated | 8 ++ www-apps/tt-rss/metadata.xml | 12 +++ www-apps/tt-rss/tt-rss-20160527.ebuild | 88 ++++++++++++++++++++++ www-apps/tt-rss/tt-rss-20160930.ebuild | 88 ++++++++++++++++++++++ 9 files changed, 330 insertions(+) create mode 100644 www-apps/tt-rss/Manifest create mode 100644 www-apps/tt-rss/files/postinstall-en-with-daemon.txt create mode 100644 www-apps/tt-rss/files/postinstall-en.txt create mode 100644 www-apps/tt-rss/files/ttrssd.confd-r1 create mode 100644 www-apps/tt-rss/files/ttrssd.initd-r2 create mode 100644 www-apps/tt-rss/files/ttrssd.logrotated create mode 100644 www-apps/tt-rss/metadata.xml create mode 100644 www-apps/tt-rss/tt-rss-20160527.ebuild create mode 100644 www-apps/tt-rss/tt-rss-20160930.ebuild (limited to 'www-apps/tt-rss') diff --git a/www-apps/tt-rss/Manifest b/www-apps/tt-rss/Manifest new file mode 100644 index 000000000000..0c40bdc5f896 --- /dev/null +++ b/www-apps/tt-rss/Manifest @@ -0,0 +1,12 @@ +AUX postinstall-en-with-daemon.txt 717 SHA256 293295489050c5dc772630d591cbcbb68205612fb256562d13f5b9e4a94fcb2a SHA512 ccda24aa1f3e2a9cf1acf26f814f6d6261ab830691141e72c298d09967bf3e560ef4aa27d0c4ac6f3ece8525ca74f7c88a2bf1e431c750d92c55bafe49f3bd05 WHIRLPOOL 0c55e5b40e56e7587735c61cd56a20b629c6edab59e35e97e3f7e4067889a7dd1bc90abcc1e90bff254af88982ca57a9954fbdbd8c14ec0d9102f02d17797f58 +AUX postinstall-en.txt 330 SHA256 21e5793a75517fbc66787954c9ee3c47d57d913407dcb5db331fd7e4d4525b43 SHA512 13affa8082e89c108dcc96257c1f4cddfdbf795514d7f81dab38ec21415ab87c4c908aa55cd475b295afba6707c40b76ed3be81c8897aef88cbd509c6c45bf4f WHIRLPOOL 6412e30a3e5a18d8ef690c2b3ef49e175d7c660a459170d404d8fca2560275f6aa95e838bf865acf9993d6d9fce5607d96d1b9b93dda94f1e9ee2056053505df +AUX ttrssd.confd-r1 534 SHA256 339e009d8efa915eb4cfa8345606915879b53ea90b4fa1feaf4f3051ba9e68f7 SHA512 989ae279a7f384d8870ed78e85350a64bf169d8cfc4decada3fa44820fa49385558b0ae3468404b51e8dc75d5ef48732c8e456fcd405f2b2e0892e3172003479 WHIRLPOOL 7bf969cddb6ac1aab3625ef83426712e7c86a64e6a703b8864abfb5f3bb2a7b83e82bfd50874f3805429180cab76926f4f2d8a832ded4b41bdcd5151403abd8f +AUX ttrssd.initd-r2 2383 SHA256 9327d5b67e126ba0884a12ee132215a25be69320d139c1a92436d50e738bea4e SHA512 082c904db5463ce6f16cc35167283a8bb1962fb16dbafcaa168caf1c13afc9bf59d082c90c681f7649fc1d1586eb5ebbb2563014d78440c4f5254b7a7052cbaf WHIRLPOOL b7aacbca8152f461b1eaf74da030cfbe596d137ce5d1dd8d95a688df68ec2661e67abb7ce5d60075d09e7254412b03486588c84662598e208a927b2d0041c959 +AUX ttrssd.logrotated 118 SHA256 51bfd5dc544d7fdbe90d2fea9874a0d6558d5533a1186c6fa2f797bea89342da SHA512 e56085ea83ec1f1c80edf253e315b7197f884972f6dea439958cdcf217c44592a9eac75cc96494136aaa5a8e1eae6304527ef2d144ba797716ca58ff16641019 WHIRLPOOL a5a841f269bd5b7597ff6aa51d6d7ca7c38b12f887a785670c304b4414d236a8b90c3ac8707f255425e1f4888ad8fa0bb2d199522cab947c4a74d6ba1577e7f6 +DIST tt-rss-20160527.tar.bz2 2064633 SHA256 fd0beae76848eff39d9413820f9c575baf41283d2635bdb0e37cfc286bcc3a2c SHA512 8d482303868a08f4d65ef252f71f66ec3219d4f67e968a026a0302d29930cd5af45cedea81171db2ff0927497079d3bedd8fd70e4e9904f5d9987a92a6dfcb89 WHIRLPOOL 247ef0bc9d2049936a16340f2a5f26be8eb2d4d072d290d254ebc9666c81456f7d59271813be1ed3963537e6f86cf2b28f4447af8bcc559a64d8f2ce0d7f6952 +DIST tt-rss-20160930.tar.bz2 2072888 SHA256 5a7ff9d2e71cca0afb534558f4069264433eeaccf5cb02f425f06bbb7870d8db SHA512 d420e7efdf7d17e153ef0aa487a330379afe20fe9e9a6209de40b797d36e425cbcbdf2280eaf5ada8b9bef1ae37146253556ff602bbff22a9a7c311ff525d9e2 WHIRLPOOL 0da0f79cedda6be728f03a0e626cad610576cfad0165ad0e2ddbc54ee0ba778a935be131265874ee0e63cee8fcf620fd275d0588534f9cd5bc4505afe032d663 +EBUILD tt-rss-20160527.ebuild 2156 SHA256 09b1c02472f30b39fbb83295bf36755770722d532096a1f17d1e9eea40bac7b7 SHA512 5f21268c529b8980c8da26142fe85ec7e3dde38d68f3c57e832dc519436483400a51566ad9ed652b75780d925c4c7d0d7c8f938a57878c4b5e08263f21626c1f WHIRLPOOL 24bf57ac88bc0d82c790c039242c6c7e16b870b4bdafaa4dca71aa607b7ecc99e2e677f06ebe1ffe916f68801f2bd16b8aec966e8fad690e7d64d011a1bb8afc +EBUILD tt-rss-20160930.ebuild 2156 SHA256 09b1c02472f30b39fbb83295bf36755770722d532096a1f17d1e9eea40bac7b7 SHA512 5f21268c529b8980c8da26142fe85ec7e3dde38d68f3c57e832dc519436483400a51566ad9ed652b75780d925c4c7d0d7c8f938a57878c4b5e08263f21626c1f WHIRLPOOL 24bf57ac88bc0d82c790c039242c6c7e16b870b4bdafaa4dca71aa607b7ecc99e2e677f06ebe1ffe916f68801f2bd16b8aec966e8fad690e7d64d011a1bb8afc +MISC ChangeLog 4122 SHA256 91af2771560faf6a53d1a28d723c6493de9df41fbb351870ca6f55f91b41eb31 SHA512 1d1bb2a400672800a9f8e3839d893c804f1889e7ccd124d702be2e418cc737ed625c151cac3a6840a56c9a5ae92c5a8a048898dae82c2b61803b00ed45564e70 WHIRLPOOL 600ce41b695ee2b73fb5d68e1cc8ff8af454d638799e385dedfb065d6f35a2d5c49f697eaeb3125f0bc4bad3528e57acba71d4c11a890182595760399a86dd4b +MISC ChangeLog-2015 6949 SHA256 a7c58eaa6f1fa36480bc6ec1a2123d4acee23cf560c356f8af2ccbb793f1b1b4 SHA512 7c605901c6e9774c198eb5a067facb44597737f0894ef1f5ed19132b98c5da0339c5c5ed8ec16b32b6eb4d289413072375a613e4d1a7be29cba441b4f99d636b WHIRLPOOL 96f3ae7db09e70d391a838b2dc72096072542cc8f197d74684c924eefebc96062a9dc3cd055bcee2f37be90db217fb5b7b84eefc5fe1f15821d21d45b65830df +MISC metadata.xml 393 SHA256 ab1ba0a0670c308b44c226ca85218498aaf7f64ec09b6b91de7c5848b5caf843 SHA512 7804a8ce1ed7e67d52339e64d88c2835e5735bab38bac83152ce65be2ef54e49557b8fbc4c118bcdd85dc82a225b6b09f6466e1eb28ae35eaf09181c1327dcf3 WHIRLPOOL 8c70f7493445cf179f0cbac3a428093630422ecfa3fe481211b703a9c7679bfb45f682ae006cbd92af6c57e32693af3bf153bc695b35bfcdd7e9f2229231bfe0 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..cf74794e22d6 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.confd-r1 @@ -0,0 +1,14 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# 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-r2 b/www-apps/tt-rss/files/ttrssd.initd-r2 new file mode 100644 index 000000000000..d46d5890a1f2 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.initd-r2 @@ -0,0 +1,83 @@ +#!/sbin/openrc-run +# 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..4c4d366632e2 --- /dev/null +++ b/www-apps/tt-rss/metadata.xml @@ -0,0 +1,12 @@ + + + + + chewi@gentoo.org + James Le Cuirot + Maintainer + + + Install additional init scripts for automated RSS updates + + diff --git a/www-apps/tt-rss/tt-rss-20160527.ebuild b/www-apps/tt-rss/tt-rss-20160527.ebuild new file mode 100644 index 000000000000..5803aae4ddba --- /dev/null +++ b/www-apps/tt-rss/tt-rss-20160527.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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="https://dev.gentoo.org/~tomka/files/${P}.tar.bz2" + +LICENSE="GPL-3" +KEYWORDS="~amd64 ~mips ~x86" +IUSE="daemon +mysqli postgres" + +DEPEND=" + daemon? ( dev-lang/php:*[mysqli?,postgres?,pcntl,curl] ) + !daemon? ( dev-lang/php:*[mysqli?,postgres?,curl] ) + virtual/httpd-php:* +" +RDEPEND="${DEPEND}" + +REQUIRED_USE="|| ( mysqli 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 mysqli && ! 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-20160930.ebuild b/www-apps/tt-rss/tt-rss-20160930.ebuild new file mode 100644 index 000000000000..5803aae4ddba --- /dev/null +++ b/www-apps/tt-rss/tt-rss-20160930.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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="https://dev.gentoo.org/~tomka/files/${P}.tar.bz2" + +LICENSE="GPL-3" +KEYWORDS="~amd64 ~mips ~x86" +IUSE="daemon +mysqli postgres" + +DEPEND=" + daemon? ( dev-lang/php:*[mysqli?,postgres?,pcntl,curl] ) + !daemon? ( dev-lang/php:*[mysqli?,postgres?,curl] ) + virtual/httpd-php:* +" +RDEPEND="${DEPEND}" + +REQUIRED_USE="|| ( mysqli 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 mysqli && ! 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 +} -- cgit v1.2.3