一个伪linux粉丝的blog

  1. 首页
  2. network
  3. 正文

openssh-rpm-pkg

27 2 月, 2021 972点热度 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中国主题域名活动
标签: 暂无
最后更新:19 12 月, 2021

wanjie

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

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

This site uses Akismet to reduce spam. Learn how your comment data is processed.

归档
分类
  • network / 332篇
  • Uncategorized / 116篇
  • unix/linux / 121篇
  • 业界资讯 / 38篇
  • 公司杂事 / 11篇
  • 数码影像 / 12篇
  • 美剧 / 3篇
  • 美图共赏 / 21篇
  • 英语学习 / 3篇
标签聚合
虚拟主机 docker jira k8s ssh squid Google Voice 天翼live 浏览器 gitlab 网站运营 dreamhost空间 google-chrome nexus debian Nginx kubectl Ubuntu ldap kernel openssl postgres 泰国 VPS wget dreamhost 邮件归档 Google deepseek d90

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

Theme Kratos Made By Seaton Jiang