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

chore: proposal refactor #670

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

chore: proposal refactor #670

wants to merge 3 commits into from

Conversation

p5
Copy link
Member

@p5 p5 commented Nov 1, 2024

Just an idea of a refactor to make it slightly easier to work in this repo.

TODO:

  • Figure out if I broke the alternatives hacks
  • Ensure package script still works after small refactor
  • Confirm removal of cosign binary is okay
  • Can we just always run initramfs regeneration, no matter the kernel?


RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=ctx,src=/,dst=/ctx \
--mount=type=bind,rw=true,from=ctx,src=/,dst=/ctx \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does is this bind mount changed to rw=true?

Copy link
Member Author

@p5 p5 Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added because I got annoyed with permissions on the scripts directory. The Containerfile now chmod +xs all scripts in the directory, which required write access. It can be removed if we wish to proceed with this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the bind being read-only, seems a bit odd to mutate the scripts on the fly.

Alternatives are:

  1. chmod +x the scripts locally and commit the change
  2. bash /ctx/build_files/scriptname.sh at runtime instead of /ctx/build_files/scriptname.sh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option 2 seems solid, if all the scripts are standardized as bash scripts.

Copy link
Member

@m2Giles m2Giles Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it unlikely for us to move off of bash any time soon so option 2 would be reasonable for me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand why the permissions are problematic in the first place. They are stored in git repo.

Only potential problem is someone committing in windows (not WSL).

@m2Giles
Copy link
Member

m2Giles commented Nov 5, 2024 via email

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

Successfully merging this pull request may close these issues.

4 participants