Re: [Pkgutil-users] what am I doing wrong?
Status: Beta
Brought to you by:
bonivart
|
From: Peter B. <bon...@op...> - 2010-10-07 08:53:19
|
On Thu, Oct 7, 2010 at 1:37 AM, Don Jackson
<pkg...@cl...> wrote:
>
> Responses inline below:
> 1) These are random generic packages that I obtained not from Blastwave Nor
> OpenCSW. I just want to stick these random 3rd party packages into a repo
> and download and install them with pkgutil. Is that possible?
Yes, it's possible but it's unlikely that 3rd party packages work as
is. To create a proper catalog pkgutil can understand some package
metadata must conform to CSW standards. It's easy to do this yourself
and if you're going to install these packages over and over again it's
worthwhile. On the other hand, if you're only going to install them
once or twice it's quicker to just use pkgadd and be done with it.
Since you're using jumpstart I assume you want this to work so here we go...
> 2) I forgot that the package name is important. Can I just rename these
> files, or do I need to change something internal to the packages themselves?
The filename is the least of your problems. You need to edit the
package metadata in the pkginfo file.
> 3) As an experiment, i just went ahead and added these packages locally on a
> test machine using pkgadd. That worked.
>
> $ pkginfo AmandaEnterpriseBackupClient
> system AmandaEnterpriseBackupClient Amanda Enterprise Backup Client
> from Zmanda
> $ pkginfo AmandaEnterpriseClientExt
> system AmandaEnterpriseClientExt Amanda Enterprise Client Extensions
> from Zmanda
>
> But I am guessing when you say "pkginfo files" you are asking for something
> else?
Yes, please do a "pkginfo -l" on those packages to see what we have
there. To compare with here's the output from CSWpkgutil:
$ pkginfo -l CSWpkgutil
PKGINST: CSWpkgutil
NAME: pkgutil - Installs Solaris packages easily
CATEGORY: application
ARCH: i386
VERSION: 2.1,REV=2010.07.28
BASEDIR: /
VENDOR: http://pkgutil.wikidot.com/ packaged for CSW by Peter Bonivart
PSTAMP: bonivart@current8x-20100728140726
INSTDATE: Jul 28 2010 14:32
HOTLINE: http://www.opencsw.org/bugtrack/
EMAIL: bon...@op...
STATUS: completely installed
FILES: 26 installed pathnames
13 shared pathnames
17 directories
2 executables
574 blocks used (approx)
Note that NAME and VERSION fields, they are important. NAME must be
unique and separated by " - " (space dash space) from the description.
I think your VERSION should be good.
> You need to follow these guidelines:
> http://www.opencsw.org/extend-it/contribute-packages/build-standards/#versioning
>
> Do I need to follow this even if I am not submitting to OpenCSW? (which I
> am not)
Yes, you need to follow the guidelines if you want to enter a package
into a CSW catalog. I will try to help you do minimal work to do so.
What you need to do, after posting the "pkginfo -l" output, is to
unpack the packages, edit the pkginfo file and reassemble the package
again. Then you can build a new catalog.
Basic steps (simplified names):
# gunzip amanda.pkg.gz
# pkgtrans amanda.pkg . all (this will unpack the package)
# cd amanda (the package name just unpacked)
# vi pkginfo (edit especially NAME and VERSION fields to comply with CSW)
# ls -l pkginfo (note size)
# sum pkginfo (note checksum)
# vi pkgmap (edit size (column 4) and checksum (column 5) values of
pkginfo line)
# cd ..
# pkgtrans . newamanda.pkg amanda (reassemble the package as newamanda.pkg)
--
/peter
|