Skip to main content


Git Upgrade of Friendica


!Friendica Support Hi, I want to upgrade my Friendica server.
I changed to `/var/www/friendica` and executed
`git config --global --add safe.directory /var/www/friendica`
then
`git pull`
`Updating f660c3894..2dbfb0700`
unfortunately, I got the:
`error: Your local changes to the following files would be overwritten by merge:
.codecov.yml
.editorconfig
.github/ISSUE_TEMPLATE/feature_request.md
.gitignore
...
Aborting`
My current version is Friendica 'Siberian Iris' 2022.03 - 1452.
What can I do?
Best, Robert
in reply to Robert Winkler

/var/www/friendica# git pull
fatal: detected dubious ownership in repository at '/var/www/friendica'
To add an exception for this directory, call:

git config --global --add safe.directory /var/www/friendica

in reply to Roland Häder

@Roland Häder @Robert Winkler Thanks for the warning. I'm aware of the danger. Is there an alternative; or a recommended, save, proceedure? E.g., 'git pull' as a user, inspect, chown, etc.?

Friendica Support reshared this.

in reply to Robert Winkler

@Robert Winkler @Robert Winkler Yes, there is an alternative way. I don't know your server setup to well, so I can only tell you from mine. For each domain (e.g. haeder.net) I have a "virtual user", e.g. vuXXXX by XXXX is a 4-digit number. If I need shell access to it, I login as a normal user to my server, then run sudo su - vuXXXX to change into that user and then change to the sub domain's path. Then there I execute git pull and so on.

Friendica Support reshared this.

in reply to Robert Winkler

@Robert Winkler
it depends on why you have changes in tracked file? you need the changes?

no : ( would recommend this)

# this will reset your checkout at the current version in your HEAD,
# in your case I would say to commit f660c3894
git reset --hard HEAD 
git pull

yes: (but it can fail)
git stash #  this will save your changes in 'stash'
git pull
git stash pop  #  this will reapply your changes on top of new code. can fail
in reply to Robert Winkler

@Robert Winkler @Fabio I tried method 1 (no:), but now my instance is not funcional anymore:
"This page isn’t working mexico-pensante.blog is currently unable to handle this request.
HTTP ERROR 500"

the config looks fine (admin email, SQL).

from /var/mail/root:
"PHP Warning: require(/var/www/friendica/vendor/composer/../../boot.php): failed to open stream: No such file or directory in /var/www/friendica/vendor/composer/autoload_real.php on line 69
PHP Fatal error: require(): Failed opening required '/var/www/friendica/vendor/composer/../../boot.php' (include_path='.:/usr/share/php') in /var/www/friendica/vendor/composer/autoload_real.php on line 69
"

Any idea?

in reply to Robert Winkler

@Robert Winkler @Robert Winkler
from https://friendi.ca/2023/05/23/friendica-2023-05-released/ , "How To Update", "Using Git":

cd friendica
git pull
bin/composer.phar install --no-dev
cd addon
git pull

I think the first two command are done.
Now you have to update dependencies with composer, and update addons

Friendica 2023.05 released

We are very happy to announce the availability of the new stable release of Friendica “Giant Rhubarb” 2023.05. This release contains a security fix of a problem Kirk Strauser (honeypot.net) pointed out, we strongly encourage all admins to update their nodes. The highlights of this release are

  • the Tumblr connector was improved and an initial bluesky connector was added,
  • the search for @-handles was fixed,
  • the emoji picker was moved to the core, and
  • the display of images in is now done using fancybox by default.

For details, please the CHANGELOG file in the repository.

What is Friendica


Friendica is a decentralized communications platform, you can use to host your own social media server that integrates with independent social networking platforms (like the Fediverse or Diaspora*) but also some commercial ones like Tumblr.

How to Update

Updating from old Friendica versions


If you are updating from an older version than the 2022.12 release, please first update your Friendica instance to that version as it contained some breaking changes.

Pre-Update Procedures


Ensure that the last backup of your Friendica installation was done recently.

Using Git


Updating from the git repositories should only involve a pull from the Friendica core repository and addons repository, regardless of the branch (stable or develop) you are using. Remember to update the dependencies with composer as well. So, assuming that you are on the stable branch, the commands to update your installation to the 2023.05 release would be
cd friendicagit pullbin/composer.phar install --no-devcd addongit pull
If you want to use a different branch than the stable one, you need to fetch and checkout the branch before your perform the git pull.

Pulling in the dependencies with composer will show some deprecation warning, we will be working on that in the upcoming release.

Using the Archive Files


If you had downloaded the source files in an archive file (tar.gz) please download the current version of the archive from friendica-full-2023.05.tar.gz (sha256) and friendica-addons 2023.05.tar.gz (sha256)) and unpack it on your local computer.

As many files got deleted or moved around, please upload the unpacked files to a new directory on your server (say friendica_new) and copy over your existing configuration (config/local.config.php and config/addon.config.php) and .htaccess files. Afterwards rename your current Friendica directory (e.g. friendica) to friendica_old and friendica_new to friendica.

The files of the dependencies are included in the archive (make sure you are using the friendica-full-2023.05 archive), so you don’t have to worry about them.

Post Update Tasks


The database update should be applied automatically, but sometimes it gets stuck. If you encounter this, please initiate the DB update manually from the command line by running the script
bin/console dbstructure update
from the base of your Friendica installation. If the output contains any error message, please let us know using the channels mentioned below.

Please note, that some of the changes to the database structure will take some time to be applied, depending on the size of your Friendica database.

Known Issues


At the time of writing this, none

How to Contribute


If you want to contribute to the project, you don’t need to have coding experience. There are a number of tasks listed in the issue tracker with the label “Junior Jobs” we think are good for new contributors. But you are by no means limited to these – if you find a solution to a problem (even a new one) please make a pull request at github or let us know in the development forum.

Contribution to Friendica is also not limited to coding. Any contribution to the documentation, the translation or advertisement materials is welcome or reporting a problem. You don’t need to deal with Git(Hub) or Transifex if you don’t like to. Just get in touch with us and we will get the materials to the appropriate places.

Thanks everyone who helped making this release possible and have fun!

#release

https://friendi.ca/2023/05/23/friendica-2023-05-released/