Motion - Support Question 2015x 02x 09x 042621

--sysconfdir configure parameter specifies both config file install dir AND search dir.

Question

I would like see if my understanding about the --sysconfdir configure script parameter is correct. According to

http://www.lavrsen.dk/foswiki/bin/view/Motion/ConfigureScript

--sysconfdir specifies where motion both installs the default configuration file and also where it later searches for it. Having both set to the same place is causing me problems.

I am trying to cross compile motion on an x86 linux machine where I don't have super user privileges to run on an ARM linux target where I do. The ARM target doesn't have the ability to locally compile which is why I'm going through the tedium of cross compiling wink .

On the X86 host where I am compiling I would like "make install" to install everything (the binaries and config files and man pages etc) in a directory that I control. I use the --prefix option to specify this directory. Let's call it

/localX86/motion/

But when I do the configure script sets "sysconfdir" to ${prefix}/etc ... that is /localX86/motion-binaries/etc

Then if I try to run the created motion binary on my ARM machine, it looks for motion.conf in the non-existent "/localX86/motion/etc"

If I try to also set the configure parameter "--sysconfdir" to "/usr/local/etc" to overcome this problem then the "make install" script tries to install motion-dist.conf in "/usr/local/etc" on the X86 linux machine I'm building on. I don't have SU privileges and I have no write access to "/usr/local/etc" so "make install" bombs out.

I have worked around this issue by manually editing the "install:" section of the generated Makefile after running configure but for the sake of making motion a perfect project I have lodged this support request.

I acknowledge this is a very low priority issue but in case someone else comes across it I thought I should make a note of it.

Thanks very much.
$./configure --prefix=/localX86/motion  --sysconfdir=/usr/local/etc  --host=arm 
<configures ok>
$make
<builds ok>
$make install
Installing files...
--------------------------------------------------------------------------------
mkdir -p /localX86/motion/bin
mkdir -p /localX86/motion/man1
mkdir -p /usr/local/etc
mkdir -p /localX86/motion/share/doc/motion-trunkREV561
mkdir -p /localX86/motion/share/motion-trunkREV561/examples
install motion.1 /localX86/motion/share/man/man1
install CHANGELOG COPYING CREDITS INSTALL README motion_guide.html /localX86/motion/share/doc/motion-trunkREV561
install *.conf motion.init-Debian motion.init-Fedora motion.init-FreeBSD.sh /localX86/motion/share/motion-trunkREV561/examples
install motion-dist.conf /usr/local/etc
install: cannot create regular file `/usr/local/etc/motion-dist.conf': Permission denied
make-3.79.1-p7: *** [install] Error 1


    

Environment

Motion version: trunkREV564
ffmpeg version: 2.5.git
Libraries: ffmpeg
Server OS: Redhat, kernel 2.6.35
-- AlanFord - 09 Feb 2015

Answer

SupportForm edit

TopicTitle --sysconfdir configure parameter specifies both config file install dir AND search dir.
SupportStatus AskedQuestions
AssignedQuestionTo
SubmittedBy AlanFord
Topic revision: r1 - 09 Feb 2015, AlanFord
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.