From owner-freebsd-ports@FreeBSD.ORG Tue Apr 21 16:34:59 2015 Return-Path: Delivered-To: freebsd-ports@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 C5069A32 for ; Tue, 21 Apr 2015 16:34:59 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (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 55E341EC8 for ; Tue, 21 Apr 2015 16:34:59 +0000 (UTC) Received: by widdi4 with SMTP id di4so28233746wid.0 for ; Tue, 21 Apr 2015 09:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=xe9agIYYHXvo+4sDVqWpM+awHFZK9a++fDMryPdjRqU=; b=IHQJN2qeCpM/alPj/R09BdAUnnWs4IeXjB0V01TfyBYvz1cWr3HJlr5w0CHrLllMcr 6MSbW5J5g6HIg6B+mC0v6+kI6iuQWA696zi5POrKd3PJlzkc1IcEj4zENX3Yo44hMqxr 1mrT+FFP0cUXutOfaCnB+1oxw4fgduA4uPfwfAg3s7TATXFxXL5mo51QRnRTQG8L0MTC Y2AlZQOnhn+sr9ba+QlvnZkF+f+cVsqxQZ8GvOX7Up8P4fTRF2DAnquqoSYamhUPTvE9 1ryiC7bMCNdjwn9ycn3P/b6+WbJCR8R2PXA6S8iigFUzQrBcA020ZaVuQ40nyb53K3r8 ZwmA== X-Received: by 10.194.235.71 with SMTP id uk7mr42990556wjc.13.1429634097129; Tue, 21 Apr 2015 09:34:57 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id ex5sm3798460wib.2.2015.04.21.09.34.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Apr 2015 09:34:56 -0700 (PDT) Sender: Baptiste Daroussin Date: Tue, 21 Apr 2015 18:34:54 +0200 From: Baptiste Daroussin To: Ben Woods Cc: Dan Langille , ports Subject: Re: pkg-static: Insufficient privileges to add packages Message-ID: <20150421163454.GA40188@ivaldir.etoilebsd.net> References: <31714E44-6041-4B5F-BDB0-FA7131ED7EB4@langille.org> <7A1D4136-BBEF-4726-B1E2-51CF3DD285C2@langille.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 16:34:59 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 21, 2015 at 11:44:01PM +0800, Ben Woods wrote: > >> On Tue, Apr 21, 2015 at 4:02 AM Dan Langille wrote: > >>> > >>> I am running a testport on www/py-django-tastypie > >>> > >>> My goal it to add an option for using www/django16 as well as www/dja= ngo > >>> (1.7). > >>> > >>> The error I get is: > >>> > >>> $ sudo poudriere testport -v -j 101amd64 -p testing -z testing -i -o > >>> www/py-django-tastypie > >>> ... > >>> =3D=3D=3D> Verifying install for py27-django>=3D1.5 in > >>> /usr/ports/www/py-django16 > >>> =3D=3D=3D> Installing existing package /packages/All/py27-django16-= 1.6.11.txz > >>> pkg-static: Insufficient privileges to add packages > >>> > >>> But because I'm running testport interactively, I see I can install t= he > >>> port it mentions: > >>> > >>> root@101amd64-testing-testing:~ # pkg install > >>> /packages/All/py27-django16-1.6.11.txz > >>> Updating local repository catalogue... > >>> [101amd64-testing-testing] Fetching meta.txz: 100% 816 B 0.8kB/s > >>> 00:01 > >>> [101amd64-testing-testing] Fetching packagesite.txz: 100% 50 KiB > >>> 51.4kB/s 00:01 > >>> Processing entries: 100% > >>> local repository update completed. 205 packages processed. > >>> Updating database digests format: 100% > >>> Checking integrity... done (0 conflicting) > >>> The following 1 package(s) will be affected (of 0 checked): > >>> > >>> New packages to be INSTALLED: > >>> py27-django16: 1.6.11 > >>> > >>> The process will require 27 MiB more space. > >>> > >>> Proceed with this action? [y/N]: y > >>> [101amd64-testing-testing] [1/1] Installing py27-django16-1.6.11... > >>> [101amd64-testing-testing] [1/1] Extracting py27-django16-1.6.11: 100% > >>> root@101amd64-testing-testing:~ # > >>> > >>> > >>> Why does the testport fail? > >>> > >>> Full build log here: > >>> http://services.unixathome.org/poudriere/data/101amd64-testing-testin= g/2015-04-20_19h53m23s/logs/errors/py27-django-tastypie-0.12.1.log > >> > >> > >> That error is generated in the pkg exec_add function in src/add.c here: > >> https://github.com/freebsd/pkg/blob/master/src/add.c > >> > >> It occurs because it checks the package database for read, write, crea= te > >> access using the pkgdb_access and pkgdb_check_access functions in > >> libpkg/pkgdb.c here: > >> https://github.com/freebsd/pkg/blob/master/libpkg/pkgdb.c > >> > >> I believe this is inside the jail created by poudriere testport. It wo= uld > >> be interesting to add the -i interactive flag to the testport run and = check > >> the permissions on/in the pkg database. Mine are here for reference: > >> % ls -lah /var/db/pkg/ > >> total 37484 > >> drwxr-xr-x 2 root wheel 8B 21 Apr 06:00 . > >> drwxr-xr-x 13 root wheel 19B 21 Apr 06:13 .. > >> -rw-r--r-- 1 root wheel 246B 4 Dec 06:22 FreeBSD.meta > >> -rw-r--r-- 1 root wheel 11M 21 Apr 06:00 local.sqlite > >> -rw-r--r-- 1 root wheel 246B 21 Apr 03:05 poudriere.meta > >> -rw-r--r-- 1 root wheel 49M 4 Dec 06:22 repo-FreeBSD.sqlite > >> -rw-r--r-- 1 root wheel 1.6M 21 Apr 03:05 repo-poudriere.sqlite > >> -r--r--r-- 1 root wheel 3.3M 21 Apr 03:17 vuln.xml > >> > >> Regards, > >> Ben > >> > >> > >> > >> > >> Hand on a minute.... now my poudriere system is doing the same thing - > >> looks like we have a bug somewhere. > >> > >> I am running pkg 1.5.1 and poudriere 3.1.4. According to freshports, p= kg > >> was updated on 16th April, and poudriere on 10th April. > >> > >> Inside my poudriere testport jail (using the -i interactive mode flag)= , I > >> have: > >> # ls -lah /var/db/pkg/ > >> total 7953 > >> drwxr-xr-x 2 root wheel 3B Apr 20 23:17 . > >> drwxr-xr-x 12 root wheel 14B Apr 20 23:17 .. > >> -rw-r--r-- 1 root wheel 7.7M Apr 20 23:17 local.sqlite > >> > >> Thoughts? > > > > Here's what I have: > > > > Edit /etc/motd to change this login announcement. > > root@101amd64-testing-testing:~ # ls -lah /var/db/pkg/ > > total 2991 > > drwxr-xr-x 2 root wheel 3B Apr 21 13:28 . > > drwxr-xr-x 10 root wheel 12B Mar 14 19:18 .. > > -rw-r--r-- 1 root wheel 2.8M Apr 21 13:28 local.sqlite > > root@101amd64-testing-testing:~ # > > > > =E2=80=94 > > Dan Langille > > http://langille.org/ >=20 > For the record, downgrading pkg to 1.4.12 and poudriere to 3.1.2 did > not fix this issue for me. >=20 > The port that I am trying to testport on FreeBSD 10.1 is > math/plplot-ada. The testport permission issues do not occur with the > port as it is currently - only after making the changes I have > proposed to math/plplot here: > https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D155771&action=3Ddiff I found the reason for Dan by checking the logs, If I could see your own l= ogs then I will tell you where you mistake is. actually you are having poudriere building as a user (internally to the jai= l) which is a very good thing as it allows to catch things like this :D) I mean it is dropping roots priviledges to build, stage and make package. but still try to install a dependency there, probably because the dependency line you have in your port is buggy. In dan case he was testing if py27-django>=3D1.5 but was refering to the www/py-django16 port which resul= t in a package named py27-django16 which is not py27-django aka the test will alwa= ys fail and the ports tree will try to reinstall again and again even in phases when it cannot due to lack of priviledges As a conclusion the bug is in the port you are testing not in pkg, neither = in poudriere. If you show me the logs of your own build I will tell you what is your mist= ake. Best regards, Bapt --zhXaljGHf11kAtnf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlU2fC4ACgkQ8kTtMUmk6Exh9wCdEQjskYVBAvBbCIXeIk93fv22 flcAnA6ZCHt/xSp3UP2hTnrperolEp7z =6WuX -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--