Skip to content

Commit

Permalink
PG-REX運用補助ツール 15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
horiguti committed May 17, 2024
1 parent b17c3d8 commit dec5294
Show file tree
Hide file tree
Showing 27 changed files with 8,237 additions and 0 deletions.
Binary file added RPM/RPMS/x86_64/IO_Tty-1.11-1.el6.x86_64.rpm
Binary file not shown.
Binary file added RPM/RPMS/x86_64/IO_Tty-1.11-1.el7.x86_64.rpm
Binary file not shown.
Binary file added RPM/RPMS/x86_64/Net_OpenSSH-0.62-1.el6.x86_64.rpm
Binary file not shown.
Binary file added RPM/RPMS/x86_64/Net_OpenSSH-0.62-1.el7.x86_64.rpm
Binary file not shown.
Binary file added RPM/SOURCES/IO-Tty-1.11.tar.gz
Binary file not shown.
Binary file added RPM/SOURCES/Net-OpenSSH-0.62.tar.gz
Binary file not shown.
43 changes: 43 additions & 0 deletions RPM/SPECS/pg-rex_tools_IO_Tty.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Name: IO_Tty
Version: 1.11
Release: 1%{?dist}
Group: Development/Tools
URL: http://search.cpan.org/dist/IO-Tty/
Packager: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
License: The Perl 5 License (Artistic 1 & GPL 1) http://dev.perl.org/licenses/
Summary: Perl Low-level allocate a pseudo-Tty.
Summary(ja): Perlでの仮想TTY低レベル割り当て。
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: x86_64
Source0: IO-Tty-%{version}.tar.gz

%{?perl_default_fileter}

%description
Built for PG-REX operation scripts.

%description -l ja
PG-REX運用スクリプトで使用するためにビルド。

%prep
%setup -q -n IO-Tty-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}

