-
Notifications
You must be signed in to change notification settings - Fork 14
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
Download and setup of tools? #16
Comments
Those aren't options at present. It might be possible to create a recipe that installs a tool if it doesn't exist and use that as a recipe dependency. I haven't tried it, but I have a feeling that if you define both a recipe & tool to find/download+install the tool, the tool would fail the dependency check at the beginning and it would never continue to install the missing tool using the recipe. I think your ideas (1) and (2) are very reasonable. Imagine they would only run if the tool isn't found using one of the tool checks. The install scripts would have to be defined for each host platform instead of host/target. I don't know if it makes sense to include the The scripts in the recipe yaml files provide a handful of variables that evaluate to the recipe work and install directories (e.g. What do you think? |
I like your approach, some more questions:
|
Brian,
name: template_tool
version: ""
mussels_version: "0.1"
type: tool
platforms:
Posix:
path_checks:
- template_tool
command_checks:
- command: "template_tool --version"
output_has: "template_tool 1.2"
file_checks:
- /usr/local/bin/template_tool
- /usr/bin/template_tool
install_url: https://www.sample.com/download/template_tool
install_script: |
./template_tool --prefix={install}
Windows:
file_checks:
- C:\/Program Files/template_tool/bin/template_tool.exe
install_url: https://www.sample.com/download/template_tool.exe
install_script: |
.\template_tool.exe /DIR={install} I think you're right, multiple flavors would mean multiple tool yaml files, each with unique tool names.
I would also like to put together some example recipes in the scrapbook repository to demonstrate dependency chains. If you have any ideas for library builds that would make for good examples, I'm all ears.
|
Micah:
|
The recipe and tool yaml schemas differ enough that neither could be a superset of the other.
Using the libcurl recipe from the clamav cookbook again as an example, the build-order for recipes would be the following:
It will just build them in serial in the order listed above. The numbers in brackets like
WRT (3) & (4): Btw, love the idea of test recipes. Don't know why I didn't think of this use case.
That's a really good use case. Let's make a new Github Issue for customizing the work folder as well. |
Sounds good. How would I define my own list of stages? Or does Mussels just generate the stage list from the deps for a leaf recipe? |
As you suspected, Mussels generates the stage list based on the dependencies of each recipe. There's no way to manually define the build order. Thanks for putting in the two other issues! |
a. I want to treat tools as full-fledged dependencies, ie: automatically download and use them.
b. Can the download section also have a download location, for where to download
the tool to a local drive?
To do 1. above, some install action is needed after download.
Install use cases:
a. none (for tools that can be run directly from the download location)
b. an extract script - extract the tool to a temp folder for running (for zero install tools)
c. an install script - run the installer for a tool or custom install steps (for tools requiring install)
These could all work with the install section being a script.
Or am I instead supposed to make a recipe yaml for a tool?
And use the recipe yaml along with the tool yaml, to do the use cases?
If so, then the recipe and tool information would be in separate files, and possibly separate folders, making the tool info hard to maintain.
Thoughts?
The text was updated successfully, but these errors were encountered: