⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 openssh.spec

📁 OpenSSL Source code for SFTP, SSH, and many others
💻 SPEC
📖 第 1 页 / 共 2 页
字号:
%define ver 3.3p1%define rel 1# OpenSSH privilege separation requires a user & group ID%define sshd_uid    74%define sshd_gid    74# Version of ssh-askpass%define aversion 1.2.4.1# Do we want to disable building of x11-askpass? (1=yes 0=no)%define no_x11_askpass 0# Do we want to disable building of gnome-askpass? (1=yes 0=no)%define no_gnome_askpass 0# Do we want to link against a static libcrypto? (1=yes 0=no)%define static_libcrypto 0# Do we want smartcard support (1=yes 0=no)%define scard 0# Is this build for RHL 6.x?%define build6x 0# Disable IPv6 (avoids DNS hangs on some glibc versions)%define noip6 0# Do we want kerberos5 support (1=yes 0=no)%define kerberos5 1# Reserve options to override askpass settings with:# rpm -ba|--rebuild --define 'skip_xxx 1'%{?skip_x11_askpass:%define no_x11_askpass 1}%{?skip_gnome_askpass:%define no_gnome_askpass 1}# Is this a build for RHL 6.x or earlier?%{?build_6x:%define build6x 1}# If this is RHL 6.x, the default configuration has sysconfdir in /usr/etc.%if %{build6x}%define _sysconfdir /etc%define noip6 1%endif# Options for static OpenSSL link:# rpm -ba|--rebuild --define "static_openssl 1"%{?static_openssl:%define static_libcrypto 1}# Options for Smartcard support: (needs libsectok and openssl-engine)# rpm -ba|--rebuild --define "smartcard 1"%{?smartcard:%define scard 1}# Option to disable ipv6# rpm -ba|--rebuild --define "noipv6 1"%{?noipv6:%define noip6 1}# Is this a build for the rescue CD (without PAM, with MD5)? (1=yes 0=no)%define rescue 0%{?build_rescue:%define rescue 1}# Turn off some stuff for resuce builds%if %{rescue}%define kerberos5 0%endifSummary: The OpenSSH implementation of SSH protocol versions 1 and 2.Name: opensshVersion: %{ver}%if %{rescue}Release: %{rel}rescue%elseRelease: %{rel}%endifURL: http://www.openssh.com/portable.htmlSource0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gzSource1: http://www.pobox.com/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gzLicense: BSDGroup: Applications/InternetBuildRoot: %{_tmppath}/%{name}-%{version}-buildrootObsoletes: ssh%if %{build6x}PreReq: initscripts >= 5.00%elsePreReq: initscripts >= 5.20%endifBuildPreReq: perl, openssl-devel, sharutils, tcp_wrappersBuildPreReq: /bin/login%if %{build6x}BuildPreReq: glibc-devel, pam%elseBuildPreReq: db1-devel, /usr/include/security/pam_appl.h%endif%if ! %{no_x11_askpass}BuildPreReq: XFree86-devel%endif%if ! %{no_gnome_askpass}BuildPreReq: gnome-libs-devel%endif%package clientsSummary: OpenSSH clients.Requires: openssh = %{version}-%{release}Group: Applications/InternetObsoletes: ssh-clients%package serverSummary: The OpenSSH server daemon.Group: System Environment/DaemonsObsoletes: ssh-serverPreReq: openssh = %{version}-%{release}, chkconfig >= 0.9%if ! %{build6x}Requires: /etc/pam.d/system-auth%endif%package askpassSummary: A passphrase dialog for OpenSSH and X.Group: Applications/InternetRequires: openssh = %{version}-%{release}Obsoletes: ssh-extras%package askpass-gnomeSummary: A passphrase dialog for OpenSSH, X, and GNOME.Group: Applications/InternetRequires: openssh = %{version}-%{release}Obsoletes: ssh-extras%descriptionSSH (Secure SHell) is a program for logging into and executingcommands on a remote machine. SSH is intended to replace rlogin andrsh, and to provide secure encrypted communications between twountrusted hosts over an insecure network. X11 connections andarbitrary TCP/IP ports can also be forwarded over the secure channel.OpenSSH is OpenBSD's version of the last free version of SSH, bringingit up to date in terms of security and features, as well as removingall patented algorithms to separate libraries.This package includes the core files necessary for both the OpenSSHclient and server. To make this package useful, you should alsoinstall openssh-clients, openssh-server, or both.%description clientsOpenSSH is a free version of SSH (Secure SHell), a program for logginginto and executing commands on a remote machine. This package includesthe clients necessary to make encrypted connections to SSH servers.You'll also need to install the openssh package on OpenSSH clients.%description serverOpenSSH is a free version of SSH (Secure SHell), a program for logginginto and executing commands on a remote machine. This package containsthe secure shell daemon (sshd). The sshd daemon allows SSH clients tosecurely connect to your SSH server. You also need to have the opensshpackage installed.%description askpassOpenSSH is a free version of SSH (Secure SHell), a program for logginginto and executing commands on a remote machine. This package containsan X11 passphrase dialog for OpenSSH.%description askpass-gnomeOpenSSH is a free version of SSH (Secure SHell), a program for logginginto and executing commands on a remote machine. This package containsan X11 passphrase dialog for OpenSSH and the GNOME GUI desktopenvironment.%prep%if ! %{no_x11_askpass}%setup -q -a 1%else%setup -q%endif%build%if %{rescue}CFLAGS="$RPM_OPT_FLAGS -Os"; export CFLAGS%endif%configure \	--sysconfdir=%{_sysconfdir}/ssh \	--libexecdir=%{_libexecdir}/openssh \	--datadir=%{_datadir}/openssh \	--with-tcp-wrappers \	--with-rsh=%{_bindir}/rsh \	--with-default-path=/usr/local/bin:/bin:/usr/bin \	--with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \	--with-privsep-path=%{_var}/empty/sshd \%if %{scard}	--with-smartcard \%endif%if %{noip6}	--with-ipv4-default \%endif%if %{rescue}	--without-pam --with-md5-passwords \%else	--with-pam \%endif%if %{kerberos5}         --with-kerberos5=/usr/kerberos \%endif%if %{static_libcrypto}perl -pi -e "s|-lcrypto|%{_libdir}/libcrypto.a|g" Makefile%endifmake%if ! %{no_x11_askpass}pushd x11-ssh-askpass-%{aversion}%configure --libexecdir=%{_libexecdir}/opensshxmkmf -amakepopd%endif%if ! %{no_gnome_askpass}pushd contribgcc $RPM_OPT_FLAGS `gnome-config --cflags gnome gnomeui` \        gnome-ssh-askpass.c -o gnome-ssh-askpass \        `gnome-config --libs gnome gnomeui`popd%endif%installrm -rf $RPM_BUILD_ROOTmkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/sshmkdir -p -m755 $RPM_BUILD_ROOT%{_libexecdir}/opensshmkdir -p -m755 $RPM_BUILD_ROOT%{_var}/empty/sshdmake install DESTDIR=$RPM_BUILD_ROOTinstall -d $RPM_BUILD_ROOT/etc/pam.d/install -d $RPM_BUILD_ROOT/etc/rc.d/init.dinstall -d $RPM_BUILD_ROOT%{_libexecdir}/openssh%if %{build6x}install -m644 contrib/redhat/sshd.pam.old $RPM_BUILD_ROOT/etc/pam.d/sshd%elseinstall -m644 contrib/redhat/sshd.pam     $RPM_BUILD_ROOT/etc/pam.d/sshd%endifinstall -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd%if ! %{no_x11_askpass}install -s x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/x11-ssh-askpassln -s x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/ssh-askpass%endif%if ! %{no_gnome_askpass}install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/gnome-ssh-askpass%endifinstall -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/install -m 755 contrib/redhat/gnome-ssh-askpass.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/install -m 755 contrib/redhat/gnome-ssh-askpass.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*%cleanrm -rf $RPM_BUILD_ROOT%triggerun server -- ssh-serverif [ "$1" != 0 -a -r /var/run/sshd.pid ] ; then	touch /var/run/sshd.restartfi%triggerun server -- openssh-server < 2.5.0p1# Count the number of HostKey and HostDsaKey statements we have.gawk	'BEGIN {IGNORECASE=1}	 /^hostkey/ || /^hostdsakey/ {sawhostkey = sawhostkey + 1}	 END {exit sawhostkey}' /etc/ssh/sshd_config# And if we only found one, we know the client was relying on the old default# behavior, which loaded the the SSH2 DSA host key when HostDsaKey wasn't# specified.  Now that HostKey is used for both SSH1 and SSH2 keys, specifying# one nullifies the default, which would have loaded both.if [ $? -eq 1 ] ; then	echo HostKey /etc/ssh/ssh_host_rsa_key >> /etc/ssh/sshd_config	echo HostKey /etc/ssh/ssh_host_dsa_key >> /etc/ssh/sshd_configfi%triggerpostun server -- ssh-serverif [ "$1" != 0 ] ; then	/sbin/chkconfig --add sshd	if test -f /var/run/sshd.restart ; then		rm -f /var/run/sshd.restart		/sbin/service sshd start > /dev/null 2>&1 || :	fifi%pre server%{_sbindir}/groupadd -r -g %{sshd_gid} sshd 2>/dev/null || :%{_sbindir}/useradd -d /var/empty/sshd -s /bin/false -u %{sshd_uid} \	-g sshd -M -r sshd 2>/dev/null || :%post server/sbin/chkconfig --add sshd%postun server/sbin/service sshd condrestart > /dev/null 2>&1 || :%preun serverif [ "$1" = 0 ]then	/sbin/service sshd stop > /dev/null 2>&1 || :	/sbin/chkconfig --del sshdfi%files%defattr(-,root,root)%doc CREDITS ChangeLog INSTALL LICENCE OVERVIEW README* RFC* TODO WARNING*%attr(0755,root,root) %{_bindir}/scp%attr(0644,root,root) %{_mandir}/man1/scp.1*%attr(0755,root,root) %dir %{_sysconfdir}/ssh%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli%if ! %{rescue}%attr(0755,root,root) %{_bindir}/ssh-keygen%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*%attr(0755,root,root) %dir %{_libexecdir}/openssh%attr(4711,root,root) %{_libexecdir}/openssh/ssh-keysign%attr(0644,root,root) %{_mandir}/man8/ssh-keysign.8*%endif%if %{scard}%attr(0755,root,root) %dir %{_datadir}/openssh%attr(0644,root,root) %{_datadir}/openssh/Ssh.bin%endif%files clients%defattr(-,root,root)%attr(0755,root,root) %{_bindir}/ssh%attr(0644,root,root) %{_mandir}/man1/ssh.1*%attr(0644,root,root) %{_mandir}/man5/ssh_config.5*%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config%attr(-,root,root) %{_bindir}/slogin%attr(-,root,root) %{_mandir}/man1/slogin.1*%if ! %{rescue}%attr(0755,root,root) %{_bindir}/ssh-agent%attr(0755,root,root) %{_bindir}/ssh-add%attr(0755,root,root) %{_bindir}/ssh-keyscan%attr(0755,root,root) %{_bindir}/sftp%attr(0644,root,root) %{_mandir}/man1/ssh-agent.1*%attr(0644,root,root) %{_mandir}/man1/ssh-add.1*%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*%attr(0644,root,root) %{_mandir}/man1/sftp.1*%endif%if ! %{rescue}%files server%defattr(-,root,root)%dir %attr(0111,root,root) %{_var}/empty/sshd%attr(0755,root,root) %{_sbindir}/sshd%attr(0755,root,root) %{_libexecdir}/openssh/sftp-server%attr(0644,root,root) %{_mandir}/man8/sshd.8*%attr(0644,root,root) %{_mandir}/man5/sshd_config.5*%attr(0644,root,root) %{_mandir}/man8/sftp-server.8*%attr(0755,root,root) %dir %{_sysconfdir}/ssh%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config%attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd%attr(0755,root,root) %config /etc/rc.d/init.d/sshd%endif%if ! %{no_x11_askpass}%files askpass%defattr(-,root,root)%doc x11-ssh-askpass-%{aversion}/README%doc x11-ssh-askpass-%{aversion}/ChangeLog%doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad%attr(0755,root,root) %{_libexecdir}/openssh/ssh-askpass%attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass%endif%if ! %{no_gnome_askpass}%files askpass-gnome%defattr(-,root,root)%attr(0755,root,root) %config %{_sysconfdir}/profile.d/gnome-ssh-askpass.*%attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass%endif%changelog* Fri Jun 21 2002 Damien Miller <djm@mindrot.org>- Merge in spec changes from seba@iq.pl (Sebastian Pachuta)- Add new {ssh,sshd}_config.5 manpages- Add new ssh-keysign program and remove setuid from ssh client

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -