Periodic releases are over

Development-related discussion, including bundled plugins
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 » 10 Feb 2015, 20:02

>And here I thought you assume the users of your software know what they are doing.

lmao are you for real

>Did you make up your mind on monthly auto-tagging?

it's a definite no

came88
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 18 Feb 2015, 20:22

Re: Periodic releases are over

Postby came88 » 18 Feb 2015, 21:29

Hi, I've modified the script from cktt and scottjl in order to backup also the database before updating tt-rss.
This version does nothing if there is no need to update, otherwise it performs backups and restart the update daemon (but only if it was already running).
I didn't test the backup part on PostgreSQL (I'm using mysql), I hope there are no problems with it.
I'm using it under Debian without problems, maybe you need to modify something in your environment.
You may need to add other configuration changes in the sed section.

Code: Select all

#!/bin/bash

### CONFIGURATIONS ###

# Directory configuration
DIRGIT=/path/to/git/folder
DIRTT=/path/to/website
DIRBK=/path/to/backups

# Database configurations
DB_TYPE="MYDBTYPE" # pgsql or mysql
DB_HOST="MYDBHOST"
DB_USER="MYDBUSER"
DB_NAME="MYDBNAME"
DB_PASS="MYDBPASS"
DB_PORT="MYDBPORT"

# Other configurations
SELF_URL_PATH="http://MYWEBSITE/PATH/"
REG_NOTIFY_ADDRESS="MYNOTIFYADDRESS"
SMTP_FROM_ADDRESS="MYREPLYADDRESS"
FEED_CRYPT_KEY="MYCRYPTKEY"


### SCRIPT ###

DATE=$(date +%F)

# check if the daemon is running
if [ -f "$DIRTT/lock/update_daemon.lock" ] ; then
   STARTSTOPDAEMON="true"
else
   STARTSTOPDAEMON="false"
fi

cd $DIRGIT
git fetch origin
reslog=$(git log HEAD..origin/master --oneline)
if [[ "${reslog}" != "" ]] ; then
   # there are new changes: completing the pull
   git merge origin/master

   # shut down the update daemon if needed
   $($STARTSTOPDAEMON) && /sbin/start-stop-daemon -K -p $DIRTT/lock/update_daemon.lock

   cd $(dirname $DIRTT)
   # back up current install files...
   tar -czf $DIRBK/tt-rss-${DATE}.tar.gz $(basename $DIRTT)
   # ... and database...
   if [ "$DB_TYPE" == "mysql" ] ; then
      MYSQL_PWD="$DB_PASS"  mysqldump  -h $DB_HOST -P $DB_PORT -u $DB_USER $DB_NAME | gzip > $DIRBK/tt-rss-${DATE}.sql.gz
   else
      PGPASSWORD="$DB_PASS" pg_dump -w -h $DB_HOST -p $DB_PORT -U $DB_USER $DB_NAME | gzip > $DIRBK/tt-rss-${DATE}.sql.gz
   fi
   # ... and delete backups older than 2 weeks
   find $DIRBK -mtime +14 -exec rm {} \;

   # 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
   # change config file to personalized settings
   sed $DIRGIT/config.php-dist -f - <<-SED_SCRIPT > $DIRTT/config.php
      /DB_TYPE/               s/pgsql/$DB_TYPE/
      /DB_HOST/               s/localhost/$DB_HOST/
      /DB_USER/               s/fox/$DB_USER/
      /DB_NAME/               s/fox/$DB_NAME/
      /DB_PASS/               s/XXXXXX/$DB_PASS/
      /DB_PORT/               s/''/'$DB_PORT'/
      /SELF_URL_PATH/         s#http://example.org/tt-rss/#$SELF_URL_PATH#
      /REG_NOTIFY_ADDRESS/    s/[email protected]/$REG_NOTIFY_ADDRESS/
      /SMTP_FROM_ADDRESS/     s/[email protected]/$SMTP_FROM_ADDRESS/
      /FEED_CRYPT_KEY/        s/''/'$FEED_CRYPT_KEY'/
   SED_SCRIPT

   # start the update daemon if needed
   $($STARTSTOPDAEMON) && /sbin/start-stop-daemon -b -c www-data:www-data -S -x /usr/bin/php $DIRTT/update_daemon2.php -- --feeds --quiet
fi

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

Re: Periodic releases are over

Postby scottjl » 19 Feb 2015, 06:08

Hey, thanks!

User avatar
ebell451
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 15 Mar 2013, 15:06
Contact:

Re: Periodic releases are over

Postby ebell451 » 28 Feb 2015, 01:33

Latimer wrote:Additionally, for those missing tarballs, there is a big button on a github page that offers anyone to "Download the contents of gothfox/Tiny-Tiny-RSS as a zip file". Press it and make your own tarball whenever you feel like it.


