- Use %{with ...} instead of 0%{with ...}
OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=278
This commit is contained in:
parent
77273f8679
commit
219dd97d90
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 14 15:06:19 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
- Use %{with ...} instead of 0%{with ...}
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 11 09:28:30 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
Fri Oct 11 09:28:30 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
34
openssh.spec
34
openssh.spec
@ -144,12 +144,12 @@ Patch200: 0001-auth-pam-Immediately-report-instructions-to-clients-and-fix
|
|||||||
# PATCH-FIX-UPSTREAM -- https://bugzilla.mindrot.org/show_bug.cgi?id=3655#c4
|
# PATCH-FIX-UPSTREAM -- https://bugzilla.mindrot.org/show_bug.cgi?id=3655#c4
|
||||||
Patch201: fix-x11-regression-bsc1229449.patch
|
Patch201: fix-x11-regression-bsc1229449.patch
|
||||||
# 1000 - 2000 -- Conditional patches
|
# 1000 - 2000 -- Conditional patches
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
# PATCH-FIX-OPENSUSE bsc#1211301 Add crypto-policies support
|
# PATCH-FIX-OPENSUSE bsc#1211301 Add crypto-policies support
|
||||||
Patch1000: openssh-9.6p1-crypto-policies.patch
|
Patch1000: openssh-9.6p1-crypto-policies.patch
|
||||||
Patch1001: openssh-9.6p1-crypto-policies-man.patch
|
Patch1001: openssh-9.6p1-crypto-policies-man.patch
|
||||||
%endif
|
%endif
|
||||||
%if 0%{with allow_root_password_login_by_default}
|
%if %{with allow_root_password_login_by_default}
|
||||||
# PATCH-FIX-SLE Allow root login with password by default (for SLE12 and SLE15)
|
# PATCH-FIX-SLE Allow root login with password by default (for SLE12 and SLE15)
|
||||||
Patch1002: openssh-7.7p1-allow_root_password_login.patch
|
Patch1002: openssh-7.7p1-allow_root_password_login.patch
|
||||||
%endif
|
%endif
|
||||||
@ -164,7 +164,7 @@ BuildRequires: libselinux-devel
|
|||||||
%if %{with ldap}
|
%if %{with ldap}
|
||||||
BuildRequires: openldap2-devel
|
BuildRequires: openldap2-devel
|
||||||
%endif
|
%endif
|
||||||
%if 0%{with openssl11}
|
%if %{with openssl11}
|
||||||
BuildRequires: libopenssl-1_1-devel
|
BuildRequires: libopenssl-1_1-devel
|
||||||
BuildRequires: openssl-1_1
|
BuildRequires: openssl-1_1
|
||||||
%else
|
%else
|
||||||
@ -225,7 +225,7 @@ clients.
|
|||||||
Summary: SSH (Secure Shell) server
|
Summary: SSH (Secure Shell) server
|
||||||
Group: Productivity/Networking/SSH
|
Group: Productivity/Networking/SSH
|
||||||
Requires: %{name}-common = %{version}-%{release}
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
Requires: crypto-policies >= 20220824
|
Requires: crypto-policies >= 20220824
|
||||||
%endif
|
%endif
|
||||||
Recommends: audit
|
Recommends: audit
|
||||||
@ -234,7 +234,7 @@ Requires(pre): grep
|
|||||||
Requires(post): %fillup_prereq
|
Requires(post): %fillup_prereq
|
||||||
Requires(post): permissions
|
Requires(post): permissions
|
||||||
Provides: openssh:%{_sbindir}/sshd
|
Provides: openssh:%{_sbindir}/sshd
|
||||||
%if 0%{with allow_root_password_login_by_default}
|
%if %{with allow_root_password_login_by_default}
|
||||||
# For a brief period of time this package existed in SLE/Leap.
|
# For a brief period of time this package existed in SLE/Leap.
|
||||||
# It was removed before GM but some people might have it from
|
# It was removed before GM but some people might have it from
|
||||||
# a beta distribution version (boo#1227350)
|
# a beta distribution version (boo#1227350)
|
||||||
@ -254,7 +254,7 @@ also be forwarded over the secure channel.
|
|||||||
This package contains the Secure Shell daemon, which allows clients to
|
This package contains the Secure Shell daemon, which allows clients to
|
||||||
securely connect to your server.
|
securely connect to your server.
|
||||||
|
|
||||||
%if 0%{with allow_root_password_login_by_default}
|
%if %{with allow_root_password_login_by_default}
|
||||||
%package server-config-disallow-rootlogin
|
%package server-config-disallow-rootlogin
|
||||||
Summary: Config to disallow password root logins to sshd
|
Summary: Config to disallow password root logins to sshd
|
||||||
Group: Productivity/Networking/SSH
|
Group: Productivity/Networking/SSH
|
||||||
@ -283,7 +283,7 @@ ssh-copy-id(1).
|
|||||||
%package clients
|
%package clients
|
||||||
Summary: SSH (Secure Shell) client applications
|
Summary: SSH (Secure Shell) client applications
|
||||||
Group: Productivity/Networking/SSH
|
Group: Productivity/Networking/SSH
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
Requires: crypto-policies >= 20220824
|
Requires: crypto-policies >= 20220824
|
||||||
%endif
|
%endif
|
||||||
Requires: %{name}-common = %{version}-%{release}
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
@ -432,7 +432,7 @@ install -m 755 contrib/ssh-copy-id %{buildroot}%{_bindir}
|
|||||||
install -m 644 contrib/ssh-copy-id.1 %{buildroot}%{_mandir}/man1
|
install -m 644 contrib/ssh-copy-id.1 %{buildroot}%{_mandir}/man1
|
||||||
sed -i -e s@%{_prefix}/libexec@%{_libexecdir}@g %{buildroot}%{_sysconfdir}/ssh/sshd_config
|
sed -i -e s@%{_prefix}/libexec@%{_libexecdir}@g %{buildroot}%{_sysconfdir}/ssh/sshd_config
|
||||||
|
|
||||||
%if 0%{with allow_root_password_login_by_default}
|
%if %{with allow_root_password_login_by_default}
|
||||||
echo "PermitRootLogin prohibit-password" > %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
echo "PermitRootLogin prohibit-password" > %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
||||||
%else
|
%else
|
||||||
echo "PermitRootLogin yes" > %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/50-permit-root-login.conf
|
echo "PermitRootLogin yes" > %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/50-permit-root-login.conf
|
||||||
@ -444,14 +444,14 @@ mkdir -p %{buildroot}%{_distconfdir}/ssh/ssh{,d}_config.d
|
|||||||
mv %{buildroot}%{_sysconfdir}/ssh/moduli %{buildroot}%{_distconfdir}/ssh/
|
mv %{buildroot}%{_sysconfdir}/ssh/moduli %{buildroot}%{_distconfdir}/ssh/
|
||||||
mv %{buildroot}%{_sysconfdir}/ssh/ssh_config %{buildroot}%{_distconfdir}/ssh/
|
mv %{buildroot}%{_sysconfdir}/ssh/ssh_config %{buildroot}%{_distconfdir}/ssh/
|
||||||
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config %{buildroot}%{_distconfdir}/ssh/
|
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config %{buildroot}%{_distconfdir}/ssh/
|
||||||
%if 0%{with allow_root_password_login_by_default}
|
%if %{with allow_root_password_login_by_default}
|
||||||
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/51-permit-root-login.conf %{buildroot}%{_distconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/51-permit-root-login.conf %{buildroot}%{_distconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
||||||
%else
|
%else
|
||||||
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/50-permit-root-login.conf %{buildroot}%{_distconfdir}/ssh/sshd_config.d/50-permit-root-login.conf
|
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/50-permit-root-login.conf %{buildroot}%{_distconfdir}/ssh/sshd_config.d/50-permit-root-login.conf
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
install -m 644 ssh_config_suse %{buildroot}%{_sysconfdir}/ssh/ssh_config.d/50-suse.conf
|
install -m 644 ssh_config_suse %{buildroot}%{_sysconfdir}/ssh/ssh_config.d/50-suse.conf
|
||||||
%if %{defined _distconfdir}
|
%if %{defined _distconfdir}
|
||||||
install -m 644 sshd_config_suse_cp %{buildroot}%{_distconfdir}/ssh/sshd_config.d/40-suse-crypto-policies.conf
|
install -m 644 sshd_config_suse_cp %{buildroot}%{_distconfdir}/ssh/sshd_config.d/40-suse-crypto-policies.conf
|
||||||
@ -484,7 +484,7 @@ install -m 644 %{SOURCE14} %{buildroot}%{_sysusersdir}/sshd.conf
|
|||||||
#
|
#
|
||||||
# this shows up earlier because otherwise the %%expand of
|
# this shows up earlier because otherwise the %%expand of
|
||||||
# the macro is too late.
|
# the macro is too late.
|
||||||
%if 0%{with openssl11}
|
%if %{with openssl11}
|
||||||
%define opensslbin openssl-1_1
|
%define opensslbin openssl-1_1
|
||||||
%else
|
%else
|
||||||
%define opensslbin openssl
|
%define opensslbin openssl
|
||||||
@ -514,7 +514,7 @@ test -f /etc/ssh/sshd_config.rpmsave && mv -v /etc/ssh/sshd_config.rpmsave /etc/
|
|||||||
%{fillup_only -n ssh}
|
%{fillup_only -n ssh}
|
||||||
%service_add_post sshd.service sshd.socket
|
%service_add_post sshd.service sshd.socket
|
||||||
|
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
%if ! %{defined _distconfdir}
|
%if ! %{defined _distconfdir}
|
||||||
test -f /etc/ssh/sshd_config && (grep -q "^Include /etc/ssh/sshd_config\.d/\*\.conf" /etc/ssh/sshd_config || ( \
|
test -f /etc/ssh/sshd_config && (grep -q "^Include /etc/ssh/sshd_config\.d/\*\.conf" /etc/ssh/sshd_config || ( \
|
||||||
echo "WARNING: /etc/ssh/sshd_config doesn't include config files from"
|
echo "WARNING: /etc/ssh/sshd_config doesn't include config files from"
|
||||||
@ -538,7 +538,7 @@ else
|
|||||||
%service_del_postun sshd.service sshd.socket
|
%service_del_postun sshd.service sshd.socket
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
%if ! %{defined _distconfdir}
|
%if ! %{defined _distconfdir}
|
||||||
%post server-config-disallow-rootlogin
|
%post server-config-disallow-rootlogin
|
||||||
test -f /etc/ssh/sshd_config && (grep -q "^Include /etc/ssh/sshd_config\.d/\*\.conf" /etc/ssh/sshd_config || ( \
|
test -f /etc/ssh/sshd_config && (grep -q "^Include /etc/ssh/sshd_config\.d/\*\.conf" /etc/ssh/sshd_config || ( \
|
||||||
@ -563,7 +563,7 @@ test -f /etc/ssh/sshd_config.rpmsave && mv -v /etc/ssh/sshd_config.rpmsave /etc/
|
|||||||
test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ssh/ssh_config.rpmsave.old ||:
|
test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ssh/ssh_config.rpmsave.old ||:
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
%if ! %{defined _distconfdir}
|
%if ! %{defined _distconfdir}
|
||||||
%post clients
|
%post clients
|
||||||
test -f /etc/ssh/ssh_config && (grep -q "^Include /etc/ssh/ssh_config\.d/\*\.conf" /etc/ssh/ssh_config || ( \
|
test -f /etc/ssh/ssh_config && (grep -q "^Include /etc/ssh/ssh_config\.d/\*\.conf" /etc/ssh/ssh_config || ( \
|
||||||
@ -621,7 +621,7 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
|||||||
%attr(0640,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
|
%attr(0640,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
|
||||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/sshd
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/sshd
|
||||||
%endif
|
%endif
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
%if %{defined _distconfdir}
|
%if %{defined _distconfdir}
|
||||||
%attr(0600,root,root) %config(noreplace) %{_distconfdir}/ssh/sshd_config.d/40-suse-crypto-policies.conf
|
%attr(0600,root,root) %config(noreplace) %{_distconfdir}/ssh/sshd_config.d/40-suse-crypto-policies.conf
|
||||||
%else
|
%else
|
||||||
@ -648,7 +648,7 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
|||||||
%config %{_fwdefdir}/sshd
|
%config %{_fwdefdir}/sshd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{with allow_root_password_login_by_default}
|
%if %{with allow_root_password_login_by_default}
|
||||||
%files server-config-disallow-rootlogin
|
%files server-config-disallow-rootlogin
|
||||||
%if %{defined _distconfdir}
|
%if %{defined _distconfdir}
|
||||||
%{_distconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
%{_distconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
||||||
@ -665,7 +665,7 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files clients
|
%files clients
|
||||||
%if 0%{with crypto_policies}
|
%if %{with crypto_policies}
|
||||||
%dir %attr(0755,root,root) %{_sysconfdir}/ssh/ssh_config.d
|
%dir %attr(0755,root,root) %{_sysconfdir}/ssh/ssh_config.d
|
||||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config.d/50-suse.conf
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config.d/50-suse.conf
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user