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

File composer.phar from getcomposer.org is different than file composer.phar from repository #9746

Closed
pmasior opened this issue Mar 3, 2021 · 8 comments
Labels
Milestone

Comments

@pmasior
Copy link

pmasior commented Mar 3, 2021

I downloaded file composer.phar from official website and from Releases in Composer GitHub repository, but these files are different.

I checked earlier versions. From version 2.0.0 to 2.0.8 corresponding versions of composer.phar from the website and GitHub repository are the same. From version 2.0.9 to version 2.0.11, corresponding versions downloaded from the website and GitHub repository are different. Is it expected? Below I paste sha256sums.

eabf2917072096a94679193762501319e621e2b369a4a1256b2c27f4e6984477  composer(2.0.11_www).phar
d6eee0d4637f4bd82bdae098fceda300dcb3ec35bf502604fbe7510933b8f952  composer(2.0.11_gitrel).phar
92cb8b75268b23d1275e6d72dd398b29244505bea6d1f247ba126fd45a990645  composer(2.0.10_www).phar
72a5a68d12f315d74d931462413f7e114cd77b4be1a6b9494141dda93410751a  composer(2.0.10_gitrel).phar
24faa5bc807e399f32e9a21a33fbb5b0686df9c8850efabe2c047c2ccfb9f9cc  composer(2.0.9_www).phar
8e91344a5ca2fc0fb583c50f195a1f36918908561c4ea3d6f01a4ef01c3b8560  composer(2.0.9_gitrel).phar
2021f0d52b446e0efe3c548cc058ab5671fa38cdbcf814e7911c7e9d71d61538  composer(2.0.8_www).phar
2021f0d52b446e0efe3c548cc058ab5671fa38cdbcf814e7911c7e9d71d61538  composer(2.0.8_gitrel).phar
0a060e8caf1d5cde55c4562fd68369b08cf231b8fd30da9c8f994b111557ebe9  composer(2.0.7_www).phar
0a060e8caf1d5cde55c4562fd68369b08cf231b8fd30da9c8f994b111557ebe9  composer(2.0.7_gitrel).phar
e5e39d8fa699ddb09844f6b4388280ff2c805fef0a7c26580c5bbc91ac35091b  composer(2.0.6_www).phar
e5e39d8fa699ddb09844f6b4388280ff2c805fef0a7c26580c5bbc91ac35091b  composer(2.0.6_gitrel).phar
e786d1d997efc1eb463d7447394b6ad17a144afcf8e505a3ce3cb0f60c3302f9  composer(2.0.5_www).phar
e786d1d997efc1eb463d7447394b6ad17a144afcf8e505a3ce3cb0f60c3302f9  composer(2.0.5_gitrel).phar
c3b2bc477429c923c69f7f9b137e06b2a93c6a1e192d40ffad1741ee5d54760d  composer(2.0.4_www).phar
c3b2bc477429c923c69f7f9b137e06b2a93c6a1e192d40ffad1741ee5d54760d  composer(2.0.4_gitrel).phar
5d377e9b504dc9f6c9228d81c321ba85290512cdb396a12d3708b0cd30d2e20c  composer(2.0.3_www).phar
5d377e9b504dc9f6c9228d81c321ba85290512cdb396a12d3708b0cd30d2e20c  composer(2.0.3_gitrel).phar
5e122edd0f2a4fb01172b6b1c156b3d252d9205105b4ad169a4b09913ba6a859  composer(2.0.2_www).phar
5e122edd0f2a4fb01172b6b1c156b3d252d9205105b4ad169a4b09913ba6a859  composer(2.0.2_gitrel).phar
4b4b118cc54662e4813ba86efb215fdb19c5b29944c5919b4f2803c915aa2234  composer(2.0.1_www).phar
4b4b118cc54662e4813ba86efb215fdb19c5b29944c5919b4f2803c915aa2234  composer(2.0.1_gitrel).phar
139657aa2b37867800292724145e3c4895f7755d845758b403dc329d17bdd285  composer(2.0.0_www).phar
139657aa2b37867800292724145e3c4895f7755d845758b403dc329d17bdd285  composer(2.0.0_gitrel).phar

