Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710996 - www-apps/gitea-1.11.1 version bump
Summary: www-apps/gitea-1.11.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Pierre-Olivier Mercier
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-02-27 21:09 UTC by Micha Glave
Modified: 2020-05-13 07:59 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild patch for gitea 1.11.4 (0001-www-apps-gitea-Bump-to-1.11.4.patch,5.45 KB, patch)
2020-05-01 15:26 UTC, Nils Freydank
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Micha Glave 2020-02-27 21:09:26 UTC
Gitea released 1.11 within they need nodejs/npm to build. 

Reproducible: Always
Comment 1 Tomáš Mózes 2020-02-28 07:28:54 UTC
"
To build from source, the following programs must be present on the system:
- go 1.11.0 or higher
- node 10.0.0 or higher with npm
"
Comment 2 Micha Glave 2020-04-23 09:36:14 UTC
I got a error in the "compile"-section of the gitea-1.11.4.ebuild[^1]. It seems to me, npm is used to download sources which is not allowed in compile-phase trough sandboxing (?)!


~~~~
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

npm ERR! A complete log of this run can be found in:
npm ERR!     /var/tmp/portage/www-apps/gitea-1.11.4/homedir/.npm/_logs/2020-04-23T09_18_34_823Z-debug.log
code.gitea.io/gitea/modules/queue
make: *** [Makefile:497: node_modules] Error 1
make: *** Waiting for unfinished jobs....
~~~~

[^1]: https://github.com/nemunaire/gentoo/blob/41b0e43e253871625bbdec748b79805a796f3952/www-apps/gitea/gitea-1.11.4.ebuild
Comment 3 Pierre-Olivier Mercier 2020-04-23 13:09:50 UTC
Indeed, I got the same error when I tested the ebuild on another machine with other portage settings.

As it is required that the build has to be performed offline, I'm looking for another ebuild using npm this way, as a sample; but can't find any at the moment... That's why I closed the PR meanwhile.
Comment 4 Joonas Niilola gentoo-dev 2020-04-29 06:54:22 UTC
1: There is one ebuild where the maintainer got upstream to package required node modules with their release. That's something you could pursue with gitea perhaps.

2: You may have to, *sigh*, do something similar that go-module ebuilds do, where you just put 500 lines to SRC_URI (I don't know how many node modules gitea actually needs). It's a maintenance hell, but easily automated with scripts.

3: Migrate to -bin packages in ::gentoo, if possible.

Any idea how other distros deal with it? Like openSUSE, Fedora and Debian? I think they have pretty strict build-systems too, similar to Gentoo.
Comment 5 Pierre-Olivier Mercier 2020-04-29 09:40:00 UTC
Thanks juippis for your response.

Sadly, according to https://repology.org/project/gitea/versions, there are only a few distributions that package an up-to-date gitea (Alpine, ArchLinux, FreeBSD, ...). As I can see, most of them don't have our requirements.

I think the option 1 seems the most optimal to me. I'll try to get in touch with them about that.
Comment 6 Pierre-Olivier Mercier 2020-04-29 10:08:21 UTC
In fact, I see that since 1.11.1, they provide an archive with all nodes modules. Used by the FreeBSD port!

https://github.com/go-gitea/gitea/pull/10298

That's weird, they didn't mention it in the release message[1], that's why I missed it...

[1]: https://blog.gitea.io/2020/02/gitea-1.11.1-is-released/
Comment 7 Nils Freydank 2020-05-01 15:26:11 UTC
Created attachment 635506 [details, diff]
ebuild patch for gitea 1.11.4

Upstream avoids the npm buildtime dependency by adding some files to the release tarball, but we need to change the build target for this (to: "backend").
Comment 8 Larry the Git Cow gentoo-dev 2020-05-13 07:59:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9127c687a0abd0859fc051909c6b2c96ecd49fae

commit 9127c687a0abd0859fc051909c6b2c96ecd49fae
Author:     Pierre-Olivier Mercier <nemunaire@nemunai.re>
AuthorDate: 2020-04-17 09:28:35 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-05-13 07:59:43 +0000

    www-apps/gitea: bump to 1.11.5
    
    Closes: https://bugs.gentoo.org/710996
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Pierre-Olivier Mercier <nemunaire@nemunai.re>
    Closes: https://github.com/gentoo/gentoo/pull/15564
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-apps/gitea/Manifest            |   1 +
 www-apps/gitea/gitea-1.11.5.ebuild | 141 +++++++++++++++++++++++++++++++++++++
 www-apps/gitea/metadata.xml        |   1 +
 3 files changed, 143 insertions(+)