Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2005 01:11:19 +1000
From:      Joel Hatton <freebsd-questions@auscert.org.au>
To:        freebsd-questions@freebsd.org
Subject:   Creating a package by hand with pkg_create
Message-ID:  <200509171511.j8HFBJce077886@app.auscert.org.au>

next in thread | raw e-mail | index | archive | help
Hi,

I'm trying to create a package from a set of binaries for local
installation only, without installing it first. I've added the files into
a temporary directory first:

/tmp/application/work/bin
/tmp/application/work/bin/app1
/tmp/application/work/bin/app2
/tmp/application/work/etc
/tmp/application/work/etc/config

I created a packing list file /tmp/application/work/.PLIST.mktmp with
contents:

@cwd /usr/local
bin/app1
bin/app2
etc/config

I've tried some combinations of arguments and packing list options, but
I've not been able to hit upon a combination that both a) can find the
source files, and if it does b) installs the program properly, in only one
place.

I believe that this is very close to what should work:

/usr/sbin/pkg_create -v -c /tmp/onelinedesc -d /tmp/application/pkg-descr -p /tmp/application/work \
	-s /tmp/application/work -f /tmp/application/work/.PLIST.mktmp -m /etc/mtree/BSD.local.dist \
		/usr/ports/packages/All/application.tbz

(even the -p option seems redundant to me)

But, this results in output like:

Using SrcDir value of /tmp/application/work
Creating bzip'd tar ball in '/usr/ports/packages/All/application.tbz'
tar: bin/app: Could not stat: No such file or directory

The only way I've made it work is to add @srcdir /tmp/application/work to
the packing list, but this results in a duplicated installation to
/usr/local _and_ /tmp/application/work. Is there any way around this? I
can't believe that there could be so many options for declaring where the
files reside and are destined to not allow me to do what I want here, so
it must be something I'm not following correctly.

thanks,
-- Joel Hatton --
Security Analyst                    | Hotline: +61 7 3365 4417
AusCERT - Australia's national CERT | Fax:     +61 7 3365 7031
The University of Queensland        | WWW:     www.auscert.org.au
Qld 4072 Australia                  | Email:   auscert@auscert.org.au



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509171511.j8HFBJce077886>