From 56ad42765311dd399b3b76025ac639c98bcd6027 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 18 Aug 2021 10:52:35 -0400 Subject: [PATCH] Add variables for build paths in the user guide. This eliminates repetition of the build path so it can be changed more easily. Also create the build path explicitly rather than suggest that the user do it. --- doc/xml/user-guide.xml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/doc/xml/user-guide.xml b/doc/xml/user-guide.xml index b9658e630..77644a068 100644 --- a/doc/xml/user-guide.xml +++ b/doc/xml/user-guide.xml @@ -60,6 +60,10 @@ resource/fake-cert {[host-repo-path]}/doc/{[fake-cert-path-relative]} + + /build + {[build-path]}/pgbackrest-release-{[version]} + {[os-debian-pg-version]} {[os-debian-pg-version-min]} @@ -480,7 +484,7 @@ Copy <backrest/> binary from build host - scp {[host-build]}:/build/pgbackrest-release-{[version]}/src/pgbackrest /usr/bin + scp {[host-build]}:{[build-br-path]}/src/pgbackrest /usr/bin 2>&1 @@ -793,24 +797,30 @@

When building from source it is best to use a build host rather than building on production. Many of the tools required for the build should generally not be installed in production. consists of a single executable so it is easy to copy to a new host once it is built.

- Download version <id>{[version]}</id> of <backrest/> to pre-created <path>/build</path> path + Download version <id>{[version]}</id> of <backrest/> to <path>{[build-path]}</path> path - wget -q -O - + mkdir -p {[build-path]} + + + + + wget -q -O - {[github-url-release]}/{[version]}.tar.gz | - tar zx -C /build + tar zx -C {[build-path]} + - mkdir -p /build/pgbackrest-release-{[version]} + mkdir -p {[build-br-path]} - cp -r {[pgbackrest-repo-path]}/src /build/pgbackrest-release-{[version]} + cp -r {[pgbackrest-repo-path]}/src {[build-br-path]} - chown -R {[host-build-user]} /build/pgbackrest-release-{[version]} + chown -R {[host-build-user]} {[build-br-path]} @@ -842,7 +852,7 @@ Configure and compile <backrest/> - cd /build/pgbackrest-release-{[version]}/src && ./configure && make + cd {[build-br-path]}/src && ./configure && make -j 4