-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add aarch64 support #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@b100dian, IMO the changes you labelled with "busybox support" are bug fixes, but are not related to supporting busybox!
false | true; echo $?
results in 0 (i.e., "O.K") on both, ash and bash.set -o pipefail; false | true; echo $?
results in 1 (i.e., "fail") on both, ash and bash.
- Consequently, your comments "
# for busybox
" (twice: in each of the two files patched) is notcorrectreally necessary. - Also the addition of
; test ${PIPESTATUS[0]} -eq 0
is superfluous, AFAICS.
But you detected at least two places in which $?
(after a pipeline applying or testing a patch) is never evaluated, and more places in which only one of the cases (failure or success) is checked for!
IMO these shall be rectified, along setting set -o pipefail
(what you already do).
Thanks @Olf0 for looking into this - the reference to busybox is actually because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@b100dian, what you labelled as "naive aarch64 support" is truly "naive", but might be an appropriate "quick & dirty hack" to make Patchmanager working on aarch64.
But because
- hardcoding library paths, for which RPM macros exist is evil (but I understand that there is no other "quick & dirty" way to let your patched Patchmanager still work on ARMv7-A),
- this "naive aarch64 support" also comes with a set of fixes, which are completely unrelated (and mislabelled "busybox support"),
IMO you shall separate these!
I do not think that this "naive aarch64 support" is appropriate for the "master" branch, in contrast to the fixes labelled "busybox support", when they are enhanced and complete.
Thus these must be separated structurally, in order to be separately applicable.
Agreed - this was just a branch based on the sfos4-fix branch, let me cherry pick the non-aarch64 related commits in a PR against master |
EDIT: Sorry it is late and I have a slight headache: You are correctly deleting Oh, I did not try it, because it is superfluous on both, ash ("busybox") and bash, and has not been there before (AFAICS). But thinking about it, that does make sense, because P.S.: Mind that all this code shall still run under bash (because that is what SailfishOS releases before 3.2.0 use), the task is only to make it busybox's ash compatible. P.P.S.: By reading the error reports WRT Patchmanager 3 on recent SailfishOS releases, I suspect there are more "Bashisms" hidden somewhere in Patchmanager's shell code. But because I am fighting a nasty breakage on recent SailfishOS releases of a tool, which I wrote and maintain, the most I can offer is to review every now and then. Plus I am only good at shell code! |
Sorry, I misunderstood (that you are correctly deleting Mind, that you might also want to integrate @CODeRUS existing fixes for SailfishOS 4.x (i.e., Merge Request #48, although I partially do not like them, because they include a change, which breaks Patchmanager for SailfishOS < 4). |
which one please? |
Well, thinking about it, this was nitpicking by me: IIRC @CODeRUS clearly stated, that he will not do anything for Patchmanager, any more, hence this is rather about maintaining your own fork in a suitable manner; consequently what is "suitable" is up to you. |
Dear @CODeRUS, |
Oh, I see! Another nonsense comment by me, tonight: You already use the |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking fine.
Side note: BTW,
grep libpreloadpatchmanager /etc/ld.so.preload > /dev/null
is better written as
grep -qF libpreloadpatchmanager /etc/ld.so.preload
, but that is unrelated to this specific change.
P.S: I wonder why I am able to "approve" and to "request changes" for this MR. Have I become more than a simple Patchmanager contributor here? Will check, but for now I will leave this as a "comment".
Well (just stating the obvious), they really are not there, because Consequently |
On first sight, the |
But the build phase (defined in section
So maybe you might have to adapt the "makefiles" (but there are not any: this is where I lack the understanding for such a "modern" build process). |
That's because
Q: Is the library actually supposed to end up in lib64? Some things should go to /usr/lib even in 64bit systems. (Note the ld.preload configuration in the .spec also hardcodes /usr/lib not /usr/lib64) |
Disregarding whether this is correct, this fixes the compile/install/package error: Builder here: https://build.sailfishos.org/package/show/home:nephros:branches:home:b100dian:patchmanager/patchmanager |
That was the missing step, thanks @nephros - and now I had to patch the upgrade from lib/ to lib64/ :) |
I just tested the upgrade path and it seems to work now. If no-one has anything against, tomorrow I will merge @nephros PRs then branch out @Olf0 would you want to start a thread on FSO? We talked earlier and agree that "A forum (thread) is IMO the best tool to communicate and organise a Patchmanager developers team in an open and transparent manner" but I'd like to do it on forum.sailfishos.org nonetheless. Would be useful for logging bugs like this one https://forum.sailfishos.org/t/patchmanager-patches-in-koli-4-0-1/4925/143 and the future ones:) |
Now it really makes sense, per But I think this can be simplified and made consistent with the rest of the spec file by using RPM variables:
|
Done that (among other beautifications and clarifications, without altering functionality) per MR b100dian#2 |
I think this needs a bit more consideration:
|
I don't have anyrhing against TMO per se, but:
I agree though that the future should be decided in before making an announcement. OTOH PM is broken for many right now, perhaps we should focus on shipping something useful first and then get communication in order. I also agree that Jolla relying on Jolla infrastructure is a bit of a risk, however I don't think it's hugely important, as build servers can relativly easily changed (I myself have used four different ways to build packages) and code repo is external to Jolla anyway. Having discussions where the users are is worth the risk. License: obviously it's up to the principle authors to decide, but can you give a reason or two why you'd prefer LGPL? Code repo: if we can continue here that would be best , if not however, I 'd like to suggest moving away from Microsoft Github - just out of principle. (owner, monopoly, proprietary git extensions etc). |
Folks, fully agree. I was excited about the progress:) |
Re: TMO |
Continuing this discussion at #57 |
O.K., I thought this does not matter, because it is currently just us three looking at this. I will look at the result, when you merged this PR and everything (branches, code) has settled a bit. I do trust you to do the right things, I but just cannot fully follow: Don't mind (explaining etc.), I will see the outcome.
Absolutely agreed: The baseline was, "only move when we have to".
As you already switched on discussions, created new build actions, required reviews for merging: These were the essential things. |
Comparing it with |
|
The default branch matters precisely because if you have the sfos4-fix can be also be deleted, as it can be restored from #48 Changes I've done:
Then I added aarch64 to the GH workflow. This PR still needs review you know:) I've upgrade you contributor, I was also under the impression that you are part of some team for reviews worked |
O.K. (actually I hate to see stuff deleted, without knowing for sure, that it is obsolete or superfluous). I just kindly ask you and / or @nephros to check, if its two commits contain other relevant or useful changes (primarily the first one): P.S.: Will start reviewing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve a second time? O.K.
Did you accept the invitation for contributors?;) |
There was none! Just checked again in my GH-notifications. The documentation is not really helpful, either: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews and liked pages there. |
According to the documentation "collaborators" do have "write access" at "personal repositories": https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository#collaborator-access-for-a-repository-owned-by-a-user-account But as a matter of fact, my approval turned the state of this PR to "red"! |
BTW, it seems that PRs are "automatically merged" after a successful review, i.e. that a reviewer's O.K. triggers merging of a PR. |
I will log out and then back in: Maybe the notification then appears. |
|
I will approve the remose timer PR to see if it has this outcome:) |
|
no rush, will wait for @nephros. And maybe the email in your spam folder. (I can merge but who's waiting on this, us - tomorrow) |
From my experiments with roles and orgs, I know that all notification show up in the web-frontend, hence I looked only there: This one did not. |
O.K., I could merge now. |
Yeah, squash it
…On Tuesday, September 21, 2021, olf wrote:
O.K., I could merge now.
I will leave it to you, if you want a single squashed commit or a regular merge of all commits.
Or do you want me to try merging?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#49 (comment)
--
Sent from my Sailfish device
|
Done. P.S.: In the personal GH-settings for notifications, in the section "Actions" there is the paragraph "Notifications for workflow runs on repositories set up with GitHub Actions." with three choices: "Email" was set, but "Web" was not. |
... and my fears of auto-merging were just based on bad wording in GH's web-frontend. And you already have schown that this setting is off. |
O.K., looking at it more closely, I believe that all relevant changes in the first commit were carried over by Coderus from the sfos4 to the sfos4-fix branch (with small enhancements). And the sfos4-fix branch should be deleted now, because what I merged into master tonight was based on it (and it sure did not receive any further commits). |
Oh, took me a while to have an idea what this may address. 🤔 It is nice to see you and @nephros so motivated and active, but I am usually quite tired, when taking a look at this after work. 😪 |
We are all working.. - @nephros seems to have a head start now, but we may jump in and fill in the gaps when he's underwater:) |
We can absolutely reduce speed, if we're in it for the long term after all (hopefully). Not necesary at all to comment of 5 threads every couple of hours. Don't let software steal spare time. Unless you like wasting it on it. |
This adds the correct lib64 location for the preloaded so.
Also, because a previous version of this might have been installed from b100dian OBS or chum, which used the 64-bit binary in /lib/, that needs to be cleared from ld.so.preload.
Old description
Without bash installed, the busybox shell was erroring out with "Substitution failure". This changes the script to no longer need `${PIPESTATUS[0]}` which is the cause of the above failure.Also, when building for aarch64, there is some mismatch between where a lib is packaged and where is looked up. The 'fix' is to currently just hardcode "lib" - that's why I say its' the naive fix, only to unblock building/running.