Files downloaded from repository (version 2.0.4 and later) are signed with key 161D FBE3 4288 9F01 DDAC 4E61 CBB3 D576 F2A0 946F. I didn't found any actual information about signature files on the official website.

If my ticket is unfounded, I sorry about that.

@stof
Copy link
Contributor

stof commented Mar 4, 2021

Looks like 44dc3c2 implemented signing for the phars in github releases, but that the same was not applied for the website...

@stof
Copy link
Contributor

stof commented Mar 4, 2021

hmm, no. That commit only adds the GPG signature, but it does not impact the phar. That's likely something else.

@Seldaek Seldaek added this to the 2.0 milestone Mar 5, 2021
@Seldaek Seldaek added the Bug label Mar 5, 2021
Seldaek added a commit to composer/getcomposer.org that referenced this issue Mar 9, 2021
@Seldaek Seldaek closed this as completed in 06003f4 Mar 9, 2021
@Seldaek
Copy link
Member

Seldaek commented Mar 9, 2021

Thanks for catching this @pmasior!

The issue was that I started building phars for getcomposer.org using PHP8 which results in slightly different whitespace in the phar file due to token_get_all() behavior variations.

I rebuilt the 2.0.9 / 10 / 11 phars with 7.4 to match github ones. Future versions will be built on PHP 8 on github as well.

anomiex added a commit to Automattic/jetpack that referenced this issue Mar 9, 2021
Composer rebuilt the package which changed the hash. See
composer/composer#9746 (comment).
anomiex added a commit to Automattic/jetpack that referenced this issue Mar 9, 2021
Composer rebuilt the package which changed the hash. See
composer/composer#9746 (comment).
matticbot pushed a commit to Automattic/jetpack-autoloader that referenced this issue Mar 9, 2021
@pmasior
Copy link
Author

pmasior commented Mar 9, 2021

Thanks for explaining and solving the problem

@mnme
Copy link

mnme commented Mar 9, 2021

This checksum change should probably be communicated on an official channel to make it clear that this is intended. I just encountered a hash mismatch in homebrew (see linked issue above), but this will probably impact other systems as well.

@Seldaek
Copy link
Member

Seldaek commented Mar 9, 2021

Right, sorry about that. I guess I shouldn't have updated them in retrospect, but now it's done it's probably best to leave it rather than cause even more mess.

@joseluisq
Copy link

joseluisq commented Mar 19, 2021

This checksum change should probably be communicated on an official channel to make it clear that this is intended. I just encountered a hash mismatch in homebrew (see linked issue above), but this will probably impact other systems as well.

Yeah, also there is no announce in the website https://getcomposer.org/download/

In my case I have just realized today about the mismatch, d6eee0d4637f4bd82bdae098fceda300dcb3ec35bf502604fbe7510933b8f952 in favor of eabf2917072096a94679193762501319e621e2b369a4a1256b2c27f4e6984477 for the same 2.0.11 version when our CI pipeline just broke.

@Seldaek
Copy link
Member

Seldaek commented Apr 1, 2021

Just FYI, 2.0.12 was now released and I can confirm both my build and the automatic build on GH actions are exactly the same sha256 (82ea8c1537cfaceb7e56f6004c7ccdf99ddafce7237c07374d920e635730a631) so the fix looks good.

davidacmoreira-cx added a commit to cxsca/cx-composer-cli that referenced this issue May 14, 2021
* Include stdout as well as stderr if git stash/diff/.. fails, fixes composer#9720

* Remove version argument from why and enforce it for why-not command, refs composer#9693

