Re: installing packages into a mounted system
Hello, To close this thread: after reading and understandig how it should work, I have found the following easy solution: # chroot /mnt pkg-static repo /PKGDIR Creating repository in /PKGDIR: 83% ... Packing files for repository: 100% # chroot /mnt mkdir -p /usr/local/etc/pkg/repos # vim /mnt/usr/local/etc/pkg/repos/myrepo.conf # cat /mnt/usr/local/etc/pkg/repos/myrepo.conf FreeBSD: { url: "file:/PKGDIR", enabled: true, } # chroot /mnt pkg-static -R /usr/local/etc/pkg/repos/ install autoconf-2.69 Updating repository catalogue FreeBSD repository is up-to-date All repositories are up-to-date The following 5 packages will be affected (of 0 checked): New packages to be INSTALLED: autoconf: 2.69 indexinfo: 0.2 perl5: 5.16.3_11 m4: 1.4.17_1,1 autoconf-wrapper: 20131203 The process will require 45 MB more space 13 MB to be downloaded Proceed with this action [y/N]: y Fetching autoconf-2.69.txz: 100% of 529 KB Fetching indexinfo-0.2.txz: 100% of 6 KB Fetching perl5-5.16.3_11.txz: 100% of 12 MB Fetching m4-1.4.17_1,1.txz: 100% of 183 KB Fetching autoconf-wrapper-20131203.txz: 100% of 4 KB Checking integrity... done (0 conflicting) [1/5] Installing indexinfo-0.2: 100% [2/5] Installing perl5-5.16.3_11: 100% [3/5] Installing m4-1.4.17_1,1: 100% [4/5] Installing autoconf-wrapper-20131203: 100% [5/5] Installing autoconf-2.69: 100% # chroot /mnt pkg-static info autoconf-2.69 Automatically configure source code on many Un*x platforms autoconf-wrapper-20131203 Wrapper script for GNU autoconf indexinfo-0.2 Utility to regenerate the GNU info page index m4-1.4.17_1,1 GNU m4 perl5-5.16.3_11Practical Extraction and Report Language Works fine. Thanks to the people who designed this new pkg tool. matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: E-mail: g...@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X- No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: installing packages into a mounted system
On Thu, 14 Aug 2014 15:31:11 +0200 Matthias Apitz wrote: > El día Thursday, August 14, 2014 a las 09:22:38AM -0400, Nikolai > Lifanov escribió: > > > > # PACKAGESITE=file://PKGDIR export PACKAGESITE > > > # chroot /mnt /usr/local/sbin/pkg-static install xorg-7.7 > > > Updating repository catalogue > > > pkg-static: file://PKGDIR/digests.txz: No such file or directory > > > pkg-static: No digest falling back on legacy catalog format > > > pkg-static: file://PKGDIR/repo.txz: No such file or directory > > > > > > > >From the man page: > > pkg [-v] [-d] [-l] [-N] [-j | -c > path>] > > > > You could try copying pkg-static inside the chroot and use > > pkg-static -c (from the host, don't invoke the chroot command > > manually). > > > > I have been installing packages to jails this way for a while. > > # pkg-static -c /mnt install xorg-7.7 > > gives the same error messages as above. > Did you run "pkg repo" on your repo, e.g. cd mypackerepodir pkg repo . If you don't want to use a repo you could also use "pkg add", e.g. cd $PKGDIR && pkg add xorg-7.7.txz -- Michael Gmelin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: installing packages into a mounted system
El día Thursday, August 14, 2014 a las 09:22:38AM -0400, Nikolai Lifanov escribió: > > # PACKAGESITE=file://PKGDIR export PACKAGESITE > > # chroot /mnt /usr/local/sbin/pkg-static install xorg-7.7 > > Updating repository catalogue > > pkg-static: file://PKGDIR/digests.txz: No such file or directory > > pkg-static: No digest falling back on legacy catalog format > > pkg-static: file://PKGDIR/repo.txz: No such file or directory > > > > >From the man page: > pkg [-v] [-d] [-l] [-N] [-j | -c ] > > You could try copying pkg-static inside the chroot and use pkg-static -c > (from the host, don't invoke the chroot command manually). > > I have been installing packages to jails this way for a while. # pkg-static -c /mnt install xorg-7.7 gives the same error messages as above. Thanks matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: E-mail: g...@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X- No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
installing packages into a mounted system
Hello, I've compiled ~1300 packages with poudriere 3.1pre on a 'head' system; went fine; mounted below /mnt is a complete new system (an USB key) which boots fine alreaday; the 1300 resulting *.txz file are copied into /mnt/PKGDIR in the past, using the pkg_* tools, I could just install the packages with: # PKG_PATH=/PKGDIR # export PKG_PATH # chroot /mnt pkg_add xorg-7.7 # chroot /mnt pkg_add kde-4.10.5 ... How this can be done now with pkg(8)? I thought I will compile a pkg-static and move this to into the /mnt system too with # chroot /mnt mkdir -p /usr/local/sbin # cp -p /usr/local/sbin/pkg-static /mnt/usr/local/sbin pkg-static(8) works there, bringing up the help with: # chroot /mnt /usr/local/sbin/pkg-static help But, how do I specify that it should install for example xorg-7.7 having its file (and all others) in /mnt/PKGDIR/xorg-7.7.txz It seems to look for some files digests.txz or repo.txz which I do not have: # PACKAGESITE=file://PKGDIR export PACKAGESITE # chroot /mnt /usr/local/sbin/pkg-static install xorg-7.7 Updating repository catalogue pkg-static: file://PKGDIR/digests.txz: No such file or directory pkg-static: No digest falling back on legacy catalog format pkg-static: file://PKGDIR/repo.txz: No such file or directory Any hints? Thx matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: E-mail: g...@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X- No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"