From nobody Tue Jul 16 07:25:20 2024 X-Original-To: freebsd-pkg@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNVw408rtz5Qjxj for ; Tue, 16 Jul 2024 07:25:24 +0000 (UTC) (envelope-from SRS0=W/gf=OQ=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNVw274bqz4v3J for ; Tue, 16 Jul 2024 07:25:22 +0000 (UTC) (envelope-from SRS0=W/gf=OQ=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=ngsGb7y8; dmarc=pass (policy=quarantine) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of "SRS0=W/gf=OQ=klop.ws=ronald-lists@realworks.nl" designates 194.109.157.24 as permitted sender) smtp.mailfrom="SRS0=W/gf=OQ=klop.ws=ronald-lists@realworks.nl" Date: Tue, 16 Jul 2024 09:25:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1721114721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=N9v3ntw3K24kzUKsoNwIxx7dw8si9CNwqy82s9cZRNs=; b=ngsGb7y8zoVjSJSsa3hjs4QoHo4a2az0mri3RXJ2q0rLf2T1o13d/GqLHa6PcE6moB3WO/ 7gkGd4h6J/l+izEsb/SH6iYxoY+J9vJdvsHCjj7u521lDHUeE1utJWuJiJt4yx0HM9ppyQ aRAClO+rdxWPixJipm6Ea9KWV8Z3qfzp1kfEx597FLpCL2gEPmXeuRpjYVFdn24DfxkZG2 zRXkPDAljdNdP97Ir38gbtvijpfam/vrrqDuqGB9J4/LGEQvH+hj908aTFTvZ8AIMXdaT2 NyICdUpGaBnXFd34VRjbXCl/pzIfjBKlEmTGys2XVpk3KetLoYOfleSZkuoXPA== From: Ronald Klop To: Karl Denninger , "freebsd-pkg@freebsd.org" Message-ID: <1053288469.1714.1721114720975@localhost> In-Reply-To: <1436487354.1173.1721112364245@localhost> References: <1436487354.1173.1721112364245@localhost> Subject: Re: Probably something stupid -- cannot find SRV records and fails List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1713_1753761224.1721114720914" X-Mailer: Realworks (710.10) Importance: Normal X-Priority: 3 (Normal) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.19 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=W/gf=OQ=klop.ws=ronald-lists@realworks.nl]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-pkg@freebsd.org]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=W/gf=OQ=klop.ws=ronald-lists@realworks.nl]; TO_MATCH_ENVRCPT_SOME(0.00)[]; HAS_X_PRIO_THREE(0.00)[3]; DKIM_TRACE(0.00)[klop.ws:+] X-Rspamd-Queue-Id: 4WNVw274bqz4v3J ------=_Part_1713_1753761224.1721114720914 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Ronald Klop Datum: dinsdag, 16 juli 2024 08:46 Aan: Karl Denninger CC: "freebsd-pkg@freebsd.org" Onderwerp: Re: Probably something stupid -- cannot find SRV records and fails > > > Van: Karl Denninger > Datum: 16 juli 2024 01:01 > Aan: "freebsd-pkg@freebsd.org" > Onderwerp: Probably something stupid -- cannot find SRV records and fails >> >> I have a Crochet build environment that runs on a native FreeBSD OS (on metal) without problems and has for quite some time. I'm trying to move that build environment to a VM running on VirtualBox; the host is Windows 11. >> >> Everything appears to work as expected normally, including pulling the source from HEAD, setting up a worktree for stable/14, doing a buildworld/kernel and such and in fact the crossbuild for ARM64 via Crochet -- except the package grab at the end for a set of packages I want on the embedded media output once the install of the system itself into the md is complete. >> >> Again this works fine on my long-standing build box that runs on actual metal, and as far as I can tell there isn't any difference -- I have the same setup (to grab "latest" rather than "quarterly") in /etc/pkg/FreeBSD.conf, for example. >> >> I am getting this, which is a replay (by hand) of what Crochet does at that point -- it does not chroot during the build and runs in the native (in this case AMD64) context, but with the "-c" flag to the mounted install filesystem for the pkg command (which is on an md): >> >> # pwd >> /work/OBJ/ARM64-14-STABLE/_.mount.freebsd >> # env ASSUME_ALWAYS_YES=YES pkg -d -c . install rsync sshbuard ntimed ffmpeg mpg321 git >> DBG(1)[53612]> pkg initialized >> Updating FreeBSD repository catalogue... >> DBG(1)[53612]> PkgRepo: verifying update for FreeBSD >> DBG(1)[53612]> PkgRepo: need forced update of FreeBSD >> DBG(1)[53612]> Pkgrepo, begin update of '/var/db/pkg/repos/FreeBSD/db' >> DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf >> DBG(1)[53612]> curl_open >> pkg: No SRV record found for the repo 'FreeBSD' >> DBG(1)[53612]> Fetch: fetcher used: pkg+https >> DBG(1)[53612]> curl> fetching https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf >> >> DBG(1)[53612]> CURL> No mirror set url to https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf >> >> DBG(1)[53612]> CURL> attempting to fetch from https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf, left retry 3 >> >> * Couldn't find host pkg.FreeBSD.org in the .netrc file; using defaults >> * Could not resolve host: pkg.FreeBSD.org >> * Closing connection >> DBG(1)[53612]> CURL> No mirror set url to https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf >> >> DBG(1)[53612]> CURL> attempting to fetch from https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf, left retry 2 >> >> * Couldn't find host pkg.FreeBSD.org in the .netrc file; using defaults >> * Could not resolve host: pkg.FreeBSD.org >> * Closing connection >> DBG(1)[53612]> CURL> No mirror set url to https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf >> >> DBG(1)[53612]> CURL> attempting to fetch from https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf, left retry 1 >> >> * Couldn't find host pkg.FreeBSD.org in the .netrc file; using defaults >> * Could not resolve host: pkg.FreeBSD.org >> * Closing connection >> pkg: An error occured while fetching package >> DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.txz >> pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.txz -- pkg+:// implies SRV mirror type >> repository FreeBSD has no meta file, using default settings >> DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/data.pkg >> pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/data.pkg -- pkg+:// implies SRV mirror type >> DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/data.txz >> pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/data.txz -- pkg+:// implies SRV mirror type >> DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/packagesite.pkg >> pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/packagesite.pkg -- pkg+:// implies SRV mirror type >> DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/packagesite.txz >> pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/packagesite.txz -- pkg+:// implies SRV mirror type >> Unable to update repository FreeBSD >> Error updating repositories! >> # >> >> What I don't understand here is that it works perfectly fine on a native host, and I don't see anything obvious. I can ping pkg.freebsd.org: >> >> # ping pkg.freebsd.org >> PING pkgmir.geo.freebsd.org (173.228.147.98): 56 data bytes >> 64 bytes from 173.228.147.98: icmp_seq=0 ttl=49 time=58.336 ms >> ^C >> --- pkgmir.geo.freebsd.org ping statistics --- >> 1 packets transmitted, 1 packets received, 0.0% packet loss >> round-trip min/avg/max/stddev = 58.336/58.336/58.336/0.000 ms >> >> Further, a "fetch" against the first requested file (meta.conf) that the pkg command complains about succeeds: >> >> # fetch https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf >> meta.conf 178 B 1687 kBps 00s >> >> Any ideas on where to look? I turned debugging on with "-d" because the original build was not giving me any idea of what was happening, but this appears to imply there's no connectivity out of the VM in that it can't resolve the hostname -- but there is, obviously. >> >> Pkg against the base installed system works properly and have a decent number of packages installed (specifically git and its dependencies, which was loaded to grab the source tree of course.) >> >> Thanks in advance. >> >> -- >> Karl Denninger >> karl@denninger.net >> /The Market Ticker/ >> /[S/MIME encrypted email preferred]/ >> >> >> >> > > > > Pkg -c . > This does chroot. Did you configure /etc/resolv.conf in the arm64 mount? > > try chroot . ping pkg.freebsd.org in that same directory. > > Regards, > Ronald > I don't have experience with crochet, but I found this documentation about crochet, pkg and resolv.conf. https://github.com/freebsd/crochet?tab=readme-ov-file#using-pkg Happy hacking! Ronald. ------=_Part_1713_1753761224.1721114720914 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Van: Ronald Klop <ronald-lists@klop.ws>
Datum: dinsdag, 16 juli 2024 08:46
Aan: Karl Denninger <karl@denninger.net>
CC: "freebsd-pkg@freebsd.org" <freebsd-pkg@freebsd.org>
Onderwerp: Re: Probably something stupid -- cannot find SRV records and fails

 

Van: Karl Denninger <karl@denninger.net>
Datum: 16 juli 2024 01:01
Aan: "freebsd-pkg@freebsd.org" <freebsd-pkg@freebsd.org>
Onderwerp: Probably something stupid -- cannot find SRV records and fails

I have a Crochet build environment that runs on a native FreeBSD OS (on metal) without problems and has for quite some time.  I'm trying to move that build environment to a VM running on VirtualBox; the host is Windows 11.

Everything appears to work as expected normally, including pulling the source from HEAD, setting up a worktree for stable/14, doing a buildworld/kernel and such and in fact the crossbuild for ARM64 via Crochet -- except the package grab at the end for a set of packages I want on the embedded media output once the install of the system itself into the md is complete.

Again this works fine on my long-standing build box that runs on actual metal, and as far as I can tell there isn't any difference -- I have the same setup (to grab "latest" rather than "quarterly") in /etc/pkg/FreeBSD.conf, for example.

I am getting this, which is a replay (by hand) of what Crochet does at that point -- it does not chroot during the build and runs in the native (in this case AMD64) context, but with the "-c" flag to the mounted install filesystem for the pkg command (which is on an md):

# pwd
/work/OBJ/ARM64-14-STABLE/_.mount.freebsd
# env ASSUME_ALWAYS_YES=YES pkg -d -c . install rsync sshbuard ntimed ffmpeg mpg321 git
DBG(1)[53612]> pkg initialized
Updating FreeBSD repository catalogue...
DBG(1)[53612]> PkgRepo: verifying update for FreeBSD
DBG(1)[53612]> PkgRepo: need forced update of FreeBSD
DBG(1)[53612]> Pkgrepo, begin update of '/var/db/pkg/repos/FreeBSD/db'
DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf
DBG(1)[53612]> curl_open
pkg: No SRV record found for the repo 'FreeBSD'
DBG(1)[53612]> Fetch: fetcher used: pkg+https
DBG(1)[53612]> curl> fetching https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf

DBG(1)[53612]> CURL> No mirror set url to https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf

DBG(1)[53612]> CURL> attempting to fetch from https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf, left retry 3

* Couldn't find host pkg.FreeBSD.org in the .netrc file; using defaults
* Could not resolve host: pkg.FreeBSD.org
* Closing connection
DBG(1)[53612]> CURL> No mirror set url to https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf

DBG(1)[53612]> CURL> attempting to fetch from https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf, left retry 2

* Couldn't find host pkg.FreeBSD.org in the .netrc file; using defaults
* Could not resolve host: pkg.FreeBSD.org
* Closing connection
DBG(1)[53612]> CURL> No mirror set url to https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf

DBG(1)[53612]> CURL> attempting to fetch from https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf, left retry 1

* Couldn't find host pkg.FreeBSD.org in the .netrc file; using defaults
* Could not resolve host: pkg.FreeBSD.org
* Closing connection
pkg: An error occured while fetching package
DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.txz
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.txz -- pkg+:// implies SRV mirror type
repository FreeBSD has no meta file, using default settings
DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/data.pkg
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/data.pkg -- pkg+:// implies SRV mirror type
DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/data.txz
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/data.txz -- pkg+:// implies SRV mirror type
DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/packagesite.pkg
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/packagesite.pkg -- pkg+:// implies SRV mirror type
DBG(1)[53612]> Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/packagesite.txz
pkg: packagesite URL error for pkg+https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/packagesite.txz -- pkg+:// implies SRV mirror type
Unable to update repository FreeBSD
Error updating repositories!
#

What I don't understand here is that it works perfectly fine on a native host, and I don't see anything obvious.  I can ping pkg.freebsd.org:

# ping pkg.freebsd.org
PING pkgmir.geo.freebsd.org (173.228.147.98): 56 data bytes
64 bytes from 173.228.147.98: icmp_seq=0 ttl=49 time=58.336 ms
^C
--- pkgmir.geo.freebsd.org ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 58.336/58.336/58.336/0.000 ms

Further, a "fetch" against the first requested file (meta.conf) that the pkg command complains about succeeds:

# fetch https://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest/meta.conf
meta.conf                                              178  B 1687 kBps    00s

Any ideas on where to look?  I turned debugging on with "-d" because the original build was not giving me any idea of what was happening, but this appears to imply there's no connectivity out of the VM in that it can't resolve the hostname -- but there is, obviously.

Pkg against the base installed system works properly and have a decent number of packages installed (specifically git and its dependencies, which was loaded to grab the source tree of course.)

Thanks in advance.

-- 
Karl Denninger
karl@denninger.net
/The Market Ticker/
/[S/MIME encrypted email preferred]/

 
 
 
Pkg -c .
This does chroot. Did you configure /etc/resolv.conf in the arm64 mount?
 
try chroot . ping pkg.freebsd.org in that same directory. 
 
Regards,
Ronald
 


I don't have experience with crochet, but I found this documentation about crochet, pkg and resolv.conf.

https://github.com/freebsd/crochet?tab=readme-ov-file#using-pkg

Happy hacking!
Ronald.
  ------=_Part_1713_1753761224.1721114720914--