mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/boypt/openssh-rpms.git
synced 2026-09-20 08:03:38 +08:00
add docs
This commit is contained in:
36
el5/README.md
Normal file
36
el5/README.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# OpenSSH RPM Build for EL5
|
||||
|
||||
This project provides an RPM Spec file designed to build a modern version of OpenSSH on legacy Enterprise Linux 5 (EL5) systems.
|
||||
|
||||
## Key Features
|
||||
|
||||
### 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.
|
||||
|
||||
### 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
|
||||
29
el6/README.md
Normal file
29
el6/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# OpenSSH RPM Build for EL6
|
||||
|
||||
This project provides an RPM Spec file designed to build a modern version of OpenSSH on Enterprise Linux 6 (EL6) systems.
|
||||
|
||||
## Key Features
|
||||
|
||||
### 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.
|
||||
|
||||
### 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)
|
||||
46
el7/README.md
Normal file
46
el7/README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# OpenSSH RPM Build for EL7+ (EL8/EL9)
|
||||
|
||||
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).
|
||||
|
||||
## Key Features
|
||||
|
||||
### 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.
|
||||
|
||||
### 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:
|
||||
|
||||
```bash
|
||||
# Enable the service to start at boot
|
||||
systemctl enable sshd
|
||||
|
||||
# Start the service immediately
|
||||
systemctl start sshd
|
||||
|
||||
# Check status
|
||||
systemctl status sshd
|
||||
```
|
||||
|
||||
## Default Versions
|
||||
|
||||
* **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