Red Hat Bugzilla – Bug 220390
htdig.conf and rundig have different common_dir setting
Last modified: 2013-04-30 19:34:42 EDT
but /usr/bin/rundig has:
/usr/share/htdig seems to be correct
1) since /var/www/html/htdig is not provided by the htdig nor htdig-web package
2) /usr/share/htdig has the english.0 and synonyms files that the rundig script
is looking for.
Hm, I don't think that /usr/share/htdig is correct path. httpd daemon uses
/var/www/html/ directory for web pages. Looks like that /usr/share/htdig must be
change to /var/www/html/htdig. Do you also think that this solution is better?
I did some investigation. Here is my updated opinion on the matter.
1) /usr/share/htdig is a suitable location since the files are indeed shareable
between different htdig databases. Leaving it unchanged will reduce
incompatibility. However, /var/www/html/hdig is OK too.
2) Right now the rundig script uses its own COMMONDIR variable to determine if
it should update the synonyms.db, word2root.db, and root2word.db files (by
running htfuzzy). I think that whole section of the rundig script should be
removed and, instead, those *.db files should be created when the rpm is
installed (and removed when the rpm is removed).
I did some investigations and this is my conclusion. I think this is only
name-equality. Variable COMMONDIR in rundig script doesn't have any common with
common_dir variable in htdig.conf. Do you think my thinking is wrong?
It would be highly coincidental for COMMONDIR to not have the same meaning as
common_dir. In the htdig source code, the default location for the english.0 is
in 'common_dir'. And, the template file for rundig has:
where @COMMON_DIR@ resolves to whatever default common_dir was configured.
Ok. I had a look at the source RPM again and I see what the issue is.
htdig is being configured with --with-common-dir=/var/www/html/htdig, which is
fine. So, /usr/bin/rundig gets created with COMMONDIR=/var/www/html/htdig.
However, htdig-3.1.5-rh.patch alters the common_dir variable in htdig.conf so
that common_dir is /usr/share/htdig, thus creating the inconsistency. One of
them needs to be fixed. As it stands, rundig will not work out of the box.
In the end I've changed common_dir in config file to /var/www/html/htdig