View | Details | Raw Unified | Return to bug 61310
Collapse All | Expand All

(-)Makefile (-6 / +14 lines)
Lines 6-16 Link Here
6
#
6
#
7
7
8
PORTNAME=	firebird
8
PORTNAME=	firebird
9
PORTVERSION=	1.5.r7
9
PORTVERSION=	1.5.r8
10
CATEGORIES=	databases
10
CATEGORIES=	databases
11
MASTER_SITES=	http://www.aims.net.au/chris/firebird/
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}	\
12
		http://www.aims.net.au/chris/firebird/
12
MASTER_SITE_SUBDIR=firebird
13
MASTER_SITE_SUBDIR=firebird
13
DISTNAME=	firebird15-rc7
14
DISTNAME=	firebird15-rc8
14
15
15
MAINTAINER=	chris@e-easy.com.au
16
MAINTAINER=	chris@e-easy.com.au
16
COMMENT=	The open-source InterBase(tm) 6.0 spin-off (Classic version)
17
COMMENT=	The open-source InterBase(tm) 6.0 spin-off (Classic version)
Lines 26-32 Link Here
26
LD=	gcc
27
LD=	gcc
27
28
28
CONFLICTS=	firebird-devel-*
29
CONFLICTS=	firebird-devel-*
29
NOPACKAGE=	pkg-install not finished
30
30
31
WRKSRC=		${WRKDIR}/firebird15
31
WRKSRC=		${WRKDIR}/firebird15
32
INSTALLS_SHLIB=	yes
32
INSTALLS_SHLIB=	yes
Lines 57-69 Link Here
57
	@${DO_NADA}
57
	@${DO_NADA}
58
58
59
do-configure:
59
do-configure:
60
	@(cd ${WRKSRC} && ${ENV} CC=${CC} CXX=${CXX} MAKE=${GMAKE} ./autogen.sh --prefix=${PREFIX}/firebird --with-lock-manager --with-editline)
60
	@(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} MAKE=${GMAKE}	\
61
	LIBTOOL=libtool13 LIBTOOLIZE=libtoolize13 ./autogen.sh		\
62
	--prefix=${PREFIX}/firebird --with-lock-manager --with-editline)
61
63
62
do-build:
64
do-build:
63
	@(								\
65
	@(								\
64
	${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE};	\
66
	${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE};	\
65
	cd ${WRKSRC};							\
67
	cd ${WRKSRC};							\
66
	${ENV} CC=${CC} CXX=${CXX} ${GMAKE} all;			\
68
	${SETENV} CC=${CC} CXX=${CXX} ${GMAKE} all;			\
69
	)
70
71
post-install:
72
	@(								\
73
	${INSTALL_DATA} ${FILESDIR}/RELNOTES ${PREFIX}/firebird;	\
74
	${CAT} ${PKGMESSAGE};						\
67
	)
75
	)
68
76
69
.include <bsd.port.post.mk>
77
.include <bsd.port.post.mk>
(-)distinfo (-1 / +1 lines)
Line 1 Link Here
1
MD5 (firebird15-rc7.tar.bz2) = f6a3a4afa1f2fdfde9a4348a618c4896
1
MD5 (firebird15-rc8.tar.bz2) = cb775b56c0b3067994ec78f15a9e757d
(-)pkg-descr (-7 lines)
Lines 6-14 Link Here
6
InterBase 6.0, and a lively bunch of folks has charged themselves
6
InterBase 6.0, and a lively bunch of folks has charged themselves
7
with seeing that it lives on through the Firebird project.
7
with seeing that it lives on through the Firebird project.
8
8
9
Note that as of Firebird 0.9_4, the locksmith back door has
10
been closed.
11
12
For more information on Firebird and InterBase, see:
9
For more information on Firebird and InterBase, see:
13
10
14
WWW: http://sourceforge.net/projects/firebird/
11
WWW: http://sourceforge.net/projects/firebird/
Lines 16-22 Link Here
16
WWW: http://www.interbase2000.org/
13
WWW: http://www.interbase2000.org/
17
WWW: http://www.interbase.com/
14
WWW: http://www.interbase.com/
18
WWW: http://www.firebirdsql.org/
15
WWW: http://www.firebirdsql.org/
19
20
For more information on the locksmith back door, see:
21
22
WWW: https://www.kb.cert.org/vuls/id/247371
(-)pkg-install (+171 lines)
Added Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
5
PATH=/bin:/usr/bin:/usr/sbin
6
7
case $2 in
8
PRE-INSTALL)
9
10
if [ -d $PKG_PREFIX/firebird ]; then
11
	if [ -d $PKG_PREFIX/firebird.old ]; then
