docs: trim el5/el6/el7 READMEs to per-dir specifics

Drop stale hardcoded versions (point to version.env) and content already
covered by the root README; fix el7 socket-activation wording, document
the openssh.initv.spec variant and SPECFILE switch.
This commit is contained in:
boypt
2026-08-24 14:14:30 +08:00
parent 370f4310df
commit 5235c2cf1d
3 changed files with 39 additions and 95 deletions

View File

@@ -1,36 +1,17 @@
# OpenSSH RPM Build for EL5
# EL5 Build Tree (`el5/`)
This project provides an RPM Spec file designed to build a modern version of OpenSSH on legacy Enterprise Linux 5 (EL5) systems.
RPM spec for backporting OpenSSH on Enterprise Linux 5 (SysVinit).
## Key Features
## Notes
### 1. Legacy Environment Support (EL5)
Building modern software on EL5 is challenging due to outdated system libraries and build tools. This spec file contains specific logic to overcome these limitations without replacing core system packages.
- **Perl bootstrap**: modern OpenSSL requires Perl >= 5.10, while EL5
ships Perl 5.8. If the system Perl is too old, a private Perl
(`PERLSRC` in `version.env`) is built inside the build tree and used
only to compile OpenSSL; it is neither packaged nor installed.
`compile.sh` adds `PERLSRC` to the source list automatically for this
directory.
- **Toolchain**: built with `CC=gcc44`; OpenSSL is linked statically
(`WITH_OPENSSL=2`).
### 2. Perl Bootstrap
Modern versions of OpenSSL (which are required for modern OpenSSH) depend on Perl version 5.10.0 or higher for their build system. EL5 repositories typically provide Perl 5.8, which is insufficient.
To address this, the spec file implements a **Perl bootstrap process**:
* It checks the version of the system's Perl.
* If the system Perl is too old, it compiles a modern version of Perl (default: 5.38.2) from source inside the build directory.
* This custom Perl is used exclusively during the build process to compile OpenSSL and is not installed into the final RPM or the system.
### 3. Static OpenSSL Compilation
Using the bootstrapped Perl, the spec file compiles a modern version of OpenSSL (default: 3.0.8).
* OpenSSL is built statically within the build tree.
* It is linked directly into the OpenSSH binaries.
* This ensures the new OpenSSH has access to modern cryptography (like TLS 1.3 support) while leaving the system's original OpenSSL libraries untouched to prevent dependency conflicts.
### 4. Final OpenSSH Build
The process culminates in building OpenSSH (default: 9.6p1), linked against the custom-built static OpenSSL library.
## Build Flow Summary
1. **Detect Perl Version**: If system Perl < 5.10, build custom Perl.
2. **Build OpenSSL**: Use the custom Perl to configure and build OpenSSL.
3. **Build OpenSSH**: Configure OpenSSH to use the custom OpenSSL headers and libraries.
## Default Versions
* **OpenSSH**: 9.6p1
* **OpenSSL**: 3.0.8
* **Perl**: 5.38.2
Versions come from `version.env`. For usage, config variables, and
supported distros see the root [README.md](../README.md).

View File

@@ -1,29 +1,13 @@
# OpenSSH RPM Build for EL6
# EL6 Build Tree (`el6/`)
This project provides an RPM Spec file designed to build a modern version of OpenSSH on Enterprise Linux 6 (EL6) systems.
RPM spec for backporting OpenSSH on Enterprise Linux 6 (SysVinit).
## Key Features
## Notes
### 1. Legacy Environment Support (EL6)
Building modern software on EL6 requires handling outdated system libraries. This spec file addresses these limitations to provide a secure, modern SSH server.
- System Perl (>= 5.10) is sufficient, so unlike `el5/` no Perl
bootstrap is needed.
- OpenSSL is built statically and linked into the OpenSSH binaries
(`WITH_OPENSSL=2`); system OpenSSL stays untouched.
### 2. Static OpenSSL Compilation
Modern versions of OpenSSH require newer OpenSSL libraries than those provided by EL6.
* The spec file compiles a modern version of OpenSSL from source within the build environment.
* **Static Linking**: OpenSSL is built statically and linked directly into the OpenSSH binaries.
* **System Integrity**: This ensures the new OpenSSH has access to modern cryptography while leaving the system's original OpenSSL libraries untouched to prevent dependency conflicts.
### 3. System Perl
Unlike the EL5 build process, EL6 provides a version of Perl (5.10+) that is sufficient for building modern OpenSSL. Therefore, the **Perl bootstrap process is not required**, and the system Perl is used directly.
## Build Flow Summary
1. **Build OpenSSL**: Use system Perl to configure and build OpenSSL statically.
2. **Build OpenSSH**: Configure OpenSSH to use the custom OpenSSL headers and libraries.
## Default Versions
Versions are typically defined in the `version.env` file in the project root.
* **OpenSSH**: (e.g., 10.2p1)
* **OpenSSL**: (e.g., 3.0.18)
Versions come from `version.env`. For usage and supported distros see
the root [README.md](../README.md).

View File

@@ -1,46 +1,25 @@
# OpenSSH RPM Build for EL7+ (EL8/EL9)
# EL7+ Build Tree (`el7/`)
This project provides an RPM Spec file designed to build a modern version of OpenSSH on Enterprise Linux 7 (EL7). Thanks to the implementation of **systemd**, this configuration is also compatible with newer distributions like EL8 and EL9 (including RHEL, CentOS, Rocky Linux, and AlmaLinux).
RPM spec for backporting OpenSSH on Enterprise Linux 7 and newer
(EL7/EL8/EL9 incl. RHEL, CentOS, Rocky, AlmaLinux) using native systemd
services.
## Key Features
## Notes
### 1. Systemd Native Support
Unlike the EL5 and EL6 builds which rely on SysVinit scripts (`/etc/init.d/sshd`), this spec file configures OpenSSH to run as a native systemd service.
* **Unit File**: Installs a standard `sshd.service` unit file.
* **Management**: Fully integrated with `systemctl` for service management.
- Installs systemd units into `%{_unitdir}`: `sshd.service`,
`sshd.socket` (socket activation), `sshd@.service`, and
`sshd-keygen.service`.
- Two specs available: `openssh.spec` (default, systemd) and
`openssh.initv.spec` (SysVinit), selected via the `SPECFILE` env var.
- OpenSSL mode: system OpenSSL >= 3 is used directly
(`WITH_OPENSSL=1`), otherwise OpenSSL is built statically
(`WITH_OPENSSL=2`). Override via env, see `version.env`.
### 2. Forward Compatibility (EL8/EL9)
Because EL7, EL8, and EL9 all share the systemd architecture, this spec file allows the same source configuration to be built and deployed across these major versions with minimal or no changes.
### 3. Static OpenSSL Compilation
To support the latest OpenSSH features (which require newer cryptography than what EL7 provides by default), this build process:
* Compiles a modern version of OpenSSL (e.g., 3.0.x) from source.
* Links it **statically** into the OpenSSH binaries.
* Ensures no conflict with the system's default OpenSSL libraries.
## Systemd Integration Details
The spec file utilizes specific RPM macros and configurations to handle the systemd lifecycle:
* **Unit Installation**: The `sshd.service` file is installed into `%{_unitdir}` (typically `/usr/lib/systemd/system/`).
* **Socket Activation**: (If configured) The spec may also include support for `sshd.socket` for on-demand activation, though the standard service is the default.
## Usage
After installing the generated RPM, manage the service using standard systemd commands:
After installing the RPMs:
```bash
# Enable the service to start at boot
systemctl enable sshd
# Start the service immediately
systemctl start sshd
# Check status
systemctl status sshd
systemctl enable --now sshd
```
## Default Versions
* **OpenSSH**: (Defined in `version.env`, e.g., 10.2p1)
* **OpenSSL**: (Defined in `version.env`, e.g., 3.0.18)
Versions come from `version.env`. For usage and supported distros see
the root [README.md](../README.md).