Here are a few patches against Slony 1.2 for the RPM packages. Please
consider applying them to the upcoming 1.2.1 release.
Thanks!
Here are the patches I made to get the rpm to build:
slony1-1.2.0-tools-paths.patch
- Require path was hard coded in tools/altperl/slonik_drop_table.pl
- Require path was hard coded in tools/altperl/
slonik_print_preamble.pl
- Changed /usr/bin/sh to /bin/sh intools/slony-cluster-analysis.sh and
tools/slony-cluster-analysis-mass.sh to work on both solaris and linux
slony1-1.2.0-configure.patch
- Changed package name from postgresql-slony1-engine to slony1 in
configure.ac to reflect name of tarball. Should probably change rpm
package name too. But I'll leave that to the maintainer.
slony1-1.2.0-spec.patch
- Changed docdir location
- Changed name of tarball to use bz2 suffix
- Install slon-tools as slon-tools.pm
After applying the above 3 patches and running configure, the rpm will
build out of the box on rhel3 with buildrhel3 defined using the
generated
spec file.
diff -ur tools.orig/altperl/slonik_drop_table.pl
tools/altperl/slonik_drop_table.pl
--- tools.orig/altperl/slonik_drop_table.pl 2006-05-30 10:52:35.000000000
-0400
+++ tools/altperl/slonik_drop_table.pl 2006-10-31 10:07:59.000000000 -0500
@@ -31,7 +31,7 @@
exit 0;
}
-require '/usr/local/pgsql/lib//slon-tools.pm';
+require '@@PGLIBDIR@@/slon-tools.pm';
require $CONFIG_FILE;
my ($TABLE_ID,$set) = @ARGV;
diff -ur tools.orig/altperl/slonik_print_preamble.pl
tools/altperl/slonik_print_preamble.pl
--- tools.orig/altperl/slonik_print_preamble.pl 2006-05-30 10:52:35.000000000
-0400
+++ tools/altperl/slonik_print_preamble.pl 2006-10-31 10:08:42.000000000
-0500
@@ -29,7 +29,7 @@
exit 0;
}
-require '/usr/local/pgsql/lib//slon-tools.pm';
+require '@@PGLIBDIR@@/slon-tools.pm';
require $CONFIG_FILE;
$FILE="/tmp/print_preamble.$$";
diff -ur tools.orig/slony-cluster-analysis-mass.sh
tools/slony-cluster-analysis-mass.sh
--- tools.orig/slony-cluster-analysis-mass.sh 2006-05-19 16:43:48.000000000
-0400
+++ tools/slony-cluster-analysis-mass.sh 2006-10-31 10:04:17.000000000
-0500
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#!/bin/sh
# $Id: slony-cluster-analysis-mass.sh,v 1.1 2006/05/19 20:43:48 cbbrowne Exp $
# Do cluster analyses
diff -ur tools.orig/slony-cluster-analysis.sh tools/slony-cluster-analysis.sh
--- tools.orig/slony-cluster-analysis.sh 2006-05-19 16:43:48.000000000
-0400
+++ tools/slony-cluster-analysis.sh 2006-10-31 10:04:17.000000000 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#!/bin/sh
# $Id: slony-cluster-analysis.sh,v 1.1 2006/05/19 20:43:48 cbbrowne Exp $
# Analyze Slony-I Configuration
--- configure.ac.orig 2006-06-21 19:52:11.000000000 -0400
+++ configure.ac 2006-10-31 12:03:14.000000000 -0500
@@ -15,7 +15,7 @@
sed -e 's/\:\ REL_//' -e 's/\$//g' -e 's/_/./g' -e 's/\./\_/3' \
-e 's/\ //g' -e s/\:/`date +HEAD_%Y%m%d`/ | tr -d '\n']))
-AC_INIT(postgresql-slony1-engine,[SLONREL_VERSION])
+AC_INIT(slony1,[SLONREL_VERSION])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR([src])
--- postgresql-slony1-engine.spec.in.orig 2006-07-17 12:28:42.000000000
-0400
+++ postgresql-slony1-engine.spec.in 2006-10-31 15:00:25.000000000 -0500
@@ -6,14 +6,14 @@
%define pg_version %(rpm -q --queryformat '%{VERSION}' postgresql-devel)
Summary: A "master to multiple slaves" replication system with cascading
and failover
-Name: @PACKAGE_NAME@
+Name: postgresql-slony1-engine
Version: @PACKAGE_VERSION@
Release: 2_PG%{pg_version}
License: BSD
Group: Applications/Databases
URL: http://slony.info/
Packager: Devrim Gunduz <[EMAIL PROTECTED]>
-Source0: @[EMAIL PROTECTED]
+Source0: @[EMAIL PROTECTED]
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: postgresql-devel
Requires: postgresql-server = %{pg_version}
@@ -44,7 +44,7 @@
Prereq: @[EMAIL PROTECTED]@[EMAIL PROTECTED]
%description docs
-The @[EMAIL PROTECTED] package includes some documentation for Slony-I.
+The %{name}-docs package includes some documentation for Slony-I.
%endif
%prep
@@ -65,7 +65,7 @@
--with-perltools=%{_bindir} --with-toolsbin=%{_bindir} \
%endif
%if %docs
- --with-docs --with-docdir=/usr/share/doc \
+ --with-docs --with-docdir=%{_docdir}/%{name}-%{version} \
%endif
--datadir %{_datadir}/pgsql --sysconfdir=/etc
--with-pglibdir=%{_libdir}/pgsql
@@ -95,12 +95,12 @@
/bin/rm -rf altperl/*.pl altperl/ToDo altperl/README altperl/Makefile
altperl/CVS
install -m 0644 altperl/slon_tools.conf-sample
$RPM_BUILD_ROOT%{_sysconfdir}/slon_tools.conf
install -m 0755 altperl/* $RPM_BUILD_ROOT%{_bindir}/
-install -m 0644 altperl/slon-tools $RPM_BUILD_ROOT%{_libdir}/pgsql/slon-tools
+install -m 0644 altperl/slon-tools
$RPM_BUILD_ROOT%{_libdir}/pgsql/slon-tools.pm
/bin/rm -f $RPM_BUILD_ROOT%{_sysconfdir}/slon_tools.conf-sample
/bin/rm -f $RPM_BUILD_ROOT%{_bindir}/slon_tools.conf-sample
-/bin/rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/slon-tools.pm
/bin/rm -f $RPM_BUILD_ROOT%{_bindir}/slon-tools.pm
/bin/rm -f $RPM_BUILD_ROOT%{_bindir}/slon-tools
+/bin/rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/slon-tools
%endif
%clean
@@ -108,7 +108,7 @@
%files
%defattr(-,root,root,-)
-%doc COPYRIGHT UPGRADING HISTORY-1.1 INSTALL SAMPLE RELEASE-1.1.5
+%doc COPYRIGHT UPGRADING HISTORY-1.1 INSTALL SAMPLE RELEASE-%{version}
%if %docs
%doc doc/adminguide doc/concept doc/howto doc/implementation doc/support
%endif
@@ -118,11 +118,14 @@
%{_datadir}/pgsql/*.sql
%config(noreplace) %{_sysconfdir}/slon.conf
%if %perltools
-%{_libdir}/pgsql/slon-tools
+%{_libdir}/pgsql/slon-tools.pm
%config(noreplace) %{_sysconfdir}/slon_tools.conf
%endif
%changelog
+* Tue Oct 31 2006 Trevor Astrope <[EMAIL PROTECTED]>
+- Fixup tar name and install slon-tools as slon--tools.pm
+
* Mon Jul 17 2006 Devrim Gunduz <[EMAIL PROTECTED]> postgresql-slony1-engine
- Updated spec and cleaned up rpmlint errors and warnings
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general