Skip to content
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

Provide releases and deb/rpm packages via Bintray #31

Closed
tboerger opened this issue Nov 3, 2016 · 113 comments
Closed

Provide releases and deb/rpm packages via Bintray #31

tboerger opened this issue Nov 3, 2016 · 113 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile topic/deployment

Comments

@tboerger
Copy link
Member

tboerger commented Nov 3, 2016

I would like to integrate a proper process to create real system packages and distribute them via Bintray, than users can just add a deb/rpm repository and got a clean upgrade path.

Beside that we can also publish our releases to a static page or also to Bintray for download.

@tboerger tboerger added the type/enhancement An improvement of existing functionality label Nov 3, 2016
@tboerger tboerger added this to the 1.0.0 milestone Nov 3, 2016
@metalmatze
Copy link
Contributor

Do we really need deb/rpm? Aren't just docker images enough? Idk, prove me wrong! :)

@metalmatze
Copy link
Contributor

drone only has docker images, right?

@jhasse
Copy link

jhasse commented Nov 3, 2016

Gogs is using packager.io, why not reuse that?

@tboerger
Copy link
Member Author

tboerger commented Nov 3, 2016

Because not everybody is/will use docker.

Packager.io only supports lts versions, beside that the golang packaging can be done much easier than with the overhead of Packager.io.

@jhasse
Copy link

jhasse commented Nov 3, 2016

Okay I don't know enough about Go. But having a solution for Ubuntu 16.04 would be great, as gogs/gogs#3617 didn't get merged :(

@tboerger
Copy link
Member Author

tboerger commented Nov 3, 2016

To provide packages for any ubuntu/debian/whatever version we can wrap the same binary into the package and just need to adjust the init (sysvinit, systemd) script.

@jhasse
Copy link

jhasse commented Nov 3, 2016

Can we merge the 16.04 packager.io PR and enable gitea on it for the time being though?

@lunny
Copy link
Member

lunny commented Nov 3, 2016

Both binary and docker are needed.

@tboerger
Copy link
Member Author

tboerger commented Nov 3, 2016

Can we merge the 16.04 packager.io PR and enable gitea on it for the time being though?

We don't have enabled anything over there yet, but since this issue is estimated for 1.0.0 I would like to introduce it for our first release.

@sbrl
Copy link

sbrl commented Nov 17, 2016

I also would like binary releases - I don't have a go development environment setup to compile things.

Also, will I be able to upgrade to gitea from gogs? I'd hate to loose my issues etc.

@tboerger
Copy link
Member Author

We will have binary releases and hopefully also packages for the major Linux distributions. You don't need to compile anything.

We will also have binaries for the latest master version.

You will be able to directly launch gitea with the Gogs database. If we got database changes they are getting automatically migrated.

@sbrl
Copy link

sbrl commented Nov 17, 2016

Ooh sounds awesome! I'm looking forward to it then ☺

-- Starbeamrainbowlabs (keybase.io/sbrl)

@denji
Copy link
Contributor

denji commented Nov 18, 2016

https://packagecloud.io (OSS — 25 GB Storage / 250 GB Bandwidth + CDN bintray.com 1TB/m)

@tboerger https://packagecloud.io/docs#os_distro_version LTS and non-LTS deb/rpm/etc…
elementary OS / Raspbian / Ubuntu / Debian / SUSE Linux Enterprise Server / openSUSE / Fedora / LinuxMint / poky distro / Oracle Linux / Scientific Linux / Enterprise Linux (CentOS, RedHat, Amazon Linux)

@tboerger
Copy link
Member Author

@denji yeah I know packagecloud, maybe we will take it, but than we need a drone plugin for it :)

@tboerger
Copy link
Member Author

This won't happen for 1.0.0, so I will move it to 1.1.0.

@tboerger tboerger modified the milestones: 1.1.0, 1.0.0 Nov 25, 2016
@jhasse
Copy link

jhasse commented Nov 25, 2016

Gogs already provides deb and rpm packages, so this would be a real pity if it won't happen for 1.0.0.

Will I be able to update Gogs 0.9.99.0903 to Gitea 1.1.0 without problems?

@tboerger
Copy link
Member Author

Gogs is using a service that only supports lts versions and which does some strange binary wrapping. We want to have a real solution.

@lunny
Copy link
Member

lunny commented Nov 25, 2016

I think you could upgrade from Gogs 0.9.99.0903 to Gitea 1.1.0.

@bkcsoft
Copy link
Member

bkcsoft commented Nov 29, 2016

@tboerger what about doing something like this? https://blog.codeship.com/using-docker-build-debian-packages/

@lunny I'm guessing @jhasse means upgrade by apt-get upgrade

@tboerger
Copy link
Member Author

A plain apt-get upgrade won't work since we will have a different package name. But I think it will work to do apt-get remove gogs && apt-get install gitea :)

@lunny
Copy link
Member

lunny commented Nov 29, 2016

Then they have to copy Gogs' app.ini to Gitea.

@jhasse
Copy link

jhasse commented Nov 29, 2016

Then they have to copy Gogs' app.ini to Gitea.

They have to do that before apt-get install gitea though, otherwise the service would have already been started.

@bkcsoft
Copy link
Member

bkcsoft commented Nov 29, 2016

@jhasse IIRC debian packaging rules forbid auto-enabling services on install 😉

@jhasse
Copy link

jhasse commented Nov 29, 2016

You can configure this: http://askubuntu.com/questions/365911/why-the-services-do-not-start-at-installation

And I think the default on Ubuntu is to auto-enable them. At least when I installed Gogs on Ubuntu 14.04 I didn't need to do it manually.

@RichieB2B
Copy link
Contributor

It is true that packager.io does binary wrapping, but it is needed for gogs/gitea. Several environment variables need to be set up, etc. I found the CentOS 6 gogs RPM very simple to install and set up.
Whatever packaging solution you pick for gitea please make sure it is easy to install, configure and upgrade.

@6543
Copy link
Member

6543 commented Nov 18, 2019

@tboerger I'll try make a draft PR with the deb build script ...
& we have dl.gitea.io is it worth to upload the deb there too (and perhaps as atatchment on release)

@tboerger
Copy link
Member Author

I personally wouldn't like to manage deb and rpm repos on my own, that's why Bintray would be great for that. Just uploading a deb or rpm file without any repository is IMHO pretty useless.

@waja
Copy link

waja commented Nov 18, 2019

Just uploading a deb or rpm file without any repository is IMHO pretty useless.

it's completely nonsens!

@lafriks
Copy link
Member

lafriks commented Nov 18, 2019

We could also use nfpm for building deb and rpm files

@tboerger
Copy link
Member Author

Somebody has already started some time ago to build a drone fpm plugin... I still want to build one within the plugins org based on the go fpm fork.

@techknowlogick
Copy link
Member

Here is a drone plugin that I made for nfpm: https://github.com/techknowlogick/drone-nfpm

@zeripath
Copy link
Contributor

If you make packages for FHS systems remember to either use the shadowing script in contrib or build with the LDFLAGS set correctly.

@azlux
Copy link

azlux commented Jan 8, 2020

Hi all, I have my own APT packages repository, I can add gitea on it.
See the project already included : https://packages.azlux.fr/
Now it's running, it's easy to add any .deb you want (I can even create it)

Azlux

@Janhouse
Copy link

Janhouse commented Jan 8, 2020

@azlux it all comes down to the trust. You are probably a cool guy but I would rather install it from some known automation service where build scripts are maintained by the gitea dev team, than get it from some private repo. I have my own packages built as well, but ideally it would be managed by gitea team.

@azlux
Copy link

azlux commented Jan 8, 2020

Ho ok
Thank for the info @Janhouse
I've setup my repo with reprepro, I can help if you need to.

Az

@azlux
Copy link

azlux commented Jan 9, 2020

@Janhouse After a deeper thinking, The apt repo allows us to verify that the sources have not been modified in the meantime. Ideally, it's better to have gitea maintaining their own repo, but they can also put other repo as "unofficial repository".
Lot of project don't have a problem with that. Like that, People warned.

@zeripath
Copy link
Contributor

I know I've said this before but...

If you're providing Deb packages, you should probably build Gitea so that it obeys the FHS by setting the LDFLAGS as described here:

https://docs.gitea.io/en-us/install-from-source/#changing-the-default-custompath-customconf-and-appworkpath

@sbrl
Copy link

sbrl commented Jan 10, 2020

Same here - I have a personal apt repo I can host in

@ghost
Copy link

