bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling case modification the Volume Descriptor fields...


From: Tom Lisjac
Subject: Re: Disabling case modification the Volume Descriptor fields...
Date: Tue, 27 Apr 2021 18:34:13 -0400 (EDT)

As always, thanks for your quick and thorough reply.

And of course you're right about the case restrictions in the ECMA-119 spec... 
my apologies. I made some assumptions because mixed case in those fields always 
worked with genisoimage.

I can kludge around this, but am curious if there's is (or was) some good 
reason for restricting lower case?

As a suggestion, issuing a warning like xorriso did when I tried to write lower 
case into the volid field might be helpful. In that case, the burn completed 
normally, I was now aware that I'd broken the rules but xorriso wrote the lower 
case data I specified:

xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules

StandardId:CD001
SystemId:SYSTEMID
VolumeId:volid
VolumeSetId:volsetid
PublisherId:PUBLISHER
PreparerId:PREPARERID
ApplicationId:APPLICATIONID
CopyrightFileId:COPYRIGHTFILE
AbstractFileId:ABSTRACTFILE
BibliographicFileId:BIBLIOFILE
VolumeCreationDateTime:2021042721580400
VolumeModificationDateTime:2021042721580400
VolumeExpirationDateTime:0000000000000000
VolumeEffectiveDateTime:0000000000000000
ApplicationUsed:xorriso -dev /dev/sr0 -joliet on -speed 2 -blank as_needed -fs 
8m -map /home/user/testdir / \
-volid volid -volset_id volsetid -publisher publisher -application_id 
applicationid -system_id systemid \
-copyright_file copyrightfile -abstract_file abstractfile -biblio_file 
bibliofile \
-preparer_id preparerid -application_use /home/user/appmsg.txt -commit_eject 
all -end

The above is a test I ran to see which fields were folded where I specified all 
of them in lower case. The command used is in the ApplicationUsed field. Only 
the volume_id, volume_set and application_use fields accepted lower case and 
punctuation characters without modification. I could see where upper case 
folding could cause a problem with filenames in other fields where the actual 
filename on disk is lower or mixed case as happened with the code I'd written 
when still using genisoimage and via growisofs.

Best regards,

-Tom

----- Original Message -----
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: "bug-xorriso" <bug-xorriso@gnu.org>
Cc: "netdxr" <netdxr@centurylink.net>
Sent: Tuesday, April 27, 2021 8:19:09 AM
Subject: Re: Disabling case modification the Volume Descriptor fields...

Hi,

> I was hoping the [...] -ecma119 and -compliance rules might change
> the case folding behavior: [...]
> -ecma119_map unmapped -compliance untranslated_names

Both don't apply to writing of volume descriptor fields.
-ecma119_map is for reading of file names from existing ISO 9660 filesystems.
-compliance rule "untranslated_names" is for ECMA-119 file names during
writing.


> the Publisher Identifier field is supposed to be a strA that allows mixed
> case

ECMA-119 does not allow mixed case with its a-characters.

It says in 7.4.1 that a-characters are ECMA-6 characters
"2/0 to 2/2 , 2/5 to 2/15 , 3/0 to 3/15 , 4/1 to 4/15 , 5/0 to 5/10 , 5/15".
The 2-dimensional coordinates refer to horizontal and vertical positions
in Appendix A.
The second table in Appendix A is so nice to highlight the a-characters
and to shade the lower case letters a to z (6/1 to 7/10).

This matches what i see at https://wiki.osdev.org/ISO_9660 .

----------------------------------------------------------------------

This raises the question why xorriso and libisofs tolerate deviations
of the specs with at least Volume Id. After some grepping i see in
libisofs/ecma119.c function ecma119_writer_write_vol_desc() that
only two fields get an exemption from the rule:

    if (t->opts->relaxed_vol_atts) {
        vol_id = get_relaxed_vol_id(t, image->volume_id);
        volset_id = get_relaxed_vol_id(t, image->volset_id);
    } else {
        str2d_char(t->input_charset, image->volume_id, &vol_id);
        str2d_char(t->input_charset, image->volset_id, &volset_id);
    }
    str2a_char(t->input_charset, image->publisher_id, &pub_id);

Option relaxed_vol_atts gets set by iso_write_opts_set_relaxed_vol_atts()
which libisoburn sets to 1 unconditionally.

So:

> Is there a way to completely disable case modification in the Volume
> Descriptor fields?

Currently not.
There is no libisofs setting to lift the restrictions like with the two
exempted fields.

You could hack your local copy of libisofs, which is part of GNU xorriso.
(To hack your local libisofs.so might be more administrative effort.)
The function get_relaxed_vol_id() does not check for oversize and thus
would not block your case. So it would work if you change above code snippet
to become:

    if (t->opts->relaxed_vol_atts) {
        vol_id = get_relaxed_vol_id(t, image->volume_id);
        volset_id = get_relaxed_vol_id(t, image->volset_id);
        pub_id = get_relaxed_vol_id(t, image->publisher_id);
    } else {
        str2d_char(t->input_charset, image->volume_id, &vol_id);
        str2d_char(t->input_charset, image->volset_id, &volset_id);
        str2a_char(t->input_charset, image->publisher_id, &pub_id);
    }


I will have to consider whether -compliance should get rules to relax fields
other than volid and volset, and whether there should be a rule to avoid
any relaxation of PVD fields.
The reason for the existing exemption is probably a legacy from mkisofs,
which i had to carry on because distro ISOs depended on this tolerance.

I just tested with genisoimage that it lets pass mixed case strings
from -publisher into the PVD of the resulting ISO.
Now i have someting to think on ...


Have a nice day :)

Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]