Date: Mon, 17 Jan 2022 15:18:59 -0500 From: Dmitri Goutnik <dmgk@freebsd.org> To: Larry Rosenman <ler@lerctr.org> Cc: Matthias Fechner <idefix@fechner.net>, ports@freebsd.org Subject: Re: Go modules help Message-ID: <CADMW2CF76-tdvhLNriCQYuOGfvH=LrWJ9S2f=vZS3kvQf9LTJw@mail.gmail.com> In-Reply-To: <02846edc478f841c6af111bf8ef8ee39@lerctr.org> References: <1ddfac966f2bf7109b11e1689400e9b4@lerctr.org> <dac1ff0f-004b-15ba-67e1-dfbdde2036ec@fechner.net> <3a9bde71cd16d16d55d67fd3adaf4016@lerctr.org> <d08f961db261ecbdec0a909aed566ff7@lerctr.org> <2b232a6d-4910-dcef-5d25-84b337d4926d@fechner.net> <a09e7f333ea70f5195a289a0912f5d9f@lerctr.org> <d981c21c-7283-6141-ae6e-a77ff12b60c3@fechner.net> <02846edc478f841c6af111bf8ef8ee39@lerctr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000d0df2c05d5ccdd56 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'd suggest switching to the new(-ish) GO_MODULE way of managing dependencies, modules2tuple is not smart enough to handle projects of this size. Attached Makefile builds OK for me and the resulting binary seems to run, untested beyond that. Regards, Dmitri On Mon, Jan 17, 2022 at 1:36 PM Larry Rosenman <ler@lerctr.org> wrote: > > On 01/17/2022 11:53 am, Matthias Fechner wrote: > > Am 17.01.2022 um 18:44 schrieb Larry Rosenman: > >> On 01/17/2022 11:35 am, Matthias Fechner wrote: > >>> Am 17.01.2022 um 17:46 schrieb Larry Rosenman: > >>>> Progress, but I'm now getting: > >>>> =3D> SHA256 Checksum OK for > >>>> go-plist-591f970eefbbeb04d7b37f334a0c4c3256e32876_GL0.tar.gz. > >>>> /bin/rm -f -r > >>>> /wrkdirs/usr/ports/net-mgmt/thanos/work/thanos-0.24.0/vendor/cloud.g= oogle.com/go/storage > >>>> install -l rs > >>>> /wrkdirs/usr/ports/net-mgmt/thanos/work/google-cloud-go-0.97.0/go/st= orage > >>>> /wrkdirs/usr/ports/net-mgmt/thanos/work/thanos-0.24.0/vendor/cloud.g= oogle.com/storage > >>>> install: > >>>> /wrkdirs/usr/ports/net-mgmt/thanos/work/google-cloud-go-0.97.0/go/st= orage: > >>>> realpath: No such file or directory > >>>> *** Error code 71 > >>>> > >>>> new makefile attached. I've tried I don't know how many things with > >>>> the m2t made lines. > >>>> > >>> this is a little bit tricky. > >>> To understand it, you need to use tag storage/v1.10: > >>> https://github.com/googleapis/google-cloud-go/tree/storage/v1.10.0 > >>> > >>> This archive has a directory named storage you would like to link > >>> into: > >>> work/thanos-0.24.0/vendor/cloud.google.com/go/storage/ > >>> You can find the directory with: > >>> tar tzvf > >>> /usr/ports/distfiles/googleapis-google-cloud-go-storage-v1.10.0_GH0.t= ar.gz > >>> So at first you download it with a GH_TUPLE definition: > >>> + > >>> googleapis:google-cloud-go:storage/v1.10.0:googleapis_google_cloud_go= _storage > >>> \ > >>> > >>> The last part here must be unique, I added _storage to it. > >>> > >>> The content will be stored in (the path is used from the GH_TUPLE > >>> definition): > >>> work/google-cloud-go-storage-v1.10.0/ > >>> > >>> The next step is now to remove the already existing directory: > >>> @${RM} -r ${WRKSRC}/vendor/cloud.google.com/go/storage > >>> > >>> and now link the previously download archive into the removed > >>> directory: > >>> @${RLN} ${WRKSRC_googleapis_google_cloud_go_storage}/storage > >>> ${WRKSRC}/vendor/cloud.google.com/go/storage > >>> > >>> I attached you the makefile, which includes this modification. > >>> Maybe modules2tuple can be fixed to get it working if the version tag > >>> includes a `/ `. > >>> I added @dmgk@FreeBSD.org, maybe he has an idea how to fix this in > >>> modules2tuple. > >>> > >>> Gru=C3=9F > >>> Matthias > >> > >> > >> Still getting errors: > >> > >> =3D=3D=3D> Building thanos from ./cmd/thanos > >> vendor/cloud.google.com/go/storage/iam.go:20:2: cannot find package > >> "." in: > >> /wrkdirs/usr/ports/net-mgmt/thanos/work/thanos-0.24.0/vendor/cloud= .google.com/go/iam > >> vendor/cloud.google.com/go/storage/bucket.go:24:2: cannot find package > >> "." in: > >> /wrkdirs/usr/ports/net-mgmt/thanos/work/thanos-0.24.0/vendor/cloud= .google.com/go/internal/optional > >> vendor/cloud.google.com/go/storage/acl.go:22:2: cannot find package > >> "." in: > >> /wrkdirs/usr/ports/net-mgmt/thanos/work/thanos-0.24.0/vendor/cloud= .google.com/go/internal/trace > >> vendor/cloud.google.com/go/storage/storage.go:43:2: cannot find > >> package "." in: > >> /wrkdirs/usr/ports/net-mgmt/thanos/work/thanos-0.24.0/vendor/cloud= .google.com/go/internal/version > >> pkg/tracing/stackdriver/tracer.go:12:2: cannot find package "." in: > >> /wrkdirs/usr/ports/net-mgmt/thanos/work/thanos-0.24.0/vendor/cloud= .google.com/go/trace/apiv1 > >> *** Error code 1 > >> > > if you download the packages manually: > > cd net-mgmt/thanos > > make clean extract > > cd work/thanos-0.24.0 > > rm -Rf vendor/cloud.google.com > > go mod vendor > > ls -las vendor/cloud.google.com/go > > > > you will see how the directory must look like. > > I think that another googleapis:google-cloud-go tuple line needs > > corrections. > > > > Gru=C3=9F > > Matthias > > > =E2=9D=AF ls -las vendor/cloud.google.com/go > total 139 > 3 drwxr-xr-x 7 ler ler 19 Jan 17 12:12 . > 1 drwxr-xr-x 3 ler ler 3 Jan 17 12:12 .. > 1 -rw-r--r-- 1 ler ler 92 Jan 17 12:12 .gitignore > 58 -rw-r--r-- 1 ler ler 131886 Jan 17 12:12 CHANGES.md > 3 -rw-r--r-- 1 ler ler 1982 Jan 17 12:12 CODE_OF_CONDUCT.md > 9 -rw-r--r-- 1 ler ler 13625 Jan 17 12:12 CONTRIBUTING.md > 8 -rw-r--r-- 1 ler ler 11358 Jan 17 12:12 LICENSE > 5 -rw-r--r-- 1 ler ler 5703 Jan 17 12:12 README.md > 5 -rw-r--r-- 1 ler ler 6687 Jan 17 12:12 RELEASING.md > 2 -rw-r--r-- 1 ler ler 329 Jan 17 12:12 SECURITY.md > 1 drwxr-xr-x 3 ler ler 3 Jan 17 12:12 compute > 6 -rw-r--r-- 1 ler ler 8089 Jan 17 12:12 doc.go > 2 -rw-r--r-- 1 ler ler 532 Jan 17 12:12 go.mod > 25 -rw-r--r-- 1 ler ler 55096 Jan 17 12:12 go.sum > 1 drwxr-xr-x 2 ler ler 3 Jan 17 12:12 iam > 3 drwxr-xr-x 5 ler ler 9 Jan 17 12:12 internal > 3 drwxr-xr-x 2 ler ler 23 Jan 17 12:12 storage > 6 -rw-r--r-- 1 ler ler 9063 Jan 17 12:12 testing.md > 1 drwxr-xr-x 3 ler ler 4 Jan 17 12:12 trace > > ler in borg in thanos/work/thanos-0.24.0 on =EE=82=A0 main +471 -304 via = =F0=9F=90=B9 > v1.17.6 on =E2=98=81=EF=B8=8F (us-east-1) > =E2=9D=AF > > post-extract: > @${RM} -r ${WRKSRC}/vendor/cloud.google.com/go/storage > @${RLN} ${WRKSRC_googleapis_google_cloud_go_storage}/storage > ${WRKSRC}/vendor/cloud.google.com/go/storage > @${RM} -r ${WRKSRC}/vendor/cloud.google.com/go/internal > @${RLN} ${WRKSRC_googleapis_google_cloud_go_internal}/internal > ${WRKSRC}/vendor/cloud.google.com/go/internal > @${RM} -r ${WRKSRC}/vendor/cloud.google.com/go/iam > @${RLN} ${WRKSRC_googleapis_google_cloud_go_iam}/iam > ${WRKSRC}/vendor/cloud.google.com/go/iam > @${RM} -r ${WRKSRC}/vendor/cloud.google.com/go/compute > @${RLN} ${WRKSRC_googleapis_google_cloud_go_compute}/compute > ${WRKSRC}/vendor/cloud.google.com/go/compute > @${RM} -r ${WRKSRC}/vendor/cloud.google.com/go/trace > @${RLN} ${WRKSRC_googleapis_google_cloud_go_compute}/trace > ${WRKSRC}/vendor/cloud.google.com/go/trace > > > =3D> SHA256 Checksum OK for > go-plist-591f970eefbbeb04d7b37f334a0c4c3256e32876_GL0.tar.gz. > install: /internal: realpath: No such file or directory > *** Error code 71 > > this is super confusing :( > > -- > Larry Rosenman http://www.lerctr.org/~ler > Phone: +1 214-642-9640 E-Mail: ler@lerctr.org > US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106 --000000000000d0df2c05d5ccdd56 Content-Type: application/octet-stream; name=Makefile Content-Disposition: attachment; filename=Makefile Content-Transfer-Encoding: base64 Content-ID: <f_kyj4qbls0> X-Attachment-Id: f_kyj4qbls0 UE9SVE5BTUU9CXRoYW5vcwpESVNUVkVSU0lPTlBSRUZJWD0JdgpESVNUVkVSU0lPTj0JMC4yNC4w CkNBVEVHT1JJRVM9CW5ldC1tZ210CgpNQUlOVEFJTkVSPQlsZXJARnJlZUJTRC5vcmcKQ09NTUVO VD0JSGlnaGx5IGF2YWlsYWJsZSBQcm9tZXRoZXVzIHNldHVwIHdpdGggbG9uZyB0ZXJtIHN0b3Jh Z2UgY2FwYWJpbGl0aWVzCgpMSUNFTlNFPQlBUEFDSEUyMApMSUNFTlNFX0ZJTEU9CSR7V1JLU1JD fS9MSUNFTlNFCgojIGZhaWxzIHRvIGJ1aWxkIG9uIGFybXY3L2kzODY6IHBrZy9zdG9yZS9jYWNo ZS9jYWNoZS5nbzoxNjY6MjI6IGNvbnN0YW50IDkyMjMzNzIwMzY4NTQ3NzU4MDcgb3ZlcmZsb3dz IGludApPTkxZX0ZPUl9BUkNIUz0JYWFyY2g2NCBhbWQ2NAoKVVNFUz0JCWdvOm1vZHVsZXMKCkJV SUxEX0RBVEU9CSQkKGRhdGUgKyVkLSVCLSVZKQoKR09fTU9EVUxFPQlnaXRodWIuY29tL3RoYW5v cy1pby90aGFub3MKR09fVEFSR0VUPQkuL2NtZC8ke1BPUlROQU1FfQpHT19CVUlMREZMQUdTPQkt bGRmbGFncyAiXAogICAgICAgICAgICAgICAgLXMgLXcgXAoJCS1YIGdpdGh1Yi5jb20vcHJvbWV0 aGV1cy9jb21tb24vdmVyc2lvbi5WZXJzaW9uPSR7RElTVFZFUlNJT059IFwKCQktWCBnaXRodWIu Y29tL3Byb21ldGhldXMvY29tbW9uL3ZlcnNpb24uUmV2aXNpb249IjMxY2FjYzQiIFwKCQktWCBn aXRodWIuY29tL3Byb21ldGhldXMvY29tbW9uL3ZlcnNpb24uQnJhbmNoPSJtYXN0ZXIiIFwKCQkt WCBnaXRodWIuY29tL3Byb21ldGhldXMvY29tbW9uL3ZlcnNpb24uQnVpbGRVc2VyPSR7VVNFUn0g XAoJCS1YIGdpdGh1Yi5jb20vcHJvbWV0aGV1cy9jb21tb24vdmVyc2lvbi5CdWlsZERhdGU9JHtC VUlMRF9EQVRFfSIKClVTRV9HSVRIVUI9CXllcwpHSF9BQ0NPVU5UPQl0aGFub3MtaW8KClBMSVNU X0ZJTEVTPQliaW4vJHtQT1JUTkFNRX0KCi5pbmNsdWRlIDxic2QucG9ydC5taz4K --000000000000d0df2c05d5ccdd56--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADMW2CF76-tdvhLNriCQYuOGfvH=LrWJ9S2f=vZS3kvQf9LTJw>