Compare commits
175 Commits
release-1.
...
master
Author | SHA1 | Date |
---|---|---|
Thomas Schmitt | 7e4a714c12 | |
Thomas Schmitt | 2c608c9d27 | |
Thomas Schmitt | 5e79dc32e5 | |
Thomas Schmitt | d7eba30171 | |
Thomas Schmitt | 2ee32947de | |
Thomas Schmitt | 4dc5edc565 | |
Thomas Schmitt | c8fab513c6 | |
Thomas Schmitt | 87e1d67417 | |
Thomas Schmitt | 4818eeaa5f | |
Thomas Schmitt | a26df9c49f | |
Thomas Schmitt | 2af1e90639 | |
Thomas Schmitt | ccb29eae32 | |
Thomas Schmitt | abf4375b63 | |
Thomas Schmitt | 3955462767 | |
Thomas Schmitt | 7f9d140d0d | |
Thomas Schmitt | fb23fe1446 | |
Thomas Schmitt | ffaa15ed53 | |
Thomas Schmitt | 4fe385baed | |
Thomas Schmitt | 14676ef132 | |
Thomas Schmitt | fcad0813dc | |
Thomas Schmitt | c74f175972 | |
Thomas Schmitt | 5de4a8dd45 | |
Thomas Schmitt | 2d8678a11b | |
Thomas Schmitt | 41a91dfe86 | |
Thomas Schmitt | fa7ba62660 | |
Thomas Schmitt | 8c61d88404 | |
Thomas Schmitt | 9377f667b5 | |
Thomas Schmitt | f1e00c3e4c | |
Thomas Schmitt | ce3f23b75d | |
Thomas Schmitt | c8788712fc | |
Thomas Schmitt | d635037661 | |
Thomas Schmitt | fb780b59cb | |
Thomas Schmitt | 2d3302db51 | |
Thomas Schmitt | 698bee2621 | |
Thomas Schmitt | ec7ab520ba | |
Thomas Schmitt | 458b0cb3de | |
Thomas Schmitt | 5e03c659e3 | |
Thomas Schmitt | 4c7cfe96d9 | |
Thomas Schmitt | cdffa4efee | |
Thomas Schmitt | 435521a2c9 | |
Thomas Schmitt | c64e48d588 | |
Thomas Schmitt | 662b305d12 | |
Thomas Schmitt | 82deb547c0 | |
Thomas Schmitt | d24634af3d | |
Thomas Schmitt | e6e93a9803 | |
Thomas Schmitt | b8b0f41320 | |
Thomas Schmitt | 949a4c3bd0 | |
Thomas Schmitt | 19e1ceec26 | |
Thomas Schmitt | 969ee9d6f5 | |
Thomas Schmitt | ba12014d46 | |
Thomas Schmitt | 86261b7972 | |
Thomas Schmitt | 73b3923f72 | |
Thomas Schmitt | a07addd083 | |
Thomas Schmitt | bae9516439 | |
Thomas Schmitt | d0682a17b9 | |
Thomas Schmitt | aebd2b92ca | |
Thomas Schmitt | fbeec724d7 | |
Thomas Schmitt | bdc9164787 | |
Thomas Schmitt | 9003e477e7 | |
Thomas Schmitt | 8d33881cd6 | |
Thomas Schmitt | dd92a6e0d7 | |
Thomas Schmitt | 646d15af46 | |
Thomas Schmitt | 423c14828c | |
Thomas Schmitt | e7326e0e6c | |
Thomas Schmitt | a86d1378ff | |
Thomas Schmitt | c1e563341d | |
Thomas Schmitt | 280c78a2a6 | |
Thomas Schmitt | 92c4d5b45a | |
Thomas Schmitt | aace531ca8 | |
Thomas Schmitt | 651f42955d | |
Thomas Schmitt | e383d3adbe | |
Thomas Schmitt | 2de0667393 | |
Thomas Schmitt | ab0bfdb04f | |
Thomas Schmitt | 0b7e4f934e | |
Thomas Schmitt | aaaa0a99c4 | |
Thomas Schmitt | f3af549e92 | |
Thomas Schmitt | 1a44cbda91 | |
Thomas Schmitt | 11c5f6585a | |
Thomas Schmitt | 9b17a8a24a | |
Thomas Schmitt | 1807f04f4d | |
Thomas Schmitt | a22f6b8391 | |
Thomas Schmitt | 5a869b17a9 | |
Thomas Schmitt | 919c82385b | |
Thomas Schmitt | 79997c2b31 | |
Thomas Schmitt | be8f86ded2 | |
Thomas Schmitt | ad1b9bfe03 | |
Thomas Schmitt | d0ff0a381a | |
Thomas Schmitt | fc03217d91 | |
Thomas Schmitt | 72ef04a9e1 | |
Thomas Schmitt | 1844014a64 | |
Thomas Schmitt | b837ff30fc | |
Thomas Schmitt | 6a921c7411 | |
Thomas Schmitt | 163129ca6a | |
Thomas Schmitt | 5600508ab0 | |
Thomas Schmitt | 1a1d31f36c | |
Thomas Schmitt | b4e10ced99 | |
Thomas Schmitt | 9a578a657f | |
Thomas Schmitt | c310e2abc1 | |
Thomas Schmitt | 3afa1d5191 | |
Thomas Schmitt | 1a39dc6903 | |
Thomas Schmitt | 36daf52a79 | |
Thomas Schmitt | 098d4f8ff5 | |
Thomas Schmitt | 4eb98d7911 | |
Thomas Schmitt | 017363ee34 | |
Thomas Schmitt | 008620e19c | |
Thomas Schmitt | a28040df18 | |
Thomas Schmitt | 1ff12c26d9 | |
Thomas Schmitt | 09de0f1743 | |
Thomas Schmitt | 0d3d9d7a92 | |
Thomas Schmitt | c62ae86d27 | |
Thomas Schmitt | 7d618ef060 | |
Thomas Schmitt | fd195504ae | |
Thomas Schmitt | 847afc0095 | |
Thomas Schmitt | 82dc9b6b42 | |
Thomas Schmitt | e594ba293a | |
Thomas Schmitt | d2fd48fcbc | |
Thomas Schmitt | 3318fa47a3 | |
Thomas Schmitt | 9e79f64cae | |
Thomas Schmitt | f205e4294a | |
Thomas Schmitt | 821628ae91 | |
Thomas Schmitt | bdc563a98b | |
Thomas Schmitt | 71f6ba15c3 | |
Thomas Schmitt | 62700a98e1 | |
Thomas Schmitt | 4ff9f8eedf | |
Thomas Schmitt | 0e8227e76a | |
Thomas Schmitt | 072c4e5ab9 | |
Thomas Schmitt | a94f22d92b | |
Thomas Schmitt | 0bc397c02c | |
Thomas Schmitt | 87aab73058 | |
Thomas Schmitt | 68c4a39c37 | |
Thomas Schmitt | 5897c706a4 | |
Thomas Schmitt | 34981b1278 | |
Thomas Schmitt | 65c63cc1cf | |
Thomas Schmitt | 9b4c082f84 | |
Thomas Schmitt | 3eef0411d5 | |
Thomas Schmitt | 5aac3dd80f | |
Thomas Schmitt | 865115f779 | |
Thomas Schmitt | 0c0d542591 | |
Thomas Schmitt | ddfe5098d8 | |
Thomas Schmitt | 0cb2e15190 | |
Thomas Schmitt | fc587966d3 | |
Thomas Schmitt | 0ef65a7837 | |
Thomas Schmitt | ac7cdfa251 | |
Thomas Schmitt | 7d79692c55 | |
Thomas Schmitt | e651cb5040 | |
Thomas Schmitt | 6b0bb9e630 | |
Thomas Schmitt | 0ba13965a7 | |
Thomas Schmitt | b2d9384ec9 | |
Thomas Schmitt | b5a33c3418 | |
Thomas Schmitt | 358262818e | |
Thomas Schmitt | 58e7eb0877 | |
Thomas Schmitt | 555048a0a1 | |
Thomas Schmitt | 8a11dc6224 | |
Thomas Schmitt | 562247b74f | |
Thomas Schmitt | d19150ad36 | |
Thomas Schmitt | b35c2e410f | |
Thomas Schmitt | 3f2b61932b | |
Thomas Schmitt | e489c877bd | |
Thomas Schmitt | e6f686761e | |
Thomas Schmitt | 7dc45e3311 | |
Thomas Schmitt | 5011a5f7b0 | |
Thomas Schmitt | 49d40a4560 | |
Thomas Schmitt | 60dfe77a32 | |
Thomas Schmitt | e9cbf38c01 | |
Thomas Schmitt | 23d0d8e90a | |
Thomas Schmitt | db5d4eb867 | |
Thomas Schmitt | a1f9d03df0 | |
Thomas Schmitt | e3df75772e | |
Thomas Schmitt | c9e7fe86df | |
Thomas Schmitt | a5146807ff | |
Thomas Schmitt | be21a6374b | |
Thomas Schmitt | aa1a008bb3 | |
Thomas Schmitt | 9fe4c4dbab | |
Thomas Schmitt | d16ab5b86a | |
Thomas Schmitt | f51499c592 |
85
ChangeLog
85
ChangeLog
|
@ -1,3 +1,88 @@
|
|||
git clone git@dev.lovelyhq.com:libburnia/libisoburn.git
|
||||
(to become libisoburn-1.5.8 or higher)
|
||||
===============================================================================
|
||||
* Bug fix: -boot_image and -append_partition were not perceived as image
|
||||
manipulation which makes production of an ISO image worthwhile.
|
||||
Thanks Cameron Seader.
|
||||
* Bug fix: -outdev holding an ISO filesystem could get attached wrong start LBA
|
||||
* Bug fix: Command -load "volid" did not work with constant search text
|
||||
* Bug fix: Command -truncate_overwritable on ISO image without MD5 caused
|
||||
double free of memory
|
||||
* Bug fix: -boot_image "any" "replay" failed after the legacy BIOS boot image
|
||||
file was replaced by -map. Thanks Brian C. Lane.
|
||||
* Bug fix: -boot_image system_area=/dev/zero preserved system area of
|
||||
loaded ISO
|
||||
* Bug fix: Size assessment of ISO images smaller than 32 KiB yielded
|
||||
random values
|
||||
* New -append_partition pseudo partition_number "all" and
|
||||
pseudo type_code "revoke"
|
||||
* New bit1 with API call Xorriso_change_is_pending() issues a note if
|
||||
return is 0 and indev and outdev point to different drives
|
||||
* New API calls isoburn_toc_disc_get_sectors_v2,
|
||||
isoburn_toc_session_get_sectors_v2, isoburn_toc_track_get_emul_v2
|
||||
* New API calls isoburn_read_iso_head_v2(), isoburn_get_mount_params_v2()
|
||||
* New API calls isoburn_igopt_get_effective_lba_v2(),
|
||||
isoburn_igopt_get_data_start_v2()
|
||||
* New API call isoburn_get_attached_start_lba_v2()
|
||||
* New API calls isoburn_attach_start_lba_v2(), isoburn_disc_get_msc1_v2(),
|
||||
isoburn_disc_track_lba_nwa_v2()
|
||||
* New API call isoburn_prepare_blind_grow_v2()
|
||||
* New -as mkisofs options -cut_out and -hide_iso_path
|
||||
* Improved handling of hidden boot images in -boot_image cmd/as_mkisofs/replay
|
||||
* The maximum number of appended GPT partitions was increased from 4 to 8
|
||||
|
||||
GNU xorriso-1.5.6.pl02.tar.gz Wed Jun 14 2023
|
||||
===============================================================================
|
||||
* Bug fix: On non-GNU/Linux systems ssize_t was not defined in libisofs file
|
||||
rockridge.h . Report and fix proposal by Rui Chen.
|
||||
|
||||
GNU xorriso-1.5.6.pl01.tar.gz Mon Jun 12 2023
|
||||
===============================================================================
|
||||
(A failed attempt to create a tarball with a fixed libisofs/rockridge.h)
|
||||
|
||||
libisoburn-1.5.6.tar.gz Wed Jun 07 2023
|
||||
===============================================================================
|
||||
* Bug fix: False -status failure with -boot_image --interval:appended_partition
|
||||
* Bug fix: -no_rc prevented pre-scanning of arguments for stdio output and
|
||||
others. Introduced by mistake in a62f6af5, 2011.10.18.162119.
|
||||
* Bug fix: -not_leaf and -not_paths were not applied to -extract and alike
|
||||
* Bug fix: -report_system_area cmd misperceived -part_like_isohybrid with
|
||||
-isohybrid-gpt-basdat
|
||||
* Bug fix: -report_system_area cmd misperceived combination of isohybrid and
|
||||
appended partition in GPT
|
||||
* Bug fix: -as mkisofs option -part_like_isohybrid did not cause a MBR
|
||||
partition table if the partitions are data files in the ISO
|
||||
rather than appended
|
||||
* Bug fix: Split file directories (-split_size) were created with wrong
|
||||
permissions
|
||||
* Bug fix: libisofs did not mark clones of imported files as imported.
|
||||
This could cause that original and clone occupy data storage
|
||||
in the newly written session. Thanks to Ivan Shmakov.
|
||||
* Bug fix: Partition offset was preserved from -indev rather than from -outdev
|
||||
* Bug fix: libisofs could misrepresent Rock Ridge information if many
|
||||
symbolic links or AAIP data were recorded in a directory
|
||||
* Bug fix: Data files named /boot.catalog or ./boot.cat could be left out of
|
||||
the emerging ISO if the boot catalog was set to be hidden
|
||||
* Bug fix: -toc reported wrong track LBA with overwritable media with
|
||||
unrecognized content (pseudo-closed)
|
||||
* Bug fix: -find test -has_xattr matched "isofs." attributes
|
||||
in -xattr mode "any"
|
||||
* New API call isoburn_assess_written_features()
|
||||
* New API calls isoburn_igopt_set_max_ce_entries(),
|
||||
isoburn_igopt_get_max_ce_entries()
|
||||
* New flag bit12 with isoburn_read_iso_head():
|
||||
Read even if start of multi-session emulation is damaged
|
||||
* New -boot_image settings gpt_iso_bootable= and gpt_iso_not_ro=
|
||||
* New -as mkisofs options --gpt-iso-bootable and --gpt-iso-not-ro
|
||||
* New -as cdrecord option --obs_pad. Automatic no_emul_toc with -as cdrecord.
|
||||
* New parameters "obs_pad" and "bdr_obs_exempt" for -dvd_obs
|
||||
* New -as cdrecord option --bdr_obs_exempt
|
||||
* New command -assess_indev_features
|
||||
* New -find test -size
|
||||
* New -compliance rules max_ce_entries=, max_ce_drop=
|
||||
* Allowed lseekable device files with -cut_out.
|
||||
Proof-of-concept by Ivan Shmakov on bugs.debian.org. (Closes: #1010098)
|
||||
|
||||
libisoburn-1.5.4.tar.gz Sat Jan 30 2021
|
||||
===============================================================================
|
||||
* Bug fix: -report_system_area as_mkisofs misrepresented GPT with appended
|
||||
|
|
16
README
16
README
|
@ -4,9 +4,9 @@
|
|||
libisoburn and xorriso. By Vreixo Formoso <metalpain2002@yahoo.es>
|
||||
and Thomas Schmitt <scdbackup@gmx.net>
|
||||
Integrated sub project of libburnia-project.org.
|
||||
http://files.libburnia-project.org/releases/libisoburn-1.5.4.tar.gz
|
||||
http://files.libburnia-project.org/releases/libisoburn-1.5.6.tar.gz
|
||||
Copyright (C) 2006-2009 Vreixo Formoso,
|
||||
Copyright (C) 2006-2021 Thomas Schmitt.
|
||||
Copyright (C) 2006-2023 Thomas Schmitt.
|
||||
Provided under GPL version 2 or later.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
@ -36,17 +36,17 @@ By using this software you agree to the disclaimer at the end of this text:
|
|||
|
||||
Compilation, First Glimpse, Installation
|
||||
|
||||
Dynamic library and compile time header requirements for libisoburn-1.5.4 :
|
||||
- libburn.so.4 , version libburn-1.5.4 or higher
|
||||
- libisofs.so.6 , version libisofs-1.5.4 or higher
|
||||
Dynamic library and compile time header requirements for libisoburn-1.5.6 :
|
||||
- libburn.so.4 , version libburn-1.5.6 or higher
|
||||
- libisofs.so.6 , version libisofs-1.5.6 or higher
|
||||
libisoburn and xorriso will not start with libraries which are older than their
|
||||
include headers seen at compile time.
|
||||
|
||||
Obtain libisoburn-1.5.4.tar.gz, take it to a directory of your choice
|
||||
Obtain libisoburn-1.5.6.tar.gz, take it to a directory of your choice
|
||||
and do:
|
||||
|
||||
tar xzf libisoburn-1.5.4.tar.gz
|
||||
cd libisoburn-1.5.4
|
||||
tar xzf libisoburn-1.5.6.tar.gz
|
||||
cd libisoburn-1.5.6
|
||||
|
||||
Within that directory execute:
|
||||
|
||||
|
|
95
acinclude.m4
95
acinclude.m4
|
@ -27,6 +27,7 @@ AC_DEFUN([TARGET_SHIZZLE],
|
|||
|
||||
AC_MSG_CHECKING([target operating system])
|
||||
|
||||
libburn_check_libcam=
|
||||
LIBBURNIA_SUPP_ACL=none
|
||||
LIBBURNIA_SUPP_FATTR=none
|
||||
LIBBURNIA_LDCONFIG_CMD="echo 'No ldconfig run performed. If needed, configure manually for:'"
|
||||
|
@ -50,6 +51,7 @@ AC_DEFUN([TARGET_SHIZZLE],
|
|||
*-kfreebsd*-gnu*)
|
||||
ARCH=freebsd
|
||||
LIBBURN_ARCH_LIBS=-lcam
|
||||
libburn_check_libcam=yes
|
||||
;;
|
||||
*-solaris*)
|
||||
ARCH=solaris
|
||||
|
@ -61,8 +63,12 @@ AC_DEFUN([TARGET_SHIZZLE],
|
|||
# AC_ERROR([You are attempting to compile for an unsupported platform])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_RESULT([$ARCH])
|
||||
|
||||
if test x"$libburn_check_libcam" = xyes
|
||||
then
|
||||
LIBBURNIA_CHECK_LIBCAM
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
@ -352,6 +358,7 @@ dnl It tests whether the OS dependent libraries are available.
|
|||
dnl With libisoburn they are needed only for the case that indirect linking
|
||||
dnl does not work. So it is worth a try to omit them.
|
||||
dnl $1 = "mandatory" or "optional" define the action if test linking fails.
|
||||
dnl "silent" is like "optional" but without message.
|
||||
AC_DEFUN([LIBBURNIA_CHECK_ARCH_LIBS],
|
||||
[
|
||||
libburnia_save_LIBS="$LIBS"
|
||||
|
@ -372,11 +379,19 @@ AC_DEFUN([LIBBURNIA_CHECK_ARCH_LIBS],
|
|||
echo >&2
|
||||
(exit 1); exit 1;
|
||||
else
|
||||
echo "disabled linking with $LIBBURN_ARCH_LIBS (because not found)"
|
||||
if test x"$1" = xoptional
|
||||
then
|
||||
echo "disabled linking with $LIBBURN_ARCH_LIBS (because not found)"
|
||||
fi
|
||||
LIBBURN_ARCH_LIBS=""
|
||||
fi
|
||||
else
|
||||
echo "enabled linking with $LIBBURN_ARCH_LIBS"
|
||||
if test x"$1" = xsilent
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
echo "enabled linking with $LIBBURN_ARCH_LIBS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
@ -387,18 +402,72 @@ dnl
|
|||
AC_DEFUN([LIBBURNIA_CHECK_LINUX_SCSI],
|
||||
[
|
||||
dnl Check whether it is a Linux without scsi/scsi.h
|
||||
AH_TEMPLATE([Libburn_use_sg_dummY],
|
||||
[Define to compile without OS specific SCSI features])
|
||||
AC_MSG_CHECKING([for missing scsi/scsi.h on Linux])
|
||||
AC_TRY_COMPILE([
|
||||
libburn_scsi_disabled=
|
||||
if test x"$ARCH" = xlinux
|
||||
then
|
||||
AH_TEMPLATE([Libburn_use_sg_dummY],
|
||||
[Define to compile without OS specific SCSI features])
|
||||
AC_MSG_CHECKING([for missing scsi/scsi.h on Linux])
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef __linux
|
||||
#include <scsi/scsi.h>
|
||||
#endif
|
||||
],
|
||||
[;],
|
||||
[AC_MSG_RESULT([no])],
|
||||
[AC_DEFINE([Libburn_use_sg_dummY], [yes])
|
||||
AC_MSG_RESULT([yes])]
|
||||
)
|
||||
],
|
||||
[;],
|
||||
[AC_MSG_RESULT([no])],
|
||||
[AC_DEFINE([Libburn_use_sg_dummY], [yes])
|
||||
libburn_scsi_disabled=yes
|
||||
AC_MSG_RESULT([yes])]
|
||||
)
|
||||
fi
|
||||
if test x"$libburn_scsi_disabled" = xyes
|
||||
then
|
||||
echo "disabled operation of optical drives via SCSI"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl LIBBURNIA_CHECK_LIBCAM is by Thomas Schmitt, libburnia project
|
||||
dnl
|
||||
AC_DEFUN([LIBBURNIA_CHECK_LIBCAM],
|
||||
[
|
||||
dnl Check whether libcam is requested for FreeBSD kernel but missing
|
||||
libburn_scsi_disabled=
|
||||
if test x"$LIBBURN_ARCH_LIBS" = x"-lcam"
|
||||
then
|
||||
AH_TEMPLATE([Libburn_use_sg_dummY],
|
||||
[Define to compile without OS specific SCSI features])
|
||||
AC_MSG_CHECKING([for missing libcam for SCSI on FreeBSD kernel])
|
||||
dnl If libcam is not available, LIBBURN_ARCH_LIBS will be made empty
|
||||
LIBBURNIA_CHECK_ARCH_LIBS(silent)
|
||||
if test x"$LIBBURN_ARCH_LIBS" = x
|
||||
then
|
||||
AC_DEFINE([Libburn_use_sg_dummY], [yes])
|
||||
libburn_scsi_disabled=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
if test x"$LIBBURN_ARCH_LIBS" = x"-lcam"
|
||||
then
|
||||
AC_MSG_CHECKING([for missing libcam headers])
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdio.h>
|
||||
#include <camlib.h>
|
||||
#include <cam/scsi/scsi_message.h>
|
||||
#include <cam/scsi/scsi_pass.h>
|
||||
],
|
||||
[;],
|
||||
[AC_MSG_RESULT([no])],
|
||||
[AC_DEFINE([Libburn_use_sg_dummY], [yes])
|
||||
libburn_scsi_disabled=yes
|
||||
AC_MSG_RESULT([yes])]
|
||||
)
|
||||
fi
|
||||
if test x"$libburn_scsi_disabled" = xyes
|
||||
then
|
||||
echo "disabled operation of optical drives via SCSI"
|
||||
fi
|
||||
])
|
||||
|
||||
|
|
29
configure.ac
29
configure.ac
|
@ -1,6 +1,6 @@
|
|||
AC_INIT([libisoburn], [1.5.4], [http://libburnia-project.org])
|
||||
AC_INIT([libisoburn], [1.5.7], [http://libburnia-project.org])
|
||||
AC_PREREQ([2.50])
|
||||
dnl AC_CONFIG_HEADER([config.h])
|
||||
dnl AC_CONFIG_HEADER([config.h])
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
|
@ -11,7 +11,7 @@ AM_INIT_AUTOMAKE([subdir-objects])
|
|||
AC_CONFIG_MACRO_DIR([./])
|
||||
|
||||
dnl Hint: Search list for version code aspects:
|
||||
dnl /AC_INIT(
|
||||
dnl /AC_INIT
|
||||
dnl /ISOBURN_.*_VERSION
|
||||
dnl /LT_.*
|
||||
dnl /LIB.*_REQUIRED
|
||||
|
@ -24,7 +24,7 @@ dnl
|
|||
dnl These three are only copies to provide libtool with unused LT_RELEASE
|
||||
ISOBURN_MAJOR_VERSION=1
|
||||
ISOBURN_MINOR_VERSION=5
|
||||
ISOBURN_MICRO_VERSION=4
|
||||
ISOBURN_MICRO_VERSION=7
|
||||
|
||||
dnl ISOBURN_VERSION=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION.$ISOBURN_MICRO_VERSION
|
||||
|
||||
|
@ -37,16 +37,16 @@ dnl Libtool versioning
|
|||
dnl Generate libisoburn.so.1.x.y
|
||||
dnl SONAME will become LT_CURRENT - LT_AGE
|
||||
dnl
|
||||
dnl ts C10130
|
||||
dnl This is the release version 1.5.4 = libisoburn.so.1.111.0
|
||||
dnl ### This is the development version after above stable release
|
||||
dnl LT_CURRENT++, LT_AGE++ have not happened yet.
|
||||
dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
|
||||
dnl ts C30607
|
||||
dnl ### This is the release version 1.5.6 = libisoburn.so.1.113.0
|
||||
dnl This is the development version after above stable release
|
||||
dnl ### LT_CURRENT++, LT_AGE++ have not happened yet.
|
||||
dnl LT_CURRENT++, LT_AGE++ has happened meanwhile.
|
||||
dnl
|
||||
dnl SONAME = 112 - 111 = 1 . Library name = libisoburn.so.1.111.0
|
||||
dnl SONAME = 115 - 114 = 1 . Library name = libisoburn.so.1.114.0
|
||||
LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION
|
||||
LT_CURRENT=112
|
||||
LT_AGE=111
|
||||
LT_CURRENT=115
|
||||
LT_AGE=114
|
||||
LT_REVISION=0
|
||||
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
||||
|
||||
|
@ -65,7 +65,6 @@ dnl AM_MAINTAINER_MODE
|
|||
AM_PROG_CC_C_O
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
dnl Large file support
|
||||
AC_SYS_LARGEFILE
|
||||
|
@ -460,8 +459,8 @@ if test x$enable_pkg_check_modules = xyes; then
|
|||
dnl If PKG_CHECK_MODULES is to be used after this if-block,
|
||||
dnl then it might be necessary to perform PKG_PROG_PKG_CONFIG before the block.
|
||||
|
||||
LIBBURN_REQUIRED=1.5.4
|
||||
LIBISOFS_REQUIRED=1.5.4
|
||||
LIBBURN_REQUIRED=1.5.7
|
||||
LIBISOFS_REQUIRED=1.5.6
|
||||
PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED)
|
||||
PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED)
|
||||
if test x$LIBCDIO_DEF = x; then
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (C) 2015 - 2019
|
||||
# Copyright (C) 2015 - 2022
|
||||
# Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||
# Provided under BSD license: Use, modify, and distribute as you like.
|
||||
|
||||
|
@ -117,9 +117,9 @@ fi
|
|||
# command line.)
|
||||
# Each argument must be a single word. No whitespace. No quotation marks.
|
||||
|
||||
# "yes" overwrites the MBR partition table area in the EFI boot image by zeros.
|
||||
# Some EFI implementations get stuck when seeing in the EFI partition a
|
||||
# partition table entry which begins at LBA 0.
|
||||
# "yes" in MKRESCUE_SED_IN_EFI_NO_PT overwrites the MBR partition table area
|
||||
# in the EFI boot image by zeros. Some EFI implementations get stuck when
|
||||
# seeing in the EFI partition a partition table entry which begins at LBA 0.
|
||||
# "extra" not only zeros the partition table but also the MBR signature.
|
||||
efi_zero_inner_pt=no
|
||||
if test -n "$MKRESCUE_SED_IN_EFI_NO_PT"
|
||||
|
@ -127,6 +127,24 @@ then
|
|||
efi_zero_inner_pt="$MKRESCUE_SED_IN_EFI_NO_PT"
|
||||
fi
|
||||
|
||||
# "yes" in MKRESCUE_SED_UNPACK_EFI_TO_ISO causes the file tree from the FAT
|
||||
# image efi.img to be unpacked by mcopy to a directory in /tmp which then
|
||||
# gets mapped into the root directory of the emerging ISO 9660 filesystem.
|
||||
# This enables a way of installing the result image onto a USB stick with
|
||||
# FAT filesystem by simply copying its full file tree from ISO to FAT.
|
||||
# Whether the payload files of the ISO will be able to work from FAT depends
|
||||
# on their expectation towards file names and attributes.
|
||||
# WARNING: Make sure that the files in efi.img do not collide with your
|
||||
# payload files or with files added to the ISO by GRUB. Before using
|
||||
# MKRESCUE_SED_UNPACK_EFI_TO_ISO, make a vanilla grub-mkrescue ISO
|
||||
# with your payload, mount it and then its /efi.img file, then use
|
||||
# program "find" on the mount point of efi.img to see all its files.
|
||||
# Compare this with the output of "find" on the ISO mount point.
|
||||
efi_unpack_to_iso=no
|
||||
if test -n "$MKRESCUE_SED_UNPACK_EFI_TO_ISO"
|
||||
then
|
||||
efi_unpack_to_iso="$MKRESCUE_SED_UNPACK_EFI_TO_ISO"
|
||||
fi
|
||||
|
||||
#
|
||||
# Do the work
|
||||
|
@ -190,10 +208,11 @@ done
|
|||
if test x"$debug" = xextra
|
||||
then
|
||||
# Show files on disk
|
||||
find "$dir"
|
||||
find "$dir" 2>&1
|
||||
echo 2>&1
|
||||
fi
|
||||
|
||||
if test "$efi_zero_inner_pt" = yes -o "$efi_zero_inner_pt" = extra
|
||||
if test x"$efi_zero_inner_pt" = xyes -o x"$efi_zero_inner_pt" = xextra
|
||||
then
|
||||
did_dd=0
|
||||
if test -e "$dir"/efi.img
|
||||
|
@ -222,6 +241,41 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
efi_temp_tree=
|
||||
if test x"$efi_unpack_to_iso" = xyes
|
||||
then
|
||||
if test -e "$dir"/efi.img
|
||||
then
|
||||
temp_tree=/tmp/grub-mkrescue-sed-et."$$"
|
||||
# The mcopy command is the inverse of what grub-mkrescue does to pack it up
|
||||
if mcopy -s -i "$dir"/efi.img ::/ "$temp_tree"
|
||||
then
|
||||
efi_temp_tree="$temp_tree"
|
||||
if test x"$debug" = xyes -o x"$debug" = xextra
|
||||
then
|
||||
echo "Temporarily extracted $dir/efi.img to $temp_tree" >&2
|
||||
echo >&2
|
||||
if test x"$debug" = xextra
|
||||
then
|
||||
# Show extracted files
|
||||
find "$temp_tree" >&2
|
||||
echo >&2
|
||||
fi
|
||||
fi
|
||||
elif test -e "$temp_tree"
|
||||
then
|
||||
rm -r "$temp_tree"
|
||||
fi
|
||||
if test -z "$efi_temp_tree"
|
||||
then
|
||||
echo >&2
|
||||
echo "$0 : NOTE : Could not extract efi.img to $temp_tree" >&2
|
||||
echo "$0 : NOTE : Thus cannot obey MKRESCUE_SED_UNPACK_EFI_TO_ISO." >&2
|
||||
echo >&2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
efi_tmp_name=
|
||||
if test x"$mode" = xmjg \
|
||||
-o x"$mode" = xmbr_only \
|
||||
|
@ -229,10 +283,15 @@ if test x"$mode" = xmjg \
|
|||
-o x"$mode" = xmbr_hfs
|
||||
then
|
||||
# Move EFI partition image file out of the "$dir" tree, i.e. out of the ISO
|
||||
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
|
||||
efi_tmp_name=grub-mkrescue-sed-ei.$$
|
||||
if test -e "$dir"/efi.img
|
||||
then
|
||||
mv "$dir"/efi.img /tmp/$efi_tmp_name
|
||||
if test x"$debug" = xyes -o x"$debug" = xextra
|
||||
then
|
||||
echo "Temporarily moved $dir/efi.img to /tmp/$efi_tmp_name" >&2
|
||||
echo >&2
|
||||
fi
|
||||
elif test -e /tmp/$efi_tmp_name
|
||||
then
|
||||
rm /tmp/$efi_tmp_name
|
||||
|
@ -322,6 +381,27 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if echo "$efi_temp_tree" | grep '^/tmp/' >/dev/null
|
||||
then
|
||||
# Does the xorriso run end in native command mode ?
|
||||
separator_seen=0
|
||||
for i in "$@"
|
||||
do
|
||||
if test x"$i" = x--
|
||||
then
|
||||
separator_seen=1
|
||||
fi
|
||||
done
|
||||
if test "$separator_seen" = 1
|
||||
then
|
||||
# Native mode possible: Enable it for sure and then use -map
|
||||
x=" $x -- -map $efi_temp_tree /"
|
||||
else
|
||||
# Hopefully nobody finds a way to leave mkisofs emulation without "--" arg
|
||||
x=" $x -graft-points /=$efi_temp_tree"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$debug" = xyes -o x"$debug" = xextra
|
||||
then
|
||||
echo "+ converted xorriso arguments:" >&2
|
||||
|
@ -349,5 +429,11 @@ then
|
|||
mv /tmp/$efi_tmp_name "$dir"/efi.img
|
||||
fi
|
||||
|
||||
# Remove possible extracted EFI partition tree
|
||||
if echo "$efi_temp_tree" | grep '^/tmp/' >/dev/null
|
||||
then
|
||||
rm -r "$efi_temp_tree"
|
||||
fi
|
||||
|
||||
exit $ret
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/wish
|
||||
#
|
||||
# xorriso-tcltk
|
||||
# Copyright (C) 2012 - 2021
|
||||
# Copyright (C) 2012 - 2023
|
||||
# Thomas Schmitt <scdbackup@gmx.net>, libburnia project.
|
||||
# Provided under BSD license: Use, modify, and distribute as you like.
|
||||
#
|
||||
|
@ -23,7 +23,7 @@
|
|||
# And, well, a graphical widget set would be nice.
|
||||
|
||||
|
||||
set own_version "1.5.4"
|
||||
set own_version "1.5.7"
|
||||
|
||||
# Minimum version of xorriso to be used as backend process.
|
||||
# Older versions of xorriso do not offer commands -msg_op and -launch_frontend
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
/* libburn wrappers for libisoburn
|
||||
|
||||
Copyright 2007 - 2017 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007 - 2024 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Provided under GPL version 2 or later.
|
||||
*/
|
||||
|
||||
|
@ -362,7 +362,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
|||
enum burn_disc_status s;
|
||||
|
||||
#ifndef Hardcoded_cd_rW
|
||||
int lba, nwa;
|
||||
off_t lba, nwa;
|
||||
#endif
|
||||
|
||||
s= burn_disc_get_status(d);
|
||||
|
@ -505,7 +505,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
|||
#ifdef Hardcoded_cd_rW
|
||||
(*o)->nwa= Hardcoded_cd_rw_nwA;
|
||||
#else
|
||||
ret= burn_disc_track_lba_nwa(d, NULL, 0, &lba, &nwa);
|
||||
ret= burn_disc_track_lba_nwa_v2(d, NULL, 0, &lba, &nwa);
|
||||
if(ret>0)
|
||||
(*o)->nwa= nwa;
|
||||
if((*o)->nwa < (*o)->zero_nwa)
|
||||
|
@ -786,7 +786,7 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
|
|||
return((off_t) 0);
|
||||
local_opts= burn_write_opts_new(d);
|
||||
eff_opts= local_opts;
|
||||
burn_write_opts_set_start_byte(eff_opts, ((off_t) o->nwa) * (off_t) 2048);
|
||||
burn_write_opts_set_start_byte(eff_opts, o->nwa * (off_t) 2048);
|
||||
}
|
||||
avail= burn_disc_available_space(d, eff_opts);
|
||||
if(local_opts!=NULL)
|
||||
|
@ -796,9 +796,9 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
|
|||
}
|
||||
|
||||
|
||||
int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
|
||||
int isoburn_disc_get_msc1_v2(struct burn_drive *d, off_t *start_lba)
|
||||
{
|
||||
int ret;
|
||||
int ret, int_lba;
|
||||
struct isoburn *o;
|
||||
|
||||
#ifdef Hardcoded_cd_rW
|
||||
|
@ -824,13 +824,35 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
|
|||
*start_lba= 0;
|
||||
return(1);
|
||||
}
|
||||
return(burn_disc_get_msc1(d, start_lba));
|
||||
ret= burn_disc_get_msc1(d, &int_lba);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
*start_lba= int_lba;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_disc_track_lba_nwa(struct burn_drive *d,
|
||||
struct burn_write_opts *opts,
|
||||
int trackno, int *lba, int *nwa)
|
||||
int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
|
||||
{
|
||||
int ret;
|
||||
off_t long_lba;
|
||||
|
||||
ret= isoburn_disc_get_msc1_v2(d, &long_lba);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
if(long_lba > 0x7fffffff) {
|
||||
*start_lba= 0x7fffffff;
|
||||
ret= 0;
|
||||
} else {
|
||||
*start_lba= long_lba;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_disc_track_lba_nwa_v2(struct burn_drive *d,
|
||||
struct burn_write_opts *opts,
|
||||
int trackno, off_t *lba, off_t *nwa)
|
||||
{
|
||||
int ret;
|
||||
struct isoburn *o;
|
||||
|
@ -858,19 +880,45 @@ int isoburn_disc_track_lba_nwa(struct burn_drive *d,
|
|||
s= isoburn_disc_get_status(d);
|
||||
if(s == BURN_DISC_BLANK) /* We do not believe in anything but nwa = lba = 0 */
|
||||
return(1);
|
||||
return(burn_disc_track_lba_nwa(d, opts, trackno, lba, nwa));
|
||||
return(burn_disc_track_lba_nwa_v2(d, opts, trackno, lba, nwa));
|
||||
}
|
||||
|
||||
|
||||
int isoburn_disc_track_lba_nwa(struct burn_drive *d,
|
||||
struct burn_write_opts *opts,
|
||||
int trackno, int *lba, int *nwa)
|
||||
{
|
||||
int ret;
|
||||
off_t long_lba, long_nwa;
|
||||
|
||||
ret= isoburn_disc_track_lba_nwa_v2(d, opts, trackno, &long_lba, &long_nwa);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
if(long_lba > 0x7fffffff) {
|
||||
*lba= 0x7fffffff;
|
||||
} else {
|
||||
*lba= long_lba;
|
||||
}
|
||||
if(long_nwa > 0x7fffffff) {
|
||||
*nwa= 0x7fffffff;
|
||||
ret= 0;
|
||||
} else {
|
||||
*nwa= long_nwa;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_get_msc2(struct isoburn *o,
|
||||
struct burn_write_opts *opts, int *msc2, int flag)
|
||||
struct burn_write_opts *opts, off_t *msc2, int flag)
|
||||
{
|
||||
int ret, lba, nwa;
|
||||
int ret;
|
||||
off_t lba, nwa;
|
||||
|
||||
if(o->fabricated_msc2>=0)
|
||||
*msc2= o->fabricated_msc2;
|
||||
else {
|
||||
ret= isoburn_disc_track_lba_nwa(o->drive, opts, 0, &lba, &nwa);
|
||||
ret= isoburn_disc_track_lba_nwa_v2(o->drive, opts, 0, &lba, &nwa);
|
||||
if(ret<=0)
|
||||
return(ret);
|
||||
*msc2= nwa;
|
||||
|
@ -878,6 +926,7 @@ int isoburn_get_msc2(struct isoburn *o,
|
|||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/* @param flag bit0= truncate (else do not truncate)
|
||||
bit1= do not warn if call is inappropriate to drive
|
||||
bit2= only set if truncation is currently enabled
|
||||
|
@ -1251,7 +1300,7 @@ int isoburn_report_iso_error(int iso_error_code, char msg_text[], int os_errno,
|
|||
@return 1 seems to be a valid ISO image , 0 format not recognized, <0 error
|
||||
*/
|
||||
int isoburn_read_iso_head_parse(unsigned char *data,
|
||||
int *image_blocks, char *info, int flag)
|
||||
off_t *image_blocks, char *info, int flag)
|
||||
{
|
||||
int i, info_mode;
|
||||
|
||||
|
@ -1284,13 +1333,15 @@ int isoburn_read_iso_head_parse(unsigned char *data,
|
|||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* API
|
||||
@param flag bit0-7: info return mode
|
||||
0= do not return anything in info (do not even touch it)
|
||||
1= copy volume id to info (info needs 33 bytes)
|
||||
2= copy 64 kB header to info (needs 65536 bytes)
|
||||
bit12= read even if the start of multi-session emulation
|
||||
yielded a read error
|
||||
bit13= do not read head from media but use first 64 kB from info
|
||||
bit14= check both half buffers (not only second)
|
||||
return 2 if found in first block
|
||||
|
@ -1298,11 +1349,12 @@ int isoburn_read_iso_head_parse(unsigned char *data,
|
|||
@return 1 seems to be a valid ISO image , 2 found in first half buffer,
|
||||
0 format not recognized, <0 error
|
||||
*/
|
||||
int isoburn_read_iso_head(struct burn_drive *d, int lba,
|
||||
int *image_blocks, char *info, int flag)
|
||||
int isoburn_read_iso_head_v2(struct burn_drive *d, off_t lba,
|
||||
off_t *image_blocks, char *info, int flag)
|
||||
{
|
||||
unsigned char *buffer= NULL;
|
||||
int ret, info_mode, capacity, role;
|
||||
int ret, info_mode, role;
|
||||
off_t capacity;
|
||||
off_t data_count, to_read;
|
||||
struct isoburn *o;
|
||||
|
||||
|
@ -1322,22 +1374,22 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
|
|||
/* >>> ??? return always 0 ? */
|
||||
{ret= (-1*!!(flag&(1<<15))); goto ex;}
|
||||
|
||||
ret = burn_get_read_capacity(d, &capacity, 0);
|
||||
ret = burn_get_read_capacity_v2(d, &capacity, 0);
|
||||
if (ret <= 0 && (role == 2 || role == 4)) {
|
||||
/* Might be a block device on a system where libburn cannot determine its
|
||||
size. Try to read anyway. */
|
||||
capacity = 0x7ffffff0;
|
||||
capacity = 0x7fffffffffffffff;
|
||||
ret = 1;
|
||||
}
|
||||
to_read= (off_t) capacity * ((off_t) 2048);
|
||||
to_read= capacity * ((off_t) 2048);
|
||||
if(ret > 0 && to_read >= (off_t) (36 * 1024)) {
|
||||
ret= isoburn_find_emulator(&o, d, 0);
|
||||
if(ret > 0)
|
||||
if(o->media_read_error)
|
||||
if(o->media_read_error && !(flag & (1 << 12)))
|
||||
{ret= (-1 * !!(flag & (1 << 15))); goto ex;}
|
||||
if(to_read >= (off_t) (64 * 1024))
|
||||
to_read= 64 * 1024;
|
||||
ret = burn_read_data(d, ((off_t) lba) * (off_t) 2048, (char *) buffer,
|
||||
ret = burn_read_data(d, lba * (off_t) 2048, (char *) buffer,
|
||||
to_read, &data_count, 32); /* error messages as DEBUG */
|
||||
} else
|
||||
ret= 0;
|
||||
|
@ -1366,8 +1418,23 @@ ex:;
|
|||
}
|
||||
|
||||
|
||||
int isoburn_make_toc_entry(struct isoburn *o, int *session_count, int lba,
|
||||
int track_blocks, char *volid, int flag)
|
||||
int isoburn_read_iso_head(struct burn_drive *d, int lba,
|
||||
int *image_blocks, char *info, int flag)
|
||||
{
|
||||
int ret;
|
||||
off_t long_image_blocks;
|
||||
|
||||
ret= isoburn_read_iso_head_v2(d, (off_t) lba, &long_image_blocks, info, flag);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
/* The old behavior was to return negative numbers on overflow */
|
||||
*image_blocks= (int) long_image_blocks;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_make_toc_entry(struct isoburn *o, int *session_count, off_t lba,
|
||||
off_t track_blocks, char *volid, int flag)
|
||||
{
|
||||
int ret;
|
||||
struct isoburn_toc_entry *item;
|
||||
|
@ -1404,9 +1471,10 @@ no_memory:;
|
|||
*/
|
||||
int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
||||
{
|
||||
int ret, image_size= 0, lba, track_blocks, session_count= 0, read_flag= 0;
|
||||
int scan_start= 0, scan_count= 0, probe_minus_16= 0, growisofs_nwa, role;
|
||||
int with_enclosure= 0, readable_blocks= -1;
|
||||
int ret, session_count= 0, read_flag= 0;
|
||||
int probe_minus_16= 0, role, with_enclosure= 0;
|
||||
off_t image_size= 0, lba, track_blocks, scan_start= 0, scan_count= 0;
|
||||
off_t growisofs_nwa, readable_blocks= -1;
|
||||
struct isoburn *o;
|
||||
char *msg= NULL, *size_text= NULL, *sev, volid[33], *volid_pt= NULL;
|
||||
time_t start_time, last_pacifier, now;
|
||||
|
@ -1425,13 +1493,13 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||
if(o->emulation_mode<=0 && !(flag&1))
|
||||
{ret= 0; goto ex;}
|
||||
|
||||
ret= burn_get_read_capacity(d, &readable_blocks, 0);
|
||||
ret= burn_get_read_capacity_v2(d, &readable_blocks, 0);
|
||||
if(ret <= 0) {
|
||||
role = burn_drive_get_drive_role(d);
|
||||
if (role == 2 || role == 4)
|
||||
/* Might be a block device on a system where libburn cannot determine its
|
||||
size. Try to read anyway. */
|
||||
readable_blocks= 0x7ffffff0; /* try to read anyway */
|
||||
readable_blocks= 0x7fffffffffffffff; /* try to read anyway */
|
||||
else
|
||||
readable_blocks= -1;
|
||||
}
|
||||
|
@ -1442,11 +1510,11 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||
lba= 0;
|
||||
if(flag & 2) {
|
||||
/* If there is a PVD at LBA 32 then this is an image with emulated TOC */
|
||||
ret= isoburn_read_iso_head(d, 32, &image_size, NULL, 0);
|
||||
ret= isoburn_read_iso_head_v2(d, 32, &image_size, NULL, 0);
|
||||
if(ret > 0)
|
||||
lba= 32;
|
||||
} else {
|
||||
ret= isoburn_read_iso_head(d, lba, &image_size, NULL, 0);
|
||||
ret= isoburn_read_iso_head_v2(d, lba, &image_size, NULL, 0);
|
||||
if(ret<=0)
|
||||
{ret= 0; goto failure;}
|
||||
lba= o->target_iso_head_size / 2048;
|
||||
|
@ -1455,6 +1523,11 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||
ret= 1;
|
||||
goto failure; /* This will represent the medium as single session */
|
||||
}
|
||||
if(!(lba < image_size || (flag&2))) {
|
||||
/* Not enough readable space for chained session superblocks */
|
||||
ret= 1;
|
||||
goto failure;
|
||||
}
|
||||
}
|
||||
while(lba<image_size || (flag&2)) {
|
||||
now= time(NULL);
|
||||
|
@ -1486,7 +1559,7 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||
probe_minus_16= 0;
|
||||
}
|
||||
|
||||
ret= isoburn_read_iso_head(d, lba, &track_blocks, volid, read_flag);
|
||||
ret= isoburn_read_iso_head_v2(d, lba, &track_blocks, volid, read_flag);
|
||||
if(ret > 0) {
|
||||
volid_pt= volid;
|
||||
} else {
|
||||
|
@ -1503,8 +1576,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||
break;
|
||||
}
|
||||
sprintf(msg,
|
||||
"Chain of ISO session headers broken at #%d, LBA %ds",
|
||||
session_count+1, lba);
|
||||
"Chain of ISO session headers broken at #%d, LBA %.fs",
|
||||
session_count+1, (double) lba);
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
|
||||
|
||||
if(with_enclosure) {
|
||||
|
@ -1521,8 +1594,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||
lba-= 16;
|
||||
|
||||
if(readable_blocks >= 0 && lba + track_blocks > readable_blocks) {
|
||||
sprintf(msg, "ISO image size %ds larger than readable size %ds",
|
||||
lba + track_blocks, readable_blocks);
|
||||
sprintf(msg, "ISO image size %.fs larger than readable size %.fs",
|
||||
(double) (lba + track_blocks), (double) readable_blocks);
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
|
||||
track_blocks= readable_blocks - lba;
|
||||
}
|
||||
|
@ -1560,8 +1633,8 @@ failure:;
|
|||
isoburn_toc_entry_destroy(&(o->toc), 1);
|
||||
if(with_enclosure && o->emulation_mode == 1) {
|
||||
if(readable_blocks >= 0 && image_size > readable_blocks) {
|
||||
sprintf(msg, "ISO image size %ds larger than readable size %ds",
|
||||
image_size, readable_blocks);
|
||||
sprintf(msg, "ISO image size %.fs larger than readable size %.fs",
|
||||
(double) image_size, (double) readable_blocks);
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
|
||||
image_size= readable_blocks;
|
||||
}
|
||||
|
@ -1725,10 +1798,11 @@ failure:;
|
|||
}
|
||||
|
||||
|
||||
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
|
||||
off_t isoburn_toc_disc_get_sectors_v2(struct isoburn_toc_disc *disc)
|
||||
{
|
||||
struct isoburn_toc_entry *t;
|
||||
int ret= 0, num_sessions, num_tracks, open_sessions= 0, session_idx= -1;
|
||||
int num_sessions, num_tracks, open_sessions= 0, session_idx= -1;
|
||||
off_t ret= 0;
|
||||
struct burn_session **sessions;
|
||||
struct burn_track **tracks;
|
||||
struct burn_toc_entry entry;
|
||||
|
@ -1759,7 +1833,9 @@ int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
|
|||
}
|
||||
if(num_tracks > 0) {
|
||||
burn_track_get_entry(tracks[num_tracks - 1], &entry);
|
||||
if(entry.extensions_valid & 1)
|
||||
if(entry.extensions_valid & 8)
|
||||
ret= entry.long_start_lba + entry.long_track_blocks;
|
||||
else if(entry.extensions_valid & 1)
|
||||
ret= entry.start_lba + entry.track_blocks;
|
||||
}
|
||||
}
|
||||
|
@ -1771,6 +1847,17 @@ int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
|
|||
}
|
||||
|
||||
|
||||
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
|
||||
{
|
||||
off_t ret;
|
||||
|
||||
ret= isoburn_toc_disc_get_sectors_v2(disc);
|
||||
if(ret > 0x7fffffff)
|
||||
return((int) 0x7fffffff);
|
||||
return((int) ret);
|
||||
}
|
||||
|
||||
|
||||
struct isoburn_toc_session **isoburn_toc_disc_get_sessions(
|
||||
struct isoburn_toc_disc *disc, int *num)
|
||||
{
|
||||
|
@ -1785,10 +1872,11 @@ int isoburn_toc_disc_get_incmpl_sess(struct isoburn_toc_disc *disc)
|
|||
}
|
||||
|
||||
|
||||
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
|
||||
off_t isoburn_toc_session_get_sectors_v2(struct isoburn_toc_session *s)
|
||||
{
|
||||
struct isoburn_toc_entry *t;
|
||||
int count= 0, i;
|
||||
int i;
|
||||
off_t count= 0;
|
||||
|
||||
if(s==NULL)
|
||||
return(0);
|
||||
|
@ -1799,17 +1887,28 @@ int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
|
|||
t= t->next;
|
||||
}
|
||||
} else if(s->session!=NULL)
|
||||
count= burn_session_get_sectors(s->session);
|
||||
count= burn_session_get_sectors_v2(s->session);
|
||||
return(count);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
|
||||
{
|
||||
off_t ret;
|
||||
|
||||
ret= isoburn_toc_session_get_sectors_v2(s);
|
||||
if(ret > 0x7fffffff)
|
||||
return((int) 0x7fffffff);
|
||||
return((int) ret);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_toc_entry_finish(struct burn_toc_entry *entry,
|
||||
int session_no, int track_no, int flag)
|
||||
{
|
||||
int pmin, psec, pframe;
|
||||
|
||||
entry->extensions_valid= 1;
|
||||
entry->extensions_valid= 1 | 8;
|
||||
entry->adr= 1;
|
||||
entry->control= 4;
|
||||
entry->session= session_no & 255;
|
||||
|
@ -1817,7 +1916,13 @@ int isoburn_toc_entry_finish(struct burn_toc_entry *entry,
|
|||
entry->point= track_no & 255;
|
||||
entry->point_msb= (track_no >> 8) & 255;
|
||||
|
||||
burn_lba_to_msf(entry->start_lba, &pmin, &psec, &pframe);
|
||||
if(entry->start_lba < 0) {
|
||||
pmin= 255;
|
||||
psec= 59;
|
||||
pframe=74;
|
||||
} else {
|
||||
burn_lba_to_msf(entry->start_lba, &pmin, &psec, &pframe);
|
||||
}
|
||||
if(pmin<=255)
|
||||
entry->pmin= pmin;
|
||||
else
|
||||
|
@ -1842,7 +1947,13 @@ void isoburn_toc_session_get_leadout_entry(struct isoburn_toc_session *s,
|
|||
if(s->track_count<=0 || s->track_pointers==NULL || s->toc_entry==NULL)
|
||||
return;
|
||||
t= s->track_pointers[s->track_count-1];
|
||||
entry->start_lba= t->toc_entry->start_lba + t->toc_entry->track_blocks;
|
||||
entry->long_start_lba= t->toc_entry->start_lba + t->toc_entry->track_blocks;
|
||||
if(entry->long_start_lba > 0x7fffffff) {
|
||||
entry->start_lba= -1;
|
||||
} else {
|
||||
entry->start_lba= entry->long_start_lba;
|
||||
}
|
||||
entry->long_track_blocks= 0;
|
||||
entry->track_blocks= 0;
|
||||
isoburn_toc_entry_finish(entry, s->toc_entry->session, t->toc_entry->track_no,
|
||||
0);
|
||||
|
@ -1868,15 +1979,26 @@ void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
|
|||
}
|
||||
if(t->toc_entry==NULL)
|
||||
return;
|
||||
entry->start_lba= t->toc_entry->start_lba;
|
||||
entry->track_blocks= t->toc_entry->track_blocks;
|
||||
entry->long_start_lba= t->toc_entry->start_lba;
|
||||
if(entry->long_start_lba > 0x7fffffff) {
|
||||
entry->start_lba= -1;
|
||||
} else {
|
||||
entry->start_lba= entry->long_start_lba;
|
||||
}
|
||||
entry->long_track_blocks= t->toc_entry->track_blocks;
|
||||
if(entry->long_track_blocks > 0x7fffffff) {
|
||||
entry->track_blocks= -1;
|
||||
} else {
|
||||
entry->track_blocks= entry->long_track_blocks;
|
||||
}
|
||||
isoburn_toc_entry_finish(entry, t->toc_entry->session, t->toc_entry->track_no,
|
||||
0);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
|
||||
int *image_blocks, char volid[33], int flag)
|
||||
int isoburn_toc_track_get_emul_v2(struct isoburn_toc_track *t,
|
||||
off_t *start_lba, off_t *image_blocks,
|
||||
char volid[33], int flag)
|
||||
{
|
||||
if(t->toc_entry == NULL)
|
||||
return(0);
|
||||
|
@ -1890,6 +2012,32 @@ int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
|
|||
}
|
||||
|
||||
|
||||
int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
|
||||
int *image_blocks, char volid[33], int flag)
|
||||
{
|
||||
int ret;
|
||||
off_t long_lba, long_image_blocks;
|
||||
|
||||
ret= isoburn_toc_track_get_emul_v2(t, &long_lba, &long_image_blocks, volid,
|
||||
flag);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
if(long_lba > 0x7fffffff) {
|
||||
*start_lba= 0x7fffffff;
|
||||
ret= 0;
|
||||
} else {
|
||||
*start_lba= long_lba;
|
||||
}
|
||||
if(long_image_blocks > 0x7fffffff) {
|
||||
*image_blocks= 0x7fffffff;
|
||||
ret= 0;
|
||||
} else {
|
||||
*image_blocks= long_image_blocks;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
void isoburn_toc_disc_free(struct isoburn_toc_disc *d)
|
||||
{
|
||||
if(d->disc!=NULL)
|
||||
|
@ -1899,15 +2047,19 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *d)
|
|||
}
|
||||
|
||||
|
||||
int isoburn_get_track_lba(struct isoburn_toc_track *track, int *lba, int flag)
|
||||
int isoburn_get_track_lba(struct isoburn_toc_track *track, off_t *lba,
|
||||
int flag)
|
||||
{
|
||||
struct burn_toc_entry entry;
|
||||
|
||||
isoburn_toc_track_get_entry(track, &entry);
|
||||
if (entry.extensions_valid & 1)
|
||||
if (entry.extensions_valid & 8) {
|
||||
*lba= entry.long_start_lba;
|
||||
} else if (entry.extensions_valid & 1) {
|
||||
*lba= entry.start_lba;
|
||||
else
|
||||
} else {
|
||||
*lba= burn_msf_to_lba(entry.pmin, entry.psec, entry.pframe);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
@ -1938,8 +2090,10 @@ int isoburn_drive_set_msgs_submit(struct burn_drive *d,
|
|||
int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
|
||||
int flag)
|
||||
{
|
||||
int ret, num_sessions= 0, num_tracks, adr_num, i, j, total_tracks;
|
||||
int lba, best_lba, size, re_valid= 0, track_count= 0;
|
||||
int ret, num_sessions= 0, num_tracks, i, j, total_tracks;
|
||||
int re_valid= 0, track_count= 0;
|
||||
off_t adr_num, lba, best_lba, size;
|
||||
double adr_double;
|
||||
time_t start_time= 0, last_pacifier= 0, now;
|
||||
char volid[33], *msg= NULL;
|
||||
struct isoburn *o;
|
||||
|
@ -1963,7 +2117,11 @@ int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
|
|||
{ret= -1; goto ex;}
|
||||
|
||||
start_time= last_pacifier= time(NULL);
|
||||
adr_num= atoi(adr_value);
|
||||
adr_num= -1;
|
||||
adr_double= -1.0;
|
||||
sscanf(adr_value, "%lf", &adr_double);
|
||||
if(adr_double >= -1.0e16 && adr_double <= 1.0e16) /* ~ 2 exp 53 */
|
||||
adr_num= adr_double;
|
||||
if(adr_mode!=3 || (flag & 2)) {
|
||||
disc= isoburn_toc_drive_get_disc(d);
|
||||
if(disc==NULL) {
|
||||
|
@ -2025,7 +2183,8 @@ not_found:;
|
|||
}
|
||||
if((flag & 1) && o->fabricated_msc1 >= 16) {
|
||||
/* adr_num is possibly 16 blocks too high */
|
||||
ret= isoburn_read_iso_head(d, o->fabricated_msc1, &size,volid, 1|(1<<14));
|
||||
ret= isoburn_read_iso_head_v2(d, o->fabricated_msc1, &size, volid,
|
||||
1 | (1 << 14));
|
||||
if(ret==2)
|
||||
o->fabricated_msc1-= 16;
|
||||
}
|
||||
|
@ -2053,12 +2212,12 @@ not_found:;
|
|||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "UPDATE", 0);
|
||||
}
|
||||
track_count++;
|
||||
ret= isoburn_toc_track_get_emul(tracks[0], &lba, &size, volid, 0);
|
||||
ret= isoburn_toc_track_get_emul_v2(tracks[0], &lba, &size, volid, 0);
|
||||
if(ret < 0)
|
||||
continue;
|
||||
if(ret == 0) {
|
||||
isoburn_get_track_lba(tracks[0], &lba, 0);
|
||||
ret= isoburn_read_iso_head(d, lba, &size, volid, 1);
|
||||
ret= isoburn_read_iso_head_v2(d, lba, &size, volid, 1);
|
||||
if(ret<=0)
|
||||
continue;
|
||||
}
|
||||
|
@ -2102,13 +2261,13 @@ ex:;
|
|||
}
|
||||
|
||||
|
||||
int isoburn_get_mount_params(struct burn_drive *d,
|
||||
int adr_mode, char *adr_value,
|
||||
int *lba, int *track, int *session,
|
||||
char volid[33], int flag)
|
||||
int isoburn_get_mount_params_v2(struct burn_drive *d,
|
||||
int adr_mode, char *adr_value,
|
||||
off_t *lba, int *track, int *session,
|
||||
char volid[33], int flag)
|
||||
{
|
||||
int msc1_mem, ret, total_tracks, num_sessions, num_tracks, i, j, track_lba;
|
||||
int size, is_iso= 0;
|
||||
int ret, total_tracks, num_sessions, num_tracks, i, j, is_iso= 0;
|
||||
off_t msc1_mem, track_lba, size;
|
||||
struct isoburn *o;
|
||||
struct isoburn_toc_disc *disc= NULL;
|
||||
struct isoburn_toc_session **sessions= NULL;
|
||||
|
@ -2145,7 +2304,7 @@ int isoburn_get_mount_params(struct burn_drive *d,
|
|||
}
|
||||
}
|
||||
}
|
||||
ret= isoburn_read_iso_head(d, *lba, &size, volid, 1);
|
||||
ret= isoburn_read_iso_head_v2(d, *lba, &size, volid, 1);
|
||||
if(ret <= 0)
|
||||
volid[0]= 0;
|
||||
else
|
||||
|
@ -2159,3 +2318,24 @@ ex:;
|
|||
}
|
||||
|
||||
|
||||
int isoburn_get_mount_params(struct burn_drive *d,
|
||||
int adr_mode, char *adr_value,
|
||||
int *lba, int *track, int *session,
|
||||
char volid[33], int flag)
|
||||
{
|
||||
int ret;
|
||||
off_t long_lba;
|
||||
|
||||
ret= isoburn_get_mount_params_v2(d, adr_mode, adr_value, &long_lba,
|
||||
track, session, volid, flag);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
if(long_lba > 0x7fffffff) {
|
||||
*lba= 0x7fffffff;
|
||||
ret= 0;
|
||||
} else {
|
||||
*lba= long_lba;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Class core of libisoburn.
|
||||
|
||||
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
Copyright 2007 - 2020 Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright 2007 - 2023 Thomas Schmitt <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
*/
|
||||
|
@ -405,7 +405,8 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
|
|||
IsoWriteOpts *wopts,
|
||||
int flag)
|
||||
{
|
||||
int ret, rec_mtime, new_img, lba, nwa, i, guid_mode;
|
||||
int ret, rec_mtime, new_img, i, guid_mode;
|
||||
off_t lba, nwa;
|
||||
struct burn_drive *out_d;
|
||||
|
||||
new_img= flag&1;
|
||||
|
@ -481,6 +482,13 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
|
|||
if(opts->vol_uuid[0] == 0 && opts->gpt_guid_mode == 2)
|
||||
guid_mode= 0;
|
||||
iso_write_opts_set_gpt_guid(wopts, opts->gpt_guid, guid_mode);
|
||||
ret = iso_write_opts_set_max_ce_entries(wopts, opts->max_ce_entries,
|
||||
opts->max_ce_entries_flag);
|
||||
if (ret < 0) {
|
||||
isoburn_report_iso_error(ret, "Cannot set limit for number of CE entries",
|
||||
0, "FAILURE", 0);
|
||||
{ret= -1; goto ex;}
|
||||
}
|
||||
iso_write_opts_attach_jte(wopts, opts->libjte_handle);
|
||||
iso_write_opts_set_hfsp_serial_number(wopts, opts->hfsp_serial_number);
|
||||
|
||||
|
@ -501,7 +509,7 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
|
|||
out_o->min_start_byte= 0;
|
||||
}
|
||||
}
|
||||
ret = isoburn_disc_track_lba_nwa(out_d, NULL, 0, &lba, &nwa);
|
||||
ret = isoburn_disc_track_lba_nwa_v2(out_d, NULL, 0, &lba, &nwa);
|
||||
opts->effective_lba= nwa;
|
||||
ret= isoburn_get_msc2(out_o, NULL, &nwa, 0);
|
||||
if (ret != 1) {
|
||||
|
@ -588,7 +596,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
|
|||
IsoWriteOpts *wopts= NULL;
|
||||
enum burn_disc_status state;
|
||||
int ret, fifo_chunks, i, new_img, early_indev_release;
|
||||
uint32_t data_start= -1;
|
||||
uint32_t data_start= 0xffffffff;
|
||||
size_t buffer_size= 0, buffer_free= 0;
|
||||
char *msg= NULL;
|
||||
|
||||
|
@ -686,7 +694,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
|
|||
|
||||
ret= iso_write_opts_get_data_start(wopts, &data_start, 0);
|
||||
opts->data_start_lba= -1;
|
||||
if(ret > 0 && data_start <= 0x7FFFFFFF)
|
||||
if(ret > 0)
|
||||
opts->data_start_lba= data_start;
|
||||
|
||||
/* TODO check return values for failure. properly clean-up on error */
|
||||
|
@ -735,10 +743,11 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
|
|||
}
|
||||
|
||||
|
||||
/* API since 0.2.2 */
|
||||
int isoburn_prepare_blind_grow(struct burn_drive *d, struct burn_disc **disc,
|
||||
struct isoburn_imgen_opts *opts,
|
||||
struct burn_drive *out_drive, int nwa)
|
||||
/* API since 1.5.8 */
|
||||
int isoburn_prepare_blind_grow_v2(struct burn_drive *d,
|
||||
struct burn_disc **disc,
|
||||
struct isoburn_imgen_opts *opts,
|
||||
struct burn_drive *out_drive, off_t nwa)
|
||||
{
|
||||
int ret;
|
||||
struct isoburn *o= NULL;
|
||||
|
@ -760,6 +769,18 @@ int isoburn_prepare_blind_grow(struct burn_drive *d, struct burn_disc **disc,
|
|||
}
|
||||
|
||||
|
||||
/* API since 0.2.2 */
|
||||
int isoburn_prepare_blind_grow(struct burn_drive *d, struct burn_disc **disc,
|
||||
struct isoburn_imgen_opts *opts,
|
||||
struct burn_drive *out_drive, int nwa)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret= isoburn_prepare_blind_grow_v2(d, disc, opts, out_drive, (off_t) nwa);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
/* API @since 0.1.0
|
||||
@param flag bit0= this is a regular end, not an abort
|
||||
give up source reference
|
||||
|
@ -1204,6 +1225,8 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
|
|||
o->iso_mbr_part_type= -1;
|
||||
memset(o->gpt_guid, 0, 16);
|
||||
o->gpt_guid_mode= 0;
|
||||
o->max_ce_entries= 31; /* Linux hates >= RR_MAX_CE_ENTRIES = 32 */
|
||||
o->max_ce_entries_flag= 2; /* omit non-isofs fattr and ACL if needed */
|
||||
memset(o->hfsp_serial_number, 0, 8);
|
||||
o->hfsp_block_size= 0;
|
||||
o->apm_block_size= 0;
|
||||
|
@ -1493,20 +1516,57 @@ int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size)
|
|||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
|
||||
int isoburn_igopt_get_effective_lba_v2(struct isoburn_imgen_opts *o,
|
||||
off_t *lba)
|
||||
{
|
||||
*lba= o->effective_lba;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
|
||||
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
|
||||
{
|
||||
int ret;
|
||||
off_t long_lba;
|
||||
|
||||
ret= isoburn_igopt_get_effective_lba_v2(o, &long_lba);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
if(long_lba > 0x7fffffff) {
|
||||
*lba= 0x7fffffff;
|
||||
ret= 0;
|
||||
} else {
|
||||
*lba= long_lba;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_data_start_v2(struct isoburn_imgen_opts *o, off_t *lba)
|
||||
{
|
||||
*lba= o->data_start_lba;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
|
||||
{
|
||||
int ret;
|
||||
off_t long_lba;
|
||||
|
||||
ret= isoburn_igopt_get_data_start_v2(o, &long_lba);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
if(long_lba > 0x7fffffff) {
|
||||
*lba= 0x7fffffff;
|
||||
ret= 0;
|
||||
} else {
|
||||
*lba= long_lba;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
|
||||
char *timestamp, char *tag_written)
|
||||
{
|
||||
|
@ -1549,7 +1609,7 @@ int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *opts,
|
|||
}
|
||||
memcpy(opts->system_area_data, data, 32768);
|
||||
}
|
||||
opts->system_area_options = options & 0xffff;
|
||||
opts->system_area_options = options & 0x3ffff;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
@ -1937,6 +1997,32 @@ int isoburn_igopt_get_gpt_guid(struct isoburn_imgen_opts *opts,
|
|||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_max_ce_entries(struct isoburn_imgen_opts *opts,
|
||||
uint32_t num, int flag)
|
||||
{
|
||||
if(num > 100000) {
|
||||
isoburn_msgs_submit(NULL, 0x00060000,
|
||||
"Too many CE entries enabled for single file (max 100000)",
|
||||
0, "SORRY", 0);
|
||||
return(0);
|
||||
}
|
||||
if(num == 0)
|
||||
num= 1;
|
||||
opts->max_ce_entries= num;
|
||||
opts->max_ce_entries_flag= (flag & 15);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_max_ce_entries(struct isoburn_imgen_opts *opts,
|
||||
uint32_t *num, int *max_ce_flag)
|
||||
{
|
||||
*num= opts->max_ce_entries;
|
||||
*max_ce_flag= opts->max_ce_entries_flag;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_disc_label(struct isoburn_imgen_opts *opts, char *label)
|
||||
{
|
||||
strncpy(opts->ascii_disc_label, label, Libisoburn_disc_label_sizE - 1);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Class struct of libisoburn.
|
||||
|
||||
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
Copyright 2007 - 2020 Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright 2007 - 2024 Thomas Schmitt <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
*/
|
||||
|
@ -27,8 +27,8 @@
|
|||
struct isoburn_toc_entry {
|
||||
int session;
|
||||
int track_no; /* point */
|
||||
int start_lba;
|
||||
int track_blocks;
|
||||
off_t start_lba;
|
||||
off_t track_blocks;
|
||||
char *volid; /* For caching a volume id from emulated toc on overwritables */
|
||||
|
||||
struct isoburn_toc_entry *next;
|
||||
|
@ -82,26 +82,26 @@ struct isoburn {
|
|||
|
||||
/* If >= 0, this address is used as reply for isoburn_disc_get_msc1()
|
||||
*/
|
||||
int fabricated_msc1;
|
||||
off_t fabricated_msc1;
|
||||
|
||||
/* If >= 0, this address is used in isoburn_disc_track_lba_nwa()
|
||||
as reply parameter nwa.
|
||||
(The other nwa parameters below apply only to the effective write address
|
||||
on random access media. msc2 is handed to libisofs but not to libburn.)
|
||||
*/
|
||||
int fabricated_msc2;
|
||||
off_t fabricated_msc2;
|
||||
|
||||
|
||||
/* The nwa to be used for a first session on the present kind of overwritable
|
||||
media (usually Libisoburn_overwriteable_starT, but might be forced to 0)
|
||||
*/
|
||||
int zero_nwa;
|
||||
off_t zero_nwa;
|
||||
|
||||
/* Start address as given by image examination (bytes, not blocks) */
|
||||
off_t min_start_byte;
|
||||
|
||||
/* Aligned start address to be used for processing (counted in blocks) */
|
||||
int nwa;
|
||||
off_t nwa;
|
||||
|
||||
|
||||
/* Truncate to .nwa an eventual regular file serving as output drive */
|
||||
|
@ -142,7 +142,7 @@ struct isoburn {
|
|||
IsoImage *image;
|
||||
|
||||
/* The start LBA of the image */
|
||||
int image_start_lba;
|
||||
off_t image_start_lba;
|
||||
|
||||
/* The block data source from which the existing image is read.
|
||||
*/
|
||||
|
@ -256,7 +256,7 @@ int isoburn_set_start_byte(struct isoburn *o, off_t value, int flag);
|
|||
@return <=0 is failure , >0 success
|
||||
*/
|
||||
int isoburn_get_msc2(struct isoburn *o,
|
||||
struct burn_write_opts *opts, int *msc2, int flag);
|
||||
struct burn_write_opts *opts, off_t *msc2, int flag);
|
||||
|
||||
/** Get a data source suitable for read from a drive using burn_read_data()
|
||||
function.
|
||||
|
@ -629,14 +629,14 @@ struct isoburn_imgen_opts {
|
|||
If <0 : Invalid
|
||||
If >=0: Valid block number. Block size is always 2 KiB.
|
||||
*/
|
||||
int effective_lba;
|
||||
off_t effective_lba;
|
||||
|
||||
/** Output value: Block address of data section start as predicted by
|
||||
libisofs.
|
||||
If < 16: Invalid
|
||||
If >=16: Valid block number. Block size is always 2 KiB.
|
||||
*/
|
||||
int data_start_lba;
|
||||
off_t data_start_lba;
|
||||
|
||||
/**
|
||||
* If not empty: Parameters "name" and "timestamp" for a scdbackup stream
|
||||
|
@ -769,6 +769,9 @@ struct isoburn_imgen_opts {
|
|||
/* Whether to fsync() stdio_drives after isoburn_activate_session() */
|
||||
int do_fsync;
|
||||
|
||||
/* See libisoburn.h isoburn_igopt_set_max_ce_entries() */
|
||||
uint32_t max_ce_entries;
|
||||
int max_ce_entries_flag;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
libisofs related functions of libisoburn.
|
||||
|
||||
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
Copyright 2007 - 2020 Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright 2007 - 2024 Thomas Schmitt <scdbackup@gmx.net>
|
||||
Provided under GPL version 2 or later.
|
||||
*/
|
||||
|
||||
|
@ -87,6 +87,18 @@ uint32_t iso_read_lsb(const uint8_t *buf, int bytes)
|
|||
}
|
||||
|
||||
|
||||
static
|
||||
uint64_t iso_read_lsb64(const uint8_t *buf)
|
||||
{
|
||||
int i;
|
||||
uint64_t ret = 0;
|
||||
|
||||
for (i=0; i < 8; i++)
|
||||
ret += ((uint64_t) buf[i]) << (i * 8);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* API function. See libisoburn.h
|
||||
*/
|
||||
IsoImage *isoburn_get_attached_image(struct burn_drive *d)
|
||||
|
@ -106,7 +118,7 @@ IsoImage *isoburn_get_attached_image(struct burn_drive *d)
|
|||
|
||||
|
||||
/* API */
|
||||
int isoburn_get_attached_start_lba(struct burn_drive *d)
|
||||
off_t isoburn_get_attached_start_lba_v2(struct burn_drive *d)
|
||||
{
|
||||
int ret;
|
||||
struct isoburn *o= NULL;
|
||||
|
@ -120,6 +132,17 @@ int isoburn_get_attached_start_lba(struct burn_drive *d)
|
|||
}
|
||||
|
||||
|
||||
int isoburn_get_attached_start_lba(struct burn_drive *d)
|
||||
{
|
||||
off_t ret;
|
||||
|
||||
ret= isoburn_get_attached_start_lba_v2(d);
|
||||
if(ret >= 0 && ret <= 0x7fffffff)
|
||||
return((int) ret);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
static void isoburn_idle_free_function(void *ignored)
|
||||
{
|
||||
return;
|
||||
|
@ -137,16 +160,113 @@ int isoburn_root_defaults(IsoImage *image, int flag)
|
|||
}
|
||||
|
||||
|
||||
/* @return <=0 = error , 1 = ok , 2 = no ISO filesystem found
|
||||
*/
|
||||
int isoburn_make_iso_read_opts(struct burn_drive *d,
|
||||
struct isoburn *o,
|
||||
struct isoburn_read_opts *read_opts,
|
||||
IsoReadOpts **ropts)
|
||||
{
|
||||
int ret, int_num;
|
||||
off_t off_t_num, dummy;
|
||||
uint32_t ms_block;
|
||||
char *msg= NULL;
|
||||
|
||||
msg= calloc(1, 160);
|
||||
*ropts= NULL;
|
||||
|
||||
ret = isoburn_disc_get_msc1_v2(d, &off_t_num);
|
||||
if (ret <= 0)
|
||||
{ret= -2; goto ex;}
|
||||
if(off_t_num > 0xffffffff) {
|
||||
sprintf(msg, "Start address is outside 32 bit range.");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
ms_block= off_t_num;
|
||||
if (o != NULL)
|
||||
o->image_start_lba= ms_block;
|
||||
ret = isoburn_read_iso_head_v2(d, off_t_num, &dummy, NULL, 0);
|
||||
if (ret <= 0) {
|
||||
sprintf(msg, "No ISO 9660 image at LBA %lu.",
|
||||
(unsigned long int) ms_block);
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
|
||||
{ret= 2; goto ex;}
|
||||
}
|
||||
|
||||
if(read_opts->displacement != 0 && abs(read_opts->displacement_sign) == 1) {
|
||||
/* Apply reverse displacement to session start */
|
||||
if(read_opts->displacement_sign == -1) {
|
||||
if(ms_block+ read_opts->displacement < ms_block) {
|
||||
displacement_rollover:;
|
||||
sprintf(msg, "Displacement offset leads outside 32 bit range.");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
ms_block+= read_opts->displacement;
|
||||
} else {
|
||||
if(ms_block < read_opts->displacement)
|
||||
goto displacement_rollover;
|
||||
ms_block-= read_opts->displacement;
|
||||
}
|
||||
}
|
||||
|
||||
ret = iso_read_opts_new(ropts, 0);
|
||||
if (ret < 0) {
|
||||
isoburn_report_iso_error(ret, "Cannot create write opts", 0, "FATAL", 0);
|
||||
goto ex;
|
||||
}
|
||||
|
||||
iso_read_opts_set_start_block(*ropts, ms_block);
|
||||
iso_read_opts_set_no_rockridge(*ropts, read_opts->norock);
|
||||
iso_read_opts_set_no_aaip(*ropts, read_opts->noaaip);
|
||||
if(read_opts->nomd5 == 2)
|
||||
int_num= 2;
|
||||
else if(read_opts->nomd5 == 1)
|
||||
int_num= 1;
|
||||
else
|
||||
int_num= 0;
|
||||
iso_read_opts_set_no_md5(*ropts, int_num);
|
||||
if(read_opts->do_ecma119_map)
|
||||
iso_read_opts_set_ecma119_map(*ropts, read_opts->map_mode);
|
||||
if(read_opts->do_joliet_map)
|
||||
iso_read_opts_set_joliet_map(*ropts, read_opts->joliet_map_mode);
|
||||
iso_read_opts_set_new_inos(*ropts, read_opts->noino);
|
||||
|
||||
iso_read_opts_set_no_joliet(*ropts, read_opts->nojoliet);
|
||||
iso_read_opts_set_no_iso1999(*ropts, read_opts->noiso1999);
|
||||
iso_read_opts_set_preferjoliet(*ropts, read_opts->preferjoliet);
|
||||
iso_read_opts_set_default_permissions(*ropts,
|
||||
read_opts->mode, read_opts->dirmode);
|
||||
iso_read_opts_set_default_uid(*ropts, read_opts->uid);
|
||||
iso_read_opts_set_default_gid(*ropts, read_opts->gid);
|
||||
iso_read_opts_set_input_charset(*ropts, read_opts->input_charset);
|
||||
iso_read_opts_auto_input_charset(*ropts, read_opts->auto_input_charset);
|
||||
iso_read_opts_load_system_area(*ropts, 1);
|
||||
iso_read_opts_keep_import_src(*ropts, 1);
|
||||
|
||||
ret= 1;
|
||||
ex:;
|
||||
if(ret <= 0) {
|
||||
if(*ropts != NULL)
|
||||
iso_read_opts_free(*ropts);
|
||||
*ropts= NULL;
|
||||
}
|
||||
if(msg != NULL)
|
||||
free(msg);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
/* API function. See libisoburn.h
|
||||
*/
|
||||
int isoburn_read_image(struct burn_drive *d,
|
||||
struct isoburn_read_opts *read_opts,
|
||||
IsoImage **image)
|
||||
{
|
||||
int ret, int_num, dummy, ignore_aclea= 0;
|
||||
int ret, ignore_aclea= 0;
|
||||
IsoReadOpts *ropts= NULL;
|
||||
IsoReadImageFeatures *features= NULL;
|
||||
uint32_t ms_block;
|
||||
char *msg= NULL;
|
||||
enum burn_disc_status status= BURN_DISC_BLANK;
|
||||
IsoDataSource *ds= NULL;
|
||||
|
@ -223,73 +343,19 @@ create_blank_image:;
|
|||
{ret= -4; goto ex;}
|
||||
}
|
||||
|
||||
ret = isoburn_disc_get_msc1(d, &int_num);
|
||||
if (ret <= 0)
|
||||
{ret= -2; goto ex;}
|
||||
ms_block= int_num;
|
||||
if (o != NULL)
|
||||
o->image_start_lba= ms_block;
|
||||
ret = isoburn_read_iso_head(d, int_num, &dummy, NULL, 0);
|
||||
if (ret <= 0) {
|
||||
sprintf(msg, "No ISO 9660 image at LBA %d. Creating blank image.", int_num);
|
||||
|
||||
/* create the data source */
|
||||
ret= isoburn_make_iso_read_opts(d, o, read_opts, &ropts);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
if(ret == 2) {
|
||||
sprintf(msg, "Creating blank image.");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
|
||||
goto create_blank_image;
|
||||
}
|
||||
|
||||
if(read_opts->displacement != 0 && abs(read_opts->displacement_sign) == 1) {
|
||||
/* Apply reverse displacement to session start */
|
||||
if(read_opts->displacement_sign == -1) {
|
||||
if(ms_block+ read_opts->displacement < ms_block) {
|
||||
displacement_rollover:;
|
||||
sprintf(msg, "Displacement offset leads outside 32 bit range.");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
ms_block+= read_opts->displacement;
|
||||
} else {
|
||||
if(ms_block < read_opts->displacement)
|
||||
goto displacement_rollover;
|
||||
ms_block-= read_opts->displacement;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* create the data source */
|
||||
ret = iso_read_opts_new(&ropts, 0);
|
||||
if (ret < 0) {
|
||||
isoburn_report_iso_error(ret, "Cannot create write opts", 0, "FATAL", 0);
|
||||
goto ex;
|
||||
}
|
||||
|
||||
/* Important: do not return until iso_read_opts_free() */
|
||||
|
||||
iso_read_opts_set_start_block(ropts, ms_block);
|
||||
iso_read_opts_set_no_rockridge(ropts, read_opts->norock);
|
||||
iso_read_opts_set_no_aaip(ropts, read_opts->noaaip);
|
||||
if(read_opts->nomd5 == 2)
|
||||
int_num= 2;
|
||||
else if(read_opts->nomd5 == 1)
|
||||
int_num= 1;
|
||||
else
|
||||
int_num= 0;
|
||||
iso_read_opts_set_no_md5(ropts, int_num);
|
||||
if(read_opts->do_ecma119_map)
|
||||
iso_read_opts_set_ecma119_map(ropts, read_opts->map_mode);
|
||||
if(read_opts->do_joliet_map)
|
||||
iso_read_opts_set_joliet_map(ropts, read_opts->joliet_map_mode);
|
||||
iso_read_opts_set_new_inos(ropts, read_opts->noino);
|
||||
|
||||
iso_read_opts_set_no_joliet(ropts, read_opts->nojoliet);
|
||||
iso_read_opts_set_no_iso1999(ropts, read_opts->noiso1999);
|
||||
iso_read_opts_set_preferjoliet(ropts, read_opts->preferjoliet);
|
||||
iso_read_opts_set_default_permissions(ropts,
|
||||
read_opts->mode, read_opts->dirmode);
|
||||
iso_read_opts_set_default_uid(ropts, read_opts->uid);
|
||||
iso_read_opts_set_default_gid(ropts, read_opts->gid);
|
||||
iso_read_opts_set_input_charset(ropts, read_opts->input_charset);
|
||||
iso_read_opts_auto_input_charset(ropts, read_opts->auto_input_charset);
|
||||
iso_read_opts_load_system_area(ropts, 1);
|
||||
iso_read_opts_keep_import_src(ropts, 1);
|
||||
ret= iso_image_set_truncate_mode(o->image, read_opts->truncate_mode,
|
||||
read_opts->truncate_length);
|
||||
if(ret < 0)
|
||||
|
@ -346,6 +412,170 @@ ex:;
|
|||
}
|
||||
|
||||
|
||||
/* API function. See libisoburn.h
|
||||
*/
|
||||
int isoburn_assess_written_features(struct burn_drive *d,
|
||||
struct isoburn_read_opts *read_opts,
|
||||
IsoReadImageFeatures **features,
|
||||
struct isoburn_imgen_opts **imgen_opts,
|
||||
int flag)
|
||||
{
|
||||
int ret, type, ext;
|
||||
int64_t num_value;
|
||||
void *pt_value;
|
||||
size_t pt_size;
|
||||
IsoReadOpts *ropts= NULL;
|
||||
char *msg= NULL;
|
||||
enum burn_disc_status status= BURN_DISC_BLANK;
|
||||
IsoDataSource *ds= NULL;
|
||||
struct isoburn *o= NULL;
|
||||
IsoWriteOpts *write_opts= NULL;
|
||||
|
||||
msg= calloc(1, 160);
|
||||
|
||||
if(d != NULL) {
|
||||
ret = isoburn_find_emulator(&o, d, 0);
|
||||
if (ret < 0 || o == NULL)
|
||||
{ret= 0; goto ex;}
|
||||
status = isoburn_disc_get_status(d);
|
||||
o->image_start_lba= -1;
|
||||
}
|
||||
if(read_opts==NULL) {
|
||||
isoburn_msgs_submit(o, 0x00060000,
|
||||
"Program error: isoburn_read_image: read_opts==NULL",
|
||||
0, "FATAL", 0);
|
||||
{ret= -1; goto ex;}
|
||||
}
|
||||
if (d == NULL || read_opts->pretend_blank ||
|
||||
(status != BURN_DISC_APPENDABLE && status != BURN_DISC_FULL)) {
|
||||
isoburn_msgs_submit(o, 0x00060000,
|
||||
"Empty drive, unsuitable medium state, or read option 'pretend_blank'",
|
||||
0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
|
||||
ret= isoburn_make_iso_read_opts(d, o, read_opts, &ropts);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
if(ret == 2)
|
||||
{ret= 0; goto ex;}
|
||||
|
||||
/* ??? Only if o->iso_data_source == NULL ? */
|
||||
ds = isoburn_data_source_new(d, read_opts->displacement,
|
||||
read_opts->displacement_sign,
|
||||
read_opts->cache_tiles, read_opts->cache_tile_blocks);
|
||||
if (ds == NULL) {
|
||||
isoburn_report_iso_error(ret, "Cannot create IsoDataSource object", 0,
|
||||
"FATAL", 0);
|
||||
ret= -1; goto ex;
|
||||
}
|
||||
if(o->iso_data_source != NULL)
|
||||
iso_data_source_unref(o->iso_data_source);
|
||||
o->iso_data_source= ds;
|
||||
|
||||
ret= iso_assess_written_features(ds, ropts, features, &write_opts);
|
||||
if(ret < 0) {
|
||||
isoburn_report_iso_error(ret, "Failed to assess ISO filesystem features",
|
||||
0, "FAILURE", 0);
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
|
||||
ret= isoburn_igopt_new(imgen_opts, 0);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
|
||||
/* Convert features to imgen_opts */
|
||||
|
||||
if(iso_read_image_feature_named(*features, "iso_level", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
isoburn_igopt_set_level(*imgen_opts, num_value);
|
||||
ext= 0;
|
||||
if(iso_read_image_feature_named(*features, "rock_ridge", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_rockridge * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "joliet", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_joliet * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "iso1999", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_iso1999 * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "aaip", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_aaip * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "record_md5_session", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_session_md5 * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "record_md5_files", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_file_md5 * !!num_value;
|
||||
isoburn_igopt_set_extensions(*imgen_opts, ext);
|
||||
|
||||
ext= 0;
|
||||
if(iso_read_image_feature_named(*features, "omit_version_numbers", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1) {
|
||||
if((num_value & 3) == 2)
|
||||
ext|= isoburn_igopt_only_iso_versions;
|
||||
else if(num_value & 3)
|
||||
ext|= isoburn_igopt_omit_version_numbers;
|
||||
}
|
||||
if(iso_read_image_feature_named(*features, "allow_deep_paths", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_allow_deep_paths * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "allow_longer_paths", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_allow_longer_paths * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "max_37_char_filenames", NULL,
|
||||
&type, &num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_max_37_char_filenames * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "no_force_dots", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1) {
|
||||
if(num_value & 1)
|
||||
ext|= isoburn_igopt_only_iso_versions;
|
||||
if(num_value & 2)
|
||||
ext|= isoburn_igopt_no_force_dots;
|
||||
}
|
||||
if(iso_read_image_feature_named(*features, "allow_lowercase", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_allow_lowercase * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "allow_full_ascii", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_allow_full_ascii * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "joliet_longer_paths", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_joliet_longer_paths * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "rrip_version_1_10", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_rrip_version_1_10 * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "aaip_susp_1_10", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_aaip_susp_1_10 * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "allow_dir_id_ext", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_allow_dir_id_ext * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "joliet_long_names", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_joliet_long_names * !!num_value;
|
||||
if(iso_read_image_feature_named(*features, "joliet_utf16", NULL, &type,
|
||||
&num_value, &pt_value, &pt_size) == 1)
|
||||
ext|= isoburn_igopt_joliet_utf16 * !!num_value;
|
||||
isoburn_igopt_set_relaxed(*imgen_opts, ext);
|
||||
|
||||
if(iso_read_image_feature_named(*features, "untranslated_name_len", NULL,
|
||||
&type, &num_value, &pt_value, &pt_size) == 1)
|
||||
isoburn_igopt_set_untranslated_name_len(*imgen_opts, num_value);
|
||||
|
||||
ret= 1;
|
||||
ex:;
|
||||
if(msg != NULL)
|
||||
free(msg);
|
||||
if(ropts != NULL)
|
||||
iso_read_opts_free(ropts);
|
||||
if(write_opts != NULL)
|
||||
iso_write_opts_free(write_opts);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
/* API function. See libisoburn.h
|
||||
*/
|
||||
int isoburn_attach_image(struct burn_drive *d, IsoImage *image)
|
||||
|
@ -371,7 +601,7 @@ int isoburn_attach_image(struct burn_drive *d, IsoImage *image)
|
|||
|
||||
|
||||
/* API */
|
||||
int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag)
|
||||
int isoburn_attach_start_lba_v2(struct burn_drive *d, off_t lba, int flag)
|
||||
{
|
||||
int ret;
|
||||
struct isoburn *o;
|
||||
|
@ -388,6 +618,14 @@ int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag)
|
|||
}
|
||||
|
||||
|
||||
int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret= isoburn_attach_start_lba_v2(d, (off_t) lba, flag);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/* API function. See libisoburn.h
|
||||
*/
|
||||
int isoburn_activate_session(struct burn_drive *drive)
|
||||
|
@ -440,6 +678,42 @@ int isoburn_get_img_partition_offset(struct burn_drive *drive,
|
|||
}
|
||||
|
||||
|
||||
/* Try to read partition start and size block number from given GPT entry */
|
||||
int isoburn_get_gpt_entry(struct isoburn *o, int partno,
|
||||
uint64_t *start_lba, uint64_t *size, int flag)
|
||||
{
|
||||
uint32_t part_start, entry_count, entry_size, part_lba, end_lba;
|
||||
uint8_t *gpt, *part;
|
||||
|
||||
|
||||
/* Check for GPT header block */
|
||||
gpt = o->target_iso_head + 512;
|
||||
if(memcmp(gpt, "EFI PART", 8) != 0)
|
||||
return(0);
|
||||
if(gpt[8] != 0x00 || gpt[9] != 0x00 || gpt[10] != 0x01 || gpt[11] != 0x00)
|
||||
return(0);
|
||||
part_start = iso_read_lsb64(gpt + 72);
|
||||
entry_count = iso_read_lsb64(gpt + 80);
|
||||
entry_size = iso_read_lsb64(gpt + 84);
|
||||
|
||||
/* Read partition entry */
|
||||
if(partno < 1)
|
||||
return(0);
|
||||
if(((uint64_t) partno) > entry_count)
|
||||
return(0);
|
||||
if(part_start * 512 + partno * entry_size > 32768)
|
||||
return(0);
|
||||
part = o->target_iso_head + part_start * 512 + (partno - 1) * entry_size;
|
||||
part_lba = iso_read_lsb64(part + 32);
|
||||
end_lba = iso_read_lsb64(part + 40);
|
||||
if(end_lba < part_lba)
|
||||
return(0);
|
||||
*start_lba = part_lba;
|
||||
*size = end_lba - part_lba + 1;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/* Check for MBR signature and a first partition that starts at a 2k block
|
||||
and ends where the image ends.
|
||||
If not too large or too small, accept its start as partition offset.
|
||||
|
@ -449,6 +723,7 @@ static int isoburn_inspect_partition(struct isoburn *o, uint32_t img_size,
|
|||
{
|
||||
uint8_t *mbr, *part, *buf= NULL;
|
||||
uint32_t offst, numsec;
|
||||
uint64_t gpt_start_lba, gpt_size;
|
||||
struct ecma119_pri_vol_desc *pvm;
|
||||
off_t data_count;
|
||||
int ret;
|
||||
|
@ -471,9 +746,20 @@ static int isoburn_inspect_partition(struct isoburn *o, uint32_t img_size,
|
|||
if(part[1] == 0 && part[2] == 0 && part[3] == 0)
|
||||
{ret= 2; goto ex;} /* Zero C/H/S start address */
|
||||
|
||||
/* Does it match the normal ISO image ? */
|
||||
offst= iso_read_lsb(part + 8, 4);
|
||||
numsec= iso_read_lsb(part + 12, 4);
|
||||
|
||||
/* Is it GPT ? */
|
||||
if(part[4] == 0xee && offst == 1) {
|
||||
ret= isoburn_get_gpt_entry(o, 1, &gpt_start_lba, &gpt_size, 0);
|
||||
if(ret > 0 && gpt_start_lba < ((uint64_t) 1) << 32 &&
|
||||
gpt_size < ((uint64_t) 1) << 32) {
|
||||
offst= gpt_start_lba;
|
||||
numsec= gpt_size;
|
||||
}
|
||||
}
|
||||
|
||||
/* Does it match the normal ISO image ? */
|
||||
if(offst < 64)
|
||||
{ret= 2; goto ex;} /* Zero or unusably small partition start */
|
||||
if((offst % 4) || (numsec % 4))
|
||||
|
@ -536,7 +822,8 @@ ex:;
|
|||
*/
|
||||
int isoburn_start_emulation(struct isoburn *o, int flag)
|
||||
{
|
||||
int ret, i, capacity = -1, role, dummy;
|
||||
int ret, i, role;
|
||||
off_t capacity = -1, dummy;
|
||||
off_t data_count, to_read;
|
||||
struct burn_drive *drive;
|
||||
struct ecma119_pri_vol_desc *pvm;
|
||||
|
@ -564,13 +851,13 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
|
|||
The data there point to the most recent session.
|
||||
*/
|
||||
role = burn_drive_get_drive_role(drive);
|
||||
ret = burn_get_read_capacity(drive, &capacity, 0);
|
||||
ret = burn_get_read_capacity_v2(drive, &capacity, 0);
|
||||
if (ret <= 0)
|
||||
capacity = -1;
|
||||
if (role == 5) { /* random access write-only medium */
|
||||
s = burn_disc_get_status(drive);
|
||||
o->fabricated_disc_status= s;
|
||||
burn_disc_track_lba_nwa(drive, NULL, 0, &dummy, &(o->nwa));
|
||||
burn_disc_track_lba_nwa_v2(drive, NULL, 0, &dummy, &(o->nwa));
|
||||
if(o->nwa < o->zero_nwa)
|
||||
o->zero_nwa= 0;
|
||||
{ret= 1; goto ex;}
|
||||
|
@ -579,8 +866,8 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
|
|||
size. Try to read anyway. */
|
||||
to_read = o->target_iso_head_size;
|
||||
memset(o->target_iso_head, 0, to_read);
|
||||
if(capacity > 0 && (off_t) capacity * (off_t) 2048 < to_read)
|
||||
to_read = (off_t) capacity * (off_t) 2048;
|
||||
if(capacity > 0 && capacity * (off_t) 2048 < to_read)
|
||||
to_read = capacity * (off_t) 2048;
|
||||
ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head,
|
||||
to_read, &data_count, 32 | 8);
|
||||
if (ret <= 0) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
Lower level API definition of libisoburn.
|
||||
|
||||
Copyright 2007-2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
Copyright 2007-2021 Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright 2007-2024 Thomas Schmitt <scdbackup@gmx.net>
|
||||
Provided under GPL version 2 or later.
|
||||
*/
|
||||
|
||||
|
@ -173,6 +173,8 @@ This can be achieved either:
|
|||
|
||||
/* Important: If you add a public API function then add its name to file
|
||||
libisoburn/libisoburn.ver
|
||||
in the node LIBISOBURN1_Major.Minor.Micro with the numbers of
|
||||
the next release version.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -237,8 +239,6 @@ int isoburn_is_compatible(int major, int minor, int micro, int flag);
|
|||
So micro revisions {1,3,5,7,9} should never be used for
|
||||
dynamic linking unless the proper library match can be
|
||||
guaranteed by external circumstances.
|
||||
|
||||
@return 1 success, <=0 might in future become an error indication
|
||||
*/
|
||||
void isoburn_version(int *major, int *minor, int *micro);
|
||||
|
||||
|
@ -249,7 +249,7 @@ void isoburn_version(int *major, int *minor, int *micro);
|
|||
*/
|
||||
#define isoburn_libisofs_req_major 1
|
||||
#define isoburn_libisofs_req_minor 5
|
||||
#define isoburn_libisofs_req_micro 4
|
||||
#define isoburn_libisofs_req_micro 6
|
||||
|
||||
/** The minimum version of libburn to be used with this version of libisoburn
|
||||
at compile time.
|
||||
|
@ -257,7 +257,7 @@ void isoburn_version(int *major, int *minor, int *micro);
|
|||
*/
|
||||
#define isoburn_libburn_req_major 1
|
||||
#define isoburn_libburn_req_minor 5
|
||||
#define isoburn_libburn_req_micro 4
|
||||
#define isoburn_libburn_req_micro 7
|
||||
|
||||
/** The minimum compile time requirements of libisoburn towards libjte are
|
||||
the same as of a suitable libisofs towards libjte.
|
||||
|
@ -312,7 +312,7 @@ int isoburn_libburn_req(int *major, int *minor, int *micro);
|
|||
*/
|
||||
#define isoburn_header_version_major 1
|
||||
#define isoburn_header_version_minor 5
|
||||
#define isoburn_header_version_micro 4
|
||||
#define isoburn_header_version_micro 7
|
||||
/** Note:
|
||||
Above version numbers are also recorded in configure.ac because libtool
|
||||
wants them as parameters at build time.
|
||||
|
@ -615,6 +615,11 @@ struct isoburn_toc_disc *isoburn_toc_drive_get_disc(struct burn_drive *d);
|
|||
*/
|
||||
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc);
|
||||
|
||||
/** Like isoburn_toc_disc_get_sectors(), but with off_t return value.
|
||||
@since 1.5.8
|
||||
*/
|
||||
off_t isoburn_toc_disc_get_sectors_v2(struct isoburn_toc_disc *disc);
|
||||
|
||||
|
||||
/** Get the array of session handles and the number of complete sessions
|
||||
from the table of content.
|
||||
|
@ -649,6 +654,11 @@ int isoburn_toc_disc_get_incmpl_sess(struct isoburn_toc_disc *disc);
|
|||
*/
|
||||
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s);
|
||||
|
||||
/** Like isoburn_toc_session_get_sectors(), but with off_t return value.
|
||||
@since 1.5.8
|
||||
*/
|
||||
off_t isoburn_toc_session_get_sectors_v2(struct isoburn_toc_session *s);
|
||||
|
||||
|
||||
/** Obtain a copy of the entry which describes the end of a particular session.
|
||||
Wrapper for: burn_session_get_leadout_entry()
|
||||
|
@ -701,6 +711,12 @@ void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
|
|||
int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
|
||||
int *image_blocks, char volid[33], int flag);
|
||||
|
||||
/** Like isoburn_toc_track_get_emul() but with off_t reply type.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_toc_track_get_emul_v2(struct isoburn_toc_track *t,
|
||||
off_t *start_lba, off_t *image_blocks,
|
||||
char volid[33], int flag);
|
||||
|
||||
|
||||
/** Release the memory associated with a master handle of a medium.
|
||||
|
@ -725,6 +741,9 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
|
|||
1= copy volume id to info (info needs 33 bytes)
|
||||
2= @since 0.2.2 :
|
||||
copy 64 kB header to info (needs 65536 bytes)
|
||||
bit12= @since 1.5.6 :
|
||||
Read even if the start of multi-session emulation
|
||||
yielded a read error
|
||||
bit13= @since 0.2.2:
|
||||
Do not read head from medium but use first 64 kB from
|
||||
info.
|
||||
|
@ -737,6 +756,12 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
|
|||
int isoburn_read_iso_head(struct burn_drive *d, int lba,
|
||||
int *image_blocks, char *info, int flag);
|
||||
|
||||
/** Like isoburn_read_iso_head() but with off_t block address and count.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_read_iso_head_v2(struct burn_drive *d, off_t lba,
|
||||
off_t *image_blocks, char *info, int flag);
|
||||
|
||||
|
||||
/** Try to convert the given entity address into various entity addresses
|
||||
which would describe it.
|
||||
|
@ -766,6 +791,14 @@ int isoburn_get_mount_params(struct burn_drive *d,
|
|||
int *lba, int *track, int *session,
|
||||
char volid[33], int flag);
|
||||
|
||||
/** Like isoburn_get_mount_params() but with off_t block address type.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_get_mount_params_v2(struct burn_drive *d,
|
||||
int adr_mode, char *adr_value,
|
||||
off_t *lba, int *track, int *session,
|
||||
char volid[33], int flag);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/*
|
||||
|
@ -1310,7 +1343,7 @@ int isoburn_igopt_get_extensions(struct isoburn_imgen_opts *o, int *ext);
|
|||
prefixed ES fields. This saves 5 to 10 bytes per file and
|
||||
might avoid problems with readers which only accept RRIP.
|
||||
SUSP-1.10 allows it, SUSP-1.12 frowns on it.
|
||||
bit12= only_iso_numbers
|
||||
bit12= only_iso_versions
|
||||
Same as bit1 omit_version_number but restricted to the names
|
||||
in the eventual Joliet tree.
|
||||
@since 0.5.4
|
||||
|
@ -1542,6 +1575,12 @@ int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size);
|
|||
*/
|
||||
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
|
||||
|
||||
/** Like isoburn_igopt_get_effective_lba(), but with off_t block addresses.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_igopt_get_effective_lba_v2(struct isoburn_imgen_opts *o,
|
||||
off_t *lba);
|
||||
|
||||
|
||||
/** Obtain after image preparation the lowest block address of file content
|
||||
data. Failure can occur if libisofs is too old to provide this information,
|
||||
|
@ -1556,6 +1595,11 @@ int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
|
|||
*/
|
||||
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba);
|
||||
|
||||
/** Like isoburn_igopt_get_data_start(), but with off_t block addresses.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_igopt_get_data_start_v2(struct isoburn_imgen_opts *o, off_t *lba);
|
||||
|
||||
|
||||
/** Set or get parameters "name" and "timestamp" for a scdbackup checksum
|
||||
tag. It will be appended to the libisofs session tag if the image starts at
|
||||
|
@ -1585,8 +1629,10 @@ int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
|
|||
/** Attach 32 kB of binary data which shall get written to the first 32 kB
|
||||
of the ISO image, the System Area.
|
||||
options can cause manipulations of these data before writing happens.
|
||||
If system area data are giveni or options bit0 is set, then bit1 of
|
||||
If system area data are given or options bit0 is set, then bit1 of
|
||||
el_torito_set_isolinux_options() is automatically disabled.
|
||||
(For the meaning of options see also in libisofs.h
|
||||
iso_write_opts_set_system_area() parameter "options".)
|
||||
@since 0.5.4
|
||||
@param o The option set to work on
|
||||
@param data Either NULL or 32 kB of data. Do not submit less bytes !
|
||||
|
@ -1655,6 +1701,20 @@ int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
|
|||
Little-endian 8-byte.
|
||||
Should be combined with options bit0.
|
||||
Will not be in effect if options bit1 is set.
|
||||
bit15= Only with System area type MBR but not with CHRP
|
||||
@since 1.4.4
|
||||
Enforce MBR "bootable/active" flag. In worst case by
|
||||
dummy partition of type 0x00 which occupies block 0.
|
||||
bit16= "Legacy BIOS bootable" in GPT
|
||||
@since 1.5.6
|
||||
If this bit is set and a GPT partition for the
|
||||
ISO 9660 filesystem gets written, then set the GPT
|
||||
partition flags bit 2 "Legacy BIOS bootable".
|
||||
bit17= ISO not read-only
|
||||
@since 1.5.6
|
||||
Do not set GPT partition flag bit 60 "read-only" for
|
||||
the ISO 9660 filesystem partition, if such a
|
||||
partition gets written.
|
||||
@return 1 success, 0 no data to get, <0 failure
|
||||
*/
|
||||
int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *o,
|
||||
|
@ -1987,7 +2047,7 @@ int isoburn_igopt_set_part_type_guid(struct isoburn_imgen_opts *opts,
|
|||
The option set to be inquired.
|
||||
@param num_entries
|
||||
Number of array elements in part_flags[].
|
||||
@param type_guids
|
||||
@param guids
|
||||
The array elements 0 to num_entries - 1 will get filled by the
|
||||
16 flag bits of the images of the corresponding partition.
|
||||
@param valids
|
||||
|
@ -2167,6 +2227,48 @@ int isoburn_igopt_set_gpt_guid(struct isoburn_imgen_opts *opts,
|
|||
int isoburn_igopt_get_gpt_guid(struct isoburn_imgen_opts *opts,
|
||||
uint8_t guid[16], int *mode);
|
||||
|
||||
/** Set the maximum number of SUSP CE entries and thus continuation areas.
|
||||
Each continuation area can hold at most 2048 bytes of SUSP data (Rock Ridge
|
||||
or AAIP). The first area can be smaller. There might be some waste at the
|
||||
end of each area.
|
||||
When the maximum number is exceeded during ISO filesystem production
|
||||
then possibly xattr and ACL get removed or error ISO_TOO_MANY_CE gets
|
||||
reported and filesystem production is prevented.
|
||||
Files with 32 or more CE entries do not show up in mounted filesystems on
|
||||
Linux. So the default setting is 31 with drop mode 2. If a higher limit is
|
||||
chosen and 31 gets surpassed, then a warning message gets reported.
|
||||
@since 1.5.6
|
||||
@param opts
|
||||
The option set to be inquired.
|
||||
@param num
|
||||
The maximum number of CE entries per file.
|
||||
Not more than 100000 may be set here.
|
||||
0 gets silently mapped to 1,because the root directory needs one CE.
|
||||
@param flag
|
||||
bit0-bit3 = Drop mode: What to do with AAIP data on too many CE:
|
||||
0 = throw ISO_TOO_MANY_CE, without dropping anything
|
||||
1 = permanently drop non-isofs fattr from IsoNode and
|
||||
retry filesystem production
|
||||
2 = drop ACL if dropping non-isofs fattr does not suffice
|
||||
@return
|
||||
<=0 = error, 1 = success
|
||||
*/
|
||||
int isoburn_igopt_set_max_ce_entries(struct isoburn_imgen_opts *opts,
|
||||
uint32_t num, int flag);
|
||||
|
||||
/** Inquire the current setting of isoburn_igopt_().
|
||||
@since 1.5.6
|
||||
@param opts
|
||||
The option set to be inquired.
|
||||
@param num
|
||||
Returns the current setting
|
||||
@param max_ce_flag
|
||||
Returns the current flag setting
|
||||
@return
|
||||
<=0 = error, 1 = success
|
||||
*/
|
||||
int isoburn_igopt_get_max_ce_entries(struct isoburn_imgen_opts *opts,
|
||||
uint32_t *num, int *max_ce_flag);
|
||||
|
||||
/** Set a name for the system area. This setting is ignored unless system area
|
||||
type 3 "SUN Disk Label" is in effect by iso_write_opts_set_system_area().
|
||||
|
@ -2329,13 +2431,13 @@ int isoburn_igopt_get_stdio_endsync(struct isoburn_imgen_opts *opts,
|
|||
@param flag
|
||||
Bitfield for control purposes.
|
||||
bit0-bit7= Name space
|
||||
0= generic (to_charset is valid,
|
||||
0= generic (out_charset is valid,
|
||||
no reserved characters, no length limits)
|
||||
1= Rock Ridge (to_charset is valid)
|
||||
2= Joliet (to_charset gets overridden by UCS-2 or UTF-16)
|
||||
3= ECMA-119 (to_charset gets overridden by the
|
||||
1= Rock Ridge (out_charset is valid)
|
||||
2= Joliet (out_charset gets overridden by UCS-2 or UTF-16)
|
||||
3= ECMA-119 (out_charset gets overridden by the
|
||||
dull ISO 9660 subset of ASCII)
|
||||
4= HFS+ (to_charset gets overridden by UTF-16BE)
|
||||
4= HFS+ (out_charset gets overridden by UTF-16BE)
|
||||
bit8= Treat input text as directory name
|
||||
(matters for Joliet and ECMA-119)
|
||||
bit9= Do not issue error messages
|
||||
|
@ -2366,6 +2468,11 @@ IsoImage *isoburn_get_attached_image(struct burn_drive *d);
|
|||
*/
|
||||
int isoburn_get_attached_start_lba(struct burn_drive *d);
|
||||
|
||||
/** Like isoburn_get_attached_start_lba(), but with off_t return value.
|
||||
@since 1.5.8
|
||||
*/
|
||||
off_t isoburn_get_attached_start_lba_v2(struct burn_drive *d);
|
||||
|
||||
|
||||
/** Load the ISO filesystem directory tree from the medium in the given drive.
|
||||
This will give libisoburn the base on which it can let libisofs perform
|
||||
|
@ -2431,6 +2538,30 @@ int isoburn_set_read_pacifier(struct burn_drive *drive,
|
|||
int isoburn_get_img_partition_offset(struct burn_drive *drive,
|
||||
uint32_t *block_offset_2k);
|
||||
|
||||
/** Assess features of the importable directory trees and an estimation of the
|
||||
write options which would cause the recognized features.
|
||||
@since 1.5.6
|
||||
@param d The drive with the ISO filesystem
|
||||
@param read_opts The read options which would be used by
|
||||
isoburn_read_image()
|
||||
@param features Returned information which may be inquired by
|
||||
iso_read_image_features_*() or by
|
||||
iso_read_image_feature_named().
|
||||
Dispose by iso_read_image_features_destroy() when
|
||||
no longer needed.
|
||||
@param imgen_opts Returned set of write options which were derived
|
||||
from the features.
|
||||
Dispose by isoburn_igopt_destroy when no longer
|
||||
needed.
|
||||
@param flag Bitfield for control purposes, submit 0 for now.
|
||||
@return 1= success, <= 0 = error
|
||||
*/
|
||||
int isoburn_assess_written_features(struct burn_drive *d,
|
||||
struct isoburn_read_opts *read_opts,
|
||||
IsoReadImageFeatures **features,
|
||||
struct isoburn_imgen_opts **imgen_opts,
|
||||
int flag);
|
||||
|
||||
|
||||
/** Set the IsoImage to be used with a drive. This eventually releases
|
||||
the reference to the old IsoImage attached to the drive.
|
||||
|
@ -2461,6 +2592,11 @@ int isoburn_attach_image(struct burn_drive *d, IsoImage *image);
|
|||
*/
|
||||
int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag);
|
||||
|
||||
/** Like isoburn_attach_start_lba(), but with off_t result value.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_attach_start_lba_v2(struct burn_drive *d, off_t lba, int flag);
|
||||
|
||||
|
||||
/** Return the best possible estimation of the currently available capacity of
|
||||
the medium. This might depend on particular write option settings and on
|
||||
|
@ -2494,6 +2630,11 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
|
|||
*/
|
||||
int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba);
|
||||
|
||||
/** Like isoburn_disc_get_msc1(), but with off_t result value.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_disc_get_msc1_v2(struct burn_drive *d, off_t *start_lba);
|
||||
|
||||
|
||||
/** Use this with trackno==0 to obtain the predicted start block number of the
|
||||
new session. The interesting number is returned in parameter nwa.
|
||||
|
@ -2509,6 +2650,13 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba);
|
|||
int isoburn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
|
||||
int trackno, int *lba, int *nwa);
|
||||
|
||||
/** Like isoburn_disc_track_lba_nwa(), but with off_t result value.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_disc_track_lba_nwa_v2(struct burn_drive *d,
|
||||
struct burn_write_opts *o,
|
||||
int trackno, off_t *lba, off_t *nwa);
|
||||
|
||||
|
||||
/** Obtain the size which was attributed to an emulated appendable on actually
|
||||
overwritable media. This value is supposed to be <= 2048 * nwa as of
|
||||
|
@ -2620,6 +2768,14 @@ int isoburn_prepare_blind_grow(struct burn_drive *in_drive,
|
|||
struct isoburn_imgen_opts *opts,
|
||||
struct burn_drive *out_drive, int nwa);
|
||||
|
||||
/** Like isoburn_prepare_blind_grow(), but with off_t nwa value.
|
||||
@since 1.5.8
|
||||
*/
|
||||
int isoburn_prepare_blind_grow_v2(struct burn_drive *in_drive,
|
||||
struct burn_disc **disc,
|
||||
struct isoburn_imgen_opts *opts,
|
||||
struct burn_drive *out_drive, off_t nwa);
|
||||
|
||||
|
||||
/**
|
||||
Revoke isoburn_prepare_*() instead of running isoburn_disc_write().
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
LIBISOBURN1 {
|
||||
global:
|
||||
isoburn_activate_session;
|
||||
isoburn_assess_written_features;
|
||||
isoburn_attach_image;
|
||||
isoburn_attach_start_lba;
|
||||
isoburn_conv_name_chars;
|
||||
|
@ -42,6 +43,7 @@ isoburn_igopt_get_hfsp_serial_number;
|
|||
isoburn_igopt_get_iso_mbr_part_type;
|
||||
isoburn_igopt_get_iso_type_guid;
|
||||
isoburn_igopt_get_level;
|
||||
isoburn_igopt_get_max_ce_entries;
|
||||
isoburn_igopt_get_out_charset;
|
||||
isoburn_igopt_get_over_mode;
|
||||
isoburn_igopt_get_over_ugid;
|
||||
|
@ -73,6 +75,7 @@ isoburn_igopt_set_hfsp_serial_number;
|
|||
isoburn_igopt_set_iso_mbr_part_type;
|
||||
isoburn_igopt_set_iso_type_guid;
|
||||
isoburn_igopt_set_level;
|
||||
isoburn_igopt_set_max_ce_entries;
|
||||
isoburn_igopt_set_out_charset;
|
||||
isoburn_igopt_set_over_mode;
|
||||
isoburn_igopt_set_over_ugid;
|
||||
|
@ -172,6 +175,7 @@ Xorriso_option_application_id;
|
|||
Xorriso_option_application_use;
|
||||
Xorriso_option_as;
|
||||
Xorriso_option_assert_volid;
|
||||
Xorriso_option_assess_indev_features;
|
||||
Xorriso_option_auto_charset;
|
||||
Xorriso_option_backslash_codes;
|
||||
Xorriso_option_ban_stdio_write;
|
||||
|
@ -359,3 +363,18 @@ Xorriso_stop_msg_watcher;
|
|||
local: *;
|
||||
};
|
||||
|
||||
LIBISOBURN1_1.5.8 {
|
||||
isoburn_attach_start_lba_v2;
|
||||
isoburn_disc_get_msc1_v2;
|
||||
isoburn_disc_track_lba_nwa_v2;
|
||||
isoburn_get_attached_start_lba_v2;
|
||||
isoburn_get_mount_params_v2;
|
||||
isoburn_igopt_get_data_start_v2;
|
||||
isoburn_igopt_get_effective_lba_v2;
|
||||
isoburn_prepare_blind_grow_v2;
|
||||
isoburn_read_iso_head_v2;
|
||||
isoburn_toc_disc_get_sectors_v2;
|
||||
isoburn_toc_session_get_sectors_v2;
|
||||
isoburn_toc_track_get_emul_v2;
|
||||
} LIBISOBURN1;
|
||||
|
||||
|
|
|
@ -141,8 +141,9 @@ All general options are accepted.
|
|||
./auto_cxx
|
||||
Not included in GNU xorriso.
|
||||
Exercises inclusion of xorriso/xorriso.h and libisoburn/libisoburn.h
|
||||
in C++ programs and linking of the libraries. It might be necessary
|
||||
to set compiler options by shell variable CFLAGS before running the test.
|
||||
in C++ programs and linking of the libraries. It is possible to override the
|
||||
use of g++ as compiler by shell variable CC. It might be necessary to set
|
||||
compiler options by shell variable CFLAGS before running the test.
|
||||
It might be necessary to hand over the install directory of libburn and
|
||||
libisofs in shell variable LD_LIBRARY_PATH.
|
||||
E.g. if on FreeBSD the include headers libisofs.h , libburn.h are not found:
|
||||
|
|
|
@ -29,7 +29,7 @@ fi
|
|||
|
||||
# xorriso binary is not needed for that particular test
|
||||
SAMPLE_CODE_DIR=codesamples
|
||||
CC=g++
|
||||
CC=${CC:-g++}
|
||||
|
||||
# check compiler
|
||||
if ! which "${CC}" >/dev/null 2>&1; then
|
||||
|
|
|
@ -229,16 +229,22 @@ fi
|
|||
# lines, perl regex, leading tabs
|
||||
grep -n -E "${LIST_KWD}" "${CLOG}"
|
||||
RET_GREP="$?"
|
||||
ok=0
|
||||
case ${RET_GREP} in
|
||||
0) # found
|
||||
;;
|
||||
1) # not found
|
||||
echo "${SELF}: Log file looks clear." # | tee -a ${CLOG}
|
||||
ok=1
|
||||
;;
|
||||
*) #
|
||||
echo "${SELF}: grep returned EXIT CODE: ${RET_GREP}." # | tee -a ${CLOG}
|
||||
;;
|
||||
esac
|
||||
if test "$ok" = 0 && test "$exit_value" = 0
|
||||
then
|
||||
exit_value=1
|
||||
fi
|
||||
set -e
|
||||
fi
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" | tee -a ${CLOG}
|
||||
|
@ -259,5 +265,13 @@ fi
|
|||
ls -lth "${GEN_DATA_DIR}" # | tee -a ${CLOG}
|
||||
|
||||
# Fin
|
||||
if test "$exit_value" = 0
|
||||
then
|
||||
echo "${SELF}: +++ Test run and its log look like success."
|
||||
else
|
||||
echo
|
||||
echo "${SELF}: --- Test run detected some failures."
|
||||
echo
|
||||
fi
|
||||
exit $exit_value
|
||||
|
||||
|
|
|
@ -0,0 +1,370 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo >&2
|
||||
echo "THIS SCRIPT IS DEPRECATED ! USE ITS SUCCESSOR: merge_debian_isos" >&2
|
||||
echo >&2
|
||||
echo "The script merge_2_debian_isos still exists only because it was mentioned">&2
|
||||
echo "in Debian bug 1011343. The successor can merge more than two ISOs.">&2
|
||||
echo "So do not edit this script to remove this warning and the 'exit 7' line.">&2
|
||||
echo >&2
|
||||
|
||||
exit 7
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename "$0") "'\' >&2
|
||||
echo " boot_iso boot_mount add_iso add_mount result_iso [for_dist]" >&2
|
||||
echo >&2
|
||||
echo "Mounts by sudo the boot_iso at directory boot_mount and add_iso at" >&2
|
||||
echo "add_mount, if not already mounted that way. Then both Debian pools" >&2
|
||||
echo "and package lists get merged and a new ISO 9660 image result_iso" >&2
|
||||
echo "is produced, which must not yet exist." >&2
|
||||
echo "If boot_iso is bootable then the new image will be bootable by the" >&2
|
||||
echo "same means." >&2
|
||||
echo "This script creates the following temporary tree and files which" >&2
|
||||
echo "must not yet exist in the current working directory:" >&2
|
||||
echo " ./merged_dists , ./merged_md5sum.txt , ./merged_REAMDE.txt" >&2
|
||||
echo " ./temp_file" >&2
|
||||
echo "The optional sixth argument for_dist should only be given if" >&2
|
||||
echo "this script refuses to work and proposes to give this argument." >&2
|
||||
echo "Exported non-empty variable MERGE_DATE enforces a particular" >&2
|
||||
echo "date string in the text which gets prepended to /README.txt ." >&2
|
||||
echo "Exported non-empty variable XORRISO overrides command xorriso," >&2
|
||||
echo "which may be needed if installed xorriso is older than 1.4.2." >&2
|
||||
echo "Example using GNU xorriso-1.5.4 instead of /usr/bin/xorriso:" >&2
|
||||
echo " export XORRISO="'$HOME'"/xorriso-1.5.4/xorriso/xorriso" >&2
|
||||
echo " $(basename "$0") debian-11.2.0-amd64-DVD-1.iso /mnt/iso1 "'\' >&2
|
||||
echo " debian-11.2.0-amd64-DVD-2.iso /mnt/iso2 merged.iso" >&2
|
||||
}
|
||||
|
||||
if test "$#" -lt 5
|
||||
then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BOOT_ISO="$1"
|
||||
BOOT_ISO_MOUNT="$2"
|
||||
ADD_ISO="$3"
|
||||
ADD_ISO_MOUNT="$4"
|
||||
RESULT_ISO="$5"
|
||||
|
||||
# The sixth argument is optional
|
||||
FOR_DIST="$6"
|
||||
|
||||
|
||||
## Check arguments
|
||||
|
||||
if test -e "$RESULT_ISO"
|
||||
then
|
||||
echo "--- A file '""$RESULT_ISO""' is already existing." >&2
|
||||
echo "--- Will not overwrite it by the resulting ISO image." >&2
|
||||
exit 1
|
||||
fi
|
||||
if test -e merged_dists || test -e merged_md5sum.txt || test -e temp_file \
|
||||
|| test -e merged_README.txt
|
||||
then
|
||||
echo "--- At least one of ./merged_dists, ./merged_md5sum.txt, ./temp_file," >&2
|
||||
echo "--- or merged_README.txt is already existing. Will not overwrite them." >&2
|
||||
exit 1
|
||||
fi
|
||||
if test "$BOOT_ISO" = "$RESULT_ISO" || test "$BOOT_ISO" = "$ADD_ISO" || \
|
||||
test "$ADD_ISO" = "$RESULT_ISO"
|
||||
then
|
||||
echo "--- At least two of the three given ISO image paths are equal." >&2
|
||||
echo "--- boot_iso and add_iso must exist and differ, result_iso must not exist." >&2
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
## Mount and copy out the files which need to be changed
|
||||
|
||||
do_mount_1=1
|
||||
x=$(mount | grep " $BOOT_ISO_MOUNT " | awk '{print $1}')
|
||||
if test -n "$x"
|
||||
then
|
||||
i1=$(ls -i "$x" | awk '{print $1}')
|
||||
i2=$(ls -i "$BOOT_ISO" | awk '{print $1}')
|
||||
if test "$i1" = "$i2"
|
||||
then
|
||||
do_mount_1=0
|
||||
echo "Note: Found $BOOT_ISO already mounted at $BOOT_ISO_MOUNT"
|
||||
fi
|
||||
fi
|
||||
if test "$do_mount_1" = 1
|
||||
then
|
||||
echo "Note: sudo mount $BOOT_ISO $BOOT_ISO_MOUNT"
|
||||
sudo mount "$BOOT_ISO" "$BOOT_ISO_MOUNT" || exit 3
|
||||
fi
|
||||
cp -a "$BOOT_ISO_MOUNT/dists" merged_dists
|
||||
cp -a "$BOOT_ISO_MOUNT/md5sum.txt" merged_md5sum.txt
|
||||
chmod -R u+w merged_dists
|
||||
chmod u+w merged_md5sum.txt
|
||||
|
||||
do_mount_2=1
|
||||
x=$(mount | grep " $ADD_ISO_MOUNT " | awk '{print $1}')
|
||||
if test -n "$x"
|
||||
then
|
||||
i1=$(ls -i "$x" | awk '{print $1}')
|
||||
i2=$(ls -i "$ADD_ISO" | awk '{print $1}')
|
||||
if test "$i1" = "$i2"
|
||||
then
|
||||
do_mount_2=0
|
||||
echo "Note: Found $ADD_ISO already mounted at $ADD_ISO_MOUNT"
|
||||
fi
|
||||
fi
|
||||
if test "$do_mount_2" = 1
|
||||
then
|
||||
echo "Note: sudo mount $ADD_ISO $ADD_ISO_MOUNT"
|
||||
if sudo mount "$ADD_ISO" "$ADD_ISO_MOUNT"
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
if test "$do_mount_1"
|
||||
then
|
||||
sudo umount "$BOOT_ISO_MOUNT"
|
||||
fi
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
## Helper functions
|
||||
|
||||
# Put out the list of checksummed paths as listed in /dists/$dist/Release
|
||||
extract_checksum_paths() {
|
||||
mode=0
|
||||
cat "$1" | \
|
||||
while true
|
||||
do
|
||||
read x || break
|
||||
if test "$x" = "MD5Sum:" || test "$x" = "SHA1:" \
|
||||
|| test "$x" = "SHA256:" || test "$x" = "SHA512:"
|
||||
then
|
||||
if test "$mode" = 0
|
||||
then
|
||||
mode=1
|
||||
elif test "$mode" = 1
|
||||
then
|
||||
break
|
||||
fi
|
||||
elif test "$mode" = 1
|
||||
then
|
||||
echo "$x"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Put out the part before the first checksum field
|
||||
extract_release_head() {
|
||||
cat "$1" | \
|
||||
while true
|
||||
do
|
||||
read x || break
|
||||
if test "$x" = "MD5Sum:" || test "$x" = "SHA1:" \
|
||||
|| test "$x" = "SHA256:" || test "$x" = "SHA512:"
|
||||
then
|
||||
break
|
||||
fi
|
||||
echo "$x"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
## Determine which Debian release is on BOOT_ISO
|
||||
|
||||
dist=
|
||||
for i in $(ls -1d "$BOOT_ISO_MOUNT"/dists/*)
|
||||
do
|
||||
if test -d "$i"
|
||||
then
|
||||
if test -L "$i"
|
||||
then
|
||||
continue
|
||||
fi
|
||||
test -n "$dist" && dist="$dist "
|
||||
dist="$dist""$(basename $i)"
|
||||
fi
|
||||
done
|
||||
if test -z "$dist"
|
||||
then
|
||||
if test -z "$FOR_DIST"
|
||||
then
|
||||
echo "--- Cannot determine Debian release from directories in /dists" >&2
|
||||
echo "--- (You may provide the release name as sixth argument)" >&2
|
||||
echo >&2
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
elif test "$(echo "$dist" | wc -w)" -gt 1
|
||||
then
|
||||
if test -z "$FOR_DIST"
|
||||
then
|
||||
echo "--- More than one Debian release found in /dists: $dist" >&2
|
||||
echo "--- (You may provide the release name as sixth argument)" >&2
|
||||
echo >&2
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
if test -n "$FOR_DIST"
|
||||
then
|
||||
echo "Note: Overriding release name '$dist' by '""$FOR_DIST""'" >&2
|
||||
dist="$FOR_DIST"
|
||||
fi
|
||||
if test -d "$BOOT_ISO_MOUNT"/dists/"$dist"
|
||||
then
|
||||
echo "Note: Will work along $BOOT_ISO_MOUNT"/dists/"$dist"/Release >&2
|
||||
else
|
||||
echo "--- Cannot find directory $BOOT_ISO_MOUNT"/dists/"$dist" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
|
||||
## Prepend info to /README.txt
|
||||
|
||||
if test -z "$MERGE_DATE"
|
||||
then
|
||||
MERGE_DATE=$(date +'%Y%m%d-%H:%M')
|
||||
fi
|
||||
printf 'Result of a run of %s at %s\r\n' \
|
||||
"$(basename $0)" "$MERGE_DATE" >temp_file
|
||||
printf 'Package pools and Packages lists were merged.\r\n' >>temp_file
|
||||
printf 'The other files stem from the first input ISO.\r\n' >>temp_file
|
||||
printf '\r\n' >>temp_file
|
||||
printf 'Input ISO: %s\r\n' "$BOOT_ISO" >>temp_file
|
||||
head -2 "$BOOT_ISO_MOUNT"/README.txt >>temp_file
|
||||
printf '\r\n' >>temp_file
|
||||
printf 'Input ISO: %s\r\n' "$ADD_ISO" >>temp_file
|
||||
head -2 "$ADD_ISO_MOUNT"/README.txt >>temp_file
|
||||
printf '\r\n' >>temp_file
|
||||
printf '%s%s\r\n' " --------------------------------------" \
|
||||
"----------------------------------------" >>temp_file
|
||||
printf '\r\n' >>temp_file
|
||||
cat "$BOOT_ISO_MOUNT"/README.txt >>temp_file
|
||||
|
||||
mv temp_file merged_README.txt
|
||||
|
||||
|
||||
## Merge package description files with those from "$ADD_ISO"
|
||||
|
||||
# /md5sum.txt seems to be the only overall package list
|
||||
cat merged_md5sum.txt "$ADD_ISO_MOUNT"/md5sum.txt | sort >temp_file
|
||||
mv temp_file merged_md5sum.txt
|
||||
|
||||
# Determine the files which are mentioned with checksum in main Release files
|
||||
path_list=$( (extract_checksum_paths merged_dists/"$dist"/Release
|
||||
extract_checksum_paths "$ADD_ISO_MOUNT"/dists/"$dist"/Release ) \
|
||||
| awk '{print $3}' | sort | uniq )
|
||||
|
||||
# Merge .gz files (Release should not be merged. Unclear what others need.)
|
||||
for i in $path_list
|
||||
do
|
||||
if echo "$i" | grep -v '.gz$' >/dev/null
|
||||
then
|
||||
continue
|
||||
fi
|
||||
if test -e merged_dists/"$dist"/"$i"
|
||||
then
|
||||
if test -e "$ADD_ISO_MOUNT"/dists/"$dist"/"$i"
|
||||
then
|
||||
if test "$(gunzip <merged_dists/"$dist"/"$i" | tail -1)" = ""
|
||||
then
|
||||
empty_line=
|
||||
else
|
||||
empty_line=echo
|
||||
fi
|
||||
( gunzip <merged_dists/"$dist"/"$i"
|
||||
$empty_line
|
||||
gunzip <"$ADD_ISO_MOUNT"/dists/"$dist"/"$i" ) | gzip >temp_file
|
||||
mv temp_file merged_dists/"$dist"/"$i"
|
||||
fi
|
||||
elif test -e "$ADD_ISO_MOUNT"/dists/"$dist"/"$i"
|
||||
then
|
||||
if test -e $(dirname merged_dists/"$dist"/"$i")
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
mkdir -p $(dirname merged_dists/"$dist"/"$i")
|
||||
fi
|
||||
cp "$ADD_ISO_MOUNT"/dists/"$dist"/"$i" merged_dists/"$dist"/"$i"
|
||||
fi
|
||||
test -e temp_file && rm temp_file
|
||||
done
|
||||
|
||||
|
||||
## Update dists/"$dist"/Release
|
||||
|
||||
extract_release_head merged_dists/"$dist"/Release >temp_file
|
||||
|
||||
# Re-create "MD5Sum:", "SHA256:", "SHA512:" sections
|
||||
for cmd in md5sum sha1sum sha256sum sha512sum
|
||||
do
|
||||
if type "$cmd" >/dev/null
|
||||
then
|
||||
case "$cmd" in
|
||||
md5sum) echo "MD5Sum:" ;;
|
||||
sha1sum) echo "SHA1:" ;;
|
||||
sha256sum) echo "SHA256:" ;;
|
||||
sha512sum) echo "SHA512:" ;;
|
||||
esac
|
||||
for i in $path_list
|
||||
do
|
||||
file=merged_dists/"$dist"/"$i"
|
||||
if test -e "$file"
|
||||
then
|
||||
sum=$("$cmd" "$file" | awk '{print $1}')
|
||||
size=$(stat -c '%s' "$file")
|
||||
elif test -e "$file".gz
|
||||
then
|
||||
sum=$(gunzip <"$file".gz | "$cmd" | awk '{print $1}')
|
||||
size=$(gunzip <"$file".gz | wc -c)
|
||||
else
|
||||
continue
|
||||
fi
|
||||
list_path=$(echo "$file" | sed -e 's/^merged_dists\/'"$dist"'\///')
|
||||
printf ' %s %8ld %s\n' "$sum" "$size" "$list_path"
|
||||
done
|
||||
fi
|
||||
done >>temp_file
|
||||
|
||||
mv temp_file merged_dists/"$dist"/Release
|
||||
|
||||
|
||||
## Produce the new ISO image
|
||||
|
||||
if test -z "$XORRISO"
|
||||
then
|
||||
XORRISO=xorriso
|
||||
fi
|
||||
|
||||
"$XORRISO" \
|
||||
-indev "$BOOT_ISO" \
|
||||
-outdev "$RESULT_ISO" \
|
||||
-map "$ADD_ISO_MOUNT"/pool /pool \
|
||||
-map merged_dists /dists \
|
||||
-map merged_md5sum.txt /md5sum.txt \
|
||||
-map merged_README.txt /README.txt \
|
||||
-chown_r 0 /dists /md5sum.txt /README.txt -- \
|
||||
-chgrp_r 0 /dists /md5sum.txt /README.txt -- \
|
||||
-chmod_r a-w /dists /md5sum.txt -- \
|
||||
-chmod_r a=r /README.txt -- \
|
||||
-boot_image any replay \
|
||||
-stdio_sync off \
|
||||
-padding included \
|
||||
-compliance no_emul_toc
|
||||
|
||||
|
||||
## Clean up
|
||||
|
||||
if test "$do_mount_1" = 1
|
||||
then
|
||||
sudo umount "$BOOT_ISO_MOUNT"
|
||||
fi
|
||||
if test "$do_mount_2" = 1
|
||||
then
|
||||
sudo umount "$ADD_ISO_MOUNT"
|
||||
fi
|
||||
|
||||
rm -r merged_dists merged_md5sum.txt merged_README.txt
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,293 @@
|
|||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\"
|
||||
.\" IMPORTANT NOTE:
|
||||
.\"
|
||||
.\" The original of this file is kept in test/merge_debian_isos.texi
|
||||
.\" This here was generated by program xorriso/make_xorriso_1
|
||||
.\"
|
||||
.\"
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH MERGE_DEBIAN_ISOS 1 "Version 1.5.7, Jun 07, 2023"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.nh
|
||||
.SH NAME
|
||||
merge_debian_isos \- Program to merge multiple debian\-cd ISO images
|
||||
.SH SYNOPSIS
|
||||
.B merge_debian_isos
|
||||
result_iso mount_template iso1 iso2 [... isoN]
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBmerge_debian_isos\fR
|
||||
mounts by \fBsudo\fR the ISO 9660 images iso1 to isoN at directories
|
||||
mount_template1 to mount_templateN, if not already mounted that way.
|
||||
Then the Debian pools and package lists get merged and a new
|
||||
ISO 9660 image result_iso is produced by a run of \fBxorriso\fR.
|
||||
If iso1 is bootable then
|
||||
the new image will be bootable by the same means.
|
||||
.br
|
||||
.PP
|
||||
The file depicted by result_iso must not yet exist or has to be a
|
||||
device which is acceptable for Linux\-specific helper script
|
||||
\fBxorriso\-dd\-target\fR. If xorriso\-dd\-target agrees and the user
|
||||
confirms by input "yes" then xorriso will be run under sudo.
|
||||
.br
|
||||
Exempted from this evaluation are addresses which begin by "mmc:"
|
||||
for an optical drive on Linux, BSDs, Solaris, or by "stdio:/dev/"
|
||||
for which the user takes full and dangerous responsibility.
|
||||
.br
|
||||
Special result_iso path \fBxorriso\-dd\-target\-plug\-test\fR determines
|
||||
on systems with Linux kernel the target USB stick by a dialog around plugging
|
||||
it in.
|
||||
xorriso will be run under sudo, if xorriso\-dd\-target agrees and
|
||||
the user confirms by input "yes".
|
||||
.br
|
||||
.PP
|
||||
At least the parent directory of argument \fBmount_template\fR must already
|
||||
exist or has to be given by a plain name without "/" so that it can be
|
||||
created in the current directory. (I.e. without even "./".)
|
||||
.br
|
||||
All arguments must be single words without using quotation marks.
|
||||
None of the isoN must be equal to another isoM.
|
||||
.br
|
||||
.PP
|
||||
This script creates and finally removes the following temporary tree
|
||||
and files which must not yet exist in the current working directory:
|
||||
./merged_dists , ./merged_md5sum.txt , ./merged_REAMDE.txt
|
||||
./temp_file
|
||||
.br
|
||||
Further it creates and finally removes directories mount_template*
|
||||
if they are needed and do not exist when the script starts. If the
|
||||
parent directory in the mount_template path does not exist and
|
||||
its path contains no "/" then it gets created and finally removed.
|
||||
The script depends on the following programs:
|
||||
.br
|
||||
awk, basename, cat, chmod, cp, date, dirname, expr, fgrep, grep,
|
||||
gunzip, gzip, head, ls, md5sum, mkdir, mount, mv, rm, rmdir,
|
||||
sed, sh, sha256sum, sort, stat, sudo, umount, uniq, xorriso
|
||||
.br
|
||||
With device writing involving helper script xorriso\-dd\-target:
|
||||
.br
|
||||
dd, Linux kernel, lsblk, sleep, tr, uname, wc, whoami,
|
||||
xorriso\-dd\-target
|
||||
.br
|
||||
Recommended are: sha1sum, sha512sum
|
||||
|
||||
.SS
|
||||
.br
|
||||
.SH OPTIONS
|
||||
.br
|
||||
.PP
|
||||
merge_debian_isos has no command line options besides the input words described
|
||||
above, but it reacts on some environment variables.
|
||||
.br
|
||||
See section ENVIRONMENT.
|
||||
.br
|
||||
.PP
|
||||
If less than 4 arguments are given, the script will print its help text to
|
||||
standard error and exit with non\-zero value, indicating failure.
|
||||
.SS
|
||||
.SH EXAMPLES
|
||||
.SS
|
||||
.B Overview of examples:
|
||||
Merge DVD images 1 to 5
|
||||
.br
|
||||
Use GNU xorriso instead of installed xorriso
|
||||
.br
|
||||
Write result directly to an optical drive
|
||||
.br
|
||||
Write result directly and safely to USB stick (Linux only)
|
||||
.br
|
||||
Write result directly and unsafely to USB stick
|
||||
.SS
|
||||
.B Merge DVD images 1 to 5
|
||||
The resulting image will be named "merged.iso".
|
||||
.br
|
||||
Directory ./merge_mount/ will be created if not yet existing.
|
||||
.br
|
||||
|
||||
merge_debian_isos merged.iso merge_mount/iso \\
|
||||
debian\-11.2.0\-amd64\-DVD\-[12345].iso
|
||||
|
||||
.br
|
||||
Expect to see some harmless warnings like
|
||||
.br
|
||||
|
||||
xorriso : WARNING : \-volid text does not comply to ISO 9660 / ECMA 119 rules
|
||||
|
||||
libisofs: WARNING : Cannot add /debian to Joliet tree. Symlinks can only be added to a Rock Ridge tree.
|
||||
|
||||
libisofs: WARNING : Image size exceeds 1024 cylinders. Cannot align partition.
|
||||
|
||||
.SS
|
||||
.B Use GNU xorriso instead of installed xorriso
|
||||
merge_debian_isos will refuse to work if the installed version of xorriso
|
||||
is older than 1.4.2. In this case consider to download and compile the
|
||||
GNU xorriso tarball from
|
||||
.br
|
||||
https://www.gnu.org/software/xorriso/#download
|
||||
.br
|
||||
You may use it without installing it after compilation and thus without
|
||||
disturbing your system's package management. Assumed that you unpacked the
|
||||
xorriso\-1.5.6 tarball in your $HOME directory and have successfully compiled
|
||||
it, do:
|
||||
.br
|
||||
|
||||
export XORRISO="$HOME"/xorriso\-1.5.6/xorriso/xorriso
|
||||
.br
|
||||
|
||||
merge_debian_isos merged.iso merge_mount/iso \\
|
||||
debian\-11.2.0\-amd64\-DVD\-[12345].iso
|
||||
|
||||
.SS
|
||||
.B Write result directly to an optical drive
|
||||
xorriso is able to burn optical media on GNU/Linux (/dev/sr*),
|
||||
Solaris (/dev/rdsk/*) , FreeBSD (/dev/cd*) , NetBSD (/dev/rcd*),
|
||||
and OpenBSD (/dev/rcd*). Get a list of available optical drive devices by:
|
||||
.br
|
||||
|
||||
xorriso \-devices
|
||||
.br
|
||||
|
||||
It might be that you need superuser powers for this and then have to enable
|
||||
access to the device file for the user who runs merge_debian_isos.
|
||||
.br
|
||||
|
||||
In order to directly write the merged ISO image to an optical medium,
|
||||
use the desired device file path with prefix "mmc:":
|
||||
.br
|
||||
|
||||
merge_debian_isos mmc:/dev/sr0 merge_mount/iso \\
|
||||
debian\-11.2.0\-amd64\-DVD\-[12345].iso
|
||||
|
||||
.SS
|
||||
.B Write result directly and safely to USB stick (Linux only)
|
||||
The Linux\-specific script \fBxorriso\-dd\-target\fR evaluates device files
|
||||
whether they and their content look unimportant enough for being overwritten
|
||||
by an image file.
|
||||
.br
|
||||
This mainly means that the storage device is attached to USB and contains
|
||||
no filesystems which are not of type FAT or ISO 9660.
|
||||
.br
|
||||
You may get xorriso\-dd\-target by:
|
||||
.br
|
||||
|
||||
wget \\
|
||||
https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/xorriso\-dd\-target/xorriso\-dd\-target
|
||||
chmod u+x xorriso\-dd\-target
|
||||
.br
|
||||
|
||||
Consider to also download xorriso\-dd\-target.sig and to verify the script by
|
||||
.br
|
||||
|
||||
gpg \-\-verify xorriso\-dd\-target.sig xorriso\-dd\-target
|
||||
.br
|
||||
|
||||
Announce the storage location of the downloaded xorriso\-dd\-target:
|
||||
.br
|
||||
|
||||
export XORRISO_DD_TARGET_PATH="$(pwd)"
|
||||
.br
|
||||
|
||||
The prepared use case in merge_debian_isos uses the xorriso\-dd\-target
|
||||
option \-plug_test under \fBsudo\fR, which asks the user for first having
|
||||
the desired USB stick unplugged so that the unwanted devices can get
|
||||
registered. Then it asks the user to plug in the USB stick, so that it gets
|
||||
recognized as desired target.
|
||||
.br
|
||||
xorriso\-dd\-target evaluates the content and decides whether it looks
|
||||
disposable enough. If so, then it allows merge_debian_isos to write its
|
||||
result to the device.
|
||||
.br
|
||||
|
||||
merge_debian_isos xorriso\-dd\-target\-plug\-test merge_mount/iso \\
|
||||
debian\-11.2.0\-amd64\-DVD\-[12345].iso
|
||||
|
||||
.SS
|
||||
.B Write result directly and unsafely to USB stick
|
||||
On operating systems other than GNU/Linux or with storage devices not
|
||||
acceptable to xorriso\-dd\-target it is possible to remove all safety
|
||||
precautions beyond those of xorriso, which can be overcome by "blanking"
|
||||
the device.
|
||||
.br
|
||||
So after due evaluation of the device situation and on your very own risk
|
||||
you may use the device path prefix "stdio:", possibly with superuser powers:
|
||||
.br
|
||||
|
||||
xorriso \-outdev stdio:/dev/sdd \-blank as_needed
|
||||
|
||||
merge_debian_isos stdio:/dev/sdd merge_mount/iso \\
|
||||
debian\-11.2.0\-amd64\-DVD\-[12345].iso
|
||||
|
||||
For details about "stdio:" and pseudo\-blanking non\-optical devices read
|
||||
man xorriso.
|
||||
.br
|
||||
The xorriso run in merge_debian_isos ignores locally defined xorriso startup
|
||||
files (by command \-no_rc).
|
||||
.SH FILES
|
||||
For now, no files are defined for configuration.
|
||||
.SH ENVIRONMENT
|
||||
The following environment variables influence the program behavior:
|
||||
.br
|
||||
Exported non\-empty variable MERGE_DATE enforces a particular
|
||||
date string in the text which gets prepended to /README.txt .
|
||||
.br
|
||||
Exported non\-empty variable MERGE_FOR_DIST enforces the use of a
|
||||
particular directory in /dists of iso1. Normally only one
|
||||
such directory is found and thus no need to set MERGE_FOR_DIST.
|
||||
.br
|
||||
Exported non\-empty variable MERGE_KEEP_ISO prevents the removal
|
||||
of result_iso after xorriso indicated failure of production.
|
||||
.br
|
||||
Exported non\-empty variable XORRISO gives the path to a xorriso binary,
|
||||
which will be used instead of the system\-wide installed xorriso binary.
|
||||
This may be needed if installed xorriso is older than 1.4.2.
|
||||
.br
|
||||
If XORRISO is set to "dummy" then no new ISO will emerge.
|
||||
.br
|
||||
Exported non\-empty variable XORRISO_DD_TARGET_PATH names the
|
||||
directory where to find xorriso\-dd\-target, which evaluates the
|
||||
suitability of result_iso devices or does the plug\-test dialog.
|
||||
.br
|
||||
.SH SEE ALSO
|
||||
.BR xorriso(1),
|
||||
.BR xorriso-dd-target(1),
|
||||
.SH BUGS
|
||||
To report bugs, request help, or suggest enhancements for
|
||||
\fBmerge_debian_isos\fR,
|
||||
please send electronic mail to the public list <bug\-xorriso@gnu.org>.
|
||||
If more privacy is desired, mail to <scdbackup@gmx.net>.
|
||||
.br
|
||||
Please describe what you expect the program to do, the program arguments
|
||||
which you used, the messages of \fBmerge_debian_isos\fR, and the
|
||||
undesirable outcome of your program run.
|
||||
.br
|
||||
Expect to get asked more questions before solutions can be proposed.
|
||||
.SH AUTHOR
|
||||
Thomas Schmitt <scdbackup@gmx.net>
|
||||
.br
|
||||
for libburnia\-project.org
|
||||
.SH COPYRIGHT
|
||||
Copyright (c) 2023 Thomas Schmitt
|
||||
.br
|
||||
Permission is granted to distribute this text freely. It shall only be
|
||||
modified in sync with the technical properties of merge_debian_isos.
|
||||
If you make use of the license to derive modified versions of merge_debian_isos
|
||||
then you are entitled to modify this text under that same license.
|
||||
.SH CREDITS
|
||||
\fBmerge_debian_isos\fR was originally developed with advise and testing
|
||||
by Zhang Boyang in the course of Debian bug #1011343. Steve McIntyre provided
|
||||
information about various file aspects of debian\-cd ISO images.
|
|
@ -0,0 +1,359 @@
|
|||
This is merge_debian_isos.info, produced by makeinfo version 5.2 from
|
||||
merge_debian_isos.texi.
|
||||
|
||||
merge_debian_isos - sh script to merge multiple debian-cd ISO images
|
||||
|
||||
Copyright (C) 2023 Thomas Schmitt
|
||||
|
||||
Permission is granted to distribute this text freely.
|
||||
INFO-DIR-SECTION Archiving
|
||||
START-INFO-DIR-ENTRY
|
||||
* Merge_debian_isos: (merge_debian_isos). Merge debian-cd ISO images to a single image
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Top, Next: Overview, Up: (dir)
|
||||
|
||||
merge_debian_isos 1.5.7
|
||||
***********************
|
||||
|
||||
merge_debian_isos - Program to merge multiple debian-cd ISO images
|
||||
* Menu:
|
||||
|
||||
* Overview:: Overview
|
||||
* Options:: Options
|
||||
* Examples:: Examples
|
||||
* Files:: Files
|
||||
* Environ:: Environment
|
||||
* Seealso:: See also
|
||||
* Bugreport:: Reporting bugs
|
||||
* Legal:: Author, Copyright, Credits
|
||||
* CommandIdx:: Alphabetic Option List
|
||||
* ConceptIdx:: Alphabetic List of Concepts and Objects
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Overview, Next: Options, Prev: Top, Up: Top
|
||||
|
||||
1 Overview
|
||||
**********
|
||||
|
||||
'merge_debian_isos' mounts by *sudo* the ISO 9660 images iso1 to isoN at
|
||||
directories mount_template1 to mount_templateN, if not already mounted
|
||||
that way. Then the Debian pools and package lists get merged and a new
|
||||
ISO 9660 image result_iso is produced by a run of *xorriso*. If iso1 is
|
||||
bootable then the new image will be bootable by the same means.
|
||||
|
||||
The file depicted by result_iso must not yet exist or has to be a
|
||||
device which is acceptable for Linux-specific helper script
|
||||
*xorriso-dd-target*. If xorriso-dd-target agrees and the user confirms
|
||||
by input "yes" then xorriso will be run under sudo.
|
||||
Exempted from this evaluation are addresses which begin by "mmc:" for an
|
||||
optical drive on Linux, BSDs, Solaris, or by "stdio:/dev/" for which the
|
||||
user takes full and dangerous responsibility.
|
||||
Special result_iso path *xorriso-dd-target-plug-test* determines on
|
||||
systems with Linux kernel the target USB stick by a dialog around
|
||||
plugging it in. xorriso will be run under sudo, if xorriso-dd-target
|
||||
agrees and the user confirms by input "yes".
|
||||
|
||||
At least the parent directory of argument *mount_template* must
|
||||
already exist or has to be given by a plain name without "/" so that it
|
||||
can be created in the current directory. (I.e. without even "./".)
|
||||
All arguments must be single words without using quotation marks. None
|
||||
of the isoN must be equal to another isoM.
|
||||
|
||||
This script creates and finally removes the following temporary tree
|
||||
and files which must not yet exist in the current working directory:
|
||||
./merged_dists , ./merged_md5sum.txt , ./merged_REAMDE.txt ./temp_file
|
||||
Further it creates and finally removes directories mount_template* if
|
||||
they are needed and do not exist when the script starts. If the parent
|
||||
directory in the mount_template path does not exist and its path
|
||||
contains no "/" then it gets created and finally removed. The script
|
||||
depends on the following programs:
|
||||
awk, basename, cat, chmod, cp, date, dirname, expr, fgrep, grep, gunzip,
|
||||
gzip, head, ls, md5sum, mkdir, mount, mv, rm, rmdir, sed, sh, sha256sum,
|
||||
sort, stat, sudo, umount, uniq, xorriso
|
||||
With device writing involving helper script xorriso-dd-target:
|
||||
dd, Linux kernel, lsblk, sleep, tr, uname, wc, whoami, xorriso-dd-target
|
||||
|
||||
Recommended are: sha1sum, sha512sum
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Options, Next: Examples, Prev: Overview, Up: Top
|
||||
|
||||
2 Options
|
||||
*********
|
||||
|
||||
merge_debian_isos has no command line options besides the input words
|
||||
described above, but it reacts on some environment variables.
|
||||
|
||||
If less than 4 arguments are given, the script will print its help
|
||||
text to standard error and exit with non-zero value, indicating failure.
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Examples, Next: Files, Prev: Options, Up: Top
|
||||
|
||||
3 Examples
|
||||
**********
|
||||
|
||||
* Menu:
|
||||
|
||||
* ExPlain:: Merge DVD images 1 to 5
|
||||
* ExXorriso:: Use GNU xorriso instead of installed xorriso
|
||||
* ExOptical:: Write result directly to an optical drive
|
||||
* ExDdTarget:: Write result directly and safely to USB stick (Linux only)
|
||||
* ExStdio:: Write result directly and unsafely to USB stick
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: ExPlain, Next: ExXorriso, Prev: Options, Up: Examples
|
||||
|
||||
3.1 Merge DVD images 1 to 5
|
||||
===========================
|
||||
|
||||
The resulting image will be named "merged.iso".
|
||||
Directory ./merge_mount/ will be created if not yet existing.
|
||||
|
||||
merge_debian_isos merged.iso merge_mount/iso \
|
||||
debian-11.2.0-amd64-DVD-[12345].iso
|
||||
|
||||
|
||||
|
||||
Expect to see some harmless warnings like
|
||||
|
||||
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA
|
||||
119 rules
|
||||
|
||||
libisofs: WARNING : Cannot add /debian to Joliet tree. Symlinks can
|
||||
only be added to a Rock Ridge tree.
|
||||
|
||||
libisofs: WARNING : Image size exceeds 1024 cylinders. Cannot align
|
||||
partition.
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: ExXorriso, Next: ExOptical, Prev: ExPlain, Up: Examples
|
||||
|
||||
3.2 Use GNU xorriso instead of installed xorriso
|
||||
================================================
|
||||
|
||||
merge_debian_isos will refuse to work if the installed version of
|
||||
xorriso is older than 1.4.2. In this case consider to download and
|
||||
compile the GNU xorriso tarball from
|
||||
https://www.gnu.org/software/xorriso/#download
|
||||
You may use it without installing it after compilation and thus without
|
||||
disturbing your system's package management. Assumed that you unpacked
|
||||
the xorriso-1.5.6 tarball in your $HOME directory and have successfully
|
||||
compiled it, do:
|
||||
|
||||
export XORRISO="$HOME"/xorriso-1.5.6/xorriso/xorriso
|
||||
|
||||
merge_debian_isos merged.iso merge_mount/iso \
|
||||
debian-11.2.0-amd64-DVD-[12345].iso
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: ExOptical, Next: ExDdTarget, Prev: ExXorriso, Up: Examples
|
||||
|
||||
3.3 Write result directly to an optical drive
|
||||
=============================================
|
||||
|
||||
xorriso is able to burn optical media on GNU/Linux (/dev/sr*), Solaris
|
||||
(/dev/rdsk/*) , FreeBSD (/dev/cd*) , NetBSD (/dev/rcd*), and OpenBSD
|
||||
(/dev/rcd*). Get a list of available optical drive devices by:
|
||||
|
||||
xorriso -devices
|
||||
|
||||
It might be that you need superuser powers for this and then have to
|
||||
enable access to the device file for the user who runs
|
||||
merge_debian_isos.
|
||||
|
||||
In order to directly write the merged ISO image to an optical medium,
|
||||
use the desired device file path with prefix "mmc:":
|
||||
|
||||
merge_debian_isos mmc:/dev/sr0 merge_mount/iso \
|
||||
debian-11.2.0-amd64-DVD-[12345].iso
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: ExDdTarget, Next: ExStdio, Prev: ExOptical, Up: Examples
|
||||
|
||||
3.4 Write result directly and safely to USB stick (Linux only)
|
||||
==============================================================
|
||||
|
||||
The Linux-specific script *xorriso-dd-target* evaluates device files
|
||||
whether they and their content look unimportant enough for being
|
||||
overwritten by an image file.
|
||||
This mainly means that the storage device is attached to USB and
|
||||
contains no filesystems which are not of type FAT or ISO 9660.
|
||||
You may get xorriso-dd-target by:
|
||||
|
||||
wget \
|
||||
https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/xorriso-dd-target/xorriso-dd-target
|
||||
chmod u+x xorriso-dd-target
|
||||
|
||||
Consider to also download xorriso-dd-target.sig and to verify the
|
||||
script by
|
||||
|
||||
gpg -verify xorriso-dd-target.sig xorriso-dd-target
|
||||
|
||||
Announce the storage location of the downloaded xorriso-dd-target:
|
||||
|
||||
export XORRISO_DD_TARGET_PATH="$(pwd)"
|
||||
|
||||
The prepared use case in merge_debian_isos uses the xorriso-dd-target
|
||||
option -plug_test under *sudo*, which asks the user for first having the
|
||||
desired USB stick unplugged so that the unwanted devices can get
|
||||
registered. Then it asks the user to plug in the USB stick, so that it
|
||||
gets recognized as desired target.
|
||||
xorriso-dd-target evaluates the content and decides whether it looks
|
||||
disposable enough. If so, then it allows merge_debian_isos to write its
|
||||
result to the device.
|
||||
|
||||
merge_debian_isos xorriso-dd-target-plug-test merge_mount/iso \
|
||||
debian-11.2.0-amd64-DVD-[12345].iso
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: ExStdio, Next: Files, Prev: ExDdTarget, Up: Examples
|
||||
|
||||
3.5 Write result directly and unsafely to USB stick
|
||||
===================================================
|
||||
|
||||
On operating systems other than GNU/Linux or with storage devices not
|
||||
acceptable to xorriso-dd-target it is possible to remove all safety
|
||||
precautions beyond those of xorriso, which can be overcome by "blanking"
|
||||
the device.
|
||||
So after due evaluation of the device situation and on your very own
|
||||
risk you may use the device path prefix "stdio:", possibly with
|
||||
superuser powers:
|
||||
|
||||
xorriso -outdev stdio:/dev/sdd -blank as_needed
|
||||
|
||||
merge_debian_isos stdio:/dev/sdd merge_mount/iso \
|
||||
debian-11.2.0-amd64-DVD-[12345].iso
|
||||
|
||||
For details about "stdio:" and pseudo-blanking non-optical devices
|
||||
read man xorriso.
|
||||
The xorriso run in merge_debian_isos ignores locally defined xorriso
|
||||
startup files (by command -no_rc).
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Files, Next: Environ, Prev: Examples, Up: Top
|
||||
|
||||
4 Files
|
||||
*******
|
||||
|
||||
For now, no files are defined for configuration.
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Environ, Next: Seealso, Prev: Files, Up: Top
|
||||
|
||||
5 Environ
|
||||
*********
|
||||
|
||||
The following environment variables influence the program behavior:
|
||||
Exported non-empty variable MERGE_DATE enforces a particular date string
|
||||
in the text which gets prepended to /README.txt .
|
||||
Exported non-empty variable MERGE_FOR_DIST enforces the use of a
|
||||
particular directory in /dists of iso1. Normally only one such
|
||||
directory is found and thus no need to set MERGE_FOR_DIST.
|
||||
Exported non-empty variable MERGE_KEEP_ISO prevents the removal of
|
||||
result_iso after xorriso indicated failure of production.
|
||||
Exported non-empty variable XORRISO gives the path to a xorriso binary,
|
||||
which will be used instead of the system-wide installed xorriso binary.
|
||||
This may be needed if installed xorriso is older than 1.4.2.
|
||||
If XORRISO is set to "dummy" then no new ISO will emerge.
|
||||
Exported non-empty variable XORRISO_DD_TARGET_PATH names the directory
|
||||
where to find xorriso-dd-target, which evaluates the suitability of
|
||||
result_iso devices or does the plug-test dialog.
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Seealso, Next: Bugreport, Prev: Environ, Up: Top
|
||||
|
||||
6 See also
|
||||
**********
|
||||
|
||||
xorriso(1), xorriso-dd-target(1)
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Bugreport, Next: Legal, Prev: Seealso, Up: Top
|
||||
|
||||
7 Reporting bugs
|
||||
****************
|
||||
|
||||
To report bugs, request help, or suggest enhancements for
|
||||
'merge_debian_isos', please send electronic mail to the public list
|
||||
<bug-xorriso@gnu.org>. If more privacy is desired, mail to
|
||||
<scdbackup@gmx.net>.
|
||||
|
||||
Please describe what you expect the program to do, the program
|
||||
arguments which you used, the messages of 'merge_debian_isos', and the
|
||||
undesirable outcome of your program run.
|
||||
|
||||
Expect to get asked more questions before solutions can be proposed.
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: Legal, Next: CommandIdx, Prev: Bugreport, Up: Top
|
||||
|
||||
8 Author, Copyright, Credits
|
||||
****************************
|
||||
|
||||
8.1 Author
|
||||
==========
|
||||
|
||||
Thomas Schmitt <scdbackup@gmx.net>
|
||||
for libburnia-project.org
|
||||
|
||||
8.2 Copyright
|
||||
=============
|
||||
|
||||
Copyright (c) 2023 Thomas Schmitt
|
||||
Permission is granted to distribute this text freely. It shall only be
|
||||
modified in sync with the technical properties of merge_debian_isos. If
|
||||
you make use of the license to derive modified versions of
|
||||
merge_debian_isos then you are entitled to modify this text under that
|
||||
same license.
|
||||
|
||||
8.3 Credits
|
||||
===========
|
||||
|
||||
'merge_debian_isos' was originally developed with advise and testing by
|
||||
Zhang Boyang in the course of Debian bug #1011343. Steve McIntyre
|
||||
provided information about various file aspects of debian-cd ISO images.
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
||||
|
||||
9 Alphabetic Options List
|
||||
*************************
|
||||
|
||||
|
||||
File: merge_debian_isos.info, Node: ConceptIdx, Next: Top, Prev: CommandIdx, Up: Top
|
||||
|
||||
10 Alphabetic List of Concepts and Objects
|
||||
******************************************
|
||||
|
||||
|