From a7dc6d0251b50dd4b92224bb3afbc64781a4947b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 24 Apr 2012 10:25:01 +0200 Subject: [PATCH] Initial immport --- createlinks | 23 ++++++ .../configuration/defaults/tt-rss/Authentication | 1 + .../db/configuration/defaults/tt-rss/DbName | 1 + .../db/configuration/defaults/tt-rss/DbUser | 1 + .../db/configuration/defaults/tt-rss/MultiUser | 1 + .../db/configuration/defaults/tt-rss/access | 1 + .../db/configuration/defaults/tt-rss/status | 1 + .../e-smith/db/configuration/defaults/tt-rss/type | 1 + .../db/configuration/migrate/tt-rss-database | 12 +++ .../templates.metadata/etc/e-smith/sql/init/tt-rss | 3 + .../templates.metadata/usr/share/tt-rss/config.php | 3 + root/etc/e-smith/templates/etc/cron.d/tt-rss/All | 1 + .../templates/etc/e-smith/sql/init/tt-rss/80tt-rss | 48 ++++++++++++ .../templates/etc/httpd/conf/httpd.conf/90tt-rss | 36 +++++++++ .../conf/httpd.conf/VirtualHosts/60tt-rss-ssl | 14 ++++ .../usr/share/tt-rss/config.php/10database | 22 ++++++ .../usr/share/tt-rss/config.php/15directories | 47 +++++++++++ .../templates/usr/share/tt-rss/config.php/25auth | 51 ++++++++++++ .../templates/usr/share/tt-rss/config.php/30update | 34 ++++++++ .../templates/usr/share/tt-rss/config.php/35digest | 29 +++++++ .../usr/share/tt-rss/config.php/40registration | 14 ++++ .../templates/usr/share/tt-rss/config.php/45sphinx | 8 ++ .../usr/share/tt-rss/config.php/50tweeter | 9 +++ .../usr/share/tt-rss/config.php/55various | 18 +++++ .../usr/share/tt-rss/config.php/60version | 6 ++ root/var/service/tt-rss/log/run | 25 ++++++ root/var/service/tt-rss/run | 33 ++++++++ smeserver-tt-rss.spec | 90 ++++++++++++++++++++++ 28 files changed, 533 insertions(+) create mode 100644 createlinks create mode 100644 root/etc/e-smith/db/configuration/defaults/tt-rss/Authentication create mode 100644 root/etc/e-smith/db/configuration/defaults/tt-rss/DbName create mode 100644 root/etc/e-smith/db/configuration/defaults/tt-rss/DbUser create mode 100644 root/etc/e-smith/db/configuration/defaults/tt-rss/MultiUser create mode 100644 root/etc/e-smith/db/configuration/defaults/tt-rss/access create mode 100644 root/etc/e-smith/db/configuration/defaults/tt-rss/status create mode 100644 root/etc/e-smith/db/configuration/defaults/tt-rss/type create mode 100644 root/etc/e-smith/db/configuration/migrate/tt-rss-database create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/tt-rss create mode 100644 root/etc/e-smith/templates.metadata/usr/share/tt-rss/config.php create mode 100644 root/etc/e-smith/templates/etc/cron.d/tt-rss/All create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90tt-rss create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/60tt-rss-ssl create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/10database create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/25auth create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/30update create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/35digest create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/40registration create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/45sphinx create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/50tweeter create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/55various create mode 100644 root/etc/e-smith/templates/usr/share/tt-rss/config.php/60version create mode 100644 root/var/service/tt-rss/log/run create mode 100644 root/var/service/tt-rss/run create mode 100644 smeserver-tt-rss.spec diff --git a/createlinks b/createlinks new file mode 100644 index 0000000..caed9d3 --- /dev/null +++ b/createlinks @@ -0,0 +1,23 @@ +#!/usr/bin/perl -w + +use esmith::Build::CreateLinks qw(:all); + +# Templates to expand +templates2events("/etc/e-smith/sql/init/tt-rss", qw(bootstrap-console-save webapps-update)); +templates2events("/usr/share/tt-rss/config.php", qw(bootstrap-console-save webapps-update)); +templates2events("/etc/cron.d/tt-rss", qw(bootstrap-console-save webapps-update)); + +# tt-rss daemon +safe_symlink("restart", "root/etc/e-smith/events/webapps-update/services2adjust/tt-rss"); +safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/tt-rss'); +safe_symlink("/var/service/tt-rss" , 'root/service/tt-rss'); +safe_touch("root/var/service/tt-rss/down"); +service_link_enhanced("tt-rss", "S98", "7"); +service_link_enhanced("tt-rss", "K10", "6"); +service_link_enhanced("tt-rss", "K10", "0"); + + +# PHP header and footer +safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/usr/share/tt-rss/config.php/template-begin"); +safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/usr/share/tt-rss/config.php/template-end"); + diff --git a/root/etc/e-smith/db/configuration/defaults/tt-rss/Authentication b/root/etc/e-smith/db/configuration/defaults/tt-rss/Authentication new file mode 100644 index 0000000..4e76d03 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/tt-rss/Authentication @@ -0,0 +1 @@ +http diff --git a/root/etc/e-smith/db/configuration/defaults/tt-rss/DbName b/root/etc/e-smith/db/configuration/defaults/tt-rss/DbName new file mode 100644 index 0000000..6ac457d --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/tt-rss/DbName @@ -0,0 +1 @@ +rssdb diff --git a/root/etc/e-smith/db/configuration/defaults/tt-rss/DbUser b/root/etc/e-smith/db/configuration/defaults/tt-rss/DbUser new file mode 100644 index 0000000..e3241ec --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/tt-rss/DbUser @@ -0,0 +1 @@ +rssuser diff --git a/root/etc/e-smith/db/configuration/defaults/tt-rss/MultiUser b/root/etc/e-smith/db/configuration/defaults/tt-rss/MultiUser new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/tt-rss/MultiUser @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/tt-rss/access b/root/etc/e-smith/db/configuration/defaults/tt-rss/access new file mode 100644 index 0000000..3e18ebf --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/tt-rss/access @@ -0,0 +1 @@ +private diff --git a/root/etc/e-smith/db/configuration/defaults/tt-rss/status b/root/etc/e-smith/db/configuration/defaults/tt-rss/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/tt-rss/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/tt-rss/type b/root/etc/e-smith/db/configuration/defaults/tt-rss/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/tt-rss/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/db/configuration/migrate/tt-rss-database b/root/etc/e-smith/db/configuration/migrate/tt-rss-database new file mode 100644 index 0000000..dc55612 --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/tt-rss-database @@ -0,0 +1,12 @@ +{ + +my $rec = $DB->get('tt-rss') || $DB->new_record('tt-rss', { type => 'webapp' }); +my $pw = $rec->prop('DbPassword'); + +if (not $pw){ + $pw = `/usr/bin/openssl rand -base64 60 | tr -c -d '[:graph:]'`; + chomp($pw); + $rec->set_prop('DbPassword', $pw); +} + +} diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/tt-rss b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/tt-rss new file mode 100644 index 0000000..c68b69d --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/tt-rss @@ -0,0 +1,3 @@ +UID="root" +GID="root" +PERMS=0755 diff --git a/root/etc/e-smith/templates.metadata/usr/share/tt-rss/config.php b/root/etc/e-smith/templates.metadata/usr/share/tt-rss/config.php new file mode 100644 index 0000000..20984ee --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/tt-rss/config.php @@ -0,0 +1,3 @@ +UID="root" +GID="apache" +PERMS=0640 diff --git a/root/etc/e-smith/templates/etc/cron.d/tt-rss/All b/root/etc/e-smith/templates/etc/cron.d/tt-rss/All new file mode 100644 index 0000000..ecccf1f --- /dev/null +++ b/root/etc/e-smith/templates/etc/cron.d/tt-rss/All @@ -0,0 +1 @@ +# Cron job disabled, SME Server uses the daemon to update the feeds diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss b/root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss new file mode 100644 index 0000000..bc709f0 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss @@ -0,0 +1,48 @@ +{ +my $db = ${'tt-rss'}{'DbName'} || 'rssdb'; +my $user = ${'tt-rss'}{'DbUser'} || 'rssuser'; +my $pass = ${'tt-rss'}{'DbPassword'} || 'secret'; + +my $schema = `rpm -ql tt-rss | grep ttrss_schema_mysql.sql`; + +$OUT .= <<"END"; +#! /bin/sh +if [ \! -d /var/lib/mysql/$db ]; then + /usr/bin/mysqladmin create $db + /usr/bin/mysql $db < $schema +fi + +/usr/bin/mysql < + AddType application/x-httpd-php .php + php_admin_value open_basedir /usr/share/tt-rss:/var/lock/tt-rss:/var/cache/tt-rss:/tmp + php_admin_value memory_limit 80M + php_admin_flag allow_url_fopen on + SSLRequireSSL on + Order deny,allow + Deny from all + Allow from $allow + $auth + + + deny from all + +HERE +} +else{ + $OUT .= " # TT-RSS is disabled\n"; +} + +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/60tt-rss-ssl b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/60tt-rss-ssl new file mode 100644 index 0000000..c35ffe1 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/60tt-rss-ssl @@ -0,0 +1,14 @@ +{ +my $sslport = $modSSL{'TCPPort'} || '443'; +my $status = ${'tt-rss'}{'status'} || 'enabled'; +my $alias = ${'tt-rss'}{'AliasOnPrimary'} || 'enabled'; + +if (($port ne $sslport) && ($status eq 'enabled') && ($alias eq 'enabled')){ + + ## Redirect Web Address to Secure Address + $OUT .= " RewriteEngine on\n"; + $OUT .= " RewriteRule ^/tt-rss(/.*|\$) https://%{HTTP_HOST}/tt-rss\$1 \[L,R\]\n"; + +} +} + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/10database b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/10database new file mode 100644 index 0000000..907f224 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/10database @@ -0,0 +1,22 @@ +{ + +my $db = ${'tt-rss'}{'DbName'} || 'rssdb'; +my $user = ${'tt-rss'}{'DbUser'} || 'rssuser'; +my $pass = ${'tt-rss'}{'DbPassword'} || 'secret'; +my $port = $mysqld{'TCPPort'} || '3306'; + +$OUT .=<<"HERE"; + + define('DB_TYPE', "mysql"); // or mysql + define('DB_HOST', "localhost"); + define('DB_PORT', "$port"); + define('DB_USER', "$user"); + define('DB_NAME', "$db"); + define('DB_PASS', "$pass"); + +HERE +} + + define('MYSQL_CHARSET', 'UTF8'); + // Connection charset for MySQL. + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories new file mode 100644 index 0000000..ae40421 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories @@ -0,0 +1,47 @@ + define('SELF_URL_PATH', ''); + // Full URL of your tt-rss installation. This should be set to the + // location of tt-rss directory, e.g. http://yourserver/tt-rss/ + // You need to set this option correctly otherwise several features + // including PUSH, bookmarklets and browser integration will not work properly. + + define('MAGPIE_FETCH_TIME_OUT', 60); + // Magpie's default timeout is 5 seconds. Some RSS feeds, + // such as from large Trac installs, can take significantly + // longer than 5 seconds to generate. To prevent failed + // updates, increase this. + + define('CACHE_DIR', '/var/cache/tt-rss/'); + // Local cache directory for RSS feed content. + + define('MAGPIE_CACHE_DIR', '/var/cache/tt-rss/magpie'); + // Local cache directory for RSS feeds + + define('MAGPIE_CACHE_AGE', 60*30); + // How long to store cached RSS objects? In seconds. + // Defaults to 30 minutes + + define('ICONS_DIR', "rssicons"); + define('ICONS_URL', "rssicons"); + // Local and URL path to the directory, where feed favicons are stored. + // Unless you really know what you're doing, please keep those relative + // to tt-rss main directory. + + define('TMP_DIRECTORY', '/tmp'); + // Directory for temporary files + + define('SIMPLEPIE_CACHE_DIR', '/var/cache/tt-rss/simplepie'); + // Cache directory for RSS feeds when using SimplePie + + define('SIMPLEPIE_CACHE_IMAGES', true); + // Allow caching feed images when using SimplePie, to bypass hotlink + // prevention and such at expense of local disk space and bandwidth. + // Note that you (or your users) also have to enable image caching + // in feed editor. + + define('PHP_EXECUTABLE', '/usr/bin/php'); + // Path to PHP executable + + define('LOCK_DIRECTORY', '/var/lock/tt-rss'); + // Directory for lockfiles, must be writable to the user you run + // daemon process or cronjobs under + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/25auth b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/25auth new file mode 100644 index 0000000..8647621 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/25auth @@ -0,0 +1,51 @@ +{ + +my $auth = ${'tt-rss'}{'Authentication'} || 'http'; +my $remote = ($auth eq 'internal') ? 'false':'true'; +my $multi = ((${'tt-rss'}{'MultiUser'} || 'enabled') eq 'enabled') ? 'false':'true'; + +$OUT .=<<"HERE"; + + define('SINGLE_USER_MODE',$multi); + // Operate in single user mode, disables all functionality related to + // multiple users. + + define('ALLOW_REMOTE_USER_AUTH',$remote); + // Set to 'true' if you trust your web server's REMOTE_USER + // environment variable to validate that the user is logged in. This + // option can be used to integrate tt-rss with Apache's external + // authentication modules. + +HERE +} + + define('AUTO_CREATE_USER',true); + // If users are authenticated by your web server, set this to true if + // You want new users to be automaticaly created in tt-rss database + // on first login + + define('AUTO_LOGIN',true); + // Set this to true if you use ALLOW_REMOTE_USER_AUTH and you want + // to skip the login form. If set to true, users won't be able to select + // profile + + define('DATABASE_BACKED_SESSIONS', false); + // Store session information in a database, recommended for multiuser + // configurations. Doesn't seem to work for everyone, so enable with caution. + // tt-rss uses default PHP session storing mechanism if disabled. + + define('SESSION_CHECK_ADDRESS', 1); + // Check client IP address when validating session: + // 0 - disable checking + // 1 - check first 3 octets of an address (recommended) + // 2 - check first 2 octets of an address + // 3 - check entire address + + define('SESSION_COOKIE_LIFETIME', 0); + // Default lifetime of a session (e.g. login) cookie. In seconds, + // 0 means cookie will be deleted when browser closes. + + define('SESSION_EXPIRE_TIME', 86400); + // Hard expiration limit for sessions. Should be + // greater or equal to SESSION_COOKIE_LIFETIME + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/30update b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/30update new file mode 100644 index 0000000..3caad58 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/30update @@ -0,0 +1,34 @@ + + define('ENABLE_UPDATE_DAEMON', true); + // This enables different mechanism for user-triggered updates designed + // for update daemon running in background on the server. + // This option suggests FEEDS_FRAME_REFRESH set to a small value + // (like 60 seconds, depending on number of users and server/bandwidth load). + + define('DAEMON_SLEEP_INTERVAL', 60); + // Interval between update daemon update runs + + define('DAEMON_UPDATE_LOGIN_LIMIT', 0); + // Stop updating feeds of user who haven't logged in specified + // amount of days. 0 disables. + + define('DEFAULT_UPDATE_METHOD', 0); + // Which feed parsing library to use as default: + // 0 - Magpie + // 1 - SimplePie + + + define('DAEMON_FEED_LIMIT', 60); + // Limits the amount of feeds daemon (or a cronjob) updates on one run + + define('FORCE_ARTICLE_PURGE', 0); + // When this option is not 0, users ability to control feed purging + // intervals is disabled and all articles (which are not starred) + // older than this amount of days are purged. + + define('COUNTERS_MAX_AGE', 365); + // Hard limit for unread counters calculation. Try tweaking this + // parameter to speed up tt-rss when having a huge number of articles + // in the database (better yet, enable purging!) + + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/35digest b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/35digest new file mode 100644 index 0000000..7049ffe --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/35digest @@ -0,0 +1,29 @@ + + define('DIGEST_ENABLE', true); + // Global option to enable daily digests. Also toggles the ability of users + // to forward articles by email. + + define('DIGEST_EMAIL_LIMIT', 10); + // The maximum amount of emails sent in one digest batch + + define('DAEMON_SENDS_DIGESTS', true); + // If update daemon and update_feeds should send digests + // Disable if you prefer querying special URL (see wiki) + + define('DIGEST_FROM_NAME', 'Tiny Tiny RSS'); + define('DIGEST_FROM_ADDRESS', 'noreply@{$DomainName}'); + // Name, address and subject for sending outgoing mail. This applies + // to password reset notifications, digest emails and any other mail. + + define('DIGEST_SUBJECT', '[tt-rss] New headlines for last 24 hours'); + // Subject line for email digests + + define('DIGEST_SMTP_HOST', 'localhost'); + // SMTP Host to send outgoing mail. Blank - use system MTA. + + define('DIGEST_SMTP_LOGIN', ''); + define('DIGEST_SMTP_PASSWORD', ''); + // These two options enable SMTP authentication when sending + // outgoing mail. Require DIGEST_SMTP_HOST. + + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/40registration b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/40registration new file mode 100644 index 0000000..692ca87 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/40registration @@ -0,0 +1,14 @@ + + define('ENABLE_REGISTRATION', false); + // Allow users to register themselves. Please be vary that allowing + // random people to access your tt-rss installation is a security risk + // and potentially might lead to data loss or server exploit. Disabled + // by default. + + define('REG_NOTIFY_ADDRESS', 'admin@{$DomainName}'); + // Email address to send new user notifications to. + + define('REG_MAX_USERS', 0); + // Maximum amount of users which will be allowed to register on this + // system. 0 - no limit. + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/45sphinx b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/45sphinx new file mode 100644 index 0000000..ea0b88e --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/45sphinx @@ -0,0 +1,8 @@ + + define('SPHINX_ENABLED', false); + // Enable fulltext search using Sphinx (http://www.sphinxsearch.com) + // Please see http://tt-rss.org/wiki/SphinxSearch for more information. + + define('SPHINX_INDEX', 'ttrss'); + // Index name in Sphinx configuration + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/50tweeter b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/50tweeter new file mode 100644 index 0000000..c36fa0e --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/50tweeter @@ -0,0 +1,9 @@ + + define('ENABLE_TWEET_BUTTON', false); + // Enable 'tweet this' button for articles + + define('CONSUMER_KEY', ''); + define('CONSUMER_SECRET', ''); + // Your OAuth instance authentication information for Twitter, visit + // http://twitter.com/oauth_clients to register your instance. + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/55various b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/55various new file mode 100644 index 0000000..b65a4c2 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/55various @@ -0,0 +1,18 @@ + + define('ENABLE_GZIP_OUTPUT', true); + // Selectively gzip output to improve wire performance. This requires + // PHP Zlib extension on the server. + + define('ENABLE_TRANSLATIONS', true); + // Enable support for interface translations + + define('FEEDBACK_URL', ''); + // Displays an URL for users to provide feedback or comments regarding + // this instance of tt-rss. Can lead to a forum, contact email, etc. + + define('USE_CURL', false); + // Use CURL to fetch remote data instead of PHP built-in fopen() + + define('CHECK_FOR_NEW_VERSION', false); + // Check for new versions of tt-rss automatically. + diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/60version b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/60version new file mode 100644 index 0000000..9ead6a0 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/60version @@ -0,0 +1,6 @@ + define('CONFIG_VERSION', 23); + // Expected config version. Please update this option in config.php + // if necessary (after migrating all new options from this file). + + // vim:ft=php + diff --git a/root/var/service/tt-rss/log/run b/root/var/service/tt-rss/log/run new file mode 100644 index 0000000..240fbf3 --- /dev/null +++ b/root/var/service/tt-rss/log/run @@ -0,0 +1,25 @@ +#!/bin/sh + +#---------------------------------------------------------------------- +# copyright (C) 2010-2011 Firewall-Services +# daniel@firewall-services.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#---------------------------------------------------------------------- +exec \ + /usr/local/bin/setuidgid smelog \ + /usr/local/bin/multilog t s5000000 \ + /var/log/tt-rss + diff --git a/root/var/service/tt-rss/run b/root/var/service/tt-rss/run new file mode 100644 index 0000000..c22026a --- /dev/null +++ b/root/var/service/tt-rss/run @@ -0,0 +1,33 @@ +#!/bin/sh + +#---------------------------------------------------------------------- +# copyright (C) 2010-2011 Firewall-Services +# daniel@firewall-services.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Technical support for this program is available from Mitel Networks +# Please visit our web site www.mitel.com/sme/ for details. +#---------------------------------------------------------------------- + + +exec 2>&1 + +cd /usr/share/tt-rss + +exec \ + /usr/local/bin/setuidgid www \ + /usr/bin/php ./update.php -daemon + diff --git a/smeserver-tt-rss.spec b/smeserver-tt-rss.spec new file mode 100644 index 0000000..2f07955 --- /dev/null +++ b/smeserver-tt-rss.spec @@ -0,0 +1,90 @@ +# Authority: vip-ire +# Name: Daniel Berteaud + +%define name smeserver-tt-rss +%define version 0.1.0 +%define release 1 +Summary: sme server integration of tt-rss +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +License: GNU GPL version 2 +URL: http://www.zabbix.com/ +Group: SMEserver/addon +Source: %{name}-%{version}.tar.gz + +BuildArchitectures: noarch +BuildRequires: e-smith-devtools +BuildRoot: /var/tmp/%{name}-%{version} +Requires: e-smith-release +Requires: tt-rss >= 1.5.1 +Requires: smeserver-webapps-common +AutoReqProv: no + +%description +smserver integration of openupload. +OpenUpload is an open source application to share files over +the internet (like MegaUpload or RapidShare for example) + +%changelog +* Tue Apr 24 2012 Daniel Berteaud 0.1.0-1.sme +- Migrate to GIT + +* Fri Nov 25 2011 Daniel Berteaud 0.1-8.sme +- Define SELF_URL_PATH in config +- Update config version to 23 (1.5.7) + +* Mon Jul 25 2011 Daniel Berteaud 0.1-7.sme +- Configure cache dir (prevent log noise) + +* Tue Jun 07 2011 Daniel B. 0.1-6.sme +- MySQL schema files are not doc files anymore + +* Tue May 17 2011 Daniel B. 0.1-5 +- Deny access to the /schema directory + +* Wed Jan 26 2011 Daniel B. 0.1-4 +- Add DB_PORT param in config file + +* Wed Jan 26 2011 Daniel B. 0.1-3 +- Support tt-rss 1.5.1 + +* Mon Jan 03 2011 Daniel B. 0.1-2 +- disable cron job, as feeds are updated via the daemon + +* Mon Jan 03 2011 Daniel B. 0.1-1 +- initial release + +%prep +%setup +%build +perl ./createlinks +%{__mkdir_p} root/var/log/tt-rss + +%install +rm -rf $RPM_BUILD_ROOT +(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) +rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + --file /var/service/tt-rss/run 'attr(0755,root,root)' \ + --file /var/service/tt-rss/log/run 'attr(0755,root,root)' \ + --dir /var/log/tt-rss 'attr(0770,root,smelog)' \ + > %{name}-%{version}-filelist + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root) + +%clean +rm -rf $RPM_BUILD_ROOT + + +%postun +#uninstall +if [ $1 = 0 ] ; then + /sbin/e-smith/db configuration setprop tt-rss status disabled + /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf + /usr/bin/sv h /service/httpd-e-smith +fi + +true +