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

feat!: modular rewrite (#103) #135

Merged
merged 83 commits into from
Sep 10, 2023
Merged

feat!: modular rewrite (#103) #135

merged 83 commits into from
Sep 10, 2023

Conversation

xynydev
Copy link
Member

@xynydev xynydev commented Aug 9, 2023

This is an ongoing WIP rewrite for startingpoint to make it more modular. Comments appreciated. Code will be running through shellcheck.

Made this a 1.0 goal since I wouldn't do a "first release" with a rewrite in the works. Think of the current version as a 0.9 which won't be getting any breaking changes or new features for as long as this is in the works.

Aiming for feature parity but cleaner config files.

* this does not work yet
* comments & documentation will be added once the rewrite is complete
@xynydev xynydev added this to the 1.0 milestone Aug 9, 2023
@xynydev
Copy link
Member Author

xynydev commented Aug 9, 2023

Other things I'll probably do in this PR:

  • Move documentation away from the main README and into the new config directory and inside module folders.
  • Less (streamlined) inline documentation.
    • It's good to a certain extent. I feel that rn it is hurting readability quite a bit, and many of the comments just restate the line without adding context.

    • Example:

      # Copy public key
      COPY cosign.pub /usr/share/ublue-os/cosign.pub
      
  • Add shellcheck GHA https://github.com/marketplace/actions/shellcheck

@xynydev
Copy link
Member Author

xynydev commented Aug 9, 2023

I wonder what this error's about. I'll probably remove wallpapers for now.

ublue-os-wallpapers-0.1-1.fc38.noarch (@commandline)
Installing: ublue-os-wallpapers-0.1-1.fc38.noarch (local)
ln: failed to create symbolic link '/usr/share/wallpapers/ublue-os': No such file or directory
Building startingpoint from Fedora 38 (ghcr.io/ublue-os/silverblue-main).
Error: 1:1: invalid input text "r"
error building at STEP "RUN rpm-ostree install /tmp/ublue-os-wallpapers-0.1-1.fc38.noarch.rpm &&         chmod +x /tmp/build.sh &&         /tmp/build.sh &&         rm -rf /tmp/* /var/* &&         ostree container commit": error while running runtime: exit status 1
time="2023-08-09T17:41:19Z" level=error msg="exit status 1"
Error: Error: buildah exited with code 1

@xynydev
Copy link
Member Author

xynydev commented Aug 9, 2023

(the problem was not wallpapers, it was this line, which now is obviously wrong after i read it and not just trust AI blindly)
TYPE=$(yq r <(echo "$module") '.type')

@xynydev
Copy link
Member Author

xynydev commented Sep 9, 2023

I've done some testing here and in a VM and read through the docs. Everything looks good, but still can't remove vim due to depsolve issues. I'll just leave a mention of it in the docs and go on with my life.

I'll drop a PR for the website repo soon, and then we can merge at the same time.

@xynydev xynydev marked this pull request as ready for review September 9, 2023 11:29
@tulilirockz
Copy link

Hello Xyny! Remember when the bling repo was made to dedupe some aspects in Startingpoint? Well, this PR makes it so every repo that uses the new Startingpoint project needs to have all it's modules inside of it. Maybe we could move them to the bling repo and clone them to the project. That would make it so no one needs to have the standard modules in their repos, and would also enable people to make repos just for their custom modules, e.g. someone could make a "ublue-unofficial-extensions" repo or something like that!

Summarizing: Instead of having COPY modules /tmp/modules/ we could have COPY --from=ghcr.io/ublue-os/bling:latest /startingpoint-std-modules(something like that) /tmp/modules

@xynydev
Copy link
Member Author

xynydev commented Sep 10, 2023

@tulilirockz I love that idea. I'll drop a bling PR, and make some modifications to the website PR to pull in the docs. I sent some more cluttered thoughts over on discord, but I think this is overall beneficial. The size of startingpoint would actually shrink.

xynydev added a commit to blue-build/modules that referenced this pull request Sep 10, 2023
xynydev added a commit to blue-build/modules that referenced this pull request Sep 10, 2023
* feat: add startingpoint modules
some modules authored by @gerblesh
original source: blue-build/legacy-template#135

* docs: better readme for modules dir

* docs: yafti deps

* docs: sp more information

* feat: startingpoint modules in container

* docs: sentence structure, check sidebar
@tulilirockz
Copy link

I wonder what this error's about. I'll probably remove wallpapers for now.

ublue-os-wallpapers-0.1-1.fc38.noarch (@commandline)
Installing: ublue-os-wallpapers-0.1-1.fc38.noarch (local)
ln: failed to create symbolic link '/usr/share/wallpapers/ublue-os': No such file or directory
Building startingpoint from Fedora 38 (ghcr.io/ublue-os/silverblue-main).
Error: 1:1: invalid input text "r"
error building at STEP "RUN rpm-ostree install /tmp/ublue-os-wallpapers-0.1-1.fc38.noarch.rpm &&         chmod +x /tmp/build.sh &&         /tmp/build.sh &&         rm -rf /tmp/* /var/* &&         ostree container commit": error while running runtime: exit status 1
time="2023-08-09T17:41:19Z" level=error msg="exit status 1"
Error: Error: buildah exited with code 1

Also, this most likely is fixed now :) I just made it sure the /usr/share/wallpapers/ublue-os folder and it's parents get created in the rpm post-installation stage, check it out!

@KyleGospo KyleGospo merged commit 0b0b60b into template Sep 10, 2023
2 checks passed
@KyleGospo KyleGospo deleted the modular-rewrite branch September 10, 2023 23:52
qoijjj referenced this pull request in secureblue/secureblue Nov 27, 2023
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.

None yet

4 participants