Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip extended attributes. #8

Open
erikng opened this issue Jul 29, 2015 · 7 comments
Open

Strip extended attributes. #8

erikng opened this issue Jul 29, 2015 · 7 comments

Comments

@erikng
Copy link
Contributor

erikng commented Jul 29, 2015

When exporting a bomfile, I (and Allister) noticed attribute files. This was due to testing on Dropbox (a huge no-no with git anyway).

I git pulled onto a clean location and recreated everything. erikng/munki-pkg-projects@f63f09a

It might be ideal to automatically remove these files or put it on the readme.

@gregneagle
Copy link
Contributor

"It might be ideal to automatically remove these files" -- during what operation?

--export-bom-info itself would not be creating extended attributes.

@erikng
Copy link
Contributor Author

erikng commented Jul 29, 2015

during package creation.

@gregneagle
Copy link
Contributor

Not really following. Do you mean when --export-bom-info is specified, any existing Bom.txt file should be removed (hopefully removing xattrs along with it)? When the new Bom.txt file is created, it would not have any xattrs. Is that it?

@erikng
Copy link
Contributor Author

erikng commented Jul 29, 2015

No, because that's just going to fix it for the following build.

lsbom ~/Desktop/test/Bom
. 40755 0/0
./._private 40755 0/0 0 0
./private 40755 0/0
./private/._tmp 40755 0/0 0 0
./private/tmp 40755 0/0

The bom inside the created package contains these extended attributes. More than likely we don't want these files to begin with.

@arubdesu
Copy link

Sounds cosmetic, but also like there's potentially a judgement call that needs to be exercised by the admin. On the other hand, it may be less tricky than we think, killing these xattr's may always be considered safe:

com.macromates.bookmarks
com.macromates.crc32         
com.macromates.folded        
com.macromates.selectionRange
com.dropbox.attributes
com.apple.quarantine

etc. That seems like a list that would require maintaining/explaining to munkipkg users.
Wether or not they materially affect the payload, they may contain metadata the admin doesn't want to blast out on all machines.

@gregneagle
Copy link
Contributor

erikng: So it's not the bom you are concerned about; it's the payload files.

I don't think I'd be in favor of munkipkg automatically stripping xattrs, as there are potentially "helpful" xattrs that an admin might specifically want to include on files in a pkg

An option to strip xattrs from payload files might be possible, but Allister brings up an interesting point and a list that is I'm sure is very incomplete. In the interests of simplicity and understandability, I think we either strip them all with a --no-xattrs flag or we leave them all alone. If an admin wants to be surgical, they just need to be surgical "by hand".

@erikng
Copy link
Contributor Author

erikng commented Jul 29, 2015

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants