# Generated by go2rpm 1.18.0 %bcond check 1 # https://github.com/openpubkey/opkssh %global goipath github.com/openpubkey/opkssh Version: 0.10.0 %gometa -L -f Name: golang-github-openpubkey-opkssh Release: %autorelease Summary: Opkssh (OpenPubkey SSH) # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND Unlicense URL: %{gourl} #Source0: %{gosource} Source0: https://thofmann.fedorapeople.org/opkssh/opkssh-%{version}-vendor.tar.bz2 # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml # The config files are not part of the package source, but created by the install script, hence we provide separate sources. # They are taken from: # https://github.com/openpubkey/opkssh/blob/main/scripts/installing.md Source3: opkssh-providers Source4: opkssh-auth_id Source5: ssh-opkssh.conf Source6: sudoers-opkssh Source7: sysuser-opkssh.conf BuildRequires: go-vendor-tools BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} %description OpenPubkey SSH is a tool which enables ssh to be used with OpenID Connect allowing SSH access to be managed via identities like alice@example.com instead of long-lived SSH keys. %package server Summary: Server configuration for opkssh (OpenPubkey SSH) Requires: %{name} = %{version}-%{release} BuildArch: noarch %description server Server configuration for opkssh (OpenPubkey SSH). %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/opkssh %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0644 -vp -D %{SOURCE3} %{buildroot}%{_sysconfdir}/opk/providers install -m 0644 -vp -D %{SOURCE4} %{buildroot}%{_sysconfdir}/opk/auth_id install -m 0600 -vp -D %{SOURCE5} %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/60-opkssh.conf install -m 0440 -vp -D %{SOURCE6} %{buildroot}%{_sysconfdir}/sudoers.d/opkssh install -m 0644 -vp -D %{SOURCE7} %{buildroot}%{_sysusersdir}/opkssh.conf %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %pre server %sysusers_create_compat %{SOURCE6} %post server chown :opkssh %{_sysconfdir}/opk/{providers,auth_id} %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs CODE-OF-CONDUCT.md CONTRIBUTING.md README.md SECURITY.md %doc scripts/install-linux-script.md scripts/installing.md %{_bindir}/opkssh %files server %config(noreplace) %{_sysconfdir}/opk/providers %config(noreplace) %{_sysconfdir}/opk/auth_id # These files should not be modified by the user, so we do not use 'noreplace' here. %config %{_sysconfdir}/ssh/sshd_config.d/60-opkssh.conf %config %{_sysconfdir}/sudoers.d/opkssh %{_sysusersdir}/opkssh.conf %changelog %autochangelog