Bug 262981 - sysutils/zrepl: missing two Go dependencies, google.golang.org/appengine/cloudsql and github.com/konsorten/go-windows-terminal-sequences
Summary: sysutils/zrepl: missing two Go dependencies, google.golang.org/appengine/clou...
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: Lewis Cook
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-01 13:51 UTC by Trond Endrestøl
Modified: 2022-05-10 16:08 UTC (History)
13 users (show)

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


Attachments
Updated patch for D34857 post-aa2539679084872cd84112e9df6bfee571570623 (1.93 KB, patch)
2022-04-25 07:14 UTC, Trond Endrestøl
no flags Details | Diff
Patch for sysutils/zrepl/Makefile (389 bytes, patch)
2022-04-25 07:16 UTC, Trond Endrestøl
no flags Details | Diff
zrepl-0.5.0.8.diff (1.75 KB, patch)
2022-05-09 15:35 UTC, Dmitri Goutnik
dmgk: maintainer-approval? (lcook)
Details | Diff
draft for update entry (1.23 KB, patch)
2022-05-10 15:45 UTC, Thibault Payet
no flags Details | Diff
patch for UPDATING (1.07 KB, patch)
2022-05-10 15:53 UTC, Thibault Payet
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2022-04-01 13:51:27 UTC
I'm not sure if this is a upstream bug or a bug in the port itself. Examining the Makefile and the distinfo file didn't give any clues.

When building the port using Synth, the extract phase ends with:

--------------------------------------------------------------------------------
--  Phase: extract
--------------------------------------------------------------------------------
===>  License MIT accepted by the user
===> Fetching all distfiles required by zrepl-0.5.0_1 for building
===> Fetching github.com/zrepl/zrepl dependencies
===>  Extracting for zrepl-0.5.0_1
=> SHA256 Checksum OK for go/sysutils_zrepl/zrepl-v0.5.0/v0.5.0.mod.
=> SHA256 Checksum OK for go/sysutils_zrepl/zrepl-v0.5.0/v0.5.0.zip.
github.com/zrepl/zrepl/daemon/hooks imports
        github.com/go-sql-driver/mysql imports
        google.golang.org/appengine/cloudsql: missing go.sum entry for module providing package google.golang.org/appengine/cloudsql (imported by github.com/go-sql-driver/mysql); to add:
        go get github.com/go-sql-driver/mysql@v1.4.1-0.20190907122137-b2c03bcae3d4
github.com/zrepl/zrepl/daemon/job imports
        github.com/prometheus/common/log imports
        github.com/sirupsen/logrus imports
        github.com/konsorten/go-windows-terminal-sequences: missing go.sum entry for module providing package github.com/konsorten/go-windows-terminal-sequences (imported by github.com/sirupsen/logrus); to add:
        go get github.com/sirupsen/logrus@v1.4.2
*** Error code 1

Stop.
make: stopped in /xports/sysutils/zrepl
Comment 1 tech-lists 2022-04-01 22:17:21 UTC
yes I'm seeing this too in poudriere testport with portstree updated five mins ago
Comment 2 Julien Cigar 2022-04-05 08:47:31 UTC
I'm hitting the same problem with poudriere (with the 2022Q2 branch)
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2022-04-09 07:56:35 UTC
(In reply to Trond.Endrestol from comment #0)
Can you try https://reviews.freebsd.org/D34857

and patch sysutils/zrepl/Makefile with something like that:
USES= go:modules,no_vendor_dir
Comment 4 tech-lists 2022-04-09 13:08:56 UTC
(In reply to Mikael Urankar from comment #3)

Confirming this works on stable/13 on ports updated Sat Apr 9 07:02:00 2022 +0200  

thank you!
Comment 5 Trond Endrestøl 2022-04-10 07:30:16 UTC
(In reply to Mikael Urankar from comment #3)
Success on current. Thank you.
Comment 6 Diya 2022-04-23 18:35:59 UTC
Hello,
I tried to compile the module in 13.0-RELEASE-p11 but I get the same error.
How can I fix it?

Thanks for your help!
Comment 7 tech-lists 2022-04-23 22:15:24 UTC
(In reply to Diya from comment #6)

You'll need to download the diff as per https://reviews.freebsd.org/file/data/wdcx7omaaoaeqepdxcwe/PHID-FILE-pv3ijvlqeugnyjlc3sdg/D34857.diff into /usr/ports and patch < D34857.diff then modify the makefile for sysutils/zrepl as per Mikael's comment https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262981#c3.

Alternatively wait until it lands in ports.
Comment 8 Trond Endrestøl 2022-04-25 07:14:14 UTC
Created attachment 233463 [details]
Updated patch for D34857 post-aa2539679084872cd84112e9df6bfee571570623
Comment 9 Trond Endrestøl 2022-04-25 07:16:03 UTC
Created attachment 233464 [details]
Patch for sysutils/zrepl/Makefile

For the benefit for those that are impatient.
Comment 10 Diya 2022-04-25 12:35:28 UTC
(In reply to tech-lists from comment #7)

Patched as explained, thank you!
It's working now.
Comment 11 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-04 12:07:59 UTC
The correct fix would be to ask the upstream to run `go mod tidy` before the next release.
Comment 12 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-05 11:49:55 UTC
This port should be building as-is after ports 4e29133174db, but it is still a good idea to maybe prod the upstream to `go mod tidy` before the next release.
Comment 13 Mateusz Kwiatkowski 2022-05-09 07:56:03 UTC
I reported it and it's already done! https://github.com/zrepl/zrepl/commit/19b2deb2cfe5e63b944fa83d12f474b11946ca3f
Comment 14 commit-hook freebsd_committer freebsd_triage 2022-05-09 11:16:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6e236e18965327f6100473770e4edb78c94fb1d4

commit 6e236e18965327f6100473770e4edb78c94fb1d4
Author:     Dmitri Goutnik <dmgk@FreeBSD.org>
AuthorDate: 2022-05-08 20:49:05 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-05-09 11:15:14 +0000

    Mk/Uses/go.mk: Try to tidy up go.sum after fetch, fix EXTRACT_ONLY

    Make a best effort attempt (without network access) to add missing
    go.sum entries using local module cache prepared by the fetch stage.

    Set EXTRACT_ONLY dynamically from DISTFILES, repair
    USE_{GITHUB,GITLAB}.

    PR:             258210
    PR:             262981
    PR:             263866

 Mk/Uses/go.mk | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
Comment 15 Julien Cigar 2022-05-09 11:35:31 UTC
Thank you! Will you merge this in 2022Q2?
Comment 16 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-09 12:15:22 UTC
(In reply to Julien Cigar from comment #15)
go.mk changes? Probably not, but perhaps port could be updated to the commit with fixed go.sum (19b2deb2c) - this update can be merged to the quarterly.
Comment 17 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-09 15:35:26 UTC
Created attachment 233822 [details]
zrepl-0.5.0.8.diff

Update to the commit with fixed go.sum (https://github.com/zrepl/zrepl/commit/19b2deb2cfe5e63b944fa83d12f474b11946ca3f), which can be merged to quarterly.
Comment 18 commit-hook freebsd_committer freebsd_triage 2022-05-10 12:50:45 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3046cb492009a134fc9b37db5ee7e66809d00b04

commit 3046cb492009a134fc9b37db5ee7e66809d00b04
Author:     Dmitri Goutnik <dmgk@FreeBSD.org>
AuthorDate: 2022-05-10 12:45:35 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-05-10 12:49:20 +0000

    sysutils/zrepl: Update to 0.5.0-8

    Update to the commit with fixed go.sum.

    PR:             262981
    Reported by:    Trond.Endrestol@ximalas.info
    Approved by:    lcook (maintainer timeout)

 sysutils/zrepl/Makefile |  6 +++---
 sysutils/zrepl/distinfo | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
Comment 19 commit-hook freebsd_committer freebsd_triage 2022-05-10 12:50:48 UTC
A commit in branch 2022Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=61b985c227ac2d7b34f7c646dbf0ea9214903db5

commit 61b985c227ac2d7b34f7c646dbf0ea9214903db5
Author:     Dmitri Goutnik <dmgk@FreeBSD.org>
AuthorDate: 2022-05-10 12:45:35 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-05-10 12:49:59 +0000

    sysutils/zrepl: Update to 0.5.0-8

    Update to the commit with fixed go.sum.

    PR:             262981
    Reported by:    Trond.Endrestol@ximalas.info
    Approved by:    lcook (maintainer timeout)

    (cherry picked from commit 3046cb492009a134fc9b37db5ee7e66809d00b04)

 sysutils/zrepl/Makefile |  6 +++---
 sysutils/zrepl/distinfo | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
Comment 20 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-10 12:51:26 UTC
Committed, thanks everyone.
Comment 21 Thibault Payet 2022-05-10 15:08:04 UTC
The commits at https://github.com/zrepl/zrepl/commit/19b2deb2cfe5e63b944fa83d12f474b11946ca3f

is long after https://github.com/zrepl/zrepl/commit/4a27cc63a8cd8886f53660ea7ced1a57dc0321c2

Which introduce the following breaking change

|break| |feature| convert Prometheus metric ``zrepl_version_daemon`` to ``zrepl_start_time`` metric

If this version (0.5.0.8) contains this previous commits, then we need to add the breaking change information.
Comment 22 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-10 15:19:13 UTC
(In reply to Thibault Payet from comment #21)
Are you saying that there should be an entry in UPDATING? Can you draft one?
Comment 23 Thibault Payet 2022-05-10 15:45:15 UTC
Created attachment 233838 [details]
draft for update entry

I just extract the source, and since the changelog contain this breaking changes. I guess it apply.

I just wrote directly in pkg-messages.in, as an upgrade messages. I didn't test a build to see if it will display the correct messages.
Comment 24 Thibault Payet 2022-05-10 15:53:30 UTC
Created attachment 233839 [details]
patch for UPDATING

And here the patch for just updating UPDATING
Comment 25 commit-hook freebsd_committer freebsd_triage 2022-05-10 16:08:20 UTC
A commit in branch main references this bug:

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

commit f90b12bfd6f798775f45307317522090b2039cd5
Author:     Thibault Payet <monwarez@mailoo.org>
AuthorDate: 2022-05-10 16:05:11 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-05-10 16:05:11 +0000

    UPDATING: Add sysutils/zrepl 0.5.0.8 entry

    PR:             262981

 UPDATING | 10 ++++++++++
 1 file changed, 10 insertions(+)