First attempt to build simgear packages

First attempt to build packages for simgear 2017.2.1. It seems all rpms were generated. But I got this messages below (1 error). Are any of this messages important to be concerned with?

simgear-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/simgear-2017.2.1/simgear/package/ioapi.h

simgear-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/simgear-2017.2.1/simgear/package/ioapi.c

simgear-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/simgear-2017.2.1/simgear/package/unzip.c

simgear-debuginfo.x86_64: W: spurious-executable-perm /usr/src/debug/simgear-2017.2.1/simgear/package/unzip.h

lib64SimGearScene2017.2.1.x86_64: W: shared-lib-calls-exit /usr/lib64/libSimGearScene.so.2017.2.1 exit@GLIBC_2.2.5

lib64SimGearCore2017.2.1.x86_64: W: not-standard-release-extension 1

lib64SimGearScene2017.2.1.x86_64: W: not-standard-release-extension 1

simgear-devel.x86_64: W: not-standard-release-extension 1

simgear-debuginfo.x86_64: W: not-standard-release-extension 1

lib64SimGearCore2017.2.1.x86_64: W: no-packager-tag

lib64SimGearScene2017.2.1.x86_64: W: no-packager-tag

simgear-devel.x86_64: W: no-packager-tag

simgear-debuginfo.x86_64: W: no-packager-tag

simgear-devel.x86_64: W: no-major-in-name simgear-devel

lib64SimGearCore2017.2.1.x86_64: W: no-documentation

lib64SimGearScene2017.2.1.x86_64: W: no-documentation

simgear-devel.x86_64: E: no-dependency-on (Badness: 1) simgear-devel/simgear-devel-libs/libsimgear-devel

4 packages and 0 specfiles checked; 1 errors, 16 warnings.
1 Like

You may always use rpmlint -I command to get the meaning of a warning or an error by rpmlint.

no-packager-tag:

$ rpmlint -I  no-packager-tag
no-packager-tag:
There is no Packager tag in your package. You have to specify a packager using
the Packager tag. Ex: Packager: John Doe <john.doe@example.com>.

This only means you haven’t setted ‘%packager’ macro in your ’ ~/.rpmmacros’ file yet.

not-standard-release-extension:

$ rpmlint -I not-standard-release-extension
not-standard-release-extension:
Your release tag must match the regular expression ^(omv|plf)$.

This could be safely ignored.

spurious-executable-perm:

$ rpmlint -I  spurious-executable-perm
spurious-executable-perm:
The file is installed with executable permissions, but was identified as one
that probably should not be executable.  Verify if the executable bits are
desired, and remove if not.

In this case this means some source files have executable permissions setted. Even if it could be not a issue you may fix this in ‘%prep’ section by mean of chmod 0644 command

shared-lib-calls-exit:

$ rpmlint -I shared-lib-calls-exit
shared-lib-calls-exit:
This library package calls exit() or _exit(), probably in a non-fork()
context. Doing so from a library is strongly discouraged - when a library
function calls exit(), it prevents the calling program from handling the
error, reporting it to the user, closing files properly, and cleaning up any
state that the program has. It is preferred for the library to return an
actual error code and let the calling program decide how to handle the
situation.

This is not a best practise especially in a shared library but it is an upstream issue, so you could ignore it and warn the authors about it.

no-major-in-name simgear-devel:

$ rpmlint -I no-major-in-name simgear-devel
no-major-in-name:
The major number of the library isn't included in the package's name

It’s a false-positive, it could be safely ignored.

no-documentation:

no-documentation:
The package contains no documentation (README, doc, etc). You have to include
documentation files.

All documentation is packaged in devel package so this can be safely ignored. But note, even if it may not be the case, some licenses required to be provided with the package in any form. In this case all packages must provided the license file (COPYING in this case) .

no-dependency-on:

It’s a false-positive, it could be safely ignored. It happens often with devel packages.

First, many thanks,

I’ve searched for executables in simgear directory at rpmbuild/BUILD. Just find,

ioapi.c, ioapi.h, unzip.c and unzip.h. Extensions indicate they are source files and it seems they don’t have to be executables.

Did not see any reference to this permissions at googling around.

I guess I’ll keep their permissions …

1 Like

Source files should never have executable permissions. Just adding something like the following in %prep section could solve:

# fix spurious-executable-perm
find . -name \*.c -o -name \*.h -exec chmod 0644 '{}' \;

Thanks for that. I’ve never got enough skills with regular expressions, sed, etc.

I moved this to ABF for beginners. Hope that’s OK.

For some reason, files *.h were chmoded to 0644 but *.c didn’t.

Then I break the command in two lines:

find . -name \*.c -o -exec chmod 0644 '{}' \;
find . -name \*.h -o -exec chmod 0644 '{}' \;

and it finally worked fine.

From inside a spec file round parenthesis are mantadoty :):

# fix spurious-executable-perm
find . \( -name \*.c -o -name \*.h \) -exec chmod 0644 '{}' \;