12
		rm -rf $PKG_PREFIX/firebird.old
13
	fi
14
	cp -Rp $PKG_PREFIX/firebird $PKG_PREFIX/firebird.old
15
fi
16
17
if [ `id -u` -ne 0 ]; then
18
	echo; echo "You must be root to run this step!"; echo; echo
19
  exit 1
20
fi
21
22
nofbuid=0
23
fbUID=`id -u firebird 2>/dev/null`
24
if [ $? -ne 0 ]; then
25
	fbUID=90
26
	while [ ! -z `id -un $fbUID 2>/dev/null` ]
27
	do
28
		fbUID=$(($fbUID+1))
29
	done
30
	nofbuid=1
31
fi
32
33
fbGID=`pw groupshow firebird 2>/dev/null`
34
if [ $? -ne 0 ]; then
35
	fbGID=90
36
	while [ ! -z `id -gn $fbGID 2>/dev/null` ]
37
	do
38
		fbGID=$(($fbGID+1))
39
	done
40
	echo "firebird:*:$fbGID:" >> /etc/group
41
else
42
	fbGID=`echo $fbGID | awk -F: '{print $3}'`
43
fi
44
45
echo "firebird user using uid $fbUID"
46
echo "firebird user using gid $fbGID"
47
48
if which -s pw; then
49
	if [ $nofbuid -ne 0 ]; then
50
		pw useradd firebird -u $fbUID -g $fbGID -h - -s /bin/sh \
51
		-d $PKG_PREFIX/firebird -c "Firebird Database Administrator"
52
	fi
53
else
54
	echo -n "unable to create user firebird - please create it manually,"
55
	echo " before reinstalling this package."
56
	exit 1
57
fi
58
;;
59
60
POST-INSTALL)
61
chown -R firebird:firebird $PKG_PREFIX/firebird
62
chmod -R o= $PKG_PREFIX/firebird
63
64
# Now fix up the mess.
65
66
# fix up directories
67
for i in `find $PKG_PREFIX/firebird -print`
68
do
69
	FileName=$i
70
	if [ -d $FileName ]; then
71
		chmod u=rwx,go=rx $FileName
72
	fi
73
done
74
75
# make lib ldconfig-compatible
76
chown -R root:wheel $PKG_PREFIX/firebird/lib
77
78
# make the following read-only
79
chmod -R a=r $PKG_PREFIX/firebird/WhatsNew
80
for i in `find $PKG_PREFIX/firebird/doc -type f -print`
81
do
82
	chmod a=r $i
