当前位置:   article > 正文

CentOS7自制openssh rpm包(含ssh-copy-id命令)—— 筑梦之路_centos7 openssh rpm

centos7 openssh rpm

背景:新版的openssh源码里面编译安装,已经将ssh-copy-id命令放到了子目录contrib,而不会默认安装,而此命令在使用中比较实用,比如各主机之间的免密认证

  1. %global ver 9.0p1
  2. %global rel 1%{?dist}
  3. # OpenSSH privilege separation requires a user & group ID
  4. %global sshd_uid 74
  5. %global sshd_gid 74
  6. # Version of ssh-askpass
  7. %global aversion 1.2.4.1
  8. # Do we want to disable building of x11-askpass? (1=yes 0=no)
  9. %global no_x11_askpass 0
  10. # Do we want to disable building of gnome-askpass? (1=yes 0=no)
  11. %global no_gnome_askpass 0
  12. # Do we want to link against a static libcrypto? (1=yes 0=no)
  13. %global static_libcrypto 0
  14. # Do we want smartcard support (1=yes 0=no)
  15. %global scard 0
  16. # Use GTK2 instead of GNOME in gnome-ssh-askpass
  17. %global gtk2 1
  18. # Use build6x options for older RHEL builds
  19. # RHEL 7 not yet supported
  20. %if 0%{?rhel} > 6
  21. %global build6x 0
  22. %else
  23. %global build6x 1
  24. %endif
  25. %if 0%{?fedora} >= 26
  26. %global compat_openssl 1
  27. %else
  28. %global compat_openssl 0
  29. %endif
  30. # Do we want kerberos5 support (1=yes 0=no)
  31. %global kerberos5 1
  32. # Reserve options to override askpass settings with:
  33. # rpm -ba|--rebuild --define 'skip_xxx 1'
  34. %{?skip_x11_askpass:%global no_x11_askpass 1}
  35. %{?skip_gnome_askpass:%global no_gnome_askpass 1}
  36. # Add option to build without GTK2 for older platforms with only GTK+.
  37. # RedHat <= 7.2 and Red Hat Advanced Server 2.1 are examples.
  38. # rpm -ba|--rebuild --define 'no_gtk2 1'
  39. %{?no_gtk2:%global gtk2 0}
  40. # Is this a build for RHL 6.x or earlier?
  41. %{?build_6x:%global build6x 1}
  42. # If this is RHL 6.x, the default configuration has sysconfdir in /usr/etc.
  43. %if %{build6x}
  44. %global _sysconfdir /etc
  45. %endif
  46. # Options for static OpenSSL link:
  47. # rpm -ba|--rebuild --define "static_openssl 1"
  48. %{?static_openssl:%global static_libcrypto 1}
  49. # Options for Smartcard support: (needs libsectok and openssl-engine)
  50. # rpm -ba|--rebuild --define "smartcard 1"
  51. %{?smartcard:%global scard 1}
  52. # Is this a build for the rescue CD (without PAM)? (1=yes 0=no)
  53. %global rescue 0
  54. %{?build_rescue:%global rescue 1}
  55. # Turn off some stuff for resuce builds
  56. %if %{rescue}
  57. %global kerberos5 0
  58. %endif
  59. Summary: The OpenSSH implementation of SSH protocol version 2.
  60. Name: openssh
  61. Version: %{ver}
  62. %if %{rescue}
  63. Release: %{rel}rescue
  64. %else
  65. Release: %{rel}
  66. %endif
  67. URL: https://www.openssh.com/portable.html
  68. Source0: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
  69. Source1: http://www.jmknoble.net/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
  70. License: BSD
  71. Group: Applications/Internet
  72. BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
  73. Obsoletes: ssh
  74. %if %{build6x}
  75. PreReq: initscripts >= 5.00
  76. %else
  77. Requires: initscripts >= 5.20
  78. %endif
  79. BuildRequires: perl
  80. %if %{compat_openssl}
  81. BuildRequires: compat-openssl10-devel
  82. %else
  83. BuildRequires: openssl-devel >= 1.0.1
  84. #BuildRequires: openssl-devel < 1.1
  85. %endif
  86. BuildRequires: /bin/login
  87. %if ! %{build6x}
  88. BuildRequires: glibc-devel, pam
  89. %else
  90. BuildRequires: /usr/include/security/pam_appl.h
  91. %endif
  92. %if ! %{no_x11_askpass}
  93. BuildRequires: /usr/include/X11/Xlib.h
  94. # Xt development tools
  95. BuildRequires: libXt-devel
  96. # Provides xmkmf
  97. BuildRequires: imake
  98. # Rely on relatively recent gtk
  99. BuildRequires: gtk2-devel
  100. %endif
  101. %if ! %{no_gnome_askpass}
  102. BuildRequires: pkgconfig
  103. %endif
  104. %if %{kerberos5}
  105. BuildRequires: krb5-devel
  106. BuildRequires: krb5-libs
  107. %endif
  108. %package clients
  109. Summary: OpenSSH clients.
  110. Requires: openssh = %{version}-%{release}
  111. Group: Applications/Internet
  112. Obsoletes: ssh-clients
  113. %package server
  114. Summary: The OpenSSH server daemon.
  115. Group: System Environment/Daemons
  116. Obsoletes: ssh-server
  117. Requires: openssh = %{version}-%{release}, chkconfig >= 0.9
  118. %if ! %{build6x}
  119. Requires: /etc/pam.d/system-auth
  120. %endif
  121. %package askpass
  122. Summary: A passphrase dialog for OpenSSH and X.
  123. Group: Applications/Internet
  124. Requires: openssh = %{version}-%{release}
  125. Obsoletes: ssh-extras
  126. %package askpass-gnome
  127. Summary: A passphrase dialog for OpenSSH, X, and GNOME.
  128. Group: Applications/Internet
  129. Requires: openssh = %{version}-%{release}
  130. Obsoletes: ssh-extras
  131. %description
  132. SSH (Secure SHell) is a program for logging into and executing
  133. commands on a remote machine. SSH is intended to replace rlogin and
  134. rsh, and to provide secure encrypted communications between two
  135. untrusted hosts over an insecure network. X11 connections and
  136. arbitrary TCP/IP ports can also be forwarded over the secure channel.
  137. OpenSSH is OpenBSD's version of the last free version of SSH, bringing
  138. it up to date in terms of security and features, as well as removing
  139. all patented algorithms to separate libraries.
  140. This package includes the core files necessary for both the OpenSSH
  141. client and server. To make this package useful, you should also
  142. install openssh-clients, openssh-server, or both.
  143. %description clients
  144. OpenSSH is a free version of SSH (Secure SHell), a program for logging
  145. into and executing commands on a remote machine. This package includes
  146. the clients necessary to make encrypted connections to SSH servers.
  147. You'll also need to install the openssh package on OpenSSH clients.
  148. %description server
  149. OpenSSH is a free version of SSH (Secure SHell), a program for logging
  150. into and executing commands on a remote machine. This package contains
  151. the secure shell daemon (sshd). The sshd daemon allows SSH clients to
  152. securely connect to your SSH server. You also need to have the openssh
  153. package installed.
  154. %description askpass
  155. OpenSSH is a free version of SSH (Secure SHell), a program for logging
  156. into and executing commands on a remote machine. This package contains
  157. an X11 passphrase dialog for OpenSSH.
  158. %description askpass-gnome
  159. OpenSSH is a free version of SSH (Secure SHell), a program for logging
  160. into and executing commands on a remote machine. This package contains
  161. an X11 passphrase dialog for OpenSSH and the GNOME GUI desktop
  162. environment.
  163. %prep
  164. %if ! %{no_x11_askpass}
  165. %setup -q -a 1
  166. %else
  167. %setup -q
  168. %endif
  169. %build
  170. %if %{rescue}
  171. CFLAGS="$RPM_OPT_FLAGS -Os"; export CFLAGS
  172. %endif
  173. %configure \
  174. --sysconfdir=%{_sysconfdir}/ssh \
  175. --libexecdir=%{_libexecdir}/openssh \
  176. --datadir=%{_datadir}/openssh \
  177. --with-default-path=/usr/local/bin:/bin:/usr/bin \
  178. --with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \
  179. --with-privsep-path=%{_var}/empty/sshd \
  180. --mandir=%{_mandir} \
  181. --with-mantype=man \
  182. --disable-strip \
  183. %if %{scard}
  184. --with-smartcard \
  185. %endif
  186. %if %{rescue}
  187. --without-pam \
  188. %else
  189. --with-pam \
  190. %endif
  191. %if %{kerberos5}
  192. --with-kerberos5=$K5DIR \
  193. %endif
  194. %if %{static_libcrypto}
  195. perl -pi -e "s|-lcrypto|%{_libdir}/libcrypto.a|g" Makefile
  196. %endif
  197. make
  198. %if ! %{no_x11_askpass}
  199. pushd x11-ssh-askpass-%{aversion}
  200. %configure --libexecdir=%{_libexecdir}/openssh
  201. xmkmf -a
  202. make
  203. popd
  204. %endif
  205. # Define a variable to toggle gnome1/gtk2 building. This is necessary
  206. # because RPM doesn't handle nested %if statements.
  207. %if %{gtk2}
  208. gtk2=yes
  209. %else
  210. gtk2=no
  211. %endif
  212. %if ! %{no_gnome_askpass}
  213. pushd contrib
  214. if [ $gtk2 = yes ] ; then
  215. make gnome-ssh-askpass2
  216. mv gnome-ssh-askpass2 gnome-ssh-askpass
  217. else
  218. make gnome-ssh-askpass1
  219. mv gnome-ssh-askpass1 gnome-ssh-askpass
  220. fi
  221. popd
  222. %endif
  223. %install
  224. rm -rf $RPM_BUILD_ROOT
  225. mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/ssh
  226. mkdir -p -m755 $RPM_BUILD_ROOT%{_libexecdir}/openssh
  227. mkdir -p -m755 $RPM_BUILD_ROOT%{_var}/empty/sshd
  228. make install DESTDIR=$RPM_BUILD_ROOT
  229. install -d $RPM_BUILD_ROOT/etc/pam.d/
  230. install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
  231. install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
  232. %if %{build6x}
  233. install -m644 contrib/redhat/sshd.pam.old $RPM_BUILD_ROOT/etc/pam.d/sshd
  234. %else
  235. install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
  236. %endif
  237. install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
  238. install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT/usr/bin/ssh-copy-id
  239. %if ! %{no_x11_askpass}
  240. install x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/x11-ssh-askpass
  241. ln -s x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/ssh-askpass
  242. %endif
  243. %if ! %{no_gnome_askpass}
  244. install contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/gnome-ssh-askpass
  245. %endif
  246. %if ! %{scard}
  247. rm -f $RPM_BUILD_ROOT/usr/share/openssh/Ssh.bin
  248. %endif
  249. %if ! %{no_gnome_askpass}
  250. install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
  251. install -m 755 contrib/redhat/gnome-ssh-askpass.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
  252. install -m 755 contrib/redhat/gnome-ssh-askpass.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
  253. %endif
  254. perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*
  255. %clean
  256. rm -rf $RPM_BUILD_ROOT
  257. %triggerun server -- ssh-server
  258. if [ "$1" != 0 -a -r /var/run/sshd.pid ] ; then
  259. touch /var/run/sshd.restart
  260. fi
  261. %triggerun server -- openssh-server < 2.5.0p1
  262. # Count the number of HostKey and HostDsaKey statements we have.
  263. gawk 'BEGIN {IGNORECASE=1}
  264. /^hostkey/ || /^hostdsakey/ {sawhostkey = sawhostkey + 1}
  265. END {exit sawhostkey}' /etc/ssh/sshd_config
  266. # And if we only found one, we know the client was relying on the old default
  267. # behavior, which loaded the the SSH2 DSA host key when HostDsaKey wasn't
  268. # specified. Now that HostKey is used for both SSH1 and SSH2 keys, specifying
  269. # one nullifies the default, which would have loaded both.
  270. if [ $? -eq 1 ] ; then
  271. echo HostKey /etc/ssh/ssh_host_rsa_key >> /etc/ssh/sshd_config
  272. echo HostKey /etc/ssh/ssh_host_dsa_key >> /etc/ssh/sshd_config
  273. fi
  274. %triggerpostun server -- ssh-server
  275. if [ "$1" != 0 ] ; then
  276. /sbin/chkconfig --add sshd
  277. if test -f /var/run/sshd.restart ; then
  278. rm -f /var/run/sshd.restart
  279. /sbin/service sshd start > /dev/null 2>&1 || :
  280. fi
  281. fi
  282. %pre server
  283. %{_sbindir}/groupadd -r -g %{sshd_gid} sshd 2>/dev/null || :
  284. %{_sbindir}/useradd -d /var/empty/sshd -s /bin/false -u %{sshd_uid} \
  285. -g sshd -M -r sshd 2>/dev/null || :
  286. %post server
  287. /sbin/chkconfig --add sshd
  288. %postun server
  289. /sbin/service sshd condrestart > /dev/null 2>&1 || :
  290. %preun server
  291. if [ "$1" = 0 ]
  292. then
  293. /sbin/service sshd stop > /dev/null 2>&1 || :
  294. /sbin/chkconfig --del sshd
  295. fi
  296. %files
  297. %defattr(-,root,root)
  298. %doc CREDITS ChangeLog INSTALL LICENCE OVERVIEW README* PROTOCOL* TODO
  299. %attr(0755,root,root) %{_bindir}/scp
  300. %attr(0644,root,root) %{_mandir}/man1/scp.1*
  301. %attr(0755,root,root) %dir %{_sysconfdir}/ssh
  302. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli
  303. %if ! %{rescue}
  304. %attr(0755,root,root) %{_bindir}/ssh-keygen
  305. %attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
  306. %attr(0755,root,root) %dir %{_libexecdir}/openssh
  307. %attr(4711,root,root) %{_libexecdir}/openssh/ssh-keysign
  308. %attr(0755,root,root) %{_libexecdir}/openssh/ssh-pkcs11-helper
  309. %attr(0755,root,root) %{_libexecdir}/openssh/ssh-sk-helper
  310. %attr(0644,root,root) %{_mandir}/man8/ssh-keysign.8*
  311. %attr(0644,root,root) %{_mandir}/man8/ssh-pkcs11-helper.8*
  312. %attr(0644,root,root) %{_mandir}/man8/ssh-sk-helper.8*
  313. %endif
  314. %if %{scard}
  315. %attr(0755,root,root) %dir %{_datadir}/openssh
  316. %attr(0644,root,root) %{_datadir}/openssh/Ssh.bin
  317. %endif
  318. %files clients
  319. %defattr(-,root,root)
  320. %attr(0755,root,root) %{_bindir}/ssh
  321. %attr(0644,root,root) %{_mandir}/man1/ssh.1*
  322. %attr(0644,root,root) %{_mandir}/man5/ssh_config.5*
  323. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config
  324. %if ! %{rescue}
  325. %attr(2755,root,nobody) %{_bindir}/ssh-agent
  326. %attr(0755,root,root) %{_bindir}/ssh-add
  327. %attr(0755,root,root) %{_bindir}/ssh-keyscan
  328. %attr(0755,root,root) %{_bindir}/sftp
  329. %attr(0755,root,root) %{_bindir}/ssh-copy-id
  330. %attr(0644,root,root) %{_mandir}/man1/ssh-agent.1*
  331. %attr(0644,root,root) %{_mandir}/man1/ssh-add.1*
  332. %attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
  333. %attr(0644,root,root) %{_mandir}/man1/sftp.1*
  334. %endif
  335. %if ! %{rescue}
  336. %files server
  337. %defattr(-,root,root)
  338. %dir %attr(0111,root,root) %{_var}/empty/sshd
  339. %attr(0755,root,root) %{_sbindir}/sshd
  340. %attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
  341. %attr(0644,root,root) %{_mandir}/man8/sshd.8*
  342. %attr(0644,root,root) %{_mandir}/man5/moduli.5*
  343. %attr(0644,root,root) %{_mandir}/man5/sshd_config.5*
  344. %attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
  345. %attr(0755,root,root) %dir %{_sysconfdir}/ssh
  346. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
  347. %attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
  348. %attr(0755,root,root) %config /etc/rc.d/init.d/sshd
  349. %endif
  350. %if ! %{no_x11_askpass}
  351. %files askpass
  352. %defattr(-,root,root)
  353. %doc x11-ssh-askpass-%{aversion}/README
  354. %doc x11-ssh-askpass-%{aversion}/ChangeLog
  355. %doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad
  356. %{_libexecdir}/openssh/ssh-askpass
  357. %attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass
  358. %endif
  359. %if ! %{no_gnome_askpass}
  360. %files askpass-gnome
  361. %defattr(-,root,root)
  362. %attr(0755,root,root) %config %{_sysconfdir}/profile.d/gnome-ssh-askpass.*
  363. %attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass
  364. %endif
  365. %changelog
  366. * Thu Oct 28 2021 Damien Miller <djm@mindrot.org>
  367. - Remove remaining traces of --with-md5-passwords
  368. * Mon Jul 20 2020 Damien Miller <djm@mindrot.org>
  369. - Add ssh-sk-helper and corresponding manual page.
  370. * Sat Feb 10 2018 Darren Tucker <dtucker@dtucker.net>
  371. - Update openssl-devel dependency to match current requirements.
  372. - Handle Fedora >=6 openssl 1.0 compat libs.
  373. - Remove SSH1 from description.
  374. - Don't strip binaries at build time so that debuginfo package can be
  375. created.
  376. * Sun Nov 16 2014 Nico Kadel-Garcia <nakdel@gmail.com>
  377. - Add '--mandir' and '--with-mantype' for RHEL 5 compatibility
  378. - Add 'dist' option to 'ver' so package names reflect OS at build time
  379. - Always include x11-ssh-askpass tarball in SRPM
  380. - Add openssh-x11-aspass BuildRequires for libXT-devel, imake, gtk2-devel
  381. - Discard 'K5DIR' reporting, not usable inside 'mock' for RHEL 5 compatibility
  382. - Discard obsolete '--with-rsh' configure option
  383. - Update openssl-devel dependency to 0.9.8f, as found in autoconf
  384. * Wed Jul 14 2010 Tim Rice <tim@multitalents.net>
  385. - test for skip_x11_askpass (line 77) should have been for no_x11_askpass
  386. * Mon Jun 2 2003 Damien Miller <djm@mindrot.org>
  387. - Remove noip6 option. This may be controlled at run-time in client config
  388. file using new AddressFamily directive
  389. * Mon May 12 2003 Damien Miller <djm@mindrot.org>
  390. - Don't install profile.d scripts when not building with GNOME/GTK askpass
  391. (patch from bet@rahul.net)
  392. * Tue Oct 01 2002 Damien Miller <djm@mindrot.org>
  393. - Install ssh-agent setgid nobody to prevent ptrace() key theft attacks
  394. * Mon Sep 30 2002 Damien Miller <djm@mindrot.org>
  395. - Use contrib/ Makefile for building askpass programs
  396. * Fri Jun 21 2002 Damien Miller <djm@mindrot.org>
  397. - Merge in spec changes from seba@iq.pl (Sebastian Pachuta)
  398. - Add new {ssh,sshd}_config.5 manpages
  399. - Add new ssh-keysign program and remove setuid from ssh client
  400. * Fri May 10 2002 Damien Miller <djm@mindrot.org>
  401. - Merge in spec changes from RedHat, reorgansie a little
  402. - Add Privsep user, group and directory
  403. * Thu Mar 7 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1p1-2
  404. - bump and grind (through the build system)
  405. * Thu Mar 7 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1p1-1
  406. - require sharutils for building (mindrot #137)
  407. - require db1-devel only when building for 6.x (#55105), which probably won't
  408. work anyway (3.1 requires OpenSSL 0.9.6 to build), but what the heck
  409. - require pam-devel by file (not by package name) again
  410. - add Markus's patch to compile with OpenSSL 0.9.5a (from
  411. http://bugzilla.mindrot.org/show_bug.cgi?id=141) and apply it if we're
  412. building for 6.x
  413. * Thu Mar 7 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1p1-0
  414. - update to 3.1p1
  415. * Tue Mar 5 2002 Nalin Dahyabhai <nalin@redhat.com> SNAP-20020305
  416. - update to SNAP-20020305
  417. - drop debug patch, fixed upstream
  418. * Wed Feb 20 2002 Nalin Dahyabhai <nalin@redhat.com> SNAP-20020220
  419. - update to SNAP-20020220 for testing purposes (you've been warned, if there's
  420. anything to be warned about, gss patches won't apply, I don't mind)
  421. * Wed Feb 13 2002 Nalin Dahyabhai <nalin@redhat.com> 3.0.2p1-3
  422. - add patches from Simon Wilkinson and Nicolas Williams for GSSAPI key
  423. exchange, authentication, and named key support
  424. * Wed Jan 23 2002 Nalin Dahyabhai <nalin@redhat.com> 3.0.2p1-2
  425. - remove dependency on db1-devel, which has just been swallowed up whole
  426. by gnome-libs-devel
  427. * Sat Dec 29 2001 Nalin Dahyabhai <nalin@redhat.com>
  428. - adjust build dependencies so that build6x actually works right (fix
  429. from Hugo van der Kooij)
  430. * Tue Dec 4 2001 Nalin Dahyabhai <nalin@redhat.com> 3.0.2p1-1
  431. - update to 3.0.2p1
  432. * Fri Nov 16 2001 Nalin Dahyabhai <nalin@redhat.com> 3.0.1p1-1
  433. - update to 3.0.1p1
  434. * Tue Nov 13 2001 Nalin Dahyabhai <nalin@redhat.com>
  435. - update to current CVS (not for use in distribution)
  436. * Thu Nov 8 2001 Nalin Dahyabhai <nalin@redhat.com> 3.0p1-1
  437. - merge some of Damien Miller <djm@mindrot.org> changes from the upstream
  438. 3.0p1 spec file and init script
  439. * Wed Nov 7 2001 Nalin Dahyabhai <nalin@redhat.com>
  440. - update to 3.0p1
  441. - update to x11-ssh-askpass 1.2.4.1
  442. - change build dependency on a file from pam-devel to the pam-devel package
  443. - replace primes with moduli
  444. * Thu Sep 27 2001 Nalin Dahyabhai <nalin@redhat.com> 2.9p2-9
  445. - incorporate fix from Markus Friedl's advisory for IP-based authorization bugs
  446. * Thu Sep 13 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.9p2-8
  447. - Merge changes to rescue build from current sysadmin survival cd
  448. * Thu Sep 6 2001 Nalin Dahyabhai <nalin@redhat.com> 2.9p2-7
  449. - fix scp's server's reporting of file sizes, and build with the proper
  450. preprocessor define to get large-file capable open(), stat(), etc.
  451. (sftp has been doing this correctly all along) (#51827)
  452. - configure without --with-ipv4-default on RHL 7.x and newer (#45987,#52247)
  453. - pull cvs patch to fix support for /etc/nologin for non-PAM logins (#47298)
  454. - mark profile.d scriptlets as config files (#42337)
  455. - refer to Jason Stone's mail for zsh workaround for exit-hanging quasi-bug
  456. - change a couple of log() statements to debug() statements (#50751)
  457. - pull cvs patch to add -t flag to sshd (#28611)
  458. - clear fd_sets correctly (one bit per FD, not one byte per FD) (#43221)
  459. * Mon Aug 20 2001 Nalin Dahyabhai <nalin@redhat.com> 2.9p2-6
  460. - add db1-devel as a BuildPrerequisite (noted by Hans Ecke)
  461. * Thu Aug 16 2001 Nalin Dahyabhai <nalin@redhat.com>
  462. - pull cvs patch to fix remote port forwarding with protocol 2
  463. * Thu Aug 9 2001 Nalin Dahyabhai <nalin@redhat.com>
  464. - pull cvs patch to add session initialization to no-pty sessions
  465. - pull cvs patch to not cut off challengeresponse auth needlessly
  466. - refuse to do X11 forwarding if xauth isn't there, handy if you enable
  467. it by default on a system that doesn't have X installed (#49263)
  468. * Wed Aug 8 2001 Nalin Dahyabhai <nalin@redhat.com>
  469. - don't apply patches to code we don't intend to build (spotted by Matt Galgoci)
  470. * Mon Aug 6 2001 Nalin Dahyabhai <nalin@redhat.com>
  471. - pass OPTIONS correctly to initlog (#50151)
  472. * Wed Jul 25 2001 Nalin Dahyabhai <nalin@redhat.com>
  473. - switch to x11-ssh-askpass 1.2.2
  474. * Wed Jul 11 2001 Nalin Dahyabhai <nalin@redhat.com>
  475. - rebuild in new environment
  476. * Mon Jun 25 2001 Nalin Dahyabhai <nalin@redhat.com>
  477. - disable the gssapi patch
  478. * Mon Jun 18 2001 Nalin Dahyabhai <nalin@redhat.com>
  479. - update to 2.9p2
  480. - refresh to a new version of the gssapi patch
  481. * Thu Jun 7 2001 Nalin Dahyabhai <nalin@redhat.com>
  482. - change Copyright: BSD to License: BSD
  483. - add Markus Friedl's unverified patch for the cookie file deletion problem
  484. so that we can verify it
  485. - drop patch to check if xauth is present (was folded into cookie patch)
  486. - don't apply gssapi patches for the errata candidate
  487. - clear supplemental groups list at startup
  488. * Fri May 25 2001 Nalin Dahyabhai <nalin@redhat.com>
  489. - fix an error parsing the new default sshd_config
  490. - add a fix from Markus Friedl (via openssh-unix-dev) for ssh-keygen not
  491. dealing with comments right
  492. * Thu May 24 2001 Nalin Dahyabhai <nalin@redhat.com>
  493. - add in Simon Wilkinson's GSSAPI patch to give it some testing in-house,
  494. to be removed before the next beta cycle because it's a big departure
  495. from the upstream version
  496. * Thu May 3 2001 Nalin Dahyabhai <nalin@redhat.com>
  497. - finish marking strings in the init script for translation
  498. - modify init script to source /etc/sysconfig/sshd and pass $OPTIONS to sshd
  499. at startup (change merged from openssh.com init script, originally by
  500. Pekka Savola)
  501. - refuse to do X11 forwarding if xauth isn't there, handy if you enable
  502. it by default on a system that doesn't have X installed
  503. * Wed May 2 2001 Nalin Dahyabhai <nalin@redhat.com>
  504. - update to 2.9
  505. - drop various patches that came from or went upstream or to or from CVS
  506. * Wed Apr 18 2001 Nalin Dahyabhai <nalin@redhat.com>
  507. - only require initscripts 5.00 on 6.2 (reported by Peter Bieringer)
  508. * Sun Apr 8 2001 Preston Brown <pbrown@redhat.com>
  509. - remove explicit openssl requirement, fixes builddistro issue
  510. - make initscript stop() function wait until sshd really dead to avoid
  511. races in condrestart
  512. * Mon Apr 2 2001 Nalin Dahyabhai <nalin@redhat.com>
  513. - mention that challengereponse supports PAM, so disabling password doesn't
  514. limit users to pubkey and rsa auth (#34378)
  515. - bypass the daemon() function in the init script and call initlog directly,
  516. because daemon() won't start a daemon it detects is already running (like
  517. open connections)
  518. - require the version of openssl we had when we were built
  519. * Fri Mar 23 2001 Nalin Dahyabhai <nalin@redhat.com>
  520. - make do_pam_setcred() smart enough to know when to establish creds and
  521. when to reinitialize them
  522. - add in a couple of other fixes from Damien for inclusion in the errata
  523. * Thu Mar 22 2001 Nalin Dahyabhai <nalin@redhat.com>
  524. - update to 2.5.2p2
  525. - call setcred() again after initgroups, because the "creds" could actually
  526. be group memberships
  527. * Tue Mar 20 2001 Nalin Dahyabhai <nalin@redhat.com>
  528. - update to 2.5.2p1 (includes endianness fixes in the rijndael implementation)
  529. - don't enable challenge-response by default until we find a way to not
  530. have too many userauth requests (we may make up to six pubkey and up to
  531. three password attempts as it is)
  532. - remove build dependency on rsh to match openssh.com's packages more closely
  533. * Sat Mar 3 2001 Nalin Dahyabhai <nalin@redhat.com>
  534. - remove dependency on openssl -- would need to be too precise
  535. * Fri Mar 2 2001 Nalin Dahyabhai <nalin@redhat.com>
  536. - rebuild in new environment
  537. * Mon Feb 26 2001 Nalin Dahyabhai <nalin@redhat.com>
  538. - Revert the patch to move pam_open_session.
  539. - Init script and spec file changes from Pekka Savola. (#28750)
  540. - Patch sftp to recognize '-o protocol' arguments. (#29540)
  541. * Thu Feb 22 2001 Nalin Dahyabhai <nalin@redhat.com>
  542. - Chuck the closing patch.
  543. - Add a trigger to add host keys for protocol 2 to the config file, now that
  544. configuration file syntax requires us to specify it with HostKey if we
  545. specify any other HostKey values, which we do.
  546. * Tue Feb 20 2001 Nalin Dahyabhai <nalin@redhat.com>
  547. - Redo patch to move pam_open_session after the server setuid()s to the user.
  548. - Rework the nopam patch to use be picked up by autoconf.
  549. * Mon Feb 19 2001 Nalin Dahyabhai <nalin@redhat.com>
  550. - Update for 2.5.1p1.
  551. - Add init script mods from Pekka Savola.
  552. - Tweak the init script to match the CVS contrib script more closely.
  553. - Redo patch to ssh-add to try to adding both identity and id_dsa to also try
  554. adding id_rsa.
  555. * Fri Feb 16 2001 Nalin Dahyabhai <nalin@redhat.com>
  556. - Update for 2.5.0p1.
  557. - Use $RPM_OPT_FLAGS instead of -O when building gnome-ssh-askpass
  558. - Resync with parts of Damien Miller's openssh.spec from CVS, including
  559. update of x11 askpass to 1.2.0.
  560. - Only require openssl (don't prereq) because we generate keys in the init
  561. script now.
  562. * Tue Feb 13 2001 Nalin Dahyabhai <nalin@redhat.com>
  563. - Don't open a PAM session until we've forked and become the user (#25690).
  564. - Apply Andrew Bartlett's patch for letting pam_authenticate() know which
  565. host the user is attempting a login from.
  566. - Resync with parts of Damien Miller's openssh.spec from CVS.
  567. - Don't expose KbdInt responses in debug messages (from CVS).
  568. - Detect and handle errors in rsa_{public,private}_decrypt (from CVS).
  569. * Wed Feb 7 2001 Trond Eivind Glomsrxd <teg@redhat.com>
  570. - i18n-tweak to initscript.
  571. * Tue Jan 23 2001 Nalin Dahyabhai <nalin@redhat.com>
  572. - More gettextizing.
  573. - Close all files after going into daemon mode (needs more testing).
  574. - Extract patch from CVS to handle auth banners (in the client).
  575. - Extract patch from CVS to handle compat weirdness.
  576. * Fri Jan 19 2001 Nalin Dahyabhai <nalin@redhat.com>
  577. - Finish with the gettextizing.
  578. * Thu Jan 18 2001 Nalin Dahyabhai <nalin@redhat.com>
  579. - Fix a bug in auth2-pam.c (#23877)
  580. - Gettextize the init script.
  581. * Wed Dec 20 2000 Nalin Dahyabhai <nalin@redhat.com>
  582. - Incorporate a switch for using PAM configs for 6.x, just in case.
  583. * Tue Dec 5 2000 Nalin Dahyabhai <nalin@redhat.com>
  584. - Incorporate Bero's changes for a build specifically for rescue CDs.
  585. * Wed Nov 29 2000 Nalin Dahyabhai <nalin@redhat.com>
  586. - Don't treat pam_setcred() failure as fatal unless pam_authenticate() has
  587. succeeded, to allow public-key authentication after a failure with "none"
  588. authentication. (#21268)
  589. * Tue Nov 28 2000 Nalin Dahyabhai <nalin@redhat.com>
  590. - Update to x11-askpass 1.1.1. (#21301)
  591. - Don't second-guess fixpaths, which causes paths to get fixed twice. (#21290)
  592. * Mon Nov 27 2000 Nalin Dahyabhai <nalin@redhat.com>
  593. - Merge multiple PAM text messages into subsequent prompts when possible when
  594. doing keyboard-interactive authentication.
  595. * Sun Nov 26 2000 Nalin Dahyabhai <nalin@redhat.com>
  596. - Disable the built-in MD5 password support. We're using PAM.
  597. - Take a crack at doing keyboard-interactive authentication with PAM, and
  598. enable use of it in the default client configuration so that the client
  599. will try it when the server disallows password authentication.
  600. - Build with debugging flags. Build root policies strip all binaries anyway.
  601. * Tue Nov 21 2000 Nalin Dahyabhai <nalin@redhat.com>
  602. - Use DESTDIR instead of %%makeinstall.
  603. - Remove /usr/X11R6/bin from the path-fixing patch.
  604. * Mon Nov 20 2000 Nalin Dahyabhai <nalin@redhat.com>
  605. - Add the primes file from the latest snapshot to the main package (#20884).
  606. - Add the dev package to the prereq list (#19984).
  607. - Remove the default path and mimic login's behavior in the server itself.
  608. * Fri Nov 17 2000 Nalin Dahyabhai <nalin@redhat.com>
  609. - Resync with conditional options in Damien Miller's .spec file for an errata.
  610. - Change libexecdir from %%{_libexecdir}/ssh to %%{_libexecdir}/openssh.
  611. * Tue Nov 7 2000 Nalin Dahyabhai <nalin@redhat.com>
  612. - Update to OpenSSH 2.3.0p1.
  613. - Update to x11-askpass 1.1.0.
  614. - Enable keyboard-interactive authentication.
  615. * Mon Oct 30 2000 Nalin Dahyabhai <nalin@redhat.com>
  616. - Update to ssh-askpass-x11 1.0.3.
  617. - Change authentication related messages to be private (#19966).
  618. * Tue Oct 10 2000 Nalin Dahyabhai <nalin@redhat.com>
  619. - Patch ssh-keygen to be able to list signatures for DSA public key files
  620. it generates.
  621. * Thu Oct 5 2000 Nalin Dahyabhai <nalin@redhat.com>
  622. - Add BuildRequires on /usr/include/security/pam_appl.h to be sure we always
  623. build PAM authentication in.
  624. - Try setting SSH_ASKPASS if gnome-ssh-askpass is installed.
  625. - Clean out no-longer-used patches.
  626. - Patch ssh-add to try to add both identity and id_dsa, and to error only
  627. when neither exists.
  628. * Mon Oct 2 2000 Nalin Dahyabhai <nalin@redhat.com>
  629. - Update x11-askpass to 1.0.2. (#17835)
  630. - Add BuildRequiress for /bin/login and /usr/bin/rsh so that configure will
  631. always find them in the right place. (#17909)
  632. - Set the default path to be the same as the one supplied by /bin/login, but
  633. add /usr/X11R6/bin. (#17909)
  634. - Try to handle obsoletion of ssh-server more cleanly. Package names
  635. are different, but init script name isn't. (#17865)
  636. * Wed Sep 6 2000 Nalin Dahyabhai <nalin@redhat.com>
  637. - Update to 2.2.0p1. (#17835)
  638. - Tweak the init script to allow proper restarting. (#18023)
  639. * Wed Aug 23 2000 Nalin Dahyabhai <nalin@redhat.com>
  640. - Update to 20000823 snapshot.
  641. - Change subpackage requirements from %%{version} to %%{version}-%%{release}
  642. - Back out the pipe patch.
  643. * Mon Jul 17 2000 Nalin Dahyabhai <nalin@redhat.com>
  644. - Update to 2.1.1p4, which includes fixes for config file parsing problems.
  645. - Move the init script back.
  646. - Add Damien's quick fix for wackiness.
  647. * Wed Jul 12 2000 Nalin Dahyabhai <nalin@redhat.com>
  648. - Update to 2.1.1p3, which includes fixes for X11 forwarding and strtok().
  649. * Thu Jul 6 2000 Nalin Dahyabhai <nalin@redhat.com>
  650. - Move condrestart to server postun.
  651. - Move key generation to init script.
  652. - Actually use the right patch for moving the key generation to the init script.
  653. - Clean up the init script a bit.
  654. * Wed Jul 5 2000 Nalin Dahyabhai <nalin@redhat.com>
  655. - Fix X11 forwarding, from mail post by Chan Shih-Ping Richard.
  656. * Sun Jul 2 2000 Nalin Dahyabhai <nalin@redhat.com>
  657. - Update to 2.1.1p2.
  658. - Use of strtok() considered harmful.
  659. * Sat Jul 1 2000 Nalin Dahyabhai <nalin@redhat.com>
  660. - Get the build root out of the man pages.
  661. * Thu Jun 29 2000 Nalin Dahyabhai <nalin@redhat.com>
  662. - Add and use condrestart support in the init script.
  663. - Add newer initscripts as a prereq.
  664. * Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
  665. - Build in new environment (release 2)
  666. - Move -clients subpackage to Applications/Internet group
  667. * Fri Jun 9 2000 Nalin Dahyabhai <nalin@redhat.com>
  668. - Update to 2.2.1p1
  669. * Sat Jun 3 2000 Nalin Dahyabhai <nalin@redhat.com>
  670. - Patch to build with neither RSA nor RSAref.
  671. - Miscellaneous FHS-compliance tweaks.
  672. - Fix for possibly-compressed man pages.
  673. * Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
  674. - Updated for new location
  675. - Updated for new gnome-ssh-askpass build
  676. * Sun Dec 26 1999 Damien Miller <djm@mindrot.org>
  677. - Added Jim Knoble's <jmknoble@pobox.com> askpass
  678. * Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
  679. - Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
  680. * Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
  681. - Added 'Obsoletes' directives
  682. * Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
  683. - Use make install
  684. - Subpackages
  685. * Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
  686. - Added links for slogin
  687. - Fixed perms on manpages
  688. * Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
  689. - Renamed init script
  690. * Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
  691. - Back to old binary names
  692. * Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
  693. - Use autoconf
  694. - New binary names
  695. * Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
  696. - Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.

其中 281行:

install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT/usr/bin/ssh-copy-id 

387行:

%attr(0755,root,root) %{_bindir}/ssh-copy-id

为新增内容

该文件为openssh9.0p1版本制作rpm包的spec文件

ssh-copy-id-openssh.spec-Linux文档类资源-CSDN下载

openssh9.0p1-openssl-1.1.1o-ssh-copy-id.tgz-Linux文档类资源-CSDN下载

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/285785
推荐阅读
相关标签
  

闽ICP备14008679号