Closed
Bug 971802
Opened 10 years ago
Closed 10 years ago
Make mozpack+mozjar capable of storing unix file permissions in jars
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla30
People
(Reporter: ted, Assigned: ted)
References
Details
Attachments
(1 file, 1 obsolete file)
6.93 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
It turns out that mozjar doesn't currently support storing Unix file permissions. This patch fixes this through the entire stack (mozjar, mozpack) so that adding files to a Jarrer does the right thing.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8374928 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 2•10 years ago
|
||
Accidentally qref'ed that into another patch, here's the right patch.
Attachment #8374931 -
Flags: review?(mh+mozilla)
Assignee | ||
Updated•10 years ago
|
Attachment #8374928 -
Attachment is obsolete: true
Attachment #8374928 -
Flags: review?(mh+mozilla)
Comment 3•10 years ago
|
||
Comment on attachment 8374931 [details] [diff] [review] Make mozpack capable of storing unix file permissions in jars Review of attachment 8374931 [details] [diff] [review]: ----------------------------------------------------------------- ::: python/mozbuild/mozpack/files.py @@ +179,5 @@ > ''' > def __init__(self, path): > self.path = path > > + def mode(self): @property ::: python/mozbuild/mozpack/mozjar.py @@ +602,3 @@ > entry['creator_version'] = 20 > + if mode is not None: > + # Set create system so mode is honored. # Set creator host system (upper byte of creator_version) to 3 (Unix) so mode is honored when there is one. @@ +602,4 @@ > entry['creator_version'] = 20 > + if mode is not None: > + # Set create system so mode is honored. > + entry['creator_version'] |= 3 << 8 BTW, can you fix "host = entry['creator_version'] >> 16" in JarReader.entries? it's wrong (16 should be 8). @@ +617,5 @@ > entry['crc32'] = deflater.crc32 > entry['compressed_size'] = deflater.compressed_size > entry['uncompressed_size'] = deflater.uncompressed_size > + if mode is not None: > + entry['external_attr'] = (mode & 0xFFFF) << 16L You could group both ifs
Attachment #8374931 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/cf5d9c8a1368
https://hg.mozilla.org/mozilla-central/rev/cf5d9c8a1368
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•