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

Makefile shouldn't unthinkingly retrieve robot.jar #583

Open
swartik opened this issue Jan 2, 2025 · 2 comments
Open

Makefile shouldn't unthinkingly retrieve robot.jar #583

swartik opened this issue Jan 2, 2025 · 2 comments
Assignees

Comments

@swartik
Copy link

swartik commented Jan 2, 2025

Our IT department is hypersensitive about JARs and makes downloading them difficult. I have to go through contortions to run the make command. I request the Makefile be rewritten to check whether build/lib/robot.jar already exists, and to not download it if it does.

If you agree this request is worthwhile, I'll rewrite Makefile on my fork and submit a pull request.

@BrendaBraitling
Copy link

This seems like a sound risk management process that has no impact on users.

@tmprd
Copy link

tmprd commented Jan 18, 2025

I agree that adding extra security precautions related to this are worthwhile.
However, Make was designed exactly for this use case (though I think it's documentation is confusing):
https://www.gnu.org/software/make/manual/make.html#Rule-Example
If you run make build/lib/robot.jar ideally you should get the message: 'build/lib/robot.jar' is up to date.

But I see the unexpected behavior you mean. We should be able to avoid it another way, so I'll comment on your PR.
I recommend this (related docs):

ROBOT_FILE := $(config.LIBRARY_DIR)/robot.jar
$(ROBOT_FILE): | $(config.LIBRARY_DIR)
	curl -L -o $@ https://github.com/ontodev/robot/releases/download/v1.8.4/robot.jar
	chmod +x $@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants