Skip to content

Patches with targets in /usr/lib[,64] do not apply on 32/64bit systems #71

@nephros

Description

@nephros

Systems with 64bit userland use /usr/lib64 instead of /usr/libas a library path.
Patches which target files in either of those locations will therefore not apply on the other platforms even though the patched files themselves might be the same.

This affects e.g. all "silica" patches, as the Sailfish QML files live under $LIBDIR/qt5/qml/Sailfish/*, and basically anything QML that isn't applications in /usr/share.

This means patch developers must currently ship and deploy two versions of each patch, and create two projects on web catalog, or use RPM packaging which installs the appropriate patch version.

Question:

Shall patchmanager implement something that helps with this problem?

Solutions that come to mind:

  • use something like patch -p3 --dry-run -d /usr/lib{,64}/ when a /usr/lib string is detected in the patch file
    • probably the simplest and fastest way, but is it reliable?
    • breaks when files outside of /usr/lib are patched from the same diff file
  • accept a second diff file in the patch hierarchy (e.g. unified_diff_64.patch) so devs can ship either or both
    • this would require modifcation of both patchmanager and the Web Catalog validator for submitting tarfiles
  • modifying Web Catalog to mangle any uploaded diffs to create the missing variant, and supply the correct tarball when PM downloads, so PM always receives a valid patch depending on bittiness
    • wonky, as the catalog can't verify that a file will exist on the system
  • modify /usr/lib* paths in existing unified_diff files when installing a patch from Web Catalog
  • modify /usr/lib* paths in existing unified_diff files when applying a patch at runtime
  • faking the libpath (force /usr/lib also on 64bit) somehow when applying a patch
    • the last three would allow old 32bit patches to be used without the authors needing to update them
  • Other ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendsdaemon, systemd and dbus componentsenhancementthis improves something

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions