From owner-freebsd-questions@FreeBSD.ORG Sat Sep 17 15:11:21 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D466416A41F for ; Sat, 17 Sep 2005 15:11:21 +0000 (GMT) (envelope-from freebsd-questions@auscert.org.au) Received: from titania.auscert.org.au (gw.auscert.org.au [203.5.112.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 197C843D45 for ; Sat, 17 Sep 2005 15:11:20 +0000 (GMT) (envelope-from freebsd-questions@auscert.org.au) Received: from app.auscert.org.au (app [10.0.1.192]) by titania.auscert.org.au (8.12.10/8.12.10) with ESMTP id j8HFAWBV043525 for ; Sun, 18 Sep 2005 01:10:32 +1000 (EST) Received: from app.auscert.org.au (localhost.auscert.org.au [127.0.0.1]) by app.auscert.org.au (8.13.1/8.13.1) with ESMTP id j8HFBJce077886 for ; Sun, 18 Sep 2005 01:11:19 +1000 (EST) (envelope-from freebsd-questions@auscert.org.au) Message-Id: <200509171511.j8HFBJce077886@app.auscert.org.au> To: freebsd-questions@freebsd.org From: Joel Hatton Dcc: Date: Sun, 18 Sep 2005 01:11:19 +1000 Subject: Creating a package by hand with pkg_create X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2005 15:11:21 -0000 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