Debian Patches
Status for libur-perl/0.470+ds-4
| Patch | Description | Author | Forwarded | Bugs | Origin | Last update |
|---|---|---|---|---|---|---|
| Honour-SOURCE_DATE_EPOCH-for-embedded-timestamp-in-genera.patch | Honour SOURCE_DATE_EPOCH for embedded timestamp in generated documentation. When the environment variable SOURCE_DATE_EPOCH is set, use it instead of the current time for the embedded build timestamp. The specification of SOURCE_DATE_EPOCH is available here: https://reproducible-builds.org/specs/source-date-epoch/ In the case it is not defined, fall back to current time. |
intrigeri <intrigeri@boum.org> | no | 2016-06-27 | ||
| sqlite-case-insensitve.patch | Fix test failure with newer (DBD::)SQLite ``` t/URT/t/04a_sqlite.t … not ok 80 - column details for table inline are correct # Failed test 'column details for table inline are correct' # at t/URT/t/04a_sqlite.t line 53. # Structures begin differing at: # $got->[0]{DATA_TYPE} = 'INTEGER' # $expected->[0]{DATA_TYPE} = 'integer' # Looks like you failed 1 test of 80. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/80 subtests ``` Use Test::Deep's cmp_deeply to be able to check against a case-insenstive regexp. |
gregor herrmann <gregoa@debian.org> | yes | upstream | vendor | 2022-01-17 |
| Perl-5.40-Missing-comma-after-first-argument-to-return.patch | fix (test) failure with perl 5.40 # Failed test 'use UR::All;' # at t/URT/t/00_load.t line 11. # Tried to use 'UR::All'. # Error: Missing comma after first argument to return at /build/libur-perl-0.470+ds/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm line 41, near ");" . # Failed test 'use UR::Namespace::Command::Define::Datasource::Sqlite;' # at t/URT/t/80_command_define_datasource.t line 29. # Tried to use 'UR::Namespace::Command::Define::Datasource::Sqlite'. # Error: Missing comma after first argument to return at /build/libur-perl-0.470+ds/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm line 41, near ");" |
gregor herrmann <gregoa@debian.org> | yes | upstream | vendor | 2024-06-16 |
| fix-invalid-unicode-entities.patch | Fix invalid unicode entities This patch fixes a test failure triggered by a conversion to XML that gives unexpected results: . -<object type="Acme::Cat::Set" id="Acme::Cat/And/owner_id/O:O:111"> +<object type="Acme::Cat::Set" id="Acme::Cat/And/owner_id/O:�O:111�"> . An analysis done by IA indicates: . +++++++ . The test failure in t/URT/t/63c_view_with_subviews.t:151-155 is caused by a behavioral change in libxml2 (>= 2.13.0) when serializing characters that are forbidden by the XML 1.0 specification. ────── ### Root Cause Details . 1. Control characters in Set IDs: The failing subtest is rendering an XML view of $cat_set (Acme::Cat::Set). The id of a UR::Object::Set is the ID of its underlying UR::BoolExpr, which uses ASCII control characters as delimiters: • chr(29) (0x1D, Group Separator, defined in $UR::BoolExpr::Util::id_sep) • chr(30) (0x1E, Record Separator, defined in $UR::BoolExpr::Util::record_sep) Thus, $cat_set->id is: "Acme::Cat/And/owner_id/O:\x1dO:111\x1e" 2. XML serialization in UR::Object::View::Default::Xml: In Xml.pm: $object->addChild( $xml_doc->createAttribute('id', $subject->id ) ); ... my $doc_string = $xml_doc->toString(1); . # remove invalid XML entities $doc_string =~ s/[^\x09\x0A\x0D\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//go; 3. Behavior change in libxml2: • In older libxml2 (< 2.13.0): $xml_doc->toString(1) dumped the raw \x1d and \x1e bytes directly into $doc_string. The regex on line 105 then stripped those raw bytes out, leaving: <object type="Acme::Cat::Set" id="Acme::Cat/And/owner_id/O:O:111"> This stripped string was saved as the reference fixture in t/URT/t/63c_view_with_subviews.t.expected.cat_set.xml:2. • In newer libxml2 (>= 2.13.0, including 2.15.4): During serialization, libxml2 now automatically substitutes illegal XML 1.0 characters with the Unicode replacement character entity (�). As a result: • $xml_doc->toString(1) returns id="Acme::Cat/And/owner_id/O:�O:111�". • The subsequent regex does not touch � because it is composed entirely of valid ASCII characters (&, #, x, F, D, ;). • Test 27 fails comparing got against expected: - <object type="Acme::Cat::Set" id="Acme::Cat/And/owner_id/O:O:111"> + <object type="Acme::Cat::Set" id="Acme::Cat/And/owner_id/O:�O:111�"> . ────── ### Possible Fix . Sanitize strings (removing invalid XML characters) before inserting them into DOM nodes/attributes in lib/UR/Object/View/Default/Xml.pm, rather than attempting to clean them after toString(): . my $id = $subject->id; $id =~ s/[^\x09\x0A\x0D\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//go if defined $id; $object->addChild( $xml_doc->createAttribute('id', $id ) ); . ++++ . The analysis is good, but the solution is lackluster. I pushed the IA further by asking: . > are there other special characters beside char(29) and char(30) that are used by UR ? . ++++ Yes. In lib/UR/BoolExpr/Util.pm:18-24, UR defines a full set of ASCII control characters used to serialize rule definitions and value IDs: . ### Control characters in UR::BoolExpr::Util . Character │ Hex │ ASCII Name │ Variable Name │ Purpose in UR ───────────────────────────┼──────────────────────────┼────────────────────────────┼──────────────────────────┼───────────────────────────────────────────────────────────── chr(20) │ 0x14 │ DC4 (Device Control 4) │ $empty_list │ Represents an empty arrayref [] chr(21) │ 0x15 │ NAK (Negative Acknowledge) │ $null_value │ Represents undef / SQL NULL chr(28) │ 0x1C │ FS (File Separator) │ $empty_string │ Represents an empty string "" chr(29) │ 0x1D │ GS (Group Separator) │ $id_sep │ Separates rule template ID from value ID chr(30) │ 0x1E │ RS (Record Separator) │ $record_sep │ Delimits distinct property values within a value_id chr(31) │ 0x1F │ US (Unit Separator) │ $unit_sep │ Delimits items inside a multi-value list (e.g. in => [...]) . │ Important │ All 6 of these characters fall into the ASCII C0 control range (0x00–0x1F) and are strictly forbidden in XML 1.0. If an object ID or property (such as a UR::BoolExpr or │ UR::Object::Set) contains any of these (e.g., representing undef, empty strings, or lists), newer libxml2 will replace them with �. ────── ### Other Delimiters Used Across UR . 1. "\t" (chr(9), Tab): • Default composite_id_separator used to join multi-property primary keys in UR classes and UR::Object::Index. (Valid in XML 1.0). 2. "\0" (chr(0), NUL byte): • Used in Command::Dispatch::Shell and Command::V1 to join command line arguments (join("\0", $0, @argv)). (Forbidden in XML 1.0). 3. "/" (Slash): • Used as the composite_id_separator in UR::BoolExpr::Template (e.g., Acme::Cat/And/owner_id/O:). 4. "\n" (chr(10), Line Feed): • Default record_separator for file-based datasources (UR::DataSource::File, UR::DataSource::Filesystem). ++++ . All in all, this patch removes the control chars used by UR which are forbidden in XML from the `id` field before injecting data in XML::LibXML. |
dod@debian | no | debian |
All known versions for source package 'libur-perl'
- 0.470+ds-4 (forky, sid)
- 0.470+ds-3 (trixie)
- 0.470+ds-2 (bookworm)
