Compare commits

..

5 Commits
0.25 ... 0.25.1

Author SHA1 Message Date
f058b9155b iso.conf: better explaining comments 2021-07-11 10:31:06 +02:00
7c3d1343e8 buildiso: fix checksum file 2021-07-11 09:24:06 +02:00
80b14b7f1f buildiso: make suqsh compression configurable 2021-07-11 00:08:03 +02:00
29a1e98c0e buildiso: add -l arg 2021-07-10 22:23:23 +02:00
8bcb311bbd buildiso: make compression level configurable 2021-07-10 22:14:39 +02:00
5 changed files with 16 additions and 5 deletions

View File

@@ -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'

View File

@@ -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)

View File

@@ -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() {

View File

@@ -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

View File

@@ -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
}