From owner-freebsd-ports@FreeBSD.ORG Tue Apr 21 16:52:14 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB1C9E7D; Tue, 21 Apr 2015 16:52:14 +0000 (UTC) Received: from clavin1.langille.org (clavin.langille.org [162.208.116.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "clavin.langille.org", Issuer "StartCom Class 2 Primary Intermediate Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F079110C5; Tue, 21 Apr 2015 16:52:13 +0000 (UTC) Received: from (clavin1.int.langille.org (clavin1.int.unixathome.org [10.4.7.7]) (Authenticated sender: hidden) with ESMTPSA id C2CAD35D3 ; Tue, 21 Apr 2015 16:52:12 +0000 (UTC) Subject: Re: pkg-static: Insufficient privileges to add packages Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_AA6179F5-C125-4295-A50A-3E9EFDA20C11"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Dan Langille In-Reply-To: <20150421163454.GA40188@ivaldir.etoilebsd.net> Date: Tue, 21 Apr 2015 12:52:10 -0400 Cc: Ben Woods , ports Message-Id: <950A0713-F6BE-452E-92A2-EEC5FEAC8278@langille.org> References: <31714E44-6041-4B5F-BDB0-FA7131ED7EB4@langille.org> <7A1D4136-BBEF-4726-B1E2-51CF3DD285C2@langille.org> <20150421163454.GA40188@ivaldir.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.2098) 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:52:15 -0000 --Apple-Mail=_AA6179F5-C125-4295-A50A-3E9EFDA20C11 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 21, 2015, at 12:34 PM, Baptiste Daroussin = wrote: >=20 > 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: >>>>>=20 >>>>> I am running a testport on www/py-django-tastypie >>>>>=20 >>>>> My goal it to add an option for using www/django16 as well as = www/django >>>>> (1.7). >>>>>=20 >>>>> The error I get is: >>>>>=20 >>>>> $ 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 >>>>>=20 >>>>> But because I'm running testport interactively, I see I can = install the >>>>> port it mentions: >>>>>=20 >>>>> 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): >>>>>=20 >>>>> New packages to be INSTALLED: >>>>> py27-django16: 1.6.11 >>>>>=20 >>>>> The process will require 27 MiB more space. >>>>>=20 >>>>> 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:~ # >>>>>=20 >>>>>=20 >>>>> Why does the testport fail? >>>>>=20 >>>>> Full build log here: >>>>> = http://services.unixathome.org/poudriere/data/101amd64-testing-testing/201= 5-04-20_19h53m23s/logs/errors/py27-django-tastypie-0.12.1.log >>>>=20 >>>>=20 >>>> 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 >>>>=20 >>>> 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 >>>>=20 >>>> 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 >>>>=20 >>>> Regards, >>>> Ben >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> Hand on a minute.... now my poudriere system is doing the same = thing - >>>> looks like we have a bug somewhere. >>>>=20 >>>> I am running pkg 1.5.1 and poudriere 3.1.4. According to = freshports, pkg >>>> was updated on 16th April, and poudriere on 10th April. >>>>=20 >>>> 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 >>>>=20 >>>> Thoughts? >>>=20 >>> Here's what I have: >>>=20 >>> 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:~ # >>>=20 >>> =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= >=20 > I found the reason for Dan by checking the logs, If I could see your = own logs > then I will tell you where you mistake is. >=20 > actually you are having poudriere building as a user (internally to = the jail) > which is a very good thing as it allows to catch things like this :D) >=20 > I mean it is dropping roots priviledges to build, stage and make = package. >=20 > 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 = result in a > package named py27-django16 which is not py27-django aka the test will = always > fail and the ports tree will try to reinstall again and again even in = phases > when it cannot due to lack of priviledges >=20 > As a conclusion the bug is in the port you are testing not in pkg, = neither in > poudriere. >=20 > If you show me the logs of your own build I will tell you what is your = mistake. This change fixed it for me: before: DJANGO16_RUN_DEPENDS=3D = ${PYTHON_PKGNAMEPREFIX}django>=3D1.5:${PORTSDIR}/www/py-django16 DJANGO17_RUN_DEPENDS=3D = ${PYTHON_PKGNAMEPREFIX}django>=3D1.5:${PORTSDIR}/www/py-django After: DJANGO16_RUN_DEPENDS=3D = ${PYTHON_PKGNAMEPREFIX}django16>0:${PORTSDIR}/www/py-django16 DJANGO17_RUN_DEPENDS=3D = ${PYTHON_PKGNAMEPREFIX}django17>0:${PORTSDIR}/www/py-django =E2=80=94 Dan Langille http://langille.org/ --Apple-Mail=_AA6179F5-C125-4295-A50A-3E9EFDA20C11 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQJ8BAEBCgBmBQJVNoA7XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1MTE2RjM0ODIzRDdERDM4OTY0OUJBNzdF QjIxNTlERUU5NzI3MzlGAAoJEOshWd7pcnOfSo8P/21U5Q32HqHUam10E/8M9jnh pjStIuwlNxO/xWMOHNQKvt0g53+jVqCkk6bRVVfhNW0CVvOfwPG6wRu4ySxvHvVx IWDnK2IsUbvDxC6iqi5Als9SkIyaxB8ipjPSLPJ+1dRADuDt+/TOUxs12Gf+v+6r 8XS7pnY+43NF9Sf9F8AfJW1Bfbndj/NJKePtVyzsn2tGDUMh/NKCY/KjZc6HLCXT tJj5Q36hO4QqPvzZBQV6AYEhuL6ejZPbHhjFqJCsLXQa/ctvry8xbQf0TAks17u0 35Dg7K7UpOQYGtVUlV04CvcXBrWfnBsu/lrg3/gVr98d0v29rUKX4bCMCZyP/4Yb GRj36D/p3LLuKgh0aEsB/QD/ITRO3heZiFR8Zl1dJ9y40KZZk8uS7YAZkZ61lsUk aOQM6H1R/9365jyWu+zd703PRzBQ00dJQGJq57zGxXmvGqGiFW1+1vOh/ToPmwDm LsXUUrWS+24VeK+KgFCzIriadpT0DXzB5yuhyCO+XGYapp1vl0pjIfuPSwfa65sf 9JkIw8bfvllFJBfKyFexDomABcEfcNMp9vU/kIRrERBrfLeR5WL1HeGTnmCuLvyG dytdCmOerEsLiSiShAw0IEolkujZEey5QdgLcvd0zMX+H1zklUvVzWnDT+Vgea5M gVWKialv1e15dR2Bshge =O8JY -----END PGP SIGNATURE----- --Apple-Mail=_AA6179F5-C125-4295-A50A-3E9EFDA20C11--