Hi,

Looking for a code review for the fix for bug #2217

 http://defect.opensolaris.org/bz/show_bug.cgi?id=2217
 /etc device files should be completely built via driver actions

Webrev is at:

 http://cr.opensolaris.org/~richb/pkg-2217-v1/

Note that apart from the changes to .../distro-import/Makefile, the
changes will all really be as new files under the .../distro-import/125
directory. The webrev is just does this way to make viewing the
changes easier.

Files have been "hg copy" 'ed from the old IPS package location to the
.../125/[common,i386,sparc]/... one.


Background.
-----------

The goal of this bug fix was to take the six device files:

 /etc/security/device_policy
 /etc/driver_aliases
 /etc/driver_classes
 /etc/security/extra_privs
 /etc/minor_perm
 /etc/name_to_major

for a "full install" Nevada build, for both SPARC and i386, and use
them to construct all the 'add driver' actions that should be added
to our various IPS package definition files. A secondary goal was
to start with empty versions of those six files under OpenSolaris,
and allow add_drv (& friends) to update them as new driver actions
were found and handled.

We were close to achieving this.

Now, /etc/name_to_major initially starts with just one line:

did 239

because there is clustering code that looks specifically for that
device number for that device.

Now, /etc/security/device_policy and /etc/security/extra_privs initially
start with an initial comment block and device_policy also has a line
with the default privileges:

*               read_priv_set=none              write_priv_set=none

Now, /etc/driver_aliases, /etc/driver_classes and /etc/minor_perm are
initially empty.

In doing this work, it was discovered that there was a bug in
add_drv (& friends), where it didn't like a comma as part of the minor
perms entry for a device. This was reported as Bugster bug #6877673
and the fix is going to be delivered in build #125.

Bug #2217 contains various attachments that were used to help generate
these changes. See the various comments and attachments to that bug for
more details on all this work.

Differences are typically caused by non-redistributable drivers. Some of
these already have IPS package definition files under the .../distro-import
directory. We just aren't using them. One of the other things that the
create_driver_changes.py script did, was to try to cons up fake IPS
package definition files for the rest of the missing drivers. These
could be the basis of packages that are distributed via the /extra
repository.

You can see these under:

 http://cr.opensolaris.org/~richb/pkg-2217-v1/missing

(These files are not part of this review).


Note that there was some "hand tuning" or the new IPS package files
done before testing and comparing. These were for things that the
create_driver_changes.py script didn't automatically pick up, such as:

* Removing some bogus comments from:

 .../125/common/SUNWckr
 .../125/common/SUNWintgige
 .../125/i386/SUNWpsdcr

* Removing the incorrect addition of an 'add driver' action to the SUNWbridge
 package in build #124.

* The inclusion of various sun4v specific devices.

* Properly handling the "mpt", "ecpp" and "fd" drivers, which are delivered
 by different IPS packages for each architecture.

* Add in devlink="..." lines where needed.

Many thanks to David Comay, Ed Pilatowicz, Jerry Gilliam and Jan Setje-Eilers
for help with this bug fix.

Thanks.

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

Reply via email to