Package question

Package question

Post by Stephen R. Jone » Fri, 05 Dec 1997 04:00:00





> >Anyone know of a good way to regenerate a package after it's been
> >installed. I'm trying to copy some installed packages (that are no
> >longer supported on my os version at sunsite) from an old machine to a new
> >one.

> >Thanks, as always,

> >jfisch

> >--

> >-----------------------------------------------------------------
> >Jeff Fischer                   Electrical Engineering Student

> >"I been feeling like a machine, and that ain't no way for a man
> >    to live"           -John Shaft
> >-----------------------------------------------------------------

> Notice :  I do not have a Sun a home right now so don't strictly rely
> on what I wrote - I'm just giving you guidelines.

> To my opinion, regenerating a package after installation is a big job.
> You have to go through two steps :
>         - Collect all the files and such scattered around your disks
>         - Make a package

> Step 1 : Collect

> Packages' info is stored into a single huge file under
> /var/adm/packages/???? (find the largest file with find...). This file
> is structured into lines, each lines into fields separated by white
> space.

On my machine that file is under /var/sadm/install/contents

Quote:> As far as I remember, first fields are type  (reg file, dir, cdev,
> bdev and so on) and mode information, then file name (note : a=b means
> it's a link), then some checking data (size, 2 checksums : that's for
> pkgchk tool) and then the packages this file belongs to.

> It should be quite easy to extract (grep, awk, perl, ...) from that
> file what you need for the next step (excepted pre and post
> installation scripts).

> Don't forget to have a look at subdirs under /var/adm/packages/??? :
> you should see one dir per installed package and you may get valuable
> info there (installation scripts should be there).

I have /var/sadm/pkg/<package name>. You should have an install
directory (for the installation scripts), a pkginfo file, and a save
directory.

Quote:> Btw, also have a look at pkg* man pages.

> Step 2 : Make a package

> First of all, you should consider using something lighter than Solaris
> packages (unless you need them for some other reasons) :
>         - A few files : use tar or cpio or ... + manual commands for
>           special files.
>         - Lots of regular files : use tar or ...
>         - You have limited time : don't use packages, do it manually.

I agree. Unless it's *really* necessary to have a package, just tar'ing
up the files is easier.

Quote:> Well... To build a true Solaris package, you have to :
>         - Create some description files
>         - Run pkgmk

> I won't describe the all process because it's quite long. I suggest
> you refer to one of the Solaris printed manuals : it takes 10-20 pages
> to deal with that problem !

I also found  http://smc.vnet.net/pkgadd.html  pretty useful.

- Show quoted text -

Quote:> However, you may note :
>         - Make a backup of your computerS before :
>           you'll need to be root for some commands...
>         - All you original files should stay in place : the desc file
>           describing what is inside a package (I think its name is
>           contents) is able to reference them with the = notation
>           (for reg files, a=b means : on my target computer, file a
>           is a copy of file b on my source computer (check : it
>           might be b=a !!!)).
>         - If you have some time, writing shell scripts to automate
>           package creation is a good solution : you should get a
>           first working version in no more than 1 week once you've
>           read the manual (depending on how easy you feel with
>           shell).
>         - When testing package installation, always remove the
>           previous package (pkgadd can deal with multiple instances
>           but it's quite messy for testing).

> I hope I gave you some valuable information.

--
Stephen Jones
Network Systems and Distributed Systems Engineer
The MITRE Corporation

 
 
 

Package question

Post by Jeff Fische » Fri, 05 Dec 1997 04:00:00


Anyone know of a good way to regenerate a package after it's been
installed. I'm trying to copy some installed packages (that are no
longer supported on my os version at sunsite) from an old machine to a new
one.

Thanks, as always,

jfisch

--

-----------------------------------------------------------------
Jeff Fischer                    Electrical Engineering Student

"I been feeling like a machine, and that ain't no way for a man
    to live"           -John Shaft
-----------------------------------------------------------------

 
 
 

Package question

Post by PROST Er » Fri, 05 Dec 1997 04:00:00



>Anyone know of a good way to regenerate a package after it's been
>installed. I'm trying to copy some installed packages (that are no
>longer supported on my os version at sunsite) from an old machine to a new
>one.

>Thanks, as always,

>jfisch

>--

>-----------------------------------------------------------------
>Jeff Fischer                        Electrical Engineering Student

>"I been feeling like a machine, and that ain't no way for a man
>    to live"           -John Shaft
>-----------------------------------------------------------------

Notice :  I do not have a Sun a home right now so don't strictly rely
on what I wrote - I'm just giving you guidelines.

To my opinion, regenerating a package after installation is a big job.
You have to go through two steps :
        - Collect all the files and such scattered around your disks
        - Make a package

Step 1 : Collect

Packages' info is stored into a single huge file under
/var/adm/packages/???? (find the largest file with find...). This file
is structured into lines, each lines into fields separated by white
space.

As far as I remember, first fields are type  (reg file, dir, cdev,
bdev and so on) and mode information, then file name (note : a=b means
it's a link), then some checking data (size, 2 checksums : that's for
pkgchk tool) and then the packages this file belongs to.

It should be quite easy to extract (grep, awk, perl, ...) from that
file what you need for the next step (excepted pre and post
installation scripts).

Don't forget to have a look at subdirs under /var/adm/packages/??? :
you should see one dir per installed package and you may get valuable
info there (installation scripts should be there).

Btw, also have a look at pkg* man pages.

Step 2 : Make a package

First of all, you should consider using something lighter than Solaris
packages (unless you need them for some other reasons) :
        - A few files : use tar or cpio or ... + manual commands for
          special files.
        - Lots of regular files : use tar or ...
        - You have limited time : don't use packages, do it manually.

Well... To build a true Solaris package, you have to :
        - Create some description files
        - Run pkgmk

I won't describe the all process because it's quite long. I suggest
you refer to one of the Solaris printed manuals : it takes 10-20 pages
to deal with that problem !

However, you may note :
        - Make a backup of your computerS before :
          you'll need to be root for some commands...
        - All you original files should stay in place : the desc file
          describing what is inside a package (I think its name is
          contents) is able to reference them with the = notation
          (for reg files, a=b means : on my target computer, file a
          is a copy of file b on my source computer (check : it
          might be b=a !!!)).
        - If you have some time, writing shell scripts to automate
          package creation is a good solution : you should get a
          first working version in no more than 1 week once you've
          read the manual (depending on how easy you feel with
          shell).
        - When testing package installation, always remove the
          previous package (pkgadd can deal with multiple instances
          but it's quite messy for testing).

I hope I gave you some valuable information.

 
 
 

1. outputting installed rpm packages question

What I would like to do is have a commandline that outputs
the list of names of installed rpm packages
that match a wildcard expression such as "kde*",
which would be all the installed package names that start with "kde".
The best I could do so far is to do this at the cmdline "rpm -qa |
sort",
which lets me see the packages sorted alphabetically, but lists all the
packages.
If anyone knows how to accomplish this please let me know.

Thanks,
--Rick

2. HELP: Pvga1/512k in 800x600 mode???

3. An advanced SVR4 package question (for guru's).

4. Communicator 4.05

5. RPM Packages Question

6. problems with sbp2 and sd_mod (ipod firewire harddisk)

7. Package question

8. Best 486 motherboard for Linux under $450?

9. Solaris packages question

10. Quota package question

11. Software Packaging Question

12. Packages question

13. Debian package question