New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patches with targets in /usr/lib[,64] do not apply on 32/64bit systems #71
Comments
|
Whatever solution, it would probably be useful to add a section in the patch.json schema to allow authors to specify whether their patch is for 32 or 64 bit systems, and whether it is expected to work on either. something like meaning 32-bit only, 64-bit only, or both, respectively. |
|
|
|
There's also the reverse fact - patches written for 64 bits only would fail on 32 bits. |
|
add vice versa conversion for 32 bit systems :) |
|
Definitely possible to add the feature to web catalog, I've been playing with this CODeRUS/django-test@master...b100dian:bitness |
|
do you have any examples of difference in files of lib and lib64? |
|
I think it boils down to patches going to |
You mean examples of e.g. Sailfish Silica files that are different between 32 and 64 bit versions? I don't have an example of any, but I think it's possible there will be differences. It's probably not safe to assume they are always identical, although they will be in most cases. But trying to apply and failing sometimes (i.e. files are different) is better than always failing (files are not different, but path is). |
Fix paths case-by-case - we now know |
I think this is a better fix - not an /usr/lib/ overall replacement, a specific one, and not requiring web catalog changes (though I am more confident we can do that now than before). Also, this is not a folder that will be present in both lib and lib64. (remember we should patch in the opposite direction too:) |
|
Agreed. The question is where and when to do the mangling. pm_apply.sh would be the obvious one, and easy to hack. So if it is pm_apply.sh, do we do it transient, so every time mangle, apply, and delete the result after, or install a new fixed patch into the original patch dir, or perhaps a 'bitness_override' dir we then search first when applying? (...sorry for the run-on sentence, being a German speaker does that to your mind sometimes...) |
|
We can use a name like Every time -> because there might be other reasons to 'correct' patches down the road, and we wouldn't want to cache a previous version. "corrected"? Maybe there's a better term. unified-diff-patched.patch :P or "edited"
I have that in my 'source' language too, can't complain |
"edited" sounds better and more neutral IMO: |
* Convert patches between 32 and 64 bit library path Should fix #71 #71 * fixup! Convert patches between 32 and 64 bit library path * add some more clarity to variable names and things * fixup! add some more clarity to variable names and things * fixup! add some more clarity to variable names and things * Mangling for bitness the paths used in doPrepareCache * fixup! Mangling for bitness the paths used in doPrepareCache * introduce config file for path manging candidates * use "convert" instead of "mangle" in script outout * fixup! use "convert" instead of "mangle" in script outout * MANGLE_CANDIDATES -> m_mangleCandidates, we are not a static string anymore * really wip * fixup mangle candidates QStringList * correct dbus string array * DISABLE_MANGLING with bitnessMangle + pm_unapply * Use bitnessMangle flag in cpp too * add tools used in scripts to pkg requirements * Refresh patches on bitness mangling change * mangle before test if applied seems to fix installtime + patch failure * show mangle paths always * align shown paths to indicator * fixup! align shown paths to indicator * remove test path Co-authored-by: Vlad G <b100dian@gmail.com>
Systems with 64bit userland use
/usr/lib64instead 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:
patch -p3 --dry-run -d /usr/lib{,64}/when a/usr/libstring is detected in the patch file/usr/libare patched from the same diff fileunified_diff_64.patch) so devs can ship either or both/usr/lib*paths in existing unified_diff files when installing a patch from Web Catalog/usr/lib*paths in existing unified_diff files when applying a patch at runtimeThe text was updated successfully, but these errors were encountered: