Alex,

The test was simple enough. I ran the guardian under a non root account,
using "fakeroot" to avoid the restriction on account names, and set the
FIREBIRD environment variable to point to the Firebird directory tree
(firebird.conf, etc.) I had created under the same account. This was a
setup I often use with Firebird 2.1. The guardian failed reporting that
it was under to write to

/var/run/firebird/2.5/fb_guard

i.e. the location where the installed software expects to save the
fb_guard file. Directory permissions do not permit the copy of the
guardian that I ran to write to this location. I compiled the Firebird
sources plus Debian patch myself and confirmed the problem, I then
compiled them with the BUILD_ROOT section commented out and the problem
goes away for my copy. However, when run as the installed daemon, it
fails because it now expects all Firebird files to be under
/etc/firebird/2.5 rather than distributed about the system.

If I enclose the section with

if (getenv("FIREBIRD") == 0) {

...
}
then both my test and the installed daemon run fine.

If you look at the debian/rules file you can see how the directories are
set up for a standard debian build. The problem is that by specifying
hard wired paths, it seems that it is no longer possible to use the
FIREBIRD variable to specify an alternative directory tree - at least
with the current source code.

Tony Whyman
MWA Software

On 27/12/11 06:42, Alex Peshkoff wrote:
>  On 12/26/11 22:25, Tony Whyman wrote:
>> Looks like support for the FIREBIRD environment variable is broken in
>> the Debian builds for Firebird 2.5. I have so far checked the 2.5.0 and
>> 2.5.1 packages in https://launchpad.net/~mapopa/+archive/ppa and they
>> all seem to exhibit the same problem Also building the packages myself
>> from source (apply patch from
>> ftp://ftp.modsoftsys.net/public/firebird2.5-backports/firebird2.5_2.5.1.26351.ds4-2~bpo60+1.debian.tar.gz)
>> seems to have the same problem. On the other hand, the tar archive on
>> http://www.firebirdsql.org/en/server-packages/ seems to be OK.
>>
> Tony, I did not understand what test did you make to check for not
> taking into an account $FIREBIRD.
> What do you mean by not supported?
>
>> As far as I can make out the Debian builds have been built without the
>> BOOT_BUILD environment variable being defined and with explicit paths to
>> various firebird directories. Reading src/common/utils.cpp (line 930
>> onwards) when the values are set explicitly in this way, the environment
>> overrides have no effect.
>>
>> Running a command such as `strings fbguard |grep "/var/run"` returns
>>
>> /var/run/firebird/2.5
>>
>> with the affected debian builds, but returns an empty string with the
>> builds on the FIrebird repository.
>>
>> With Firebird 2.1, there was no such problem with the Debian build and
>> soft links were used to direct the Firebird Server from its default
>> directory tree to where Firebird files had been distributed (I assume to
>> follow Debian Guidelines).
>>
>> This raises the following questions:
>>
>> 1. Why was this change made? I can't see any good reason from breaking
>> the FIREBIRD environment variable handing in the Debian builds.
>>
> To answer this I must first of all know what do you mean by breaking?
>
>> 2. Why should setting explicit directory paths be incompatible with use
>> of the FIREBIRD environment variable? A simple test for this variable
>> could be used to ignore the hard wired paths.
>>
> Once again - ignore for what purpose?
>
>> 3. What is the purpose of this BOOT_BUILD macro in the first place?
>>
> It's used during boot build to slightly change rules of search for
> firebird directories.
> Should not be used in production.
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create 
> new or port existing apps to sell to consumers worldwide. Explore the 
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to