From d315b65d179dc3859996272c9e4a334f97421eec Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 7 Dec 2019 18:58:44 +0100 Subject: [PATCH] Brought xorriso-dd-target into GNU xorriso --- xorriso/README_gnu_xorriso | 17 +++++++++++++++++ xorriso/configure_ac.txt | 16 ++++++++++++++++ xorriso/make_xorriso_standalone.sh | 8 ++++++++ xorriso/xorriso_makefile_am.txt | 23 +++++++++++++++++++---- 4 files changed, 60 insertions(+), 4 deletions(-) diff --git a/xorriso/README_gnu_xorriso b/xorriso/README_gnu_xorriso index 2697c86f..11f9cce6 100644 --- a/xorriso/README_gnu_xorriso +++ b/xorriso/README_gnu_xorriso @@ -263,6 +263,23 @@ Prefix "mmc:" causes a path to be accepted only if it is a real optical drive which is accessible by generic SCSI/MMC commands. + xorriso-dd-target + +GNU xorriso comes with a script named + xorriso-dd-target/xorriso-dd-target +which uses the util-linux program lsblk to find suitable hard-disk-like +target devices for copying hard-disk bootable ISO images onto them. Such images +are offered by GNU/Linux distributions for installing their system. + +xorriso-dd-target gets installed only if ./configure detects to run on a +GNU/Linux system. It refuses to start on non-Linux kernels or if program lsblk +is not found in /usr/sbin, /sbin, /usr/bin, /bin. + +For introduction, examples, and details see in the build directory + man xorriso-dd-target/xorriso-dd-target.1 + info xorriso-dd-target/xorriso-dd-target.info + + Testing For automated and manual tests of xorriso's functionality see file diff --git a/xorriso/configure_ac.txt b/xorriso/configure_ac.txt index 2aa0ff8f..c941899c 100644 --- a/xorriso/configure_ac.txt +++ b/xorriso/configure_ac.txt @@ -133,6 +133,22 @@ then AC_DEFINE([Libburn_os_has_statvfS], []) fi +dnl xorriso-dd-target is addicted to the Linux kernel and util-linux lsblk +if uname -s | grep '^Linux' >/dev/null +then + XORRISO_DD_TARGET=xorriso-dd-target/xorriso-dd-target + XORRISO_DD_TARGET_MAN=xorriso-dd-target/xorriso-dd-target.1 + XORRISO_DD_TARGET_TEXI=xorriso-dd-target/xorriso-dd-target.texi + echo "enabled installation of xorriso-dd-target/xorriso-dd-target" +else + XORRISO_DD_TARGET= + XORRISO_DD_TARGET_MAN= + XORRISO_DD_TARGET_TEXI= + echo "disabled installation of xorriso-dd-target/xorriso-dd-target" +fi +AC_SUBST(XORRISO_DD_TARGET) +AC_SUBST(XORRISO_DD_TARGET_MAN) +AC_SUBST(XORRISO_DD_TARGET_TEXI) dnl Add compiler-specific flags diff --git a/xorriso/make_xorriso_standalone.sh b/xorriso/make_xorriso_standalone.sh index 7bd42630..86359774 100755 --- a/xorriso/make_xorriso_standalone.sh +++ b/xorriso/make_xorriso_standalone.sh @@ -258,6 +258,14 @@ copy_files \ frontend/grub-mkrescue-sed.sh \ "$lone_dir"/frontend +create_dir "$lone_dir"/xorriso-dd-target +copy_files \ + xorriso-dd-target/xorriso-dd-target \ + xorriso-dd-target/xorriso-dd-target.texi \ + xorriso-dd-target/xorriso-dd-target.info \ + xorriso-dd-target/xorriso-dd-target.1 \ + "$lone_dir"/xorriso-dd-target + # releng diff --git a/xorriso/xorriso_makefile_am.txt b/xorriso/xorriso_makefile_am.txt index b3d753cf..119809a7 100644 --- a/xorriso/xorriso_makefile_am.txt +++ b/xorriso/xorriso_makefile_am.txt @@ -255,9 +255,12 @@ xorriso_make_xorriso_1_LDADD = xorriso_make_xorriso_1_SOURCES = xorriso/make_xorriso_1.c -# A Proof-of-concept for frontends +# A Proof-of-concept for frontends, and xorriso-dd-target if on Linux kernel bin_SCRIPTS = \ - frontend/xorriso-tcltk + frontend/xorriso-tcltk \ + $(XORRISO_DD_TARGET) + +EXTRA_SCRIPTS = xorriso-dd-target/xorriso-dd-target # Install symbolic links to the xorriso binary @@ -315,13 +318,24 @@ man_MANS = \ xorriso/xorriso.1 \ xorriso/xorrisofs.1 \ xorriso/xorrecord.1 \ - xorriso/xorriso-tcltk.1 + xorriso/xorriso-tcltk.1 \ + $(XORRISO_DD_TARGET_MAN) + +EXTRA_MANS = xorriso-dd-target/xorriso-dd-target.1 info_TEXINFOS = \ xorriso/xorriso.texi \ xorriso/xorrisofs.texi \ xorriso/xorrecord.texi \ - xorriso/xorriso-tcltk.texi + xorriso/xorriso-tcltk.texi \ + xorriso-dd-target/xorriso-dd-target.texi + +# xorriso-dd-target.texi is hardcoded for now because of +# Makefile.am: error: texinfo file '@XORRISO_DD_TARGET_TEXI@' has +# unrecognized extension +# $(XORRISO_DD_TARGET_TEXI) +# +# EXTRA_TEXINFOS = xorriso-dd-target/xorriso-dd-target.texi EXTRA_DIST = \ xorriso.pc.in \ @@ -346,6 +360,7 @@ EXTRA_DIST = \ frontend/sh_on_named_pipes.sh \ frontend/xorriso_broker.sh \ frontend/grub-mkrescue-sed.sh \ + xorriso-dd-target/xorriso-dd-target \ libisofs/aaip-os-dummy.c \ libisofs/aaip-os-linux.c \ libisofs/aaip-os-freebsd.c \