Bug 16471 - Missing configuration in cppcheck package
Summary: Missing configuration in cppcheck package
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA5-64-OK MGA5-32-OK advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2015-07-25 15:52 CEST by Piotr Mierzwinski
Modified: 2016-03-31 22:23 CEST (History)
4 users (show)

See Also:
Source RPM: cppcheck-1.65-3.mga5.src.rpm
CVE:
Status comment:


Attachments

Description Piotr Mierzwinski 2015-07-25 15:52:52 CEST
Description of problem:
Is there exists related with cppcheck package (not linked by dependencies) containing configuration? If not then it seems that cppcheck package is incomplete.
Package cppcheck doesn't contain configuration files and is not usable in that form. The try to use shows following error:

<error id="failedToLoadCfg" severity="information" msg="Failed to load std.cfg. Your Cppcheck installation is broken, please re-install. The Cppcheck binary was compiled without CFGDIR set. Either the std.cfg should be available in /usr/bin/cfg or the CFGDIR should be configured." verbose="Failed to load std.cfg. Your Cppcheck installation is broken, please re-install. The Cppcheck binary was compiled without CFGDIR set. Either the std.cfg should be available in /usr/bin/cfg or the CFGDIR should be configured."/>


Please check package for fedora22 or ubuntu 15.04. Both have configuration in package. Below example file list for fedora22 package:

    /usr/bin/cppcheck
    /usr/share/cppcheck/cfg/avr.cfg
    /usr/share/cppcheck/cfg/gtk.cfg
    /usr/share/cppcheck/cfg/posix.cfg
    /usr/share/cppcheck/cfg/qt.cfg
    /usr/share/cppcheck/cfg/sdl.cfg
    /usr/share/cppcheck/cfg/std.cfg
    /usr/share/cppcheck/cfg/windows.cfg
    /usr/share/doc/cppcheck/AUTHORS
    /usr/share/doc/cppcheck/changelog.Debian.gz
    /usr/share/doc/cppcheck/copyright
    /usr/share/doc/cppcheck/readme.txt
    /usr/share/man/man1/cppcheck.1.gz

Please note, missing in Mageia package, cfg files.


Version-Release number of selected component (if applicable):
1.65-3

Mageia Cauldron has the same incomplete package.

How to reproduce:
I was trying to use cppcheck plugin in KDevelop.


Reproducible: 

Steps to Reproduce:
David Walser 2015-07-30 18:25:08 CEST

Assignee: bugsquad => shlomif

Comment 1 Shlomi Fish 2015-07-30 18:56:55 CEST
Can confirm here on Cauldron:

shlomif@telaviv1:~/progs/riddles/project-euler/hg/project-euler/320$ cppcheck euler_320_v1.cpp 
cppcheck: Failed to load library configuration file 'std.cfg'. File not found
(information) Failed to load std.cfg. Your Cppcheck installation is broken, please re-install. The Cppcheck binary was compiled without CFGDIR set. Either the std.cfg should be available in cfg or the CFGDIR should be configured.
shlomif@telaviv1:~/progs/riddles/project-euler/hg/project-euler/320$

Status: NEW => ASSIGNED

