yes but she changed the content, so they aren’t original anymore…
I had a look into some patches I downloaded from OpenRepos, and there is in each patch only one file defined, and after this, the
- original line
+ patched line
More than one file to be patched at once in subfolders of the .rpm file? correct?
and…
Before and after the old and the new line there is code snippet that is not changed but stays at it is. Does Patchmanager search for the whole given pattern for the case that line numbers may change?
and…
Are all these patches written by a human coder or are they generated automaticly with some development environment or similar?
btw, I failed to create a GitHub account. They don’t accept my email address and system said that ‘address could not be verified’.
That what the patch application does, if it detects reasonable diffs before/after, “applies them with fuzz”.
Generated. When you patch a single file, you can just diff the original and the edited one and maybe edit the paths in the patch header.
@coderus maintained a repo with qml files and you could just diff that whole repo from one branch to another, maybe we should continue updating that, although I don’t know firsthand how they were generated (well, copied, but hopefully not by hand). Now it’s at 4.4.0.x so it’s a tad behind…
Most Patches only patch a single file. But one can also record the differences between two sets of files by the diff
utility.
More than one file to be patched at once in subfolders of the .rpm file? correct?
No.
-
Do not go the RPM-Patch route: It is outdated (but still supported and works well) and you have to manually create a JSON file for an RPM Patch. It is only required for really complex Patches (none of your changes falls into this category, AFAICS) and allows you to additionally execute shell scripts (the usual RPM scriptlets), which a Patch in Patchmanager’s Web Catalog cannot.
-
Well, you do need to read the documentation thoroughly, i.e. the whole section “Information for Patch developers”. Actually I think you are a good tester if something is missing or unclear, hence please provide feedback if you think so.
The core statement is:Usually, you can generate such patch file using the following command, with the directories
original
andpatched
containing the original and modified files:diff -ur original/ patched/ > unified_diff.patch
BTW, I also wrote a glossary which resides in Patchmanager’s wiki, because many terms used in the context of Patchmanager are ambiguous and / or confusingly similar.
Here the section for words starting with “P
”.
Before and after the old and the new line there is code snippet that is not changed but stays at it is. Does Patchmanager search for the whole given pattern for the case that line numbers may change?
Yes, though not Patchmanager proper, but the diff
utility it uses.
Are all these patches written by a human coder or are they generated automatically with some development environment or similar?
See above and RTFM: The diff
utility does that.
btw, I failed to create a GitHub account. They don’t accept my email address and system said that ‘address could not be verified’.
Are you sure that GitHub’s verification email was not filtered out (or sorted away) by some mechanism you employed? As a first measure I would take a look in the email spam folder.
No! I assume @Seven.of.nine will correctly state “this is way too complex”, because it requires handling a git repo at the command line, which in turn requires to have understood the concepts of git, or one will grossly fail.
maybe we should continue updating that,
Yes. This is cool, I was not aware of this repo.
although I don’t know firsthand how they were generated (well, copied, but hopefully not by hand).
Looks like find /usr -name '*.qml'
executed as root on a freshly installed SailfishOS. But IMO you better kindly ask @coderus to denote how this was generated at the end of the README.
Absolutely correct @olf , I have no idea about these concepts
I’m sure. GitHub did not finish, after making my entries of mail-address, PW and nickname it refuses to proceed and never said that a verification mail was sent. My spam folder is not empty but nothing there from GitHub.
I wrote sailfish-patch exactly to make developing patches easier also for less technical people. All my patches are built using this tool.
@Seven.of.nine Maybe give it a try? It handles downloading sources and generating packages, and it’s much easier than doing everything by hand.
(@Fellfrosch was planning to write a very easy to follow how-to but for that I first have to fix a hiccup. I didn’t have time yet to give my patches the love they deserve. I’m traveling but when I’m back I’ll look into it again.)
qml and js files, right
and that repo have ci to generate pm zip file based on pull request changes, no git commands required
Yes, sure! Thank you so much @ichthyosaurus and @coderus !
edit:
What repo do I have to add to my Linux computer? (Debian 12)
andrea@AndreaDesktop:~$ su
Passwort:
root@AndreaDesktop:/home/andrea# apt-get install sailfish-patch
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
E: Paket sailfish-patch kann nicht gefunden werden.
root@AndreaDesktop:/home/andrea#
updated sailfish-qml repo with files from 4.6
just create a fork, add extra files to patch directory, modify files, create pull request to sailfish-qml/master and your patch is ready
and you can use your fork branch as opensource source of your patch changes
You should do "git clone https://github.com/ichthyosaurus/sailfish-patch
" or “curl -LO https://raw.githubusercontent.com/ichthyosaurus/sailfish-patch/main/sailfish-patch”
@Seven.of.nine, I still suggest not to start learning git
at the command line (due to aforementioned reasons, which you confirmed to be justified), but to create a GitHub account and to utilise git
solely via GitHub’s web-frontend.
Technically @smatkovi is correct, that the first action would be to “fork” (in GitHub’s parlance, i.e. “clone” in bare git
parlance) @ichthyosaurus’ sailfish-patch
source code repository.
None. You are thinking of package repositories, which usually provide RPM files or Debian packages.
IT people usually do not care about concise wording, everything is quite fuzzy, the pinnacle is the term “system”.
In this context “repo” means "git
source code repository" at GitHub.
Sorry, there is no way around successfully creating a GitHub account for this task becoming feasible for you.
I will do so. (20 chars)
Please mention here, when you succeeded. Then I will try to describe the “coderus way” in detail, because I believe this is the easiest route for you to take (IMO the second easiest for you is to zip a diff file you created locally on your device).
if you create a detailed description anyways, maybe you can turn it into a wiki for later use of other users.
To be honest, I have only little knowledge of coding. I simply did search all qml files and set all delays that looks to me not really sensefull or necessary to lower values because I had enough from waiting for UI all the time, holding me back from continueing to do what I want to do. More guessing and out of feeling, without real knowledge about the program structure and also not for what these delays are intended for. I guess, the devs wanted the UI to appear relaxed or calm, but personally I feel to have permanently wait for the UI much more stressful than relaxed. Therefore I started this project. It took me a few weeks. It’s still immature and not tested enough. If tested more, I’ll update the list with some instructions.
Now the post #1 is so big that the keyboard hack has no room because of the limit of 50000 chars.
Here is the keyboard hack:
Keyboard Hack:
Reduce the keyboard's height - for layout extension see larger file at the end.
/usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml
cd /usr/share/maliit/plugins/com/jolla/
cp /usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml /usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml.bak
vi /usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml
Undo:
cp /usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml.bak /usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml
As a reminder, if using vi or vim, you can display the lines number by typing
:set number Line numbers may vary in other SFOS versions.
line 16, change the 58 value to e.g. 37: // line 32 in SFOS 4.6.0.13
property int keyHeightLandscape: isLargeScreen ? keyHeightPortrait : 58*verticalScale
line 17, change the 80 value to e.g. 50: // line 33 in SFOS 4.6.0.13
property int keyHeightPortrait: 80*verticalScale
line 38, change the 99 value to 70: // Line 36 in SFOS 4.5.0.19, line 52 in SFOS 4.6.0.13
property int popperHeight: isLargeScreen ? 99*scaleRatio : 120*scaleRatio
Then restart the GUI of course.
---------------------------------------------
---------------------------------------------
Extend keyboard layout with smarter popups - no more shift and symbol needed - Example: DE, is possible the same way for other languages.
File is: /usr/share/maliit/plugins/com/jolla/layouts/de.qml
cd /usr/share/maliit/plugins/com/jolla/layouts/
cp /usr/share/maliit/plugins/com/jolla/layouts/de.qml /usr/share/maliit/plugins/com/jolla/layouts/de.qml.bak
vi /usr/share/maliit/plugins/com/jolla/layouts/de.qml
Undo:
cp /usr/share/maliit/plugins/com/jolla/layouts/de.qml.bak /usr/share/maliit/plugins/com/jolla/layouts/de.qml
This is the keyboard layout with 4 rows and extended popups (german)
After changing restart the GUI of course.
Replace content of file after the licence text with this:
import QtQuick 2.0
import ".."
KeyboardLayout {
splitSupported: true
KeyboardRow {
CharacterKey { caption: "1"; captionShifted: "1"; symView: "1"; symView2: "1" }
CharacterKey { caption: "2"; captionShifted: "2"; symView: "2"; symView2: "2" }
CharacterKey { caption: "3"; captionShifted: "3"; symView: "3"; symView2: "3" }
CharacterKey { caption: "4"; captionShifted: "4"; symView: "4"; symView2: "4" }
CharacterKey { caption: "5"; captionShifted: "5"; symView: "5"; symView2: "5" }
CharacterKey { caption: "6"; captionShifted: "6"; symView: "6"; symView2: "6" }
CharacterKey { caption: "7"; captionShifted: "7"; symView: "7"; symView2: "7" }
CharacterKey { caption: "8"; captionShifted: "8"; symView: "8"; symView2: "8" }
CharacterKey { caption: "9"; captionShifted: "9"; symView: "9"; symView2: "9" }
CharacterKey { caption: "0"; captionShifted: "0"; symView: "0"; symView2: "0" }
FittedCharacterKey { caption: "ß"; captionShifted: "@"; symView: "°"; symView2: "¤" }
}
KeyboardRow {
CharacterKey { caption: "q"; captionShifted: "Q"; symView: "_"; symView2: "€"; accents: "Q"; accentsShifted: "q" }
CharacterKey { caption: "w"; captionShifted: "W"; symView: "|"; symView2: "£"; accents: "W"; accentsShifted: "w" }
CharacterKey { caption: "e"; captionShifted: "E"; symView: "$"; symView2: "$"; accents: "&Eé€"; accentsShifted: "&eÉ€" }
CharacterKey { caption: "r"; captionShifted: "R"; symView: "§"; symView2: "¥"; accents: "#R!¡"; accentsShifted: "#!r¡" }
CharacterKey { caption: "t"; captionShifted: "T"; symView: "{"; symView2: "₹"; accents: "T~"; accentsShifted: "t~" }
CharacterKey { caption: "z"; captionShifted: "Z"; symView: "["; symView2: "¤"; accents: "Z"; accentsShifted: "z" }
CharacterKey { caption: "u"; captionShifted: "U"; symView: "]"; symView2: "<"; accents: "&_úU"; accentsShifted: "&_uúÚ" }
CharacterKey { caption: "i"; captionShifted: "I"; symView: "}"; symView2: ">"; accents: "Ií"; accentsShifted: "Íií" }
CharacterKey { caption: "o"; captionShifted: "O"; symView: "<"; symView2: "["; accents: "óO"; accentsShifted: "Óoó" }
CharacterKey { caption: "p"; captionShifted: "P"; symView: ">"; symView2: "]"; accents: "‰§%P+"; accentsShifted: "‰§%p+" }
FittedCharacterKey { caption: "ü"; captionShifted: "Ü"; symView: "%"; symView2: "‰"; accents: "Ü" }
}
KeyboardRow {
CharacterKey { caption: "a"; captionShifted: "A"; symView: "*"; symView2: "`"; accents: "A@'áåæ"; accentsShifted: "a@'ÁÅÆ"}
CharacterKey { caption: "s"; captionShifted: "S"; symView: "#"; symView2: "^"; accents: "|*S;ş$"; accentsShifted: "|*s;Ş$" }
CharacterKey { caption: "d"; captionShifted: "D"; symView: "+"; symView2: "|"; accents: "÷D:/$"; accentsShifted: "÷d:/$" }
CharacterKey { caption: "f"; captionShifted: "F"; symView: "-"; symView2: "_"; accents: "F?¿"; accentsShifted: "?¿" }
CharacterKey { caption: "g"; captionShifted: "G"; symView: "="; symView2: "§"; accents: ">=Gğ'\""; accentsShifted: ">=gĞ'\"" }
CharacterKey { caption: "h"; captionShifted: "H"; symView: "("; symView2: "{"; accents: "H"; accentsShifted: "h" }
CharacterKey { caption: "j"; captionShifted: "J"; symView: ")"; symView2: "}"; accents: "J"; accentsShifted: "j" }
CharacterKey { caption: "k"; captionShifted: "K"; symView: "\""; symView2: "°"; accents: "<K([{"; accentsShifted: "<k([{" }
CharacterKey { caption: "l"; captionShifted: "L"; symView: "~"; symView2: "·"; accents: ">L)]}"; accentsShifted: ">l)]}" }
CharacterKey { caption: "ö"; captionShifted: "Ö"; symView: "!"; symView2: "¡"; accents: "Ö"; accentsShifted: "ö" }
CharacterKey { caption: "ä"; captionShifted: "Ä"; symView: "?"; symView2: "¿"; accents: "Ä"; accentsShifted: "ä" }
}
KeyboardRow {
splitIndex: 5
ShiftKey {}
CharacterKey { caption: "y"; captionShifted: "Y"; symView: "@"; symView2: "«"; accents: "ýY¥"; accentsShifted: "Ýy¥" }
CharacterKey { caption: "x"; captionShifted: "X"; symView: "&"; symView2: "»"; accents: "X*"; accentsShifted: "x*" }
CharacterKey { caption: "c"; captionShifted: "C"; symView: "/"; symView2: "÷"; accents: "Cç"; accentsShifted: "cÇ" }
CharacterKey { caption: "v"; captionShifted: "V"; symView: "\\"; symView2: "“"; accents: "V"; accentsShifted: "v" }
CharacterKey { caption: "b"; captionShifted: "B"; symView: "'"; symView2: "”"; accents: "`B"; accentsShifted: "`b" }
CharacterKey { caption: "n"; captionShifted: "N"; symView: ";"; symView2: "„"; accents: "Nñ#"; accentsShifted: "nÑ#" }
CharacterKey { caption: "m"; captionShifted: "M"; symView: ":"; symView2: "×"; accents: "×M-"; accentsShifted: "×m-" }
BackspaceKey {}
}
SpacebarRow {}
}
Added a small howto to post #1
It’s still immature and not tested enough. If tested more,
Outsource testing!
You cannot test on that many devices and configurations other users will.
This is one aspect you will implicitly archive by providing Patches and using GitHub’s infrastructure (here: its issue tracker).
I found the biggest speed up is to not use system Browser. The overall performances of the system are heavily affected when booster-browser and sailfish-browser tasks enter