boulder-d-legacy icon indicating copy to clipboard operation
boulder-d-legacy copied to clipboard

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

Open ermo opened this issue 2 years ago • 2 comments

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 avatar Aug 14 '22 22:08 ermo

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 avatar Aug 15 '22 10:08 ermo

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.

ermo avatar Aug 15 '22 15:08 ermo