Title: [272240] trunk/Tools
- Revision
- 272240
- Author
- [email protected]
- Date
- 2021-02-02 15:10:50 -0800 (Tue, 02 Feb 2021)
Log Message
[webkitcorepy] Autoinstaller can fail on packages containing write protected files
https://bugs.webkit.org/show_bug.cgi?id=221266
Reviewed by Jonathan Bedard.
The autoinstaller extracts an archive containing the package to a temporary directory and
then installs it from there. If the autoinstaller attempts to extract the archive again into
the same temporary directory it can fail if there was a write protected file. The extraction
will fail and the installer cannot continue until the temporary directory is cleared.
To prevent this the permissions for each file/directory in the tarball is manually set.
This was originally observed with the logilab-common package which ships with a test containing
a write protected file.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.Archive.unpack):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (272239 => 272240)
--- trunk/Tools/ChangeLog 2021-02-02 22:44:36 UTC (rev 272239)
+++ trunk/Tools/ChangeLog 2021-02-02 23:10:50 UTC (rev 272240)
@@ -1,3 +1,23 @@
+2021-02-02 Don Olmstead <[email protected]>
+
+ [webkitcorepy] Autoinstaller can fail on packages containing write protected files
+ https://bugs.webkit.org/show_bug.cgi?id=221266
+
+ Reviewed by Jonathan Bedard.
+
+ The autoinstaller extracts an archive containing the package to a temporary directory and
+ then installs it from there. If the autoinstaller attempts to extract the archive again into
+ the same temporary directory it can fail if there was a write protected file. The extraction
+ will fail and the installer cannot continue until the temporary directory is cleared.
+
+ To prevent this the permissions for each file/directory in the tarball is manually set.
+
+ This was originally observed with the logilab-common package which ships with a test containing
+ a write protected file.
+
+ * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
+ (Package.Archive.unpack):
+
2021-02-02 Aakash Jain <[email protected]>
[ews] Commit queue failure message should indicate that cq+ flag can be set again
Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py (272239 => 272240)
--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py 2021-02-02 22:44:36 UTC (rev 272239)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py 2021-02-02 23:10:50 UTC (rev 272240)
@@ -116,6 +116,9 @@
if self.extension == 'tar.gz':
file = tarfile.open(self.path)
+ # Prevent write-protected files which can't be overwritten by manually setting permissions
+ for tarred in file:
+ tarred.mode = 0o777 if tarred.isdir() else 0o644
try:
file.extractall(target)
finally:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes