Operating System - HP-UX
1752799 Members
5776 Online
108789 Solutions
New Discussion юеВ

Re: How to get my package installed by default

 
GXW_1
Frequent Advisor

How to get my package installed by default

I have created a new package for some software, and I want it to be installed by default from my Ignite core_media depot.

I created a PSF file, and used swpackage to create a new depot then used swcopy to copy my package into my core_media depot ready for an ignite client build. I recreated the core_media config file too.

After the build, there was no sign of my new package, but I know it can be installed manually as I tested it on the ignite server with swinstall and it went on fine.

Question is - what step am I missing to get the package automatically recognised by the build as something it needs to install as part of the core OE, i.e. eithout the fuss of having to manually install it in a post-install?

Is there a magic word I need to use in the PSF file to get the package recognised? I presume I need a sw_sel statement in the config but there is none - so how do I get my make_config step to recognise the new package and add one for me when I build the entire config file?

Any guidance would be appreciated, thanks.
HP-UX 11i v3 btw.
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: How to get my package installed by default

Shalom,

swpackage advanced topics

http://docs.hp.com/en/B2355-90107/ch11s02.html

Related to your question:
http://docs.hp.com/en/B2355-90682/swpackage.4.html

swpackage checks syntax in PSF file
http://www.docs.hp.com/en/B2355-90154/ch10s06.html

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
GXW_1
Frequent Advisor

Re: How to get my package installed by default

Sorry Steven I can't find any reference in any of those to Ignite, make_config, sw_sel or anything close.

One of them is a 1400 line man-page!

Does anyone know (in simple terms) how to add a new user-developed package to an existing core media depot in such a way that ignite recognises it for installation by default?

I tried adding "category_tag CoreOS" to my PSF but the make_config still never generated a sw_sel statement for it. :-(

I'm fairly sure I can hack the config file myself but I want to do this properly (using commands) if anyone can tell me how?
GXW_1
Frequent Advisor

Re: How to get my package installed by default

OK, I'm making progress.

My PSF just had a product specification with my stuff included as a fileset.
I changed that to a bundle with a product with a fielset, and now it shows up in the config. It failed opreviously because make_config ignores anything that isn't a bundle!

But, it's still not being installed by default, and the key difference between bundles that are installed by default and ones that aren't seems to be the following line of the pfiles/INDEX file:

hp_ii "factory_integrate=true"

This seems to be something called Instant Ignition - a very old feature that seems to be all but obsolete now, but I still can't figure out what syntax I need in my PSF which will lead to that hp_ii being set in the pfiles/INDEX once I have run swpackage.

Has anyone tried this - or is this a red herring??
Armin Kunaschik
Esteemed Contributor

Re: How to get my package installed by default

I'm not sure if the sw_sel command is generated by any command. Try adding it manually in the corresponding config.local. The default is /var/opt/ignite/config.local but you should keep separate ones for any OS release you want to install.

My 2 cents,
Armin

PS: Please assign points if you find answers useful!
And now for something completely different...
Steven E. Protter
Exalted Contributor

Re: How to get my package installed by default

Auto install by Ignite has nothing to do with the PSF file.

Ignite has a section of the Golden Image configuration file that lets you run installations, scripts what every you want.

It is documented in the configuration file as post installation steps.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Scot Bean
Honored Contributor

Re: How to get my package installed by default

Here's what I would do:
1. If you have not refreshed your Ignite config file with the new bundle, do so with make_config.

2. This will create a 'sw_sel' stanza for the new bundle. At the end of that staza, add
...
} = TRUE

The "= TRUE" means always select for install.
GXW_1
Frequent Advisor

Re: How to get my package installed by default

Armin,

The sw_sel statements are generated by the make_config command, based on the information in the depot. Anything that's classed as a bundle will show up in a sw_sel stanza.

I am already using a separate config file for my modified depot.

Steven,

I am not using Golden Images. I am building from a modified OE depot.
I know I can use post-install scripts (I am doing that for optional software) this is something I want to be added by default and don't want it to appear on the install dialog.

Scot,

I have refreshed the config (that was implied when I said "and now it shows up in the config."

I know I can hack the config and add =TRUE but I believe that is just that - a hack. I was looking for a prettier way of doing this - besides those config stanzas wouldn't be very easy to parse.

----------------

It seems a shame that what I'm trying to do is almost trivial, yet proving to be such a pain to achieve. All I want is a line in my package's PSF which identifies it as "required" and it just gets installed without having to mess about with post-install scripts. There are plenty of core-OS packages that this works fine with and as I said the only difference I can see in those is they have the factory integrate flag on but I can't set that in my PSF.
Scot Bean
Honored Contributor

Re: How to get my package installed by default

I think there are PSF tags in 11.31 you can set to force selection and install.

Look for it in your make_config output, you should see a line
sw_category += "-OE- Required"

Try setting that category tag, and assuming you are installing one of the OEs, should work.
GXW_1
Frequent Advisor

Re: How to get my package installed by default

I think there are PSF tags in 11.31 you can set to force selection and install.

Look for it in your make_config output, you should see a line
sw_category += "-OE- Required"

Try setting that category tag, and assuming you are installing one of the OEs, should work.

I tried using the following line in my PSF:

category "-OE- Required"

This corrupted my depot and I had to rebuild it. I tried it without the "-OE-" and this seemed to work OK but in fact all it did was put my bundle into a category called "Required" in the left side of the install GUI - it was still, however, marked as "No" in the "Marked for Install" column.

This is really frustrating - I wish the documentation had an example of how to set this up - it seems such a trivial thing.

I evern tried hacking my pfiles/INDEX file and added hp_ii "factory_integrate=TRUE" but this didn't work either!