[HEADSUP] No more pkg_install on HEAD by default
Matthew Seaman
matthew at FreeBSD.org
Sun Jul 14 09:31:06 UTC 2013
On 14/07/2013 06:48, Teske, Devin wrote:
> Question: Where can I learn more about the actual format of what's in
> the new tarballs? This is going to be important not for bsdconfig,
> but $work (we have our own build platform; I'm going to have to
> rewrite it from mastering PLIST files to mastering YAML MANIFEST
> files and I want to know all the gritty details).
We do need a pkg-manifest(5) man page, which can double as a
pkg-tarball(5) page since the manifest file is where most of the
interesting bits are.
A pkg tarball is a compressed tar archive like so:
lucid-nonsense:...cache/pkg/All:% tar -tvf pkg-1.1.4.txz
-rw-r--r-- 0 root wheel 530 Jan 1 1970 +COMPACT_MANIFEST
-rw-r--r-- 0 root wheel 6385 Jan 1 1970 +MANIFEST
-rw-r--r-- 0 root wheel 17567 Jan 1 1970 +MTREE_DIRS
-r--r--r-- 0 root wheel 19453 Jul 7 12:26
/usr/local/etc/bash_completion.d/_pkg.bash
-r-xr-xr-x 0 root wheel 629 Jul 7 12:26
/usr/local/etc/periodic/daily/400.status-pkg
-r-xr-xr-x 0 root wheel 823 Jul 7 12:26
/usr/local/etc/periodic/daily/411.pkg-backup
-r-xr-xr-x 0 root wheel 678 Jul 7 12:26
/usr/local/etc/periodic/daily/490.status-pkg-changes
-r-xr-xr-x 0 root wheel 2558 Jul 7 12:26
/usr/local/etc/periodic/security/410.pkg-audit
-r-xr-xr-x 0 root wheel 611 Jul 7 12:26
/usr/local/etc/periodic/security/460.pkg-checksum
-r--r--r-- 0 root wheel 839 Jul 7 12:26
/usr/local/etc/pkg.conf.sample
-r--r--r-- 0 root wheel 43432 Jul 7 12:26 /usr/local/include/pkg.h
-r--r--r-- 0 root wheel 727558 Jul 7 12:26 /usr/local/lib/libpkg.a
lrwxr-xr-x 0 root wheel 0 Jul 7 12:26 /usr/local/lib/libpkg.so
-> libpkg.so.1
-r--r--r-- 0 root wheel 1227064 Jul 7 12:26 /usr/local/lib/libpkg.so.1
-rw-r--r-- 0 root wheel 187 Jul 7 12:26
/usr/local/libdata/pkgconfig/pkg.pc
[... etc ...]
There must at least be a +MANIFEST -- other meta data files are
optional. +COMPACT_MANIFEST is a subset of the full +MANIFEST. They're
both YAML documents. +COMPACT_MANIFEST looks like this, for example:
---
name: pkg
version: 1.1.4
origin: ports-mgmt/pkg
comment: New generation package manager
arch: freebsd:9:x86:64
www: http://wiki.freebsd.org/pkgng
maintainer: portmgr at FreeBSD.org
prefix: /usr/local
licenselogic: single
licenses:
- BSD
flatsize: 6311507
desc: |
New Generation package management tool for FreeBSD
WWW: http://wiki.freebsd.org/pkgng
categories:
- ports-mgmt
shlibs_required:
- libpkg.so.1
shlibs_provided:
- libpkg.so.1
message: |
If you are upgrading from the old package format, first run:
# pkg2ng
+MTREE_DIRS is a compatibility thing with the old pkg_tools. It's not
needed in general as +MANIFEST can provide all that meta data itself.
It isn't going to be deprecated for at least as long as the ports tree
continues to support pkg_tools though.
Beyond that, the rest of the pkg tarball just contains a tar archive of
all the files, directories, sym-links etc to be installed by the
package. Note that pkg(8) has no problem with creating an empty
directory for a package, unlike pkg_tools.
Now, while you can grovel through the details of pkg tarballs and
internal data formats like this, be aware: the format of the manifest
and the details of the meta-data included in the pkg-tarballs is subject
to change without warning as we develop pkg(8) further. We only promise
API stability through the pkg(8) commands or for the libpkg.so library
functions; reports of breakage from usage outside those APIs will
receive little sympathy.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130714/c85c9bd7/attachment.sig>
More information about the freebsd-current
mailing list