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

Add FIXUP option, for automatic package hash. #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cmangla
Copy link
Contributor

@cmangla cmangla commented Sep 3, 2024

Fixes #18
Fixes #35

@cmangla
Copy link
Contributor Author

cmangla commented Sep 3, 2024

It seems FIXUP=1 needs to be set when PKG_MIRROR_HASH:=skip is set. See:
https://openwrt.org/docs/guide-developer/packages#use_source_repository

@cmangla
Copy link
Contributor Author

cmangla commented Sep 3, 2024

@aparcar Please do "Squash and merge" if the PR is good and whenever it is convenient for you. Thanks!

@qwerttvv
Copy link

qwerttvv commented Sep 4, 2024

This PR worked perfect, THANKS!!!

@EkkoG
Copy link
Contributor

EkkoG commented Oct 29, 2024

I think when FIXUP=1, package should not compile, or there can have another option to enable fixup-only action

@aparcar
Copy link
Member

aparcar commented Oct 29, 2024

I don't understand the motivation for this PR. Could you please explain and add it to the commit message?

@cmangla
Copy link
Contributor Author

cmangla commented Oct 29, 2024

I don't understand the motivation for this PR. Could you please explain and add it to the commit message?

Let me run the motivation by you for your feedback, before I update the commits.

The motivation behind adding the FIXUP option is to generalize my specific motivation, which is to be able to compile a single package that sets PKG_MIRROR_HASH=skip. Others have expressed similar desires, such as in Issue #35 .

When PKG_MIRROR_HASH=skip and the FIXUP option is not specified in the OpenWRT build system for make check, a message is generated in the logs. In this GH Action, that message is filtered-in (see this line) as an error, and the build fails.

When the FIXUP option is specified, and in the Makefile we have PKG_MIRROR_HASH=skip, no log message regarding a hash check failure is generated, so with that this GH action is able to subsequently compile the package. This succeeds because the FIXUP option also fixes the Makefile to contain the correct value of PKG_MIRROR_HASH.

This PR adds the ability to specify the FIXUP option to make check (over here). I have also added a second, a more brute-force, option of IGNORE_PKG_HASH_ISSUE. This option simply disables the exit 1 statement when a package has a mismatched hash (over here).

I welcome suggestions for changes to this PR.

@qwerttvv
Copy link

When compiling individual packages, one may want to pass the FIXUP
option to `make check`. It can help with generating package hashes.
@cmangla
Copy link
Contributor Author

cmangla commented Nov 1, 2024

I don't understand the motivation for this PR. Could you please explain and add it to the commit message?

@aparcar Done. I kept only the FIXUP option in this PR for simplicity and clarity.

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