Looks for user scripts in /usr/etc and shuts down

Bug #645058 reported by Morten Kjeldgaard on 2010-09-22
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gizmod (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: gizmod

Starting up gizmod on Lucid I get the following output

$ gizmod -g

GizmoDaemon v3.4 -=- (c) 2007, Tim Burrell <email address hidden>
=---------=
Debug Mode Enabled

Unable to Initialize Gizmod :: Exception in [/build/buildd/gizmod-3.4/gizmod/GizmoDaemon.cpp] :: [getUserScriptDirPaths] @ [Line 1102] -- User Script dir [/usr/etc/gizmod/modules.d] does NOT exist or permissions are wrong!

GizmoDaemon Shut Down.

The user scripts are present in the package, installed in the /etc tree. Probably a compile-time misconfiguration,

Morten Kjeldgaard (mok0) wrote :

My suspicion of a compile-time config error is confirmed. Cmake issues this output when building the package:

Config Dir (SYSCONF_INSTALL_DIR): /usr/etc

Morten Kjeldgaard (mok0) wrote :

The strange thing is that a bit before the line I quoted above, the build is invoked by:

cd obj-x86_64-linux-gnu && cmake /build/mok-gizmod_3.4-0ubuntu3-amd64-KzqFlr/gizmod-3.4/. -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_C_COMPILER="/usr/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/bin/g++" -DCMAKE_C_FLAGS="-g -O2 -g -Wall -O2" -DCMAKE_CXX_FLAGS="-g -O2 -g -Wall -O2" -DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DSYSCONF_INSTALL_DIR=/etc

so the variable SYSCONF_INSTALL_DIR is correctly set to /etc, but this is apparently ignored by cmake.

Morten Kjeldgaard (mok0) wrote :

The attached patch fixes the problem. I assume the problem has to do with a changed behavior of cmake, but I don't know a thing about cmake so I don't know how to devise a proper fix.

The patch hardwires the value of SYSCONF_INSTALL_DIR to "/etc" in the file cmake/Modules/DefineInstallationPaths.cmake, which seems to override anything else you can think of doing.

The patch violates all principles of good-packaging practice, but hey! it works! so I'm happy.

tags: added: patch
Robert Sajdok (ris) on 2010-09-24
Changed in gizmod (Ubuntu):
status: New → Confirmed
Cefn (6-launchpad-net-cefn-com) wrote :

Can't currently build based on apt-get source gizmod with your patch applied. I'm running into this, quite likely unrelated, problem. However, I think this is the proper procedure to complete the patch and I don't know where you got gizmod_3.4-0ubuntu3 (in your debdiff name) as I'm operating with packages based on xxxubuntu2 out of the repo.

Other than running apt-get build-dep gizmod, operating with the ubuntu apt-get source, and your patch, I'm following the instructions at...
http://sourceforge.net/apps/mediawiki/gizmod/index.php?title=Compile_from_Source#Compiling_from_Source

The following error can be eliminated by removing -Werror from libH/CMakeFiles/H.dir/flags.make

cc1plus: warnings being treated as errors
/home/cefn/gizmod/gizmod-3.4/libH/FileEventWatcher.cpp: In member function ‘void H::FileEventWatcher::handleEventsOnFile(pollfd&)’:
/home/cefn/gizmod/gizmod-3.4/libH/FileEventWatcher.cpp:456: error: suggest explicit braces to avoid ambiguous ‘else’
make[2]: *** [libH/CMakeFiles/H.dir/FileEventWatcher.o] Error 1
make[1]: *** [libH/CMakeFiles/H.dir/all] Error 2
make: *** [all] Error 2

Now I'm getting this, but no idea what the missing (boost?) dependency is...

[ 22%] Building CXX object libH/CMakeFiles/H.dir/Util.o
In file included from /home/cefn/gizmod/gizmod-3.4/libH/Util.cpp:29:
/home/cefn/gizmod/gizmod-3.4/libH/Util.hpp: In function ‘Functor H::for_all(Object&, Functor)’:
/home/cefn/gizmod/gizmod-3.4/libH/Util.hpp:66: error: ‘for_each’ is not a member of ‘std’
make[2]: *** [libH/CMakeFiles/H.dir/Util.o] Error 1
make[1]: *** [libH/CMakeFiles/H.dir/all] Error 2
make: *** [all] Error 2

Cefn (6-launchpad-net-cefn-com) wrote :

Here's the list of boost packages I have - I think I've covered everything...
dpkg --list | grep boost | awk ' {list = list $2 " ";} END {print list;}'
libboost-all-dev libboost-date-time1.40-dev libboost-date-time1.40.0 libboost-dev libboost-filesystem-dev libboost-filesystem1.40-dev libboost-filesystem1.40.0 libboost-graph1.40-dev libboost-graph1.40.0 libboost-iostreams-dev libboost-iostreams1.40-dev libboost-iostreams1.40.0 libboost-math1.40-dev libboost-math1.40.0 libboost-program-options-dev libboost-program-options1.40-dev libboost-program-options1.40.0 libboost-python-dev libboost-python1.40-dev libboost-python1.40.0 libboost-regex1.40-dev libboost-regex1.40.0 libboost-serialization-dev libboost-serialization1.40-dev libboost-serialization1.40.0 libboost-signals1.40-dev libboost-signals1.40.0 libboost-system1.40-dev libboost-system1.40.0 libboost-test1.40-dev libboost-test1.40.0 libboost-thread-dev libboost-thread1.40-dev libboost-thread1.40.0 libboost-wave1.40-dev libboost-wave1.40.0 libboost1.40-all-dev libboost1.40-dev

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers