forked from pool/openssh
Accepting request 86032 from home:jengelh:dev
- Avoid overriding libexecdir with %_lib (bnc#712025) - Clean up the specfile by request of Minh Ngo, details entail: * remove norootforbuild comments, redundant %clean section * run spec-beautifier over it - Add PIEFLAGS to compilation of askpass; fails otherwise OBS-URL: https://build.opensuse.org/request/show/86032 OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=12
This commit is contained in:
parent
fc3180d72b
commit
2f1296c7be
@ -15,7 +15,6 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: openssh-askpass-gnome
|
||||
@ -27,7 +26,7 @@ Release: 1
|
||||
Requires: openssh = %{version} openssh-askpass = %{version}
|
||||
AutoReqProv: on
|
||||
Summary: A GNOME-Based Passphrase Dialog for OpenSSH
|
||||
Url: http://www.openssh.com/
|
||||
URL: http://www.openssh.com/
|
||||
%define _name openssh
|
||||
Source: %{_name}-%{version}.tar.bz2
|
||||
Patch: %{_name}-5.8p1-sshd_config.diff
|
||||
@ -45,31 +44,6 @@ SSH (Secure Shell) is a program for logging into a remote machine and
|
||||
for executing commands on a remote machine. This package contains a
|
||||
GNOME-based passphrase dialog for OpenSSH.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Aaron Campbell
|
||||
Bob Beck
|
||||
Markus Friedl
|
||||
Niels Provos
|
||||
Theo de Raadt
|
||||
Dug Song
|
||||
Ben Taylor <bent@clark.net>
|
||||
Chip Salzenberg <chip@valinux.com>
|
||||
Chris Saia <csaia@wtower.com>
|
||||
Dan Brosemer <odin@linuxfreak.com>
|
||||
Jim Knoble <jmknoble@pobox.com>
|
||||
Marc G. Fournier <marc.fournier@acadiau.ca>
|
||||
Nalin Dahyabhai <nalin.dahyabhai@pobox.com>
|
||||
Niels Kristian Bech Jensen <nkbj@image.dk>
|
||||
Phil Hands <phil@hands.com>
|
||||
Thomas Neumann <tom@smart.ruhr.de>
|
||||
Tudor Bosman <tudorb@jm.nu>
|
||||
Damien Miller <djm@ibs.com.au>
|
||||
|
||||
%define prefix /usr
|
||||
|
||||
%prep
|
||||
%setup -q -n %{_name}-%{version}
|
||||
%patch
|
||||
@ -86,13 +60,9 @@ Authors:
|
||||
aclocal
|
||||
autoheader
|
||||
autoconf
|
||||
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
|
||||
./configure \
|
||||
--mandir=%{_mandir} \
|
||||
--prefix=%{prefix} \
|
||||
--infodir=%{_infodir} \
|
||||
--sysconfdir=/etc/ssh \
|
||||
--libexecdir=%{prefix}/%_lib/ssh \
|
||||
%configure \
|
||||
--sysconfdir=%_sysconfdir/ssh \
|
||||
--libexecdir=%_libexecdir/ssh \
|
||||
--with-tcp-wrappers \
|
||||
--with-pam \
|
||||
--with-kerberos5=/usr \
|
||||
@ -100,18 +70,16 @@ CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
|
||||
--disable-strip \
|
||||
--target=%{_target_cpu}-suse-linux
|
||||
cd contrib
|
||||
make %{?jobs:-j%jobs} gnome-ssh-askpass2
|
||||
make %{?_smp_mflags} gnome-ssh-askpass2
|
||||
mv gnome-ssh-askpass2 gnome-ssh-askpass
|
||||
|
||||
%install
|
||||
install -d -m 755 $RPM_BUILD_ROOT/usr/%_lib/ssh/
|
||||
install contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/%_lib/ssh/gnome-ssh-askpass
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
install -d -m 755 %buildroot/%_libexecdir/ssh/
|
||||
install contrib/gnome-ssh-askpass %buildroot/%_libexecdir/ssh/gnome-ssh-askpass
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%attr(0755,root,root) /usr/%_lib/ssh/gnome-ssh-askpass
|
||||
%dir %_libexecdir/ssh
|
||||
%attr(0755,root,root) %_libexecdir/ssh/gnome-ssh-askpass
|
||||
|
||||
%changelog
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 16 09:43:47 UTC 2011 - jengelh@medozas.de
|
||||
|
||||
- Avoid overriding libexecdir with %_lib (bnc#712025)
|
||||
- Clean up the specfile by request of Minh Ngo, details entail:
|
||||
* remove norootforbuild comments, redundant %clean section
|
||||
* run spec-beautifier over it
|
||||
- Add PIEFLAGS to compilation of askpass; fails otherwise
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 29 23:47:58 UTC 2011 - crrodriguez@opensuse.org
|
||||
|
||||
|
121
openssh.spec
121
openssh.spec
@ -15,11 +15,10 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: openssh
|
||||
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
|
||||
%define _fwdefdir %_sysconfdir/sysconfig/SuSEfirewall2.d/services
|
||||
%define _appdefdir %{_prefix}/share/X11/app-defaults
|
||||
BuildRequires: audit-devel krb5-devel openssl-devel pam-devel tcpd-devel xorg-x11-devel
|
||||
BuildRequires: libselinux-devel
|
||||
@ -29,12 +28,11 @@ Group: Productivity/Networking/SSH
|
||||
Requires: /bin/netstat
|
||||
PreReq: pwdutils %insserv_prereq %fillup_prereq coreutils
|
||||
Conflicts: nonfreessh
|
||||
AutoReqProv: on
|
||||
Version: 5.8p2
|
||||
Release: 1
|
||||
%define xversion 1.2.4.1
|
||||
Summary: Secure Shell Client and Server (Remote Login Program)
|
||||
Url: http://www.openssh.com/
|
||||
URL: http://www.openssh.com/
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: %{name}-SuSE.tar.bz2
|
||||
Source2: sshd.pamd
|
||||
@ -70,7 +68,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
License: BSD3c(or similar) ; MIT License (or similar)
|
||||
Summary: A passphrase dialog for OpenSSH and the X Window System
|
||||
Requires: openssh = %{version}
|
||||
Provides: openssh:/usr/%_lib/ssh/ssh-askpass
|
||||
Provides: openssh:%_libexecdir/ssh/ssh-askpass
|
||||
Group: Productivity/Networking/SSH
|
||||
|
||||
%description
|
||||
@ -87,8 +85,6 @@ Ssh (Secure Shell) is a program for logging into a remote machine and
|
||||
for executing commands on a remote machine. This package contains an X
|
||||
Window System passphrase dialog for OpenSSH.
|
||||
|
||||
%define prefix /usr
|
||||
|
||||
%prep
|
||||
%setup -q -b 3 -a 1 -a 5
|
||||
%patch
|
||||
@ -121,16 +117,15 @@ PIEFLAGS="-fPIE"
|
||||
%else
|
||||
PIEFLAGS="-fpie"
|
||||
%endif
|
||||
LDFLAGS="-pie" CFLAGS="$RPM_OPT_FLAGS $PIEFLAGS -fstack-protector" CXXFLAGS="$RPM_OPT_FLAGS $PIEFLAGS -fstack-protector" \
|
||||
./configure --with-ssl-engine \
|
||||
%configure --with-ssl-engine \
|
||||
CFLAGS="%optflags $PIEFLAGS -fstack-protector" \
|
||||
CXXFLAGS="%optflags $PIEFLAGS -fstack-protector" \
|
||||
LDFLAGS="-pie" \
|
||||
%if 0%{suse_version} >= 1140
|
||||
--with-libedit \
|
||||
%endif
|
||||
--mandir=%{_mandir} \
|
||||
--prefix=%{prefix} \
|
||||
--infodir=%{_infodir} \
|
||||
--sysconfdir=/etc/ssh \
|
||||
--libexecdir=%{prefix}/%_lib/ssh \
|
||||
--sysconfdir=%_sysconfdir/ssh \
|
||||
--libexecdir=%_libexecdir/ssh \
|
||||
--with-tcp-wrappers \
|
||||
--with-selinux \
|
||||
--with-pam \
|
||||
@ -145,41 +140,38 @@ make %{?_smp_mflags}
|
||||
(cd converter; make %{?_smp_mflags})
|
||||
cd contrib
|
||||
cd ../../x11-ssh-askpass-%{xversion}
|
||||
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
|
||||
./configure \
|
||||
--mandir=%{_mandir} \
|
||||
--prefix=%{_prefix} \
|
||||
--libexecdir=%{prefix}/%_lib/ssh
|
||||
%configure \
|
||||
--libexecdir=%_libdir/ssh
|
||||
xmkmf
|
||||
make includes USRLIBDIR=%_prefix/%_lib
|
||||
make %{?_smp_mflags} USRLIBDIR=%_prefix/%_lib CCOPTIONS="$RPM_OPT_FLAGS"
|
||||
make includes USRLIBDIR=%_libdir
|
||||
make %{?_smp_mflags} USRLIBDIR=%_libdir CCOPTIONS="%optflags"
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT/ install
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc/pam.d
|
||||
install -d -m 755 $RPM_BUILD_ROOT/var/lib/sshd
|
||||
install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/pam.d/sshd
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc/slp.reg.d/
|
||||
install -m 644 %{S:7} $RPM_BUILD_ROOT/etc/slp.reg.d/
|
||||
cp -a SuSE/* $RPM_BUILD_ROOT
|
||||
make DESTDIR=%buildroot/ install
|
||||
install -d -m 755 %buildroot%_sysconfdir/pam.d
|
||||
install -d -m 755 %buildroot/var/lib/sshd
|
||||
install -m 644 %{S:2} %buildroot%_sysconfdir/pam.d/sshd
|
||||
install -d -m 755 %buildroot%_sysconfdir/slp.reg.d/
|
||||
install -m 644 %{S:7} %buildroot%_sysconfdir/slp.reg.d/
|
||||
cp -a SuSE/* %buildroot
|
||||
# install shell script to automate the process of adding your public key to a remote machine
|
||||
install -m 755 contrib/ssh-copy-id $RPM_BUILD_ROOT/usr/bin
|
||||
install -m 644 contrib/ssh-copy-id.1 $RPM_BUILD_ROOT/%{_mandir}/man1
|
||||
(cd converter; make install DESTDIR=$RPM_BUILD_ROOT/)
|
||||
cd ../x11-ssh-askpass-%{xversion}
|
||||
make BINDIR=/usr/%_lib/ssh DESTDIR=$RPM_BUILD_ROOT install install.man
|
||||
rm -rf $RPM_BUILD_ROOT/usr/%_lib/ssh/ssh-askpass
|
||||
sed -e "s@usr/lib/ssh@usr/%_lib/ssh@" < %{S:8} > $RPM_BUILD_ROOT/usr/%_lib/ssh/ssh-askpass
|
||||
rm -f $RPM_BUILD_ROOT/usr/share/Ssh.bin
|
||||
sed -i -e s@/usr/libexec@/usr/%{_lib}@g $RPM_BUILD_ROOT/etc/ssh/sshd_config
|
||||
install -m 755 contrib/ssh-copy-id %buildroot%_bindir
|
||||
install -m 644 contrib/ssh-copy-id.1 %buildroot/%_mandir/man1
|
||||
(cd converter; make install DESTDIR=%buildroot/)
|
||||
cd ../x11-ssh-askpass-%xversion
|
||||
make BINDIR=%_libexecdir/ssh DESTDIR=%buildroot install install.man
|
||||
rm -rf %buildroot/%_libexecdir/ssh/ssh-askpass
|
||||
sed -e "s@usr/lib/ssh@usr/%_lib/ssh@" < %{S:8} > %buildroot/%_libexecdir/ssh/ssh-askpass
|
||||
rm -f %buildroot%_datadir/Ssh.bin
|
||||
sed -i -e s@/usr/libexec@%_libexecdir@g %buildroot%_sysconfdir/ssh/sshd_config
|
||||
#install firewall definitions format is described here:
|
||||
#/usr/share/SuSEfirewall2/services/TEMPLATE
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
|
||||
install -m 644 %{S:9} $RPM_BUILD_ROOT/%{_fwdefdir}/sshd
|
||||
#%_datadir/SuSEfirewall2/services/TEMPLATE
|
||||
mkdir -p %buildroot/%{_fwdefdir}
|
||||
install -m 644 %{S:9} %buildroot/%{_fwdefdir}/sshd
|
||||
|
||||
%pre
|
||||
getent group sshd >/dev/null || /usr/sbin/groupadd -o -r sshd
|
||||
getent passwd sshd >/dev/null || /usr/sbin/useradd -r -g sshd -d /var/lib/sshd -s /bin/false -c "SSH daemon" sshd
|
||||
getent group sshd >/dev/null || %_sbindir/groupadd -o -r sshd
|
||||
getent passwd sshd >/dev/null || %_sbindir/useradd -r -g sshd -d /var/lib/sshd -s /bin/false -c "SSH daemon" sshd
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv -n ssh sshd}
|
||||
@ -191,28 +183,25 @@ getent passwd sshd >/dev/null || /usr/sbin/useradd -r -g sshd -d /var/lib/sshd -
|
||||
%restart_on_update sshd
|
||||
%{insserv_cleanup}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir %attr(755,root,root) /var/lib/sshd
|
||||
%doc README.SuSE README.kerberos ChangeLog OVERVIEW README TODO LICENCE CREDITS
|
||||
%attr(0755,root,root) %dir /etc/ssh
|
||||
%attr(0600,root,root) %config(noreplace) /etc/ssh/moduli
|
||||
%attr(0644,root,root) %config(noreplace) /etc/ssh/ssh_config
|
||||
%attr(0640,root,root) %config(noreplace) /etc/ssh/sshd_config
|
||||
%attr(0644,root,root) %config /etc/pam.d/sshd
|
||||
%attr(0755,root,root) %config /etc/init.d/sshd
|
||||
%attr(0755,root,root) /usr/bin/ssh
|
||||
/usr/bin/scp
|
||||
/usr/bin/sftp
|
||||
/usr/bin/slogin
|
||||
/usr/bin/ssh-*
|
||||
/usr/sbin/*
|
||||
%attr(0755,root,root) %dir %_sysconfdir/ssh
|
||||
%attr(0600,root,root) %config(noreplace) %_sysconfdir/ssh/moduli
|
||||
%attr(0644,root,root) %config(noreplace) %_sysconfdir/ssh/ssh_config
|
||||
%attr(0640,root,root) %config(noreplace) %_sysconfdir/ssh/sshd_config
|
||||
%attr(0644,root,root) %config %_sysconfdir/pam.d/sshd
|
||||
%attr(0755,root,root) %config %_initddir/sshd
|
||||
%attr(0755,root,root) %_bindir/ssh
|
||||
%_bindir/scp
|
||||
%_bindir/sftp
|
||||
%_bindir/slogin
|
||||
%_bindir/ssh-*
|
||||
%_sbindir/*
|
||||
%attr(444,root,root) %doc %{_mandir}/man1/scp.1.gz
|
||||
%attr(444,root,root) %doc %{_mandir}/man1/ssh-keygen.1.gz
|
||||
%attr(444,root,root) %doc /usr/share/man/man1/ssh-keyconverter.1.gz
|
||||
%attr(444,root,root) %doc %_mandir/man1/ssh-keyconverter.1.gz
|
||||
%attr(444,root,root) %doc %{_mandir}/man1/ssh.1.gz
|
||||
%attr(444,root,root) %doc %{_mandir}/man1/slogin.1.gz
|
||||
%attr(444,root,root) %doc %{_mandir}/man1/ssh-agent.1*
|
||||
@ -222,19 +211,19 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%attr(444,root,root) %doc %{_mandir}/man1/ssh-copy-id.1*
|
||||
%attr(444,root,root) %doc %{_mandir}/man5/*
|
||||
%attr(444,root,root) %doc %{_mandir}/man8/*
|
||||
%attr(0755,root,root) %dir /usr/%_lib/ssh
|
||||
%attr(0755,root,root) /usr/%_lib/ssh/sftp-server
|
||||
%attr(0755,root,root) /usr/%_lib/ssh/ssh-keysign
|
||||
%attr(0755,root,root) /usr/%_lib/ssh/ssh-pkcs11-helper
|
||||
%dir /etc/slp.reg.d
|
||||
%config /etc/slp.reg.d/ssh.reg
|
||||
%attr(0755,root,root) %dir %_libexecdir/ssh
|
||||
%attr(0755,root,root) %_libexecdir/ssh/sftp-server
|
||||
%attr(0755,root,root) %_libexecdir/ssh/ssh-keysign
|
||||
%attr(0755,root,root) %_libexecdir/ssh/ssh-pkcs11-helper
|
||||
%dir %_sysconfdir/slp.reg.d
|
||||
%config %_sysconfdir/slp.reg.d/ssh.reg
|
||||
/var/adm/fillup-templates/sysconfig.ssh
|
||||
%config %{_fwdefdir}/sshd
|
||||
|
||||
%files askpass
|
||||
%defattr(-,root,root)
|
||||
%attr(0755,root,root) /usr/%_lib/ssh/ssh-askpass
|
||||
%attr(0755,root,root) /usr/%_lib/ssh/x11-ssh-askpass
|
||||
%attr(0755,root,root) %_libexecdir/ssh/ssh-askpass
|
||||
%attr(0755,root,root) %_libexecdir/ssh/x11-ssh-askpass
|
||||
%doc %_mandir/man1/ssh-askpass.1x.gz
|
||||
%doc %_mandir/man1/x11-ssh-askpass.1x.gz
|
||||
%_appdefdir/SshAskpass
|
||||
|
Loading…
Reference in New Issue
Block a user