Blame SPECS/rust-ssh-key-dir.spec

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