Hey Ed & everyone,

On Tue, 2011-02-22 at 19:03 -0800, Edward Pilatowicz wrote:
> sorry for the delay in replying.  comments below.

No worries.

> On Thu, Feb 17, 2011 at 11:15:19AM +1300, Tim Foster wrote:
> > On Wed, 2011-02-16 at 09:21 -0700, Mark J. Nelson wrote:
> > > On 02/15/11 08:52 PM, Tim Foster wrote:
> > > >      SUNW_PKG_HOLLOW

> if a package is truly hollow, then it delivers no content so in an ideal
> world the package itself would be tagged with a global variant, there by
> making it uninstallable within non-global zones, and if any other
> packages had dependencies upon that package those dependencies would
> have to have variant tags as well.  (similarly to how architecture
> specific packages are handled.)
> 
> but given the non-ideal world we live in (and the approximations we
> make when converting packages) i think it's best to leave the package as
> installable with a legacy action as you proposed.

Cool

> with linked images we gain a new property that is similar to
> SUNW_PKG_ALLZONES.  see at "pkg(5) linked image manifest metadata" (line
> 1080) in:
> 
>     
> http://cr.opensolaris.org/~edp/pkg-li.20110216.0/doc/linked-images.txt.html
> 
> basically, if SUNW_PKG_ALLZONES is set that means we should generate the
> following package attribute:
> 
>     set name=pkg.linked.attribute.zone-sync value=true
> 
> ideally, we should also automatically add this property (and variant
> tags) to any package which delivers a kernel driver/component.

I think the easiest way to do that would be with pkgmogrify, and it
could certainly key off the pkg.send.convert.* attributes as necessary?

Longer term, we could look again into bundling mogrify functionality
into pkgsend generate/import, which would make the whole process a
little more flexible, albeit more tightly coupled.

> that said, i'd prefer that we delay adding this attribute to the svr4
> conversion process until after linked images integrates and we've
> started setting this property ourselves within the WOS.  (since then
> we'll have the exact mechanics of when this attribute is set ironed
> out.)

Sounds like a plan - I'll file an RFE against pkgsend to look again at
what properties it should be setting for SUNW_PKG_HOLLOW and address it
after linked images goes back.

> also a question, when you convert more than one svr4 package to an ips
> package, do you create an incorporation which ties together the packages
> your converting?  (i ask because if you do, then we'll may optionally
> want to set the attribute on the incorporation if it's set on any
> packages incorporated by the incorporation.  this question goes back to
> the mechanics of when this property gets set.  :)

At the moment, no we're not creating an incorporation if pkgsend is
generating or importing from several SVR4 packages.

During import and generate, that would mean writing more pkgsend
switches to allow the user to specify the name of the incorporation to
be generated, and the follow-up question, is whether there would also be
a flag to allow pkgsend users to accept an existing manifest containing
an incorporation that should be appended to.

Too much work for now I think, but perhaps a good RFE.

I'd wonder how many users would want to use pkgsend in this manner, as
opposed to it being merely a quick & dirty way to generate new manifests
from their SVR4 packages, with follow-on work on the part of the package
author to decide how they want to bundle packages those together with
incorporations.


All that aside, it'd still be nice to get a code review of this change
please?

To recap, the main brunt of the change here, is that 'pkgsend
import/generate' will now fail, printing errors when given SVR4 bundles
that contain any class action or install scripts, and will return a '1'
exit code.

'pkgsend import' will abandon the current transaction, though 'generate'
will still emit a list of actions, in spite of the errors.

I've attached before & after output from pkgsend when run on an
interesting package, in case anyone's interested.

Webrevs at:
http://cr.opensolaris.org/~timf/pkgsend-svr4-warnings-webrev-1
http://cr.opensolaris.org/~timf/pkgsend-svr4-warnings-webrev-1-vs-0

        cheers,
                        tim
timf@linn[9073] pkgsend generate SUNWad810/
license copyright license=SUNWad810.copyright path=copyright
dir group=sys mode=0755 owner=root path=kernel
dir group=sys mode=0755 owner=root path=kernel/drv
dir group=sys mode=0755 owner=root path=kernel/drv/amd64
file kernel/drv/amd64/audio810 group=sys mode=0755 owner=root 
path=kernel/drv/amd64/audio810
file kernel/drv/audio810 group=sys mode=0755 owner=root path=kernel/drv/audio810
file kernel/drv/audio810.conf group=sys mode=0644 owner=root 
path=kernel/drv/audio810.conf
timf@linn[9074] echo $?
0
timf@linn[9075] 

timf@linn[9071] pkgsend generate SUNWad810/
legacy arch=i386 category=system desc="SunOS audio device driver for W1100z & 
W2100z workstations" hotline="Please contact your local service provider" 
name="SUNW W1100z & W2100z Audio Drivers" pkg=SUNWad810 
pkg.send.convert.sunw-pkg-hollow=true vendor="Sun Microsystems, Inc." 
version=11.10.0,REV=2005.01.21.16.34
set name=pkg.description pkg.send.convert.sunw-pkg-hollow=true value="SunOS 
audio device driver for W1100z & W2100z workstations"
set name=pkg.summary pkg.send.convert.sunw-pkg-hollow=true value="SUNW W1100z & 
W2100z Audio Drivers"
license copyright license=SUNWad810.copyright path=copyright 
pkg.send.convert.sunw-pkg-hollow=true
dir group=sys mode=0755 owner=root path=kernel 
pkg.send.convert.sunw-pkg-hollow=true
dir group=sys mode=0755 owner=root path=kernel/drv 
pkg.send.convert.sunw-pkg-hollow=true
dir group=sys mode=0755 owner=root path=kernel/drv/amd64 
pkg.send.convert.sunw-pkg-hollow=true
file kernel/drv/amd64/audio810 group=sys mode=0755 owner=root 
path=kernel/drv/amd64/audio810 pkg.send.convert.sunw-pkg-hollow=true
file kernel/drv/audio810 group=sys mode=0755 owner=root 
path=kernel/drv/audio810 pkg.send.convert.sunw-pkg-hollow=true
file kernel/drv/audio810.conf group=sys mode=0644 owner=root 
path=kernel/drv/audio810.conf pkg.send.convert.sunw-pkg-hollow=true

pkgsend: generate: ERROR: script present in SUNWad810: preremove
pkgsend: generate: ERROR: script present in SUNWad810: postinstall
timf@linn[9072] echo $?
1
timf@linn[9076] 

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to