can I run a self-contained build?

2012-12-02 Thread carteriii
My approach to building  installing software usually follows a common
pattern to have different release versions in different directories and then
either just launch locally from one of those directories or use a symbolic
link to point to the current version.  This allows me to quickly install or
rollback by simply changing the launch command or symbolic link.  By
example, think of the following structure:

/home/user/Documents/squid/mybuild_v1
/home/user/Documents/squid/mybuild_v2
/home/user/Documents/squid/current - ./mybuild_v2

This allows me to use either mybuild_v1 or mybuild_v2 or I can also still
use the default package build on the machine which gets installed in various
standard locations such as /etc/squid3, /usr/lib/squid3, etc. etc.

I just realized that squid appears to maintain some absolute path references
which don't seem to like my approach of a self-contained release folder.  My
realization came from hitting a few errors like these when I moved the
top-level directory:

FATAL: MIME Config Table
/home/user/Documents/squid/mybuild_v1/etc/mime.conf: (2) No such file or
directory
FATAL: unlinkd_program
/home/user/Documents/squid/mybuild_v1/libexec/unlinkd: (2) No such file or
directory

I am now aware of the build configuration options for Ubuntu:

http://wiki.squid-cache.org/KnowledgeBase/Ubuntu#Compiling

One of those options sets --sysconfdir=/etc/squid and another sets
--libexecdir=${prefix}/lib/squid but those are absolute paths.  I'm trying
to scan the source files to figure out where  how these configuration
options get used, but I'm worried that I may miss something so I feel it's
safer to ask for confirmation.

Is it possible to run from a self-contained build?  Are there any run-time
options that mirror the functionality of the configuration options that can
be used when building?  Or can I specify a configuration option path which
is relative to either the binaries or the configuration file?

Thanks in advance.




--
View this message in context: 
http://squid-web-proxy-cache.1019090.n4.nabble.com/can-I-run-a-self-contained-build-tp4657533.html
Sent from the Squid - Development mailing list archive at Nabble.com.


Re: can I run a self-contained build?

2012-12-02 Thread Amos Jeffries

On 03.12.2012 13:05, carteriii wrote:
My approach to building  installing software usually follows a 
common
pattern to have different release versions in different directories 
and then
either just launch locally from one of those directories or use a 
symbolic
link to point to the current version.  This allows me to quickly 
install or

rollback by simply changing the launch command or symbolic link.  By
example, think of the following structure:

/home/user/Documents/squid/mybuild_v1
/home/user/Documents/squid/mybuild_v2
/home/user/Documents/squid/current - ./mybuild_v2

This allows me to use either mybuild_v1 or mybuild_v2 or I can also 
still
use the default package build on the machine which gets installed in 
various

standard locations such as /etc/squid3, /usr/lib/squid3, etc. etc.

I just realized that squid appears to maintain some absolute path 
references
which don't seem to like my approach of a self-contained release 
folder.  My
realization came from hitting a few errors like these when I moved 
the

top-level directory:

FATAL: MIME Config Table
/home/user/Documents/squid/mybuild_v1/etc/mime.conf: (2) No such file 
or

directory
FATAL: unlinkd_program
/home/user/Documents/squid/mybuild_v1/libexec/unlinkd: (2) No such 
file or

directory

I am now aware of the build configuration options for Ubuntu:

http://wiki.squid-cache.org/KnowledgeBase/Ubuntu#Compiling

One of those options sets --sysconfdir=/etc/squid and another sets
--libexecdir=${prefix}/lib/squid but those are absolute paths.  I'm 
trying
to scan the source files to figure out where  how these 
configuration
options get used, but I'm worried that I may miss something so I feel 
it's

safer to ask for confirmation.

Is it possible to run from a self-contained build?


Of Course. Use --prefix=  and omit the other options which integrate it 
with the Ubuntu-specific install locations.


Alternatively
--program-suffix= can be used to append a specific value to the end of 
all the installed binaries. The configuration files and helpers all have 
config directives to alter them, and will default to the suffix'ed 
version of each file.



 Are there any run-time
options that mirror the functionality of the configuration options 
that can
be used when building?  Or can I specify a configuration option path 
which

is relative to either the binaries or the configuration file?


http://www.squid-cache.org/Doc/config/mime_table/
http://www.squid-cache.org/Doc/config/unlinkd_program/

Amos