Issue #19785 has been reported by Jesse Endahl.

----------------------------------------
Bug #19785: Puppet package for OS X does not hide /lib folder from user in 
Finder
https://projects.puppetlabs.com/issues/19785

* Author: Jesse Endahl
* Status: Unreviewed
* Priority: Normal
* Assignee: Chris Barker
* Category: OSX
* Target version: 
* Affected Puppet version: 3.1.1
* Keywords: puppet lib folder directory hidden os x mac package post postflight 
script
* Branch: 
----------------------------------------
The following line should be added to the postflight script to hide the /lib 
folder from the Finder UI:

SetFile -a V /lib

This works on 10.6 and up. Hiding root level system folders from the UI would 
be consistent with all the other top level folders. This is the method Apple 
uses to accomplish this:

You can verify that this is true because the other folders (e.g. usr, bin) have 
the same extended attribute set on them. Use xattr [dirname] to view the name 
of the extended attribute, and xattr -p [nameofattribute] [dir] to view the 
content of the extended attribute.

$ ls -al | grep usr
drwxr-xr-x@ 13 root   wheel      442 Oct 16 18:40 usr

Since we see the @ sign at the end of the POSIX permissions, we know there is 
an extended attribute. To check what it is:

$ xattr usr
com.apple.FinderInfo

To print the content of it:

$ xattr -p com.apple.FinderInfo usr
00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Since we know that this folder is hidden, we can guess that this is what's 
making it be hidden. Let's test the theory:

$ ls -al | grep lib
drwxrwx---   4 root   wheel      136 Mar 11 14:01 lib

No extended attribute set. Now let's use SetFile to hide /lib:

$ sudo SetFile -a V /lib

Check if there's an extended attribute:

ls -al | grep lib
drwxrwx---@  4 root   wheel      136 Mar 11 14:01 lib

Yep, let's list it:

$ xattr lib
com.apple.FinderInfo

Let's print it:

$ xattr -p com.apple.FinderInfo lib
00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Now let's compare again to the usr folder that was already hidden by OS X:

$ xattr -p com.apple.FinderInfo usr
00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Voila. Identical!


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to