serpent-os / boulder-d-legacy

Replaced by Rust tooling
https://serpentos.com
21 stars 7 forks source link

Improve `paths:` key capability by allowing both path and type of files #1

Open ermo opened 2 years ago

ermo commented 2 years ago

In order to better support using glob matches to pattern out paths to (sub)packages, support something like the following YAML snippet:

packages:
    - "%(name)-foo":
        paths:
            - /usr/lib/*.so : symlink
            - /usr/share/%(name)/foo/ : any
            - /usr/share/%(name)/bar/ # ': any' is the default and can be omitted

To facilitate development, add suitable debug { trace(...); } statements such that addition of paths to rules and the .match-ing of said rules against build artefacts can be easily introspected.

ermo commented 2 years ago

Minimally working WiP lives in the boulder add-path-types branch.

Currently, it deliberately and completely ignores the path types. This is obviously set to change.

The current boulder WiP has a hard dependency on the moss-format add-path-types branch, so please ensure both are checked out when compiling.

NB: Currently, boulder build only works when using unconfined builds, so please remember to add the -u flag to your boulder build invocation. Boulder also needs to be configured to use a /usr prefix and then be installed to the system.

I use the following aliases to help me work around these (somewhat onerous) requirements:

# meson aliases -- useful for testing unconfined boulder builds
alias meson-chown="sudo chown -Rc ${USER}:${USER} *"
alias meson-clean="meson-chown ; meson compile --clean -C build/"
alias meson-compile="meson compile -C build/"
alias meson-configure-usr="meson configure --prefix=/usr build/"
alias meson-install="sudo ninja install -C build/"
alias meson-uninstall="sudo ninja uninstall -C build/"
alias meson-build-clean="meson-clean && meson-configure-usr && time meson-compile && meson-install"
ermo commented 2 years ago

In reality, this is only half done, so re-opening. :smile:

The only way to get confined builds working is to re-build the protosnek boulder stone and go from there. Which ... ugh. :persevere:

For now, the majority of the points above still apply, except the branch is now the main branch.