Name: google-compute-engine-oslogin Version: 1.3.0 Release: 1%{?dist} Summary: OS Login Functionality for Google Compute Engine License: ASL 2.0 # Source was prepared from https://github.com/GoogleCloudPlatform/compute-image-packages/tree/master/google_compute_engine_oslogin # License file was copied up from the parent directory into the tarball tree Source0: %{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: make BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(json-c) BuildRequires: pam-devel BuildRequires: selinux-policy, selinux-policy-devel Requires(post): selinux-policy-base >= %{_selinux_policy_version} Requires(post): policycoreutils Requires(post): policycoreutils-python-utils Requires(pre): libselinux-utils Requires(post): libselinux-utils %description This package contains several libraries and changes to enable OS Login functionality for Google Compute Engine. %prep %autosetup %build # Hack to make compile flags work with horrid Makefile export CC="gcc %{optflags}" export CXX="g++ %{optflags}" %make_build LIBS="-lcurl -ljson-c" %install # DIST refers to the distribution base for the SELinux module. The EL7 one should be good enough. :) %make_install NSS_INSTALL_PATH=%{_libdir} PAM_INSTALL_PATH=%{_libdir}/security INSTALL_SELINUX=true DIST=".el7" # Compress the policy module bzip2 -9 %{buildroot}%{_datadir}/selinux/packages/oslogin.pp %if 0%{?fedora} < 28 || 0%{?rhel} < 8 # Generate solink files in the buildroot /sbin/ldconfig -N -r "$RPM_BUILD_ROOT" %endif %files %license LICENSE %doc README.md %{_libdir}/libnss_cache_oslogin.so.* %{_libdir}/libnss_oslogin.so.* %{_libdir}/libnss_cache_%{name}-%{version}.so %{_libdir}/libnss_%{name}-%{version}.so %{_libdir}/security/pam_oslogin_admin.so %{_libdir}/security/pam_oslogin_login.so %{_bindir}/google_authorized_keys %{_bindir}/google_oslogin_control %{_bindir}/google_oslogin_nss_cache %{_datadir}/selinux/packages/oslogin.pp.bz2 %post %{?ldconfig} %selinux_modules_install %{_datadir}/selinux/packages/oslogin.pp.bz2 %postun %{?ldconfig} %selinux_modules_uninstall oslogin %changelog * Mon May 14 07:16:23 EDT 2018 Neal Gompa - Drop vestigial spec license header, as this spec was completely rewritten from the original * Sun May 13 22:21:27 EDT 2018 Neal Gompa - Fix small errors in packaging * Fri May 11 15:04:54 EDT 2018 Neal Gompa - Initial cleaned up packaging based on Google packaging