Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
system.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2024 at 17:30 UTC
Updated:
24 Jul 2026 at 14:44 UTC
Jump to comment: Most recent
PEAR's Archive_Tar just made a new 1.5.0 release.
D7 has a copy of this code in the system module.
We should update D7's copy with the changes; there's nothing too significant but the full minor release bump was because of a change in behaviour around file permissions which is probably worth a CR.
Compare D7's modules/system/system.tar.inc with the new Archive_Tar release.
Sync / merge upstream changes.
As above.
n/a
See comment above re. file permissions change - this was the upstream PR:
https://github.com/pear/Archive_Tar/pull/46
n/a
tbc
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mcdruid commentedComment #4
poker10 commentedThanks for working on this!
Seems like the
Archive_Tarclass is used for example when using the Update manager to install a new module via UI (or update a module). See theupdate_manager_install_form()orupdate_manager_archive_extract()function.I was able to trigger the
Archive_Tar::_dirCheck()when installing the module via UI (using tar.gz archive). It seems like this function is currently setting the 777 permissions in the temporary directory, where the archive is extracted for the first time. Then theUpdater::install()orUpdater::update()function is copying the directory from temporary filesystem to the correct destination and permissions are corrected to 755 (at least during my limited testing).Are we aware of any (other) usage in D7 core where the 777 permissions are kept (so that we can explain that in the CR)? Contrib modules can also use this core library differently (extracting code somewhere else), so I agree that we need the CR to describe this behavioral change.
Otherwise the changes looks good to me.
Comment #5
poker10 commentedI have drafted a simple CR here: https://www.drupal.org/node/3451526 (feel free to update if needed).
Otherwise I think this is ready. Adding a tag.
Comment #6
mcdruid commentedI'm not aware of anywhere else that core might be affected by this, no.
We have some quasi-unit tests (which couldn't be actual unit tests as they involve using e.g. the temp directory which means Drupal has to be somewhat bootstrapped IIRC) in
SystemArchiverTest(added in #3102159: Add tests for Archive_Tar) if we wanted to add anything specific around this change.I don't think we specifically need to in this case as we're just mirroring the upstream change, and existing tests cover core's actual usage - I think that's e.g.
\UpdateTestUploadCase::testUploadModulewhich I only found after I'd added the unit(ish) tests mentioned above.Comment #7
mcdruid commentedOh, and draft CR looks good, thanks.
Comment #9
poker10 commentedThanks! Committed and pushed this.
Comment #10
mcdruid commented