Upgrading gogs on CentOS 6 to gitea 1.0.0 #214

Closed
opened 2025-11-02 03:14:05 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @RichieB2B on GitHub (Jan 9, 2017).

I just went through the process of upgrading gogs 0.9.97 to gitea 1.0.0. Since I used the RPM to install gogs I needed to modify several things to get things working.

I started following this guide, but soon realized all you need from there is:

cp -r gitea-v1.0.0/options /opt/gogs/options

Interestingly enough that guide does not tell you to install the gitea binary, which I installed as /opt/gogs/gitea-1.0.0-linux-amd64

The only real problem is that the gitea binary is linked against glibc 2.14:

$ ./gitea-1.0.0-linux-amd64 web
./gitea-1.0.0-linux-amd64: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./gitea)

The solution for this is to install glibc 2.14 in /opt.

To load the new libc I created a new script /opt/gogs/gogs (replaces the old gogs binary):

#!/bin/sh

LD_LIBRARY_PATH=/opt/glibc-2.14/lib /opt/gogs/gitea-1.0.0-linux-amd64 "$@"

I linked this file to /opt/gogs/gitea because gitea writes this path in ~/.ssh/authorized_keys

ln -s /opt/gogs/gogs /opt/gogs/gitea

After this gitea is a true drop-in replacement for gogs. Perhaps this above can be documented somewhere.

Originally created by @RichieB2B on GitHub (Jan 9, 2017). I just went through the process of upgrading gogs 0.9.97 to gitea 1.0.0. Since I used the RPM to install gogs I needed to modify several things to get things working. I started following [this guide](https://docs.gitea.io/en-us/upgrade-from-gogs/), but soon realized all you need from there is: ``` cp -r gitea-v1.0.0/options /opt/gogs/options ``` Interestingly enough that guide does not tell you to [install the gitea binary](https://docs.gitea.io/en-us/install-from-binary/), which I installed as `/opt/gogs/gitea-1.0.0-linux-amd64` The only real problem is that the gitea binary is linked against glibc 2.14: ``` $ ./gitea-1.0.0-linux-amd64 web ./gitea-1.0.0-linux-amd64: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./gitea) ``` The [solution](http://unix.stackexchange.com/questions/176489/how-to-update-glibc-to-2-14-in-centos-6-5) for this is to install glibc 2.14 in /opt. To load the new libc I created a new script `/opt/gogs/gogs` (replaces the old gogs binary): ``` #!/bin/sh LD_LIBRARY_PATH=/opt/glibc-2.14/lib /opt/gogs/gitea-1.0.0-linux-amd64 "$@" ``` I linked this file to /opt/gogs/gitea because gitea writes this path in ~/.ssh/authorized_keys ``` ln -s /opt/gogs/gogs /opt/gogs/gitea ``` After this gitea is a true drop-in replacement for gogs. Perhaps this above can be documented somewhere.
GiteaMirror added the type/docs label 2025-11-02 03:14:05 -06:00
Author
Owner

@tboerger commented on GitHub (Jan 9, 2017):

For 1.1.0 we will provide binaries without the glibc requirement. Beside that we still want to provide proper rpms for the major distros and this will also resolve this issue

@tboerger commented on GitHub (Jan 9, 2017): For 1.1.0 we will provide binaries without the glibc requirement. Beside that we still want to provide proper rpms for the major distros and this will also resolve this issue
Author
Owner

@lunny commented on GitHub (Jan 10, 2017):

So we need a document update to close this issue?

@lunny commented on GitHub (Jan 10, 2017): So we need a document update to close this issue?
Author
Owner

@tboerger commented on GitHub (Jan 10, 2017):

@lunny at least we should add a note to the docs for now

@tboerger commented on GitHub (Jan 10, 2017): @lunny at least we should add a note to the docs for now
Author
Owner

@RichieB2B commented on GitHub (Jan 12, 2017):

I modified my solution slightly because after gitea rebuilds /home/gogs/.ssh/authorized_keys it puts /opt/gogs/gitea in there. So this needs to be a wrapper script as well.

@RichieB2B commented on GitHub (Jan 12, 2017): I modified my solution slightly because after gitea rebuilds /home/gogs/.ssh/authorized_keys it puts /opt/gogs/gitea in there. So this needs to be a wrapper script as well.
Author
Owner

@donguidou commented on GitHub (Jan 12, 2017):

The nightly builds still require glibc-2.14.

@donguidou commented on GitHub (Jan 12, 2017): The nightly builds still require glibc-2.14.
Author
Owner

@tboerger commented on GitHub (Jan 16, 2017):

The nightly builds still require glibc-2.14.

Of course, because the issue is not resolved yet.

@tboerger commented on GitHub (Jan 16, 2017): > The nightly builds still require glibc-2.14. Of course, because the issue is not resolved yet.
Author
Owner

@lunny commented on GitHub (Jan 25, 2017):

Is there any docs updated to close this?

@lunny commented on GitHub (Jan 25, 2017): Is there any docs updated to close this?
Author
Owner

@tboerger commented on GitHub (Mar 7, 2017):

The upcoming release 1.1.0 won't depend on glibc anymore because of https://github.com/go-gitea/gitea/pull/985

@tboerger commented on GitHub (Mar 7, 2017): The upcoming release 1.1.0 won't depend on glibc anymore because of https://github.com/go-gitea/gitea/pull/985
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#214