Enable a simple CI via Travis which currently install skopeo and
shellcheck and runs `make validate`.
Fixes: #13
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
for koji, there will be no fetching of the image, nor fetching of RPMS
using `dnf download --source ...`. They'll just provide a directory of
SRPMS used (perhaps as a composite of architectures). And just add these
in similar fashion as when fetching.
This used with the flag to specify which drivers to run will allow
tailoring to just that use-case.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
_(this is a WIP)_
for the requirements to not be so bound to RPM only, breaking collection
of sources out into "plugins". Currently not much more sophisticated
than just iterating through bash functions that expect 3 argugments.
rootfs of the inspectee; output path for the sources collected; manifest
path.
The idea for the manifest is still loose, but how best to follow up the
plugin which collected source, to then have the rich metadata available
to attach to the individual "layers" that are produced for each source
component.
for the requirement of most contrained non-root container running this
script as non-root, we'll switch away from buildah for now. This ought
to just be skopeo copy, unpacking, inspecting, json, and skopeo copy. No
mounting, no namespacing, etc.
for the sake of writing unit tests (i.e. `bats`), break the script into
a way that it can be sourced and run the functions individually. Only
act like the whole script when run directly.
If `umoci` is available it will get used for some functions (like
unpacking), but it is not required and will be attempted with jq and
bash otherwise.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Before doing anything, ensure that we have at least two arguments.
Correct misuse of $() when ${} was intended, to reference environment
variables.
Use `buildah config --created-by` rather than `--add-history` to set the
CreatedBy field when committing new images, so that they only add one
history entry.
Set timestamps on .src.rpm files to their build date, rather than 0.
Commit new images using --omit-timestamp, to make their own timestamps
predictable.
Only name the final image.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Changing the time on all SRC RPMS to EPOCH So the images will always have
the same date on them. This prevents us from getting variance and allows the
blobs to be shared.
Also now commit each layer and start a new container based on the previous
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>