Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jul 2016 17:47:50 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Creating a pkg
Message-ID:  <ab6bf712-f7ff-f5c6-3dc8-3b3980a3e33d@freebsd.org>
In-Reply-To: <981a28ca-09a4-995b-fee3-55d4a6dc5fb3@ymail.com>
References:  <981a28ca-09a4-995b-fee3-55d4a6dc5fb3@ymail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--rVOJLae0IkfxnnDIm3tJq63xgSXg3XBIU
Content-Type: multipart/mixed; boundary="rnIQqOIwbnHWb6CUXSgGkONdoggKG40Ll"
From: Matthew Seaman <matthew@freebsd.org>
To: freebsd-questions@freebsd.org
Message-ID: <ab6bf712-f7ff-f5c6-3dc8-3b3980a3e33d@freebsd.org>
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ab6bf712-f7ff-f5c6-3dc8-3b3980a3e33d>