Skip to main content

[pkg-discuss] [review] 15811694 - filesystem actions should support system attributes

  • From: Erik Trauschke < >
  • To:
  • Cc: "WINIGER,GARY" < >, Darren J Moffat < >
  • Subject: [pkg-discuss] [review] 15811694 - filesystem actions should support system attributes
  • Date: Tue, 08 Oct 2013 09:53:15 -0700

This is a review request for adding system attribute support to the packaging system.

First off, Gary and Darren:

I wrote a small C Python module to interact with fsetattr and fgetattr. At the moment I implemented only the bare minimum we require to make the package system work with system attributes. However, I realized that having a full-featured interface to fsetattr and fgetattr is not that much more work.
So I'm trying to find out if it would make sense to create a new package which delivers a "sysattr" Python module to Solaris. It would feature fsetattr and fgetattr, not the setattrat, getattrat interfaces (it seems they are for extended attributes, not system attributes, but I might be wrong). It would look pretty close to what I have now in sysattr.c, but would also support non-boolean system attributes. Let me know if you think that would be useful and if I'm missing anything in terms of what should be supported.


Wrt the webrev:

So how this is gonna work is that we have a sysattr attribute for files and the system attributes specified there get set on the file installed. They work in an additive way, so if there are any other system attributes set by the filesystem they will be ignored and left as is. This is also important for pkg verify.
The problem is that the filesystem will set some sysattrs by itself (like 'archive' or 'av_modified'). So pkg verify only verifies if the sysattrs specified in the action are still set. I think this way w capture the essence of what users might need the system attributes for (setting the sensitive flag and verify it's still set).

The syntax in the manifest is the following:

verbose: sysattr=hidden,sensitive
compact: sysattr=HT

You can't mix verbose and compact attributes. If there is not a comma separated list specified, it'll first check if the string is a valid verbose attribute, if not it'll treat it as a list of compacts and send it to fsetattr (where it will fail if one of them is not known/supported).


I had a few issues with setting up test cases for this since the test suite runs in tmpfs which doesn't support system attributes. We thought about moving the test directories from /tmp/ to /var/tmp but there is one test which needs to be fixed because it gets confused about what is a file and what is a hardlink.
Additionally, it seems we running the test suite with reduced privileges (to make other tests work correctly) which interferes with setting and resetting system attributes. I tried to put comments in the test cases to explain why I'm not using the normal way of running tests.

Webrev is here:

https://ips.java.net/webrev/etrausch/15811694_sysattrs/

Thanks
Erik


[pkg-discuss] [review] 15811694 - filesystem actions should support system attributes

Erik Trauschke 10/08/2013

[pkg-discuss] Re: [review] 15811694 - filesystem actions should support system attributes

Danek Duvall 10/08/2013

[pkg-discuss] Re: [review] 15811694 - filesystem actions should support system attributes

Erik Trauschke 10/08/2013

[pkg-discuss] Re: [review] 15811694 - filesystem actions should support system attributes

Gary Winiger 10/08/2013

[pkg-discuss] Re: [review] 15811694 - filesystem actions should support system attributes

Darren J Moffat 10/09/2013
 
 
Close
loading
Please Confirm
Close