From owner-freebsd-stable@FreeBSD.ORG Sun Apr 5 00:26:28 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53A03871; Sun, 5 Apr 2015 00:26:28 +0000 (UTC) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 142BD649; Sun, 5 Apr 2015 00:26:28 +0000 (UTC) Received: by obbgh1 with SMTP id gh1so2615168obb.1; Sat, 04 Apr 2015 17:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=KNHubj2ugQUQn4Kj23W9joNMgB7M7/nsM/H2ftzqaNU=; b=shj9Az6bl6Fh4AHCYMSw0qQCEmppTCCY9mCu8Dvx7U2tqwW9D8mb/F4E/N7Nr2cpzY TTNgwmn1xK33pzsaIRxnLnd5rYmTVLwozNlO4RjHIPJa7nLakWImnsdYrHp/kSR8zVed ja2pSNy/DrxwthVzvaiBrQJP3NCTyvfMYAUCQQYgOwmNVM6UJNNipdZE5ZvBO8P5Nt36 JQ/wZ+0u0HCf5GgGDFB5KCcxsU/8wbQ/1PAEecC2d+9Da1waePCWh5/zRj6FcYVRK4NA Yn967cN4tZR7aH6BbKZNfEok99W8goj5YllDONZ1Sg675kX3z80y2FnIVoXMQOotWBDQ aThw== MIME-Version: 1.0 X-Received: by 10.60.77.38 with SMTP id p6mr10663592oew.75.1428193587201; Sat, 04 Apr 2015 17:26:27 -0700 (PDT) Received: by 10.202.177.136 with HTTP; Sat, 4 Apr 2015 17:26:27 -0700 (PDT) In-Reply-To: References: <20150402183939.GC30115@ivaldir.etoilebsd.net> Date: Sun, 5 Apr 2015 02:26:27 +0200 Message-ID: Subject: Re: pkgng cannot fetch from PACKAGESITE with nanobsd.sh in FreeBSD 10.1 From: Zenny To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-stable@freebsd.org" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 00:26:28 -0000 Hi again, I appended the nanobsd configuration file with: cust_NANOBSD_packages() { env SSL_NO_VERIFY_HOSTNAME=3D"true" \ env SSL_NO_VERIFY_PPER=3D"true" \ pkg -c ${NANO_WORLDIR} install -fy ${PACKAGELIST} env SSL_NO_VERIFY_HOSTNAME=3D"true" \ SSL_NO_VERIFY_PEER=3D"true" \ pkg -c ${NANO_WORLDDIR} clean -a -y rm -f ${NANO_WORLDDIR}/var/db/pkg/repo-*.sqlite } But it keeps on saying that both -f and -y option for the package is illegal as shown below: + cust_NANOBSD_packages + env SSL_NO_VERIFY_HOSTNAME=3Dtrue env SSL_NO_VERIFY_PPER=3Dtrue pkg -c install -fy nano pkg: illegal option -- f pkg: illegal option -- y pkg: chroot failed! When I install with -y flag on the host node, it works fine, but causing problem only in the chrooted environment. Where did I get wrong? Thanks in advance. Cheers, /z when I checked On 4/3/15, Zenny wrote: > On 4/2/15, Baptiste Daroussin wrote: >> On Wed, Apr 01, 2015 at 12:48:21PM +0200, Zenny wrote: >>> Hi, >>> >>> 1. In order to comply with the pkgng in FreeBSD 10.1, the following >>> changes >>> were appended to my customized nanobsd.conf: >>> >>> customize_cmd cust_NANOBSD_setup >>> > >>> > cust_NANOBSD_packages() { >>> > chroot ${NANO_WORLDDIR} sh -c 'cd packages; pkg; pkg install nano; pk= g >>> > clean;' >>> > } >>> > >>> > customize_cmd cust_NANOBSD_packages >>> > >>> >>> Certainly I had tuned chrooted /etc/resolv.conf with: >>> >>> #tune resolv.conf >>> > echo ' >>> > nameserver 8.8.8.8 >>> > nameserver 8.8.4.4 >>> > ' >> ${NANO_WORLDDIR}/etc/resolv.conf >>> > >> >> This tuning is not needed you can specify the nameserver on pkg command >> line: >> pkg -o NAMESERVER=3D"8.8.8.8" -c ${NANO_WORLDDIR} update > > Segmentation fault with above, > + cust_NANOBSD_packages > + pkg -o NAMESERVER=3D8.8.8.8 -c /usr/obj/nanobsd.NANOBSD//_.w update > Child process pid=3D88756 terminated abnormally: Segmentation fault > > # dmesg | grep pkg =E2= =94=82 > pid 88756 (pkg), uid 0: exited on signal 11 (core dumped) > >> >> You can also simply add NAMESERVER in your environement variable >>> >>> Still the package cannot be downloaded from PACKAGESITE and got built >>> into >>> nanobsd image. >>> >>> 2. Also tried with: >>> >>> cust_pkg() { >>> > pkg -c ${NANO_WORLDDIR} update >>> > pkg -c ${NANO_WORLDDIR} install nano >>> > pkg -c ${NANO_WORLDDIR} clean >>> > } >>> > >>> > customize_cmd cust_pkg >>> > >>> >>> Both ways, I get the same error that reads as of below: >>> >>> cd: packages: No such file or directory >>> > pkg: Error fetching >>> > http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/Latest/pkg.txz: No >>> > address record >>> > A pre-built version of pkg could not be found for your system. >>> > Consider changing PACKAGESITE or installing it from ports: >>> > 'ports-mgmt/pkg'. >>> > The package management tool is not yet installed on your system. >>> > Do you want to fetch and install it now? [y/N]: Bootstrapping pkg fro= m >>> > pkg+ >>> > http://pkg.FreeBSD.org/freebsd:10:x86:64/latest, please wait... >>> > pkg: Error fetching >>> > http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/Latest/pkg.txz: No >>> > address record >>> > A pre-built version of pkg could not be found for your system. >>> > Consider changing PACKAGESITE or installing it from ports: >>> > 'ports-mgmt/pkg'. >>> > The package management tool is not yet installed on your system. >>> > Do you want to fetch and install it now? [y/N]: Bootstrapping pkg fro= m >>> > pkg+ >>> > http://pkg.FreeBSD.org/freebsd:10:x86:64/latest, please wait... >>> > pkg: Error fetching >>> > http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/Latest/pkg.txz: No >>> > address record >>> > A pre-built version of pkg could not be found for your system. >>> > Consider changing PACKAGESITE or installing it from ports: >>> > 'ports-mgmt/pkg'. >>> > The package management tool is not yet installed on your system. >>> > Do you want to fetch and install it now? [y/N]: Bootstrapping pkg fro= m >>> > pkg+ >>> > http://pkg.FreeBSD.org/freebsd:10:x86:64/latest, please wait... >>> > >>> >> Is pkg installed on your host? it seems not? >> >> Best regards, >> Bapt >> >