diff --git a/base/openssh-config/centos/openssh-config.spec b/base/openssh-config/centos/openssh-config.spec index eecfb0a2a..4c11798e2 100644 --- a/base/openssh-config/centos/openssh-config.spec +++ b/base/openssh-config/centos/openssh-config.spec @@ -15,6 +15,7 @@ BuildArch: noarch Source: %name-%version.tar.gz Requires: %{_bindir}/systemctl +Requires: pam-config Requires: openssh Summary: package StarlingX configuration files of openssh to system folder. @@ -29,7 +30,6 @@ package StarlingX configuration files of openssh to system folder. %install %{__install} -d %{buildroot}%{_datadir}/starlingx %{__install} -d %{buildroot}%{_sysconfdir}/systemd/system -%{__install} -m 644 sshd.pam %{buildroot}%{_datadir}/starlingx/sshd.pam %{__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 @@ -38,13 +38,11 @@ package StarlingX configuration files of openssh to system folder. %define _pamconfdir %{_sysconfdir}/pam.d if [ $1 -eq 1 ] ; then # Initial installation - cp -f %{_datadir}/starlingx/sshd.pam %{_pamconfdir}/sshd cp -f %{_datadir}/starlingx/ssh_config %{_sysconfdir}/ssh/ssh_config cp -f %{_datadir}/starlingx/sshd_config %{_sysconfdir}/ssh/sshd_config fi %files -%{_datadir}/starlingx/sshd.pam %{_sysconfdir}/systemd/system/sshd.service %{_datadir}/starlingx/ssh_config %{_datadir}/starlingx/sshd_config diff --git a/config-files/pam-config/centos/pam-config.spec b/config-files/pam-config/centos/pam-config.spec index 565627a39..1580bbc0e 100644 --- a/config-files/pam-config/centos/pam-config.spec +++ b/config-files/pam-config/centos/pam-config.spec @@ -30,6 +30,7 @@ package StarlingX configuration files of pam to system folder. %install %{__install} -d %{buildroot}%{_pamconfdir} %{__install} -d %{buildroot}%{_datadir}/starlingx +%{__install} -m 644 sshd.pam %{buildroot}%{_datadir}/starlingx/sshd.pam %{__install} -m 644 common-account %{buildroot}%{_pamconfdir}/common-account %{__install} -m 644 common-auth %{buildroot}%{_pamconfdir}/common-auth %{__install} -m 644 common-password %{buildroot}%{_pamconfdir}/common-password @@ -41,10 +42,12 @@ package StarlingX configuration files of pam to system folder. if [ $1 -eq 1 ] ; then # Initial installation cp -f %{_datadir}/starlingx/stx.system-auth %{_pamconfdir}/system-auth + cp -f %{_datadir}/starlingx/sshd.pam %{_pamconfdir}/sshd fi %files %{_datadir}/starlingx/stx.system-auth +%{_datadir}/starlingx/sshd.pam %config(noreplace) %{_pamconfdir}/common-account %config(noreplace) %{_pamconfdir}/common-auth %config(noreplace) %{_pamconfdir}/common-password diff --git a/base/openssh-config/files/sshd.pam b/config-files/pam-config/files/sshd.pam similarity index 100% rename from base/openssh-config/files/sshd.pam rename to config-files/pam-config/files/sshd.pam