Compare commits

...

42 Commits

Author SHA1 Message Date
Daniel Berteaud
20510a9c59 Spec file update 2017-07-26 17:50:34 +02:00
Daniel Berteaud
861925abb6 Remove hardcoded php version
Replace it at build time instead so it's easier to change
2017-07-18 11:32:47 +02:00
Daniel Berteaud
3168a47f08 Fix tmp dir 2017-07-18 11:31:34 +02:00
Daniel Berteaud
89b9699283 Limit max_requests to 1000 2017-07-18 11:30:13 +02:00
Daniel Berteaud
489aa0a7b3 Cleanup in the fpm pool template 2017-07-14 11:50:23 +02:00
Daniel Berteaud
40668f71d9 Move php-fpm tempalte to the correct location 2017-07-13 18:26:59 +02:00
Daniel Berteaud
0dfa5b6d3b Revert "Move to php56 dir"
This reverts commit b88d97b5ca.
2017-07-13 17:38:49 +02:00
Daniel Berteaud
b88d97b5ca Move to php56 dir 2017-07-13 17:38:37 +02:00
Daniel Berteaud
b560124a22 Rename template fragment for www.conf 2017-07-13 17:27:55 +02:00
Daniel Berteaud
0a2bdb6d9a Spacing issue 2017-07-13 17:19:34 +02:00
Daniel Berteaud
b810bb40f8 Put PHP-FPM pool conf in www.conf 2017-07-13 17:19:02 +02:00
Daniel Berteaud
6d146dc619 Another php -> php71 2017-07-13 12:22:11 +02:00
Daniel Berteaud
c5dec2f000 Adjust templates to work with php71 2017-07-13 11:37:05 +02:00
Daniel Berteaud
293d980188 php-fpm conf must not use # as comment 2017-07-13 10:46:44 +02:00
Daniel Berteaud
bf888dd671 Merge branch 'sme9' 2017-07-13 10:33:17 +02:00
Daniel Berteaud
f2c668931f Switch to php71 (php-fpm) 2017-07-13 09:50:46 +02:00
Daniel Berteaud
448291ab3f Spec file update 2016-02-16 09:34:27 +01:00
Daniel Berteaud
6277a3a769 Spec file update 2016-02-16 09:33:27 +01:00
Daniel Berteaud
0d3a5c2dc1 Remove SESSION_CHECK_ADDRESS 2016-02-16 09:28:06 +01:00
Daniel Berteaud
f8bf3150ed Remove SESSION_CHECK_ADDRESS 2016-02-16 09:27:45 +01:00
Daniel Berteaud
291f88982e Spec file update 2015-06-29 15:54:26 +02:00
Daniel Berteaud
554bbd2a35 Adapt conf for 20150629 version 2015-06-29 15:38:52 +02:00
Daniel Berteaud
4d6f83856a Spec file update 2015-06-29 15:38:41 +02:00
Daniel Berteaud
a31e947881 Adapt conf for 20150629 version 2015-06-29 15:18:51 +02:00
Daniel Berteaud
a402a5b0a9 Spec file update 2014-04-22 19:01:08 +02:00
Daniel Berteaud
510580624f Fix basic auth on SME9 2014-04-22 18:59:11 +02:00
Daniel Berteaud
1f5812c879 Spec file update 2014-02-06 12:56:47 +01:00
Daniel Berteaud
a6b9f89860 Fix database upgrades 2014-02-06 12:55:53 +01:00
Daniel Berteaud
9bf6ec7e9c Spec file update 2014-01-20 16:51:05 +01:00
Daniel Berteaud
dffe71f5c3 Remove default Authentication prop (http is still the default value, but it makes it easier to change this default value on another meta-package) 2014-01-20 16:49:55 +01:00
Daniel Berteaud
ce4e3bbe7a Spec file update 2013-12-18 12:45:53 +01:00
Daniel Berteaud
52c5ac6bb3 Automatically upgrade database schema using update.php 2013-12-18 12:25:32 +01:00
Daniel Berteaud
f79cfa865c Add DETECT_ARTICLE_LANGUAGE, needed for tt-rss 1.11 2013-12-18 12:18:41 +01:00
Daniel Berteaud
4d5379d30f update spec file 2013-06-13 09:15:13 +02:00
Daniel Berteaud
7dc148f84b update spec file 2013-06-12 18:58:08 +02:00
Daniel Berteaud
7f2d3fe397 Add SMTP_SECURE needed for v 1.8 2013-06-12 18:56:30 +02:00
Daniel Berteaud
bad3599af7 update spec file 2013-05-14 17:40:14 +02:00
Daniel Berteaud
2579abb673 1.7.9 compat 2013-05-14 17:03:16 +02:00
Daniel Berteaud
e8ac589c4d update spec file 2013-03-24 21:15:54 +01:00
Daniel Berteaud
c6c6b537e2 update daemon run script to use --daemon 2013-03-24 21:14:23 +01:00
Daniel Berteaud
ba767963cc update spec file 2013-03-23 18:16:31 +01:00
Daniel Berteaud
d2e490088e add SMTP_PORT parameter 2013-03-23 14:42:50 +01:00
12 changed files with 163 additions and 44 deletions

