Date: Wed, 22 Apr 2015 01:51:25 +0200 From: Baptiste Daroussin <bapt@freebsd.org> To: Ben Woods <woodsb02@gmail.com> Cc: Dan Langille <dan@langille.org>, ports <freebsd-ports@freebsd.org> Subject: Re: pkg-static: Insufficient privileges to add packages Message-ID: <20150421235125.GD40188@ivaldir.etoilebsd.net> In-Reply-To: <CAOc73CDZi0gZhG6BtxSJjgg4j-M5dbkVZcAzUzpmvmb5oPOC1Q@mail.gmail.com> References: <31714E44-6041-4B5F-BDB0-FA7131ED7EB4@langille.org> <CAOc73CCDGjyzio6z7F1PQ0ttwrmFtbvHz1s7w-TWi5aKLoyb1A@mail.gmail.com> <CAOc73CD0XREAW0O_pMp7nB2vqE-MoHAAbKsYcLQcT0PC6jT%2BVA@mail.gmail.com> <7A1D4136-BBEF-4726-B1E2-51CF3DD285C2@langille.org> <CAOc73CCKUq2E2ign1R9h9tGRm-dEfd18O-rRE3ca52Qj_XrnUw@mail.gmail.com> <20150421163454.GA40188@ivaldir.etoilebsd.net> <CAOc73CDZi0gZhG6BtxSJjgg4j-M5dbkVZcAzUzpmvmb5oPOC1Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 22, 2015 at 07:46:06AM +0800, Ben Woods wrote: > On Wednesday, April 22, 2015, Baptiste Daroussin <bapt@freebsd.org> 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 <dan@langille.org > > <javascript:;>> 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 insta= ll > > 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.8= kB/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.= =2E. > > > >>> [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/= 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, > > 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 referenc= e: > > > >> % 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.sqli= te > > > >> -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 thi= ng - > > > >> looks like we have a bug somewhere. > > > >> > > > >> I am running pkg 1.5.1 and poudriere 3.1.4. According to freshport= s, > > pkg > > > >> 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/ > > > > > > For the record, downgrading pkg to 1.4.12 and poudriere to 3.1.2 did > > > not fix this issue for me. > > > > > > 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 o= wn > > logs > > then I will tell you where you mistake is. > > > > 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) > > > > I mean it is dropping roots priviledges to build, stage and make packag= e. > > > > 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 r= esult > > 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 > > > > As a conclusion the bug is in the port you are testing not in pkg, neit= her > > in > > poudriere. > > > > If you show me the logs of your own build I will tell you what is your > > mistake. > > > > Best regards, > > Bapt > > >=20 > Thanks for your help Bapt. You are right, it was an issue with the port > dependency list. In my case the library had changed from plplotd.so to > plplot.so (now without the 'd'). I have fixed that in the LIB_DEPENDS line > and the problem is fixed. >=20 > Trying to debug this issue took some time, because the error message was > about permissions and I didn't make the connection was with unsatisfied > dependencies. >=20 > Could we perhaps add an additional check somewhere in the process that > informs you the dependencies have not been correctly satisfied? Do you > think this extra check belongs in poudriere or the ports infrastructure? Improvement for that has been added into the ports tree and taken in accoun= t by poudriere in latest poudriere-devel 3.1.99.20150421_1 by Bryan Best regards, Bapt --gE7i1rD7pdK0Ng3j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlU24n0ACgkQ8kTtMUmk6EyAvgCfWBSBVhZyNlfODb/Mpo+m4XwG TMAAoKcFX0qhxMSjowZHl7h7ETZp2P23 =2QeW -----END PGP SIGNATURE----- --gE7i1rD7pdK0Ng3j--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150421235125.GD40188>