* Fix compiler on Windows (composer#9730)

* Preserve file permissions on Windows self-update (composer#9733)

Windows file operations result in different file permissions depending
if the file is copied or moved. A copy operation applies permissions
from the destination folder (or file if it already exists and does not
use inheritance), while a move operation generally preserves the source
file permissions.

Windows PHP `rename` uses MoveFileEx so if the user is running as an
admin and the destination is in a common (non-user) location, then the
permission for other users will be replaced by the admin user. Likewise
for the UAC elevation feature, which uses the cmd.exe `move` command.

This fix uses copy and delete operations on Windows, so that other users
can continue to run composer.phar

* Proxy handling docs and tweaks (composer#9735)

* Fix functional tests to use the same PHP version as PHPUnit runs with

* Add support for @php <abs path to binary from PATH>, fixes composer#9726

* Fix issue extracting archives into paths that already exist, fixes composer/installers#479

* Avoid using str_replace for dev-master replacement as that may be a valid part of a branch name, fixes composer#9739

* Fix php-proxying of binaries to avoid proxying phar files, fixes composer#9742

* Make sure that single files installed via file downloader get the executable bit set if they are a binary file, refs composer#9742

* Fix var shadowing

* Fix unclear error when a package can be found in lock but not in the remote repo, fixes composer#9750

* Update release step to use php8 as it produces slightly different output wrt white-space, fixes composer#9746

* Bump phpstan to level 3 (composer#9734)

Clean up PackageInterface/CompletePackageInterface, add missing methods, type things in solver as BasePackage, added CompleteAliasPackage, ..

* Update GitHub token pattern

GitHub is updating the format of auth tokens from `a-z0-9` to `A-Za-z0-9` ([notice](https://github.blog/changelog/2021-03-04-authentication-token-format-updates/)).
I'm not sure why `.` is allowed, but I dare not to remove it. In this PR, the token validation regex is updated to allow `A-Za-z0-9` instead of the current all lower-case `a-z` and disallowed `_`.

* Document GH token usage and also make sure we redact them in Process debug output, refs composer#9757

* Remove output "summary" from fund command. Fund does not provide this type of format. (composer#9748)

* Clarify behavior of name in VCS repo, closes composer#9752

* Add --format json to search command (composer#9747)


Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>

* Attempt working around Vagrant filesystem issues, added COMPOSER_RUNTIME_ENV env var (set to vagrant), fixes composer#9627

* Prefer @phpstan- annotations as that is what we run against

* Fix phpdoc

* Make full functional test output more reliable

* Create pull_request_template.md

* Only call sapi_windows_set_ctrl_handler() for CLI requests (composer#9771)

* MaxFileSizeException should reject download job (composer#9778)

* Also attempt working around Vagrant filesystem issues when installing plugins initially, refs composer#9627

* Add source package name to debug info when enabling plugins

* Add dev mode env var for scripts run (composer#9793)

Co-authored-by: Vitali Tsyrkin <vitalit@playtika.com>

* Update github token pattern to match their latest updates

* Update changelog

* Tweak virtualbox detection and improve it by detecting vbox additions, refs composer#9627

* Update changelog

* Fixed detection of hg version when localized, fixes composer#9753

* Fix type warning on php8.1, refs composer#9770

* Support --no-dev combined with --locked in outdated/show commands, fixes composer#9788

* Improve InstalledVersions docs slightly

* Fix doctype annotations

* Change root.dev-requirement to root.dev in installed.php as the root is not required per se, and this simply tracks the dev mode at install time

* Fix tests

* Make ComposerRepository::configurePackageTransportOptions() protected. (composer#9818)

* Fix doctype annotations

* Switch to composer/metadata-minifier, fixes composer#9727

* Add new dep to the tests

* Change default preferred-install to dist, add --prefer-install=auto|dist|source to allow specifying auto (composer#9603)

Fixes composer#9546
Fixes composer#9674

* Add warning when loading plugins of type composer-installer as they are unlikely to function correctly and should be upgraded to the composer-plugin type

* Fix output listing some updates that do not really happen when updating mirrors/--lock, fixes composer#9812

* Make sure update mirrors/--lock keeps the release date of the original reference when dev versions have newer commits, refs composer#9812

* Fire POST_FILE_DOWNLOAD event for metadata fetched by ComposerRepository.

* Clean stuff up and deprecate old usages for PostFileDownloadEvent

* Add repository instance to Pre/PostFileDownloadEvent metadata

* Added link to composer.org docs on ProcessTimedOutException (composer#9796)

* ComposerRepository::asyncFetchFile() does not pass the downloaded URL to PostFileDownloadEvent (composer#9827)

* Update 00-intro.md

* Upgrade to xdebug-handler 2 (composer#9832)

This adds support for Xdebug3 modes and changes the default behaviour
from always restarting if Xdebug is loaded, to only restarting if Xdebug
is active.

Xdebug is considered active if it is loaded, and for Xdebug3, if it is
running in a mode other than `xdebug.mode=off`.

* Fix source links, fixes composer#9836

* Allow PreFileDownloadEvent to carry transport options for metadata (composer#9831)

* Use jsonc highlighting

* "composer init --autoload" - Interactive generates PSR-4 autoloader in composer.json (composer#9829)

- Generates PSR-4 autoload entry in composer.json.
- Run dump-autoload, if no dependencies are set

* Fix install step at the end of init command

* Fix install step at the end of init command

* Merge pull request from GHSA-h5h8-pc6h-jvvx

* Fix external process calls to avoid user input being able to pass extra parameters

* Tweak some fixes

* Merge pull request from GHSA-h5h8-pc6h-jvvx

* Fix external process calls to avoid user input being able to pass extra parameters

* Tweak some fixes

* Update changelog

* Update changelog

* Add basic source/dist validation

* Allow ints in source/dist reference

* Also make sure type is correct for preg_match

* BinaryInstaller: install full binaries on WSL when bin-compat=auto (composer#9855)

* Hint at a branch rename if we detect dev-master can not be found but dev-main or dev-default exists, fixes composer#9850

* Also condense dev-* versions if there are many, refs composer#9850

* Introduce a cross-platform safe version of is_readable to support UNC / wsl$ paths on Windows (composer#9861)

* Fix handling of inline-update-constraints with refs or stability flags, fixes composer#9847

* Link to GitLab documentation for auth (composer#9833)



Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>

* Avoid leaving the event stack in a dirty state if an event listener throws, fixes composer#9846

* Fix invalid interface usage

* Fix type issues with root package interface

* Also handle throwable on supported php versions

* Fix EOL of text files (composer#9877)

* Fix update fork changes

* Add skipping svn downloader

* Revert skipping in svn downloader

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
Co-authored-by: Nils Adermann <naderman@naderman.de>
Co-authored-by: John Stevenson <john-stevenson@blueyonder.co.uk>
Co-authored-by: Ayesh Karunaratne <ayesh@aye.sh>
Co-authored-by: ochorocho <jochen.roth@b13.com>
Co-authored-by: Brandon Kelly <brandon@pixelandtonic.com>
Co-authored-by: Stephan <glaubinix@users.noreply.github.com>
Co-authored-by: vitman <vitalyhome@tut.by>
Co-authored-by: Vitali Tsyrkin <vitalit@playtika.com>
Co-authored-by: Adam <adam@phenaproxima.net>
Co-authored-by: Markus Staab <markus.staab@redaxo.de>
Co-authored-by: Antoine Makdessi <amakdessi@me.com>
Co-authored-by: Andreas Scheibel <contact@camya.com>
Co-authored-by: Markus Staab <47448731+clxmstaab@users.noreply.github.com>
Co-authored-by: timrizzi <tim.rizzi@gmail.com>
Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants