Compare commits
335 Commits
release-1.
...
master
Author | SHA1 | Date |
---|---|---|
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 | |
Thomas Schmitt | ac4048d590 | |
Thomas Schmitt | f81eade8cd | |
Thomas Schmitt | 5bc1d998f9 | |
Thomas Schmitt | 3542e8af97 | |
Thomas Schmitt | b3adff1daa | |
Thomas Schmitt | 47be075c45 | |
Thomas Schmitt | e97cd48ee0 | |
Thomas Schmitt | 2fbb3cfac1 | |
Thomas Schmitt | 8f89ad03fc | |
Thomas Schmitt | cf176eea0a | |
Thomas Schmitt | 9f5a6ea1a7 | |
Thomas Schmitt | abd65a7eb6 | |
Thomas Schmitt | 266a6f47d1 | |
Thomas Schmitt | d9176dfceb | |
Thomas Schmitt | fc2a2d4646 | |
Thomas Schmitt | 6fa5f97da8 | |
Thomas Schmitt | 05de7ec5ee | |
Thomas Schmitt | 66fe150831 | |
Thomas Schmitt | 80b4d29a81 | |
Thomas Schmitt | d2f10a1768 | |
Thomas Schmitt | 5316687d31 | |
Thomas Schmitt | a9d8102996 | |
Thomas Schmitt | 1ddb676159 | |
Thomas Schmitt | c24ffedfc7 | |
Thomas Schmitt | c1e6d3415a | |
Thomas Schmitt | 396d09946e | |
Thomas Schmitt | c4d66ecb19 | |
Thomas Schmitt | 5a6aa8a71e | |
Thomas Schmitt | 3f390f2cdc | |
Thomas Schmitt | 2f44446d05 | |
Thomas Schmitt | fb0d617674 | |
Thomas Schmitt | 8286468948 | |
Thomas Schmitt | dcb13954bd | |
Thomas Schmitt | 9a7dfd7721 | |
Thomas Schmitt | bbded29369 | |
Thomas Schmitt | 588578f9a8 | |
Thomas Schmitt | 56b2d88667 | |
Thomas Schmitt | ffb7fe64c9 | |
Thomas Schmitt | f23b23fd17 | |
Thomas Schmitt | 04a82ce28d | |
Thomas Schmitt | ec49c627f9 | |
Thomas Schmitt | 3f6195dbe1 | |
Thomas Schmitt | 2fda271a09 | |
Thomas Schmitt | 8f872bab67 | |
Thomas Schmitt | af0dd1357b | |
Thomas Schmitt | c51f3813fe | |
Thomas Schmitt | 89fe871067 | |
Thomas Schmitt | 1170a9b883 | |
Thomas Schmitt | 49690fcac7 | |
Thomas Schmitt | bf0a3f015b | |
Thomas Schmitt | 086a9a69fd | |
Thomas Schmitt | 5a335e5594 | |
Thomas Schmitt | 43d5804db3 | |
Thomas Schmitt | 557e69ada1 | |
Thomas Schmitt | 56238c3c6a | |
Thomas Schmitt | 3466f2300a | |
Thomas Schmitt | 71b61339e9 | |
Thomas Schmitt | 80e32280aa | |
Thomas Schmitt | 239244157b | |
Thomas Schmitt | b97841b782 | |
Thomas Schmitt | 42df8f913c | |
Thomas Schmitt | 93ebe301f7 | |
Thomas Schmitt | 39163b64c8 | |
Thomas Schmitt | 8fee0fce40 | |
Thomas Schmitt | b8a2a0bdd3 | |
Thomas Schmitt | a3a351bb59 | |
Thomas Schmitt | f6c56febbf | |
Thomas Schmitt | ab2af1dff2 | |
Thomas Schmitt | ac018842da | |
Thomas Schmitt | 1efa98ae40 | |
Thomas Schmitt | 6bfdd2f9d9 | |
Thomas Schmitt | 27bc463332 | |
Thomas Schmitt | e5d86b3a13 | |
Thomas Schmitt | 697c8cc1f9 | |
Thomas Schmitt | 157cb19092 | |
Thomas Schmitt | 03ae735c85 | |
Thomas Schmitt | 2a8894a5c6 | |
Thomas Schmitt | 1f6504f7bb | |
Thomas Schmitt | 1b22aa5465 | |
Thomas Schmitt | d315b65d17 | |
Thomas Schmitt | ba505e86c9 | |
Thomas Schmitt | 51994a7571 | |
Thomas Schmitt | fd04b110fd | |
Thomas Schmitt | 3ac5dba1c7 | |
Thomas Schmitt | 98c301e7b9 | |
Thomas Schmitt | a28ad87aae | |
Thomas Schmitt | a09ed16fc3 | |
Thomas Schmitt | 5e727b43ad | |
Thomas Schmitt | c0b650bebb | |
Thomas Schmitt | e226486172 | |
Thomas Schmitt | 245102072c | |
Thomas Schmitt | f419f51f1e | |
Thomas Schmitt | 7fa1f82ed9 | |
Thomas Schmitt | 3bf01c109d | |
Thomas Schmitt | f7f484de20 | |
Thomas Schmitt | 02e55a9dbc | |
Thomas Schmitt | 6de23e96de | |
Thomas Schmitt | 74f05d33f5 | |
Thomas Schmitt | 9b711f20ec | |
Thomas Schmitt | 23bce9c669 | |
Thomas Schmitt | a6ab055153 | |
Thomas Schmitt | 9ffb3ff2d5 | |
Thomas Schmitt | 099d24f740 | |
Thomas Schmitt | 69ce40b6d4 | |
Thomas Schmitt | b0db123119 | |
Thomas Schmitt | b8f77670d9 | |
Thomas Schmitt | 81272c80ca | |
Thomas Schmitt | e36596b8d4 | |
Thomas Schmitt | fe46a2d983 | |
Thomas Schmitt | ea863307a4 | |
Thomas Schmitt | 9028117c01 | |
Thomas Schmitt | b35e119f15 | |
Thomas Schmitt | 1557304c96 | |
Thomas Schmitt | c4894d8ae3 | |
Thomas Schmitt | 78a2a377dd | |
Thomas Schmitt | c8b9c9a244 | |
Thomas Schmitt | 5903885d45 | |
Thomas Schmitt | 614e36ff21 | |
Thomas Schmitt | 74d9160401 | |
Thomas Schmitt | 3c8f270099 | |
Thomas Schmitt | e2c71a34d0 | |
Thomas Schmitt | cb597ec570 | |
Thomas Schmitt | a6328e82fc | |
Thomas Schmitt | 901939986a | |
Thomas Schmitt | 8828d6f465 | |
Thomas Schmitt | 7066fd4e2f | |
Thomas Schmitt | 4db0aab0cb | |
Thomas Schmitt | fe5fd8eefa | |
Thomas Schmitt | 06346c1e98 | |
Thomas Schmitt | 3eba8cc921 | |
Thomas Schmitt | b356291700 | |
Thomas Schmitt | e17db6aa3e | |
Thomas Schmitt | 56a596208c | |
Thomas Schmitt | fb61be034f | |
Thomas Schmitt | e3ff5a971f | |
Thomas Schmitt | 321a0476fa | |
Thomas Schmitt | 397551f9d4 | |
Thomas Schmitt | 3b0abc14c0 | |
Thomas Schmitt | c0ad17b2d0 | |
Thomas Schmitt | 31450dcc93 | |
Thomas Schmitt | aa50f5cc2f | |
Thomas Schmitt | 1eb51f44da | |
Thomas Schmitt | 95c2e7cbda | |
Thomas Schmitt | 3a2a3ba737 | |
Thomas Schmitt | 5b62c55d12 | |
Thomas Schmitt | 1f8d9c7a44 | |
Thomas Schmitt | e9a424add1 | |
Thomas Schmitt | 1ff09139d4 | |
Thomas Schmitt | 720d28940c | |
Thomas Schmitt | 0722502075 | |
Thomas Schmitt | 7a1cac338f | |
Thomas Schmitt | fc71cec8f7 | |
Thomas Schmitt | caf38e81ae | |
Thomas Schmitt | 122e43da86 | |
Thomas Schmitt | c56842e9a6 | |
Thomas Schmitt | b8ee16af4a | |
Thomas Schmitt | ff68bda006 | |
Thomas Schmitt | 9cfd466b8f | |
Thomas Schmitt | 22aa52ba17 | |
Thomas Schmitt | 1002df950d | |
Thomas Schmitt | 05732a210b | |
Thomas Schmitt | 1efe7aaea6 | |
Thomas Schmitt | c338597dd7 | |
Thomas Schmitt | c2b33f4d64 | |
Thomas Schmitt | 08355f7246 |
108
ChangeLog
108
ChangeLog
|
@ -1,3 +1,111 @@
|
|||
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.
|
||||
* 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 -as mkisofs options -cut_out and -hide_iso_path
|
||||
* Improved handling of hidden boot images in -boot_image cmd/as_mkisofs/replay
|
||||
|
||||
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
|
||||
partition and forced boot flag as -part_like_isohybrid
|
||||
* Bug fix: Boot catalog could get a wrong name if cat_path= is explicitely
|
||||
given but not containing a slash character
|
||||
* New helper script xorriso-dd-target
|
||||
* New command -truncate_overwritable
|
||||
* Switched to usage of libjte-2.0.0
|
||||
* New -jigdo parameters "checksum_algorithm", "demand_checksum",
|
||||
"-checksum-list"
|
||||
* New -as mkisofs options "-jigdo-checksum-algorithm", "-checksum-list",
|
||||
"-jigdo-force-checksum"
|
||||
* New -read_speed prefixes "soft_force:" and "soft_corr:"
|
||||
* New -check_media option data_to="-" for standard output
|
||||
* New -zisofs parameters version_2=, block_size_v2=, max_bpt=, max_bpt_f=,
|
||||
bpt_target=, bpt_free_ratio=, by_magic=v2, susp_z2=
|
||||
* New -as mkisofs options --zisofs-version-2, --zisofs2-susp-z2,
|
||||
--zisofs2-susp-zf
|
||||
* Enabled recognition of zisofs by magic without zlib support
|
||||
* New -osirrox option sparse= controls extraction into sparse files
|
||||
* New libisoburn extension options isoburn_ropt_map_joliet_stripped and
|
||||
isoburn_ropt_map_joliet_unmapped
|
||||
* New command -joliet_map
|
||||
* New command -extract_boot_images
|
||||
* New API call isoburn_ropt_get_tree_loaded()
|
||||
|
||||
libisoburn-1.5.2.tar.gz Sat Oct 26 2019
|
||||
===============================================================================
|
||||
* Bug fix: -disk_pattern on -add ./ -- mistook "./" for the root directory
|
||||
Thanks JBThiel.
|
||||
* Bug fix: -disk_pattern on -add "" -- yielded SIGSEGV
|
||||
* Bug fix: -osirrox "concat_split_on" worked only together with -split_size
|
||||
larger than 0. Thanks William Willems.
|
||||
* New command -drive_access, new -as cdrecord option --drive_not_exclusive
|
||||
* New API calls isoburn_igopt_set_part_type_guid(),
|
||||
isoburn_igopt_get_part_type_guid(), isoburn_igopt_set_iso_type_guid(),
|
||||
isoburn_igopt_get_iso_type_guid()
|
||||
* Enabled GPT type GUIDs with -append_partition,
|
||||
-boot_image any iso_mbr_part_type=, and -as mkisofs -iso_mbr_part_type
|
||||
* Made libisoburn and GNU xorriso ready for building out-of-source.
|
||||
Thanks Ross Burton.
|
||||
|
||||
libisoburn-1.5.0.tar.gz Sat Sep 15 2018
|
||||
===============================================================================
|
||||
* Bug fix: Multi-session emulation was not recognized with non-zero partition
|
||||
|
|
28
Makefile.am
28
Makefile.am
|
@ -1,4 +1,8 @@
|
|||
|
||||
# Copyright (C) 2006 - 2008 Vreixo Formoso <metalpain2002@yahoo.es>
|
||||
# Copyright (C) 2008 - 2019 Thomas Schmitt <scdbackup@gmx.net>
|
||||
# Provided under GPL version 2 or later.
|
||||
|
||||
# ts A90315 : LIBBURNIA_PKGCONFDIR is defined OS specific in acinclude.m4
|
||||
# was: pkgconfigdir=$(libdir)/pkgconfig
|
||||
pkgconfigdir=$(LIBBURNIA_PKGCONFDIR)
|
||||
|
@ -176,9 +180,12 @@ xorriso_make_xorriso_1_CFLAGS =
|
|||
xorriso_make_xorriso_1_LDADD =
|
||||
xorriso_make_xorriso_1_SOURCES = xorriso/make_xorriso_1.c
|
||||
|
||||
# A Proof-of-concept for frontends
|
||||
# A Proof-of-concept for frontends, and xorriso-dd-target if on Linux kernel
|
||||
bin_SCRIPTS = \
|
||||
frontend/xorriso-tcltk
|
||||
frontend/xorriso-tcltk \
|
||||
$(XORRISO_DD_TARGET)
|
||||
|
||||
EXTRA_SCRIPTS = xorriso-dd-target/xorriso-dd-target
|
||||
|
||||
|
||||
## ========================================================================= ##
|
||||
|
@ -238,13 +245,25 @@ man_MANS = \
|
|||
xorriso/xorriso.1 \
|
||||
xorriso/xorrisofs.1 \
|
||||
xorriso/xorrecord.1 \
|
||||
xorriso/xorriso-tcltk.1
|
||||
xorriso/xorriso-tcltk.1 \
|
||||
$(XORRISO_DD_TARGET_MAN)
|
||||
|
||||
EXTRA_MANS = xorriso-dd-target/xorriso-dd-target.1
|
||||
|
||||
info_TEXINFOS = \
|
||||
xorriso/xorriso.texi \
|
||||
xorriso/xorrisofs.texi \
|
||||
xorriso/xorrecord.texi \
|
||||
xorriso/xorriso-tcltk.texi
|
||||
xorriso/xorriso-tcltk.texi \
|
||||
xorriso-dd-target/xorriso-dd-target.texi
|
||||
|
||||
# xorriso-dd-target.texi is hardcoded for now because of
|
||||
# Makefile.am: error: texinfo file '@XORRISO_DD_TARGET_TEXI@' has
|
||||
# unrecognized extension
|
||||
# $(XORRISO_DD_TARGET_TEXI)
|
||||
#
|
||||
# EXTRA_TEXINFOS = xorriso-dd-target/xorriso-dd-target.texi
|
||||
|
||||
|
||||
# To have a file in releng_generated_data. If the directory itself is listed
|
||||
# in Makefile.am EXTRA_DIST, then its .svn subdir gets into the tarball.
|
||||
|
@ -266,6 +285,7 @@ EXTRA_DIST = \
|
|||
frontend/sh_on_named_pipes.sh \
|
||||
frontend/xorriso_broker.sh \
|
||||
frontend/grub-mkrescue-sed.sh \
|
||||
xorriso-dd-target/xorriso-dd-target \
|
||||
README \
|
||||
AUTHORS \
|
||||
CONTRIBUTORS \
|
||||
|
|
38
README
38
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.0.tar.gz
|
||||
http://files.libburnia-project.org/releases/libisoburn-1.5.6.tar.gz
|
||||
Copyright (C) 2006-2009 Vreixo Formoso,
|
||||
Copyright (C) 2006-2018 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.0 :
|
||||
- libburn.so.4 , version libburn-1.5.0 or higher
|
||||
- libisofs.so.6 , version libisofs-1.5.0 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.0.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.0.tar.gz
|
||||
cd libisoburn-1.5.0
|
||||
tar xzf libisoburn-1.5.6.tar.gz
|
||||
cd libisoburn-1.5.6
|
||||
|
||||
Within that directory execute:
|
||||
|
||||
|
@ -250,6 +250,23 @@ Note: xorriso by default prefixes "stdio:" to addresses outside the /dev tree
|
|||
if they do not lead to an optical drive device file.
|
||||
|
||||
|
||||
xorriso-dd-target
|
||||
|
||||
libisoburn comes with a script named
|
||||
xorriso-dd-target/xorriso-dd-target
|
||||
which uses the util-linux program lsblk to find suitable hard-disk-like
|
||||
target devices for copying hard-disk bootable ISO images onto them. Such images
|
||||
are offered by GNU/Linux distributions for installing their system.
|
||||
|
||||
xorriso-dd-target gets installed only if ./configure detects to run on a
|
||||
GNU/Linux system. It refuses to start on non-Linux kernels or if program lsblk
|
||||
is not found in /usr/sbin, /sbin, /usr/bin, /bin.
|
||||
|
||||
For introduction, examples, and details see in the build directory
|
||||
man xorriso-dd-target/xorriso-dd-target.1
|
||||
info xorriso-dd-target/xorriso-dd-target.info
|
||||
|
||||
|
||||
Testing
|
||||
|
||||
For automated and manual tests of xorriso's functionality see file
|
||||
|
@ -306,7 +323,7 @@ libburnia-project.org
|
|||
By Mario Danic <mario.danic@gmail.com>,
|
||||
Vreixo Formoso <metalpain2002@yahoo.es>
|
||||
Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright (C) 2006-2018 Mario Danic, Vreixo Formoso, Thomas Schmitt.
|
||||
Copyright (C) 2006-2019 Mario Danic, Vreixo Formoso, Thomas Schmitt.
|
||||
|
||||
We will not raise any legal protest to dynamic linking of our libraries
|
||||
with applications that are not under GPL, as long as they fulfill
|
||||
|
@ -322,3 +339,6 @@ Libburn. By Derek Foreman <derek@signalmarketing.com> and
|
|||
Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
|
||||
libisoburn does not stem from their code.
|
||||
|
||||
The libisoburn release contains xorriso-dd-target
|
||||
Copyright (C) 2019 Nio Wiklund alias sudodus, Thomas Schmitt
|
||||
|
||||
|
|
104
acinclude.m4
104
acinclude.m4
|
@ -1,3 +1,8 @@
|
|||
dnl Copyright (C) 2008 - 2019 Thomas Schmitt <scdbackup@gmx.net>
|
||||
dnl Copyright (C) 2000-2002, 2007-2009 Free Software Foundation, Inc.
|
||||
dnl Provided under GPL version 2 or later.
|
||||
|
||||
|
||||
AC_DEFUN([LIBBURNIA_SET_FLAGS],
|
||||
[
|
||||
case $target_os in
|
||||
|
@ -22,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:'"
|
||||
|
@ -45,6 +51,7 @@ AC_DEFUN([TARGET_SHIZZLE],
|
|||
*-kfreebsd*-gnu*)
|
||||
ARCH=freebsd
|
||||
LIBBURN_ARCH_LIBS=-lcam
|
||||
libburn_check_libcam=yes
|
||||
;;
|
||||
*-solaris*)
|
||||
ARCH=solaris
|
||||
|
@ -56,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
|
||||
])
|
||||
|
||||
|
||||
|
@ -267,12 +278,12 @@ dnl It tests whether -Wl,--version-script=... works with the compiler
|
|||
AC_DEFUN([LIBISOBURN_ASSERT_VERS_LIBS],
|
||||
[
|
||||
libburnia_save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--version-script=libisoburn/libisoburn.ver"
|
||||
LDFLAGS="$LDFLAGS -Wl,--version-script=$srcdir/libisoburn/libisoburn.ver"
|
||||
AC_TRY_LINK([#include <stdio.h>], [printf("Hello\n");],
|
||||
[vers_libs_test="yes"], [vers_libs_test="no"])
|
||||
if test x$vers_libs_test = xyes
|
||||
then
|
||||
LIBLDFLAGS="-Wl,--version-script=libisoburn/libisoburn.ver"
|
||||
LIBLDFLAGS="-Wl,--version-script=$srcdir/libisoburn/libisoburn.ver"
|
||||
fi
|
||||
LDFLAGS="$libburnia_save_LDFLAGS"
|
||||
AC_SUBST(LIBLDFLAGS)
|
||||
|
@ -347,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"
|
||||
|
@ -367,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
|
||||
])
|
||||
|
@ -382,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
|
||||
])
|
||||
|
||||
|
|
53
configure.ac
53
configure.ac
|
@ -1,6 +1,6 @@
|
|||
AC_INIT([libisoburn], [1.5.0], [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=0
|
||||
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 B80915
|
||||
dnl This is the release version 1.5.0 = libisoburn.so.1.107.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 = 108 - 107 = 1 . Library name = libisoburn.so.1.107.0
|
||||
dnl SONAME = 115 - 114 = 1 . Library name = libisoburn.so.1.114.0
|
||||
LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION
|
||||
LT_CURRENT=108
|
||||
LT_AGE=107
|
||||
LT_CURRENT=115
|
||||
LT_AGE=114
|
||||
LT_REVISION=0
|
||||
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
||||
|
||||
|
@ -59,12 +59,12 @@ AC_SUBST(LT_CURRENT_MINUS_AGE)
|
|||
AC_PREFIX_DEFAULT([/usr/local])
|
||||
test "$prefix" = "NONE" && prefix=$ac_default_prefix
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
dnl ts B90405 : Disabled on advise of Ross Burton
|
||||
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
|
||||
|
@ -133,6 +133,23 @@ dnl Important: Must be performed _after_ TARGET_SHIZZLE
|
|||
dnl
|
||||
LIBBURNIA_SET_PKGCONFIG
|
||||
|
||||
dnl xorriso-dd-target is addicted to the Linux kernel and util-linux lsblk
|
||||
if uname -s | grep '^Linux' >/dev/null
|
||||
then
|
||||
XORRISO_DD_TARGET=xorriso-dd-target/xorriso-dd-target
|
||||
XORRISO_DD_TARGET_MAN=xorriso-dd-target/xorriso-dd-target.1
|
||||
XORRISO_DD_TARGET_TEXI=xorriso-dd-target/xorriso-dd-target.texi
|
||||
echo "enabled installation of xorriso-dd-target/xorriso-dd-target"
|
||||
else
|
||||
XORRISO_DD_TARGET=
|
||||
XORRISO_DD_TARGET_MAN=
|
||||
XORRISO_DD_TARGET_TEXI=
|
||||
echo "disabled installation of xorriso-dd-target/xorriso-dd-target"
|
||||
fi
|
||||
AC_SUBST(XORRISO_DD_TARGET)
|
||||
AC_SUBST(XORRISO_DD_TARGET_MAN)
|
||||
AC_SUBST(XORRISO_DD_TARGET_TEXI)
|
||||
|
||||
AC_ARG_ENABLE(libreadline,
|
||||
[ --enable-libreadline Enable use of libreadline by xorriso, default=yes],
|
||||
, enable_libreadline=yes)
|
||||
|
@ -275,11 +292,11 @@ AC_SUBST(ZLIB_DEF)
|
|||
|
||||
dnl ts B00928
|
||||
AC_ARG_ENABLE(libjte,
|
||||
[ --enable-libjte Enable use of libjte by xorriso, default=yes],
|
||||
[ --enable-libjte Enable use of libjte >= 2.0 by xorriso, default=yes],
|
||||
, enable_libjte=yes)
|
||||
if test "x$enable_libjte" = xyes; then
|
||||
LIBJTE_DEF="-DXorriso_with_libjtE"
|
||||
AC_CHECK_HEADER(libjte/libjte.h, AC_CHECK_LIB(jte, libjte_new, , LIBJTE_DEF= ), LIBJTE_DEF= )
|
||||
AC_CHECK_HEADER(libjte/libjte.h, AC_CHECK_LIB(jte, libjte_set_checksum_algorithm, , LIBJTE_DEF= ), LIBJTE_DEF= )
|
||||
else
|
||||
LIBJTE_DEF=
|
||||
fi
|
||||
|
@ -442,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.0
|
||||
LIBISOFS_REQUIRED=1.5.0
|
||||
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
|
||||
|
|
58
doc/faq.wiki
58
doc/faq.wiki
|
@ -9,47 +9,47 @@ Please post your questions to
|
|||
|
||||
Google favorites:
|
||||
|
||||
[xorriso not found](#xorriso_not_found)
|
||||
[xorriso not found](FAQ#xorriso_not_found)
|
||||
|
||||
[xorriso tutorial](#xorriso_tutorial)
|
||||
[xorriso tutorial](FAQ#xorriso_tutorial)
|
||||
|
||||
[xorriso create ISO image](#xorriso_create_iso)
|
||||
[xorriso create ISO image](FAQ#xorriso_create_iso)
|
||||
|
||||
Burning:
|
||||
|
||||
[What is the difference between cdrskin and xorriso ?](#diff_cdrskin_xorriso)
|
||||
[What is the difference between cdrskin and xorriso ?](FAQ#diff_cdrskin_xorriso)
|
||||
|
||||
[What does that SCSI error message mean ?](#scsi_error)
|
||||
[What does that SCSI error message mean ?](FAQ#scsi_error)
|
||||
|
||||
[Why is simultaneous burning with multiple drives so slow ?](#concurrent_burn)
|
||||
[Why is simultaneous burning with multiple drives so slow ?](FAQ#concurrent_burn)
|
||||
|
||||
Imaging:
|
||||
|
||||
[Is there a way to edit files inside the ISO image ?](#edit_files)
|
||||
[Is there a way to edit files inside the ISO image ?](FAQ#edit_files)
|
||||
|
||||
[For which architectures xorriso is able to create bootable images ?](#boot_arch)
|
||||
[For which architectures xorriso is able to create bootable images ?](FAQ#boot_arch)
|
||||
|
||||
[How to enable booting from USB stick ?](#isohybrid)
|
||||
[How to enable booting from USB stick ?](FAQ#isohybrid)
|
||||
|
||||
[What is partition offset feature all about?](#partition_offset)
|
||||
[What is partition offset feature all about?](FAQ#partition_offset)
|
||||
|
||||
[Partition offset bad on Apple ?](#partition_offset_apple)
|
||||
[Partition offset bad on Apple ?](FAQ#partition_offset_apple)
|
||||
|
||||
Development:
|
||||
|
||||
[Where are the APIs of libburnia libraries described ?](#api_specs)
|
||||
[Where are the APIs of libburnia libraries described ?](FAQ#api_specs)
|
||||
|
||||
[I want to write a GUI on the top of libburnia libraries. Any pointers or recommendations ?](#gui_advise)
|
||||
[I want to write a GUI on the top of libburnia libraries. Any pointers or recommendations ?](FAQ#gui_advise)
|
||||
|
||||
Miscellaneous:
|
||||
|
||||
[Where to see examples ?](#example_links)
|
||||
[Where to see examples ?](FAQ#example_links)
|
||||
|
||||
[What personalities are supported by xorriso ?](#xorriso_aliases)
|
||||
[What personalities are supported by xorriso ?](FAQ#xorriso_aliases)
|
||||
|
||||
[What is xorriso dialog mode useful for ?](#xorriso_dialog_mode)
|
||||
[What is xorriso dialog mode useful for ?](FAQ#xorriso_dialog_mode)
|
||||
|
||||
[Why is every second release missing ?](#version_numbers)
|
||||
[Why is every second release missing ?](FAQ#version_numbers)
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
@ -84,7 +84,7 @@ Volunteers are wanted who make a collection of use cases, ask at bug-xorriso
|
|||
for xorriso instructions to fulfill the needs, and describe both in a
|
||||
user-readable manner.
|
||||
|
||||
Up to then, the GUI demo [xorriso-tcltk](https://dev.lovelyhq.com/libburnia/libisoburn/raw/HEAD/frontend/README-tcltk)
|
||||
Up to then, the GUI demo [xorriso-tcltk](https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/frontend/README-tcltk)
|
||||
[(screenshot)](http://www.gnu.org/software/xorriso/xorriso-tcltk-screen.gif)
|
||||
may serve as interactive exploration tool. It needs `xorriso` >= 1.2.6, `Tcl`,
|
||||
`Tk` >= 8.4, optionally Tcl / Tk package `BWidget`.
|
||||
|
@ -232,12 +232,12 @@ supported for systems with EFI firmware with x86 or ARM processor.
|
|||
|
||||
Further it supports machines with MIPS processor from SGI (Big Endian)
|
||||
and DEC (Little Endian), and SUN SPARC machines.
|
||||
(See [libisofs/doc/boot_sectors.txt](https://dev.lovelyhq.com/libburnia/libisofs/raw/HEAD/doc/boot_sectors.txt)
|
||||
(See [libisofs/doc/boot_sectors.txt](https://dev.lovelyhq.com/libburnia/libisofs/raw/branch/master/doc/boot_sectors.txt)
|
||||
for technical details.)
|
||||
|
||||
Examples how to get an impression of the boot equipment of existing ISO 9660
|
||||
images are on the wiki page about xorriso
|
||||
[commands -report_system_area and -report_el_torito](Reportsystemarea).
|
||||
[commands -report_system_area and -report_el_torito](ReportSystemArea).
|
||||
|
||||
##### How to enable booting from USB stick ? <A NAME="isohybrid">
|
||||
|
||||
|
@ -327,10 +327,10 @@ The decisive references are the inclusion headers of the libraries
|
|||
and `<libisoburn/xorriso.h>`.
|
||||
|
||||
Current git versions of these files:
|
||||
[libburn/libburn.h](https://dev.lovelyhq.com/libburnia/libburn/raw/HEAD/libburn/libburn.h) ,
|
||||
[libisofs/libisofs.h](https://dev.lovelyhq.com/libburnia/libisofs/raw/HEAD/libisofs/libisofs.h) ,
|
||||
[libisoburn/libisoburn.h](https://dev.lovelyhq.com/libburnia/libisoburn/raw/HEAD/libisoburn/libisoburn.h) ,
|
||||
[libisoburn/xorriso.h](https://dev.lovelyhq.com/libburnia/libisoburn/raw/HEAD/xorriso/xorriso.h)
|
||||
[libburn/libburn.h](https://dev.lovelyhq.com/libburnia/libburn/raw/branch/master/libburn/libburn.h) ,
|
||||
[libisofs/libisofs.h](https://dev.lovelyhq.com/libburnia/libisofs/raw/branch/master/libisofs/libisofs.h) ,
|
||||
[libisoburn/libisoburn.h](https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/libisoburn/libisoburn.h) ,
|
||||
[libisoburn/xorriso.h](https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/xorriso/xorriso.h)
|
||||
|
||||
##### I want to write a GUI on the top of libburnia libraries. Any pointers or recommendations ? <A NAME="gui_advise">
|
||||
|
||||
|
@ -341,16 +341,16 @@ versa. The xorriso implementation is located inside libisoburn.
|
|||
Each option that is described in
|
||||
[man 1 xorriso](http://www.gnu.org/software/xorriso/man_1_xorriso.html)
|
||||
can be performed by a corresponding C function that is defined in
|
||||
[xorriso.h](https://dev.lovelyhq.com/libburnia/libisoburn/raw/HEAD/xorriso/xorriso.h)
|
||||
[xorriso.h](https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/xorriso/xorriso.h)
|
||||
|
||||
Further there are calls for library startup and shutdown, for problem
|
||||
handling, and for the interpreters of xorriso's command line interface.
|
||||
The xorriso API encapsulates calls to libisofs, libburn, and libisoburn.
|
||||
|
||||
An alternative to the xorriso C API is xorriso dialog mode.
|
||||
[See below](#xorriso_dialog_mode).
|
||||
[See below](FAQ#xorriso_dialog_mode).
|
||||
The script
|
||||
[xorriso-tcltk](https://dev.lovelyhq.com/libburnia/libisoburn/raw/HEAD/frontend/xorriso-tcltk)
|
||||
[xorriso-tcltk](https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/frontend/xorriso-tcltk)
|
||||
demonstrates this approach. It is part of the
|
||||
libisoburn release tarball and of the GNU xorriso tarball.
|
||||
|
||||
|
@ -370,7 +370,7 @@ here.)
|
|||
|
||||
[xorriso examples](http://www.gnu.org/software/xorriso/man_1_xorriso.html#EXAMPLES) ,
|
||||
[cdrskin examples](http://scdbackup.sourceforge.net/man_1_cdrskin_devel.html#EXAMPLES) ,
|
||||
[libburner.c a minimal but complete burn program](https://dev.lovelyhq.com/libburnia/libburn/raw/HEAD/test/libburner.c).
|
||||
[libburner.c a minimal but complete burn program](https://dev.lovelyhq.com/libburnia/libburn/raw/branch/master/test/libburner.c).
|
||||
|
||||
|
||||
##### What personalities are supported by xorriso ? <A NAME="xorriso_aliases">
|
||||
|
@ -405,7 +405,7 @@ every now and then to perform various commands in order to complete
|
|||
complex tasks like image size prediction.
|
||||
|
||||
The script
|
||||
[xorriso-tcltk](https://dev.lovelyhq.com/libburnia/libisoburn/raw/HEAD/frontend/xorriso-tcltk)
|
||||
[xorriso-tcltk](https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/frontend/xorriso-tcltk)
|
||||
demonstrates this approach. It is part of the
|
||||
libisoburn release tarball and of the GNU xorriso tarball.
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ static int await_all_replies(struct boss_state *boss)
|
|||
return(-1);
|
||||
}
|
||||
if (count == 0) {
|
||||
fprintf(stderr, "+++ EOF encounterd by Master process\n");
|
||||
fprintf(stderr, "+++ EOF encountered by Master process\n");
|
||||
return(-2);
|
||||
}
|
||||
for (npt = buf + remainder; npt < buf + count; npt++) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (C) 2015 - 2016
|
||||
# Copyright (C) 2015 - 2022
|
||||
# Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||
# Provided under BSD license: Use, modify, and distribute as you like.
|
||||
|
||||
|
@ -117,6 +117,34 @@ fi
|
|||
# command line.)
|
||||
# Each argument must be a single word. No whitespace. No quotation marks.
|
||||
|
||||
# "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"
|
||||
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
|
||||
|
@ -180,15 +208,99 @@ done
|
|||
if test x"$debug" = xextra
|
||||
then
|
||||
# Show files on disk
|
||||
find "$dir"
|
||||
find "$dir" 2>&1
|
||||
echo 2>&1
|
||||
fi
|
||||
|
||||
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
|
||||
then
|
||||
# Look for 0x55 0xAA in bytes 510 and 511
|
||||
magic=$(dd bs=1 skip=510 count=2 if="$dir"/efi.img 2>/dev/null | \
|
||||
od -c | head -1 | awk '{print $2 " " $3}')
|
||||
if test "$magic" = "U 252"
|
||||
then
|
||||
echo "Performing actions for MKRESCUE_SED_IN_EFI_NO_PT=$efi_zero_inner_pt" >&2
|
||||
dd if=/dev/zero bs=1 seek=446 count=64 conv=notrunc of="$dir"/efi.img
|
||||
did_dd=1
|
||||
if test "$efi_zero_inner_pt" = extra
|
||||
then
|
||||
dd if=/dev/zero bs=1 seek=510 count=2 conv=notrunc of="$dir"/efi.img
|
||||
fi
|
||||
echo >&2
|
||||
fi
|
||||
fi
|
||||
if test "$did_dd" = 0
|
||||
then
|
||||
echo >&2
|
||||
echo "$0 : NOTE : No EFI image found or no MBR signature in it." >&2
|
||||
echo "$0 : NOTE : Will not obey MKRESCUE_SED_IN_EFI_NO_PT=$efi_zero_inner_pt" >&2
|
||||
echo >&2
|
||||
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 \
|
||||
-o x"$mode" = xgpt_appended \
|
||||
-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-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
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$mode" = xmjg
|
||||
then
|
||||
# Exchange arguments for the experimental GRUB2 mjg layout
|
||||
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
|
||||
mv "$dir"/efi.img /tmp/$efi_tmp_name
|
||||
x=$(echo " $*" | sed \
|
||||
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition $partno 0xef \/tmp\/$efi_tmp_name/" \
|
||||
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_${partno}:all:: -no-emul-boot -isohybrid-gpt-basdat/" \
|
||||
|
@ -207,8 +319,6 @@ then
|
|||
elif test x"$mode" = xmbr_only
|
||||
then
|
||||
# Exchange arguments for no-HFS MBR-only layout
|
||||
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
|
||||
mv "$dir"/efi.img /tmp/$efi_tmp_name
|
||||
x=$(echo " $*" | sed \
|
||||
-e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name/" \
|
||||
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot/" \
|
||||
|
@ -228,8 +338,6 @@ then
|
|||
elif test x"$mode" = xmbr_hfs
|
||||
then
|
||||
# Exchange arguments for MBR and HFS+ layout
|
||||
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
|
||||
mv "$dir"/efi.img /tmp/$efi_tmp_name
|
||||
x=$(echo " $*" | sed \
|
||||
-e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name/" \
|
||||
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot/" \
|
||||
|
@ -247,8 +355,6 @@ then
|
|||
elif test x"$mode" = xgpt_appended
|
||||
then
|
||||
# Exchange arguments for no-HFS MBR-only layout
|
||||
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
|
||||
mv "$dir"/efi.img /tmp/$efi_tmp_name
|
||||
x=$(echo " $*" | sed \
|
||||
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name -appended_part_as_gpt -partition_offset 16/" \
|
||||
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot/" \
|
||||
|
@ -275,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
|
||||
|
@ -302,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.
|
@ -43,7 +43,7 @@ export normal_end=0
|
|||
# ---------------- An interpreter for quoted xorriso replies ----------------
|
||||
|
||||
# xorriso commands like -lsl wrap filenames into quotation marks in order
|
||||
# to unambigously represent any character byte except the 0-byte.
|
||||
# to unambiguously represent any character byte except the 0-byte.
|
||||
# This piece of code parses input strings into words by letting xorriso
|
||||
# command -msg_op "parse_silently" do the hard work.
|
||||
# The input strings should be composed by concatenating input lines with
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/wish
|
||||
#
|
||||
# xorriso-tcltk
|
||||
# Copyright (C) 2012 - 2018
|
||||
# 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.0"
|
||||
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
|
||||
|
@ -108,7 +108,7 @@ set reply_pipe_adr ""
|
|||
|
||||
# The command to send (or the command most recently sent)
|
||||
set cmdline ""
|
||||
# Wether to clear the cmdline after sending
|
||||
# Whether to clear the cmdline after sending
|
||||
set cmdline_clear true
|
||||
# Command counter
|
||||
set cmd_sent 0
|
||||
|
@ -182,7 +182,7 @@ set pre_msglist ""
|
|||
# Whether overwriting of files in the ISO model is allowed
|
||||
set overwrite_iso_files 1
|
||||
|
||||
# If overwrite_iso_files is 1: Wether overwriting of ISO directories is allowed
|
||||
# If overwrite_iso_files is 1: Whether overwriting of ISO directories is allowed
|
||||
set overwrite_iso_dirs 0
|
||||
|
||||
# Whether overwriting of files on disk is allowed
|
||||
|
@ -248,7 +248,7 @@ proc init_frontend_named_pipes {cmd_pipe reply_pipe} {
|
|||
set cmd_conn [open $cmd_pipe w]
|
||||
set reply_conn [open $reply_pipe r]
|
||||
|
||||
# Note: disencouraged flags would be necessary for opening idle fifo
|
||||
# Note: dissuaded flags would be necessary for opening idle fifo
|
||||
# set reply_conn [open $reply_pipe {RDONLY NONBLOCK}]
|
||||
|
||||
}
|
||||
|
@ -920,7 +920,7 @@ proc effectuate_permission_policy {} {
|
|||
# and implement the quoting rules of xorriso input and output.
|
||||
# Lines which are supposed to consist of several words get sent to
|
||||
# xorriso command -msg_op. The result lines of this command encode
|
||||
# the words unambigously in one or more text lines.
|
||||
# the words unambiguously in one or more text lines.
|
||||
# This is supposed to be safe for even the weirdest file names.
|
||||
# Only NUL characters cannot be part of names.
|
||||
|
||||
|
@ -3519,7 +3519,7 @@ set isolist_lines 8
|
|||
# Whether the message box shall export its selection to the whole X display
|
||||
set export_msg_selection true
|
||||
|
||||
# Wether the item lists shall export their selection
|
||||
# Whether the item lists shall export their selection
|
||||
set export_selection false
|
||||
|
||||
# The number of lines in the display of the help texts
|
||||
|
@ -4333,7 +4333,7 @@ proc bind_help {to_what help_name} {
|
|||
}
|
||||
|
||||
|
||||
# Create a "/" button and wire it with variable, fileystem type, and help text.
|
||||
# Create a "/" button and wire it with variable, filesystem type,and help text.
|
||||
#
|
||||
proc create_browser_button {button_name var_name which_fs help_name} {
|
||||
global have_bwidget
|
||||
|
@ -4609,7 +4609,7 @@ standard error. Else it must not yet exist or be a writable data file.
|
|||
The \"Log pipes\" switch controls whether all xorriso commands and replies
|
||||
shall be logged to standard error or to the file that has been given
|
||||
with program argument --pipe_log_file.
|
||||
Caution: This log is verbous.
|
||||
Caution: This log is verbose.
|
||||
|
||||
The item \"Set pipe log address\" pops up a file tree browser window
|
||||
which asks for the target of pipe logging . Address \"-\" means
|
||||
|
@ -5396,7 +5396,7 @@ proc make_text_shellsafe {text} {
|
|||
}
|
||||
|
||||
|
||||
# Count the number of newline chracters in text.
|
||||
# Count the number of newline characters in text.
|
||||
#
|
||||
proc count_newlines {text} {
|
||||
set rest $text
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
||||
|
@ -99,7 +99,7 @@ int isoburn_initialize(char msg[1024], int flag)
|
|||
error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisofs_dot_h_TOO_OLD__SEE_libisoburn_dot_h_AND_burn_wrap_dot_h' undeclared (first use in this function)
|
||||
error: 'LIBISOFS_MISCONFIGURATION_' undeclared (first use in this function)
|
||||
*/
|
||||
/* The indendation is an advise of man gcc to help old compilers ignoring */
|
||||
/* The indentation is an advise of man gcc to help old compilers ignoring */
|
||||
#if isoburn_libisofs_req_major > iso_lib_header_version_major
|
||||
#define Isoburn_libisofs_dot_h_too_olD 1
|
||||
#endif
|
||||
|
@ -136,7 +136,7 @@ LIBISOFS_MISCONFIGURATION_ = 0;
|
|||
error: 'LIBBURN_MISCONFIGURATION_' undeclared (first use in this function)
|
||||
*/
|
||||
|
||||
/* The indendation is an advise of man gcc to help old compilers ignoring */
|
||||
/* The indentation is an advise of man gcc to help old compilers ignoring */
|
||||
#if isoburn_libburn_req_major > burn_header_version_major
|
||||
#define Isoburn_libburn_dot_h_too_olD 1
|
||||
#endif
|
||||
|
@ -161,7 +161,7 @@ LIBBURN_MISCONFIGURATION_ = 0;
|
|||
So the requirement is defined in libisofs/libisofs.h :
|
||||
iso_libjte_req_major , iso_libjte_req_minor , iso_libjte_req_micro
|
||||
*/
|
||||
/* The indendation is an advise of man gcc to help old compilers ignoring */
|
||||
/* The indentation is an advise of man gcc to help old compilers ignoring */
|
||||
#if iso_libjte_req_major > LIBJTE_VERSION_MAJOR
|
||||
#define Libisofs_libjte_dot_h_too_olD 1
|
||||
#endif
|
||||
|
@ -333,10 +333,10 @@ int isoburn_is_intermediate_dvd_rw(struct burn_drive *d, int flag)
|
|||
|
||||
|
||||
/** Examines the medium and sets appropriate emulation if needed.
|
||||
@param flag bit0= pretent blank on overwriteable media
|
||||
@param flag bit0= pretent blank on overwritable media
|
||||
bit3= if the drive reports a -ROM profile then try to read
|
||||
table of content by scanning for ISO image headers.
|
||||
bit4= do not emulate TOC on overwriteable media
|
||||
bit4= do not emulate TOC on overwritable media
|
||||
bit5= ignore ACL from external filesystems
|
||||
bit6= ignore POSIX Extended Attributes from external filesystems
|
||||
bit7= pretend -ROM and scan for table of content
|
||||
|
@ -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);
|
||||
|
@ -401,7 +401,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
|||
random_access= caps->start_adr || role == 4;
|
||||
if(random_access)
|
||||
(*o)->emulation_mode= 1;
|
||||
if(random_access && !readonly) { /* set emulation to overwriteable */
|
||||
if(random_access && !readonly) { /* set emulation to overwritable */
|
||||
ret= isoburn_is_intermediate_dvd_rw(d, 0);
|
||||
if(ret>0) {
|
||||
(*o)->min_start_byte= 0;
|
||||
|
@ -437,14 +437,14 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
|||
*/
|
||||
(*o)->fabricated_disc_status= BURN_DISC_FULL;
|
||||
|
||||
/* This might be an overwriteable medium in a -ROM drive.
|
||||
/* This might be an overwritable medium in a -ROM drive.
|
||||
Pitfall:
|
||||
Multi-session media which bear a xorriso image for overwriteables
|
||||
Multi-session media which bear a xorriso image for overwritables
|
||||
in their first session would get a TOC of that first image rather
|
||||
than of the medium.
|
||||
It is not possible to distinguish a BD-RE from a single session
|
||||
BD-R with an image for overwriteables. But as soon as the medium
|
||||
bears 2 logical tracks it cannot be overwriteable.
|
||||
BD-R with an image for overwritables. But as soon as the medium
|
||||
bears 2 logical tracks it cannot be overwritable.
|
||||
So count the number of tracks first.
|
||||
*/
|
||||
disc= isoburn_toc_drive_get_disc(d);
|
||||
|
@ -463,7 +463,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
|||
isoburn_msgs_submit(*o, 0x00060000, msg, 0, "DEBUG", 0);
|
||||
|
||||
if((flag & 16) || track_count >= 2) {
|
||||
ret= 0; /* toc emulation off, or not overwriteable */
|
||||
ret= 0; /* toc emulation off, or not overwritable */
|
||||
} else {
|
||||
ret= isoburn_start_emulation(*o, 1);
|
||||
if(ret<=0) {
|
||||
|
@ -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)
|
||||
|
@ -524,14 +524,14 @@ ex:
|
|||
|
||||
/**
|
||||
@param flag bit0= load
|
||||
bit1= regard overwriteable media as blank
|
||||
bit1= regard overwritable media as blank
|
||||
bit2= if the drive is a regular disk file: truncate it to
|
||||
the write start address
|
||||
bit3= if the drive reports a -ROM profile then try to read
|
||||
table of content by scanning for ISO image headers.
|
||||
(depending on media type and drive state this might
|
||||
help or it might make the resulting toc even worse)
|
||||
bit4= do not emulate TOC on overwriteable media
|
||||
bit4= do not emulate TOC on overwritable media
|
||||
bit5= ignore ACL from external filesystems
|
||||
bit6= ignore POSIX Extended Attributes from external filesystems
|
||||
bit7= pretend -ROM profile and scan for table of content
|
||||
|
@ -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;
|
||||
|
@ -1473,8 +1541,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||
read_flag|= (1<<15)|((session_count>0)<<14);
|
||||
else {
|
||||
|
||||
/* growisofs aligns to 16 rather than 32. Overwriteable TOC emulation
|
||||
relies on not accidentially seeing inter-session trash data.
|
||||
/* growisofs aligns to 16 rather than 32. Overwritable TOC emulation
|
||||
relies on not accidentally seeing inter-session trash data.
|
||||
But one can safely access 16 blocks earlier because a xorriso header
|
||||
would have been overwritten with the unused 16 blocks at its start.
|
||||
If libisoburn alignment would increase, then this would not be
|
||||
|
@ -1486,7 +1554,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 +1571,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 +1589,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 +1628,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 +1793,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 +1828,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 +1842,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 +1867,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 +1882,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 +1911,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 +1942,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 +1974,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 +2007,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 +2042,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 +2085,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 +2112,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 +2178,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 +2207,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 +2256,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 +2299,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 +2313,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);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
/*
|
||||
Class core of libisoburn.
|
||||
|
||||
Copyright 2007 - 2017 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
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) {
|
||||
|
@ -554,11 +562,16 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
|
|||
0, "FAILURE", 0);
|
||||
{ret= -1; goto ex;}
|
||||
}
|
||||
iso_write_opts_set_part_type_guid(wopts, i + 1,
|
||||
opts->appended_part_type_guids[i],
|
||||
opts->appended_part_gpt_flags[i] & 1);
|
||||
}
|
||||
iso_write_opts_set_appended_as_gpt(wopts, opts->appended_as_gpt);
|
||||
iso_write_opts_set_appended_as_apm(wopts, opts->appended_as_apm);
|
||||
iso_write_opts_set_part_like_isohybrid(wopts, opts->part_like_isohybrid);
|
||||
iso_write_opts_set_iso_mbr_part_type(wopts, opts->iso_mbr_part_type);
|
||||
iso_write_opts_set_iso_type_guid(wopts, opts->iso_gpt_type_guid,
|
||||
opts->iso_gpt_flag & 1);
|
||||
iso_write_opts_set_disc_label(wopts, opts->ascii_disc_label);
|
||||
|
||||
ret= 1;
|
||||
|
@ -583,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;
|
||||
|
||||
|
@ -681,10 +694,10 @@ 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. propertly clean-up on error */
|
||||
/* TODO check return values for failure. properly clean-up on error */
|
||||
|
||||
out_o->iso_source= wsrc;
|
||||
|
||||
|
@ -730,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;
|
||||
|
@ -755,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
|
||||
|
@ -851,6 +877,8 @@ int isoburn_ropt_new(struct isoburn_read_opts **new_o, int flag)
|
|||
o->noiso1999= 1;
|
||||
o->do_ecma119_map= 0;
|
||||
o->map_mode= 1;
|
||||
o->do_joliet_map= 0;
|
||||
o->joliet_map_mode= 1;
|
||||
o->noaaip= 1;
|
||||
o->noacl= 1;
|
||||
o->noea= 1;
|
||||
|
@ -953,6 +981,8 @@ int isoburn_ropt_set_extensions(struct isoburn_read_opts *o, int ext)
|
|||
o->nomd5= (ext >> 9) & 3;
|
||||
o->do_ecma119_map= !!(ext & 2048);
|
||||
o->map_mode= (ext >> 12) & 3;
|
||||
o->do_joliet_map= !!(ext & 16384);
|
||||
o->joliet_map_mode= !!(ext & 32768);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
@ -963,7 +993,8 @@ int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext)
|
|||
((!!o->preferjoliet)<<3) | ((!!o->pretend_blank)<<4) |
|
||||
((!!o->noaaip) << 5) | ((!!o->noacl) << 6) | ((!!o->noea) << 7) |
|
||||
((!!o->noino) << 8) | ((o->nomd5 & 3) << 9) |
|
||||
((!!o->do_ecma119_map) << 11) | ((o->map_mode & 3) << 12);
|
||||
((!!o->do_ecma119_map) << 11) | ((o->map_mode & 3) << 12) |
|
||||
((!!o->do_joliet_map) << 14) | ((!!o->joliet_map_mode) << 15);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
@ -1096,6 +1127,15 @@ int isoburn_ropt_get_size_what(struct isoburn_read_opts *o,
|
|||
}
|
||||
|
||||
|
||||
int isoburn_ropt_get_tree_loaded(struct isoburn_read_opts *o,
|
||||
int *tree, int *rr)
|
||||
{
|
||||
*tree= o->tree_loaded;
|
||||
*rr= o->rr_loaded;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/*
|
||||
Options for image generation by libisofs and image transport to libburn.
|
||||
|
@ -1176,6 +1216,8 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
|
|||
o->appended_partitions[i]= NULL;
|
||||
o->appended_part_types[i]= 0;
|
||||
o->appended_part_flags[i]= 0;
|
||||
memset(o->appended_part_type_guids[i], 0, 16);
|
||||
o->appended_part_gpt_flags[i]= 0;
|
||||
}
|
||||
o->appended_as_gpt= 0;
|
||||
o->appended_as_apm= 0;
|
||||
|
@ -1183,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;
|
||||
|
@ -1472,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)
|
||||
{
|
||||
|
@ -1528,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);
|
||||
}
|
||||
|
||||
|
@ -1781,6 +1862,48 @@ int isoburn_igopt_get_appended_as_gpt(struct isoburn_imgen_opts *opts,
|
|||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_part_type_guid(struct isoburn_imgen_opts *opts,
|
||||
int partition_number, uint8_t guid[16],
|
||||
int valid)
|
||||
{
|
||||
char msg[80];
|
||||
|
||||
if (partition_number < 1 ||
|
||||
partition_number > Libisoburn_max_appended_partitionS) {
|
||||
sprintf(msg, "Partition number is out of range (1 ... %d)",
|
||||
Libisoburn_max_appended_partitionS);
|
||||
isoburn_msgs_submit(NULL, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
}
|
||||
if(valid)
|
||||
memcpy(opts->appended_part_type_guids[partition_number - 1], guid, 16);
|
||||
if(valid)
|
||||
opts->appended_part_gpt_flags[partition_number - 1]|= 1;
|
||||
else
|
||||
opts->appended_part_gpt_flags[partition_number - 1]&= ~1;
|
||||
return(1);
|
||||
}
|
||||
|
||||
int isoburn_igopt_get_part_type_guid(struct isoburn_imgen_opts *opts,
|
||||
int num_entries, uint8_t guids[][16],
|
||||
int valids[])
|
||||
{
|
||||
int i, max_entry= 0;
|
||||
|
||||
for(i= 0; i < num_entries; i++) {
|
||||
memset(guids[i], 0, 16);
|
||||
valids[i]= 0;
|
||||
}
|
||||
for(i= 0; i < Libisoburn_max_appended_partitionS; i++) {
|
||||
if(i < num_entries) {
|
||||
memcpy(guids[i], opts->appended_part_type_guids[i], 16);
|
||||
valids[i]= opts->appended_part_gpt_flags[i] & 1;
|
||||
}
|
||||
max_entry= i + 1;
|
||||
}
|
||||
return(max_entry);
|
||||
}
|
||||
|
||||
int isoburn_igopt_set_appended_as_apm(struct isoburn_imgen_opts *opts, int apm)
|
||||
{
|
||||
opts->appended_as_apm= !!apm;
|
||||
|
@ -1830,6 +1953,24 @@ int isoburn_igopt_get_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
|
|||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_iso_type_guid(struct isoburn_imgen_opts *opts,
|
||||
uint8_t guid[16], int valid)
|
||||
{
|
||||
if(valid)
|
||||
memcpy(opts->iso_gpt_type_guid, guid, 16);
|
||||
opts->iso_gpt_flag= (opts->iso_gpt_flag & ~1) | !!valid;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_get_iso_type_guid(struct isoburn_imgen_opts *opts,
|
||||
uint8_t guid[16])
|
||||
{
|
||||
memcpy(guid, opts->iso_gpt_type_guid, 16);
|
||||
return(opts->iso_gpt_flag & 1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_igopt_set_gpt_guid(struct isoburn_imgen_opts *opts,
|
||||
uint8_t guid[16], int mode)
|
||||
{
|
||||
|
@ -1856,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);
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
/*
|
||||
Class struct of libisoburn.
|
||||
|
||||
Copyright 2007 - 2017 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
and Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
Copyright 2007 - 2024 Thomas Schmitt <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
*/
|
||||
|
||||
|
@ -20,15 +21,15 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* For emulated TOC of overwriteable media.
|
||||
/* For emulated TOC of overwritable media.
|
||||
Provides minimal info for faking a struct burn_toc_entry.
|
||||
*/
|
||||
struct isoburn_toc_entry {
|
||||
int session;
|
||||
int track_no; /* point */
|
||||
int start_lba;
|
||||
int track_blocks;
|
||||
char *volid; /* For caching a volume id from emulated toc on overwriteables */
|
||||
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;
|
||||
};
|
||||
|
@ -81,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 overwriteable
|
||||
/* 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 */
|
||||
|
@ -117,11 +118,11 @@ struct isoburn {
|
|||
int media_read_error;
|
||||
|
||||
/* Eventual emulated table of content read from the chain of ISO headers
|
||||
on overwriteable media.
|
||||
on overwritable media.
|
||||
*/
|
||||
struct isoburn_toc_entry *toc;
|
||||
|
||||
/* Indicator wether the most recent burn run worked :
|
||||
/* Indicator whether the most recent burn run worked :
|
||||
-1 = undetermined, ask libburn , 0 = failure , 1 = success
|
||||
To be inquired by isoburn_drive_wrote_well()
|
||||
*/
|
||||
|
@ -141,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.
|
||||
*/
|
||||
|
@ -255,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.
|
||||
|
@ -325,6 +326,9 @@ struct isoburn_read_opts {
|
|||
unsigned int do_ecma119_map:1; /* call iso_read_opts_set_ecma119_map() */
|
||||
unsigned int map_mode:2; /* argument for do_ecma119_map */
|
||||
|
||||
unsigned int do_joliet_map:1; /* call iso_read_opts_set_joliet_map() */
|
||||
unsigned int joliet_map_mode:1; /* for iso_read_opts_set_joliet_map */
|
||||
|
||||
/* ts A90121 */
|
||||
unsigned int noaaip:1; /* Do not read AAIP for ACL and EA */
|
||||
unsigned int noacl:1; /* Do not read ACL from external file objects */
|
||||
|
@ -384,6 +388,11 @@ struct isoburn_read_opts {
|
|||
|
||||
uint32_t size; /**< Will be filled with the size (in 2048 byte block) of
|
||||
* the image, as reported in the PVM. */
|
||||
|
||||
int tree_loaded; /* from iso_read_image_features_tree_loaded() */
|
||||
int rr_loaded; /* from iso_read_image_features_rr_loaded */
|
||||
|
||||
|
||||
unsigned int pretend_blank:1; /* always create empty image */
|
||||
|
||||
uint32_t displacement;
|
||||
|
@ -426,7 +435,7 @@ struct isoburn_imgen_opts {
|
|||
*/
|
||||
unsigned int file_md5 :2;
|
||||
|
||||
/* On overwriteable media or random access files do not write the first
|
||||
/* On overwritable media or random access files do not write the first
|
||||
session to LBA 32, but rather to LBA 0 directly.
|
||||
*/
|
||||
unsigned int no_emul_toc :1;
|
||||
|
@ -620,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
|
||||
|
@ -691,12 +700,19 @@ struct isoburn_imgen_opts {
|
|||
char *efi_boot_partition;
|
||||
int efi_boot_part_flag;
|
||||
|
||||
/* Eventual disk file paths of prepared images which shall be appended
|
||||
after the ISO image and described by partiton table entries in a MBR.
|
||||
/* Disk file paths of prepared images which shall be appended
|
||||
after the ISO image and described by partition table entries in a MBR.
|
||||
NULL means unused.
|
||||
*/
|
||||
char *appended_partitions[Libisoburn_max_appended_partitionS];
|
||||
uint8_t appended_part_types[Libisoburn_max_appended_partitionS];
|
||||
int appended_part_flags[Libisoburn_max_appended_partitionS];
|
||||
uint8_t appended_part_type_guids[Libisoburn_max_appended_partitionS][16];
|
||||
|
||||
/* Flags in case that appended partitions show up in GPT:
|
||||
bit0= appended_part_type_guids[same_index] is valid
|
||||
*/
|
||||
uint8_t appended_part_gpt_flags[Libisoburn_max_appended_partitionS];
|
||||
|
||||
/* If 1: With appended partitions: create protective MBR and mark by GPT
|
||||
*/
|
||||
|
@ -714,6 +730,13 @@ struct isoburn_imgen_opts {
|
|||
*/
|
||||
int iso_mbr_part_type;
|
||||
|
||||
/* isoburn_igopt_set_iso_type_guid()
|
||||
*/
|
||||
uint8_t iso_gpt_type_guid[16];
|
||||
/* bit0= iso_gpt_type_guid is valid
|
||||
*/
|
||||
int iso_gpt_flag;
|
||||
|
||||
/* See libisoburn.h isoburn_igopt_set_gpt_guid()
|
||||
*/
|
||||
uint8_t gpt_guid[16];
|
||||
|
@ -746,10 +769,13 @@ 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;
|
||||
};
|
||||
|
||||
|
||||
/* Alignment for session starts on overwriteable media.
|
||||
/* Alignment for session starts on overwritable media.
|
||||
(Increased from 16 to 32 blocks for aligning to BD-RE clusters.)
|
||||
*/
|
||||
#define Libisoburn_nwa_alignemenT 32
|
||||
|
@ -789,7 +815,7 @@ struct isoburn_imgen_opts {
|
|||
((off_t) (Libisoburn_target_head_sizE/2048))
|
||||
|
||||
|
||||
/* Wrappers for emulation of TOC on overwriteable media */
|
||||
/* Wrappers for emulation of TOC on overwritable media */
|
||||
|
||||
struct isoburn_toc_track {
|
||||
/* Either track or toc_entry are supposed to be NULL */
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
/*
|
||||
libisofs related functions of libisoburn.
|
||||
|
||||
Copyright 2007 - 2017 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
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,71 +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);
|
||||
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)
|
||||
|
@ -330,6 +398,8 @@ displacement_rollover:;
|
|||
read_opts->hasIso1999 = iso_read_image_features_has_iso1999(features);
|
||||
read_opts->hasElTorito = iso_read_image_features_has_eltorito(features);
|
||||
read_opts->size = iso_read_image_features_get_size(features);
|
||||
read_opts->tree_loaded = iso_read_image_features_tree_loaded(features);
|
||||
read_opts->rr_loaded = iso_read_image_features_rr_loaded(features);
|
||||
ret= 1;
|
||||
ex:;
|
||||
if(msg != NULL)
|
||||
|
@ -342,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)
|
||||
|
@ -367,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;
|
||||
|
@ -384,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)
|
||||
|
@ -436,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.
|
||||
|
@ -445,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;
|
||||
|
@ -467,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))
|
||||
|
@ -532,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;
|
||||
|
@ -560,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;}
|
||||
|
@ -575,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) {
|
||||
|
@ -675,22 +966,22 @@ int isoburn_invalidate_iso(struct isoburn *o, int flag)
|
|||
/*
|
||||
* replace CD001 with CDXX1 in PVM.
|
||||
*/
|
||||
strncpy(head + 16 * 2048 + 1, "CDXX1", 5);
|
||||
memcpy(head + 16 * 2048 + 1, "CDXX1", 5);
|
||||
|
||||
/* Invalidate further ECMA-119 volume descriptors and possible UDF volume
|
||||
recognition sequence */
|
||||
for(i= 17 * 2048; i < 32 * 2048; i+= 2048) {
|
||||
if(end_ed_found) {
|
||||
if(head[i] == 0 && strncmp(head + i + 1, "BEA01", 5) == 0)
|
||||
strncpy(head + i + 1, "BEAX1", 5);
|
||||
memcpy(head + i + 1, "BEAX1", 5);
|
||||
else if(head[i] == 0 && strncmp(head + i + 1, "NSR", 3) == 0)
|
||||
strncpy(head + i + 1, "NSRX", 4);
|
||||
memcpy(head + i + 1, "NSRX", 4);
|
||||
else if(head[i] == 0 && strncmp(head + i + 1, "TEA", 3) == 0)
|
||||
strncpy(head + i + 1, "TEAX", 4);
|
||||
memcpy(head + i + 1, "TEAX", 4);
|
||||
} else if(strncmp(head + i + 1, "CD001", 5) == 0) {
|
||||
if(((unsigned char *) head)[i] == 0xff)
|
||||
end_ed_found= 1;
|
||||
strncpy(head + i + 3, "XX", 2);
|
||||
memcpy(head + i + 3, "XX", 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
/*
|
||||
Lower level API definition of libisoburn.
|
||||
|
||||
Copyright 2007-2018 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
and Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright 2007-2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
|
||||
Copyright 2007-2024 Thomas Schmitt <scdbackup@gmx.net>
|
||||
Provided under GPL version 2 or later.
|
||||
*/
|
||||
|
||||
|
@ -93,13 +93,13 @@ the setup for several alternative image generation strategies.
|
|||
|
||||
Growing:
|
||||
If input and output drive are the same, then isoburn_prepare_disc() is to
|
||||
be used. It will lead to an add-on session on appendable or overwriteable
|
||||
be used. It will lead to an add-on session on appendable or overwritable
|
||||
media with existing ISO image. With blank media it will produce a first
|
||||
session.
|
||||
|
||||
Modifying:
|
||||
If the output drive is not the input drive, and if it bears blank media
|
||||
or overwriteable without a valid ISO image, then one may produce a consolidated
|
||||
or overwritable without a valid ISO image, then one may produce a consolidated
|
||||
image with old and new data. This will copy file data from an eventual input
|
||||
drive with valid image, add any newly introduced data from the local
|
||||
filesystem, and produce a first session on output media.
|
||||
|
@ -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.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -206,7 +208,7 @@ int isoburn_initialize(char msg[1024], int flag);
|
|||
@param flag Bitfield for control purposes. Unused yet. Submit 0.
|
||||
@return 1= library can work for caller
|
||||
0= library is not usable in some aspects. Caller must restrict
|
||||
itself to an earlier API version or must not use this libray
|
||||
itself to an earlier API version or must not use this library
|
||||
at all.
|
||||
*/
|
||||
int isoburn_is_compatible(int major, int minor, int micro, int flag);
|
||||
|
@ -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 0
|
||||
#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 0
|
||||
#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 0
|
||||
#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.
|
||||
|
@ -322,7 +322,7 @@ int isoburn_libburn_req(int *major, int *minor, int *micro);
|
|||
/** Usage discussion:
|
||||
|
||||
Some developers of the libburnia project have differing
|
||||
opinions how to ensure the compatibility of libaries
|
||||
opinions how to ensure the compatibility of libraries
|
||||
and applications.
|
||||
|
||||
It is about whether to use at compile time and at runtime
|
||||
|
@ -429,7 +429,7 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
|
|||
to a file object.
|
||||
@param flag bit0= attempt to load the disc tray.
|
||||
Else: failure if not loaded.
|
||||
bit1= regard overwriteable media as blank
|
||||
bit1= regard overwritable media as blank
|
||||
bit2= if the drive is a regular disk file:
|
||||
truncate it to the write start address when writing
|
||||
begins
|
||||
|
@ -437,7 +437,7 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
|
|||
table of content by scanning for ISO image headers.
|
||||
(depending on media type and drive this might
|
||||
help or it might make the resulting toc even worse)
|
||||
bit4= do not emulate table of content on overwriteable media
|
||||
bit4= do not emulate table of content on overwritable media
|
||||
bit5= ignore ACL from external filesystems
|
||||
bit6= ignore POSIX Extended Attributes from external
|
||||
filesystems (xattr)
|
||||
|
@ -548,7 +548,7 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast);
|
|||
digits are expected.
|
||||
0= start lba of last session in TOC, ignore adr_value
|
||||
1= start lba of session number given by adr_value
|
||||
2= start lba of track given number by adr_value
|
||||
2= start lba of track number given by adr_value
|
||||
3= adr_value itself is the lba to be used
|
||||
4= start lba of last session with volume id
|
||||
given by adr_value
|
||||
|
@ -568,9 +568,9 @@ int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/*
|
||||
|
||||
Wrappers for emulation of TOC on overwriteable media
|
||||
Wrappers for emulation of TOC on overwritable media
|
||||
|
||||
Media which match the overwriteable usage model lack of a history of sessions
|
||||
Media which match the overwritable usage model lack of a history of sessions
|
||||
and tracks. libburn will not even hand out a burn_disc object for them and
|
||||
always declare them blank. libisoburn checks for a valid ISO filesystem
|
||||
header at LBA 0 and eventually declares them appendable.
|
||||
|
@ -579,7 +579,7 @@ int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
|
|||
and their LBAs, as it is possible with true multi-session media.
|
||||
|
||||
The following wrappers add the capability to obtain a session and track TOC
|
||||
from emulated multi-session images on overwriteables if the first session
|
||||
from emulated multi-session images on overwritables if the first session
|
||||
was written by libisoburn-0.1.6 or later (i.e. with a header copy at LBA 32).
|
||||
|
||||
Be aware that the structs emitted by these isoburn calls are not compatible
|
||||
|
@ -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.
|
||||
|
@ -719,12 +735,15 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
|
|||
@param d The drive with the medium to inspect
|
||||
@param lba The block number from where to read
|
||||
@param image_blocks Returns the number of 2048 bytes blocks in the session
|
||||
@param info Caller provided memory, enough to take eventual info reply
|
||||
@param info Caller provided memory, enough to take possible info reply
|
||||
@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= @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);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/*
|
||||
|
@ -888,11 +921,11 @@ int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o,
|
|||
written into an ISO image.
|
||||
bit9= nomd5
|
||||
@since 0.4.2
|
||||
Do not load the eventual MD5 checksum array.
|
||||
Do not check eventual session_md5 tags.
|
||||
Do not load the possibly present MD5 checksum array.
|
||||
Do not check possibly present session_md5 tags.
|
||||
bit10= nomd5tag
|
||||
@since 1.0.4
|
||||
Do not check eventual session_md5 tags although bit9
|
||||
Do not check session_md5 tags although bit9
|
||||
is not set.
|
||||
bit11= do_ecma119_map
|
||||
@since 1.4.2
|
||||
|
@ -909,6 +942,18 @@ int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o,
|
|||
or ".;1"
|
||||
2 = uppercase: Like stripped, but map {a-z} to {A-Z}
|
||||
3 = lowercase: Like stripped, but map {A-Z} to {a-z}
|
||||
bit14= do_joliet_map
|
||||
@since 1.5.4
|
||||
Set iso_read_opts_set_joliet_map() to joliet_map_mode
|
||||
rather than relying on the default setting of libisofs.
|
||||
bit15= joliet_map_mode
|
||||
@since 1.5.4
|
||||
How to convert Joliet file names.
|
||||
0 = unmapped: Take name as recorded in Joliet directory
|
||||
record (not suitable for writing them to
|
||||
a new ISO filesystem)
|
||||
1 = stripped: strip off trailing ";1" or ".;1"
|
||||
|
||||
@return 1 success, <=0 failure
|
||||
*/
|
||||
#define isoburn_ropt_norock 1
|
||||
|
@ -926,6 +971,8 @@ int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o,
|
|||
#define isoburn_ropt_map_stripped ( 2048 | 4096 )
|
||||
#define isoburn_ropt_map_uppercase ( 2048 | 8192 )
|
||||
#define isoburn_ropt_map_lowercase ( 2048 | 12288 )
|
||||
#define isoburn_ropt_joliet_unmapped ( 16384 | 0)
|
||||
#define isoburn_ropt_joliet_stripped ( 16384 | 32768)
|
||||
|
||||
int isoburn_ropt_set_extensions(struct isoburn_read_opts *o, int ext);
|
||||
int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext);
|
||||
|
@ -950,7 +997,7 @@ int isoburn_ropt_get_default_perms(struct isoburn_read_opts *o,
|
|||
gets loaded.
|
||||
Above call isoburn_ropt_set_default_perms() automatically adds
|
||||
x-permissions to r-permissions for directories. This call here may
|
||||
be done afterwards to set independend permissions for directories,
|
||||
be done afterwards to set independent permissions for directories,
|
||||
especially to override the automatically added x-permissions.
|
||||
@since 0.1.0
|
||||
@param o The option set to work on
|
||||
|
@ -1005,9 +1052,9 @@ int isoburn_ropt_get_auto_incharset(struct isoburn_read_opts *o, int *mode);
|
|||
@since 0.6.6
|
||||
@param o The option set to work on
|
||||
@param displacement 0 or a positive number
|
||||
@param displacement_sign Determines wether to add or subtract displacement
|
||||
to block addresses before applying them to the
|
||||
storage object for reading:
|
||||
@param displacement_sign Determines whether to add or subtract
|
||||
displacement to block addresses before applying
|
||||
them to the storage object for reading:
|
||||
+1 = add , -1= subtract , else keep unaltered
|
||||
*/
|
||||
int isoburn_ropt_set_displacement(struct isoburn_read_opts *o,
|
||||
|
@ -1033,7 +1080,7 @@ int isoburn_ropt_get_displacement(struct isoburn_read_opts *o,
|
|||
is longer than parameter length.
|
||||
1= Truncate to length and overwrite the last
|
||||
32 bytes of that length by the hex
|
||||
representation of ithe MD5 of the whole
|
||||
representation of the MD5 of the whole
|
||||
oversized name.
|
||||
Potential incomplete UTF-8 characters will
|
||||
get their leading bytes replaced by '_'.
|
||||
|
@ -1048,8 +1095,9 @@ int isoburn_ropt_get_truncate_mode(struct isoburn_read_opts *o,
|
|||
int *mode, int *length);
|
||||
|
||||
|
||||
/** After calling function isoburn_read_image() there are informations
|
||||
available in the option set.
|
||||
/** After calling function isoburn_read_image() there are information
|
||||
available in the option set about the size and the available extra trees
|
||||
and extensions in the ISO filesystem.
|
||||
This info can be obtained as bits in parameter has_what. Like:
|
||||
joliet_available = (has_what & isoburn_ropt_has_joliet);
|
||||
@since 0.1.0
|
||||
|
@ -1057,12 +1105,13 @@ int isoburn_ropt_get_truncate_mode(struct isoburn_read_opts *o,
|
|||
@param size Number of image data blocks, 2048 bytes each.
|
||||
@param has_what Bitfield:
|
||||
bit0= has_rockridge
|
||||
RockRidge extension info is available (POSIX filesystem)
|
||||
RockRidge extension info is available in the ISO 9660 tree
|
||||
(POSIX filesystem)
|
||||
bit1= has_joliet
|
||||
Joliet extension info is available (suitable for MS-Windows)
|
||||
Joliet tree is available (suitable for MS-Windows)
|
||||
bit2= has_iso1999
|
||||
ISO version 2 Enhanced Volume Descriptor is available.
|
||||
This is rather exotic.
|
||||
ISO version 2 Enhanced Volume Descriptor aka ISO 9660:1999
|
||||
and its tree is available. This is rather exotic.
|
||||
bit3= has_el_torito
|
||||
El-Torito boot record is present
|
||||
@return 1 success, <=0 failure
|
||||
|
@ -1082,6 +1131,19 @@ int isoburn_ropt_get_size_what(struct isoburn_read_opts *o,
|
|||
*/
|
||||
|
||||
|
||||
/** After calling function isoburn_read_image() there are information
|
||||
available in the option set about which tree was used for image loading
|
||||
and whether Rock Ridge information was actually used.
|
||||
@since 1.5.4
|
||||
@param o The option set to work on
|
||||
@param tree The tree which was loaded:
|
||||
0= ISO 9660 , 1 = Joliet , 2 = ISO 9660:1999
|
||||
@param rr 1= Rock Ridge information was used, 0 = No Rock Ridge was used
|
||||
@return 1 success, <=0 failure
|
||||
*/
|
||||
int isoburn_ropt_get_tree_loaded(struct isoburn_read_opts *o,
|
||||
int *tree, int *rr);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/* End of Options for image reading */
|
||||
|
@ -1172,7 +1234,7 @@ int isoburn_igopt_get_level(struct isoburn_imgen_opts *o, int *level);
|
|||
See also libisofs.h iso_write_opts_set_record_md5()
|
||||
bit9= no_emul_toc
|
||||
@since 0.5.8
|
||||
On overwriteable media or random access files do not write
|
||||
On overwritable media or random access files do not write
|
||||
the first session to LBA 32 and do not copy the first 64kB
|
||||
of the first session to LBA 0, but rather write the first
|
||||
session to LBA 0 directly.
|
||||
|
@ -1281,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
|
||||
|
@ -1472,7 +1534,7 @@ int isoburn_igopt_get_over_ugid(struct isoburn_imgen_opts *o,
|
|||
int *replace_uid, int *replace_gid,
|
||||
uid_t *uid, gid_t *gid);
|
||||
|
||||
/** Set the charcter set to use for representing RR filenames in the image.
|
||||
/** Set the character set to use for representing RR filenames in the image.
|
||||
@since 0.1.0
|
||||
@param o The option set to work on
|
||||
@param output_charset Set this to NULL to use the default output charset.
|
||||
|
@ -1513,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,
|
||||
|
@ -1527,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
|
||||
|
@ -1556,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 !
|
||||
|
@ -1626,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,
|
||||
|
@ -1898,7 +1987,6 @@ int isoburn_igopt_set_part_flag(struct isoburn_imgen_opts *opts,
|
|||
int isoburn_igopt_get_part_flags(struct isoburn_imgen_opts *opts,
|
||||
int num_entries, int part_flags[]);
|
||||
|
||||
|
||||
/** Control whether partitions created by iso_write_opts_set_partition_img()
|
||||
are to be represented in MBR or as GPT partitions.
|
||||
@since 1.4.0
|
||||
|
@ -1929,6 +2017,50 @@ int isoburn_igopt_set_appended_as_gpt(struct isoburn_imgen_opts *opts,
|
|||
int isoburn_igopt_get_appended_as_gpt(struct isoburn_imgen_opts *opts,
|
||||
int *gpt);
|
||||
|
||||
/** Set the GPT Type GUID for a partition defined by
|
||||
isoburn_igopt_set_partition_img().
|
||||
@since 1.5.2
|
||||
@param opts
|
||||
The option set to be manipulated.
|
||||
@param partition_number
|
||||
Depicts the partition table entry which shall get the Type GUID.
|
||||
@param guid
|
||||
16 bytes of user supplied GUID. Readily byte-swapped from the text
|
||||
form as prescribed by UEFI specs:
|
||||
4 byte, 2 byte, 2 byte as little-endian.
|
||||
2 byte, 6 byte as big-endian.
|
||||
@param valid
|
||||
Set to 1 to make this Type GUID valid.
|
||||
Set to 0 in order to invalidate a previously made setting. In this
|
||||
case MBR type 0xEF will become the EFI Type GUID. All others will
|
||||
become the Basic Data Partition Type GUID.
|
||||
@return
|
||||
<=0 = error, 1 = success
|
||||
*/
|
||||
int isoburn_igopt_set_part_type_guid(struct isoburn_imgen_opts *opts,
|
||||
int partition_number, uint8_t guid[16],
|
||||
int valid);
|
||||
|
||||
/** Inquire the current settings made by isoburn_igopt_set_part_type_guid().
|
||||
@since 1.5.2
|
||||
@param opts
|
||||
The option set to be inquired.
|
||||
@param num_entries
|
||||
Number of array elements in part_flags[].
|
||||
@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
|
||||
The array elements 0 to num_entries - 1 will get filled by 1 or 0
|
||||
to indicate whether the corresponding type_guids element is valid.
|
||||
@return
|
||||
<0 = error
|
||||
0 = no partition image set
|
||||
>0 highest used partition number
|
||||
*/
|
||||
int isoburn_igopt_get_part_type_guid(struct isoburn_imgen_opts *opts,
|
||||
int num_entries, uint8_t guids[][16],
|
||||
int valids[]);
|
||||
|
||||
/** Control whether partitions created by iso_write_opts_set_partition_img()
|
||||
are to be represented in Apple Partition Map.
|
||||
|
@ -2018,6 +2150,39 @@ int isoburn_igopt_set_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
|
|||
int isoburn_igopt_get_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
|
||||
int *part_type);
|
||||
|
||||
/** Set the GPT Type GUID for the partition which represents the ISO 9660
|
||||
filesystem, if such a partition emerges in GPT.
|
||||
@since 1.5.2
|
||||
@param opts
|
||||
The option set to be manipulated.
|
||||
@param guid
|
||||
16 bytes of user supplied GUID. Readily byte-swapped from the text
|
||||
form as prescribed by UEFI specs:
|
||||
4 byte, 2 byte, 2 byte as little-endian.
|
||||
2 byte, 6 byte as big-endian.
|
||||
@param valid
|
||||
Set to 1 to make this Type GUID valid.
|
||||
Set to 0 in order to invalidate a previously made setting. In this
|
||||
case the setting of isoburn_igopt_set_iso_mbr_part_type() or its
|
||||
default gets into effect.
|
||||
@return
|
||||
<=0 = error, 1 = success
|
||||
*/
|
||||
int isoburn_igopt_set_iso_type_guid(struct isoburn_imgen_opts *opts,
|
||||
uint8_t guid[16], int valid);
|
||||
|
||||
/** Inquire the current setting of isoburn_igopt_set_iso_type_guid().
|
||||
@since 1.5.2
|
||||
@param opts
|
||||
The option set to be inquired.
|
||||
@param guid
|
||||
Gets filled with the 16 bytes of GUID.
|
||||
@return
|
||||
<= error, 0= guid is invalid, 1 = guid is valid
|
||||
*/
|
||||
int isoburn_igopt_get_iso_type_guid(struct isoburn_imgen_opts *opts,
|
||||
uint8_t guid[16]);
|
||||
|
||||
/** Control whether the emerging GPT gets a pseudo-randomly generated disk GUID
|
||||
or whether it gets a user supplied GUID.
|
||||
The partition GUIDs will be generated in a reproducible way by exoring a
|
||||
|
@ -2026,7 +2191,10 @@ int isoburn_igopt_get_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
|
|||
@param opts
|
||||
The option set to be manipulated.
|
||||
@param guid
|
||||
16 bytes of user supplied GUID.
|
||||
16 bytes of user supplied GUID. Readily byte-swapped from the text
|
||||
form as prescribed by UEFI specs:
|
||||
4 byte, 2 byte, 2 byte as little-endian.
|
||||
2 byte, 6 byte as big-endian.
|
||||
The upper 4 bit of guid[6] and guid[7] should bear the value 4 to
|
||||
express the version 4 in both endiannesses. Bit 7 of byte[8] should
|
||||
be set to 1 and bit 6 be set to 0, in order to express the RFC 4122
|
||||
|
@ -2059,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().
|
||||
|
@ -2221,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
|
||||
|
@ -2258,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
|
||||
|
@ -2323,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.
|
||||
|
@ -2353,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
|
||||
|
@ -2386,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.
|
||||
|
@ -2401,9 +2650,16 @@ 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
|
||||
overwriteable media. This value is supposed to be <= 2048 * nwa as of
|
||||
overwritable media. This value is supposed to be <= 2048 * nwa as of
|
||||
isoburn_disc_track_lba_nwa().
|
||||
@since 0.1.0
|
||||
@param d The drive holding the medium.
|
||||
|
@ -2512,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().
|
||||
|
@ -2549,7 +2813,7 @@ int isoburn_set_truncate(struct burn_drive *drive, int flag);
|
|||
|
||||
|
||||
/** Start writing of the new session.
|
||||
This call is asynchrounous. I.e. it returns quite soon and the progress has
|
||||
This call is asynchronous. I.e. it returns quite soon and the progress has
|
||||
to be watched by a loop with call burn_drive_get_status() until
|
||||
BURN_DRIVE_IDLE is returned.
|
||||
Wrapper for: burn_disc_write()
|
||||
|
@ -2648,7 +2912,7 @@ void isoburn_finish(void);
|
|||
*/
|
||||
|
||||
|
||||
/** Inquire wether the medium needs emulation or would be suitable for
|
||||
/** Inquire whether the medium needs emulation or would be suitable for
|
||||
generic multi-session via libburn.
|
||||
@since 0.1.0
|
||||
@param d The drive to inquire
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
LIBISOBURN1 {
|
||||
global:
|
||||
isoburn_activate_session;
|
||||
isoburn_assess_written_features;
|
||||
isoburn_attach_image;
|
||||
isoburn_attach_start_lba;
|
||||
isoburn_conv_name_chars;
|
||||
|
@ -40,12 +41,15 @@ isoburn_igopt_get_gpt_guid;
|
|||
isoburn_igopt_get_hfsp_block_size;
|
||||
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;
|
||||
isoburn_igopt_get_part_flags;
|
||||
isoburn_igopt_get_part_like_isohybrid;
|
||||
isoburn_igopt_get_part_type_guid;
|
||||
isoburn_igopt_get_partition_img;
|
||||
isoburn_igopt_get_prep_partition;
|
||||
isoburn_igopt_get_pvd_times;
|
||||
|
@ -69,12 +73,15 @@ isoburn_igopt_set_gpt_guid;
|
|||
isoburn_igopt_set_hfsp_block_size;
|
||||
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;
|
||||
isoburn_igopt_set_part_flag;
|
||||
isoburn_igopt_set_part_like_isohybrid;
|
||||
isoburn_igopt_set_part_type_guid;
|
||||
isoburn_igopt_set_partition_img;
|
||||
isoburn_igopt_set_prep_partition;
|
||||
isoburn_igopt_set_pvd_times;
|
||||
|
@ -107,6 +114,7 @@ isoburn_ropt_get_displacement;
|
|||
isoburn_ropt_get_extensions;
|
||||
isoburn_ropt_get_input_charset;
|
||||
isoburn_ropt_get_size_what;
|
||||
isoburn_ropt_get_tree_loaded;
|
||||
isoburn_ropt_get_truncate_mode;
|
||||
isoburn_ropt_new;
|
||||
isoburn_ropt_set_auto_incharset;
|
||||
|
@ -167,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;
|
||||
|
@ -205,6 +214,7 @@ Xorriso_option_dialog;
|
|||
Xorriso_option_disk_dev_ino;
|
||||
Xorriso_option_disk_pattern;
|
||||
Xorriso_option_displacement;
|
||||
Xorriso_option_drive_access;
|
||||
Xorriso_option_drive_class;
|
||||
Xorriso_option_dummy;
|
||||
Xorriso_option_dvd_obs;
|
||||
|
@ -216,6 +226,7 @@ Xorriso_option_errfile_log;
|
|||
Xorriso_option_error_behavior;
|
||||
Xorriso_option_external_filter;
|
||||
Xorriso_option_extract;
|
||||
Xorriso_option_extract_boot_images;
|
||||
Xorriso_option_extract_cut;
|
||||
Xorriso_option_file_name_limit;
|
||||
Xorriso_option_file_size_limit;
|
||||
|
@ -230,9 +241,11 @@ Xorriso_option_help;
|
|||
Xorriso_option_hfsplus;
|
||||
Xorriso_option_hide;
|
||||
Xorriso_option_history;
|
||||
Xorriso_option_iso_nowtime;
|
||||
Xorriso_option_iso_rr_pattern;
|
||||
Xorriso_option_jigdo;
|
||||
Xorriso_option_joliet;
|
||||
Xorriso_option_joliet_map;
|
||||
Xorriso_option_launch_frontend;
|
||||
Xorriso_option_list_arg_sorting;
|
||||
Xorriso_option_list_delimiter;
|
||||
|
@ -350,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;
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ libisoburn/releng. By George Danchev <danchev@spnet.net>
|
|||
and Thomas Schmitt <scdbackup@gmx.net>
|
||||
|
||||
Test suite for xorriso and libburnia libraries.
|
||||
Copyright (C) 2011 - 2012 George Danchev, Thomas Schmitt
|
||||
Copyright (C) 2011 - 2012 George Danchev
|
||||
Copyright (C) 2011, 2012, 2019 Thomas Schmitt
|
||||
Provided under GPL version 2 or later.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
@ -33,7 +34,7 @@ can be configured and built. It is not mandatory that libisoburn is already
|
|||
installed. The tests may use an installed xorriso program as well as a
|
||||
freshly built one.
|
||||
|
||||
The test scripts explicitely demand /bin/bash as interpreter, although they
|
||||
The test scripts explicitly demand /bin/bash as interpreter, although they
|
||||
would run on certain other shells too. If you get an error message like
|
||||
./run_all_auto: not found
|
||||
then consider to install /bin/bash.
|
||||
|
@ -120,17 +121,18 @@ the user or require sysadmin considerations before they are run:
|
|||
as one single argument. On Solaris use:
|
||||
--priv_cmd pfexec
|
||||
|
||||
./manual_isojigdo -x ../xorriso/xorriso
|
||||
./manual_isojigdo -x ../xorriso/xorriso [-- [--md5 | --sha256]]
|
||||
Exercises the production of a bootable Debian GNU/Linux image and its Jigdo
|
||||
files. This test downloads a Debian daily image for i386 of about 270 MB,
|
||||
extracts its content and composes a new image. Thus it needs about 850 MB
|
||||
files. This test downloads a Debian daily image for i386 of about 350 MB,
|
||||
extracts its content and composes a new image. Thus it needs about 1100 MB
|
||||
of disk space in releng/releng_generated_data when unpacked. Adding the daily
|
||||
image size itself, the total space used would peak at about 1.2 GB.
|
||||
image size itself, the total space used would peak at about 1.5 GB.
|
||||
This test will only work with GNU xorriso or if libjte was installed already
|
||||
when libisofs was built. Further it needs the program jigit-mkimage. Both
|
||||
are part of package jigit, version >= 1.18, available at:
|
||||
are part of package jigit, version >= 1.22, available at:
|
||||
http://www.einval.com/~steve/software/JTE/
|
||||
Currently jigit builds only in GNU environments.
|
||||
debian-cd currently uses the --md5 format. In future it will use --sha256.
|
||||
|
||||
|
||||
Any auto_* script can be run on its own. Some of them demand option -x.
|
||||
|
@ -139,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:
|
||||
|
@ -188,7 +191,7 @@ Known to be suitable are the following shells
|
|||
Solaris: /bin/bash , /bin/i86/ksh93
|
||||
In general, the shell should have Bourne shell ancestry.
|
||||
|
||||
The script does not choose an interpreter explicitely and is safe to be run
|
||||
The script does not choose an interpreter explicitly and is safe to be run
|
||||
inline:
|
||||
. ./change_shell_to_use
|
||||
One may set any interpreter path by running a sub shell and changing its
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2010, 2011 George Danchev <danchev@spnet.net>
|
||||
# Copyright (c) 2010, 2011 Thomas Schmitt <scdbackup@gmx.net>
|
||||
# Copyright (c) 2010, 2011, 2019 Thomas Schmitt <scdbackup@gmx.net>
|
||||
# This script is distributed according to the terms of the GNU GPL v2.
|
||||
# This should be better rewritten in C at some future point. Ref: pwd code.
|
||||
|
||||
# Create a list of MD5sums encoded in hexidecimal format and print to standard output
|
||||
# Create a list of checksums encoded in hexadecimal format and print to
|
||||
# standard output. Checksum may be MD5 or SHA256.
|
||||
|
||||
# Format Description
|
||||
# A line in the emerging file is to be composed as follows:
|
||||
#
|
||||
# The MD5 checksum of the file content must be encoded in 32 hex digits
|
||||
# The checksum of the file content must be encoded in the aprropriate number
|
||||
# of hex digits.
|
||||
# [0-9afAF]
|
||||
#
|
||||
# Next come two blanks.
|
||||
|
@ -37,35 +39,61 @@
|
|||
# text, like "Debian:".
|
||||
|
||||
# A simple strategy to cope with this is to write absolute paths into the
|
||||
# .md5 file, and to use matching absolute paths in the -jigdo-map
|
||||
# checksum file, and to use matching absolute paths in the -jigdo-map
|
||||
# directives. Keep in mind that mapping is purely literal. Symbolic links
|
||||
# are neither resolved nor can they confuse the mapping.
|
||||
|
||||
set -e
|
||||
|
||||
SELF=jigdo-gen-md5-list
|
||||
VER=0.2
|
||||
VER=0.3
|
||||
|
||||
OPT_ABSOLUTE=1
|
||||
|
||||
# The checksum type to produce: md5 , sha256
|
||||
checksum_type=md5
|
||||
hex_length=32
|
||||
md5_cmd=
|
||||
|
||||
|
||||
# On FreeBSD there is "md5" rather than "md5sum".
|
||||
# Furthermore, the FreeBSD shell reports missing commands to inherited stderr,
|
||||
# regardless that the attempt itself has redirected stderr. Thus a sub shell
|
||||
# is needed to hide the protest.
|
||||
if ( md5sum --help ) >/dev/null 2>&1
|
||||
then
|
||||
md5_cmd=md5sum
|
||||
elif ( md5 -s test ) >/dev/null 2>&1
|
||||
then
|
||||
md5_cmd=md5
|
||||
else
|
||||
echo "$0 : Programs md5sum and md5 failed to work" >&2
|
||||
exit 2
|
||||
fi
|
||||
choose_checksum_cmd() {
|
||||
if test "$checksum_type" = "md5"
|
||||
then
|
||||
if ( md5sum --help ) >/dev/null 2>&1
|
||||
then
|
||||
md5_cmd=md5sum
|
||||
elif ( md5 -s test ) >/dev/null 2>&1
|
||||
then
|
||||
md5_cmd=md5
|
||||
else
|
||||
echo "$0 : Programs md5sum and md5 failed to work" >&2
|
||||
exit 2
|
||||
fi
|
||||
elif test "$checksum_type" = "sha256"
|
||||
then
|
||||
if ( sha256sum --help ) >/dev/null 2>&1
|
||||
then
|
||||
md5_cmd=sha256sum
|
||||
elif ( sha256 -s test ) >/dev/null 2>&1
|
||||
then
|
||||
md5_cmd=sha256
|
||||
else
|
||||
echo "$0 : Programs sha256sum and sha256 failed to work" >&2
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat << USAGE
|
||||
usage: $SELF [option] DIR FILE ...
|
||||
Print a Jigdo checksum file to stdout. One line per FILE and per file in DIR.
|
||||
-m, --md5 produce MD5 checksums (default)
|
||||
-s, --sha256 produce SHA256 checksums
|
||||
-a, --make-absolute make absolute paths, avoiding any symlinks (default)
|
||||
-l, --keep-literal leave paths untouched, literally as supplied
|
||||
-v, --version print version
|
||||
|
@ -100,12 +128,18 @@ md5list() {
|
|||
elif test "$md5_cmd" = "md5"
|
||||
then
|
||||
MD5=`md5 -q "$item"`
|
||||
elif test "$md5_cmd" = "sha256sum"
|
||||
then
|
||||
MD5=`sha256sum "$item" | awk '{print $1}'`
|
||||
elif test "$md5_cmd" = "sha256"
|
||||
then
|
||||
MD5=`sha256 -q "$item"`
|
||||
else
|
||||
echo "$0 : No MD5 program found" >&2
|
||||
echo "$0 : Internal error : Checksum mode unknown : $md5_cmd" >&2
|
||||
exit 2
|
||||
fi
|
||||
SIZ=`ls -ld "$item" | awk '{print $5}'`
|
||||
printf '%32s %12s %s\n' "$MD5" "$SIZ" "$item"
|
||||
printf '%'"$hex_length"'s %12s %s\n' "$MD5" "$SIZ" "$item"
|
||||
}
|
||||
|
||||
walkdir() {
|
||||
|
@ -123,7 +157,17 @@ if test "$1" = "" ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
for i in "$@"
|
||||
do
|
||||
case "$i" in
|
||||
--md5|-m)
|
||||
checksum_type=md5
|
||||
hex_length=32
|
||||
;;
|
||||
--sha256|-s)
|
||||
checksum_type=sha256
|
||||
hex_length=64
|
||||
;;
|
||||
--make-absolute|-a)
|
||||
OPT_ABSOLUTE=1;
|
||||
shift;
|
||||
|
@ -147,12 +191,15 @@ case "$1" in
|
|||
# usage
|
||||
# exit 1
|
||||
# ;;
|
||||
esac
|
||||
esac
|
||||
done
|
||||
choose_checksum_cmd
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
|
||||
if test -d "$i" ; then
|
||||
if echo "$i" | grep '^-' >/dev/null ; then
|
||||
dummy=dummy
|
||||
elif test -d "$i" ; then
|
||||
DR="$i"
|
||||
if test $OPT_ABSOLUTE -eq 1; then
|
||||
od=`pwd -P` # old dir
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
|
||||
.TH JIGDO-GEN-MD5-LIST "1" "October 2010" "jigdo-gen-md5-list 0.1" "User Commands"
|
||||
.SH NAME
|
||||
jigdo-gen-md5-list \- create a list of MD5sums encoded in hexidecimal format and print to standard output
|
||||
jigdo-gen-md5-list \- create a list of MD5sums encoded in hexadecimal format and print to standard output
|
||||
.SH DESCRIPTION
|
||||
usage: jigdo\-gen\-md5\-list [option] DIR FILE ...
|
||||
.TP
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2011 Thomas Schmitt <scdbackup@gmx.net>
|
||||
# Copyright 2011, 2019 Thomas Schmitt <scdbackup@gmx.net>
|
||||
# Copyright 2011 George Danchev <danchev@spnet.net>
|
||||
# Licensed under GNU GPL version 2 or later
|
||||
|
||||
|
@ -16,7 +16,8 @@ not_in_releng_exit() {
|
|||
print_specific_help() {
|
||||
cat << HLP
|
||||
Specific options:
|
||||
none yet.
|
||||
--md5 use MD5 checksums (default)
|
||||
--sha256 use SHA256 checksums
|
||||
Overview:
|
||||
Match the resulting ISO image representation
|
||||
against the jigdo representation.
|
||||
|
@ -28,6 +29,33 @@ if test "$SPECIFIC_HELP" = 1; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# Set default values for specific option variables.
|
||||
checksum_type=md5
|
||||
# Interpret specific options, they begin after the first --.
|
||||
next_is=ignore
|
||||
for i in "$@"
|
||||
do
|
||||
if test "$next_is" = "ignore"
|
||||
then
|
||||
if test "$i" = "--"
|
||||
then
|
||||
next_is=""
|
||||
fi
|
||||
elif test "$i" = "--md5"
|
||||
then
|
||||
checksum_type=md5
|
||||
elif test "$i" = "--sha256"
|
||||
then
|
||||
checksum_type=sha256
|
||||
else
|
||||
echo >&2
|
||||
echo "Unknown test specific option: $i" >&2
|
||||
print_help
|
||||
print_specific_help
|
||||
exit 31
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -x $RELENG_XORRISO ]; then
|
||||
print_help
|
||||
printf "\n${SELF}: -x absolute or relative path to binary to be run.\n\n"
|
||||
|
@ -87,7 +115,10 @@ case ${RETCODE_VER_JTE} in
|
|||
esac
|
||||
|
||||
# grab remote ISO image, to decompose
|
||||
if [ ! -f "${TMP_DATA_DIR}"/"${REMOTE_IMG}" ]; then
|
||||
if [ -L "${TMP_DATA_DIR}"/"${REMOTE_IMG}" ]; then
|
||||
printf "\n${SELF}: Found symbolic link ${TMP_DATA_DIR}"/"${REMOTE_IMG}\n"
|
||||
ls -ld ${TMP_DATA_DIR}"/"${REMOTE_IMG}
|
||||
elif [ ! -f "${TMP_DATA_DIR}"/"${REMOTE_IMG}" ]; then
|
||||
printf "\n${SELF}: Downloading ${REMOTE_URL}/${REMOTE_IMG}\n"
|
||||
if wget -V >/dev/null 2>&1
|
||||
then
|
||||
|
@ -206,9 +237,9 @@ JIGDO_MAP="Debian=${JIGDO_MAP_RHV}/"
|
|||
# create jigdo MD5 list in base64 format
|
||||
JIGDO_GEN_MD5=${GEN_DATA_DIR}/${RELENG_IMG}.md5
|
||||
|
||||
printf "${SELF}: Creating MD5 list in hex format in ${JIGDO_GEN_MD5}..."
|
||||
printf "${SELF}: Creating $checksum_type list in hex format in ${JIGDO_GEN_MD5}..."
|
||||
set +e
|
||||
./jigdo-gen-md5-list ${RELENG_DIR} > ${JIGDO_GEN_MD5}
|
||||
./jigdo-gen-md5-list "--""$checksum_type" ${RELENG_DIR} > ${JIGDO_GEN_MD5}
|
||||
ret=$?
|
||||
set -e
|
||||
|
||||
|
@ -224,12 +255,13 @@ fi
|
|||
|
||||
CMD="$CMD \
|
||||
-jigdo-template-compress gzip \
|
||||
-jigdo-checksum-algorithm "$checksum_type" \
|
||||
-checksum_algorithm_iso md5,sha1,sha256,sha512 \
|
||||
-checksum_algorithm_template md5,sha1,sha256,sha512 \
|
||||
-jigdo-jigdo ${JIGDO_JIGDO} \
|
||||
-jigdo-template ${JIGDO_TEMPLATE} \
|
||||
-jigdo-map ${JIGDO_MAP} \
|
||||
-md5-list ${JIGDO_GEN_MD5} \
|
||||
-checksum-list ${JIGDO_GEN_MD5} \
|
||||
-jigdo-min-file-size 1024 \
|
||||
"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ int Compare_2_files(char *adr1, char *adr2, char *adrc, int flag)
|
|||
int ret, differs= 0, r1, r2, fd1= -1, fd2= -1, i, done;
|
||||
char buf1[4096], buf2[4096], a[4096], ttx1[40], ttx2[40];
|
||||
off_t r1count= 0, r2count= 0, diffcount= 0, first_diff= -1;
|
||||
double dcount;
|
||||
|
||||
ret= lstat(adr1, &s1);
|
||||
if(ret==-1) {
|
||||
|
@ -241,9 +242,13 @@ int Compare_2_files(char *adr1, char *adr2, char *adrc, int flag)
|
|||
if(diffcount>0 || r1count!=r2count) {
|
||||
if(first_diff<0)
|
||||
first_diff= (r1count>r2count ? r2count : r1count);
|
||||
if(r1count > r2count)
|
||||
dcount= diffcount + (r1count - r2count);
|
||||
else
|
||||
dcount= diffcount + (r2count - r1count);
|
||||
printf("%s : %s : differs by at least %.f bytes. First at %.f\n", a,
|
||||
(s1.st_mtime==s2.st_mtime ? "CONTENT":"content"),
|
||||
(double) (diffcount + abs(r1count-r2count)), (double) first_diff);
|
||||
dcount, (double) first_diff);
|
||||
differs= 1;
|
||||
}
|
||||
}
|
||||
|
@ -298,8 +303,10 @@ int main(int argc, char **argv)
|
|||
}
|
||||
strcpy(adr1, argv[1]);
|
||||
strcpy(adrc, argv[1]+strlen(argv[2]));
|
||||
sprintf(adr2, "%s%s%s",
|
||||
argv[3], (adrc[0]=='/' || adrc[0]==0 ? "" : "/"), adrc);
|
||||
strcpy(adr2, argv[3]);
|
||||
if(adrc[0] == '/' || adrc[0] == 0)
|
||||
strcat(adr2, "/");
|
||||
strcat(adr2, adrc);
|
||||
|
||||
ret= Compare_2_files(adr1, adr2, adrc, (with_ctime<<1));
|
||||
exit(ret<=0);
|
||||
|
|
|
@ -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
|
||||
******************************************
|
||||
|
||||
|