Page 1 of 1

Problem with the %configure, %configure2_5x : gtypist

PostPosted: Sep 12th, '17, 21:14
by mjack
Hello!

I have been trying to create a source rpm for gtypist - I can compile this source without any problem with the ./configure, make and make install.

The %configure part in the .spec file doesn't seem to work at all, so I instead tried to use %configure2_5x. This works a lot better, but with an error that I have managed to trace down to a particular flag that is set by %configure2_5x :
Code: Select all
script.c:334:7: error: format not a string literal and no format arguments [-Werror=format-security]


A (more than) couple of questions :

Is it possible to somehow, only bypass that flag (-Werror=format-security) , and keep everything else?
Is it OK to do so? Would it break mageia standards?
Is it possible to change the source somehow to resolve this error?
Is there some other mistake I am making?

Thanks for your time! I am very new to this and hence I may have made some mistakes.

Re: Problem with the %configure, %configure2_5x : gtypist

PostPosted: Sep 13th, '17, 11:57
by doktor5000
Hi there, you may want to read https://wiki.mageia.org/en/Packaging_pr ... _arguments
Also, if you switch to a newer upstream version (2.9.4) then this should be already fixed. For reference, this is the commit with the fix: https://git.savannah.gnu.org/cgit/gtypi ... 46c8f6e91a which was added in 2013, so not sure which version you're trying to build.

Re: Problem with the %configure, %configure2_5x : gtypist

PostPosted: Sep 13th, '17, 13:43
by mjack
That is indeed strange. I thought I had the latest version but I didn't.

Also thanks for that packaging link, I tried to find this problem everywhere and ended up finding it in a fedora bug reporting page where I understood the required changes that were needed to be made.

Re: Problem with the %configure, %configure2_5x : gtypist

PostPosted: Sep 13th, '17, 18:43
by mjack
One more little problem.

It seems rpmbuild is automatically creating debuginfo (and debugsources) packages, which when passed through rpmlint, give several errors including :
Code: Select all
gtypist-debuginfo.x86_64: E: no-changelogname-tag
gtypist-debuginfo.x86_64: W: unstripped-binary-or-object /usr/lib/debug/usr/bin/gtypist-2.9.5-1.mga7.x86_64.debug
gtypist-debuginfo.x86_64: E: statically-linked-binary /usr/lib/debug/usr/bin/gtypist-2.9.5-1.mga7.x86_64.debug
gtypist-debuginfo.x86_64: W: no-documentation
gtypist-debuginfo.x86_64: W: dangling-relative-symlink /usr/lib/debug/.build-id/87/6494ce63065664314a9c53072af31a0a7d84e5 ../../../.build-id/87/6494ce63065664314a9c53072af31a0a7d84e5
gtypist-debuginfo.x86_64: E: debuginfo-without-sources
gtypist-debuginfo.x86_64: E: no-signature
1 packages and 0 specfiles checked; 4 errors, 3 warnings.

Code: Select all
gtypist-debugsource.x86_64: E: no-changelogname-tag
gtypist-debugsource.x86_64: W: no-documentation
gtypist-debugsource.x86_64: E: no-signature
1 packages and 0 specfiles checked; 2 errors, 1 warnings.


I don't understand this very well, I got some links telling me to pass a global variable disabling creation of debug packages, but it must be there for a reason? The normal binary rpm is there without a problem and I get an exit 0 after rpmbuild anyway.

Re: Problem with the %configure, %configure2_5x : gtypist

PostPosted: Sep 14th, '17, 13:08
by doktor5000
Yes for regular builds you could disable debug packages build, as that is mostly only useful if you require full stack traces. You can disable it by either setting a global variable debug_package %{nil} perpackage or globally for all builds in ~/.rpmmacros (of your user).
About the rpmlint outputs, I believe the debug package layout was slightly changed between mga5 and mga6 and maybe the default rpmlint policy has not been updated yet or you may not have it installed? But obviously things like the warning for unstripped-binary-or-object are expected for debuginfo packages and this should be excluded in the default policy.