Modernize the Debian and Ubuntu download pages
authorChristoph Berg <myon@debian.org>
Tue, 16 Apr 2024 10:42:31 +0000 (12:42 +0200)
committerChristoph Berg <myon@debian.org>
Tue, 16 Apr 2024 10:42:31 +0000 (12:42 +0200)
Mention apt.postgresql.org.sh first. Use `deb [signed-by=key]` instead
of apt-key. Also sync the pages for minimal diff.

templates/pages/download/linux/debian.html
templates/pages/download/linux/ubuntu.html

index a866e0b64361cdf223d5bafd4893acc55d8b4cbb..919c5c924910dd01e5136217cca850914e8c6310 100644 (file)
@@ -7,13 +7,22 @@
 
 <h1>Linux downloads (Debian) <img class="logo" src="/media/img/debian.svg" alt="Debian Logo" /></h1>
 <p>
-PostgreSQL is available in all Debian versions by default. However, the
-stable versions of Debians "snapshot" a specific version of PostgreSQL
-that is then supported throughout the lifetime of that Debian version.
-The PostgreSQL project also maintains an <a href="#apt">apt repository</a> with all supported
+PostgreSQL is available in all Debian versions by default. However, Debian
+"snapshots" a specific version of PostgreSQL that is then supported throughout
+the lifetime of that Debian version.
+The PostgreSQL project maintains an <a href="#apt">Apt repository</a> with all supported
 of PostgreSQL available.
 </p>
 
+<h2>Included in Distribution</h2>
+<p>
+Debian includes PostgreSQL by default. To install PostgreSQL on Debian,
+use the <code>apt</code> (or other apt-driving) command:
+</p>
+<pre class="code">
+apt install postgresql
+</pre>
+
 <a name="apt"></a>
 <h2>PostgreSQL Apt Repository</h2>
 <p>
@@ -24,8 +33,7 @@ updates for all supported versions of PostgreSQL throughout the support
 <a href="/support/versioning/">lifetime</a> of PostgreSQL.
 </p>
 <p>
-The PostgreSQL apt repository supports the currently supported stable
-versions of Debian:
+The PostgreSQL Apt repository supports the current versions of Debian:
 </p>
 <ul>
   <li>bookworm (12.x)</li>
@@ -33,47 +41,56 @@ versions of Debian:
   <li>buster (10.x)</li>
   <li>sid (unstable)</li>
 </ul>
-<p>on the following architectures:</p>
+<p>
+on the following architectures:
+</p>
 <ul>
   <li>amd64</li>
   <li>arm64</li>
   <li>i386 (buster and older)</li>
   <li>ppc64el</li>
+  <li>s390x</li>
 </ul>
+
 <p>
-To use the apt repository, follow these steps:
+Automated repository configuration:
 </p>
 
 <div class="pg-script-container">
-    <pre id="script-box" class="code"># Create the file repository configuration:
-sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+    <pre id="script-box" class="code">sudo apt install -y postgresql-common
+sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh</pre>
+    <button id="copy-btn" class="pg-script-copy-btn">Copy Script</button>
+</div>
 
-# Import the repository signing key:
-wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
+<p>
+To manually configure the Apt repository, follow these steps:
+</p>
+
+<div class="pg-script-container">
+    <pre id="script-box" class="code"># Import the repository signing key:
+sudo apt install curl ca-certificates
+sudo install -d /usr/share/postgresql-common/pgdg
+sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
+
+# Create the repository configuration file:
+sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
 
 # Update the package lists:
-sudo apt-get update
+sudo apt update
 
-# Install the latest version of PostgreSQL.
-# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
-sudo apt-get -y install postgresql</pre>
+# Install the latest version of PostgreSQL:
+# If you want a specific version, use 'postgresql-16' or similar instead of 'postgresql'
+sudo apt -y install postgresql</pre>
     <button id="copy-btn" class="pg-script-copy-btn">Copy Script</button>
 </div>
 
 <p>
 For more information about the apt repository, including answers to frequent
-questions, please see the apt page on
-<a href="https://wiki.postgresql.org/wiki/Apt" target="_blank" rel="noopener">the wiki</a>.
+questions, please see the
+<a href="https://wiki.postgresql.org/wiki/Apt" target="_blank" rel="noopener">PostgreSQL Apt Repository wiki page</a>.
 </p>
 
-<h2>Included in distribution</h2>
-<p>
-Debian includes PostgreSQL by default. To install PostgreSQL on
-Debian, use the <code>apt-get</code> (or other apt-driving) command:
-</p>
-<pre class="code">
-  apt-get install postgresql-12
-</pre>
+<h2>Packages</h2>
 <p>
 The repository contains many different packages including third party
 addons. The most common and important packages are (substitute the
@@ -82,19 +99,23 @@ version number as required):
 <table class="table table-striped">
   <tbody>
     <tr>
-     <th scope="row">postgresql-client-12</th>
+     <th scope="row">postgresql-client-16</th>
      <td>client libraries and client binaries</td>
     </tr>
     <tr>
-     <th scope="row">postgresql-12</th>
+     <th scope="row">postgresql-16</th>
      <td>core database server</td>
     </tr>
+    <tr>
+     <th scope="row">postgresql-doc-16</th>
+     <td>documentation</td>
+    </tr>
     <tr>
      <th scope="row">libpq-dev</th>
      <td>libraries and headers for C language frontend development</td>
     </tr>
     <tr>
-     <th scope="row">postgresql-server-dev-12</th>
+     <th scope="row">postgresql-server-dev-16</th>
      <td>libraries and headers for C language backend development</td>
     </tr>
   </tbody>
index 620f73a21391c2fb3b959792ecafe4bf61bef623..f721ba306fd55884df9fe3ce122523a162fae5bb 100644 (file)
@@ -7,13 +7,23 @@
 
 <h1>Linux downloads (Ubuntu) <img class="logo" src="/media/img/ubuntu.svg" alt="Ubuntu Logo" /></h1>
 <p>
-PostgreSQL is available in all Ubuntu versions by default. However,
-Ubuntu "snapshots" a specific version of PostgreSQL that is then
-supported throughout the lifetime of that Ubuntu version. Other
-versions of PostgreSQL are available through the PostgreSQL apt
-repository.
+PostgreSQL is available in all Ubuntu versions by default. However, Ubuntu
+"snapshots" a specific version of PostgreSQL that is then supported throughout
+the lifetime of that Ubuntu version.
+The PostgreSQL project maintains an <a href="#apt">Apt repository</a> with all supported
+of PostgreSQL available.
 </p>
 
+<h2>Included in Distribution</h2>
+<p>
+Ubuntu includes PostgreSQL by default. To install PostgreSQL on Ubuntu,
+use the <code>apt</code> (or other apt-driving) command:
+</p>
+<pre class="code">
+apt install postgresql
+</pre>
+
+<a name="apt"></a>
 <h2>PostgreSQL Apt Repository</h2>
 <p>
 If the version included in your version of Ubuntu is not the one you want,
@@ -26,8 +36,8 @@ updates for all supported versions of PostgreSQL throughout the support
 The PostgreSQL Apt Repository supports the current versions of Ubuntu:
 </p>
 <ul>
+  <li>noble (24.04, LTS)</li>
   <li>mantic (23.10, non-LTS)</li>
-  <li>lunar (23.04, non-LTS)</li>
   <li>jammy (22.04, LTS)</li>
   <li>focal (20.04, LTS)</li>
 </ul>
@@ -38,42 +48,48 @@ on the following architectures:
   <li>amd64</li>
   <li>arm64 (LTS releases only)</li>
   <li>ppc64el (LTS releases only)</li>
+  <li>s390x (LTS releases only)</li>
 </ul>
 
 <p>
-To use the apt repository, follow these steps:
+Automated repository configuration:
+</p>
+
+<div class="pg-script-container">
+    <pre id="script-box" class="code">sudo apt install -y postgresql-common
+sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh</pre>
+    <button id="copy-btn" class="pg-script-copy-btn">Copy Script</button>
+</div>
+
+<p>
+To manually configure the Apt repository, follow these steps:
 </p>
 
 <div class="pg-script-container">
-    <pre id="script-box" class="code"># Create the file repository configuration:
-sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+    <pre id="script-box" class="code"># Import the repository signing key:
+sudo apt install curl ca-certificates
+sudo install -d /usr/share/postgresql-common/pgdg
+sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
 
-# Import the repository signing key:
-wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
+# Create the repository configuration file:
+sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
 
 # Update the package lists:
-sudo apt-get update
+sudo apt update
 
-# Install the latest version of PostgreSQL.
-# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
-sudo apt-get -y install postgresql</pre>
+# Install the latest version of PostgreSQL:
+# If you want a specific version, use 'postgresql-16' or similar instead of 'postgresql'
+sudo apt -y install postgresql</pre>
     <button id="copy-btn" class="pg-script-copy-btn">Copy Script</button>
 </div>
 
 <p>
 For more information about the apt repository, including answers to frequent
-questions, please see the <a href="https://wiki.postgresql.org/wiki/Apt" target="_blank" rel="noopener">PostgreSQL Apt Repository</a> page on
-<a href="https://wiki.postgresql.org/wiki/Apt" target="_blank" rel="noopener">the wiki</a>.
+questions, please see the
+<a href="https://wiki.postgresql.org/wiki/Apt" target="_blank" rel="noopener">PostgreSQL Apt Repository wiki page</a>.
 </p>
 
-<h2>Included in distribution</h2>
-<p>
-Ubuntu includes PostgreSQL by default. To install PostgreSQL on
-Ubuntu, use the <em>apt-get</em> (or other apt-driving) command:
-</p>
-<code>
-apt-get install postgresql-12
-</code>
+<h2>Packages</h2>
 <p>
 The repository contains many different packages including third party
 addons. The most common and important packages are (substitute the
@@ -82,19 +98,23 @@ version number as required):
 <table class="table table-striped">
   <tbody>
     <tr>
-     <th scope="row">postgresql-client-12</th>
+     <th scope="row">postgresql-client-16</th>
      <td>client libraries and client binaries</td>
     </tr>
     <tr>
-     <th scope="row">postgresql-12</th>
+     <th scope="row">postgresql-16</th>
      <td>core database server</td>
     </tr>
+    <tr>
+     <th scope="row">postgresql-doc-16</th>
+     <td>documentation</td>
+    </tr>
     <tr>
      <th scope="row">libpq-dev</th>
      <td>libraries and headers for C language frontend development</td>
     </tr>
     <tr>
-     <th scope="row">postgresql-server-dev-12</th>
+     <th scope="row">postgresql-server-dev-16</th>
      <td>libraries and headers for C language backend development</td>
     </tr>
   </tbody>