Periodic releases are over

Development-related discussion, including bundled plugins
User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Periodic releases are over

Postby sleeper_service » 02 Feb 2015, 06:46

unlogy wrote:I'd also like to ask for a simpler update method instead of having to go through a terminal.
sleeper_service, no response required


so, now that you've demanded a response from me... what would you like that's easier... someone to come do it for you perhaps?

User avatar
unlogy
Bear Rating Trainee
Bear Rating Trainee
Posts: 15
Joined: 27 Mar 2013, 01:21
Location: Montreal
Contact:

Re: Periodic releases are over

Postby unlogy » 02 Feb 2015, 07:18

Quoted without comment.....

unlogy wrote:sleeper_service, no response required


:lol:

User avatar
HunterZ
Bear Rating Disaster
Bear Rating Disaster
Posts: 60
Joined: 21 Mar 2013, 03:30
Location: Seattle

Re: Periodic releases are over

Postby HunterZ » 02 Feb 2015, 07:38

This is a good change. Now I can use tt-rss itself to monitor the Git repo and pull new versions whenever an interesting change has been committed.

Transition was smooth:
  • Backed everything up.
  • Cloned git repo into a new directory on my web server.
  • Copied over config.php and feed icons.
  • Diff'd new config.php-dist against old config.php-dist and noted the changes.
  • Ported changes to config.php.
  • Turned off daemon watchdog cron job.
  • Killed daemon.
  • Moved old tt-rss install out.
  • Moved new tt-rss install in.
  • Turned watchdog cron job back on, which started the daemon back up.
  • Logged in via web browser and update database schema.

This is pretty much the process I went through with the auto updater anyway. It's never a good idea to do a fully-automated upgrade because of config file changes (otherwise it would be tempting to have a git pull cron job).

User avatar
Louie
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 26 Jun 2013, 18:14

Re: Periodic releases are over

Postby Louie » 02 Feb 2015, 20:51

nwsc wrote:I noticed the updater stuff had been taken from the config.php-dist (duh!), so removed that by hand from my config.php. (will I always have to do this?)


My question follows up with this statement. After converting to using git, when doing a git pull, what will happen to the config.php file? Will it be overwritten, and need to be edited again, or will git prompt you for conflict resolution?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Periodic releases are over

Postby fox » 02 Feb 2015, 21:00

it's not in the repository so nothing.

User avatar
HunterZ
Bear Rating Disaster
Bear Rating Disaster
Posts: 60
Joined: 21 Mar 2013, 03:30
Location: Seattle

Re: Periodic releases are over

Postby HunterZ » 02 Feb 2015, 22:07

Louie: config.php is actually in .gitignore - along with a bunch of other stuff - so git won't even look at it.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Periodic releases are over

Postby fox » 03 Feb 2015, 14:40

I've added a placeholder update checker thing which would show the icon on the main UI if there are new changesets.

gbcox
Bear Rating Master
Bear Rating Master
Posts: 149
Joined: 25 Apr 2013, 04:52

Re: Periodic releases are over

Postby gbcox » 03 Feb 2015, 20:59

@Louie,
I created a stand alone utility (cfg_ttrss) which can be used to sync config changes. It was mentioned in the forum
a while back and you can read about it here:
http://tso.bzb.us/2013/06/ttrss-synchronization-for-changes-to.html

It was originally intended for those who weren't running the git version, but can be used for those who decide not to
use the full git_ttrss http://tso.bzb.us/2013/06/ttrss-utils-fedora-tiny-tiny-rss.html which I discussed earlier.

What I found was that every once in awhile a change would occur to the config file, and unless you were paying attention
and manually checking it every time you did an update, you'd miss the changes. Depending on what it was, it could
cause an issue.

If you are using the git_ttrss utility you don't have to worry about it. It automatically checks for any config file changes,
among other things, each time it runs.

gbcox
Bear Rating Master
Bear Rating Master
Posts: 149
Joined: 25 Apr 2013, 04:52

Re: Periodic releases are over

Postby gbcox » 03 Feb 2015, 21:32

For anyone who's interested... here is the output from my run this morning. It shows cfg-o-matic at work...

