Skip to content

Commit 9b2a995

Browse files
pb8ozulinx86
authored andcommitted
ci(artifacts): save a manifest of the rootfs
Also save a copy of the kernel config. Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
1 parent b0544b7 commit 9b2a995

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

resources/chroot.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,6 @@ cat >> /etc/sysctl.conf <<EOF
7272
# This avoids a SPECTRE vuln
7373
kernel.unprivileged_bpf_disabled=1
7474
EOF
75+
76+
# Build a manifest
77+
dpkg-query --show >/root/manifest

resources/rebuild.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ EOF
8585

8686
# -comp zstd but guest kernel does not support
8787
rootfs_img="$OUTPUT_DIR/$ROOTFS_NAME.squashfs"
88+
sudo mv $rootfs/root/manifest $OUTPUT_DIR/$ROOTFS_NAME.manifest
8889
sudo mksquashfs $rootfs $rootfs_img -all-root -noappend
8990
rootfs_ext4=$OUTPUT_DIR/$ROOTFS_NAME.ext4
9091
dir2ext4img $rootfs $rootfs_ext4
@@ -152,7 +153,9 @@ function build_linux {
152153
make -j $(nproc) $target
153154
LATEST_VERSION=$(cat include/config/kernel.release)
154155
flavour=$(basename $KERNEL_CFG .config |grep -Po "\d+\.\d+\K(-.*)" || true)
155-
cp -v $binary_path $OUTPUT_DIR/vmlinux-$LATEST_VERSION$flavour
156+
OUTPUT_FILE=$OUTPUT_DIR/vmlinux-$LATEST_VERSION$flavour
157+
cp -v $binary_path $OUTPUT_FILE
158+
cp -v .config $OUTPUT_FILE.config
156159
popd &>/dev/null
157160
}
158161

0 commit comments

Comments
 (0)