Created attachment 1394823 [details]
Description of problem:
When add_permission_file method is called with parameter mode=0755 the created RPM file does not honor this file permission mode. It is possible that this is happening only for .so lib file.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run my reproducer (where the mode="0755" parameter is used)
2. Look inside of the created RPM file to see that the .so file is not executable
The foo.so library inside is not executable even when the mode is set to 0755.
The foo.so library should be executable.
This is happening only on Rawhide. It is working correctly on Fedora 27 and before.
Looking into test-rpmbuild-test-1.0-1/LOGS/x86_64/build.log, there is:
*** WARNING: ./usr/lib/fun.so is executable but has empty or no shebang, removing executable bit
Processing files: test-1.0-1.x86_64
so I assume build process just become "smarter" in Rawhide. I thought t could be resolved with:
--- bz1544361.py.ORIG 2018-02-13 21:53:57.718403384 +0100
+++ bz1544361.py 2018-02-13 22:00:38.001926208 +0100
@@ -1,12 +1,12 @@
-from rpmfluff import SimpleRpmBuild, SourceFile
+from rpmfluff import SimpleRpmBuild, GeneratedSourceFile, make_elf
p = SimpleRpmBuild("test", "1.0", "1")
- SourceFile("fun.so", "Content of the library"),
+ GeneratedSourceFile("fun.so", make_elf()),
but looks like it still do not fool rpmbuild sufficiently...
Hmm, had to improve our faked ELF file header a bit:
Built into Rawhide: