[Bug 206917] ports-mgmt/pkg: url: "file:///xxx" in repos.conf not working!

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Sep 16 16:32:25 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206917

ohartman at zedat.fu-berlin.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Closed                      |Open
         Resolution|FIXED                       |---

--- Comment #3 from ohartman at zedat.fu-berlin.de ---
This bug still persists and I can not fathom why it has been closed!

Within the nanoBSD world, this is the scripted function which is supposed to
install the packages, see below.

Using a local host which provides pkg/FreeBSD:12:x86:64/latest as a repository
works fine, but it is lately on CURRENT incredibly slow (libfetch problem?).

But the file:/// tag still doesn't work!

    #url:            "file:///extern/pkg/\${ABI}/latest/",

is a autofs share, exported via NFS from a host which does have a complete
repository created via poudriere.

    url:            "file:///pool/test/\${ABI}/latest/",

is a local hosted copy, pool/test is a ZFS filesystem and under latest I have
the exact copy what we see under the autofs file system mentioned above.

I also tried file://localhost/... or file://127.0.0.1/... which is supposed to
work according libfecth(3).

Tests, which obviously work so far:

root at thor: [gllb] fetch file:///pool/test/FreeBSD:12:x86:64/latest/meta.txz .
meta.txz                                      100% of  264  B 4096 kBps 00m00s
fetch: .: open(): Is a directory
root at thor: [gllb]

The same game with the autofs filesystem, /extern/pkg.


cust_local_pkg_install_cfg() {

    local   RCCONF_PKG RCCONF_REPOS

    if [ ! -z "${PACKAGES}" ]
    then
        RCCONF_PKG="usr/local/etc/pkg.conf"
        RCCONF_REPOS="usr/local/etc/pkg/repos/myrepo.conf"

        # Local, temporary cache dir for pkg(8)
        LOCAL_REPOS_DIR="/usr/local/etc/pkg/repos"
        PKG_CACHEDIR="/var/cache/pkg"
        PKG_DBDIR="/var/db/pkg"
        ASSUME_ALWAYS_YES="YES"

        if [ ! -d "${NANO_WORLDDIR}/usr/local/etc/pkg/repos" ]
        then
            mkdir -p -m755 ${NANO_WORLDDIR}/usr/local/etc/pkg/repos
        fi

        cd ${NANO_WORLDDIR}

        cat > ${RCCONF_PKG} <<EOF
syslog:             false
autodeps:           true
assume_always_yes:  true
pkg_dbdir:          "${PKG_DBDIR}"
pkg_cachedir:       "${PKG_CACHEDIR}"
portsdir:           "/usr/ports"

EOF

        cat > ${RCCONF_REPOS} <<EOF
walstatt.dynvpn.de: {
    #url: "pkg+http://local.host.de/pkg/\${ABI}/latest/",
    #mirror_type: "srv",
    #url:            "file:///extern/pkg/\${ABI}/latest/",
    url:            "file:///pool/test/\${ABI}/latest/",
    mirror_type:    "none",
        sinature_type:  "none",
    #pubkey:         "/usr/local/etc/ssl/certs/repo.pub",
    enabled:        yes
}

FreeBSD-ext: {
    url:            "pkg+http://pkg.FreeBSD.org/\${ABI}/latest",
    sinature_type:  "none",
    mirror_type:    "srv",
    #pubkey:         "/usr/local/etc/ssl/certs/repo.pub",
    enabled:        no
}

FreeBSD: {
    enabled: no
}
EOF

        env ${DEFAULT_VERSIONS} ALTABI=${ABI} ABI=${ABI} pkg -c
${NANO_WORLDDIR} install -fRy ${PACKAGES}
        # Cleanup
        pkg -c ${NANO_WORLDDIR} clean
        #pkg -c ${NANO_WORLDDIR} -qy autoremove

        # clean cache, saving space
        rm -rvf ${NANO_WORLDDIR}/var/cache/pkg
    fi

}
customize_cmd   cust_local_pkg_install_cfg

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-pkg mailing list