Bug 278520 - devel/gitlab-shell
Summary: devel/gitlab-shell
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthias Fechner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-22 06:21 UTC by Anton Evel
Modified: 2024-04-23 15:31 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (mfechner)


Attachments
Build log (672.28 KB, text/plain)
2024-04-22 12:16 UTC, Anton Evel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Evel 2024-04-22 06:21:03 UTC
Problems while fetching the port, i.e. go.mod file. Should I get it somewhere to put into required directory?

=======================<phase: check-sanity   >============================
===== env: NO_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  License MIT accepted by the user
===========================================================================
=======================<phase: pkg-depends    >============================
===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0
===>   gitlab-shell-14.35.0 depends on file: /usr/local/sbin/pkg - not found
===>   Installing existing package /packages/All/pkg-1.21.2.pkg
[140amd64-default-job-01] Installing pkg-1.21.2...
[140amd64-default-job-01] Extracting pkg-1.21.2: .......... done
===>   gitlab-shell-14.35.0 depends on file: /usr/local/sbin/pkg - found
===>   Returning to build of gitlab-shell-14.35.0
===========================================================================
=======================<phase: fetch-depends  >============================
===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0
===>   gitlab-shell-14.35.0 depends on file: /usr/local/bin/go122 - not found
===>   Installing existing package /packages/All/go122-1.22.2.pkg
[140amd64-default-job-01] Installing go122-1.22.2...
[140amd64-default-job-01] Extracting go122-1.22.2: .......... done
===>   gitlab-shell-14.35.0 depends on file: /usr/local/bin/go122 - found
===>   Returning to build of gitlab-shell-14.35.0
===========================================================================
=======================<phase: fetch          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  License MIT accepted by the user
=> go.mod doesn't seem to exist in /portdistfiles/go/devel_gitlab-shell/gitlab-shell-v14.35.0.
=> Attempting to fetch https://gitlab.com/gitlab-org/gitlab-shell/-/raw/v14.35.0/go.mod
fetch: https://gitlab.com/gitlab-org/gitlab-shell/-/raw/v14.35.0/go.mod: size mismatch: expected 5395, actual 5375
=> Attempting to fetch https://gitlab.com/gitlab-org/gitlab-shell/-/archive/v14.35.0/go.mod
fetch: https://gitlab.com/gitlab-org/gitlab-shell/-/archive/v14.35.0/go.mod: Forbidden
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/go/devel_gitlab-shell/gitlab-shell-v14.35.0/go.mod
fetch: http://distcache.FreeBSD.org/ports-distfiles/go/devel_gitlab-shell/gitlab-shell-v14.35.0/go.mod: Not Found
=> Couldn't fetch it - please try to retrieve this
=> port manually into /portdistfiles/go/devel_gitlab-shell/gitlab-shell-v14.35.0 and try again.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/gitlab-shell
=>> Cleaning up wrkdir
===>  Cleaning for gitlab-shell-14.35.0
build of devel/gitlab-shell | gitlab-shell-14.35.0 ended at Mon Apr 22 09:13:59 MSK 2024
build time: 00:00:03
!!! build failure encountered !!!
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2024-04-22 08:42:14 UTC
This should be fixed in the meantime with:
https://cgit.freebsd.org/ports/commit/?id=8d03cff7a66959dde5e749483ddb4a4e1c38ab7d

Can you retry with current version, please?
Comment 2 Anton Evel 2024-04-22 12:16:37 UTC
Created attachment 250158 [details]
Build log
Comment 3 Anton Evel 2024-04-22 12:17:26 UTC
Retried it but now it fails at checksum check stage. Build log attached
Comment 4 fsbruva 2024-04-22 19:07:48 UTC
(In reply to Anton Evel from comment #3)
Good afternoon-

I had same issue. I reverted the SHA256 checksum portion of this commit https://cgit.freebsd.org/ports/commit/?id=8d03cff7a66959dde5e749483ddb4a4e1c38ab7d

in order to get it to build. When I reverted the entire commit, I got a failed build because the size was wrong (size mismatch: expected 5395, actual 5375).
Comment 5 Anton Evel 2024-04-23 06:22:39 UTC
I've reverted SHA256 sum of go.mod to cd69a1200be427a08520bfbe7287c215bdd5791278367c741c6720d8f56995aa and it has built successfully. Despite of...

[04-23 8:47am] root@mail [gitlab-shell] %> curl -v https://gitlab.com/gitlab-org/gitlab-shell/-/raw/v14.35.0/go.mod | sha256
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

<-- some lines cutted -->

<
{ [5 bytes data]
100  5375  100  5375    0     0  12973      0 --:--:-- --:--:-- --:--:-- 12951
* Connection #0 to host gitlab.com left intact
05d82b61970ed59f55594e4457c0560f9de928ea0439bf6e40c0b7cf81ee9c14

the SUM is the one Matthias wrote into distinfo. Don't know how it could be..
Comment 6 Matthias Fechner freebsd_committer freebsd_triage 2024-04-23 07:06:19 UTC
Thanks for all your feedback.
I was now able to reproduce it and already modified my gitlab CI pipeline to be able to catch this (and also to catch these errors in future).

I will commit shortly a corrected version.
Comment 7 Anton Evel 2024-04-23 07:11:33 UTC
Thank you, Matthias! Waiting for next version
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-04-23 07:12:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=30ee39816e4e27529f1f2421820962b961c5fc0e

commit 30ee39816e4e27529f1f2421820962b961c5fc0e
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2024-04-23 06:33:31 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-04-23 07:10:37 +0000

    devel/gitlab-shell: fix build errors due to checksum failure

    The port will execute `go mod download` to download go modules.
    This command modifies the go.mod file which causes the checksum check to fail.
    Backup the go.mod and restore it afterwards.

    PR:             278520

 devel/gitlab-shell/Makefile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-04-23 15:31:57 UTC
A commit in branch 2024Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1a4d01d60016a459cc2b697e877c1c2d8394ca75

commit 1a4d01d60016a459cc2b697e877c1c2d8394ca75
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2024-04-23 06:33:31 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-04-23 15:30:43 +0000

    devel/gitlab-shell: fix build errors due to checksum failure

    The port will execute `go mod download` to download go modules.
    This command modifies the go.mod file which causes the checksum check to fail.
    Backup the go.mod and restore it afterwards.

    PR:             278520
    (cherry picked from commit 30ee39816e4e27529f1f2421820962b961c5fc0e)

 devel/gitlab-shell/Makefile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)