ghost commented Jan 22, 2020

I would also like to see gitea follow the FHS @zeripath , its silly they need a wrapper shell script to do so too.

Any news on RPMs in the meantime? I see a lot of discussion about DEBs but many enterprises will be using CentOS which does not use DEB packages. The BSDs seem to have their own packages (with patches) but their processes are a bit different.

@zeripath
Copy link
Contributor

@evitalis you don't need a script if you build it with the appropriate LDFLAGS.

@ghost
Copy link

ghost commented Jan 23, 2020

I know, I was referring to their need to even have this.

@sapk
Copy link
Member

sapk commented Jan 23, 2020

Just thinking of it. FHS path should be default for v2 as it would be a needed breaking change.

@zeripath
Copy link
Contributor

I think we need to break that down a bit. There are four kinds of build at present:

  • development builds - you download the source and you build with make
  • personal builds - you download the source and you build with make but want this a running server
  • release builds - we build with make release and stick on gitea.io and GH
  • docker builds

FHS by default makes sense for up to 2 of those: release and possibly personal - but at present you can't tell if a personal build is a development build or vice versa. Breaking the development builds would be a very very bad idea.

The Docker should also have its defaults embedded - it's nonsensical to have to require "-c" by default on a docker build we build ourselves.

There's a possibility of changing where we look by default depending on where the binary is placed - but I suspect that might be a bad idea. I guess I'd have to check again what is normal practice for this. (hierarchies of config lookups? - ugh complex)

When I first made the LDFLAGS option work I proposed:

  • Make a separate release with FHS paths embedded
  • Make the docker have the default paths for docker embedded - which solves a few other weird issues with running gitea on the docker command line.
  • Add/Expose a make endpoint for FHS builds that sets the flags properly <- Package builders should use this...

These are non-breaking changes that would not necessarily require waiting for 2.0 - we're just adding a new download option.

An alternative is to add a configure script and make install endpoints - as then it would look "normal" to people used to:

# get source by whatever means necessary
cd gitea
./configure
make
sudo make install

@tboerger
Copy link
Member Author

It's absolutely normal to search within predefined paths for configs if you do not provide a flag for a custom path. That's as an example already part of https://github.com/spf13/viper to define multiple standard paths. The current fuckedup behavior of Gitea is totally uncommon.

@sbrl
Copy link

sbrl commented Jan 24, 2020

Perhaps it would be worth putting the release builds into the repos first would be a good 1st step?

@azlux
Copy link

azlux commented Feb 7, 2020

@sbrl already done on my repo , the build script is store here : https://github.com/azlux/dpkg-deb
As you said, It use directly the release build.

@ghost
Copy link

ghost commented Mar 4, 2020

@zeripath I think you are making this more complicated than it needs to be based on your reply, but I may be misinterpreting it. If people are running git clone and building things themselves then they should know problems might happen. For many projects either doing said build from the master branch or using a release is considered stable, anything else is not and can break at any time.

Even in Docker there is no reason to not follow the FHS so that case goes away too. For the rest as noted by @tboerger checking for a standard set of paths for a config is considered normal. Relying only on $PWD or random compile flags that most users won't ever see causes more issues, including with OS packaging. As someone who has packaged more than a few things the less standard the application the more work for me and the more patches I may have to introduce.

With all that said I am still interested in seeing official RPMs at least. I don't use Debian or Ubuntu but I am sure an official DEB would also be welcome. Thanks to everyone in this thread doing their best on the packaging in the interim.

@tboerger
Copy link
Member Author

I'm not really involved into Gitea anymore, so I'm closing this issue. If there ist still interest please open a new issue and maybe link to this one for initial discussion. I want to get my issues cleaned up.

@lunny lunny removed this from the 1.x.x milestone Dec 19, 2020
@fazlerabbi37
Copy link

f there ist still interest please open a new issue
@tboerger rather than opening a new issue and starting over again maybe you can just unsubscribe from the issue, and it can be re-opened for people who are interested?

@tboerger
Copy link
Member Author

Just reference this issue on the new one to keep the context. Unsubscribe is not the same as having it in my open issues view on github. And as I can't transfer issues to somebody else it's closed. Beside that, nothing has changed for years...

@go-gitea go-gitea locked as too heated and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile topic/deployment
Projects
None yet
Development

No branches or pull requests