32
41
Fork
You've already forked website
52

Upgrading from gitea is not as straightforward as currently stated #87

Closed
opened 2023年02月06日 00:13:38 +01:00 by Eragon · 5 comments

The installation/upgrade tutorial state this

Forgejo is a fully-compatible drop-in replacement for Gitea.
When migrating from Gitea to the Forgejo release with the same release number (eg from Gitea v1.18 to Forgejo v1.18), all that is necessary is to replace the Gitea binary with the Forgejo binary (or change the container image).
When upgrading to Forgejo from an older version of Gitea, please follow the upgrade instructions in the Gitea documentation.

But this is not true.
If you don't place the Forgejo binary as gitea but as forgejo like almost everyone will do.
This will break all existing hooks in all existing repos, because the hooks directly link back to the gitea binary.

I suggest that we add something like:

After migrating you should run the repair hooks task.

This issue was found at the same time as this one (I have a friend that had issues to migrate because of that)

The installation/upgrade tutorial state this ``` Forgejo is a fully-compatible drop-in replacement for Gitea. When migrating from Gitea to the Forgejo release with the same release number (eg from Gitea v1.18 to Forgejo v1.18), all that is necessary is to replace the Gitea binary with the Forgejo binary (or change the container image). When upgrading to Forgejo from an older version of Gitea, please follow the upgrade instructions in the Gitea documentation. ``` But this is not true. If you don't place the Forgejo binary as `gitea` but as `forgejo` like almost everyone will do. This will break all existing hooks in all existing repos, because the hooks directly link back to the gitea binary. I suggest that we add something like: ``` After migrating you should run the repair hooks task. ``` This issue was found at the same time as [this one ](https://codeberg.org/forgejo/forgejo/issues/326) (I have a friend that had issues to migrate because of that)
Contributor
Copy link

This deserves an entry in the FAQ. Although a conservative admin will likely use the same name for the binary of an existing installation or make a hard link just in case, it is probably not uncommon to assume the file name of the binary is not inserted in various unexpected places that make it difficult to rename it or move it around.

This deserves an entry in the FAQ. Although a conservative admin will likely use the same name for the binary of an existing installation or make a hard link just in case, it is probably not uncommon to assume the file name of the binary is not inserted in various unexpected places that make it difficult to rename it or move it around.
Member
Copy link

Actually, this point is also valid when upgrading from a Forgejo version to another or from a Gitea version to another, because of version numbers in binary names.

I guess renaming is an option, but then you loose the simple ability to know which Forgejo version you're running using ls.

So I use a symlink instead. When updating, I do this :

aria2c <binary>
rm <symlink>
ln -s <binary> <symlink>
./<binary>

Which is why I said in forgejo/meta#69 that my migration didn't require additional steps, but I realize I forgot to mention that I already had a bulletproof procedure 😅

Actually, this point is also valid when upgrading from a Forgejo version to another or from a Gitea version to another, because of version numbers in binary names. I guess renaming is an option, but then you loose the simple ability to know which Forgejo version you're running using `ls`. So I use a symlink instead. When updating, I do this : ```bash aria2c <binary> rm <symlink> ln -s <binary> <symlink> ./<binary> ``` Which is why I said in [`forgejo/meta#69`](/forgejo/meta/issues/69) that my migration didn't require additional steps, but I realize I forgot to mention that I already had a bulletproof procedure 😅

I also added a symlink from forgejo to gitea so I didn't run into any issues either. It's worth noting that my gitea binary was always a symlink to the binary with the latest version number. The only thing that changed in my setup is that forgejo became a symlink to the latest version and gitea became a symlink to forgejo

I also added a symlink from `forgejo` to `gitea` so I didn't run into any issues either. It's worth noting that my `gitea` binary was always a symlink to the binary with the latest version number. The only thing that changed in my setup is that `forgejo` became a symlink to the latest version and `gitea` became a symlink to `forgejo`
Member
Copy link

I didn't even bother renaming.

I didn't even bother renaming.
Author
Copy link

Upgrading by using system packages is a common way to do this, most admins will simply take the package from their database repos.

Upgrading by using system packages is a common way to do this, most admins will simply take the package from their database repos.
Sign in to join this conversation.
No Branch/Tag specified
main
monthly-2026-05
mahlzahn-eslint-js
preview-link-status
nightfire
2022年12月14日-main
No results found.
Labels
Clear labels
404
Broken links or missing content
Accessibility
Accessibility
Blog post
Documentation
Forgejo Documentation
Internationalisation
i18n and l10n
User research - Accessibility
Requires input about accessibility features, likely involves user testing.
User research - Blocked
Do not pick as-is! We are happy if you can help, but please coordinate with ongoing redesign in this area.
User research - Community
Community features, such as discovering other people's work or otherwise feeling welcome on a Forgejo instance.
User research - Config (instance)
Instance-wide configuration, authentication and other admin-only needs.
User research - Errors
How to deal with errors in the application and write helpful error messages.
User research - Filters
How filter and search is being worked with.
User research - Future backlog
The issue might be inspiring for future design work.
User research - Git workflow
AGit, fork-based and new Git workflow, PR creation etc
User research - Labels
Active research about Labels
User research - Moderation
Moderation Featuers for Admins are undergoing active User Research
User research - Needs input
Use this label to let the User Research team know their input is requested.
User research - Notifications/Dashboard
Research on how users should know what to do next.
User research - Rendering
Text rendering, markup languages etc
User research - Repo creation
Active research about the New Repo dialog.
User research - Repo units
The repo sections, disabling them and the "Add more" button.
User research - Security
User research - Settings (in-app)
How to structure in-app settings in the future?
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/website#87
Reference in a new issue
forgejo/website
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?