Commit graph

17 commits

Author SHA1 Message Date
b7e49bc1c6
awk: don't print the newline. Removes the need for a tr
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:23 -04:00
0d103e778f
BuildSourceImage: readying for the koji use case
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>
2019-09-10 09:08:21 -04:00
56fd7c4de9
*: big rewrite
_(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>
2019-09-10 09:08:19 -04:00
f5db5f704f
Dockerfile and export image if OUTPUT_DIR
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:12 -04:00
Daniel J Walsh
22a20a5e28
Merge pull request #9 from vbatts/errout
exit on errors
2019-08-15 06:36:41 -04:00
Daniel J Walsh
f2ce78a17b
Merge pull request #8 from vbatts/srpm
clearer variable name than "i"
2019-08-15 06:21:54 -04:00
26f5cce2a0
exit on errors
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-08-14 10:12:35 -04:00
311730a347
clearer variable name than "i"
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-08-14 08:10:49 -04:00
Daniel J Walsh
f1e87285dc
Merge pull request #7 from nalind/timestamps
Correct quoting, histories
2019-08-01 06:42:50 -04:00
Nalin Dahyabhai
cff4c01971 Correct quoting, histories
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>
2019-07-31 19:25:46 -04:00
Daniel J Walsh
8e1048f23f
Merge pull request #5 from rhatdan/source
Do not compress source code images
2019-07-22 07:23:54 -04:00
Daniel J Walsh
785ad324cb
Do not compress source code images
Source code rpms are already compressed, so no reason
to compress for a seecond time.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-22 06:38:23 -04:00
Daniel J Walsh
750a82bddc
Merge pull request #1 from rhatdan/source
Update to match upstream.
2019-07-16 09:51:06 -04:00
Daniel J Walsh
740a3b60fa
Fixes to make the images sharable
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>
2019-07-16 09:50:48 -04:00
Jindrich Novy
239362b8d0 Filter out all gpg-pubkey entries from rpmdb as these are not RPMs. 2019-07-15 10:53:50 +02:00
Daniel J Walsh
67d628b22a
Initial Version
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-12 14:47:11 -04:00
Daniel J Walsh
e97ca7be11
Initial commit 2019-07-12 14:36:52 -04:00