8393339c47
Resolves: rhbz#2135481
139 lines
3.5 KiB
RPMSpec
139 lines
3.5 KiB
RPMSpec
# Generated by rust2rpm 22
|
|
%bcond_without check
|
|
|
|
%global crate ssh-key-dir
|
|
|
|
Name: rust-%{crate}
|
|
Version: 0.1.4
|
|
Release: 1%{?dist}
|
|
Summary: sshd AuthorizedKeysCommand to read ~/.ssh/authorized_keys.d
|
|
|
|
# Upstream license specification: Apache-2.0
|
|
License: ASL 2.0
|
|
URL: https://crates.io/crates/ssh-key-dir
|
|
Source0: %{crates_source}
|
|
# not used on Fedora
|
|
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
|
|
|
|
ExclusiveArch: %{rust_arches}
|
|
|
|
%if 0%{?rhel} && !0%{?eln}
|
|
BuildRequires: rust-toolset
|
|
%else
|
|
BuildRequires: rust-packaging >= 21
|
|
%endif
|
|
|
|
%global _description %{expand:
|
|
sshd AuthorizedKeysCommand to read key files from ~/.ssh/authorized_keys.d.}
|
|
|
|
%description %{_description}
|
|
|
|
%package -n %{crate}
|
|
Summary: %{summary}
|
|
# ASL 2.0
|
|
# MIT
|
|
# MIT or ASL 2.0
|
|
License: ASL 2.0 and MIT
|
|
Requires: openssh-server
|
|
Requires(post): openssh-server
|
|
Requires(post): systemd
|
|
Requires(postun): openssh-server
|
|
Requires(postun): systemd
|
|
|
|
%description -n %{crate} %{_description}
|
|
|
|
%files -n %{crate}
|
|
%{_libexecdir}/ssh-key-dir
|
|
%config(noreplace) %{_sysconfdir}/ssh/sshd_config.d/40-ssh-key-dir.conf
|
|
%license LICENSE
|
|
%doc README.md
|
|
|
|
%post -n %{crate}
|
|
/usr/bin/systemctl try-reload-or-restart sshd.service
|
|
|
|
%postun -n %{crate}
|
|
if [ $1 == 0 ] ; then
|
|
/usr/bin/systemctl try-reload-or-restart sshd.service
|
|
fi
|
|
|
|
%prep
|
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
|
%if 0%{?rhel} && !0%{?eln}
|
|
tar xvf %{SOURCE1}
|
|
mkdir -p .cargo
|
|
cat >.cargo/config << EOF
|
|
[source.crates-io]
|
|
replace-with = "vendored-sources"
|
|
|
|
[source.vendored-sources]
|
|
directory = "vendor"
|
|
EOF
|
|
%else
|
|
%cargo_prep
|
|
%endif
|
|
|
|
|
|
%if !0%{?rhel} || 0%{?eln}
|
|
%generate_buildrequires
|
|
%cargo_generate_buildrequires
|
|
%endif
|
|
|
|
%build
|
|
%cargo_build
|
|
|
|
%install
|
|
%if 0%{?rhel} && !0%{?eln}
|
|
%make_install INSTALL="install -p -c"
|
|
%else
|
|
%cargo_install
|
|
mv %{buildroot}%{_bindir} %{buildroot}%{_libexecdir}
|
|
install -Dpm0644 -t %{buildroot}%{_sysconfdir}/ssh/sshd_config.d conf/40-ssh-key-dir.conf
|
|
%endif
|
|
|
|
%if %{with check}
|
|
%check
|
|
%cargo_test
|
|
%endif
|
|
|
|
%changelog
|
|
* Fri Oct 14 2022 Steven Presti <spresti@redhat.com> - 0.1.4-1
|
|
- New release
|
|
- Regenerate with rust2rpm 22
|
|
|
|
* Wed Mar 09 2022 Timothée Ravier <tim@siosm.fr> - 0.1.3-2
|
|
- Remove Windows binaries from vendor tarball
|
|
|
|
* Tue Jan 18 2022 Benjamin Gilbert <bgilbert@redhat.com> - 0.1.3-1
|
|
- New release
|
|
|
|
* Mon Jan 17 2022 Sohan Kunkerkar <skunkerk@redhat.com> - 0.1.2-9
|
|
- Vendor rust dependencies on el9
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-8
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
* Mon Dec 28 13:32:56 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.1.2-6
|
|
- Rebuild
|
|
|
|
* Sun Aug 16 15:01:47 GMT 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.1.2-5
|
|
- Rebuild
|
|
|
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-4
|
|
- Second attempt - Rebuilt for
|
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
* Fri Jun 26 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.1.2-2
|
|
- Fixup license
|
|
|
|
* Fri Jun 26 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.1.2-1
|
|
- New release
|
|
|
|
* Wed Jun 17 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.1.1-1
|
|
- Initial package
|