mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-04-11 11:22:01 +02:00
Use Rocky Linux for documentation builds instead of CentOS.
Since CentOS 8 will be EOL at the end of the year it makes sense to do this now. The centos:8 image is still used in documentation.xml because changes there require manual testing, which will need to be done at a later date. The changes are not user-facing, however, and can be done at any time. Also update CentOS references to RHEL since that is what we are emulating for testing purposes.
This commit is contained in:
parent
30c589ace7
commit
c32e000ab9
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -40,11 +40,11 @@ jobs:
|
||||
# All unit tests (with coverage) on the newest gcc available
|
||||
- param: test --vm=f33 --param=c-only --param=tz=America/New_York
|
||||
|
||||
# RHEL/CentOS 8 documentation
|
||||
- param: doc --vm=co8
|
||||
# RHEL documentation
|
||||
- param: doc --vm=rh8
|
||||
|
||||
# All integration tests
|
||||
- param: test --vm=co7 --param=module=mock --param=module=real
|
||||
- param: test --vm=rh7 --param=module=mock --param=module=real
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
|
@ -51,7 +51,7 @@ pgbackrest-dev => Clone pgBackRest repository
|
||||
git clone https://github.com/pgbackrest/pgbackrest.git
|
||||
```
|
||||
|
||||
If using a RHEL-based system, the CPAN XML parser is required to run `test.pl` and `doc.pl`. Instructions for installing Docker and the XML parser can be found in the `README.md` file of the pgBackRest [doc](https://github.com/pgbackrest/pgbackrest/blob/main/doc) directory in the section "The following is a sample RHEL/CentOS 7 configuration that can be used for building the documentation". NOTE that the "Install latex (for building PDF)" section is not required since testing of the docs need only be run for HTML output.
|
||||
If using a RHEL-based system, the CPAN XML parser is required to run `test.pl` and `doc.pl`. Instructions for installing Docker and the XML parser can be found in the `README.md` file of the pgBackRest [doc](https://github.com/pgbackrest/pgbackrest/blob/main/doc) directory in the section "The following is a sample RHEL 7 configuration that can be used for building the documentation". NOTE that the "Install latex (for building PDF)" section is not required since testing of the docs need only be run for HTML output.
|
||||
|
||||
## Coding
|
||||
|
||||
|
@ -8,7 +8,7 @@ This will build all documentation with defaults:
|
||||
```bash
|
||||
./doc.pl
|
||||
```
|
||||
The user guide can be built for `rhel` and `debian`. This will build the HTML user guide for RHEL/CentOS:
|
||||
The user guide can be built for `rhel` and `debian`. This will build the HTML user guide for RHEL:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=rhel
|
||||
```
|
||||
@ -21,7 +21,7 @@ Each `os-type` has a default container image that will be used as a base for cre
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=debian --var=os-image=debian:9
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=rhel --var=os-image=centos:7
|
||||
```
|
||||
The following is a sample RHEL/CentOS 7 configuration that can be used for building the documentation.
|
||||
The following is a sample RHEL 7 configuration that can be used for building the documentation.
|
||||
```bash
|
||||
# Install docker
|
||||
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
|
||||
@ -35,7 +35,7 @@ sudo yum install -y git wget
|
||||
# Install latex (for building PDF)
|
||||
sudo yum install -y texlive texlive-titlesec texlive-sectsty texlive-framed texlive-epstopdf ghostscript
|
||||
|
||||
# Install Perl modules that do not have CentOS packages via CPAN
|
||||
# Install Perl modules via CPAN that do not have packages
|
||||
sudo yum install -y yum cpanminus
|
||||
sudo yum groupinstall -y "Development Tools" "Development Libraries"
|
||||
sudo cpanm install --force XML::Checker::Parser
|
||||
@ -56,11 +56,11 @@ Ubuntu 16.04:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=debian --var=os-image=ubuntu:16.04 --var=package=test/package/pgbackrest_2.08-0_amd64.deb
|
||||
```
|
||||
RHEL/CentOS 7:
|
||||
RHEL 7:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=rhel --var=os-image=centos:7 --var=package=test/package/pgbackrest-2.08-1.el7.x86_64.rpm
|
||||
```
|
||||
RHEL/CentOS 8:
|
||||
RHEL 8:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=rhel --var=os-image=centos:8 --var=package=test/package/pgbackrest-2.08-1.el8.x86_64.rpm
|
||||
```
|
||||
|
@ -111,7 +111,7 @@ Improvements:
|
||||
|
||||
Documentation Features:
|
||||
|
||||
* Add user guide for RHEL/CentOS 7.
|
||||
* Add user guide for Debian.
|
||||
```
|
||||
|
||||
Commit to integration with the above message and push to CI.
|
||||
@ -137,7 +137,7 @@ v2.14: Bug Fix and Improvements
|
||||
|
||||
**Documentation Features**:
|
||||
|
||||
- Add user guide for RHEL/CentOS 7.
|
||||
- Add user guide for Debian.
|
||||
```
|
||||
|
||||
The first line will be the release title and the rest will be the body. The tag field should be updated with the current version so a tag is created from main. **Be sure to select the release commit explicitly rather than auto-tagging the last commit in main!**
|
||||
|
@ -234,10 +234,10 @@ eval
|
||||
# Remove all docker containers to get consistent IP address assignments
|
||||
executeTest('docker rm -f $(docker ps -a -q)', {bSuppressError => true});
|
||||
|
||||
# Generate deployment docs for RHEL/Centos
|
||||
if (!defined($strVm) || $strVm eq VM_CO8)
|
||||
# Generate deployment docs for RHEL
|
||||
if (!defined($strVm) || $strVm eq VM_RH8)
|
||||
{
|
||||
&log(INFO, "Generate RHEL/CentOS documentation");
|
||||
&log(INFO, "Generate RHEL documentation");
|
||||
|
||||
executeTest("${strDocExe} --deploy --key-var=os-type=rhel --out=pdf", {bShowOutputAsync => true});
|
||||
|
||||
|
@ -142,7 +142,7 @@
|
||||
</execute>
|
||||
</execute-list>
|
||||
|
||||
<p>If using a RHEL-based system, the CPAN XML parser is required to run <file>test.pl</file> and <file>doc.pl</file>. Instructions for installing Docker and the XML parser can be found in the <file>README.md</file> file of the <backrest/> <link url="{[github-url-main]}/doc">doc</link> directory in the section <quote>The following is a sample RHEL/CentOS 7 configuration that can be used for building the documentation</quote>. NOTE that the <quote>Install latex (for building PDF)</quote> section is not required since testing of the docs need only be run for HTML output.</p>
|
||||
<p>If using a RHEL-based system, the CPAN XML parser is required to run <file>test.pl</file> and <file>doc.pl</file>. Instructions for installing Docker and the XML parser can be found in the <file>README.md</file> file of the <backrest/> <link url="{[github-url-main]}/doc">doc</link> directory in the section <quote>The following is a sample RHEL 7 configuration that can be used for building the documentation</quote>. NOTE that the <quote>Install latex (for building PDF)</quote> section is not required since testing of the docs need only be run for HTML output.</p>
|
||||
</section>
|
||||
|
||||
<section id="coding">
|
||||
|
@ -14,7 +14,7 @@
|
||||
./doc.pl
|
||||
</code-block>
|
||||
|
||||
<p>The user guide can be built for <id>rhel</id> and <id>debian</id>. This will build the HTML user guide for RHEL/CentOS:</p>
|
||||
<p>The user guide can be built for <id>rhel</id> and <id>debian</id>. This will build the HTML user guide for RHEL:</p>
|
||||
|
||||
<code-block type="bash">
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=rhel
|
||||
@ -33,7 +33,7 @@
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=rhel --var=os-image=centos:7
|
||||
</code-block>
|
||||
|
||||
<p>The following is a sample RHEL/CentOS 7 configuration that can be used for building the documentation.</p>
|
||||
<p>The following is a sample RHEL 7 configuration that can be used for building the documentation.</p>
|
||||
|
||||
<code-block type="bash">
|
||||
# Install docker
|
||||
@ -48,7 +48,7 @@ sudo yum install -y git wget
|
||||
# Install latex (for building PDF)
|
||||
sudo yum install -y texlive texlive-titlesec texlive-sectsty texlive-framed texlive-epstopdf ghostscript
|
||||
|
||||
# Install Perl modules that do not have CentOS packages via CPAN
|
||||
# Install Perl modules via CPAN that do not have packages
|
||||
sudo yum install -y yum cpanminus
|
||||
sudo yum groupinstall -y "Development Tools" "Development Libraries"
|
||||
sudo cpanm install --force XML::Checker::Parser
|
||||
@ -73,13 +73,13 @@ sudo usermod -aG docker testdoc
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=debian --var=os-image=ubuntu:16.04 --var=package=test/package/pgbackrest_2.08-0_amd64.deb
|
||||
</code-block>
|
||||
|
||||
<p>RHEL/CentOS 7:</p>
|
||||
<p>RHEL 7:</p>
|
||||
|
||||
<code-block type="bash">
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=rhel --var=os-image=centos:7 --var=package=test/package/pgbackrest-2.08-1.el7.x86_64.rpm
|
||||
</code-block>
|
||||
|
||||
<p>RHEL/CentOS 8:</p>
|
||||
<p>RHEL 8:</p>
|
||||
|
||||
<code-block type="bash">
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=rhel --var=os-image=centos:8 --var=package=test/package/pgbackrest-2.08-1.el8.x86_64.rpm
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
<!-- OS titles -->
|
||||
<variable key="os-debian-title">Debian & Ubuntu</variable>
|
||||
<variable key="os-rhel-title">RHEL & CentOS 7-8</variable>
|
||||
<variable key="os-rhel-title">RHEL 7-8</variable>
|
||||
|
||||
<!-- Base PostgreSQL versions -->
|
||||
<variable key="os-debian-pg-version">12</variable>
|
||||
@ -42,13 +42,13 @@
|
||||
|
||||
<!-- Defines the container image that will be used to build the host -->
|
||||
<variable key="os-image" if="{[os-type-is-debian]}">ubuntu:18.04</variable>
|
||||
<variable key="os-image" if="{[os-type-is-rhel]}">centos:8</variable>
|
||||
<variable key="os-image" if="{[os-type-is-rhel]}">rockylinux/rockylinux:8</variable>
|
||||
|
||||
<variable key="user-guide-subtitle" if="{[os-type-is-debian]}">{[os-debian-title]}</variable>
|
||||
<variable key="user-guide-subtitle" if="{[os-type-is-rhel]}">{[os-rhel-title]}</variable>
|
||||
|
||||
<variable key="user-guide-os" if="{[os-type-is-debian]}">Debian/Ubuntu</variable>
|
||||
<variable key="user-guide-os" if="{[os-type-is-rhel]}">RHEL/CentOS 7-8</variable>
|
||||
<variable key="user-guide-os" if="{[os-type-is-rhel]}">RHEL 7-8</variable>
|
||||
|
||||
<variable key="pgbackrest-repo-path">/pgbackrest</variable>
|
||||
|
||||
|
@ -156,7 +156,7 @@ eval
|
||||
|
||||
if ($ARGV[0] eq 'doc')
|
||||
{
|
||||
if ($strVm eq VM_CO7 || $strVm eq VM_CO8)
|
||||
if ($strVm eq VM_RH7 || $strVm eq VM_RH8)
|
||||
{
|
||||
processBegin('LaTeX install');
|
||||
processExec(
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
20210902A:
|
||||
x86_64:
|
||||
co7: c4d02428812374ab6a22efa437499592ae9c5f08
|
||||
rh7: c4d02428812374ab6a22efa437499592ae9c5f08
|
||||
f33: 04b3353c5fcc859c9df528e2fa78e6ed73c6390b
|
||||
|
||||
20210901A:
|
||||
aarch64:
|
||||
u20: d81b5a7e496290710c4dbef7a7f07ae60ae9619f
|
||||
co7: a590bc38a94217b3bc9fe00a1051850c9deef145
|
||||
rh7: a590bc38a94217b3bc9fe00a1051850c9deef145
|
||||
|
@ -373,7 +373,7 @@ sub containerBuild
|
||||
|
||||
if ($$oVm{$strOS}{&VM_OS_BASE} eq VM_OS_BASE_RHEL)
|
||||
{
|
||||
if ($strOS eq VM_CO7)
|
||||
if ($strOS eq VM_RH7)
|
||||
{
|
||||
$strScript .=
|
||||
" yum -y install centos-release-scl-rh epel-release && \\\n";
|
||||
@ -476,7 +476,7 @@ sub containerBuild
|
||||
$strScript .=
|
||||
" rpm --import http://yum.postgresql.org/RPM-GPG-KEY-PGDG && \\\n";
|
||||
|
||||
if ($strOS eq VM_CO7)
|
||||
if ($strOS eq VM_RH7)
|
||||
{
|
||||
$strScript .=
|
||||
" rpm -ivh \\\n" .
|
||||
|
@ -293,7 +293,7 @@ sub run
|
||||
($self->{bProfile} ? " \\\n\t-pg" : '') .
|
||||
(vmArchBits($self->{oTest}->{&TEST_VM}) == 32 ? " \\\n\t-D_FILE_OFFSET_BITS=64" : '') .
|
||||
($self->{bDebug} ? '' : " \\\n\t-DNDEBUG") .
|
||||
($self->{oTest}->{&TEST_VM} eq VM_CO7 ? " \\\n\t-DDEBUG_EXEC_TIME" : '') .
|
||||
($self->{oTest}->{&TEST_VM} eq VM_RH7 ? " \\\n\t-DDEBUG_EXEC_TIME" : '') .
|
||||
($bCoverage ? " \\\n\t-DDEBUG_COVERAGE" : '') .
|
||||
($self->{bDebugTestTrace} && $self->{bDebug} ? " \\\n\t-DDEBUG_TEST_TRACE" : '') .
|
||||
(vmWithBackTrace($self->{oTest}->{&TEST_VM}) && $self->{bBackTrace} ? " \\\n\t-DWITH_BACKTRACE" : '') .
|
||||
|
@ -38,8 +38,6 @@ use constant VM_DEPRECATED => 'deprecat
|
||||
push @EXPORT, qw(VM_DEPRECATED);
|
||||
use constant VM_IMAGE => 'image';
|
||||
push @EXPORT, qw(VM_IMAGE);
|
||||
use constant VM_OS => 'os';
|
||||
push @EXPORT, qw(VM_OS);
|
||||
use constant VM_OS_BASE => 'os-base';
|
||||
push @EXPORT, qw(VM_OS_BASE);
|
||||
use constant VM_OS_REPO => 'os-repo';
|
||||
@ -63,16 +61,6 @@ use constant VM_OS_BASE_DEBIAN => 'debian';
|
||||
use constant VM_OS_BASE_RHEL => 'rhel';
|
||||
push @EXPORT, qw(VM_OS_BASE_RHEL);
|
||||
|
||||
####################################################################################################################################
|
||||
# Valid OS list
|
||||
####################################################################################################################################
|
||||
use constant VM_OS_CENTOS => 'centos';
|
||||
push @EXPORT, qw(VM_OS_CENTOS);
|
||||
use constant VM_OS_DEBIAN => 'debian';
|
||||
push @EXPORT, qw(VM_OS_DEBIAN);
|
||||
use constant VM_OS_UBUNTU => 'ubuntu';
|
||||
push @EXPORT, qw(VM_OS_DEBIAN);
|
||||
|
||||
####################################################################################################################################
|
||||
# Valid architecture list
|
||||
####################################################################################################################################
|
||||
@ -90,10 +78,10 @@ use constant VM_ALL => 'all';
|
||||
use constant VM_NONE => 'none';
|
||||
push @EXPORT, qw(VM_NONE);
|
||||
|
||||
use constant VM_CO7 => 'co7';
|
||||
push @EXPORT, qw(VM_CO7);
|
||||
use constant VM_CO8 => 'co8';
|
||||
push @EXPORT, qw(VM_CO8);
|
||||
use constant VM_RH7 => 'rh7';
|
||||
push @EXPORT, qw(VM_RH7);
|
||||
use constant VM_RH8 => 'rh8';
|
||||
push @EXPORT, qw(VM_RH8);
|
||||
use constant VM_F33 => 'f33';
|
||||
push @EXPORT, qw(VM_F33);
|
||||
use constant VM_U18 => 'u18';
|
||||
@ -104,13 +92,13 @@ use constant VM_D9 => 'd9';
|
||||
push @EXPORT, qw(VM_D9);
|
||||
|
||||
# Defines the vm that will be used for expect testing
|
||||
use constant VM_EXPECT => VM_CO7;
|
||||
use constant VM_EXPECT => VM_RH7;
|
||||
push @EXPORT, qw(VM_EXPECT);
|
||||
|
||||
# VM aliases for run matrices (numbered oldest to newest)
|
||||
use constant VM2 => VM_D9;
|
||||
push @EXPORT, qw(VM2);
|
||||
use constant VM3 => VM_CO7;
|
||||
use constant VM3 => VM_RH7;
|
||||
push @EXPORT, qw(VM3);
|
||||
use constant VM4 => VM_U20;
|
||||
push @EXPORT, qw(VM4);
|
||||
@ -125,7 +113,6 @@ my $oyVm =
|
||||
&VM_NONE =>
|
||||
{
|
||||
&VM_OS_BASE => VM_OS_BASE_DEBIAN,
|
||||
&VM_OS => VM_OS_UBUNTU,
|
||||
&VM_ARCH => VM_ARCH_AMD64,
|
||||
&VMDEF_COVERAGE_C => true,
|
||||
&VMDEF_PGSQL_BIN => '/usr/lib/postgresql/{[version]}/bin',
|
||||
@ -143,11 +130,10 @@ my $oyVm =
|
||||
],
|
||||
},
|
||||
|
||||
# CentOS 7
|
||||
&VM_CO7 =>
|
||||
# RHEL 7
|
||||
&VM_RH7 =>
|
||||
{
|
||||
&VM_OS_BASE => VM_OS_BASE_RHEL,
|
||||
&VM_OS => VM_OS_CENTOS,
|
||||
&VM_IMAGE => 'centos:7',
|
||||
&VM_ARCH => VM_ARCH_AMD64,
|
||||
&VMDEF_PGSQL_BIN => '/usr/pgsql-{[version]}/bin',
|
||||
@ -175,7 +161,6 @@ my $oyVm =
|
||||
&VM_F33 =>
|
||||
{
|
||||
&VM_OS_BASE => VM_OS_BASE_RHEL,
|
||||
&VM_OS => VM_OS_CENTOS,
|
||||
&VM_IMAGE => 'fedora:33',
|
||||
&VM_ARCH => VM_ARCH_AMD64,
|
||||
&VMDEF_PGSQL_BIN => '/usr/pgsql-{[version]}/bin',
|
||||
@ -203,7 +188,6 @@ my $oyVm =
|
||||
&VM_D9 =>
|
||||
{
|
||||
&VM_OS_BASE => VM_OS_BASE_DEBIAN,
|
||||
&VM_OS => VM_OS_DEBIAN,
|
||||
&VM_OS_REPO => 'stretch',
|
||||
&VM_IMAGE => 'i386/debian:9',
|
||||
&VM_ARCH => VM_ARCH_I386,
|
||||
@ -230,7 +214,6 @@ my $oyVm =
|
||||
&VM_U18 =>
|
||||
{
|
||||
&VM_OS_BASE => VM_OS_BASE_DEBIAN,
|
||||
&VM_OS => VM_OS_UBUNTU,
|
||||
&VM_OS_REPO => 'bionic',
|
||||
&VM_IMAGE => 'ubuntu:18.04',
|
||||
&VM_ARCH => VM_ARCH_AMD64,
|
||||
@ -273,7 +256,6 @@ my $oyVm =
|
||||
&VM_U20 =>
|
||||
{
|
||||
&VM_OS_BASE => VM_OS_BASE_DEBIAN,
|
||||
&VM_OS => VM_OS_UBUNTU,
|
||||
&VM_OS_REPO => 'focal',
|
||||
&VM_IMAGE => 'ubuntu:20.04',
|
||||
&VM_ARCH => VM_ARCH_AMD64,
|
||||
|
@ -81,7 +81,7 @@ test.pl [options]
|
||||
--no-gen do not run code generation
|
||||
--gen-check check that auto-generated files are correct (used in CI to detect changes)
|
||||
--code-count generate code counts
|
||||
--expect --vm=co7 --pg-version=9.6 --log-force
|
||||
--expect --vm=rh7 --pg-version=9.6 --log-force
|
||||
--no-valgrind don't run valgrind on C unit tests (saves time)
|
||||
--no-coverage don't run coverage on C unit tests (saves time)
|
||||
--no-coverage-report run coverage but don't generate coverage report (saves time)
|
||||
@ -108,7 +108,7 @@ test.pl [options]
|
||||
--quiet, -q equivalent to --log-level=off
|
||||
|
||||
VM Options:
|
||||
--vm docker container to build/test (e.g. co7)
|
||||
--vm docker container to build/test (e.g. rh7)
|
||||
--vm-build build Docker containers
|
||||
--vm-force force a rebuild of Docker containers
|
||||
--vm-out Show VM output (default false)
|
||||
@ -901,7 +901,7 @@ eval
|
||||
# Patch files in RHEL package builds
|
||||
#
|
||||
# Use these commands to create a new patch (may need to modify first line):
|
||||
# BRDIR=/backrest;BRVM=co7;BRPATCHFILE=${BRDIR?}/test/patch/rhel-package.patch
|
||||
# BRDIR=/backrest;BRVM=rh7;BRPATCHFILE=${BRDIR?}/test/patch/rhel-package.patch
|
||||
# PKDIR=${BRDIR?}/test/result/package/${BRVM}/SPECS
|
||||
# diff -Naur ${PKDIR?}.old ${PKDIR}.new > ${BRPATCHFILE?}
|
||||
my $strPackagePatch = "${strBackRestBase}/test/patch/rhel-package.patch";
|
||||
|
Loading…
x
Reference in New Issue
Block a user