83
done
84
chmod -R a=r $PKG_PREFIX/firebird/examples/*
85
chmod -R a=r $PKG_PREFIX/firebird/include/*
86
chmod -R a=r $PKG_PREFIX/firebird/intl/*
87
#chmod -R a=r $PKG_PREFIX/firebird/misc/*
88
89
chmod -R ug=rx,o= $PKG_PREFIX/firebird/UDF/*
90
chmod -R ug=rx,o= $PKG_PREFIX/firebird/intl/fbintl
91
chmod -R a=rx $PKG_PREFIX/firebird/lib/*
92
93
cd $PKG_PREFIX/firebird/lib
94
ln -sf libfbembed.so libgds.so
95
ln -sf libfbembed.so.1 libgds.so.1
96
97
cd $PKG_PREFIX/firebird/bin
98
for i in `ls`
99
do
100
	chmod ug=rx,o= $i
101
done
102
103
chmod a=rx isql qli
104
105
# SUID is needed for running server programs.
106
for i in fb_lock_mgr gds_drop fb_inet_server
107
do
108
	if [ -f $i ]; then
109
		chmod ug=rx,o= $i
110
		chmod ug+s $i
111
	fi
112
done
113
114
115
cd $PKG_PREFIX/firebird
116
117
# Lock files
118
119
for i in isc_init1 isc_lock1 isc_event1
120
do
121
	FileName=$i.`hostname`
122
	touch $FileName
123
	chmod uga=rw $FileName
124
	chown firebird:firebird $FileName
125
done
126
127
touch firebird.log
128
chown firebird:firebird firebird.log
129
chmod ug=rw,o= firebird.log
130
chmod a=r firebird.msg README
131
chown root:wheel *.sample
132
chmod ug=r,o= *.sample
133
134
# make databases writable by firebird only
135
# local database connections are not a good idea
136
chmod ug=rw,o= examples/*.fdb
137
chmod ug=rw,o= help/*.fdb
138
chmod ug=rw,o= security.fdb
139
140
chmod 440 aliases.conf firebird.conf
141
chmod 660 security.fdb
142
143
# remove any existing gds service
144
cp /etc/services /etc/services.old
145
cp /etc/inetd.conf /etc/inetd.conf.old
146
cat /etc/services |grep -v gds_db >/etc/services.new
147
cat /etc/inetd.conf |grep -v gds_db >/etc/inetd.conf.new
148
mv /etc/services.new /etc/services
149
mv /etc/inetd.conf.new /etc/inetd.conf
150
151
# add the gds service and restart inetd
152
cat >>/etc/services <<EOF
153
gds_db		 3050/tcp  #InterBase Database Remote Protocol
154
EOF
155
cat >>/etc/inetd.conf <<EOF
156
gds_db	stream	tcp	nowait	firebird	$PKG_PREFIX/firebird/bin/fb_inet_server  fb_inet_server
157
EOF
158
if [ -f /var/run/inetd.pid ]; then
159
	kill -HUP `cat /var/run/inetd.pid`
160
fi
161
162
# shared lib startup script
163
if [ -d $PKG_PREFIX/etc/rc.d ]; then
164
	(
165
	echo "#!/bin/sh"; echo "[ -d $PKG_PREFIX/firebird/lib ] && /sbin/ldconfig -m $PKG_PREFIX/firebird/lib"
166
	) > $PKG_PREFIX/etc/rc.d/000.firebird.sh
167
  chmod a=rx $PKG_PREFIX/etc/rc.d/000.firebird.sh
168
fi
169
;;
170
171
esac
(-)pkg-message (-1 / +1 lines)
Lines 2-8 Link Here
2
---------------------------------------------------------
2
---------------------------------------------------------
3
Firebird is now installed.  A symbolic link from
3
Firebird is now installed.  A symbolic link from
4
/usr/interbase -> %%PREFIX%%/firebird may be needed
4
/usr/interbase -> %%PREFIX%%/firebird may be needed
5
for compatibility with existing  programs that use
5
for compatibility with existing programs that use
6
Firebird.
6
Firebird.
7
7
8
The symbolic link can be created with:
8
The symbolic link can be created with:
(-)pkg-plist (-4 / +11 lines)
Lines 1-11 Link Here
1
etc/rc.d/000.firebird.sh
1
etc/rc.d/000.firebird.sh
2
firebird/README
2
firebird/README
3
firebird/RELNOTES
3
firebird/UDF/fbudf.so
4
firebird/UDF/fbudf.so
4
firebird/UDF/fbudf.sql
5
firebird/UDF/fbudf.sql
5
firebird/UDF/ib_udf.so
6
firebird/UDF/ib_udf.so
6
firebird/UDF/ib_udf.sql
7
firebird/UDF/ib_udf.sql
7
firebird/WhatsNew
8
firebird/WhatsNew
8
firebird/aliases.conf
9
@unexec if cmp -s %D/firebird/aliases.conf %D/firebird/aliases.conf.sample; then rm -f %D/firebird/aliases.conf; fi
10
firebird/aliases.conf.sample
11
@exec [ -f %B/aliases.conf ] || cp %B/%f %B/aliases.conf
9
firebird/bin/fb_inet_server
12
firebird/bin/fb_inet_server
10
firebird/bin/fb_lock_mgr
13
firebird/bin/fb_lock_mgr
11
firebird/bin/fb_lock_print
14
firebird/bin/fb_lock_print
Lines 86-93 Link Here
86
firebird/examples/stat9.e
89
firebird/examples/stat9.e
87
firebird/examples/udf.sql
90
firebird/examples/udf.sql
88
firebird/examples/udflib.c
91
firebird/examples/udflib.c
89
firebird/firebird.conf
92
@unexec if cmp -s %D/firebird/firebird.conf %D/firebird/firebird.conf.sample; then rm -f %D/firebird/firebird.conf; fi
90
@unexec rm -f %D/firebird/firebird.log
93
firebird/firebird.conf.sample
94
@exec [ -f %B/firebird.conf ] || cp %B/%f %B/firebird.conf
95
@unexec [ -s %D/firebird/firebird.log ] || rm -f %D/firebird/firebird.log
91
firebird/firebird.msg
96
firebird/firebird.msg
92
firebird/help/help.fdb
97
firebird/help/help.fdb
93
firebird/include/blr.h
98
firebird/include/blr.h
Lines 109-115 Link Here
109
firebird/lib/libgds.so
114
firebird/lib/libgds.so
110
firebird/lib/libgds.so.1
115
firebird/lib/libgds.so.1
111
firebird/lib/libib_util.so
116
firebird/lib/libib_util.so
112
firebird/security.fdb
117
@unexec if cmp -s %D/firebird/security.fdb %D/firebird/security.fdb.sample; then rm -f %D/firebird/security.fdb; fi
118
firebird/security.fdb.sample
119
@exec [ -f %B/security.fdb ] || cp %B/%f %B/security.fdb
113
@dirrm firebird/UDF
120
@dirrm firebird/UDF
114
@dirrm firebird/bin
121
@dirrm firebird/bin
115
@dirrm firebird/doc/sql.extensions
122
@dirrm firebird/doc/sql.extensions
(-)files/RELNOTES (-27 / +49 lines)
Lines 1-22 Link Here
1
Firebird 1.0.2 FreeBSD Release Notes                    05-Jan-2003
1
Firebird 1.5.0 FreeBSD Release Notes                    11-Jan-2004
2
--------------------------------------
2
--------------------------------------
3
FB-T6.2.908 Firebird Final Release
3
FB-V1.5.0.4201 Firebird 1.5 Release Candidate 8
4
4
5
Welcome to the FreeBSD Firebird port!  Users should note that there
5
    Welcome to the FreeBSD Firebird port!
6
was a package called `firebird-1.0.tgz' released in mid-August
7
2000.  Unfortunately, that package was released before Firebird
8
version numbering conventions were established, so although the
9
version number would suggest that it is newer than the current
10
release, it is certainly not.  Users of the August 1.0 package
11
should upgrade to 0.9_4 or later, which has fixed many bugs and
12
security problems, including the recently-discovered back door.
13
14
    Firebird originally required a running copy of Firebird (or
15
InterBase) in order to build itself.  This port uses a boot kit to
16
overcome that, so that it does not require itself to build.
17
Unfortunately, the side effect of this is that if you have a lock
18
manager running from an already-installed version of Firebird or
19
InterBase, this port will not build.
20
6
21
    Firebird is installed SUID with owner and group `firebird'.
7
    Firebird is installed SUID with owner and group `firebird'.
22
This does affect where you can and cannot create databases when
8
This does affect where you can and cannot create databases when
Lines 30-41 Link Here
30
do this is to build and install the port.  :)  If this happens,
16
do this is to build and install the port.  :)  If this happens,
31
make sure that the lock manager is not running and its semaphores
17
make sure that the lock manager is not running and its semaphores
32
have been removed.  The former can be accomplished with 'ps ax
18
have been removed.  The former can be accomplished with 'ps ax
33
|grep gds' and 'kill'; the latter with 'ipcs -s' and 'ipcrm -s'.
19
|grep fb' and 'kill'; the latter with 'ipcs -s' and 'ipcrm -s'.
34
20
35
    For example, after building and installing the port, you will
21
    For example, after building and installing the port, you will
36
probably go through something like this:
22
probably go through something like this:
37
23
38
# isql /usr/interbase/isc4.gdb
24
# isql /usr/local/firebird/security.fdb
39
Statement failed, SQLCODE = -902
25
Statement failed, SQLCODE = -902
40
26
41
operating system directive semget failed
27
operating system directive semget failed
Lines 62-75 Link Here
62
48
63
	/usr/local/etc/rc.d/pgsql.sh stop
49
	/usr/local/etc/rc.d/pgsql.sh stop
64
50
65
and see if that helps.
51
and see if that helps. Alternatively, increase the value of SEMMNS
52
by 48 in your kernel configuration file. This can be found by getting
53
the current value with 'sysctl -a | grep semmns'. You can either add
54
this to your kernel config, or add the following line to /boot/loader.conf:
55
56
	kern.ipc.semmns=X
57
58
where is is the current value plus 48. If this doesn't resolve the issue,
59
try adding 48 again. 
60
61
    Please note that RC8 has changed the libgds.so symlink to point to
62
libfbembed.so. This has been done to resolve compatability issues with
63
older versions of Firebird. The FreeBSD port of RC7 had libgds.so
64
pointing to libfbclient.so. libfbclient.so is a remote access-only
65
shared library with threaded support, which requires target applications
66
to link with a threaded library such as libc_r.so, libkse.so or libthr.so.
67
68
    Super Server support in Firebird 1.5 for FreeBSD is not currently
69
available due to the Firebird code using POSIX threads APIs not available
70
in FreeBSD 4.x or not yet complete in FreeBSD 5.x. This issue will become
71
more important once the scalability issues of Super Server have been
72
resolved.
73
74
    This installation has already inserted the necessary line to
75
/etc/inetd.conf so that you can connect to Firebird across the network.
76
However you may need to add the remote host to /etc/hosts.equiv. For
77
example, to allow the local machine to make connections to Firebird
78
using TCP, the following command needs running:
79
80
	echo localhost >> /etc/hosts.equiv
81
82
Please note that adding machines to /etc/hosts.equiv can reduce the
83
security of your system. If in doubt, try connecting to Firebird with
84
a username and password already defined in security.fdb. For example:
85
86
gsec
87
> add myuser -pass mypass
88
> quit
89
isql -u myuser -p mypass localhost:/usr/local/firebird/examples/employee.fdb
66
90
67
    Super Server support has recently been added. However, there is
91
This should reduce the need for hosts defined in /etc/hosts.equiv.
68
anecdotal evidence that it is not as reliable nor as scalable as the
69
Classic Server version.  For this reason, I have not included a
70
start up method for Super Server.  For those that are interested,
71
traversing to /usr/interbase/misc will find the startup scripts for
72
the various flavours of Linux.
73
92
74
    Complete documentation for InterBase(tm) is available (free of
93
    Complete documentation for InterBase(tm) is available (free of
75
charge) from http://www.interbase.com/ in PDF format.  While
94
charge) from http://www.interbase.com/ in PDF format.  While
Lines 82-86 Link Here
82
	http://www.interbase2000.org/
101
	http://www.interbase2000.org/
83
	http://www.firebirdsql.org/
102
	http://www.firebirdsql.org/
84
103
104
    Please also see the doc directory in the Firebird package for
105
documentation specific to Firebird.
106
85
Chris Knight
107
Chris Knight
86
<chris@aims.com.au>
108
<chris@aims.net.au>
(-)files/patch-autogen.sh (-26 lines)
Removed Link Here
1
--- autogen.sh.orig	Fri Apr 18 04:41:28 2003
2
+++ autogen.sh	Sun Aug 24 18:39:45 2003
3
@@ -20,7 +20,7 @@
4
   ;;
5
 esac
6
 
7
-VER=`libtool --version|grep ' libtool)'|sed 's/.*) \([0-9][0-9.]*\) .*/\1/'`
8
+VER=`libtool13 --version|grep ' libtool)'|sed 's/.*) \([0-9][0-9.]*\) .*/\1/'`
9
 case "$VER" in
10
  0* | 1\.[0-2] | 1\.[0-2][a-z]* | \
11
  1\.3\.[0-2] | 1\.3\.[0-2][a-z]* )
12
@@ -50,12 +50,12 @@
13
 
14
 # Generate configure from configure.in
15
 echo "Running libtoolize ..."
16
-LIBTOOL_M4=`libtoolize --copy --force --dry-run|grep 'You should add the contents of'|sed "s,^[^/]*\(/[^']*\).*$,\1,"`
17
+LIBTOOL_M4=`libtoolize13 --copy --force --dry-run|grep 'You should add the contents of'|sed "s,^[^/]*\(/[^']*\).*$,\1,"`
18
 if test "x$LIBTOOL_M4" != "x"; then
19
  rm -f aclocal.m4
20
  cp $LIBTOOL_M4 aclocal.m4
21
 fi
22
-libtoolize --copy --force || exit 1
23
+libtoolize13 --copy --force || exit 1
24
 
25
 echo "Running autoconf ..."
26
 autoconf || exit 1
(-)files/patch-src::common::classes::locks.h (-49 lines)
Removed Link Here
1
--- src/common/classes/locks.h.orig	Sun Aug 17 14:56:47 2003
2
+++ src/common/classes/locks.h	Wed Nov 12 11:12:25 2003
3
@@ -77,7 +77,7 @@
4
 
