From owner-freebsd-ports@FreeBSD.ORG Mon Apr 20 22:57:02 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 56EEC719 for ; Mon, 20 Apr 2015 22:57:02 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (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 2793DFEE for ; Mon, 20 Apr 2015 22:57:02 +0000 (UTC) Received: by iejt8 with SMTP id t8so1209804iej.2 for ; Mon, 20 Apr 2015 15:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=4JMFhnlg57xIShb59WS44DQDLBz8A/B6gzvl0m4t6Kc=; b=QlClvKyESqonwA/ykjlFZmNPfbpd76jpL26UJn46QExfl4jI0tPCruLq7tzJBJqtJW Z45xthdbxTMkBI7ZGVPPTMqTG796H/FBm4JcX//Y5AZcniQ8NqJxaSyLpDnqBw5iNBYb xvvZXxrNGbpZy+o6zoRZnF7jYniyrL8Cl+afpmSreAn5sd26A3WUxZ3AVAzeqMXB/Qxu vfkUxb8KNIfz4dI0LXNrIPiUSnD4DTxX2m3L0vzYqwnm+fF50W2w/6Oy+jrJEmXZWyR8 WZRvjQBLZCfaeggUUNaR6F304Y2y90czs0pmdp2bdw/Dsbe5K/gt+J+yqQKB3mUvprzr qcNQ== X-Received: by 10.50.66.230 with SMTP id i6mr250949igt.22.1429570620977; Mon, 20 Apr 2015 15:57:00 -0700 (PDT) MIME-Version: 1.0 References: <31714E44-6041-4B5F-BDB0-FA7131ED7EB4@langille.org> In-Reply-To: <31714E44-6041-4B5F-BDB0-FA7131ED7EB4@langille.org> From: Ben Woods Date: Mon, 20 Apr 2015 22:57:00 +0000 Message-ID: Subject: Re: pkg-static: Insufficient privileges to add packages To: Dan Langille , ports Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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: Mon, 20 Apr 2015 22:57:02 -0000 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, create 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 would 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 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/django > (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 the > 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-testing/20= 15-04-20_19h53m23s/logs/errors/py27-django-tastypie-0.12.1.log > > > > =E2=80=94 > Dan Langille > http://langille.org/ > > > > > >