https://drive.google.com/file/d/0B96ctNl5KI2aZ24zVTZxekUyMVU/view?usp=sharing

cktt
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 04 Jun 2014, 19:42

Re: Periodic releases are over

Postby cktt » 03 Feb 2015, 23:13

Hi there
I moved to git, made my own script for pull and update my apache web folder, everything works fine with that.

Here is my script

Code: Select all

DIRGIT=/path/to/git/folder
DIRTT=/path/to/website

cd $DIRGIT
git pull
if [ $? != 0 ] ; then
# copy only modified files, except git related
    rsync -rvch --exclude=.git/ --exclude=.buildpath --exclude=.gitignore --exclude=.project $DIRGIT/ $DIRTT
# always use new config file, maybe there are new parameters
    cp $DIRTT/config.php-dist $DIRTT/config.php
# now i change default values to my values
    sed -i "/DB_TYPE/ s/pgsql/mysql/" $DIRTT/config.php
    sed -i "/DB_USER/ s/fox/MYDBUSER/" $DIRTT/config.php
    sed -i "/DB_NAME/ s/fox/MYDBNAME/" $DIRTT/config.php
    sed -i "/DB_PASS/ s/XXXXXX/MYUSERPASS/" $DIRTT/config.php
    sed -i "/DB_PORT/ s/''/'3396'/" $DIRTT/config.php
    sed -i "/SELF_URL_PATH/ s/example.org\/tt-rss/MYWEBSITE/" $DIRTT/config.php
    sed -i "/FEED_CRYPT_KEY/ s/''/'MYCRYPTKEY'/" $DIRTT/config.php
    sed -i "/SIMPLE_UPDATE_MODE/ s/false/true/" $DIRTT/config.php
fi

* replace MYsomethig with your own values

But... I'm seeing an error "Update daemon is not running." in tt-rss, I'm using a script from https://www.rosehosting.com/blog/how-to-set-up-tt-rss-tiny-tiny-rss-on-centos-6 wich (in very very short) run one line on boot

Code: Select all

daemon --user=apache /usr/bin/php /path/to/mywebsite/update_daemon2.php


I' don't understand why isn't working anymore. I've changed SIMPLE_UPDATE_MODE to true and false and error still there.

Any ideas why update_daemon2.php is not working? (I know, maybe my question does not belong here, but I have to ask)

Thanks!

cktt
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 04 Jun 2014, 19:42

Re: Periodic releases are over

Postby cktt » 04 Feb 2015, 00:01

Oops!

I figured out that there are files in my tt-rss/lock folder, I deleted them and it's working now
Sorry, stupid me

scottjl
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 17 Mar 2013, 21:51

Re: Periodic releases are over

Postby scottjl » 04 Feb 2015, 23:17

Liked your script a lot cktt, added a bit onto it, including stopping and starting the update daemon and backing up the installation before updating. I run this nightly through cron. I run this on Ubuntu, so folk might need to tweak it for other distros.

Code: Select all

#!/bin/bash
DIRGIT=/path/to/git/folder
DIRTT=/path/to/website
DIRBK=/path/to/backups
DATE=`date %F`

#shut down the update daemon
/sbin/start-stop-daemon -K -p $DIRTT/lock/update_daemon.lock

#back up current install, delete backups older than 2 weeks
tar cf $DIRBK/tt-rss-${DATE}.tar $DIRTT
find $DIRBK -mtime +14 -exec rm {} \;

#pull down from git and copy updated files only
cd $DIRGIT
git pull
if [ $? != 0 ] ; then
# copy only modified files, except git related
    rsync -rvch --exclude=.git/ --exclude=.buildpath --exclude=.gitignore --exclude=.project $DIRGIT/ $DIRTT

# always use new config file, maybe there are new parameters
    cp $DIRTT/config.php-dist $DIRTT/config.php

