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

USERPATCHES_PATH customization and inconsistency across the framework #7091

Open
EvilOlaf opened this issue Aug 15, 2024 · 2 comments
Open
Labels
Bug Something isn't working as it should Discussion Being discussed - Voice your opinions :)

Comments

@EvilOlaf
Copy link
Member

EvilOlaf commented Aug 15, 2024

By chance I was thinking about organizing various custom configurations I thought about having multiple directories for userpatches and define one of these at runtime.

From what I've seen the path seems to be set here:

declare -g -r DEST="${SRC}/output" USERPATCHES_PATH="${SRC}"/userpatches # DEST is the main output dir, and USERPATCHES_PATH is the userpatches dir. read-only.

and from there going forward the path should be stored in $USERPATCHES_PATH variable, right?

However search simply for userpatches reveals that on several occasions the path seems to be hard-coded (list incomplete):

conf_path="${SRC}/userpatches/config-${argument}.conf"

generate_sample_extension_to_stdout > "${SRC}/userpatches/extensions/sample-extension.sh"

run_host_command_logged find "${SRC}/userpatches" -name ".DS_Store" -type f -delete "||" true

So the question is am I wrong here for some reason? Is this intended? Should the path be stored in a variable everywhere? Should the patch possible be customizable? Like ./compile.sh BOARD=asdf USERPATCHES_PATH=asdf MyConfigInAsdf

@EvilOlaf EvilOlaf added Discussion Being discussed - Voice your opinions :) Bug Something isn't working as it should labels Aug 15, 2024
Copy link

Jira ticket: AR-2468

@pavlot-scriptec
Copy link

Some time ago, I already raised this issue: #4118. (sorry, now I'm writing from work account)

But after some re-thinking extensions looks more promising for me. They can be placed to existing user_patches directory as a separate git repository. So you can develop and track changes for them separately from Armbian sources.

Another killer feature - extensions have hooks. This allow you to prioritize code execution and call required code at different stages of build process.

I have prepared article how extensions could be used: https://github.com/pavlot-scriptec/scriptec-blog/blob/main/customize_armbian_image_using_extensions.md.

If you have any questions feel free to contact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as it should Discussion Being discussed - Voice your opinions :)
Development

No branches or pull requests

2 participants