%install
/usr/bin/make DESTDIR=${RPM_BUILD_ROOT} pure_install
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
%{_fixperms} %{buildroot}/*

%clean
/bin/rm -rf ${RPM_BUILD_DIR}/*

%files
%defattr(-,root,root)
%doc ChangeLog README
%{perl_vendorarch}/auto/IO/
%{perl_vendorarch}/IO/
%{_mandir}/man3/*.3pm*
39 changes: 39 additions & 0 deletions RPM/SPECS/pg-rex_tools_Net_OpenSSH.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Name: Net_OpenSSH
Version: 0.62
Release: 1%{?dist}
Group: Development/Tools
URL: http://search.cpan.org/dist/Net-OpenSSH/
Packager: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
License: The Perl 5 License (Artistic 1 & GPL 1) http://dev.perl.org/licenses/
Summary: Perl SSH client package implemented on top of OpenSSH.
Summary(ja): PerlでOpenSSHのラッパとして実装された SSHクライアントパッケージ。
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: x86_64
Source0: Net-OpenSSH-0.62.tar.gz

%define __check_files %{nil}

%description
Built for PG-REX operation scripts.

%description -l ja
PG-REX運用スクリプトで使用するためにビルド。

%prep
%setup -n Net-OpenSSH-0.62

%build
/usr/bin/perl Makefile.PL
/usr/bin/make

%install
/usr/bin/make DESTDIR=${RPM_BUILD_ROOT} pure_install

%clean
/bin/rm -rf ${RPM_BUILD_DIR}/*

%files
%defattr(-,root,root)
/usr


55 changes: 55 additions & 0 deletions RPM/SPECS/pg-rex_tools_script.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Name: pg-rex_operation_tools_script
Version: 15.1
Release: 1%{?dist}
Group: Development/Tools
Packager: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
License: BSD
Summary: PG-REX operation tools.
Summary(ja): PG-REX 運用補助ツール
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Source0: pg-rex_operation_tools-%{version}.tar.gz
Provides: perl(PGRex::common)

%define PREFIX /usr/local

%{?perl_default_filter}

%description
PG-REX operation tools.

%prep
%setup -q -n pg-rex_operation_tools-%{version}

%build
perl Makefile.PL PREFIX=%{PREFIX}
make

%install
rm -rf %{buildroot}


make DESTDIR=${RPM_BUILD_ROOT} pure_install
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
%{_fixperms} %{buildroot}/*
mkdir %{buildroot}/etc
cp pg-rex_tools.conf %{buildroot}/etc/

%clean
rm -rf %{buildroot}

%files
%defattr(0755,root,root)
%{PREFIX}/bin/pg-rex_primary_start
%{PREFIX}/bin/pg-rex_standby_start
%{PREFIX}/bin/pg-rex_stop
%{PREFIX}/bin/pg-rex_archivefile_delete
%{PREFIX}/bin/pg-rex_switchover
%{PREFIX}/share/perl5/PGRex/command.pm
%{PREFIX}/share/perl5/PGRex/common.pm
%{PREFIX}/share/perl5/PGRex/Po/en.pm
%{PREFIX}/share/perl5/PGRex/Po/ja.pm
/etc/pg-rex_tools.conf

#%defattr(0644,root,root)
%{PREFIX}/share/man/man1/pg-rex_tools_manual-ja.html
39 changes: 39 additions & 0 deletions pg-rex_operation_tools/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
===============================================================
PG-REX 運用補助ツールをソースセットからインストールする方法
===============================================================

PG-REX 運用補助ツールをソースセットからインストールする方法を記載します。

1) IO-Tty-1.11 と Net-OpenSSH-0.62 を以下の URL からダウンロードします
http://search.cpan.org/dist/IO-Tty/
http://search.cpan.org/dist/Net-OpenSSH/


2) IO-Tty-1.11 を解凍しインストールします
# tar zxvf IO-Tty-1.11.tar.gz

# cd IO-Tty-1.11
# perl Makefile.PL
# make
# make install


3) Net-OpenSSH-0.62 を解凍しインストールします
# tar zxvf Net-OpenSSH-0.62.tar.gz

# cd Net-OpenSSH-0.62
# perl Makefile.PL
# make
# make install


4) PG-REX 運用補助ツール一式を解凍し配置します
# tar zxvf PG-REX_operation_tools-<ver>.tar.gz

# cd pg-rex_operation_tools-<ver>
# perl Makefile.PL
# make
# make pure_install


以上
26 changes: 26 additions & 0 deletions pg-rex_operation_tools/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2012-2023, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the NIPPON TELEGRAPH AND TELEPHONE CORPORATION
(NTT) nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior
written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18 changes: 18 additions & 0 deletions pg-rex_operation_tools/MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
bin/pg-rex_archivefile_delete
bin/pg-rex_primary_start
bin/pg-rex_standby_start
bin/pg-rex_stop
bin/pg-rex_switchover
INSTALL
lib.in/command-rhel8.pm
lib/PGRex/command.pm
lib/PGRex/common.pm
lib/PGRex/Po/en.pm
lib/PGRex/Po/ja.pm
LICENSE
Makefile.PL
man/pg-rex_tools_manual.css
man/pg-rex_tools_manual-ja.md
man/html/pg-rex_tools_manual-ja.html
MANIFEST This list of files
pg-rex_tools.conf
39 changes: 39 additions & 0 deletions pg-rex_operation_tools/Makefile.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
use strict;
use File::Copy "cp";
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

my $release;
my $lib_command;

if ($^O ne 'linux') {
die("$^O OS unsupported");
}

$release = `cat /etc/redhat-release 2> /dev/null`
or die("unsupported linux distribution other than Redhat");

if ($release !~ /Red Hat Enterprise Linux release (\d+)/ &&
$release !~ /CentOS (?:Linux )?release (\d+)/) {
die("can't get RedHat Linux release");
}
if (($1 eq '8') || ($1 eq '9')) {
$lib_command = 'lib.in/command-rhel8.pm';
}
else {
die("RedHat Linux $1 unsupported");
}

cp($lib_command, 'lib/PGRex/command.pm')
or die("copy failed ($lib_command): $!");

WriteMakefile(
NAME => 'pg-rex_operation_tools',
VERSION => '15.1',
PREREQ_PM => { 'Net::OpenSSH' => 0.62, 'IO::Tty' => 1.11 },
PREFIX => '/usr/local',
INST_BIN => 'bin',
INST_LIB => 'lib',
INST_MAN1DIR => 'man/html'
);
Loading

0 comments on commit dec5294

Please sign in to comment.