diff options
author | Zach Marano <zmarano@google.com> | 2019-05-03 13:59:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 13:59:36 -0700 |
commit | 49d2969bb81ecc1061f475ce304e6316b5980273 (patch) | |
tree | 48a349c5a26aa9c10168f33ed691a08b2e4d6633 /packages/google-compute-engine-oslogin | |
parent | fd564de77d393ac6ed078075e888737f0aa57e65 (diff) | |
download | google-compute-image-packages-49d2969bb81ecc1061f475ce304e6316b5980273.tar.gz |
RHEL 8 packages for google-compute-engine. (#753)
* RHEL 8 packages for google-compute-engine.
Diffstat (limited to 'packages/google-compute-engine-oslogin')
-rw-r--r-- | packages/google-compute-engine-oslogin/packaging/google-compute-engine-oslogin.spec | 26 | ||||
-rwxr-xr-x | packages/google-compute-engine-oslogin/packaging/setup_rpm.sh | 11 |
2 files changed, 26 insertions, 11 deletions
diff --git a/packages/google-compute-engine-oslogin/packaging/google-compute-engine-oslogin.spec b/packages/google-compute-engine-oslogin/packaging/google-compute-engine-oslogin.spec index 7e0799d..b8b0e67 100644 --- a/packages/google-compute-engine-oslogin/packaging/google-compute-engine-oslogin.spec +++ b/packages/google-compute-engine-oslogin/packaging/google-compute-engine-oslogin.spec @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Force the dist to be el7 to avoid el7.centos. +# For EL7, if building on CentOS, override dist to be el7. %if 0%{?rhel} == 7 %define dist .el7 %endif @@ -29,11 +29,17 @@ BuildRequires: boost-devel BuildRequires: gcc-c++ BuildRequires: make BuildRequires: libcurl -BuildRequires: json-c +BuildRequires: json-c-devel BuildRequires: pam-devel +%if 0%{?rhel} == 8 +BuildRequires: python3-policycoreutils +Requires: python3-policycoreutils +%else BuildRequires: policycoreutils-python -Requires: boost-regex Requires: policycoreutils-python +%endif +Requires: boost-regex +Requires: json-c %define pam_install_path /%{_lib}/security @@ -41,6 +47,8 @@ Requires: policycoreutils-python This package contains several libraries and changes to enable OS Login functionality for Google Compute Engine. +%global debug_package %{nil} + %prep %setup @@ -53,10 +61,14 @@ make install DESTDIR=%{buildroot} NSS_INSTALL_PATH=/%{_lib} PAM_INSTALL_PATH=%{p %files %doc -/%{_lib}/libnss_%{name}-%{version}.so -/%{_lib}/libnss_cache_%{name}-%{version}.so -%{pam_install_path}/pam_oslogin_admin.so -%{pam_install_path}/pam_oslogin_login.so +%attr(0755,-,-) /%{_lib}/libnss_%{name}-%{version}.so +%attr(0755,-,-) /%{_lib}/libnss_cache_%{name}-%{version}.so +%if 0%{?rhel} == 8 +/%{_lib}/libnss_oslogin.so.2 +/%{_lib}/libnss_cache_oslogin.so.2 +%endif +%attr(0755,-,-) %{pam_install_path}/pam_oslogin_admin.so +%attr(0755,-,-) %{pam_install_path}/pam_oslogin_login.so /usr/bin/google_authorized_keys /usr/bin/google_oslogin_control /usr/bin/google_oslogin_nss_cache diff --git a/packages/google-compute-engine-oslogin/packaging/setup_rpm.sh b/packages/google-compute-engine-oslogin/packaging/setup_rpm.sh index f174efe..519247d 100755 --- a/packages/google-compute-engine-oslogin/packaging/setup_rpm.sh +++ b/packages/google-compute-engine-oslogin/packaging/setup_rpm.sh @@ -24,11 +24,14 @@ if [[ $(basename "$working_dir") != $NAME ]]; then exit 1 fi -# Build dependencies. -sudo yum -y install make gcc-c++ libcurl-devel json-c json-c-devel pam-devel policycoreutils-python boost-devel +sudo yum -y install rpmdevtools make gcc-c++ json-c \ + libcurl-devel pam-devel boost-devel json-c-devel -# RPM creation tools. -sudo yum -y install rpmdevtools +if grep -q '^\(CentOS\|Red Hat\)[^0-9]*8\..' /etc/redhat-release; then + sudo yum -y install python3-policycoreutils +else + sudo yum -y install policycoreutils-python +fi rm -rf /tmp/rpmpackage mkdir -p ${rpm_working_dir}/{SOURCES,SPECS} |