For those interested in the process/steps needed to perform an update without git clones/pulls or can't/don't want it scripted, here are the steps that I used:

    1. Backup your database, I happen to use phpMyAdmin
    2. Click the "Download Zip" button on the GitHub (https://github.com/gothfox/Tiny-Tiny-RSS) website
    3. Rename/copy/backup your tt-rss folder (as a backup)
    4. Upload/extract the zip file to your tt-rss folder
    5. Copy the config.php file, feed-icons folder, and any custom or downloaded plugins (these had to be re-uploaded during the old process as well)
    6. You can either compare the config.php and config.php-dist files to see any changes or you can simply try logging in and see if you get any error messages that will lead you to what needs adding/changing
I am surprised to see the number of people that are intimidated by this process or don't want to put the effort into "the new way" for such a valuable application. If you can get it up in running in the first place, this should not be an issue. Just remember not to mess with the database, backup your existing setup and you should be fine. All told, the update process took less than 10 minutes.

jwhipp
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 28 Feb 2015, 02:24

Re: Periodic releases are over

Postby jwhipp » 28 Feb 2015, 02:27

I just wanted to clarify, the upgrade process is basically:

Code: Select all

git fetch --all
git pull


Log in as admin to handle database upgrades.

That all sound legit?

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 » 28 Feb 2015, 05:33

jwhipp wrote:I just wanted to clarify, the upgrade process is basically:

Code: Select all

git fetch --all
git pull


Log in as admin to handle database upgrades.

That all sound legit?

No, just git pull: http://stackoverflow.com/questions/2923 ... -git-fetch

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 » 28 Feb 2015, 10:20

ebell451 wrote:
Latimer wrote:Additionally, for those missing tarballs, there is a big button on a github page that offers anyone to "Download the contents of gothfox/Tiny-Tiny-RSS as a zip file". Press it and make your own tarball whenever you feel like it.


For those interested in the process/steps needed to perform an update without git clones/pulls or can't/don't want it scripted, here are the steps that I used:

    1. Backup your database, I happen to use phpMyAdmin
    2. Click the "Download Zip" button on the GitHub (https://github.com/gothfox/Tiny-Tiny-RSS) website
    3. Rename/copy/backup your tt-rss folder (as a backup)
    4. Upload/extract the zip file to your tt-rss folder
    5. Copy the config.php file, feed-icons folder, and any custom or downloaded plugins (these had to be re-uploaded during the old process as well)
    6. You can either compare the config.php and config.php-dist files to see any changes or you can simply try logging in and see if you get any error messages that will lead you to what needs adding/changing
I am surprised to see the number of people that are intimidated by this process or don't want to put the effort into "the new way" for such a valuable application. If you can get it up in running in the first place, this should not be an issue. Just remember not to mess with the database, backup your existing setup and you should be fine. All told, the update process took less than 10 minutes.


why would you do all that instead of typing literally one command i just don't understand

User avatar
ebell451
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 15 Mar 2013, 15:06
Contact:

Re: Periodic releases are over

Postby ebell451 » 01 Mar 2015, 21:42

fox, fox, fox...why do you ask questions like this? Because some of use like to do things the hard way. I will tell you the truth, but the answer will probably not be desirable. My setup is on a shared hosting provider, so I was talking to "that group" of users. Yes, I'm one of those users.

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 » 01 Mar 2015, 23:40

you would probably be better off git syncing someplace better equipped and rsyncing to your shit hosting.

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 Mar 2015, 02:58

ebell451 wrote:fox, fox, fox...why do you ask questions like this? Because some of use like to do things the hard way. I will tell you the truth, but the answer will probably not be desirable. My setup is on a shared hosting provider, so I was talking to "that group" of users. Yes, I'm one of those users.

My shared hosting provider provides git. Lucky me I guess.

User avatar
ebell451
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 15 Mar 2013, 15:06
Contact:

Re: Periodic releases are over

Postby ebell451 » 02 Mar 2015, 04:46

fox wrote:you would probably be better off git syncing someplace better equipped and rsyncing to your shit hosting.


thanks for the suggestion...yes, it may be shit hosting, but there are advantages to shared hosting sites [blasphemy on this site, I know] as well as some disadvantages

HunterZ wrote:My shared hosting provider provides git. Lucky me I guess.


I've since found out that my host provides git as well.

slooper
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 02 Mar 2015, 21:40

Re: Periodic releases are over

Postby slooper » 02 Mar 2015, 23:39

Its sad to see you're forcing users to use git to update your software. Probably i am one of a few users installing TT-RSS from Linux repositories provided by my distribution. This way provides me with a simple solution to keep up to date with my whole system (and its web applications) without having to jump from directory to directory running git commands.

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 Mar 2015, 23:56

slooper wrote:Its sad to see you're forcing users to use git to update your software. Probably i am one of a few users installing TT-RSS from Linux repositories provided by my distribution. This way provides me with a simple solution to keep up to date with my whole system (and its web applications) without having to jump from directory to directory running git commands.


well, aren't you just the most precious thing?

in any event, if you're using the linux repositories, then go to them whenever something messes up, neither tarballs nor git are applicable to your misapplication.

shoo.

slooper
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 02 Mar 2015, 21:40

Re: Periodic releases are over

Postby slooper » 03 Mar 2015, 01:52

sleeper_service wrote:
well, aren't you just the most precious thing?

in any event, if you're using the linux repositories, then go to them whenever something messes up, neither tarballs nor git are applicable to your misapplication.

shoo.


I am not talking about the tarballs or anything else. It does not matter how you ship your software. The fact that there will be no more versions of this software makes it somewhat hard to keep it in Linux repositories.

JustAMacUser
Bear Rating Overlord
Bear Rating Overlord
Posts: 373
Joined: 20 Aug 2013, 23:13

Re: Periodic releases are over

Postby JustAMacUser » 03 Mar 2015, 03:53

slooper wrote:The fact that there will be no more versions of this software makes it somewhat hard to keep it in Linux repositories.


No, it doesn't. There are still builds based on the most recent Git commit.

Also, repository maintainers often affix their own version codes separate from the main code base so they can backport fixes or tweak other aspects of the code.

Again, folks, after the initial setup we are literally talking about entering TWO words into a shell and pressing return.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 9 guests