integ/base/openssh-config/centos/openssh-config.spec
zhipengl 877f2b0c33 Fix user does not login within configured time(60s) login is aborted
Root cause is openssh-config need depend on openssh-clients and 
openssh-server RPM instead of openssh, so that when install
openssh-config, it can overwrite ssh_config/sshd_config that installed
by openssh-clients and openssh-server.

Below test pass
After deployment, the expected "LoginGraceTime 1m" can be seen in 
/etc/ssh/sshd_config, instead of default one.

Closes-bug: 1833469

Change-Id: Id59b728dfce39848f34279a5a2d75df417e9e100
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2019-08-16 09:35:36 +00:00

49 lines
1.2 KiB
RPMSpec

#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2019 Intel Corporation
#
Summary: openssh-config
Name: openssh-config
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: StarlingX
URL: unknown
BuildArch: noarch
Source: %name-%version.tar.gz
Requires: %{_bindir}/systemctl
Requires: openssh-clients
Requires: openssh-server
Summary: package StarlingX configuration files of openssh to system folder.
%description
package StarlingX configuration files of openssh to system folder.
%prep
%setup
%build
%install
%{__install} -d %{buildroot}%{_datadir}/starlingx
%{__install} -d %{buildroot}%{_sysconfdir}/systemd/system
%{__install} -m 644 sshd.service %{buildroot}%{_sysconfdir}/systemd/system/sshd.service
%{__install} -m 644 ssh_config %{buildroot}%{_datadir}/starlingx/ssh_config
%{__install} -m 600 sshd_config %{buildroot}%{_datadir}/starlingx/sshd_config
%post
if [ $1 -eq 1 ] ; then
# Initial installation
cp -f %{_datadir}/starlingx/ssh_config %{_sysconfdir}/ssh/ssh_config
cp -f %{_datadir}/starlingx/sshd_config %{_sysconfdir}/ssh/sshd_config
fi
%files
%{_sysconfdir}/systemd/system/sshd.service
%{_datadir}/starlingx/ssh_config
%{_datadir}/starlingx/sshd_config