mirror of
https://github.com/rocky-linux/sig-cloud-instance-images.git
synced 2024-06-01 06:00:15 +00:00
add targetimage metafile parsing
This commit is contained in:
parent
f8069d92c1
commit
fb61cd5579
7
Makefile
7
Makefile
|
@ -52,9 +52,14 @@ $(TARGETIMAGE_META): $(BASEIMAGE_META)
|
|||
--parameter repository $(CONTAINER_NAME) \
|
||||
docker | tee -a logs/target_image-$(OUTNAME).out | tail -n4 > $(TARGETIMAGE_META) || exit 3
|
||||
|
||||
$(OUTNAME).tar.xz: $(TARGETIMAGE_META)
|
||||
$(OUTNAME).tar.xz: $(TARGETIMAGE_META) $(OUT)/packages.txt
|
||||
mkdir out
|
||||
tar -Oxf $(STORAGEDIR)/$(TARGETIMAGEUUID).body */layer.tar | xz > out/$(OUTNAME).tar.xz
|
||||
tar -tf out/$(OUTNAME).tar.xz > out/filelist.txt
|
||||
cp $(STORAGEDIR)/$(TARGETIMAGEUUID).meta out/
|
||||
|
||||
$(OUT)/packages.txt:
|
||||
xmllint --xpath "//packages/*/@name" <(printf "$(jq '.icicle' < $(STORAGEDIR)/$(TARGETIMAGEUUID).meta)\n" | tail -c +2 | head -c -2) | \
|
||||
tr ' ' '\n' | \
|
||||
awk -F\= '{print substr($2,2,length($2)-2)}' | \
|
||||
sort > $(OUT)/packages.txt
|
||||
|
|
Loading…
Reference in New Issue
Block a user