5
 /* Process-local spinlock. Used to manage memory heaps in threaded environment. */
6
 // Pthreads version of the class
7
-#ifndef SOLARIS
8
+#if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD)
9
 class Spinlock {
10
 private:
11
 	pthread_spinlock_t spinlock;
12
@@ -100,6 +100,7 @@
13
 	}
14
 };
15
 #else
16
+#ifdef SOLARIS
17
 // Who knows why Solaris 2.6 have not THIS funny spins?
18
 //The next code is not comlpeted but let me compile //Konstantin
19
 class Spinlock {
20
@@ -123,6 +124,29 @@
21
 			system_call_failed::raise();
22
 	}
23
 };
24
+#else  // DARWIN and FREEBSD
25
+class Spinlock {
26
+private:
27
+	pthread_mutex_t mlock;
28
+public:
29
+	Spinlock() {
30
+		if (pthread_mutex_init(&mlock, 0))
31
+			system_call_failed::raise();
32
+	}
33
+	~Spinlock() {
34
+		if (pthread_mutex_destroy(&mlock))
35
+			system_call_failed::raise();
36
+	}
37
+	void enter() {
38
+		if (pthread_mutex_lock(&mlock))
39
+			system_call_failed::raise();
40
+	}
41
+	void leave() {
42
+		if (pthread_mutex_unlock(&mlock))
43
+			system_call_failed::raise();
44
+	}
45
+};
46
+#endif
47
 
48
 #endif
49
 #endif
(-)files/patch-src::install::arch-specific::freebsd::install.sh.in (+92 lines)
Added Link Here
1
--- src/install/arch-specific/freebsd/install.sh.in.orig	Thu Nov  6 23:23:29 2003
2
+++ src/install/arch-specific/freebsd/install.sh.in	Tue Jan 13 17:36:16 2004
3
@@ -59,7 +59,7 @@
4
 	if [ -d $InstallPrefix/firebird.old ]; then
5
 		rm -rf $InstallPrefix/firebird.old
6
 	fi
7
-	mv $InstallFirebirdPrefix $InstallPrefix/firebird.old
8
+	cp -Rp $InstallFirebirdPrefix $InstallPrefix/firebird.old
9
 fi
10
 
11
 if [ `id -u` -ne 0 ]; then
12
@@ -162,7 +162,7 @@
13
 #cp -r $BuiltFBDir/doc $DestDir 
14
 
15
 cp $BuiltFBDir/firebird.msg $DestDir/firebird.msg 
16
-cp $BuiltFBDir/security.fdb $DestDir/security.fdb 
17
+cp $BuiltFBDir/security.fdb $DestDir/security.fdb.sample
18
 
19
 
20
 #cp $BuiltFBDir/include/gds.f $DestDir/include 
21
@@ -190,19 +190,19 @@
22
 cp $BuildRootDir/doc/WhatsNew $DestDir/WhatsNew
23
 cp $BuildRootDir/doc/README.user $DestDir/README
24
 
25
-cp $BuiltFBDir/misc/firebird.conf $DestDir/firebird.conf
26
+cp $BuiltFBDir/misc/firebird.conf $DestDir/firebird.conf.sample
27
 
28
-echo "#" >> $DestDir/aliases.conf
29
-echo "# List of known database aliases" >> $DestDir/aliases.conf
30
-echo "# ------------------------------" >> $DestDir/aliases.conf
31
-echo "#" >> $DestDir/aliases.conf
32
-echo "# Examples:" >> $DestDir/aliases.conf
33
-echo "#" >> $DestDir/aliases.conf
34
-echo "# employee = /$FBRootDir/examples/employee.fdb" >> $DestDir/aliases.conf
35
-echo "#" >> $DestDir/aliases.conf
36
+echo "#" >> $DestDir/aliases.conf.sample
37
+echo "# List of known database aliases" >> $DestDir/aliases.conf.sample
38
+echo "# ------------------------------" >> $DestDir/aliases.conf.sample
39
+echo "#" >> $DestDir/aliases.conf.sample
40
+echo "# Examples:" >> $DestDir/aliases.conf.sample
41
+echo "#" >> $DestDir/aliases.conf.sample
42
+echo "# employee = $DestDir/examples/employee.fdb" >> $DestDir/aliases.conf.sample
43
+echo "#" >> $DestDir/aliases.conf.sample
44
     
45
 
46
-chown -R firebird:firebird $InstallFirebirdPrefix
47
+chown -R $fbUID:$fbGID $InstallFirebirdPrefix
48
 chmod -R o= $InstallFirebirdPrefix
49
 
50
 # Now fix up the mess.
51
@@ -235,8 +235,8 @@
52
 chmod -R a=rx $InstallFirebirdPrefix/lib/*
53
 
54
 cd $InstallFirebirdPrefix/lib
55
-ln -sf libfbclient.so libgds.so
56
-ln -sf libfbclient.so.1 libgds.so.1
57
+ln -sf libfbembed.so libgds.so
58
+ln -sf libfbembed.so.1 libgds.so.1
59
 
60
 cd $InstallFirebirdPrefix/bin
61
 for i in `ls`
62
@@ -265,19 +265,25 @@
63
 	FileName=$i.`hostname`
64
 	touch $FileName
65
 	chmod ug=rw,o= $FileName
66
-	chown firebird:firebird $FileName
67
+	chown $fbUID:$fbGID $FileName
68
 done
69
 
70
-touch firebird.log aliases.conf firebird.conf
71
-chown firebird:firebird firebird.log
72
+touch firebird.log
73
+chown $fbUID:$fbGID firebird.log
74
 chmod ug=rw,o= firebird.log
75
-chmod a=r firebird.msg aliases.conf firebird.conf README
76
+chmod a=r firebird.msg README
77
+chown root:wheel *.sample
78
+chmod ug=r,o= *.sample
79
 
80
 # make databases writable by firebird only
81
 # local database connections are not a good idea
82
 chmod ug=rw,o= examples/*.fdb
83
 chmod ug=rw,o= help/*.fdb
84
-chmod ug=rw,o= security.fdb
85
+
86
+# install the samples if they don't exist
87
+[ -f aliases.conf ] || install -o $fbUID -g $fbGID -m 440 aliases.conf.sample aliases.conf
88
+[ -f firebird.conf ] || install -o $fbUID -g $fbGID -m 440 firebird.conf.sample firebird.conf
89
+[ -f security.fdb ] || install -o $fbUID -g $fbGID -m 660 security.fdb.sample security.fdb
90
 
91
 # remove any existing gds service
92
 cp /etc/services /etc/services.old

Return to bug 61310