Bug 262842

Summary: misc/shared-mime-info depends on py-libxml2 but no listed dependency is given to python
Product: Ports & Packages Reporter: alt2600
Component: Individual Port(s)Assignee: freebsd-desktop (Team) <desktop>
Status: Closed FIXED    
Severity: Affects Only Me CC: adridg, igor.arabesc.pavlov, jjb-b, olivierw1+bugzilla-freebsd, tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   

Description alt2600 2022-03-26 18:48:55 UTC
if py-libxml2 is installed shared-mime-info uses it, but since it has no dependency to python or more importantly py38-libxml2 so it breaks during upgrade with rest of libxml2 bumps.

shared-mime-info-2.0_3
Depends on     :
        libxml2-2.9.13
        glib-2.70.4_2,2
        gettext-runtime-0.21


errors out with cython version error failing to load libxml2mod

[ 91% 80/83] cc -Isrc/test-subclassing.p -Isrc -I../src -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/libxml2 -fno-color-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -O2 -pipe -march=westmere -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -MD -MQ src/test-subclassing.p/test-subclassing.c.o -MF src/test-subclassing.p/test-subclassing.c.o.d -o src/test-subclassing.p/test-subclassing.c.o -c ../src/test-subclassing.c
[ 92% 81/83] /usr/ports/misc/shared-mime-info/work/shared-mime-info-ef58b2b2f7ad4070171c6e45e3b3764daa3ff2c1/data/freedesktop_generate.sh /usr/ports/misc/shared-mime-info/work/shared-mime-info-ef58b2b2f7ad4070171c6e45e3b3764daa3ff2c1 /usr/ports/misc/shared-mime-info/work/shared-mime-info-ef58b2b2f7ad4070171c6e45e3b3764daa3ff2c1/_build
FAILED: data/freedesktop.org.xml 
/usr/ports/misc/shared-mime-info/work/shared-mime-info-ef58b2b2f7ad4070171c6e45e3b3764daa3ff2c1/data/freedesktop_generate.sh /usr/ports/misc/shared-mime-info/work/shared-mime-info-ef58b2b2f7ad4070171c6e45e3b3764daa3ff2c1 /usr/ports/misc/shared-mime-info/work/shared-mime-info-ef58b2b2f7ad4070171c6e45e3b3764daa3ff2c1/_build
ninja: Entering directory `/usr/ports/misc/shared-mime-info/work/shared-mime-info-ef58b2b2f7ad4070171c6e45e3b3764daa3ff2c1/_build'
[ 16% 6/6] Generating po/uk/LC_MESSAGES/shared-mime-info-uk.mo with a custom command
[ 33% 6/6] Generating po/wa/LC_MESSAGES/shared-mime-info-wa.mo with a custom command
[ 50% 6/6] Generating po/zh_HK/LC_MESSAGES/shared-mime-info-zh_HK.mo with a custom command
[ 66% 6/6] Generating po/vi/LC_MESSAGES/shared-mime-info-vi.mo with a custom command
[ 83% 6/6] Generating po/zh_TW/LC_MESSAGES/shared-mime-info-zh_TW.mo with a custom command
[100% 6/6] Generating po/zh_CN/LC_MESSAGES/shared-mime-info-zh_CN.mo with a custom command
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.8/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/libxml2.so.2: version LIBXML2_2.4.30 required by /usr/local/lib/python3.8/site-packages/libxml2mod.cpython-38.so not defined



updating py38-libxml2 first fixes build.
Comment 1 Igor Pavlov 2022-03-27 21:40:52 UTC
I have the same issue.
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-03-28 05:00:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=875d334e7f9596e2ac598945041b2ce685ee11fb

commit 875d334e7f9596e2ac598945041b2ce685ee11fb
Author:     Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2022-03-28 04:54:40 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-03-28 04:59:56 +0000

    misc/shared-mime-info: update to 2.2

    shared-mime-info 2.2 (2022-03-27)
            * model/3mf: new
            * Match shared libraries with version suffix
            * model/obj: add mtllib and Blender comment based magic
            * model/mtl: add Blender comment magic, increase newmtl range
            * model/obj, model/mtl: new types
            * Add Electron Archive Format type application/x-asar
            * text/x-qml: Lower match priority to avoid conflicts with
              Python
            * Move '*.blend' to top of Blender glob list
            * Adding SPARQL media types
            * application/zip: Add `*.zipx` glob and test fixture
            * Added DSD mime type
            * Differentiate comic book archives
            * FITS: Add missing `application/fits` and legacy globs
            * Add Godot engine files
            * Add FlashForge "xgcode" mime-type
            * text/x-objc++src: new type
            * image/heif: test .hif extension too
            * image/hif: add *.hif glob
            * image/heif: add another test case
            * image/heif: add magics
            * Add a build-tools option to allow installing only the mime
              data
            * Add compressed SVG glob pattern `*.svg.gz`
            * Add Apple Wallet pass type application/vnd.apple.pkpass
            * migrate from custom itstool to builtin msgfmt for creating
              translated XML
            * Make the remaining plain text types subclasses of text/plain
            * audio/mobile-xmf: separate from audio/x-xmf
            * Adding ZIM file
            * Make text/x-mrml a subclass of application/xml
            * image/avif: move acronym and expansion to separate fields from
              comment
            * freedesktop_generate.sh: Don't hardcode ninja
            * Add text/x-mpl2
            * application/x-apple-systemprofiler+xml: require
              _SPCommandLineArguments in plist
            * image/jpeg: add test case with embedded property list XML
            * audio/vnd.dts.hd: include parent type magic in magic match
            * model/gltf+json: new type
            * model/gltf-binary: new type
            * application/x-object: add *.mod and a test case
            * application/x-mod: add some ProTracker magics and a test case
            * image/jxl: include test files in test list
            * tests: add trailing linefeed to mime-detection list
            * Make application/x-mswinurl a subclass of text/plain
            * Change description for *.desktop files to "desktop entry"
            * application/x-x509-ca-cert: add magics and test cases
            * application/pkix-cert: add BEGIN/END X509 CERTIFICATE magic
            * application/pkix-crl: add magic and test case
            * application/pkix-cert: add magic and test case
            * image/jxl: new type
            * Added .sc filename extension for Scala source code, as it is
              occasionally used
            * application/schema+json: new type
            * Add text/x-crystal
            * application/x-krita: remove stray period from comment
            * adding org-mode
            * Add Elixir source code mime type
            * Add two new offsets for .kra and .krz
            * text/x-python3: add *.pyi glob (Python stub files)
            * image/x-canon-cr3: new
            * image/x-xpixmap: make XPM3 magic more specific
            * image/x-xpixmap: add XPM2 magic
            * application/x-troff-man: add *.[1-9] glob
            * application/toml: new type
            * Lower priority of "BEGIN {" for perl, awk uses that too
            * Add Smacker video type video/vnd.radgamettools.smacker
            * Clarify database license
            * meson: make xmlto optional, build spec only if found
            * application/x-7z-compressed: add *.7z.001 glob
            * Add Bink video type video/vnd.radgamettools.bink
            * image/x-nikon-nrw: add test case
            * image/x-nikon-nrw: new type
            * application/x-vhdx-disk: improve acronym and its expansion
            * application/ovf: new
            * application/x-qed-disk: new
            * application/x-vdi-disk: new
            * application/x-vmdk-disk: new
            * application/x-vhd-disk, /x-vhdx-disk: new
            * application/vnd.apple.numbers, .pages: add older magics and
              test cases
            * Add text/x-dart
            * application/vnd.apple.numbers, /vnd.apple.pages: new types
            * xdgmime: configure as submodule

    shared-mime-info 2.1 (2020-12-31)
            * New maintainers: David Faure and Ville Skyttä
            * Adapt to xdgmime behaviour change: in case of multiple glob
              matches, and the magic match is unrelated to all of them,
              ignore the magic and pick one of the glob matches. xdgmime was
              actually deviating from the spec on this. (#138)
            * Improve text/vnd.trolltech.linguist magic to reduce false
              positives for MPEG TS files (#10)
            * audio/mpeg: add layer 2, 2.5, and 1 protected magics (#46)
            * Add many aliases for image/x-tga
            * audio/x-mod: improve magic for 669 Composer files (#144)
            * Add mime-type image/ktx2 (Khronos image texture format version
              2)
            * application/oxps: differentiate from /vnd.ms-xpsdocument
            * Make image/g3fax the canonical name for image/fax-g3
            * Make text/vnd.trolltech.linguist the canonical name for
              text/vnd.qt.linguist
            * Make application/vnd.smaf the canonical name for
              application/x-smaf
            * Make application/vnd.apple.keynote the canonical name for
              application/x-iwork-keynote-sffkey
            * Add mime-type image/astc (Adaptive Scalable Texture
              Compression files)
            * Add mime-type for SageMath script files (*.sage)
            * Add mime-type for Kaitai Struct
            * Remove application/x-dc-rom
            * Add mime-type for MAME compressed hard disk image
              (application/x-mame-chd)
            * Add mime-types application/nintendo-3ds-executable,
              application/x-nintendo-3ds-rom
            * Add mime-types application/x-dreamcast-rom,
              application/x-gd-rom-cue, application/x-discjuggler-cd-image
            * Add mime-type application/x-compressed-iso (*.cso)
            * Remove image/avif-sequence
            * Fix application/x-sharedlib vs application/x-executable
              confusion for PIE executables (#11)

    Changelog:
            https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/NEWS

    PR:     262842

 misc/shared-mime-info/Makefile                      | 21 ++++++++++++++-------
 misc/shared-mime-info/distinfo                      | 10 +++++-----
 .../files/patch-data_freedesktop.org.xml.in (new)   | 10 ++++++++++
 .../patch-data_freedesktop__generate.sh (gone)      | 10 ----------
 misc/shared-mime-info/files/patch-meson.build (new) | 11 +++++++++++
 5 files changed, 40 insertions(+), 22 deletions(-)
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2022-03-28 05:00:46 UTC
(In reply to Igor Pavlov from comment #1)
Moin moin 

This should be fixed by the update to 2.2 which no longer uses itstool.


mfg Tobias
Comment 4 Adriaan de Groot freebsd_committer freebsd_triage 2022-08-16 20:02:55 UTC
Closing as "presumed fixed".