Date: Wed, 18 Jun 2014 06:10:45 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-pkg@freebsd.org Subject: Re: Directories aren't included? Message-ID: <53A11F55.3090402@infracaninophile.co.uk> In-Reply-To: <44A7EDED-DA81-4C03-91F4-8BEF3241FE1F@ixsystems.com> References: <44A7EDED-DA81-4C03-91F4-8BEF3241FE1F@ixsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mqeHbMXOv6x9Li8L13PtCnhOeslaAjulU Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 18/06/2014 00:46, Sean Fagan wrote: > Given this manifest file: >=20 > { > "name" : "mypkg", > "version" : "1.0", > "origin" : "system/test", > "comment" : "foo", > "maintainer" : "me", > "prefix" : "/", > "www" : "http://www.example.com/", > "licenselogic" : "single", > "desc" : "bar", > "dirs" : { > "./dir1", > "./dir1/dir2", > }, > "files" : { > "./dir1/test_file" : "-", > }, > } >=20 > and this layout: >=20 > dir1 >=20 > ./dir1: > dir2 test_file >=20 > ./dir1/dir2: >=20 > The tar file it creates does not have "dir2" in it: >=20 > tar tvf badpkg-1.0.txz=20 > -rw-r--r-- 0 root wheel 214 Dec 31 1969 +COMPACT_MANIFEST > -rw-r--r-- 0 root wheel 310 Dec 31 1969 +MANIFEST > -rw-r--r-- 0 sef sef 29 Jun 17 16:17 ./dir1/test_file >=20 >=20 > In other words, it is not adding empty directories to the package. >=20 > Am I creating it incorrectly? >=20 > If I put "./dir2" in the "files" section, it puts it in the tarball, bu= t I'm not sure that is correct. >=20 > This is pkg 1.2.7_2; I have't tried with a newer version yet, for which= I apologise. I don't think pkg-1.2 is going to handle relative paths properly -- if you look at a sample package from the repos, you'll see all the paths are fully qualified from the root. In fact, I'd hope pkg would complain about wrongly specified paths, but I suspect it doesn't Directories may not appear as separate items in the tar archive part of the package. Hmmm... not sure if this is a hold-over from the old pkg_tools (which can't handle directories like that at all). pkg(8) certainly should be creating directories as first-class items, in the way you're expecting. However, this is different to the way ports has worked historically so this code path doesn't get much, if any, testing. What happens if you try and install your package? Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey JID: matthew@infracaninophile.co.uk --mqeHbMXOv6x9Li8L13PtCnhOeslaAjulU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJ8BAEBCgBmBQJToR9gXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATmlEP/jHQS5NLforQJnU0sK4k8rwb 0VmNZSG6H0JEt7SlgY48PNl+PvtRuwR1cGyEBbTI51fKU0n/sUuclYpdrGMbd+IQ e3A5dyNxWJRDwStlVvs2Xni8+IVu0zMAavBQ1loPmJ3jJ/VFM8JEM4mWM+29Cg8D vfSC3dXU8JbG+6SledSrTLYwyaGIRsoImt22zA41syKeyEf7IlQXjHs9dTljXebL ZuToyI4TXLTKPXfHlR8oTbu+BpLol7aknFinBHh8iIP3CrZrr8MR7Kzn3gVdzMDJ +WN8atUzbOuy0+PqlEq7+9iJxKDJ4HVapTnp/Q0eJXG/d55UpgElTwWvYpMq957A KGKaFETpgXY+gLQ1V+iSCnVt8OhfDkhlTo2TNDrxGu9Ep+5G0kPCZ5zhFe3rxgUP cpvy/W7rMuOkdNhcZKkDtwxpVC9i7lvdmeBtDfCc8miSW8Wo/KhH8OvUAfy/aTlC PsO8ccpYg2OZJomed1A1x27ytDi/UcnqfexsKmqlY229b4vBTmFp5qgsHnljEAbI 0Gwa1oZDPn17CbZ1wUqqpqcSIWGv5qmT4pyubHYJY2t4YoyZ1FiXt4qwU4Mrhnkw WCOw/1k9AK+Kpq7OPdFRIM/Sr0QtR0aHgdawjlRd8XAxngEzoIJx7eBNJGPl0La2 V8MVbKkVBWONe+lgNrhK =7+oo -----END PGP SIGNATURE----- --mqeHbMXOv6x9Li8L13PtCnhOeslaAjulU--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A11F55.3090402>