Optionally add back privileged extraction which can be enabled with
LUET_PRIVILEGED_EXTRACT=true
Signed-off-by: Ettore Di Giacinto <mudler@sabayon.org>
* Reduce possibility of circular dependency
Just by adding an import for bus to anything in the helper dir, we would
run into a circular dependency due to how things are structured. That
means that we cannot set any events for unpacking or docker helper
pulling an image.
This commit tries to work around this by doing several things.
- Remove full imports of the helper module by segmentating some modules
into their own submodule, like docker or match so just using a small match
function doesnt bring the whole module
- Removing a simple function to check if a dir exists from importing
the full helper module and instead write the function (5 lines)
- Using logrus in the bus module instead of logger, which avoids a
circular dependency
Signed-off-by: Itxaka <igarcia@suse.com>
* Add two new events for unpacking an image
Both pre and post unpacking an image
Signed-off-by: Itxaka <igarcia@suse.com>
- Fixup search path on metadata spec load. Previously we were reading
the package being passed, and not the one resolved (it failed against
selectors)
- Do inherit first pushrepositories, so they take precedence over pull
- Add test cases to cover build values interpolation by remote
repositories
- Enhance test cases to check image cache repository inheritance when
--from-repositories is passed
- Fix race condition when inheriting buildspec options: Instead of consuming the compiler one, annotate the updates in the
package BuildOption spec which is passed by
- Update vendor
Contact the notary server if ```--verify``` is specified (or `verify:
true` is enabled on the repo config) and verify if the image is signed,
use the returned value to pull the verified image.
Create a util sub cmd to add all utils that are handy for development
and already present in the luet codebase. We expose in this case `luet
util unpack` to unpack a docker image without a docker daemon running.
Several changes are included:
- Expose ensureDir in helpers, and call it in the Docker client. In
other implementations that was handled by CopyFile behind the scenes,
but that's not the case here
- Create accessor in Artifact to create Artifact objects from files.
This is handy when we have to carry over downloaded package content
into caches when artifacts are already verified
- Fix various issues around the imagePush flag, so now trees are pushed
forcefully each time
- Take into consideration the real artifact name when pushing single
files in the docker image. This behavior should be changed eventually,
because single files which aren't repository packages now are in its
own docker image, but we should have just one that brings the required
metadata alltogether.