Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Latest commit

 

History

History
48 lines (29 loc) · 2.26 KB

README.md

File metadata and controls

48 lines (29 loc) · 2.26 KB

Packages mocaccino-portage-tree

Mocaccino OS Luet Tree for Gentoo Portage

Development notes

Generate provides for a package:

First be sure to have yq, jq and pkgs-checker installed ( luet install repository/mocaccino-extra-stable and luet install -y utils/yq utils/jq dev-util/pkgs-checker-minimal )

$ DOCKER_HOST=ssh://10.16.0.51 PACK=layers/X make gen-provides

Inspect docker images from packages

To retrieve the docker images hashes of the packages, you can run:

$ luet tree images --image-repository quay.io/mocaccinocache/portage-amd64-cache --tree amd64 --tree multi-arch layers/system-x

layer/gentoo-stage3-0.20201125: quay.io/mocaccinocache/portage-amd64-cache:e1eb7be13068a1fb7956b4b68d20e74f9033956b453a2fbc7436e0dab28e50c2
layer/gentoo-portage-0.20201111: quay.io/mocaccinocache/portage-amd64-cache:46d476051855c7e1129e1a99cf8b0a283e1804ff5f5e28eac394731c2cf0c547
development/mocaccino-overlay-x-0.20201125+5: quay.io/mocaccinocache/portage-amd64-cache:34e8cc87db92843bce1027f65d35562831fc535a64705975d4a0231db34b3176
layers/system-x-0.20201125+5: quay.io/mocaccinocache/portage-amd64-cache:14ecb8f06592144484d3a103002894c36c115dd372953399d7afa0ecb05a1f82

To run a container for debugging, then you can :

DOCKER_HOST=ssh://10.16.0.51 docker run --rm -ti quay.io/mocaccinocache/portage-amd64-cache:14ecb8f06592144484d3a103002894c36c115dd372953399d7afa0ecb05a1f82

Retrieve the list of files owned by a package

$> yq r /var/cache/luet/repos/mocaccino-portage/metafs/repository.meta.yaml 'index' -j | jq '.[] | select(.compilationspec.package.name=="system-core" and .compilationspec.package.category=="layers") | .files[]' -r

Best practices for layers packages

To trace correctly what are the packages created inside a layer, it's a good practice is to add inside the layer data the list of the installed packages:

  • /usr/share/mocaccino/layer/<layer-name>.prelude.pkglist: This file contains the list of the packages list before the build.

  • /usr/share/mocaccino/layer/<layer-name>.pkglist: This file contains the list of the packages list after the build.