summaryrefslogtreecommitdiff
path: root/www-apps/tt-rss
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-19 20:11:46 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-19 20:11:46 +0000
commit5b5df25227111ef465caf5c52bcfb66dac3219cd (patch)
tree31b713cac6188358125cbb66b8804030328740f0 /www-apps/tt-rss
parent02e2208f46f4e2c00fb9743cbc47350bdd233bfa (diff)
gentoo resync : 19.01.2018
Diffstat (limited to 'www-apps/tt-rss')
-rw-r--r--www-apps/tt-rss/Manifest18
-rw-r--r--www-apps/tt-rss/files/permissions25
-rw-r--r--www-apps/tt-rss/files/postinstall-en-with-daemon-r1.txt14
-rw-r--r--www-apps/tt-rss/files/postinstall-en-with-daemon.txt19
-rw-r--r--www-apps/tt-rss/files/postinstall-en.txt7
-rw-r--r--www-apps/tt-rss/files/ttrssd.confd-r114
-rw-r--r--www-apps/tt-rss/files/ttrssd.confd-r247
-rw-r--r--www-apps/tt-rss/files/ttrssd.initd-r283
-rw-r--r--www-apps/tt-rss/files/ttrssd.initd-r388
-rw-r--r--www-apps/tt-rss/files/ttrssd.logrotated-r1 (renamed from www-apps/tt-rss/files/ttrssd.logrotated)3
-rw-r--r--www-apps/tt-rss/tt-rss-20160527.ebuild88
-rw-r--r--www-apps/tt-rss/tt-rss-20160930.ebuild88
-rw-r--r--www-apps/tt-rss/tt-rss-20180105.ebuild84
-rw-r--r--www-apps/tt-rss/tt-rss-99999999.ebuild87
14 files changed, 357 insertions, 308 deletions
diff --git a/www-apps/tt-rss/Manifest b/www-apps/tt-rss/Manifest
index 59a7ff41f0cd..30108820053e 100644
--- a/www-apps/tt-rss/Manifest
+++ b/www-apps/tt-rss/Manifest
@@ -1,10 +1,10 @@
-AUX postinstall-en-with-daemon.txt 717 BLAKE2B 8e2c3b8b48a52f5efccff766e50d89ca1220158286f0138ec6fe0afeb81593e20d8d26328990f15eb3cdcbcd65cad21c428142dce216403e7d82c2d80bce6cfc SHA512 ccda24aa1f3e2a9cf1acf26f814f6d6261ab830691141e72c298d09967bf3e560ef4aa27d0c4ac6f3ece8525ca74f7c88a2bf1e431c750d92c55bafe49f3bd05
-AUX postinstall-en.txt 330 BLAKE2B 0ecd0fc99f5e8740e0cd26d748689aa3c1c4b693fa3e4f4ba8201d6c0d7c8966f73d9c82475e74fa80e70abefee6eb311df6f5813ee7888c468f47ab194c4960 SHA512 13affa8082e89c108dcc96257c1f4cddfdbf795514d7f81dab38ec21415ab87c4c908aa55cd475b295afba6707c40b76ed3be81c8897aef88cbd509c6c45bf4f
-AUX ttrssd.confd-r1 534 BLAKE2B d9e3258e80ae8bbf83622c9a3dd7a3b7c6367214cc8166ed819343b0837cc78d945ab90c074c7753be67759fa6a64ee92df48b10f9b5cd1c4fcf48e9ae0f7fb5 SHA512 989ae279a7f384d8870ed78e85350a64bf169d8cfc4decada3fa44820fa49385558b0ae3468404b51e8dc75d5ef48732c8e456fcd405f2b2e0892e3172003479
-AUX ttrssd.initd-r2 2383 BLAKE2B fd530ee6999d9a7dbdd72f7340a125ca5d06bd7832fa7bf29ea8d8e3cf0931e75887c45d5cc8033bf1062f87e5990d2776b45cadace6eb14415a8ec9e5fe328d SHA512 082c904db5463ce6f16cc35167283a8bb1962fb16dbafcaa168caf1c13afc9bf59d082c90c681f7649fc1d1586eb5ebbb2563014d78440c4f5254b7a7052cbaf
-AUX ttrssd.logrotated 118 BLAKE2B d6d69c3651997d066f5a8472662bafe28b8cfb1474206c9d7e77fadb05396a011588d25ba8239a955b656f6df9255f6d3c4c68f3e9f3254b3c7f5db1154f5484 SHA512 e56085ea83ec1f1c80edf253e315b7197f884972f6dea439958cdcf217c44592a9eac75cc96494136aaa5a8e1eae6304527ef2d144ba797716ca58ff16641019
-DIST tt-rss-20160527.tar.bz2 2064633 BLAKE2B 406c2ff551e2ba616a8f4696d7deaf8a3f85e4f86f0b09f57507af7f4657930f11fc0aa9df467af5ad2c56657d95e12b75bae721da4d86480b06bbbc0ab72744 SHA512 8d482303868a08f4d65ef252f71f66ec3219d4f67e968a026a0302d29930cd5af45cedea81171db2ff0927497079d3bedd8fd70e4e9904f5d9987a92a6dfcb89
-DIST tt-rss-20160930.tar.bz2 2072888 BLAKE2B e6ca0a72730cdf9a1106d7098e6a6bfc9bf35f545a67e9b569552644b23543b4168000afe2e5fbf5a1fd81371e72e570e270a77d5345bca5f22d79c1a86409b0 SHA512 d420e7efdf7d17e153ef0aa487a330379afe20fe9e9a6209de40b797d36e425cbcbdf2280eaf5ada8b9bef1ae37146253556ff602bbff22a9a7c311ff525d9e2
-EBUILD tt-rss-20160527.ebuild 2156 BLAKE2B 7f29412c230d2f629c1f3468dd67140f2aec5844a426206ff2def40d67db28f4501aa4d18aeb33f35543d7eee24b482339a2e514a5c60de92fbdb133946872a0 SHA512 5f21268c529b8980c8da26142fe85ec7e3dde38d68f3c57e832dc519436483400a51566ad9ed652b75780d925c4c7d0d7c8f938a57878c4b5e08263f21626c1f
-EBUILD tt-rss-20160930.ebuild 2156 BLAKE2B 7f29412c230d2f629c1f3468dd67140f2aec5844a426206ff2def40d67db28f4501aa4d18aeb33f35543d7eee24b482339a2e514a5c60de92fbdb133946872a0 SHA512 5f21268c529b8980c8da26142fe85ec7e3dde38d68f3c57e832dc519436483400a51566ad9ed652b75780d925c4c7d0d7c8f938a57878c4b5e08263f21626c1f
+AUX permissions 1188 BLAKE2B 9c9813f987c6e2f45f5118f8ba5093e7e68bf02f47e8dfc76eca853b2eb84b535f55379e916e90091961ac3362564d338f741637a2bf80583e594b6881fb91c7 SHA512 c7c383438911d79740f0fd6ff48d934f76fb5074c0c20a6e9da029c546c525f8405cebf987690dedce2e8f53832edbb6a111389bc25183d8c9166866638612d7
+AUX postinstall-en-with-daemon-r1.txt 539 BLAKE2B b81a0b1021b3c9a44bae9a172befc5c16a852c0fa2c6c20dc0317605ebd92fdcc9baae7ef3cd3dbade6a3722c52e1514122feeb26627a6503ffb2add4516a2e1 SHA512 2a78184ce2dd1a3feaf8ae8761378ad388cdfd7bb81f407a1c7de676bf46749adc6e374df03300a558ad0adf3ccbf886b6eda9aab49068ce63743ff124a0e386
+AUX postinstall-en.txt 55 BLAKE2B 841988e40b1e0fb6d6a0ef331d7c87448ce8722047527245ef6f3b6bf66d45a77fb2b034a257ce6f3a0d1dc076207c21a5bd9e3c489c39a3ec2a9b60530a9a06 SHA512 aac36537f3e03407df5f6baa14ee06ff148b63b7d2b2a323d26b7efd2ce91d1d1859a95fc1210559de4baabfacee27c7da4e6e72cbfadc05a1987816fc21b912
+AUX ttrssd.confd-r2 1581 BLAKE2B ce18840ddb58704abb9311d02e27cfc179bba43668b90cb358082466d55bb54acdb5806f73cb24dbc758981c477eeb6a50c472043323abaf50572f7d2eeee4b1 SHA512 15957854718a4decf7ac9784e955fc090755343008facd3d65d7e72f3e00df170215514a5435378180110c6f4584df9e5580eb45775816eb3f5c58d09e03d249
+AUX ttrssd.initd-r3 2338 BLAKE2B 6ddcb12c548ef6b34196da7539b5ec2f061db46f041912647ea2741208004d25cc7d51d88375aa06b5866a7ef44995088cc9002d625666bdaaf687733b699a8f SHA512 eb6a9824562f49d42e94522c074719720686cd2d3fb3d0ac13ce5d83fdeae6b17a5047e79e761aea084eb8ff6e6aa733d49131324f8a00406935f8e0b962764b
+AUX ttrssd.logrotated-r1 135 BLAKE2B dc653add518cd3ed5296097d51ca2346e102edcbad5ec82397713ded489e8ed8e49af928331e58b80152f13bddc37d673c67440df388651c875cfbd37ff62080 SHA512 c292020a55688c6edb4306d9d8144ad7d30be94fda08467b8bbe560c7bf02b0877d9591123a226dd030e9a9c01b79df4a3696e54fd1ece0dbdef1c285cdae97a
+DIST tt-rss-20180105.tar.gz 3070929 BLAKE2B 2370104c70f5381d690a29b216269c749bf1f7c6b925eb9499b741e5df3e686d95fce430a144946fd915414481280b67e6d0c881edcdd13aee0fa344dc0bec3f SHA512 86ceec3646629ad7fd3fde2f3c3237e48ad96bd08b46e73c34c76507d9b17613ea309e1bd5e6e85a0d9eb96029e54b54e5ee367c56aab31be3dcec9169c5ada5
+EBUILD tt-rss-20180105.ebuild 2116 BLAKE2B 420d5b05643b29abe653a53db201ac1d5bd287faf48a5ed4eb8694e183ce38fec6c36dbe77cbdbe55cdb03508e720bd3371df939dd10d0185398a2fcc3fb5838 SHA512 362544447ff951a400056ebd8a083a0d7f37dd0a6772b5b25bc46aada86d69ed6df37b6f612c8313e2b6cd4667d0e16c5cc18990730e333dbb11588d528242c9
+EBUILD tt-rss-99999999.ebuild 2163 BLAKE2B 2147dd308815ea48e4b91bb62606647d18736772068ea82e5ea52dd155e15a523c271ea1691f65459101d0df5151a2b4dd0f06af4db828ee31261c1be6094186 SHA512 15ff6fc2390ad194a7f7b26e7b448c8e9062b0ab79b9c60edd2e5edc9bf5ca6bcb275469ec7a1a0a0fba0971bf1f1a843908f373862a34644071e484be68d3b4
MISC metadata.xml 389 BLAKE2B 08c9c9d84ee77a3d5f2522a290a4ade86c3277e798683159b2bf1ac71b9134fa642f842b264d45a33e9cd482441e0cc9bf4d7c57885a96d95176f0041679177d SHA512 b110cbd05579291bcb90e8bc884d974aebf6fcb3179db2ac6d249e7636cadd457511d4f0c11b8f112a2ff88f3f23dd80beb2c59b598b0769244a5010dcd71280
diff --git a/www-apps/tt-rss/files/permissions b/www-apps/tt-rss/files/permissions
new file mode 100644
index 000000000000..a26b87f4e715
--- /dev/null
+++ b/www-apps/tt-rss/files/permissions
@@ -0,0 +1,25 @@
+#!/bin/bash -e
+
+cd "${MY_INSTALLDIR}"
+
+if [[ $1 = install ]]; then
+ # We need to lock down cache/ for the operations below to be
+ # safe. The permissions match the webapp-config defaults but these
+ # can be changed and existing installations may also differ.
+ chown root:root cache/
+ chmod 00755 cache/
+
+ chgrp --no-dereference ttrssd feed-icons/ lock/ cache/*/
+ chmod g+ws feed-icons/ lock/ cache/*/
+
+ # Files within lock/ are exclusively written by the update
+ # daemon. Files within feed-icons/ are always unlinked before
+ # modification. Only cache/ holds files that are modified in place
+ # by both processes and therefore ACLs are required to ensure that
+ # the files themselves are created as group writable.
+ if ! setfacl --modify d:g::rwX cache/*/; then
+ echo "WARNING: ACLs are not available on this filesystem. Either enable them or set TTRSSD_USER to your PHP user in /etc/conf.d/ttrssd to avoid permission issues."
+ elif [[ -n $(find cache/ -type f ! -name ".*" ! \( -group ttrssd -perm -020 \) -print -quit) ]]; then
+ echo "WARNING: Files that are not writable by the ttrssd group found within the cache directory. Either delete them or correct their permissions."
+ fi
+fi
diff --git a/www-apps/tt-rss/files/postinstall-en-with-daemon-r1.txt b/www-apps/tt-rss/files/postinstall-en-with-daemon-r1.txt
new file mode 100644
index 000000000000..8c72406d76d2
--- /dev/null
+++ b/www-apps/tt-rss/files/postinstall-en-with-daemon-r1.txt
@@ -0,0 +1,14 @@
+Please read https://tt-rss.org/wiki/InstallationNotes.
+
+Once you have configured TT-RSS, tweak /etc/conf.d/ttrssd to your
+needs if you have not already done so. If ACLs are unavailable on the
+filesystem you have just installed to then you will need to set
+TTRSSD_USER to your PHP user. When everything is ready, (re)start the
+update daemon like so:
+
+ /etc/init.d/ttrssd restart
+
+This will periodically update your feeds in the background. Add the
+daemon to your default runlevel to start it on every boot:
+
+ rc-update add ttrssd default
diff --git a/www-apps/tt-rss/files/postinstall-en-with-daemon.txt b/www-apps/tt-rss/files/postinstall-en-with-daemon.txt
deleted file mode 100644
index 7d269d7165f2..000000000000
--- a/www-apps/tt-rss/files/postinstall-en-with-daemon.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-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
index 7b4b279e5be4..67a16111f3d5 100644
--- a/www-apps/tt-rss/files/postinstall-en.txt
+++ b/www-apps/tt-rss/files/postinstall-en.txt
@@ -1,6 +1 @@
-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.
+Please read https://tt-rss.org/wiki/InstallationNotes.
diff --git a/www-apps/tt-rss/files/ttrssd.confd-r1 b/www-apps/tt-rss/files/ttrssd.confd-r1
deleted file mode 100644
index cf74794e22d6..000000000000
--- a/www-apps/tt-rss/files/ttrssd.confd-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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.confd-r2 b/www-apps/tt-rss/files/ttrssd.confd-r2
new file mode 100644
index 000000000000..b169b548bb9a
--- /dev/null
+++ b/www-apps/tt-rss/files/ttrssd.confd-r2
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Space-separated paths of TT-RSS instances that you want to start the
+# update daemon for. If left empty, these will be automatically
+# detected using data from /var/db/webapps/tt-rss. Instances without
+# the update_daemon2.php script present will be skipped.
+#
+# Default:
+# INSTANCE_DIRS=""
+# Example:
+# INSTANCE_DIRS="/some/webhost/htdocs/tt-rss /some/otherwebhost/htdocs/newsreader"
+#
+INSTANCE_DIRS=""
+
+# Path to the log files. One log file will be created for each TT-RSS
+# instance. Update the logrotate file after changing this.
+#
+# Default:
+# LOG_DIR="/var/log/ttrssd"
+#
+LOG_DIR="/var/log/ttrssd"
+
+# User to run the update daemon as. You should not run this as
+# root. If ACLs are unavailable on the filesystem used by the TT-RSS
+# instances then choosing the same user that serves the PHP web
+# interface is recommended to avoid permission issues. You *must* add
+# this user to the ttrssd group. If the PHP user is not the same as
+# the web server user (e.g. apache or nginx) then this user must be
+# added to the ttrssd group too.
+#
+# Default:
+# TTRSSD_USER="ttrssd"
+#
+TTRSSD_USER="ttrssd"
+
+# Additional options to pass to the update daemon. If you want to pass
+# different options to different TT-RSS instances then create symlinks
+# of the ttrssd init.d script (e.g. ttrssd.foo, ttrssd.bar) and
+# configure INSTANCE_DIRS and TTRSSD_OPTS for each of these.
+#
+# Default:
+# TTRSSD_OPTS=""
+# Example:
+# TTRSSD_OPTS="--tasks=1 --interval=300"
+#
+TTRSSD_OPTS=""
diff --git a/www-apps/tt-rss/files/ttrssd.initd-r2 b/www-apps/tt-rss/files/ttrssd.initd-r2
deleted file mode 100644
index d46d5890a1f2..000000000000
--- a/www-apps/tt-rss/files/ttrssd.initd-r2
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/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.initd-r3 b/www-apps/tt-rss/files/ttrssd.initd-r3
new file mode 100644
index 000000000000..a6f3b8a78ef1
--- /dev/null
+++ b/www-apps/tt-rss/files/ttrssd.initd-r3
@@ -0,0 +1,88 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ after postgresql mysql
+}
+
+PID_DIR="/run/ttrssd"
+LOG_DIR=${LOG_DIR:-"/var/log/ttrssd"}
+TTRSSD_USER=${TTRSSD_USER:-"ttrssd"}
+
+setup() {
+ mkdir -p "${PID_DIR}" "${LOG_DIR}" || return 1
+ chown "${TTRSSD_USER}":ttrssd "${LOG_DIR}" || return 1
+}
+
+list_instance_dirs() {
+ if [ -z "${INSTANCE_DIRS}" ]; then
+ cut -d" " -f4 /var/db/webapps/tt-rss/*/installs 2>/dev/null
+ else
+ printf "%s\n" ${INSTANCE_DIRS}
+ fi
+}
+
+instance_dir_to_name() {
+ local name=${1#/}
+ echo ${name//\//--}
+}
+
+start() {
+ setup || return 1
+ local instance_dir instance_name ret=1
+
+ IFS=$'\n'
+ for instance_dir in $(list_instance_dirs); do
+ if [ -d "${instance_dir}" ]; then
+ if [ ! -f "${instance_dir}"/update_daemon2.php ]; then
+ ewarn "TT-RSS instance in ${instance_dir} has no update_daemon2.php script"
+ elif [ ! -f "${instance_dir}"/config.php ]; then
+ eerror "TT-RSS instance in ${instance_dir} is not configured"
+ else
+ instance_name=$(instance_dir_to_name "${instance_dir}")
+ ebegin "Starting TT-RSS update daemon in ${instance_dir}"
+ start-stop-daemon --start --user "${TTRSSD_USER}":ttrssd \
+ --background --wait 2000 \
+ --stdout "${LOG_DIR}/${instance_name}.log" \
+ --stderr "${LOG_DIR}/${instance_name}.log" \
+ --make-pidfile --pidfile "${PID_DIR}/${instance_name}.pid" \
+ --exec /usr/bin/php -- -f "${instance_dir}"/update_daemon2.php \
+ -- ${TTRSSD_OPTS}
+ eend $? && ret=0
+ fi
+ else
+ eerror "TT-RSS instance in ${instance_dir} is missing"
+ fi
+ done
+ unset IFS
+
+ # Succeed if at least one started.
+ return ${ret}
+}
+
+stop() {
+ local instance_dir instance_name
+
+ IFS=$'\n'
+ for instance_dir in $(list_instance_dirs); do
+ instance_name=$(instance_dir_to_name "${instance_dir}")
+
+ [ -f "${PID_DIR}/${instance_name}.pid" ] ||
+ [ -f "${instance_dir}"/update_daemon2.php ] ||
+ continue
+
+ ebegin "Stopping TT-RSS update daemon in ${instance_dir}"
+ start-stop-daemon --stop --retry 5 --pidfile "${PID_DIR}/${instance_name}.pid" \
+ --exec /usr/bin/php -- -f "${instance_dir}"/update_daemon2.php \
+ -- ${TTRSSD_OPTS}
+ eend $?
+
+ rm -f "${instance_dir}"/lock/*.lock
+ done
+ unset IFS
+
+ # Always succeed.
+ return 0
+}
diff --git a/www-apps/tt-rss/files/ttrssd.logrotated b/www-apps/tt-rss/files/ttrssd.logrotated-r1
index 9616a98c3029..c2bf08f75619 100644
--- a/www-apps/tt-rss/files/ttrssd.logrotated
+++ b/www-apps/tt-rss/files/ttrssd.logrotated-r1
@@ -1,5 +1,6 @@
-/var/log/ttrssd.log {
+/var/log/ttrssd/*.log {
daily
+ delaycompress
missingok
notifempty
postrotate
diff --git a/www-apps/tt-rss/tt-rss-20160527.ebuild b/www-apps/tt-rss/tt-rss-20160527.ebuild
deleted file mode 100644
index 5803aae4ddba..000000000000
--- a/www-apps/tt-rss/tt-rss-20160527.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# 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
deleted file mode 100644
index 5803aae4ddba..000000000000
--- a/www-apps/tt-rss/tt-rss-20160930.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# 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-20180105.ebuild b/www-apps/tt-rss/tt-rss-20180105.ebuild
new file mode 100644
index 000000000000..9affdac7e139
--- /dev/null
+++ b/www-apps/tt-rss/tt-rss-20180105.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit prefix user webapp
+
+COMMIT="c30f5e18119d1935e8fe6d422053b127e8f4f1b3"
+DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX"
+HOMEPAGE="https://tt-rss.org/"
+SRC_URI="https://git.tt-rss.org/git/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~arm ~mips ~x86"
+IUSE="+acl daemon +mysqli postgres"
+REQUIRED_USE="|| ( mysqli postgres )"
+
+DEPEND="daemon? ( acl? ( sys-apps/acl ) )"
+
+RDEPEND="${DEPEND}
+ daemon? ( dev-lang/php:*[mysqli?,postgres?,curl,cli,pcntl,pdo] )
+ !daemon? ( dev-lang/php:*[mysqli?,postgres?,curl,pdo] )
+ virtual/httpd-php:*"
+
+DEPEND="!vhosts? ( ${DEPEND} )"
+
+need_httpd_cgi # From webapp.eclass
+
+S="${WORKDIR}/${PN}"
+
+pkg_setup() {
+ webapp_pkg_setup
+
+ if use daemon; then
+ enewgroup ttrssd
+ enewuser ttrssd -1 /bin/sh /dev/null ttrssd
+ fi
+}
+
+src_configure() {
+ hprefixify config.php-dist
+
+ sed -i -r \
+ -e "/'DB_TYPE'/s:,.*:, '$(usex mysqli mysql pgsql)'); // mysql or pgsql:" \
+ -e "/'CHECK_FOR_UPDATES'/s/true/false/" \
+ config.php-dist || die
+}
+
+src_install() {
+ webapp_src_preinst
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r *
+
+ # When updating, grep the plugins directory for additional CACHE_DIR
+ # instances as they cannot be created later due to permissions.
+ dodir "${MY_HTDOCSDIR}"/cache/starred-images
+
+ local dir
+ for dir in "${ED}${MY_HTDOCSDIR}"/{cache/*,feed-icons,lock}/; do
+ webapp_serverowned "${dir#${ED}}"
+ done
+
+ if use daemon; then
+ webapp_hook_script "${FILESDIR}"/permissions
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en-with-daemon-r1.txt
+
+ newinitd "${FILESDIR}"/ttrssd.initd-r3 ttrssd
+ newconfd "${FILESDIR}"/ttrssd.confd-r2 ttrssd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/ttrssd.logrotated-r1 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-dist into config.php manually when upgrading."
+ webapp_pkg_postinst
+}
diff --git a/www-apps/tt-rss/tt-rss-99999999.ebuild b/www-apps/tt-rss/tt-rss-99999999.ebuild
new file mode 100644
index 000000000000..b611aa54bd70
--- /dev/null
+++ b/www-apps/tt-rss/tt-rss-99999999.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit git-r3 prefix user webapp
+
+DESCRIPTION="Tiny Tiny RSS - A web-based news feed (RSS/Atom) aggregator using AJAX"
+HOMEPAGE="https://tt-rss.org/"
+EGIT_REPO_URI="https://git.tt-rss.org/git/${PN}.git"
+LICENSE="GPL-3"
+SLOT="${PV}" # Single live slot.
+IUSE="+acl daemon +mysqli postgres"
+REQUIRED_USE="|| ( mysqli postgres )"
+
+DEPEND="daemon? ( acl? ( sys-apps/acl ) )"
+
+RDEPEND="${DEPEND}
+ daemon? ( dev-lang/php:*[mysqli?,postgres?,curl,cli,pcntl,pdo] )
+ !daemon? ( dev-lang/php:*[mysqli?,postgres?,curl,pdo] )
+ virtual/httpd-php:*"
+
+DEPEND="!vhosts? ( ${DEPEND} )"
+
+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_configure() {
+ hprefixify config.php-dist
+
+ sed -i -r \
+ -e "/'DB_TYPE'/s:,.*:, '$(usex mysqli mysql pgsql)'); // mysql or pgsql:" \
+ config.php-dist || die
+}
+
+src_install() {
+ webapp_src_preinst
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r *
+
+ # When updating, grep the plugins directory for additional CACHE_DIR
+ # instances as they cannot be created later due to permissions.
+ dodir "${MY_HTDOCSDIR}"/cache/starred-images
+
+ local dir
+ for dir in "${ED}${MY_HTDOCSDIR}"/{cache/*,feed-icons,lock}/; do
+ webapp_serverowned "${dir#${ED}}"
+ done
+
+ if use daemon; then
+ webapp_hook_script "${FILESDIR}"/permissions
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en-with-daemon-r1.txt
+
+ newinitd "${FILESDIR}"/ttrssd.initd-r3 ttrssd
+ newconfd "${FILESDIR}"/ttrssd.confd-r2 ttrssd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/ttrssd.logrotated-r1 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-dist into config.php manually when upgrading."
+
+ if use vhosts && [[ -n ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "The live ebuild does not automatically upgrade your installations so"
+ elog "don't forget to do so manually."
+ fi
+
+ webapp_pkg_postinst
+}