We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hit this error when recently upgraded from 1.17.0 to 1.20.0 in cross toolchain setup dotnet/dotnet-buildtools-prereqs-docker#965.
Repro (ubuntu amd64):
#!/usr/bin/env bash set -e __RootfsDir=$(pwd)/.tools/rootfs/x64 __FreeBSDPkg=1.20.0 # works with 1.17.0 mkdir -p $__RootfsDir/usr/local/etc wget -O - https://download.freebsd.org/ftp/releases/amd64/amd64/14.0-RELEASE/base.txz | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version echo "ABI = \"FreeBSD:14:amd64\"; FINGERPRINTS = \"$__RootfsDir/usr/share/keys\"; REPOS_DIR = [\"$__RootfsDir/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > "${__RootfsDir}"/usr/local/etc/pkg.conf echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"$__RootfsDir/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf mkdir -p $__RootfsDir/tmp wget -O - "https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz" | tar -C $__RootfsDir/tmp -zxf - cd $__RootfsDir/tmp/pkg-$__FreeBSDPkg mkdir -p $__RootfsDir/host/etc ./autogen.sh && ./configure --prefix="$__RootfsDir"/host && make -j && make install rm -rf $__RootfsDir/tmp/pkg-$__FreeBSDPkg INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf install --yes libunwind icu libinotify openssl krb5 terminfo-db
With pwd=/testdir, it fails:
/testdir
pkg: Error opening the trusted directory /testdir/.tools/rootfs/x64/usr/share/keys/pkg/trusted pkg: Error loading trusted certificates Unable to update repository FreeBSD Error updating repositories!
seems like RELATIVE_PATH macro trims the leading / which fails openat:
RELATIVE_PATH
/
openat
pkg/libpkg/pkg_repo.c
Line 1057 in e738762
strace:
[pid 11734] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11739, si_uid=33333, si_status=0, si_utime=42, si_stime=6} --- [pid 11734] openat(4, "testdir/.tools/rootfs/x64/usr/share/keys/pkg/trusted", O_RDONLY|O_DIRECTORY) = -1 ENOENT (No such file or directory) [pid 11734] write(2, "pkg: ", 5pkg: ) = 5
The text was updated successfully, but these errors were encountered:
1.17.2 appears to be the last version that worked. 1.17.3 started throwing the above error
Sorry, something went wrong.
changed in 7ba7039 @bapt can you take a look?
No branches or pull requests
Hit this error when recently upgraded from 1.17.0 to 1.20.0 in cross toolchain setup dotnet/dotnet-buildtools-prereqs-docker#965.
Repro (ubuntu amd64):
With pwd=
/testdir
, it fails:seems like
RELATIVE_PATH
macro trims the leading/
which failsopenat
:pkg/libpkg/pkg_repo.c
Line 1057 in e738762
strace:
The text was updated successfully, but these errors were encountered: