I admit I haven’t searched far and wide, but a brief search shows little information on the topic - is there some documentation on Patch development for Patchmanager?
I attempted to make a new directory in /usr/share/patchmanager/patches/ with a unified_diff.patch and patch.json, however it would not appear in Patchmanager’s UI. What step did I miss?
I then figured there must be more to it, so I went looking and found ichthyosaurus/sailfish-patch: Develop SailfishOS patches - Codeberg.org, which appears to be some semi-automated development tool for building patches as fully bona-fide RPMs - thought it’s quite involved, and I haven’t had the time to properly understand how it works yet. For example, step two wants to SSH into my phone as the root user! For one I’d have to figure out what config file to edit to allow that, but for two I’m fairly sure it’s not exactly a good idea to allow SSH logins as root! All I want to do is make a slight adjustment to a qml file in /usr/share/...!
So, my question remains, what is the best practice to start development of a Patchmanager Patch? Is there any documentation? Or am I already heading down the correct path and I just need to sit down and spend a bit more time and effort on it?
1 Like
I actually messed around with this today in order to finally put an “Archive” button in the E-Mail client. Took a bit of trying stuff but it works now. The documentation for developers is very helpful in case you have not seen it yet: patchmanager/README-Patch-Developers.md at master · sailfishos-patches/patchmanager · GitHub
In addition to creating the two files you mentioned, I also did:
chown root:root /usr/share/patchmanager/patches/MYPATCH/unified_diff.patch
chmod 644 /usr/share/patchmanager/patches/MYPATCH/unified_diff.patch
Although I’m honestly not sure if that’s really required. However, one thing I noticed (and that led to my patch not showing up like yours for a while) is that Patchmanager seems to be pretty strict about small errors, so maybe double check your .patch and .json for small errors (brackets, syntax) and for strictly adhering to the json scheme provided in the documentation. Spent way more time today than I will admit because of something stupid like that and had to resort to an LLM because my human brain is so bad with spaces, bracket-patterns and the like. 
5 Likes
Thankyou! Somehow I had indeed missed that.
I’ll try your commands above too when I get home. Can I ask why you have your patch in both the patchmanager/patches directory and the patchmanager directory?
1 Like