# change config file to personalized settings
    sed -i "/DB_TYPE/ s/pgsql/mysql/" $DIRTT/config.php
    sed -i "/DB_USER/ s/fox/MYDBUSER/" $DIRTT/config.php
    sed -i "/DB_NAME/ s/fox/MYDBNAME/" $DIRTT/config.php
    sed -i "/DB_PASS/ s/XXXXXX/MYUSERPASS/" $DIRTT/config.php
    sed -i "/DB_PORT/ s/''/'3306'/" $DIRTT/config.php
    sed -i "/SELF_URL_PATH/ s/example.org\/tt-rss/MYWEBSITE/" $DIRTT/config.php
    sed -i "/REG_NOTIFY_ADDRESS/ s/user@your.domain.dom/MYNOTIFYADDRESS/" $DIRTT/config.php
    sed -i "/SESSION_COOKIE_LIFETIME/ s/86400/MYCOOKIELIFETIME/" $DIRTT/config.php
    sed -i "/SMTP_FROM_ADDRESS/ s/reply@your.domain.dom/MYREPLYADDRESS/" $DIRTT/config.php
    sed -i "/FEED_CRYPT_KEY/ s/''/'MYCRYPTKEY'/" $DIRTT/config.php
    sed -i "/SIMPLE_UPDATE_MODE/ s/false/true/" $DIRTT/config.php
fi

# start the update daemon
/sbin/start-stop-daemon -b -c www-data:www-data -S -x /usr/bin/php $DIRTT/update_daemon2.php -- --feeds --quiet

cktt
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 04 Jun 2014, 19:42

Re: Periodic releases are over

Postby cktt » 05 Feb 2015, 22:30

Nice tweaks scottjl, thanks!

dswd
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 06 Feb 2015, 19:10

Re: Periodic releases are over

Postby dswd » 06 Feb 2015, 19:26

Hi, I have been using tt-rss for quite some time now. I am self-hosting a lot of software and try to keep my server updated to avoid security issues.
I don't mind using git, I use it on my own projects a lot. However I currently don't see a way to keep my server updated in a secure way using only git.
I don't want to automatically update via git because that gives me no way to review code changes. This option essentially gives anyone with commit permissions full control over my server. I also don't have enough time to watch github commits to see if there is some security fix burried in the commit logs.
If you want to abandon tarball releases and move to git fine, but please establish a way to inform users of security problems. I recommend using an rss feed for that. ;-)

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Periodic releases are over

Postby fox » 06 Feb 2015, 20:10

hello, dswd. welcome to our forums. this may come as a surprise but you are really fucking dumb. sorry.

let's go through your dumb post:

1. an SCM where you can see per-changeset diffs somehow gives you no way to "review code changes" but downloading a huge-ass tarball once a few months with god knows how many changes instead does. this is profoundly retarded thing to say in itself, i mean it's just so fucking dumb it makes my head hurt.

i'm sure before updating the tarball-updater way you made a unified diff of tt-rss-old and tt-rss-new and went through it by hand, you luddite. that is, while actually being capable of understanding the actual changes and their underlying reasoning. otherwise you're just shitting me with all this crap about security issues you allegedly care so much about.

1A. as a sidenote, i have significant doubts that you have the capacity of reviewing shit. lol.
1B. i'm not going to get into the apparent false dichotomy of an SCM forcing you to do unattended upgrades for some reason because, well, why bother.

2. anyway, if you read the op before posting retarded shit itt, you'd know that "releases" in tt-rss sense had always been nothing more than trunk snapshots made when i sorta-kinda felt like it. i.e. the exact same fucking code committed by people with exact same commit rights (that is, me) only delivered to you at random intervals and in a highly inefficient way.

which brings us to 3:

3. so, i guess what i'm saying is, instead of trying to ;) recommend me anything ;), you should stop and rethink your life of apparent ignorance and inability to reason which led you to the point whereas you made the above post in this here thread, forumposter dswd.

but wait, there's more:

4. fortunately, luckily for you, despite the absolute idiocy wrt anything related to securing your personal data, i can absolutely guarantee you that nobody in the world fucking cares about your rss feeds, so you are absolutely safe. so there's that at least. you can revel in joy being saved by your own insignificance.

i'm not sure why so many of your ~i'm gonna host my own shit for privacy and owning big corporations~ types are so hilariously dumb but lol if you think you're the first one and sadly i know you're not the last one.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest