Commit 1e06678c authored by Christoph Berg's avatar Christoph Berg

Move PgCommon.pm to /usr/share/perl5.

parent aa181bf9
postgresql-common (162) UNRELEASED; urgency=medium
[ Christoph Berg ]
* Move PgCommon.pm to /usr/share/perl5.
* t/020_create_sql_remove.t: Test psql -tx alignment to catch a bug in
9.4beta2.
......
......@@ -2,5 +2,5 @@ user_clusters etc/postgresql-common
debian/supported-versions usr/share/postgresql-common
debian/maintscripts-functions usr/share/postgresql-common
pgcommon.sh usr/share/postgresql-common
PgCommon.pm usr/share/postgresql-common
PgCommon.pm usr/share/perl5
pg_wrapper usr/share/postgresql-common
......@@ -16,7 +16,6 @@
use strict;
use lib '/usr/share/postgresql-common';
use PgCommon;
# Check write cache setting for given drive.
......
......@@ -17,7 +17,6 @@
use strict;
use warnings;
use Getopt::Long;
use lib '/usr/share/postgresql-common';
use PgCommon qw(quote_conf_value user_cluster_map read_cluster_conf_file
read_conf_file set_conffile_value set_conf_value disable_conffile_value
disable_conf_value);
......
......@@ -16,7 +16,6 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
use lib '/usr/share/postgresql-common';
use PgCommon;
use Getopt::Long;
use POSIX qw/setlocale LC_ALL LC_CTYPE/;
......
......@@ -20,7 +20,6 @@
use strict;
use warnings;
use lib '/usr/share/postgresql-common';
use Getopt::Long;
use POSIX qw/setsid dup2 setlocale LC_ALL :sys_wait_h/;
use PgCommon;
......
......@@ -15,7 +15,6 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
use lib '/usr/share/postgresql-common';
use Getopt::Long;
use PgCommon;
......
......@@ -14,11 +14,10 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
use lib '/usr/share/postgresql-common';
use strict;
use PgCommon;
use Getopt::Long;
use Net::CIDR;
use strict;
my %valid_methods = qw/trust 1 reject 1 md5 1 crypt 1 password 1 krb5 1 ident 1 pam 1/;
......
......@@ -15,7 +15,6 @@
# GNU General Public License for more details.
use strict;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Getopt::Long;
......
......@@ -19,7 +19,6 @@ my @srcdirs = ('/usr/share/hunspell', '/usr/share/myspell/dicts');
my $cachedir = '/var/cache/postgresql/dicts';
my $pgsharedir = '/usr/share/postgresql/';
use lib '/usr/share/postgresql-common';
use PgCommon;
# determine encoding of an .aff file
......
......@@ -17,8 +17,6 @@
# GNU General Public License for more details.
use strict;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Getopt::Long;
use POSIX;
......
......@@ -17,10 +17,7 @@
# GNU General Public License for more details.
use strict;
use POSIX;
use lib '/usr/share/postgresql-common';
use PgCommon;
my ($version, $cluster, $db, $port, $host);
......
......@@ -14,7 +14,6 @@
# GNU General Public License for more details.
use strict;
use lib '/usr/share/postgresql-common';
use PgCommon;
error "Usage: $0 <version upgraded from>" if $#ARGV != 0;
......
......@@ -4,7 +4,6 @@ use strict;
use File::Temp qw/tempdir/;
use lib '/usr/share/postgresql-common';
use lib '.';
use PgCommon;
......
......@@ -2,7 +2,6 @@
use strict;
use lib '/usr/share/postgresql-common';
use lib '.';
use PgCommon;
......
......@@ -8,8 +8,6 @@ use Time::HiRes qw/usleep/;
use lib 't';
use TestLib;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => 127 * ($#MAJORS+1);
......
......@@ -7,8 +7,6 @@ require File::Temp;
use lib 't';
use TestLib;
use Test::More tests => 158;
use lib '/usr/share/postgresql-common';
use PgCommon;
my $version = $MAJORS[-1];
......
......@@ -8,8 +8,6 @@ use Time::HiRes qw/usleep/;
use lib 't';
use TestLib;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => ($#MAJORS == 0) ? 1 : 103 * 3;
......
......@@ -4,7 +4,7 @@ use strict;
use lib 't';
use TestLib;
use PgCommon;
use Test::More tests => ($#MAJORS == 0) ? 1 : 30;
if ($#MAJORS == 0) {
......@@ -12,10 +12,6 @@ if ($#MAJORS == 0) {
exit 0;
}
use lib '/usr/share/postgresql-common';
use PgCommon;
ok ((system "pg_createcluster --datadir /tmp/postgresql-test -l /tmp/postgresql-test.log $MAJORS[0] upgr >/dev/null") == 0);
# Upgrade to latest version
......
# Check upgrading of tablespaces; right now this is not supported, so we just
# check that no damage is done.
use strict;
use strict;
use File::Temp qw/tempdir/;
use lib 't';
use TestLib;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => ($#MAJORS == 0) ? 1 : 14;
if ($#MAJORS == 0) {
......
# Test cluster upgrade with a custom ssl certificate
use strict;
use strict;
use File::Temp qw/tempdir/;
use lib 't';
use TestLib;
use PgCommon;
use Test::More tests => ($#MAJORS == 0 or $PgCommon::rpm) ? 1 : 24;
if ($#MAJORS == 0) {
......@@ -18,8 +16,6 @@ if ($PgCommon::rpm) {
exit 0;
}
use lib '/usr/share/postgresql-common';
use PgCommon;
ok ((system "pg_createcluster $MAJORS[0] upgr >/dev/null") == 0);
......
......@@ -4,10 +4,7 @@ use strict;
use lib 't';
use TestLib;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => ($#MAJORS+1) * 52 + 10;
# create a test cluster with given locale, check the locale/encoding, and
......
......@@ -6,11 +6,8 @@ use strict;
use lib 't';
use TestLib;
use Test::More tests => ($#MAJORS == 0 || $MAJORS[0] >= '8.3') ? 1 : 19 * 3 + 10;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => ($#MAJORS == 0 || $MAJORS[0] >= '8.3') ? 1 : 19 * 3 + 10;
if ($#MAJORS == 0) {
pass 'only one major version installed, skipping upgrade tests';
......
......@@ -4,11 +4,8 @@ use strict;
use lib 't';
use TestLib;
use Test::More tests => ($#MAJORS == 0) ? 1 : 45;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => ($#MAJORS == 0) ? 1 : 45;
if ($#MAJORS == 0) {
pass 'only one major version installed, skipping upgrade tests';
......
......@@ -4,8 +4,6 @@ use strict;
use lib 't';
use TestLib;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => 71;
......
......@@ -4,8 +4,6 @@ use strict;
use lib 't';
use TestLib;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => $MAJORS[-1] >= '8.3' ? 31 : 1;
......
......@@ -5,8 +5,6 @@ use strict;
use lib 't';
use TestLib;
use Socket;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => 127;
......
......@@ -8,8 +8,6 @@ use TestLib;
my @versions = ($MAJORS[-1]);
use Test::More tests => 29;
use lib '/usr/share/postgresql-common';
use PgCommon;
my $shellaction = '#!/bin/sh
......
......@@ -9,8 +9,6 @@ use File::Temp qw/tempdir/;
my $version = $MAJORS[-1];
use Test::More tests => 34;
use lib '/usr/share/postgresql-common';
use PgCommon;
delete $ENV{'LANG'};
......
......@@ -5,7 +5,7 @@ use strict;
use lib 't';
use TestLib;
use PgCommon;
use Test::More tests => ($#MAJORS == 0) ? 1 : 35;
if ($#MAJORS == 0) {
......@@ -13,8 +13,6 @@ if ($#MAJORS == 0) {
exit 0;
}
use lib '/usr/share/postgresql-common';
use PgCommon;
# create old cluster
is ((system "pg_createcluster $MAJORS[0] main --start >/dev/null"), 0, "pg_createcluster $MAJORS[0] main");
......
......@@ -10,8 +10,6 @@ my $ownver = $MAJORS[-1];
my $grpver = $MAJORS[0];
use Test::More tests => 36;
use lib '/usr/share/postgresql-common';
use PgCommon;
my $testuser = 'postgres';
......
......@@ -4,11 +4,8 @@ use strict;
use lib 't';
use TestLib;
use Test::More tests => 8 * ($#MAJORS+2);
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => 8 * ($#MAJORS+2);
my $multiarch = '';
unless ($PgCommon::rpm) {
......
......@@ -4,12 +4,10 @@ use strict;
use lib 't';
use TestLib;
use PgCommon;
my $version = $MAJORS[-1];
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => $PgCommon::rpm ? 1 : 39;
if ($PgCommon::rpm) {
pass 'tsearch dictionaries not handled by postgresql-common on RedHat';
......
......@@ -4,11 +4,8 @@ use strict;
use lib 't';
use TestLib;
use Test::More 0.87; # needs libtest-simple-perl backport on lenny
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More 0.87; # needs libtest-simple-perl backport on lenny
my $v = $MAJORS[-1];
......
......@@ -4,11 +4,8 @@ use strict;
use lib 't';
use TestLib;
use Test::More tests => 19;
use lib '/usr/share/postgresql-common';
use PgCommon;
use Test::More tests => 19;
my $v = $MAJORS[-1];
......
......@@ -17,6 +17,7 @@ package TestLib;
use strict;
use Exporter;
use Test::More;
use PgCommon qw/get_versions change_ugid/;
our $VERSION = 1.00;
our @ISA = ('Exporter');
......@@ -24,9 +25,6 @@ our @EXPORT = qw/ps ok_dir exec_as deb_installed rpm_installed package_version
version_ge is_program_out like_program_out unlike_program_out pidof pid_env check_clean
@ALL_MAJORS @MAJORS $delay/;
use lib '/usr/share/postgresql-common';
use PgCommon qw/get_versions change_ugid/;
our @ALL_MAJORS = sort (get_versions()); # not affected by PG_VERSIONS/-v
our @MAJORS = $ENV{PG_VERSIONS} ? split (/\s+/, $ENV{PG_VERSIONS}) : @ALL_MAJORS;
our $delay = 500_000; # 500ms
......
......@@ -4,13 +4,10 @@ use strict;
use lib 't';
use TestLib;
my @versions = ($MAJORS[-1]);
use PgCommon;
use Test::More tests => 14;
use lib '/usr/share/postgresql-common';
use PgCommon;
my @versions = ($MAJORS[-1]);
# create clusters
foreach (@versions) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment