mkarchiso: prevent interference from xorriso startup files

Options set in xorriso startup files (~/.xorrisorc) could interfere with the xorriso command run by mkarchiso.
For example, if ~root/.xorrisorc contains -dummy on, then the ISO file will be empty.

Pass -no_rc as the first option to xorriso to prevent interference and unintended behavior.

Fixes #153.
This commit is contained in:
nl6720 2021-12-01 18:08:26 +02:00
parent 1d1f9a0fc8
commit bf79d7be9e
No known key found for this signature in database
GPG Key ID: 5CE88535E188D369
2 changed files with 7 additions and 1 deletions

View File

@ -18,6 +18,7 @@ Fixed
-----
- Sign the root file system image only once.
- Make sure xorriso does not read its configuration files to prevent interference and unintended behavior.
Removed
-------

View File

@ -1501,11 +1501,16 @@ _build_iso_image() {
[[ -d "${out_dir}" ]] || install -d -- "${out_dir}"
# Do not read xorriso startup files to prevent interference and unintended behavior.
# For it to work, -no_rc must be the first argument passed to xorriso.
xorriso_options=('-no_rc')
if [[ "${quiet}" == "y" ]]; then
# The when xorriso is run in mkisofs compatibility mode (xorrisofs), the mkisofs option -quiet is interpreted
# too late (e.g. messages about SOURCE_DATE_EPOCH still get shown).
# Instead use native xorriso option to silence the output.
xorriso_options=('-report_about' 'SORRY' "${xorriso_options[@]}")
xorriso_options+=('-report_about' 'SORRY')
fi
# Add required xorrisofs options for each boot mode