Re: can I run a self-contained build?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 03 Dec 2012 14:40:17 +1300

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
Received on Mon Dec 03 2012 - 01:40:21 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 03 2012 - 12:00:06 MST