Fedora packaging review: rpmlint issues #490

Closed
hobbes1069 opened this Issue Apr 25, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@hobbes1069

Now that OCE is LGPL licensed, I'm working on moving the package from RPM Fusion non-free to Fedora proper. In prepping the package for re-review, I noted the following output from rpmlint:
OCE-foundation.x86_64: W: shared-lib-calls-exit /usr/lib64/libTKernel.so.8.0.0 exit@GLIBC_2.2.5
OCE-foundation.x86_64: W: shared-lib-calls-exit /usr/lib64/libTKAdvTools.so.8.0.0 exit@GLIBC_2.2.5
OCE-foundation.x86_64: E: non-executable-script /usr/share/oce-0.15/src/DrawResources/tdoc 0644L /bin/sh
OCE-foundation.x86_64: E: non-executable-script /usr/share/oce-0.15/src/DrawResources/mkdoc 0644L /bin/csh
OCE-foundation.x86_64: E: non-executable-script /usr/share/oce-0.15/src/DrawResources/idoc 0644L /bin/sh

For the first two errors here's the full description:
$ 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.

For the second issue, the "script" should either be marked as executable, or the shebang removed.

@a-betenev

This comment has been minimized.

Show comment Hide comment
@a-betenev

a-betenev May 3, 2014

The second issue is fixed in OCCT 6.7.1: these old script files have been removed.

As for the first issue, the exit() function is called in a few places in OCCT:

  • in TKernel, it is used to exit a program from OCCT-specific signal handler, as a kind of fallback solution used if handling with longjump is not possible. This should probably be corrected to re-raise the same signal instead, as it is recommended way to terminate from signal handler, according to http://www.gnu.org/software/libc/manual/html_node/Termination-in-Handler.html
  • in TKAdvTools and TKXSBase, it is called by the standard error function generated by flex scanner. In TKXSBase, it is overriden to specific error function, and should never be called; I wonder if rpmlint will complain on this or not. The code in TKAdvTools needs to be corrected to redefine error function.
  • in TKDraw, exit is used to terminate DRAW application in case or error situation, and I deem this should not be complained.

The second issue is fixed in OCCT 6.7.1: these old script files have been removed.

As for the first issue, the exit() function is called in a few places in OCCT:

  • in TKernel, it is used to exit a program from OCCT-specific signal handler, as a kind of fallback solution used if handling with longjump is not possible. This should probably be corrected to re-raise the same signal instead, as it is recommended way to terminate from signal handler, according to http://www.gnu.org/software/libc/manual/html_node/Termination-in-Handler.html
  • in TKAdvTools and TKXSBase, it is called by the standard error function generated by flex scanner. In TKXSBase, it is overriden to specific error function, and should never be called; I wonder if rpmlint will complain on this or not. The code in TKAdvTools needs to be corrected to redefine error function.
  • in TKDraw, exit is used to terminate DRAW application in case or error situation, and I deem this should not be complained.
@hobbes1069

This comment has been minimized.

Show comment Hide comment
@hobbes1069

hobbes1069 May 4, 2014

Thanks for taking a look. It's not a showstopper for the review but figured it was worth reporting.

Thanks for taking a look. It's not a showstopper for the review but figured it was worth reporting.

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Jul 12, 2014

The script files have been removed and the exit() issue is a duplicate of #161 , closing.

ghost commented Jul 12, 2014

The script files have been removed and the exit() issue is a duplicate of #161 , closing.

@ghost ghost closed this Jul 12, 2014

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment