As long as you’re not in a hurry - I’m generally quite slow with replying
That would be awesome! It’s really good to get all these questions because it will make patching more approachable and easy for beginners.
Well, that is weird. I just tested it myself and it works for me. Did you change the unified_diff.patch
file? The error message means that the script could not determine whether the file actually is a patch. Can you run file --mime-type -b unified_diff.patch
and check if the output is text/x-diff
?
That’s because it did not recognize the patch file and aborted the process, i.e. it did not import anything yet. The CONFIG
file is just an unchanged copy of the config file you prepared. The message means that you can (should) delete the newly created folder so that you can try again. (The script doesn’t delete it automatically because it might be interesting for finding what went wrong - not in our case though.)
The license is not required at this step, and the -eL
option download the license text from spdx.org. It should actually print something like saved license GPL-3.0-or-later to COPYING
…
The only thing you may have to run on the phone is rpm -qf /path/...
to find the package that a file belongs to. The new -Id
option does that for you though, so normally you don’t have to run anything via SSH yourself.
Also, you shouldn’t put sailfish-patch
on the phone because it needs Bash and wouldn’t work with Sailfish’s Busybox.
The script needs SSH access to your phone, though, and I just realised that it isn’t documented in the readme how to configure this. You have to set these environment variables (they have very brief descriptions in the manpage and when running sailfish-patch --help
):
-
SF_PATCH_SSH_TARGET
: set this to the IP you use to connect -
SF_PATCH_REMOTE_USERNAME
: set this todefaultuser
, the current default value is stillnemo
-
SF_PATCH_PASSFILE
: this is quite important: on your phone, go to Settings → Developers → Password and set a secure password. Then save this password in a plain text file somewhere on your computer, and define the path to this file inSF_PATCH_PASSFILE
.
(The script needs root (devel-su) access to your phone because it has to run pkcon
and rpm
when downloading packages from the Jolla store, and when installing the patch for you.)
With “bootstrapping” I mean “take a config file, download the source packages listed there, create a new git repository containing all files, then last but not least apply the patch to the files in the patched
folder”. In other words: “set everything up for you so you can get started”.
The -u
or --update
option does that for patches that were created with sailfish-patch, i.e. that already have a config file. The -i
or --import
option uses -u
internally but adds a few more steps.
You can share it here: https://paste.systemli.org
I hope this wall of text doesn’t confuse you further ;).