mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/boypt/openssh-rpms.git
synced 2026-09-20 08:03:38 +08:00
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:
@@ -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)
|
- **Perl bootstrap**: modern OpenSSL requires Perl >= 5.10, while 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.
|
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
|
Versions come from `version.env`. For usage, config variables, and
|
||||||
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.
|
supported distros see the root [README.md](../README.md).
|
||||||
|
|
||||||
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
|
|
||||||
|
|||||||
@@ -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)
|
- System Perl (>= 5.10) is sufficient, so unlike `el5/` no Perl
|
||||||
Building modern software on EL6 requires handling outdated system libraries. This spec file addresses these limitations to provide a secure, modern SSH server.
|
bootstrap is needed.
|
||||||
|
- OpenSSL is built statically and linked into the OpenSSH binaries
|
||||||
|
(`WITH_OPENSSL=2`); system OpenSSL stays untouched.
|
||||||
|
|
||||||
### 2. Static OpenSSL Compilation
|
Versions come from `version.env`. For usage and supported distros see
|
||||||
Modern versions of OpenSSH require newer OpenSSL libraries than those provided by EL6.
|
the root [README.md](../README.md).
|
||||||
* 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)
|
|
||||||
|
|||||||
@@ -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
|
- Installs systemd units into `%{_unitdir}`: `sshd.service`,
|
||||||
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.
|
`sshd.socket` (socket activation), `sshd@.service`, and
|
||||||
* **Unit File**: Installs a standard `sshd.service` unit file.
|
`sshd-keygen.service`.
|
||||||
* **Management**: Fully integrated with `systemctl` for service management.
|
- 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)
|
After installing the RPMs:
|
||||||
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:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Enable the service to start at boot
|
systemctl enable --now sshd
|
||||||
systemctl enable sshd
|
|
||||||
|
|
||||||
# Start the service immediately
|
|
||||||
systemctl start sshd
|
|
||||||
|
|
||||||
# Check status
|
|
||||||
systemctl status sshd
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Default Versions
|
Versions come from `version.env`. For usage and supported distros see
|
||||||
|
the root [README.md](../README.md).
|
||||||
* **OpenSSH**: (Defined in `version.env`, e.g., 10.2p1)
|
|
||||||
* **OpenSSL**: (Defined in `version.env`, e.g., 3.0.18)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user