View File

@ -10,6 +10,8 @@ $OUT .= <<"END";
if [ \! -d /var/lib/mysql/$db ]; then
/usr/bin/mysqladmin create $db
/usr/bin/mysql $db < $schema
else
su -s /bin/bash - www -c "cd /usr/share/tt-rss && echo 'yes' | /usr/bin/php__PHP_VERSION__ ./update.php --update-schema"
fi
/usr/bin/mysql <<EOF

View File

@ -0,0 +1,9 @@
{
if ($fastcgi_mod eq 'mod_fastcgi'){
$OUT .=<<_EOF;
Action phptt-rss-fastcgi /php-cgi-bin/phptt-rss-wrapper
Alias /php-cgi-bin/phptt-rss-wrapper /var/www/php-cgi-bin/phptt-rss-wrapper
FastCgiExternalServer /var/www/php-cgi-bin/phptt-rss-wrapper -socket /var/run/php-fpm/php__PHP_VERSION__-tt-rss.sock -pass-header Authorization -idle-timeout 120
_EOF
}
}

View File

@ -6,18 +6,36 @@ if ((${'tt-rss'}{'status'} || 'enabled') eq 'enabled'){
my $allow = ((${'tt-rss'}{'access'} || 'private') eq 'public') ? 'all':"$localAccess $externalSSLAccess";
my $auth = ((${'tt-rss'}{'Authentication'} || 'http') eq 'http') ? "AuthName \"Tiny Tiny RSS\"\n" .
" AuthType Basic\n" .
" AuthBasicProvider external\n" .
" AuthExternal pwauth\n" .
" Require valid-user\n" : '';
$OUT .=<<"HERE";
$alias
<Directory /usr/share/tt-rss>
my $php =<<'_EOF';
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
_EOF
if ($fastcgi_mod eq 'mod_fastcgi'){
$php =<<'_EOF';
AddHandler phptt-rss-fastcgi .php
_EOF
}
elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){
$php =<<'_EOF';
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__-tt-rss.sock|fcgi://localhost"
</FilesMatch>
_EOF
}
$OUT .=<<"_EOF";
$alias
<Directory /usr/share/tt-rss>
$php
SSLRequireSSL on
Order deny,allow
Deny from all
@ -27,7 +45,7 @@ $alias
<Directory /usr/share/tt-rss/schema>
deny from all
</Directory>
HERE
_EOF
}
else{
$OUT .= " # TT-RSS is disabled\n";

View File

@ -0,0 +1,49 @@
{
if ($PHP_VERSION eq '__PHP_VERSION__'){
if ((${'tt-rss'}{status} || 'disabled') eq 'enabled'){
my $id = 'tt-rss';
$OUT .=<<_EOF;
[php$PHP_VERSION-$id]
user = www
group = www
listen.owner = root
listen.group = www
listen.mode = 0660
listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock
pm = dynamic
pm.max_children = 15
pm.start_servers = 3
pm.min_spare_servers = 3
pm.max_spare_servers = 4
pm.max_requests = 1000
request_terminate_timeout = 30
php_admin_value[session.save_path] = /var/lib/php/$id/session
php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache
php_admin_value[upload_tmp_dir] = /var/lib/php/$id/tmp
php_admin_value[error_log] = /var/log/php/$id/error.log
slowlog = /var/log/php/$id/slow.log
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
php_admin_flag[display_errors] = off
php_admin_flag[log_errors] = on
php_admin_value[error_log] = syslog
php_admin_value[memory_limit] = 128M
php_admin_value[max_execution_time] = 30
php_admin_value[post_max_size] = 2M
php_admin_value[upload_max_filesize] = 1M
php_admin_value[max_input_time] = 60
php_admin_value[disable_functions] = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd
php_admin_value[open_basedir] = /usr/share/tt-rss:/var/lock/tt-rss:/var/cache/tt-rss:/var/lib/php/tt-rss
php_admin_flag[allow_url_fopen] = on
php_admin_flag[file_upload] = off
php_admin_flag[session.cookie_httponly] = on
php_admin_flag[allow_url_include] = off
php_admin_value[session.save_handler] = files
_EOF
}
else{
$OUT .= '; Tiny Tiny RSS is disabled';
}
}
}

View File

@ -1,4 +1,4 @@
define('SELF_URL_PATH', '');
define('SELF_URL_PATH', '{ ${'tt-rss'}{'Uri'} || 'https://' . $SystemName . '.' . $DomainName . '/tt-rss' }');
// 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
@ -13,10 +13,10 @@
// Unless you really know what you're doing, please keep those relative
// to tt-rss main directory.
define('TMP_DIRECTORY', '/tmp');
define('TMP_DIRECTORY', '/var/lib/php/tt-rss/tmp');
// Directory for temporary files
define('PHP_EXECUTABLE', '/usr/bin/php');
define('PHP_EXECUTABLE', '/usr/bin/php__PHP_VERSION__');
// Path to PHP executable
define('LOCK_DIRECTORY', '/var/lock/tt-rss');

View File

@ -35,13 +35,6 @@ HERE
// 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.
@ -50,3 +43,10 @@ HERE
// Hard expiration limit for sessions. Should be
// greater or equal to SESSION_COOKIE_LIFETIME
define('FEED_CRYPT_KEY', '');
// Key used for encryption of passwords for password-protected feeds
// in the database. A string of 24 random characters. If left blank, encryption
// is not used. Requires mcrypt functions.
// Warning: changing this key will make your stored feed passwords impossible
// to decrypt.

View File

@ -11,11 +11,13 @@
define('DIGEST_SUBJECT', '[tt-rss] New headlines for last 24 hours');
// Subject line for email digests
define('SMTP_HOST', 'localhost');
// SMTP Host to send outgoing mail. Blank - use system MTA.
define('SMTP_SERVER', '');
// Hostname:port combination to send outgoing mail (i.e. localhost:25).
// Blank - use system MTA.
define('SMTP_LOGIN', '');
define('SMTP_PASSWORD', '');
// These two options enable SMTP authentication when sending
define('SMTP_SECURE', '');
// These three options enable SMTP authentication when sending
// outgoing mail. Only used with SMTP_HOST

View File

@ -6,3 +6,5 @@
define('SPHINX_INDEX', 'ttrss');
// Index name in Sphinx configuration
define('SPHINX_SERVER', 'localhost:9312');
// Hostname:port combination for the Sphinx server.

View File

@ -1,3 +1,5 @@
define('CHECK_FOR_UPDATES', false);
// Check for updates automatically if running Git version
define('ENABLE_GZIP_OUTPUT', true);
// Selectively gzip output to improve wire performance. This requires
@ -7,9 +9,6 @@
// 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('CHECK_FOR_NEW_VERSION', false);
// Check for new versions of tt-rss automatically.
define('ARTICLE_BUTTON_PLUGINS', 'note,tweet,share,mail');
// Comma-separated list of additional article action button plugins
// to enable, like tweet button, etc.
@ -25,3 +24,9 @@
define('PUBSUBHUBBUB_ENABLED', false);
// Enable client PubSubHubbub support in tt-rss. When disabled, tt-rss
// won't try to subscribe to PUSH feed updates.
define('LOG_DESTINATION', '');
// Log destination to use. Possible values: sql (uses internal logging
// you can read in Preferences -> System), syslog - logs to system log.
// Setting this to blank uses PHP logging (usually to http server
// error.log).

View File

@ -1,25 +1,8 @@
#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 2010-2011 Firewall-Services
# copyright (C) 2010-2017 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.
#----------------------------------------------------------------------
@ -29,5 +12,5 @@ cd /usr/share/tt-rss
exec \
/usr/local/bin/setuidgid www \
/usr/bin/php ./update.php -daemon
/usr/bin/php__PHP_VERSION__ ./update.php --daemon

View File

@ -2,11 +2,13 @@
# Name: Daniel Berteaud
%define name smeserver-tt-rss
%define version 0.2.1
%define version 0.3.0
%define release 1
%define phpversion 71
Summary: sme server integration of tt-rss
Name: %{name}
Version: %{version}
Epoch: 9
Release: %{release}%{?dist}
License: GNU GPL version 2
URL: http://www.zabbix.com/
@ -17,8 +19,9 @@ BuildArchitectures: noarch
BuildRequires: e-smith-devtools
BuildRoot: /var/tmp/%{name}-%{version}
Requires: e-smith-release
Requires: tt-rss >= 1.7.1
Requires: tt-rss >= 20170713
Requires: smeserver-webapps-common
Requires: smeserver-php-fpm
AutoReqProv: no
%description
@ -26,6 +29,44 @@ smserver integration of TIny Tiny RSS
Tiny Tiny RSS is a feature rich, web based feed reader
%changelog
* Thu Jul 13 2017 Daniel Berteaud <daniel@firewall-services.com> 0.3.0-1.sme
- Switch to php fpm, using PHP 7.1
- Support tt-rss 20170713
* Tue Feb 16 2016 Daniel Berteaud <daniel@firewall-services.com> 0.2.11-1.sme
- Remove SESSION_CHECK_ADDRESS
* Mon Jun 29 2015 Daniel Berteaud <daniel@firewall-services.com> 0.2.9-1.sme
- Adapt templates for 20150629
* Mon Jun 29 2015 Daniel Berteaud <daniel@firewall-services.com> 0.2.10-1.sme
- Adapt conf templates for 20150629
* Tue Apr 22 2014 Daniel Berteaud <daniel@firewall-services.com> 0.2.9-1.sme
- Fix basic auth on SME9
* Thu Feb 6 2014 Daniel Berteaud <daniel@firewall-services.com> 0.2.8-1.sme
- Fix database upgrades
* Mon Jan 20 2014 Daniel Berteaud <daniel@firewall-services.com> 0.2.7-1.sme
- Remove the default Authentication prop (but the default value is still http)
* Wed Dec 18 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.6-1.sme
- Add DETECT_ARTICLE_LANGUAGE, for tt-rss 1.11
- Automatically update database schema when needed
* Wed Jun 12 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.5-1.sme
- Add SMTP_SECURE, for tt-rss 1.8
* Tue May 14 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.4-1.sme
- Support tt-rss 1.7.9
* Sun Mar 24 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.3-1.sme
- update daemon run script to use --daemon argument
* Sat Mar 23 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.2-1.sme
- Add missing SMTP_PORT
* Tue Mar 5 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.1-1.sme
- Support tt-rss 1.7.1
@ -64,13 +105,22 @@ Tiny Tiny RSS is a feature rich, web based feed reader
%setup
%build
perl ./createlinks
find root/ -type f | xargs grep -l __PHP_VERSION__ | xargs sed -i -e "s/__PHP_VERSION__/%{phpversion}/g"
%{__mkdir_p} root/var/log/tt-rss
%{__mkdir_p} root/var/log/php/tt-rss
%{__mkdir_p} root/var/lib/php/tt-rss/{tmp,wsdlcache,opcache,session}
%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 \
--dir /var/log/php/tt-rss 'attr(0770,root,www)' \
--dir /var/lib/php/tt-rss 'attr(0770,root,www)' \
--dir /var/lib/php/tt-rss/tmp 'attr(0770,root,www)' \
--dir /var/lib/php/tt-rss/session 'attr(0770,root,www)' \
--dir /var/lib/php/tt-rss/wsdlcache 'attr(0770,root,www)' \
--dir /var/lib/php/tt-rss/opcache 'attr(0770,root,www)' \
--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)' \