Comment 2 Shlomi Fish 2015-07-30 19:41:10 CEST
(In reply to Shlomi Fish from comment #1)
> Can confirm here on Cauldron:
> 
> shlomif@telaviv1:~/progs/riddles/project-euler/hg/project-euler/320$
> cppcheck euler_320_v1.cpp 
> cppcheck: Failed to load library configuration file 'std.cfg'. File not found
> (information) Failed to load std.cfg. Your Cppcheck installation is broken,
> please re-install. The Cppcheck binary was compiled without CFGDIR set.
> Either the std.cfg should be available in cfg or the CFGDIR should be
> configured.
> shlomif@telaviv1:~/progs/riddles/project-euler/hg/project-euler/320$

This should be fixed on Cauldron in cppcheck-1.69-2. I'm not sure whether we should fix it on Mageia 5 as well. Part of the problem was that the cppcheck's buildsystem is vile.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Comment 3 R Ghetta 2015-09-18 22:52:09 CEST
If possible, I'd like to have the fix backported to mga5

CC: (none) => birrachiara

Comment 4 Shlomi Fish 2015-09-19 10:05:02 CEST
(In reply to R Ghetta from comment #3)
> If possible, I'd like to have the fix backported to mga5

Very well, submitted to updates_testing. Now who will write the advisory?
Comment 5 R Ghetta 2016-03-19 19:40:32 CET
(In reply to Shlomi Fish from comment #4)
Tested 1.69-1.1, now works.
Sorry for the delay, didn't understood you were waiting for a test.
Comment 6 Shlomi Fish 2016-03-19 20:29:34 CET
(In reply to R Ghetta from comment #5)
> (In reply to Shlomi Fish from comment #4)
> Tested 1.69-1.1, now works.
> Sorry for the delay, didn't understood you were waiting for a test.

I see. Thanks! Now someone needs to write the advisory. And like we say at my home "*It is needed* to write an advisory." (which implies that the one who says that does not want to do it, and it sounds better in Hebrew.). But I guess I'll get to it myself. Stay tuned.
Comment 7 Shlomi Fish 2016-03-19 20:36:36 CET
I have uploaded a patched/updated package for Mageia 5.

You can test this by running cppcheck on a sample .cpp file (such as a one in https://github.com/shlomif/project-euler ).

Suggested advisory:
========================

Updated cppcheck packages fix an error on startup due to missing configuration.

Piotr Mierzwinski found that the cppcheck program dies on startup before checking every file, due to a missing configuration file in the Mageia package.

References:
https://bugs.mageia.org/show_bug.cgi?id=16471
========================

Updated packages in {core,tainted}/updates_testing:
========================
cppcheck-1.69-1.1.mga5

Source RPMs:
cppcheck-1.69-1.1.mga5.src.rpm
Comment 8 Shlomi Fish 2016-03-19 20:41:55 CET
Assigning to QA. There's an advisory and an update and the package is still broken in mga5 (but fixed in Cauldron).

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)
Assignee: shlomif => qa-bugs

Comment 9 Len Lawrence 2016-03-21 14:20:49 CET
The update worked fine for x86_64.

Before update:
$ cppcheck ~/test/julia/src/*.cpp
(information) Failed to load std.cfg. Your Cppcheck installation is broken, please re-install. The Cppcheck binary was compiled without CFGDIR set. Either the std.cfg should be available in cfg or the CFGDIR should be configured.

Update installed and cppcheck ran successfully on a local directory containing C files.
$ cppcheck glunarclock-0.32.4/src/*.c
Checking glunarclock-0.32.4/src/CalcEphem.c...
Checking glunarclock-0.32.4/src/CalcEphem.c: HAVE_CONFIG_H...
1/5 files checked 12% done
Checking glunarclock-0.32.4/src/Moon.c...
2/5 files checked 31% done
Checking glunarclock-0.32.4/src/MoonRise.c...
3/5 files checked 36% done
Checking glunarclock-0.32.4/src/glunarclock.c...
4/5 files checked 84% done
Checking glunarclock-0.32.4/src/moondata.c...
Checking glunarclock-0.32.4/src/moondata.c: HAVE_CONFIG_H...
5/5 files checked 100% done

Fine for C++ files.
$ cppcheck lightspark-0.5.6/src/scripting/toplevel/*.cpp
Checking lightspark-0.5.6/src/scripting/toplevel/ASString.cpp...
1/14 files checked 8% done
Checking lightspark-0.5.6/src/scripting/toplevel/Array.cpp...
2/14 files checked 22% done
Checking lightspark-0.5.6/src/scripting/toplevel/Boolean.cpp...
Checking lightspark-0.5.6/src/scripting/toplevel/Boolean.cpp: XMLPP_2_35_1...
3/14 files checked 24% done
................................
Checking lightspark-0.5.6/src/scripting/toplevel/XMLList.cpp...
Checking lightspark-0.5.6/src/scripting/toplevel/XMLList.cpp: XMLPP_2_35_1...
13/14 files checked 77% done
Checking lightspark-0.5.6/src/scripting/toplevel/toplevel.cpp...
Checking lightspark-0.5.6/src/scripting/toplevel/toplevel.cpp: NDEBUG...
Checking lightspark-0.5.6/src/scripting/toplevel/toplevel.cpp: XMLPP_2_35_1...
14/14 files checked 100% done

CC: (none) => tarazed25

Len Lawrence 2016-03-21 14:22:27 CET

Whiteboard: (none) => MGA5-64-OK

Comment 10 Len Lawrence 2016-03-21 15:43:39 CET
Preupdate test on i586 virtualbox:

$ cd /usr/lib/qt4/examples/xmlpatterns/trafficinfo
$ cppcheck *.cpp
(information) Failed to load std.cfg. Your Cppcheck installation is broken, please re-install. The Cppcheck binary was compiled without CFGDIR set. Either the std.cfg should be available in cfg or the CFGDIR should be configured.

Upgraded to cppcheck-1.69-1.1.mga5.i586 from core updates testing.
$ cppcheck *.cpp
Checking main.cpp...
1/5 files checked 9% done
Checking mainwindow.cpp...
2/5 files checked 37% done
Checking stationdialog.cpp...
3/5 files checked 62% done
Checking stationquery.cpp...
4/5 files checked 78% done
Checking timequery.cpp...
5/5 files checked 100% done

Shall validate this for both architectures.
Len Lawrence 2016-03-21 15:44:23 CET

Keywords: (none) => validated_update
Whiteboard: MGA5-64-OK => MGA5-64-OK MGA5-32-OK
CC: (none) => sysadmin-bugs

Comment 11 Dave Hodgins 2016-03-25 06:48:24 CET
Unvalidating. Comment 7 refers to a tainted version, but I don't see one in
http://mirrors.kernel.org/mageia/distrib/5/x86_64/media/tainted/updates_testing/
or in testing comments.

Please clarify.

Keywords: validated_update => (none)
CC: (none) => davidwhodgins
Whiteboard: MGA5-64-OK MGA5-32-OK => MGA5-64-OK MGA5-32-OK feedback

Comment 12 Len Lawrence 2016-03-25 11:01:14 CET
That puzzled me when I saw it then I forgot about it.  Can't see any notes on it.  Checked other repositories as well, and no sign of it.  Requires don't seem to lead to anything tainted.  Better wait to see what Shlomi says.
Comment 13 Rémi Verschelde 2016-03-30 14:27:02 CEST
It's a copy paste mistake of the advisory template from the wiki, there is no tainted version of cppcheck: http://madb.mageia.org/package/show/application/0/name/cppcheck

Whiteboard: MGA5-64-OK MGA5-32-OK feedback => MGA5-64-OK MGA5-32-OK

Dave Hodgins 2016-03-30 17:32:40 CEST

Keywords: (none) => validated_update
Whiteboard: MGA5-64-OK MGA5-32-OK => MGA5-64-OK MGA5-32-OK advisory

Comment 14 Mageia Robot 2016-03-31 22:23:11 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2016-0055.html

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.