一个伪linux粉丝的blog

  1. 首页
  2. network
  3. 正文

openssh-rpm-pkg

2月 27, 2021 436点热度 0人点赞 0条评论

本文为12月第二周网站忘记续费后从webcache里面找回的,丢失图片.

这是一个简单记录,代码非原创,属于升级openssh 8.4 过程中 自行打centos下rpm包的过渡产物,属于就是“为了这点醋,包的这顿饺子”,故事之  --openssh 8.4 rpm 打包篇.

重点是注意先升级本地打包环境的openssl.

代码如下,大概只改了openssl版本吧。

#!/bin/bash
set -ex
yum install rpm-build zlib-devel openssl-devel gcc perl-devel pam-devel unzip -y
mkdir -p /root/rpmbuild/{SOURCES,SPECS}
cd /root/rpmbuild/SOURCES
if [[ ! -f "openssh-8.4p1.tar.gz" ]];then
wget -c http://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.4p1.tar.gz
fi
if [[ ! -f "x11-ssh-askpass-1.2.4.1.tar.gz" ]];then
wget https://src.fedoraproject.org/repo/pkgs/openssh/x11-ssh-askpass-1.2.4.1.tar.gz/8f2e41f3f7eaa8543a2440454637f3c3/x11-ssh-askpass-1.2.4.1.tar.gz
fi
tar zxvf openssh-8.4p1.tar.gz openssh-8.4p1/contrib/redhat/openssh.spec
mv openssh-8.4p1/contrib/redhat/openssh.spec ../SPECS/
chown sshd:sshd /root/rpmbuild/SPECS/openssh.spec
cp /root/rpmbuild/SPECS/openssh.spec /root/rpmbuild/SPECS/openssh.spec_def
sed -i -e "s/%global no_gnome_askpass 0/%global no_gnome_askpass 1/g" /root/rpmbuild/SPECS/openssh.spec
sed -i -e "s/%global no_x11_askpass 0/%global no_x11_askpass 1/g" /root/rpmbuild/SPECS/openssh.spec
sed -i -e "s/^BuildRequires: openssl-devel < 1.1/#BuildRequires: openssl-devel < 1.1/g" /root/rpmbuild/SPECS/openssh.spec
sed -i -e '/with-privsep-path/a\ --with-openssl-includes=/usr/local/openssl/include \\\n --with-ssl-dir=/usr/local/openssl \\' /root/rpmbuild/SPECS/openssh.spec
cd /root/rpmbuild/SPECS/
rpmbuild -ba openssh.spec

这样能打出几个漂亮的 openssh8.4的包。
最终效果 # ssh -V
OpenSSH_8.4p1, OpenSSL 1.1.1j 16 Feb 2021

 

ps. 最新版 openssh原始包下载地址 https://www.openssh.com/portable.html

里面选一个自己觉得速度还行的镜像 ,如  https://mirrors.mit.edu/pub/OpenBSD/OpenSSH/portable/ 

当前最新版 8.6

https://mirrors.mit.edu/pub/OpenBSD/OpenSSH/portable/openssh-8.6p1.tar.gz

相关文章:

  1. 小站已经被alexa收录啦,哈哈
  2. 普通usb ZC0301 WebCam成功设置为Web Cam Server
  3. 谷歌地图偏差
  4. Sedo中国主题域名活动
标签: 暂无
最后更新:12月 19, 2021

wanjie

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

取消回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据。

归档
分类
  • network / 324篇
  • Uncategorized / 116篇
  • unix/linux / 114篇
  • 业界资讯 / 38篇
  • 公司杂事 / 11篇
  • 数码影像 / 12篇
  • 美剧 / 3篇
  • 美图共赏 / 20篇
  • 英语学习 / 3篇
标签聚合
Google Google Voice jira Android d90 Nginx dreamhost空间 邮件归档 k8s 刷机 wget dreamhost Google Adwords Opera Mini kernel VPS iMac 泰国 网通 中国电信 brew 虚拟主机 Linux gitlab debian ldap nexus 网站运营 Ubuntu docker

COPYRIGHT © 2008-2022 wanjie.info. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang