Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
f058b9155b | |||
7c3d1343e8 | |||
80b14b7f1f | |||
29a1e98c0e | |||
8bcb311bbd |
@@ -332,7 +332,7 @@ usage() {
|
||||
echo ' -i <name> Init system to use'
|
||||
echo " [default: ${INITSYS}]"
|
||||
echo ' -g <key> The gpg key for img signing'
|
||||
echo " [default: ${GPG_KEY}]"
|
||||
echo " [default: none]"
|
||||
echo ' -m Set SquashFS image mode to persistence'
|
||||
echo ' -c Disable clean work dir'
|
||||
echo ' -x Build chroot only'
|
||||
|
@@ -13,3 +13,8 @@
|
||||
|
||||
# gpg key; leave empty or commented to skip img signing
|
||||
# GPG_KEY=""
|
||||
|
||||
# mksquashfs compression
|
||||
# default: zstd <compression-level> should be 1 .. 22 (default 15)
|
||||
# optional xz args: COMPRESSION_ARGS=(-comp xz -Xbcj x86)
|
||||
#COMPRESSION_ARGS=(-comp zstd -Xcompression-level 22)
|
||||
|
@@ -5,13 +5,17 @@
|
||||
make_checksum(){
|
||||
local file="$1"
|
||||
msg2 "Creating md5sum ..."
|
||||
cd "${iso_root}${live_dir}"
|
||||
md5sum "$file" > "$file".md5
|
||||
cd "${OLDPWD}"
|
||||
}
|
||||
|
||||
make_sig () {
|
||||
local file="$1"
|
||||
msg2 "Creating signature file..."
|
||||
chown "${owner}:$(id --group "${owner}")" "${iso_root}${live_dir}"
|
||||
su "${owner}" -c "gpg --detach-sign --output $file.sig --default-key ${GPG_KEY} $file"
|
||||
chown "root:root" "${iso_root}${live_dir}"
|
||||
}
|
||||
|
||||
export_gpg_publickey() {
|
||||
|
@@ -67,16 +67,14 @@ make_sfs() {
|
||||
|
||||
mksfs_args+=("${sfs_out}")
|
||||
|
||||
mksfs_args+=(-comp zstd -noappend)
|
||||
mksfs_args+=("${COMPRESSION_ARGS[@]}" -noappend)
|
||||
|
||||
mksquashfs "${mksfs_args[@]}"
|
||||
|
||||
if ! ${use_dracut}; then
|
||||
make_checksum "${iso_root}${live_dir}/${img_name}"
|
||||
make_checksum "${img_name}"
|
||||
if [[ -n ${GPG_KEY} ]];then
|
||||
chown "${owner}:$(id --group "${owner}")" "${iso_root}${live_dir}"
|
||||
make_sig "${iso_root}${live_dir}/${img_name}"
|
||||
chown "root:root" "${iso_root}${live_dir}"
|
||||
fi
|
||||
fi
|
||||
if ${persist}; then
|
||||
|
@@ -19,6 +19,10 @@ load_iso_config(){
|
||||
|
||||
GPG_KEY=${GPG_KEY:-''}
|
||||
|
||||
if [[ -z "${COMPRESSION_ARGS[*]}" ]]; then
|
||||
COMPRESSION_ARGS=(-comp zstd -Xcompression-level 22)
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user