From owner-freebsd-questions@freebsd.org Thu Jul 28 16:48:09 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88DE3BA70CA for ; Thu, 28 Jul 2016 16:48:09 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 18AA01B4A for ; Thu, 28 Jul 2016 16:48:09 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from ox-dell39.ox.adestra.com (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 1F8AF8B1C for ; Thu, 28 Jul 2016 16:48:05 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/1F8AF8B1C; dkim=none; dkim-atps=neutral Subject: Re: Creating a pkg To: freebsd-questions@freebsd.org References: <981a28ca-09a4-995b-fee3-55d4a6dc5fb3@ymail.com> From: Matthew Seaman Message-ID: Date: Thu, 28 Jul 2016 17:47:50 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <981a28ca-09a4-995b-fee3-55d4a6dc5fb3@ymail.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rVOJLae0IkfxnnDIm3tJq63xgSXg3XBIU" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 16:48:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rVOJLae0IkfxnnDIm3tJq63xgSXg3XBIU Content-Type: multipart/mixed; boundary="rnIQqOIwbnHWb6CUXSgGkONdoggKG40Ll" From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: Subject: Re: Creating a pkg References: <981a28ca-09a4-995b-fee3-55d4a6dc5fb3@ymail.com> In-Reply-To: <981a28ca-09a4-995b-fee3-55d4a6dc5fb3@ymail.com> --rnIQqOIwbnHWb6CUXSgGkONdoggKG40Ll Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/28/16 16:44, Andrew Wood via freebsd-questions wrote: > I'm experimenting with creating a pkg package for a program Ive created= > on my system which is a set of Python & shell scripts. >=20 > I have a few of questions: >=20 > 1. Despite following the example +MANIFEST file given on the wiki I am > getting the error pkg: Bad format in manifest for key: version You can see the manifest for any package on your system by: pkg info -R pkgname If you copy the format there, you shouldn't go far wrong. Note that pkg(8) will automatically calculate the file checksums and work out any shared library dependencies for you, so you can leave those bits out of your manifest It's written in UCL (https://github.com/vstakhov/libucl) -- that's very similar to JSON in this case. (UCL can also look like the nginx config file format, but that's not really relevant here.) > I am invoking the command like this: pkg create -M ./+MANIFEST > with the current working directory being the one containing the manifes= t > and all the program scripts. >=20 > the line in the manifest is as follows: >=20 > version: 0.3 >=20 > Any idea why it doesnt like this? Try: version: "0.3"; >=20 > 2. As my program is Python & shell scripts and is therefore platform > independent can I use arch: all ? That would be: abi =3D "FreeBSD:10:*"; arch =3D "freebsd:10:*"; (assuming you're running FreeBSD 10.x) You will need both abi and arch settings, although for a pure Python package they don't really add much value to the package. > 3. When specifying a dependency package and its version, is the version= > taken as that version only or will it also be satisfied by a later > version? According to the docs there is no way to specify one or the ot= her. No, this is recognised as one of the biggest limitations in pkg(8) at the moment. Strict dependencies are baked into packages, and the version matching is exact. This makes a difference at install time -- although it does seem to be possible to update a dependency at a later date without too much trouble. Cheers, Matthew --rnIQqOIwbnHWb6CUXSgGkONdoggKG40Ll-- --rVOJLae0IkfxnnDIm3tJq63xgSXg3XBIU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJXmjc8AAoJEABRPxDgqeTnZ8kP/0bXPb+Wsb8TskjAfXI2ENfI Cgv/HiEplZZKzz6turjFLspmVajQT1P0QPwdSEDmwBcWZuNSml/dExwiLkLqmOjm pXlSZQHHVaFFMgDMq1ppfSfXtxzvI00XUL+kuDw5vNbBU7K8tS6lpyMzcfpIaHFe Zzi38Ctd+EoqOreujIprmJ0i1235BbHZK2NUn0K2eHVFvw8LourZFZGe17qK6as8 B9cMnhZquBSW15Xmxag9XQFpj/zTyBQ8wcK4hyZVwzdbPBjgS4Hf5gtlG9h4PQ0g 3K9G6fl5gjyVxMsuWe1BAV9JKAUkekhFeFkg1QQuueAJ+zNaq88LDNgibiXcElrR 4oZQ1UST7STHHDm0VFP4pkR59M2k2m7WfrO7GBNAW8pzfa2mDu0NNeJ3Rr1enbSy w/J1Lf+ijiJ7hoVfyR4YYCV86DtnZUaiAs06JHtcCypv+ugvMhxc0GSzVgqIXh2W aMVEckcm7bvQeQJYo9Y9avfSrvO5IMPP57FJBxDamP5DfvroSApknIKi+lsQEn9i 0srvd9KUVfUsXFRko4gxJjCOg0Mrl6zwTmuEbBzmjCKWrU1BR97jDir93+/j8CLR FxSkNXzT/MU6sVz2OmAkc2JZ4Meg/D3trJLgcdd3K3Z66DNE0037AsrDhNWIjcjS N150ylUUNgEQeaCELsdR =38Ge -----END PGP SIGNATURE----- --rVOJLae0IkfxnnDIm3tJq63xgSXg3XBIU--