[LTP] [PATCH v1] isofs.sh:Use genisoimage/xorrisofs instead of mkisofs

Petr Vorel pvorel@suse.cz
Tue Jan 16 17:28:22 CET 2024


Hi Subramanya,

> Debain uses genisoimage/xorrisofs and Centos uses xorrisofs
> both genisoimage & xorrisofs have symlinks to mkisofs
> xorrisofs doesn't support -hfs option & supports only -hfsplus option
> genisoimage supports both -hfs & -hfsplus options

Well, there are 3 tools (although not all in all distros):

* Debian
for i in mkisofs genisoimage xorriso; do echo "=== $i ==="; $i; echo; done
=== mkisofs ===
genisoimage: Missing pathspec.
Usage: genisoimage [options] -o file directory ...

Use genisoimage -help
to get a list of valid options.

Report problems to debburn-devel@lists.alioth.debian.org.

=== genisoimage ===
genisoimage: Missing pathspec.
Usage: genisoimage [options] -o file directory ...

Use genisoimage -help
to get a list of valid options.

Report problems to debburn-devel@lists.alioth.debian.org.

=== xorriso ===
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.

usage : xorriso [commands]
        More is told by command -help
=> Debian has genisoimage and xorriso

* openSUSE Tumbleweed

$ for i in mkisofs genisoimage xorriso; do echo "=== $i ==="; $i; echo; done
=== mkisofs ===
mkisofs: Missing pathspec.
Usage: mkisofs [options] [-find] file... [find expression]

Use mkisofs -help
to get a list all of valid options.

Use mkisofs -find -help
to get a list of all valid -find options.

Most important Options:
	-posix-H		Follow sylinks encountered on command line
	-posix-L		Follow all symlinks
	-posix-P		Do not follow symlinks (default)
	-o FILE, -output FILE	Set output file name
	-R, -rock		Generate Rock Ridge directory information
	-r, -rational-rock	Generate rationalized Rock Ridge directory info
	-J, -joliet		Generate Joliet directory information
	-print-size		Print estimated filesystem size and exit
	-UDF			Generate UDF file system
	-dvd-audio		Generate DVD-Audio compliant UDF file system
	-dvd-video		Generate DVD-Video compliant UDF file system
	-dvd-hybrid		Generate a hybrid (DVD-Audio/DVD-Video) compliant UDF file system
	-iso-level LEVEL	Set ISO9660 level (1..3) or 4 for ISO9660 v 2
	-V ID, -volid ID	Set Volume ID
	-graft-points		Allow to use graft points for filenames
	-M FILE, -prev-session FILE	Set path to previous session to merge

=== genisoimage ===
 genisoimage: command not found

=== xorriso ===
xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project.

usage : xorriso [commands]
        More is told by command -help

=> openSUSE Tumbleweed has mkisofs and xorriso (genisoimage is not officially
supported)

How about to run test 3x - for mkisofs, genisoimage and xorriso. There would be
TCONF when file does not exist. And also detection if the binary is the expected
one? Something like this:

TST_TESTFUNC=do_test
TST_CNT=3

do_test()
{
	case $1 in
	1) MKISOFS_CMD="mkisofs";;
	2) MKISOFS_CMD="genisoimage"
	   HFSOPT="-hfsplus -D -hfs -D";;
	3) MKISOFS_CMD="xorriso"
	   HFSOPT="-hfsplus -D";;
	esac

	if ! tst_cmd_available $MKISOFS_CMD; then
		tst_res TCONF "Missing '$MKISOFS_CMD'"
		return
	fi

	if ! $CMD 2>&1 | grep -q "$MKISOFS_CMD"; then
		tst_res TCONF "'$MKISOFS_CMD' is a symlink to another tool"
		return
	fi

	... (rest of original do_test + $HFSOPT use)
}

Does it make sense to you?

Kind regards,
Petr


More information about the ltp mailing list