[Kolab-devel] start using configure's --htmldir to define the webserver directory location (spec file update needed)

Richard Bos ml at radoeka.nl
Mon Feb 18 21:58:26 CET 2008


summary: 

start using configure's --htmldir to define the webserver directory location.
There is one caveat though, about using --htmldir for this purpose, the
argument is originally meant to define the html documentation directory.
The reason to use --htmldir to define the webserver directory, is because:
DISTCHECK_CONFIGURE_FLAGS="--with-dist=suse --without-openpkg" make distcheck
fails.  Extended explanation included below. 

Current kolab-webadmin setup, create tarbal:
kolab-webadmin> ./bootstrap
kolab-webadmin> ./configure --without-openpkg --with-dist=suse
kolab-webadmin> make distcheck > out 2>&1
kolab-webadmin> grep -c openpkg out
144
This is not good, as there should be no openpkg reference due to
the --without-openpkg argument.

The correct way to execute 'make distcheck' is therefor:
kolab-webadmin> DISTCHECK_CONFIGURE_FLAGS="--with-dist=suse --without-openpkg" make distcheck > out 2>&1
kolab-webadmin> grep -c openpkg out
0
This is good, but now 'make distcheck' fails:
kolab-webadmin> tail -7 out
test -z "/srv/www/htdocs/kolab/admin/pics" || /bin/mkdir -p "/srv/www/htdocs/kolab/admin/pics"
/bin/mkdir: cannot create directory `/srv/www/htdocs/kolab': Permission denied
make[2]: *** [install-dist_wspicsDATA] Error 1
make[2]: Leaving directory `/var/tmp/kolab/kolab-webadmin/kolab-webadmin/kolab-webadmin-2.1.99/_build'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/var/tmp/kolab/kolab-webadmin/kolab-webadmin/kolab-webadmin-2.1.99/_build'
make: *** [distcheck] Error 2

The reason is the definition of the webserver directory in Makefile.am
kolab-webadmin> grep -n webserver_document_root Makefile.am
21:wstopleveldir = $(webserver_document_root)$(webserver_web_prefix)
29:wskolabdir = $(webserver_document_root)$(webserver_web_prefix)/admin

This definition does not take the destination directory into account.
Whatever I tried to change the behaviour of automake, I did not get it correct.
I tried e.g.:
$(distdir)/$(webserver_document_root)$(webserver_web_prefix)
$(DESTDIR)/$(webserver_document_root)$(webserver_web_prefix)
$(prefix)$(DESTDIR)/$(webserver_document_root)$(webserver_web_prefix)
$(DESTDIR)/$(prefix)/$(webserver_document_root)$(webserver_web_prefix)
The changes above result in a working distcheck, but not in a correct
behaving: 'make install DESTDIR=....'.

When 
21:wstopleveldir = $(webserver_document_root)$(webserver_web_prefix)
29:wskolabdir = $(webserver_document_root)$(webserver_web_prefix)/admin
is changed to:
21:wstopleveldir = $(htmldir)$(webserver_web_prefix)
29:wskolabdir = $(htmldir)$(webserver_web_prefix)/admin
make distcheck works as well
make install DESTDIR=.....

However it means that the webserver directory is to be defined as configure
argument instead of being defined in the dist_conf/<distribution> file.  This
means that the packagers have to update their kolab-webadmin specfile.

May I go ahead and make this change?

-- 
Richard Bos
Without a home the journey is endless




More information about the devel mailing list