-
-
Notifications
You must be signed in to change notification settings - Fork 27
Phive > Upgrade all phar-download to phive-install #369
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
Conversation
Can we remove the version where possible? |
|
Some installations fail due to the question about key import: |
|
I noticed. Does that mean we should always use |
I can remove the version constraint but IDK if there are any compatibility issued. Do you know if Point is, I'm not aware of the limitations each tool has and/or if that version specification was put there on purpose to cover a BC break or if it was there because there was no URL with "latest" available. |
|
Middle-ground could be |
|
This was caused by improper use of |
|
Apparently the topic of auto-accept isn't going to be a fun one: phar-io/phive#69 ... either we |
|
Is it possible to import keys beforehand in an automated way? |
@jakzal Any automated import is viewed as a security risk. |
|
In order to test the rest of the implementation details I've defaulted the implementation to accepting unsigned packages. |
|
@jakzal the current failure is a permission denied on |
|
It seems that box is downloaded to the box directory: By the way, you can install tools locally for easier debugging: mkdir local
COMPOSER_HOME=$(pwd)/local/composer PATH=$(pwd)"/local:"$(pwd)"/local/composer/vendor/bin:$PATH" bin/toolbox.php install --target-dir ./local --tag pre-installationyou'll then see that box is a directory: ls local/
_tmp_wrk/ box/ box-legacy* composer/ gpg/ http-cache/ phars/ phive* registry.xml |
|
@jakzal the target parameter of We have at least 3 instances where we artificially alter the tool name (ex.: phpunit versions). |
|
We need to think how to work around it. What's the difference between Perhaps we could install all phive tools to their own directories grouped under phive |
|
By default when you install something it will symlink it into the current folder under the short (versionless) name. If you specify We can work around it by allowing it to generate a symlink somewhere else (in a "clean" directory such as |
|
OK, so we have an makeshift solution that works, it installs all tools using
Both of the above hacky solutions aren't very comfortable. How should we proceed? |
|
Note: in a finished docker build I'm not sure why the builds work in git actions -- perhaps What command can I use to setup a local test of the full build with |
Note that the phpqa image is not used in toolbox GitHub actions. gpg is probably installed on GitHub's image.
This is going to be tricky. We don't need it often and in general it requires a released version of toolbox. If it gets too hard I'm open to merge your PR here and create a new release.
Regarding the step 2, you'll need to either replace the curl command that download toolbox to download your own version, or replace it with Docker's |
|
@jakzal what about the other two issues:
Do we try addressing/fixing these issues before releasing? |
|
@mihai-stancu I'll take a look as soon as I have a bit of time. Thank you for working on this again! |
|
I've successfully tested eliminating Steps:
Now tools will be installable without requiring signature confirmation. |
|
Is it easy to make a list of keys and hard code it? i.e. download them in Dockerfile upfront (at least for now, later we could think of a command step). This way we'd verify the initial list of keys that would be installed on the image. Later, if any of the keys changed or a new tool was added, the build would fail and we'd need to verify/accept new keys again. As a result, we wouldn't be accepting keys blindly. |
Steps to reproduce what I have tried:
|
|
Another approach would be to store a list of signatures in a txt file and pass them all to It feels like it's the same approach as above, with extra steps. |
|
This just dawned on me: each IDK how I missed this, this was very obvious. |
|
Starts looking good 👍 Builds are currently failing due to an issue unrelated to this PR: deprecated-packages/symplify#3056 |
|
Did you disable ecs? That allowed the tests to continue up until they hit Now everything works. Yay! |
No, they seem to have fixed the phar :) |
|
@mihai-stancu I will make a new toolbox and phpqa releases. This will give you some time to finalise this PR. Once ready, we'll merge it and release toolbox. |
|
Status:
|
|
@mihai-stancu can you rebase again please? |
|
Also, seems we can't be using psalm as phar to use psalm plugins (see #252). Can you revert it back please? |
|
I pushed 994f20a to your branch. This is an idea to work around the ugly As a result, we don't use the "bin part" of the "command": {
"phive-install": {
"alias": "dephpend",
"bin": "%target-dir%/dephpend",
"sig": "76835C9464877BDD"
}
}How about we turn it into a "command": {
"phive-install": {
"alias": "dephpend",
"target": "%target-dir%",
"sig": "76835C9464877BDD"
}
} |
|
Rebased. Checks passed. |
|
Outstanding work! Thank you @mihai-stancu 🍻 |
🍻 |
Based on #354 I've migrated all the
phar-downloadcommands tophive-installcommands.Some didn't work tho, idk why.
Note: if the tool was installed with a specific version in the url, then I retained the version specification in the install command (
alias@^version). Most tools likely didn't have alatesturl setup so the version is probably unnecessary there (it's not a BC break) but I can't know that.