# openssl **Repository Path**: yangqingv/openssl ## Basic Information - **Project Name**: openssl - **Description**: fpm 是一个软件包管理器,目标是使构建软件包(如 rpm、deb、OSX 软件包等)变得容易且快速。 此仓库使用 fpm 构建软件包OpenSSL的RPM包。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-07 - **Last Updated**: 2022-07-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # openssl #### 介绍 fpm 是一个软件包管理器,目标是使构建软件包(如 rpm、deb、OSX 软件包等)变得容易且快速。 此仓库使用 fpm 构建软件包OpenSSL的RPM包,OpenSSH引用新的OpenSSL库。 #### 软件下载和准备 Ruby下载:[官方网站](https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.gz) OpenSSL下载:[官方网站](https://www.openssl.org/source/openssl-1.1.1k.tar.gz) OpenSSH下载:[官方网站](https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.5p1.tar.gz) #### 编译环境准备 1. Ruby源码编译安装和fpm环境准备 ```bash # 依赖包 yum install openssl-devel # ruby安装 cd /usr/local/src/ wget https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.1.tar.gz tar xf ruby-3.0.1.tar.gz cd ruby-3.0.1/ ./configure --prefix=/usr/local/ make -j8 make install ruby -v # Ruby 的默认源更换: gem source -r https://rubygems.org/ gem source -a https://gems.ruby-china.com/ # 安装fpm gem install fpm ``` 2. OpenSSL源码编译 ```bash wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz tar zxvf openssl-1.1.1k.tar.gz cd openssl-1.1.1k/ ./config --prefix=/root/build/usr --openssldir=/root/build/etc/pki/tls make -j8 make install ``` 3. OpenSSH构建软件 ```bash # 安装依赖库 yum install rpm-build gcc gcc-c++ glibc glibc-devel pcre pcre-devel zlib zlib-devel make wget krb5-devel pam-devel libX11-devel xmkmf libXt-devel initscripts libXt-devel imake gtk2-devel # 或 yum-builddep rpmbuild/SPECS/openssh-8.5p1.spec # 构建软件 rpmbuild -bb rpmbuild/SPECS/openssh-8.5p1.spec ``` 4. fpm构建软件OpenSSL ```bash # 修改主机名 hostnamectl set-hostname build.sys.redflag-os.com # fpm构建 fpm -f -s dir -t rpm -n openssl -v 1.1.1k --iteration 1.axs7 -C /root/buildroot/openssl/ -p /root --verbose --epoch '1' \ -d 'openssl-libs(x86-64)' \ --provides 'openssl = 1.1.1k-1.axs7 openssl(x86-64) = 1.1.1k-1.axs7' \ --category 'System Environment/Libraries' \ --license 'OpenSSL and ASL 2.0' \ -m 'RedFlag BuildSystem ' \ --vendor RedFlag --url 'https://www.openssl.org/' \ --rpm-summary 'Utilities from the general purpose cryptography library with TLS implementation' \ --description 'The OpenSSL toolkit provides support for secure communications betweenmachines. OpenSSL includes a certificate management tool and sharedlibraries which provide various cryptographic algorithms and protocols.' \ --no-rpm-sign usr/bin usr/share fpm -f -s dir -t rpm -n openssl-libs -v 1.1.1k --iteration 2.axs7 -C /root/buildroot/openssl-libs/ -p /root --verbose --epoch '1' \ --provides 'config(openssl-libs) = 1.1.1k-1.axs7 libcrypto.so.10()(64bit) libcrypto.so.10(OPENSSL_1.0.1)(64bit) libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit) libcrypto.so.10(OPENSSL_1.0.2)(64bit) libcrypto.so.10(libcrypto.so.10)(64bit) libssl.so.10()(64bit) libssl.so.10(OPENSSL_1.0.1)(64bit) libssl.so.10(OPENSSL_1.0.1_EC)(64bit) libssl.so.10(OPENSSL_1.0.2)(64bit) libssl.so.10(libssl.so.10)(64bit) libcrypto.so.1.1()(64bit) libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) libcrypto.so.1.1(OPENSSL_1_1_0a)(64bit) libcrypto.so.1.1(OPENSSL_1_1_0c)(64bit) libcrypto.so.1.1(OPENSSL_1_1_0d)(64bit) libcrypto.so.1.1(OPENSSL_1_1_0f)(64bit) libcrypto.so.1.1(OPENSSL_1_1_0g)(64bit) libcrypto.so.1.1(OPENSSL_1_1_0h)(64bit) libcrypto.so.1.1(OPENSSL_1_1_0i)(64bit) libcrypto.so.1.1(OPENSSL_1_1_0j)(64bit) libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) libcrypto.so.1.1(OPENSSL_1_1_1b)(64bit) libcrypto.so.1.1(OPENSSL_1_1_1c)(64bit) libcrypto.so.1.1(OPENSSL_1_1_1d)(64bit) libcrypto.so.1.1(OPENSSL_1_1_1e)(64bit) libcrypto.so.1.1(OPENSSL_1_1_1h)(64bit) libssl.so.1.1()(64bit) libssl.so.1.1(OPENSSL_1_1_0)(64bit) libssl.so.1.1(OPENSSL_1_1_0d)(64bit) libssl.so.1.1(OPENSSL_1_1_1)(64bit) libssl.so.1.1(OPENSSL_1_1_1a)(64bit) openssl-fips = 1.1.1k-1.axs7 openssl-libs = 1.1.1k-1.axs7 openssl-libs(x86-64) = 1.1.1k-1.axs7' \ --after-install after-install.sh \ --category 'System Environment/Libraries' \ --license 'OpenSSL and ASL 2.0' \ -m 'RedFlag BuildSystem ' \ --vendor RedFlag --url 'https://www.openssl.org/' \ --rpm-summary 'Utilities from the general purpose cryptography library with TLS implementation' \ --description 'The OpenSSL toolkit provides support for secure communications betweenmachines. OpenSSL includes a certificate management tool and sharedlibraries which provide various cryptographic algorithms and protocols.' \ --no-rpm-sign etc/pki/tls usr/lib64 usr/share fpm -f -s dir -t rpm -n openssl-devel -v 1.1.1k --iteration 2.axs7 -C /root/buildroot/openssl-devel/ -p /root --verbose --epoch '1' \ -d '/usr/bin/pkg-config libcrypto.so.1.1()(64bit) libssl.so.1.1()(64bit) openssl-libs(x86-64) = 1.1.1k-1.axs7 pkgconfig pkgconfig(libcrypto) pkgconfig(libssl)' \ --provides 'openssl-devel = 1.1.1k-1.axs7 openssl-devel(x86-64) = 1.1.1k-1.axs7 pkgconfig(libcrypto) = 1.1.1k pkgconfig(libssl) = 1.1.1k pkgconfig(openssl) = 1.1.1k' \ --category 'System Environment/Libraries' \ --license 'OpenSSL and ASL 2.0' \ -m 'RedFlag BuildSystem ' \ --vendor RedFlag --url 'https://www.openssl.org/' \ --rpm-summary 'Utilities from the general purpose cryptography library with TLS implementation' \ --description 'The OpenSSL toolkit provides support for secure communications betweenmachines. OpenSSL includes a certificate management tool and sharedlibraries which provide various cryptographic algorithms and protocols.' \ --no-rpm-sign usr/include usr/lib64 usr/share # 参数详解 -s 指定INPUT的数据类型 -t 指定需要制作成什么包,可选项有(deb, rpm, solaris, etc) -n 包名 --iteration 也就是rpm包里面的release -C 就是打包的相对路径,类似于buildroot --after-install 安装包后要运行的脚本 --provides 这个包提供了什么 --epoch 这个包的时间值 ```