-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updater Command #17405
Comments
Is it really necessary? If you use some package managers, or use Docker, it's much easier to update, just one command. Even if you write a script like |
@wxiaoguang You are clearly very experienced linux user on the command line. The likelyhood of people ragequitting or set and forget after the first update completed is pretty high... Small after edit: For you it might be simple. But if it is easier to update the entire server then gitea itself then I think there is a problem. (apt update & apt upgrade vs what gitea requires...) |
Due to the many different ways gitea can be deployed, adding a What is doable is adding a script that simplifies this process into the For example, here's a barebones script I use for updating plain no-package-manager installations on linux with systemd. (disclaimer: I personally won't provide further support for this.) #!/bin/bash
set -e
# this is an upgrade script, for gitea deployed on linux as systemd service
# depends on: curl, xz, sha256sum, gpg
# assumes to be run by the gitea user.
# make changes to the variables below for your local setup
giteaversion=1.15.5
giteabin=/usr/local/bin/gitea
giteahome=/var/lib/gitea
giteauser="git"
giteacmd="sudo -u $giteauser $giteabin -c /etc/gitea/app.ini -w $giteahome"
binname=gitea-${giteaversion}-linux-amd64
# download new binary
binurl="https://dl.gitea.io/gitea/${giteaversion}/${binname}.xz"
echo downloading $binurl
cd $giteahome # needed for gitea dump later
curl -sSfL "$binurl" > ${binname}.xz
curl -sSfL "${binurl}.sha256" > ${binname}.xz.sha256
curl -sSfL "${binurl}.asc" > ${binname}.xz.asc
# validate checksum & gpg signature (exit script if error)
sha256sum -c ${binname}.xz.sha256
gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
gpg --verify ${binname}.xz.asc ${binname}.xz
rm ${binname}.xz.{sha256,asc}
# unpack binary + make executable
xz -d ${binname}.xz
chmod +x $binname
# stop gitea, create backup, replace binary, restart gitea
$giteacmd manager flush-queues
systemctl stop gitea
$giteacmd --version
$giteacmd dump
mv -fb $binname $giteabin
systemctl start gitea |
@noerw yeah that is a reason why it isn't supported. About this script, yeah that is a nice script that at least can be worked with. And ofc you should learn more or at least the essentials, but honestly, trying to blindly filter out all the information that is provided, blindly meaning no real knowledge, is kinda hard. But it should be done. I mean I could expand this much much further, but that is outside of the scope at this point. Small edit: This is more of a user-friendliness request... |
For update checker, we already have it in the main branch: #17212 Add simple update checker to Gitea. |
@wxiaoguang so can i hit a "update button" when i enable this "update checker" or use a "update command"? |
As explained above, if you installed Gitea with some package managers like apt/yum/dnf/snap or Docker, you can not make the app update itself, it will break the package management badly. And remember that Gitea runs in Windows, a running Windows app can not update itself easily, it needs some hacky method. In a short word: |
Since when is it possible to install gitea with "apt". When I installed it that wasn't possible... From asking and trying... |
Then this whole issue is no longer needed if apt support is a thing... |
I haven't heard of |
Yeah, our snap is auto updating |
More work had been done in this issue, so this issue can be closed I think. PR and documents are welcome |
Feature Description
Hello,
I would love a small quality of life change to gitea.
Updating is a pain when you are not really sure of how to work with linux or command line.
As of right now, from what i was told/found, you have to download the binaries, replace it with the original and restart.
The annoying part is to find out what exactly you have to type in to get to that point, and hoping you are not breaking something in the process.
What I wish that would exists is a command called: "gitea update -####" (# => version number)
where it would download the desired gitea version and installing a new one. You still have to manually restart gitea that I have no problem with because that's quite easy.
(Maybe for extra security it throws the dump command before hand too.. but that is debateable)
But I wonder why this doesn't already exists?
It reduces the possibility of issues quite a bit, especially to people who are new to linux and rather stay on a existing version and not fix security flaws because they are scared to update or delay it because they don't want to deal with the extra steps.
Any opinion on this?
Screenshots
No response
The text was updated successfully, but these errors were encountered: