remove system archive feature
Just compress the initrd with zstd. Remove rsmount dependency, mtab is easy enough to parse.
This commit is contained in:
@ -26,16 +26,10 @@ copy etc/sshd_config etc/ssh/sshd_config
|
||||
|
||||
copy --from=rust /dist/bin/init /system/init
|
||||
|
||||
run mv dev /layer \
|
||||
&& chroot . ldd /init |sed -e 's,.*>\s,,' -e 's,^\s*,,' -e 's,\s.*,,' -e 's,^/,,' |sort |uniq >/required_libs \
|
||||
&& tar c init -T /required_libs | tar xv -C /layer |xargs rm -v \
|
||||
&& find |cpio -H newc -o |zstd -19 >/layer/system.azstd
|
||||
|
||||
workdir /layer
|
||||
run mkdir -p bin run var/log; cd bin && for cmd in init-version init-connect bootstrap; do ln -s ../init $cmd; done
|
||||
|
||||
# check viability
|
||||
run ldd bin/init-version; chroot . init-version
|
||||
run chroot . init-version
|
||||
|
||||
run find * |cpio -H newc -oF /initrd
|
||||
|
||||
|
Reference in New Issue
Block a user