Hello community, here is the log from the commit of package libburnia for openSUSE:Factory checked in at 2013-12-18 16:54:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libburnia (Old) and /work/SRC/openSUSE:Factory/.libburnia.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libburnia" Changes: -------- --- /work/SRC/openSUSE:Factory/libburnia/libburnia.changes 2013-08-10 11:57:56.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libburnia.new/libburnia.changes 2013-12-18 16:54:05.000000000 +0100 @@ -1,0 +2,27 @@ +Tue Dec 17 10:23:37 UTC 2013 - [email protected] + +- update libisofs to version 1.3.4 + * Giving sort weight 2 as default to El Torito boot images + * Encoding HFS+ names in UTF-16 rather than UCS-2. +- update libburn to version 1.3.4 + * Bug fix: Drive error reports were ignored during blanking and + formatting + * Bug fix: Drive LG BH16NS40 stalls on inspection of unformatted + DVD+RW + * New API call burn_disc_pretend_full_uncond() +- update libisoburn to version 1.3.4 + * Bug fix: Command -blank "as_needed" formatted blank BD-R. + * Bug fix: -as mkisofs option -log-file put the log file into the + image + * Bug fix: -cut_out did not add x-permission to r-permission of + directory + * Bug fix: Command -zisofs did not accept all options emitted by + -status -zisofs + * Bug fix: -blank force:... failed on appendable or closed media + * New command -read_speed + * New -close mode "as_needed", new -as cdrecord option + --multi_if_possible + * New -alter_date types: a-c , m-c , b-c , c +- add rpmlintrc to remove false-positive dependency error + +------------------------------------------------------------------- Old: ---- libburn-1.3.2.tar.gz libisoburn-1.3.2.tar.gz libisofs-1.3.2.tar.gz New: ---- libburn-1.3.4.tar.gz libburnia-rpmlintrc libisoburn-1.3.4.tar.gz libisofs-1.3.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libburnia.spec ++++++ --- /var/tmp/diff_new_pack.yP6TYf/_old 2013-12-18 16:54:06.000000000 +0100 +++ /var/tmp/diff_new_pack.yP6TYf/_new 2013-12-18 16:54:06.000000000 +0100 @@ -16,9 +16,9 @@ # -%define libburn_ver 1.3.2 -%define libisoburn_ver 1.3.2 -%define libisofs_ver 1.3.2 +%define libburn_ver 1.3.4 +%define libisoburn_ver 1.3.4 +%define libisofs_ver 1.3.4 %define libburn_so 4 %define libisoburn_so 1 @@ -31,10 +31,10 @@ License: GPL-2.0+ Group: Productivity/Multimedia/CD/Record Url: http://libburnia-project.org/ - Source0: http://files.libburnia-project.org/releases/libburn-%{libburn_ver}.tar.gz Source1: http://files.libburnia-project.org/releases/libisoburn-%{libisoburn_ver}.tar.gz Source2: http://files.libburnia-project.org/releases/libisofs-%{libisofs_ver}.tar.gz +Source100: libburnia-rpmlintrc BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: pkg-config ++++++ libburn-1.3.2.tar.gz -> libburn-1.3.4.tar.gz ++++++ ++++ 1918 lines of diff (skipped) ++++++ libburnia-rpmlintrc ++++++ # libburnia-tools is not a shared library package addFilter("libburnia-tools-x11.[^:]+: E: shlib-fixed-dependency .* libburnia-tools") ++++++ libisoburn-1.3.2.tar.gz -> libisoburn-1.3.4.tar.gz ++++++ ++++ 3726 lines of diff (skipped) ++++++ libisofs-1.3.2.tar.gz -> libisofs-1.3.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/ChangeLog new/libisofs-1.3.4/ChangeLog --- old/libisofs-1.3.2/ChangeLog 2013-08-07 10:56:13.000000000 +0200 +++ new/libisofs-1.3.4/ChangeLog 2013-12-12 09:29:50.000000000 +0100 @@ -1,3 +1,8 @@ +libisofs-1.3.4.tar.gz Thu Dec 12 2013 +=============================================================================== +* Giving sort weight 2 as default to El Torito boot images +* Encoding HFS+ names in UTF-16 rather than UCS-2. + libisofs-1.3.2.tar.gz Wed Aug 07 2013 =============================================================================== * Bug fix: iso_finish() left an invalid global pointer, which a subsequent diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/README new/libisofs-1.3.4/README --- old/libisofs-1.3.2/README 2012-07-20 20:38:08.000000000 +0200 +++ new/libisofs-1.3.4/README 2013-09-25 13:07:24.000000000 +0200 @@ -4,7 +4,7 @@ Released under GPL (see COPYING file for details). -Copyright (C) 2008 - 2012 Vreixo Formoso, +Copyright (C) 2008 - 2013 Vreixo Formoso, Mario Danic, Vladimir Serbinenko, Thomas Schmitt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/configure new/libisofs-1.3.4/configure --- old/libisofs-1.3.2/configure 2013-08-07 11:01:25.000000000 +0200 +++ new/libisofs-1.3.4/configure 2013-12-12 09:33:01.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for libisofs 1.3.2. +# Generated by GNU Autoconf 2.60 for libisofs 1.3.4. # # Report bugs to <http://libburnia-project.org>. # @@ -713,8 +713,8 @@ # Identity of this package. PACKAGE_NAME='libisofs' PACKAGE_TARNAME='libisofs' -PACKAGE_VERSION='1.3.2' -PACKAGE_STRING='libisofs 1.3.2' +PACKAGE_VERSION='1.3.4' +PACKAGE_STRING='libisofs 1.3.4' PACKAGE_BUGREPORT='http://libburnia-project.org' ac_default_prefix=/usr/local @@ -1399,7 +1399,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libisofs 1.3.2 to adapt to many kinds of systems. +\`configure' configures libisofs 1.3.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1470,7 +1470,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libisofs 1.3.2:";; + short | recursive ) echo "Configuration of libisofs 1.3.4:";; esac cat <<\_ACEOF @@ -1584,7 +1584,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libisofs configure 1.3.2 +libisofs configure 1.3.4 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1598,7 +1598,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libisofs $as_me 1.3.2, which was +It was created by libisofs $as_me 1.3.4, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -2406,7 +2406,7 @@ # Define the identity of the package. PACKAGE='libisofs' - VERSION='1.3.2' + VERSION='1.3.4' cat >>confdefs.h <<_ACEOF @@ -2564,7 +2564,7 @@ LIBISOFS_MAJOR_VERSION=1 LIBISOFS_MINOR_VERSION=3 -LIBISOFS_MICRO_VERSION=2 +LIBISOFS_MICRO_VERSION=4 LIBISOFS_VERSION=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION.$LIBISOFS_MICRO_VERSION @@ -2573,10 +2573,10 @@ LT_RELEASE=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION -# 2013.08.07 development jump has not yet happened -# SONAME = 74 - 68 = 6 . Library name = libisofs.6.68.0 -LT_CURRENT=74 -LT_AGE=68 +# 2013.12.12 development jump has not yet happened +# SONAME = 76 - 70 = 6 . Library name = libisofs.6.70.0 +LT_CURRENT=76 +LT_AGE=70 LT_REVISION=0 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` @@ -24171,7 +24171,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libisofs $as_me 1.3.2, which was +This file was extended by libisofs $as_me 1.3.4, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24218,7 +24218,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -libisofs config.status 1.3.2 +libisofs config.status 1.3.4 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/configure.ac new/libisofs-1.3.4/configure.ac --- old/libisofs-1.3.2/configure.ac 2013-08-07 11:01:15.000000000 +0200 +++ new/libisofs-1.3.4/configure.ac 2013-12-12 09:32:08.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([libisofs], [1.3.2], [http://libburnia-project.org]) +AC_INIT([libisofs], [1.3.4], [http://libburnia-project.org]) AC_PREREQ([2.50]) dnl AC_CONFIG_HEADER([config.h]) @@ -41,7 +41,7 @@ dnl LIBISOFS_MAJOR_VERSION=1 LIBISOFS_MINOR_VERSION=3 -LIBISOFS_MICRO_VERSION=2 +LIBISOFS_MICRO_VERSION=4 LIBISOFS_VERSION=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION.$LIBISOFS_MICRO_VERSION AC_SUBST(LIBISOFS_MAJOR_VERSION) @@ -51,10 +51,10 @@ dnl Libtool versioning LT_RELEASE=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION -# 2013.08.07 development jump has not yet happened -# SONAME = 74 - 68 = 6 . Library name = libisofs.6.68.0 -LT_CURRENT=74 -LT_AGE=68 +# 2013.12.12 development jump has not yet happened +# SONAME = 76 - 70 = 6 . Library name = libisofs.6.70.0 +LT_CURRENT=76 +LT_AGE=70 LT_REVISION=0 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/doc/susp_aaip_2_0.txt new/libisofs-1.3.4/doc/susp_aaip_2_0.txt --- old/libisofs-1.3.2/doc/susp_aaip_2_0.txt 2012-01-24 14:48:15.000000000 +0100 +++ new/libisofs-1.3.4/doc/susp_aaip_2_0.txt 2013-08-12 20:48:17.000000000 +0200 @@ -109,8 +109,6 @@ [B] "BP 2 - Component Length (LEN_CP)" shall specify as an 8-bit number the number of component bytes in the Component Record. This length shall not include the first two bytes of the Component Record. - If any of the bit positions 1-3 is set, the value of this field shall be - set to ZERO and no Component Content shall be recorded. This field shall be recorded according to ISO 9660 Format section 7.1.1. [C] "BP 3 to 2 + LEN_CP - Component Content" shall contain the component @@ -445,7 +443,7 @@ ------------------------------------------------------------------------------- This text is under -Copyright (c) 2009 - 2010 Thomas Schmitt <[email protected]> +Copyright (c) 2009 - 2013 Thomas Schmitt <[email protected]> It shall only be modified in sync with libisofs and other software which makes use of AAIP. Please mail change requests to mailing list <[email protected]> or to the copyright holder in private. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/aaip_0_2.c new/libisofs-1.3.4/libisofs/aaip_0_2.c --- old/libisofs-1.3.2/libisofs/aaip_0_2.c 2011-10-09 18:06:46.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/aaip_0_2.c 2013-09-16 20:01:04.000000000 +0200 @@ -2065,7 +2065,7 @@ unsigned char *rpt; char perm_text[4], *wpt, *name= NULL; int type, qualifier= 0, perm, ret, cnt, name_size= 1024; - size_t w_size, name_fill= 0, i; + size_t w_size= 0, name_fill= 0, i; uid_t uid; gid_t gid; struct passwd *pwd; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/ecma119.c new/libisofs-1.3.4/libisofs/ecma119.c --- old/libisofs-1.3.2/libisofs/ecma119.c 2013-08-03 15:48:15.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/ecma119.c 2013-09-04 10:01:01.000000000 +0200 @@ -1230,6 +1230,48 @@ return ISO_SUCCESS; } + +/* @param flag bit0= restore preserved cx (else dispose them) +*/ +static +int process_preserved_cx(IsoDir *dir, int flag) +{ + int ret, i; + unsigned int cx_value; + void *xipt; + IsoNode *pos; + + pos = dir->children; + for (pos = dir->children; pos != NULL; pos = pos->next) { + if (pos->type == LIBISO_FILE) { + if (flag & 1) { + /* Restore preserved cx state of nodes */ + ret = iso_node_get_xinfo(pos, checksum_cx_xinfo_func, + &xipt); + if (ret == 1) { + /* xipt is an int disguised as void pointer */ + cx_value = 0; + for (i = 0; i < 4; i++) + cx_value = + (cx_value << 8) | ((unsigned char *) &xipt)[i]; + ret = iso_file_set_isofscx((IsoFile *) pos, cx_value, 0); + if (ret < 0) + return ret; + } else if (ret == 0) { + /* Node had no cx before the write run. Delete cx. */ + iso_file_set_isofscx((IsoFile *) pos, 0, 1); + } + } + iso_node_remove_xinfo(pos, checksum_cx_xinfo_func); + } else if (pos->type == LIBISO_DIR) { + ret = process_preserved_cx((IsoDir *) pos, flag); + if (ret != 0) + return ret; + } + } + return 0; +} + static int transplant_checksum_buffer(Ecma119Image *target, int flag) { @@ -1240,6 +1282,10 @@ target->checksum_idx_counter + 2, 0); target->checksum_buffer = NULL; target->checksum_idx_counter = 0; + + /* Delete recorded cx xinfo */ + process_preserved_cx(target->image->root, 0); + return 1; } @@ -1546,7 +1592,7 @@ return NULL; #endif - write_error: ; +write_error: ; if (res != (int) ISO_LIBJTE_END_FAILED) finish_libjte(target); target->eff_partition_offset = 0; @@ -1562,11 +1608,9 @@ } iso_ring_buffer_writer_close(target->buffer, 1); - /* Transplant checksum buffer away from Ecma119Image */ - transplant_checksum_buffer(target, 0); - /* Invalidate the transplanted checksum buffer in IsoImage */ - iso_image_free_checksums(target->image, 0); - + /* Re-activate recorded cx xinfo */ + process_preserved_cx(target->image->root, 1); + target->image->generator_is_running = 0; /* Give up reference claim made in ecma119_image_new(). @@ -1605,86 +1649,92 @@ IsoNode *pos; IsoFile *file; IsoImage *img; - int ret, i, no_md5 = 0, has_xinfo = 0; - size_t value_length; + int ret, i, no_md5 = 0, has_xinfo = 0, has_attr = 0; + size_t old_cx_value_length = 0; unsigned int idx = 0; - char *value= NULL; + char *old_cx_value= NULL; void *xipt = NULL; - static char *cx_names = "isofs.cx"; - static size_t cx_value_lengths[1] = {0}; - char *cx_valuept = ""; img= target->image; if (node->type == LIBISO_FILE) { file = (IsoFile *) node; + if (file->from_old_session) { + /* Record attribute isofs.cx as xinfo before it can get overwritten + for the emerging image. + The recorded index will be used to retrieve the loaded MD5 + and it will be brought back into effect if cancellation of + image production prevents that the old MD5 array gets replaced + by the new one. + */ + has_attr = iso_node_lookup_attr(node, "isofs.cx", + &old_cx_value_length, &old_cx_value, 0); + if (has_attr == 1 && old_cx_value_length == 4) { + for (i = 0; i < 4; i++) + idx = (idx << 8) | ((unsigned char *) old_cx_value)[i]; + if (idx > 0 && idx < 0x8000000) { + /* xipt is an int disguised as void pointer */ + for (i = 0; i < 4; i++) + ((char *) &xipt)[i] = old_cx_value[i]; + ret = iso_node_add_xinfo(node, checksum_cx_xinfo_func, + xipt); + if (ret < 0) + goto ex; + } else + no_md5 = 1; + } + } if (file->from_old_session && target->appendable) { /* Save MD5 data of files from old image which will not be copied and have an MD5 recorded in the old image. */ has_xinfo = iso_node_get_xinfo(node, checksum_md5_xinfo_func, &xipt); - if (has_xinfo <= 0) { - ret = iso_node_lookup_attr(node, "isofs.cx", &value_length, - &value, 0); - } if (has_xinfo > 0) { /* xinfo MD5 overrides everything else unless data get copied and checksummed during that copying */; - } else if (ret == 1 && img->checksum_array == NULL) { + } else if (has_attr == 1 && img->checksum_array == NULL) { /* No checksum array loaded. Delete "isofs.cx" */ if (!target->will_cancel) - iso_node_set_attrs(node, (size_t) 1, - &cx_names, cx_value_lengths, &cx_valuept, 4 | 8); + iso_file_set_isofscx((IsoFile *) node, 0, 1); no_md5 = 1; - } else if (ret == 1 && value_length == 4) { - for (i = 0; i < 4; i++) - idx = (idx << 8) | ((unsigned char *) value)[i]; - if (idx > 0 && idx < 0x8000000) { - /* xipt is an int disguised as void pointer */ - for (i = 0; i < 4; i++) - ((char *) &xipt)[i] = value[i]; - ret = iso_node_add_xinfo(node, checksum_cx_xinfo_func, - xipt); - if (ret < 0) - return ret; - } else - no_md5 = 1; - } else { + } else if (!(has_attr == 1 && old_cx_value_length == 4)) { no_md5 = 1; } - if (value != NULL) { - free(value); - value= NULL; - } } + /* Equip nodes with provisory isofs.cx numbers: 4 byte, all 0. Omit those from old image which will not be copied and have no MD5. Do not alter the nodes if this is only a will_cancel run. */ if (!(target->will_cancel || no_md5)) { + /* Record provisory new index */ ret = iso_file_set_isofscx(file, (unsigned int) 0, 0); if (ret < 0) - return ret; + goto ex; } } else if (node->type == LIBISO_DIR) { for (pos = ((IsoDir *) node)->children; pos != NULL; pos = pos->next) { ret = checksum_prepare_nodes(target, pos, 1); if (ret < 0) - return ret; + goto ex; } } - return ISO_SUCCESS; + ret = ISO_SUCCESS; +ex:; + if (old_cx_value != NULL) + free(old_cx_value); + return ret; } static int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img) { - int ret, i, voldesc_size, nwriters, image_checksums_mad = 0, tag_pos; + int ret, i, voldesc_size, nwriters, tag_pos; int sa_type; Ecma119Image *target; IsoImageWriter *writer; - int el_torito_writer_index = -1, file_src_writer_index = -1; + int file_src_writer_index = -1; int system_area_options = 0; char *system_area = NULL; int write_count = 0, write_count_mem; @@ -1994,9 +2044,6 @@ nwriters++; /* Tail padding writer */ if ((target->md5_file_checksums & 1) || target->md5_session_checksum) { nwriters++; - image_checksums_mad = 1; /* from here on the loaded checksums are - not consistent with isofs.cx any more. - */ ret = checksum_prepare_image(src, 0); if (ret < 0) goto target_cleanup; @@ -2026,7 +2073,6 @@ if (ret < 0) { goto target_cleanup; } - el_torito_writer_index = target->nwriters - 1; } /* create writer for Joliet structure */ @@ -2367,10 +2413,6 @@ if (ret < 0) goto target_cleanup; } - /* Dispose old image checksum buffer. The one of target is supposed to - get attached at the end of write_function(). */ - iso_image_free_checksums(target->image, 0); - image_checksums_mad = 0; if (target->apm_block_size == 0) { if (target->gpt_req_count) @@ -2418,9 +2460,7 @@ *img = target; return ISO_SUCCESS; - target_cleanup: ; - if(image_checksums_mad) /* No checksums is better than mad checksums */ - iso_image_free_checksums(target->image, 0); +target_cleanup: ; target->image->generator_is_running = 0; ecma119_image_free(target); return ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/eltorito.c new/libisofs-1.3.4/libisofs/eltorito.c --- old/libisofs-1.3.2/libisofs/eltorito.c 2013-04-12 17:16:08.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/eltorito.c 2013-09-07 10:08:53.000000000 +0200 @@ -312,7 +312,8 @@ static int create_image(IsoImage *image, const char *image_path, enum eltorito_boot_media_type type, - struct el_torito_boot_image **bootimg) + struct el_torito_boot_image **bootimg, + IsoFile **bootnode) { int ret; struct el_torito_boot_image *boot; @@ -323,6 +324,7 @@ IsoNode *imgfile; IsoStream *stream; + *bootnode = NULL; ret = iso_tree_path_to_node(image, image_path, &imgfile); if (ret < 0) { return ret; @@ -337,6 +339,7 @@ if (imgfile->type != LIBISO_FILE) { return ISO_BOOT_IMAGE_NOT_VALID; } + *bootnode = (IsoFile *) imgfile; stream = ((IsoFile*)imgfile)->stream; @@ -461,6 +464,7 @@ struct el_torito_boot_catalog *catalog; ElToritoBootImage *boot_image= NULL; IsoBoot *cat_node= NULL; + IsoFile *boot_node; if (image == NULL || image_path == NULL || catalog_path == NULL) { return ISO_NULL_POINTER; @@ -513,7 +517,7 @@ } /* create the boot image */ - ret = create_image(image, image_path, type, &boot_image); + ret = create_image(image, image_path, type, &boot_image, &boot_node); if (ret < 0) { goto boot_image_cleanup; } @@ -530,6 +534,8 @@ catalog->bootimages[i] = NULL; catalog->node = cat_node; catalog->sort_weight = 1000; /* slightly high */ + if (!boot_node->explicit_weight) + boot_node->sort_weight = 2; iso_node_ref((IsoNode*)cat_node); image->bootcat = catalog; @@ -700,14 +706,17 @@ int ret; struct el_torito_boot_catalog *catalog = image->bootcat; ElToritoBootImage *boot_img; + IsoFile *boot_node; if(catalog == NULL) return ISO_BOOT_NO_CATALOG; if (catalog->num_bootimages >= Libisofs_max_boot_imageS) return ISO_BOOT_IMAGE_OVERFLOW; - ret = create_image(image, image_path, type, &boot_img); + ret = create_image(image, image_path, type, &boot_img, &boot_node); if (ret < 0) return ret; + if (!boot_node->explicit_weight) + boot_node->sort_weight = 2; catalog->bootimages[catalog->num_bootimages] = boot_img; catalog->num_bootimages++; if (boot != NULL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/filesrc.c new/libisofs-1.3.4/libisofs/filesrc.c --- old/libisofs-1.3.2/libisofs/filesrc.c 2013-01-14 17:29:44.000000000 +0100 +++ new/libisofs-1.3.4/libisofs/filesrc.c 2013-08-17 12:47:28.000000000 +0200 @@ -158,7 +158,7 @@ fsrc->checksum_index = img->checksum_idx_counter; } else { fsrc->checksum_index= 0; - img->checksum_idx_counter= 0x7fffffff; /* keep from rolling over */ + img->checksum_idx_counter= 0x7ffffffe; /* keep from rolling over */ } cret = iso_file_set_isofscx(file, (*src)->checksum_index, 0); if (cret < 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/hfsplus.c new/libisofs-1.3.4/libisofs/hfsplus.c --- old/libisofs-1.3.2/libisofs/hfsplus.c 2012-07-20 21:00:51.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/hfsplus.c 2013-11-26 12:42:35.000000000 +0100 @@ -128,7 +128,7 @@ return ISO_SUCCESS; } - ret = str2ucs(t->input_charset, name, &ucs_name); + ret = str2utf16be(t->input_charset, name, &ucs_name); if (ret < 0) { iso_msg_debug(t->image->id, "Can't convert %s", name); return ret; @@ -477,8 +477,8 @@ int hfsplus_writer_compute_data_blocks(IsoImageWriter *writer) { Ecma119Image *t; - uint32_t i, link_blocks, hfsp_curblock; - uint32_t block_fac, cat_node_size, block_size; + uint32_t i, hfsp_curblock; + uint32_t block_fac, block_size; if (writer == NULL) { return ISO_OUT_OF_MEM; @@ -487,7 +487,6 @@ t = writer->target; block_size = t->hfsp_block_size; block_fac = t->hfsp_iso_block_fac; - cat_node_size = t->hfsp_cat_node_size; iso_msg_debug(t->image->id, "(b) curblock=%d, nodes =%d", t->curblock, t->hfsp_nnodes); t->hfsp_part_start = t->curblock * block_fac; @@ -500,7 +499,7 @@ t->hfsp_catalog_file_start = hfsp_curblock; /* - hfsp_curblock += (t->hfsp_nnodes * cat_node_size + block_size - 1) / block_size; + hfsp_curblock += (t->hfsp_nnodes * t->hfsp_cat_node_size + block_size - 1) / block_size; */ hfsp_curblock += 2 * t->hfsp_nnodes; @@ -509,7 +508,6 @@ iso_msg_debug(t->image->id, "(d) hfsp_curblock=%d, nodes =%d", hfsp_curblock, t->hfsp_nnodes); - link_blocks = 0; for (i = 0; i < t->hfsp_nleafs; i++) if (t->hfsp_leafs[i].unix_type == UNIX_SYMLINK) { @@ -1227,7 +1225,7 @@ char *orig_dest, *orig_start, *orig_end; char *hfsp_dest, *hfsp_start, *hfsp_end; int ret = 0; - unsigned int comp_len, orig_len, hfsp_len, hfsp_comp_len; + unsigned int comp_len, orig_len, hfsp_len; if (target->hfsp_leafs[link_idx].node->type != LIBISO_SYMLINK) return ISO_SUCCESS; @@ -1271,7 +1269,6 @@ hfsp_end = strchr(hfsp_start, '/'); if (hfsp_end == NULL) hfsp_end = hfsp_start + strlen(hfsp_start); - hfsp_comp_len = hfsp_end - hfsp_start; if (comp_len == 0 || (comp_len == 1 && orig_start[0] == '.')) continue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/image.c new/libisofs-1.3.4/libisofs/image.c --- old/libisofs-1.3.2/libisofs/image.c 2013-08-03 15:53:29.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/image.c 2013-11-16 17:46:48.000000000 +0100 @@ -406,6 +406,7 @@ int dir_update_size(IsoImage *image, IsoDir *dir) { IsoNode *pos; + int ret; #ifdef Libisofs_update_sizes_abortablE char *path= NULL; @@ -416,7 +417,6 @@ pos = dir->children; while (pos) { - int ret = 1; if (pos->type == LIBISO_FILE) { ret = iso_stream_update_size(ISO_FILE(pos)->stream); } else if (pos->type == LIBISO_DIR) { @@ -428,6 +428,8 @@ return ret; /* Message already issued by dir_update_size */ #endif + } else { + ret = 1; } #ifdef Libisofs_update_sizes_abortablE @@ -465,7 +467,12 @@ return cancel_ret; /* cancel due error threshold */ } -#endif /* Libisofs_update_sizes_abortablE */ +#else + + if (ret < 0) + ret = 1; /* ignore error */ + +#endif /* ! Libisofs_update_sizes_abortablE */ pos = pos->next; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/iso1999.c new/libisofs-1.3.4/libisofs/iso1999.c --- old/libisofs-1.3.2/libisofs/iso1999.c 2012-05-22 16:29:04.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/iso1999.c 2013-09-16 19:55:54.000000000 +0200 @@ -308,7 +308,7 @@ int ret; int i, nchildren; Iso1999Node **children; - IsoHTable *table; + IsoHTable *table = NULL; int need_sort = 0; char *full_name = NULL, *tmp = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/joliet.c new/libisofs-1.3.4/libisofs/joliet.c --- old/libisofs-1.3.2/libisofs/joliet.c 2012-05-23 20:56:16.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/joliet.c 2013-09-16 19:54:22.000000000 +0200 @@ -349,7 +349,7 @@ int ret; int i, nchildren, maxchar = 64; JolietNode **children; - IsoHTable *table; + IsoHTable *table = NULL; int need_sort = 0; uint16_t *full_name = NULL; uint16_t *tmp = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/libisofs.h new/libisofs-1.3.4/libisofs/libisofs.h --- old/libisofs-1.3.2/libisofs/libisofs.h 2013-08-07 10:59:51.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/libisofs.h 2013-12-12 09:32:45.000000000 +0100 @@ -84,7 +84,7 @@ */ #define iso_lib_header_version_major 1 #define iso_lib_header_version_minor 3 -#define iso_lib_header_version_micro 2 +#define iso_lib_header_version_micro 4 /** * Get version of the libisofs library at runtime. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/make_isohybrid_mbr.c new/libisofs-1.3.4/libisofs/make_isohybrid_mbr.c --- old/libisofs-1.3.2/libisofs/make_isohybrid_mbr.c 2012-10-23 08:28:09.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/make_isohybrid_mbr.c 2013-09-04 10:10:45.000000000 +0200 @@ -563,7 +563,7 @@ uint32_t id, part, nominal_part_size; off_t hd_img_blocks, hd_boot_lba; char *wpt; - uint32_t boot_lba, mbr_id; + uint32_t boot_lba; int head_count, sector_count, ret; int gpt_count = 0, gpt_idx[128], apm_count = 0, gpt_cursor; /* For generating a weak random number */ @@ -573,7 +573,6 @@ hd_img_blocks = ((off_t) *img_blocks) * (off_t) 4; boot_lba = t->bootsrc[0]->sections[0].block; - mbr_id = 0; head_count = t->partition_heads_per_cyl; sector_count = t->partition_secs_per_head; @@ -608,6 +607,8 @@ gettimeofday(&tv, &tz); id = 0xffffffff & (tv.tv_sec ^ (tv.tv_usec * 2000)); lsb_to_buf(&wpt, id, 32, 0); + } else { + wpt+= 4; } /* write word 0 # Offset 444 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/md5.c new/libisofs-1.3.4/libisofs/md5.c --- old/libisofs-1.3.2/libisofs/md5.c 2013-01-14 17:59:53.000000000 +0100 +++ new/libisofs-1.3.4/libisofs/md5.c 2013-08-20 11:45:31.000000000 +0200 @@ -540,13 +540,12 @@ if (value != NULL) free(value); - /* ts B30114 : It is unclear why these are removed here. - At least with the opts->will_cancel runs, - this is not appropriate. + /* >>> ts B30114 : It is unclear why these are removed here. + At least with the opts->will_cancel runs, + this is not appropriate. */ iso_node_remove_xinfo(node, checksum_md5_xinfo_func); } - iso_node_remove_xinfo(node, checksum_cx_xinfo_func); } } else if (node->type == LIBISO_DIR) { for (pos = ((IsoDir *) node)->children; pos != NULL; pos = pos->next) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/node.c new/libisofs-1.3.4/libisofs/node.c --- old/libisofs-1.3.2/libisofs/node.c 2012-07-12 18:15:28.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/node.c 2013-12-05 18:17:04.000000000 +0100 @@ -1048,6 +1048,7 @@ } } else if (node->type == LIBISO_FILE) { ((IsoFile*)node)->sort_weight = w; + ((IsoFile*)node)->explicit_weight = 1; } } @@ -1430,6 +1431,8 @@ new->node.type = LIBISO_FILE; new->node.name = name; new->node.mode = S_IFREG; + new->from_old_session = 0; + new->explicit_weight = 0; new->sort_weight = 0; new->stream = stream; @@ -2566,6 +2569,7 @@ ret = iso_stream_set_image_ino(file->stream, ino, 0); if (ret < 0 || ret == 1) return ret; + /* ret == 0 means that the stream is not from loaded ISO image */ } else if (node->type == LIBISO_SYMLINK) { symlink = (IsoSymlink *) node; @@ -2756,6 +2760,8 @@ } +/* @param flag bit0= delete isofs.cx rather than setting it +*/ int iso_file_set_isofscx(IsoFile *file, unsigned int checksum_index, int flag) { @@ -2765,9 +2771,14 @@ char *valuept; int i, ret; + valuept= (char *) value; + if (flag & 1) { + ret = iso_node_set_attrs((IsoNode *) file, (size_t) 1, + &names, value_lengths, &valuept, 4 | 8); + return ret; + } for(i = 0; i < 4; i++) value[3 - i] = (checksum_index >> (8 * i)) & 0xff; - valuept= (char *) value; ret = iso_node_set_attrs((IsoNode *) file, (size_t) 1, &names, value_lengths, &valuept, 2 | 8); return ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/node.h new/libisofs-1.3.4/libisofs/node.h --- old/libisofs-1.3.2/libisofs/node.h 2011-04-02 13:09:38.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/node.h 2013-09-07 10:02:58.000000000 +0200 @@ -149,8 +149,15 @@ { IsoNode node; + /* 1 = The node was loaded from an existing ISO image and still refers + to its data content there. + */ unsigned int from_old_session : 1; + /* 1 = The node got attributed a weight by iso_node_set_sort_weight(). + */ + unsigned int explicit_weight : 1; + /** * It sorts the order in which the file data is written to the CD image. * Higher weighting files are written at the beginning of image diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/util.c new/libisofs-1.3.4/libisofs/util.c --- old/libisofs-1.3.2/libisofs/util.c 2012-07-05 18:12:48.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/util.c 2013-11-22 15:01:01.000000000 +0100 @@ -667,6 +667,123 @@ return ISO_SUCCESS; } +int str2utf16be(const char *icharset, const char *input, uint16_t **output) +{ + int result; + wchar_t *wsrc_ = NULL; + char *src; + char *ret = NULL; + char *ret_ = NULL; + struct iso_iconv_handle conv; + int conv_ret = 0; + int direct_conv = 0; + size_t loop_counter = 0, loop_limit = 3; + size_t numchars; + size_t outbytes; + size_t inbytes; + size_t n; + + if (icharset == NULL || input == NULL || output == NULL) { + return ISO_NULL_POINTER; + } + + /* + Try the direct conversion. + */ + conv_ret = iso_iconv_open(&conv, "UTF-16BE", (char *) icharset, 0); + if (conv_ret > 0) { + direct_conv = 1; + src = (char *) input; + inbytes = strlen(input); + loop_limit = inbytes + 3; + outbytes = (2 * inbytes + 1) * sizeof(uint16_t); + ret_ = malloc(outbytes); + if (ret_ == NULL) + return ISO_OUT_OF_MEM; + ret = ret_; + } else { + /* Try via intermediate character set WCHAR_T. + */ + result = str2wchar(icharset, input, &wsrc_); + if (result == (int) ISO_SUCCESS) { + src = (char *)wsrc_; + numchars = wcslen(wsrc_); + + inbytes = numchars * sizeof(wchar_t); + loop_limit = inbytes + 3; + + ret_ = malloc((2 * numchars+1) * sizeof(uint16_t)); + if (ret_ == NULL) + return ISO_OUT_OF_MEM; + outbytes = 2 * numchars * sizeof(uint16_t); + ret = ret_; + + /* initialize iconv */ + conv_ret = iso_iconv_open(&conv, "UTF-16BE", "WCHAR_T", 0); + if (conv_ret <= 0) { + free(wsrc_); + free(ret_); + } + } else if (result != (int) ISO_CHARSET_CONV_ERROR) + return result; + } + + if (conv_ret <= 0) { + return ISO_CHARSET_CONV_ERROR; + } + + n = iso_iconv(&conv, &src, &inbytes, &ret, &outbytes, 0); + while (n == (size_t) -1) { + /* The destination buffer is too small. Stops here. */ + if (errno == E2BIG) + break; + + /* An incomplete multi bytes sequence was found. We + * can't do anything here. That's quite unlikely. */ + if (errno == EINVAL) + break; + + /* The last possible error is an invalid multi bytes + * sequence. Just replace the character with a "_". + * Probably the character doesn't exist in UCS */ + set_ucsbe((uint16_t*) ret, '_'); + ret += sizeof(uint16_t); + outbytes -= sizeof(uint16_t); + + if (!outbytes) + break; + + /* There was an error with one character but some other remain + * to be converted. That's probably a multibyte character. + * See above comment. */ + if (direct_conv) { + src++; + inbytes--; + } else { + src += sizeof(wchar_t); + inbytes -= sizeof(wchar_t); + } + + if (!inbytes) + break; + + /* Just to appease my remorse about unclear loop ends */ + loop_counter++; + if (loop_counter > loop_limit) + break; + n = iso_iconv(&conv, &src, &inbytes, &ret, &outbytes, 0); + } + iso_iconv_close(&conv, 0); + + /* close the UTF-16 string */ + set_ucsbe((uint16_t*) ret, '\0'); + if (wsrc_ != NULL) + free(wsrc_); + + *output = (uint16_t*)ret_; + return ISO_SUCCESS; +} + static int valid_d_char(char c) { return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c == '_'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libisofs-1.3.2/libisofs/util.h new/libisofs-1.3.4/libisofs/util.h --- old/libisofs-1.3.2/libisofs/util.h 2012-07-06 16:56:33.000000000 +0200 +++ new/libisofs-1.3.4/libisofs/util.h 2013-11-22 14:16:57.000000000 +0100 @@ -89,6 +89,22 @@ int str2ucs(const char *icharset, const char *input, uint16_t **output); /** + * Convert a given string from any input charset to UTF-16BE charset, + * used for HFS+ file identifiers. + * (UTF-16 differs from older UCS-2 by having multi word characters.) + * + * @param icharset + * Input charset. Must be supported by iconv + * @param input + * Input string + * @param output + * Location where the pointer to the ouput string will be stored + * @return + * 1 on success, < 0 on error + */ +int str2utf16be(const char *icharset, const char *input, uint16_t **output); + +/** * Create a level 1 directory identifier. * * @param src -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
