My application ships with a binary, which requires that I remove build paths after compilation. This is achieved by bit-tweaking using sed.
Basically, I would need to bit-tweak the binary hard-coded with the build paths:
$ strings mylib.so.1.0.0 | grep myapp /home/mersdk/myapp/installroot/usr/share/harbour-myapp/
This method previously worked with gnu sed (e.g. on SailfishOS 3.4)
sed -i 's|/home/mersdk/myapp/installroot/usr/share/harbour-myapp/|/usr/share/harbour-myapp/\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0' mylib.so.1.0.0
This gave the correct results:
$ strings mylib.so.1.0.0 | grep myapp /usr/share/harbour-myapp/
However, since SailfishOS 4.0 (I think), gnu sed has been replaced with busybox sed, which doesn’t appear to handle substitution of hex characters, including \x0
Attempting to do the same with busybox sed, leads to the following incorrect output:
$ strings mylib.so.1.0.0 | grep myapp /usr/share/harbour-myapp/x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0
Towards a solution
An incomplete solution was to install gnu sed in the build environment by specifying in the RPM spec:
However, when installing the build requirements, it errors out because of a conflict between busybox-symlinks-sed and gnu-sed:
Problem: busybox-symlinks-sed-1.31.0+git18-1.4.2.jolla.i486 conflicts with gnu-sed provided by gnu-sed-4.1.5+git1-1.1.2.jolla.i486 Solution 1: deinstallation of busybox-symlinks-sed-1.31.0+git18-1.4.2.jolla.i486 Solution 2: do not install gnu-sed-4.1.5+git1-1.1.2.jolla.i486 Choose from above solutions by number or cancel [1/2/c/d/?] (c): c Setting version: 0.1 Building target platforms: i486-meego-linux-gnu Building for target i486-meego-linux-gnu error: Failed build dependencies: gnu-sed is needed by harbour-myapp
Is there a way I can specify in the RPM spec to remove the package busybox-symlinks-sed? This needs to be done each time to work with my SailfishOS CI/CD docker solution.