Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2018 13:16:52 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r472318 - in branches/2018Q2/sysutils/google-compute-engine-oslogin: . files
Message-ID:  <201806131316.w5DDGqcR029929@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Wed Jun 13 13:16:51 2018
New Revision: 472318
URL: https://svnweb.freebsd.org/changeset/ports/472318

Log:
  MFH: r466686 r471978 r472316
  
  sysutils/google-compute-engine-oslogin: update to version 1.1.5
  
  PR:		226936
  Submitted by:	Helen Koike <helen.koike@collabora.com> (maintainer)
  
  Mark as broken on various tier-2 archs.
  
  Approved by:	portmgr (tier-2 blanket)
  
  sysutils/google-compute-engine-oslogin: fix oslogin and update to 1.3.0
  
  PR:		228949
  Submitted by:	Helen Koike <helen.koike@collabora.com> (maintainer)
  
  Approved by:	ports-secteam (implicit)

Added:
  branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c
     - copied unchanged from r472316, head/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c
  branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc
     - copied unchanged from r472316, head/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc
Deleted:
  branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-Makefile
Modified:
  branches/2018Q2/sysutils/google-compute-engine-oslogin/Makefile
  branches/2018Q2/sysutils/google-compute-engine-oslogin/distinfo   (contents, props changed)
  branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control   (contents, props changed)
  branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc   (contents, props changed)
  branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc   (contents, props changed)
  branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc   (contents, props changed)
  branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc   (contents, props changed)
  branches/2018Q2/sysutils/google-compute-engine-oslogin/pkg-plist   (contents, props changed)
Directory Properties:
  branches/2018Q2/   (props changed)

Modified: branches/2018Q2/sysutils/google-compute-engine-oslogin/Makefile
==============================================================================
--- branches/2018Q2/sysutils/google-compute-engine-oslogin/Makefile	Wed Jun 13 13:13:36 2018	(r472317)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/Makefile	Wed Jun 13 13:16:51 2018	(r472318)
@@ -1,8 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	google-compute-engine-oslogin
-DISTVERSION=	1.1.2
-PORTREVISION=	1
+DISTVERSION=	1.3.0
 CATEGORIES=	sysutils
 
 MAINTAINER=	helen.koike@collabora.com
@@ -11,6 +10,10 @@ COMMENT=	OS Login Guest Environment for Google Compute
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/../LICENSE
 
+BROKEN_mips=		fails to compile: utils/oslogin_utils.cc:16:23: curl/curl.h: No such file or directory
+BROKEN_mips64=		fails to compile: utils/oslogin_utils.cc:16:23: curl/curl.h: No such file or directory
+BROKEN_powerpc64=	fails to compile: utils/oslogin_utils.cc:16:23: curl/curl.h: No such file or directory
+
 LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libjson-c.so:devel/json-c
 RUN_DEPENDS=	gsed:textproc/gsed \
@@ -22,7 +25,7 @@ USE_GCC=	any
 USE_GITHUB=	yes
 GH_ACCOUNT=	GoogleCloudPlatform
 GH_PROJECT=	compute-image-packages
-GH_TAGNAME=	20171213
+GH_TAGNAME=	20180611
 MAKE_ARGS=	JSON_INCLUDE_PATH=${LOCALBASE}/include/json-c \
 		BIN_INSTALL_PATH=/bin \
 		PAM_INSTALL_PATH=/lib \
@@ -39,6 +42,7 @@ post-patch:
 
 post-install:
 	${LN} -sf libnss_${PORTNAME}-${DISTVERSION}.so ${STAGEDIR}${PREFIX}/lib/nss_oslogin.so.1
+	${LN} -sf libnss_cache_${PORTNAME}-${DISTVERSION}.so ${STAGEDIR}${PREFIX}/lib/nss_cache_oslogin.so.1
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/google_authorized_keys \
 		${STAGEDIR}${PREFIX}/lib/libnss_google-compute-engine-oslogin-${DISTVERSION}.so \
 		${STAGEDIR}${PREFIX}/lib/pam_oslogin_admin.so \

Modified: branches/2018Q2/sysutils/google-compute-engine-oslogin/distinfo
==============================================================================
--- branches/2018Q2/sysutils/google-compute-engine-oslogin/distinfo	Wed Jun 13 13:13:36 2018	(r472317)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/distinfo	Wed Jun 13 13:16:51 2018	(r472318)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1514471176
-SHA256 (GoogleCloudPlatform-compute-image-packages-1.1.2-20171213_GH0.tar.gz) = 483d97c6d64cd7d9002247db63af8cb591e526a09ce52fd8d545c66da3ebb181
-SIZE (GoogleCloudPlatform-compute-image-packages-1.1.2-20171213_GH0.tar.gz) = 131055
+TIMESTAMP = 1528807879
+SHA256 (GoogleCloudPlatform-compute-image-packages-1.3.0-20180611_GH0.tar.gz) = f71bdc6d01cff014bb4d066096be9a6e067fd3028c730cc4c9557001ec99ab6e
+SIZE (GoogleCloudPlatform-compute-image-packages-1.3.0-20180611_GH0.tar.gz) = 143678

Modified: branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control
==============================================================================
--- branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control	Wed Jun 13 13:13:36 2018	(r472317)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control	Wed Jun 13 13:16:51 2018	(r472318)
@@ -1,6 +1,6 @@
---- bin/google_oslogin_control.orig	2017-12-13 23:47:59 UTC
+--- bin/google_oslogin_control.orig	2018-06-11 17:16:50 UTC
 +++ bin/google_oslogin_control
-@@ -65,29 +65,31 @@ overwrite_file() {
+@@ -65,24 +65,26 @@ overwrite_file() {
  
  remove_from_config() {
    config=$1
@@ -9,7 +9,11 @@
  }
  
  remove_from_nss_config() {
+-  sed -i '/^passwd:/ s/ cache_oslogin oslogin//' ${nss_config}.new
+-  sed -i '/^passwd:/ s/ cache oslogin//' ${nss_config}.new
 -  sed -i '/^passwd:/ s/ oslogin//' ${nss_config}.new
++  gsed -i '/^passwd:/ s/ cache_oslogin oslogin//' ${nss_config}.new
++  gsed -i '/^passwd:/ s/ cache oslogin//' ${nss_config}.new
 +  gsed -i '/^passwd:/ s/ oslogin//' ${nss_config}.new
  }
  
@@ -23,24 +27,27 @@
  
  add_to_nss_config() {
    remove_from_nss_config
--  sed -i '/^passwd:/ s/$/ oslogin/' ${nss_config}.new
-+  gsed -i '/^passwd:/ s/$/ oslogin/' ${nss_config}.new
+-  sed -i '/^passwd:/ s/$/ cache_oslogin oslogin/' ${nss_config}.new
++  gsed -i '/^passwd:/ s/$/ cache_oslogin oslogin/' ${nss_config}.new
 +  # Replace compat by files (as compat cannot be used with other sources)
 +  gsed -i '/^passwd:/ s/compat/files/' ${nss_config}.new
  }
  
  add_to_pam_config() {
-   remove_from_config ${pam_config}
--  sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new
--  sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new
--  sed -i "/pam_loginuid.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new
-+  gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new
-+  gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new
-+  gsed -i "/session.*pam_permit.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new
+@@ -99,9 +101,9 @@ ${pam_homedir}
+ "
+     echo "${added_config}$(cat ${pam_config}.new)" > ${pam_config}.new
+   else
+-    sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new
+-    sed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new
+-    sed -i "/pam_loginuid.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new
++    gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_admin}" ${pam_config}.new
++    gsed -i "/account.*pam_nologin.so/ a${added_comment}\n${pam_login}" ${pam_config}.new
++    gsed -i "/session.*pam_permit.so/ a${added_comment}\n${pam_homedir}" ${pam_config}.new
+   fi
  }
  
- restart_service() {
-@@ -100,7 +102,7 @@ restart_service() {
+@@ -115,7 +117,7 @@ restart_service() {
      fi
    fi
    if which service > /dev/null 2>&1; then

Copied: branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c (from r472316, head/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c	Wed Jun 13 13:16:51 2018	(r472318, copy of r472316, head/sysutils/google-compute-engine-oslogin/files/patch-libnss__cache__oslogin_nss__cache__oslogin.c)
@@ -0,0 +1,46 @@
+--- libnss_cache_oslogin/nss_cache_oslogin.c.orig	2018-06-11 17:16:50 UTC
++++ libnss_cache_oslogin/nss_cache_oslogin.c
+@@ -16,6 +16,7 @@
+ 
+ #include "nss_cache_oslogin.h"
+ 
++#include <nsswitch.h>
+ #include <sys/mman.h>
+ 
+ // Locking implementation: use pthreads.
+@@ -32,7 +33,7 @@ static pthread_mutex_t mutex = PTHREAD_M
+ 
+ static FILE *p_file = NULL;
+ static char p_filename[NSS_CACHE_OSLOGIN_PATH_LENGTH] =
+-    "/etc/oslogin_passwd.cache";
++    "/usr/local/etc/oslogin_passwd.cache";
+ #ifdef BSD
+ extern int fgetpwent_r(FILE *, struct passwd *, char *, size_t,
+                        struct passwd **);
+@@ -435,3 +436,26 @@ enum nss_status _nss_cache_oslogin_getpw
+ 
+   return ret;
+ }
++
++NSS_METHOD_PROTOTYPE(__nss_compat_getpwnam_r);
++NSS_METHOD_PROTOTYPE(__nss_compat_getpwuid_r);
++NSS_METHOD_PROTOTYPE(__nss_compat_getpwent_r);
++NSS_METHOD_PROTOTYPE(__nss_compat_setpwent);
++NSS_METHOD_PROTOTYPE(__nss_compat_endpwent);
++
++static ns_mtab methods[] = {
++    { NSDB_PASSWD, "getpwnam_r", __nss_compat_getpwnam_r, (void*)_nss_cache_oslogin_getpwnam_r },
++    { NSDB_PASSWD, "getpwuid_r", __nss_compat_getpwuid_r, (void*)_nss_cache_oslogin_getpwuid_r },
++    { NSDB_PASSWD, "getpwent_r", __nss_compat_getpwent_r, (void*)_nss_cache_oslogin_getpwent_r },
++    { NSDB_PASSWD, "endpwent",   __nss_compat_endpwent,   (void*)_nss_cache_oslogin_endpwent },
++    { NSDB_PASSWD, "setpwent",   __nss_compat_setpwent,   (void*)_nss_cache_oslogin_setpwent },
++};
++
++ns_mtab *
++nss_module_register (const char *name, unsigned int *size,
++		                          nss_module_unregister_fn *unregister)
++{
++    *size = sizeof (methods) / sizeof (methods[0]);
++    *unregister = NULL;
++    return (methods);
++}

Copied: branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc (from r472316, head/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc	Wed Jun 13 13:16:51 2018	(r472318, copy of r472316, head/sysutils/google-compute-engine-oslogin/files/patch-nss__cache_nss__cache.cc)
@@ -0,0 +1,13 @@
+--- nss_cache/nss_cache.cc.orig	2018-06-11 17:16:50 UTC
++++ nss_cache/nss_cache.cc
+@@ -31,8 +31,8 @@ using oslogin_utils::MutexLock;
+ using oslogin_utils::NssCache;
+ 
+ // File paths for the nss cache file.
+-static const char kDefaultFilePath[] = "/etc/oslogin_passwd.cache";
+-static const char kDefaultBackupFilePath[] = "/etc/oslogin_passwd.cache.bak";
++static const char kDefaultFilePath[] = "/usr/local/etc/oslogin_passwd.cache";
++static const char kDefaultBackupFilePath[] = "/usr/local/etc/oslogin_passwd.cache.bak";
+ 
+ // Local NSS Cache size. This affects the maximum number of passwd entries per
+ // http request.

Modified: branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc
==============================================================================
--- branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc	Wed Jun 13 13:13:36 2018	(r472317)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-nss__module_nss__oslogin.cc	Wed Jun 13 13:16:51 2018	(r472318)
@@ -1,4 +1,4 @@
---- nss_module/nss_oslogin.cc.orig	2017-12-13 23:47:59 UTC
+--- nss_module/nss_oslogin.cc.orig	2018-06-11 17:16:50 UTC
 +++ nss_module/nss_oslogin.cc
 @@ -16,6 +16,7 @@
  #include <errno.h>
@@ -8,10 +8,13 @@
  #include <pthread.h>
  #include <pwd.h>
  #include <sys/types.h>
-@@ -150,4 +151,27 @@ int _nss_oslogin_getpwent_r(struct passw
-   }
-   return NSS_STATUS_SUCCESS;
- }
+@@ -103,4 +104,30 @@ int _nss_oslogin_getpwnam_r(const char *
+ // nss_getpwent_r() is intentionally left unimplemented. This functionality is
+ // now covered by the nss_cache binary and nss_cache module.
+ 
++void _nss_oslogin_getpwent_r() {}
++void _nss_oslogin_endpwent() {}
++void _nss_oslogin_setpwent() {}
 +
 +NSS_METHOD_PROTOTYPE(__nss_compat_getpwnam_r);
 +NSS_METHOD_PROTOTYPE(__nss_compat_getpwuid_r);

Modified: branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc
==============================================================================
--- branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc	Wed Jun 13 13:13:36 2018	(r472317)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__admin.cc	Wed Jun 13 13:16:51 2018	(r472318)
@@ -1,4 +1,4 @@
---- pam_module/pam_oslogin_admin.cc.orig	2017-12-13 23:47:59 UTC
+--- pam_module/pam_oslogin_admin.cc.orig	2018-06-11 17:16:50 UTC
 +++ pam_module/pam_oslogin_admin.cc
 @@ -14,7 +14,6 @@
  

Modified: branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc
==============================================================================
--- branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc	Wed Jun 13 13:13:36 2018	(r472317)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-pam__module_pam__oslogin__login.cc	Wed Jun 13 13:16:51 2018	(r472318)
@@ -1,4 +1,4 @@
---- pam_module/pam_oslogin_login.cc.orig	2017-12-13 23:47:59 UTC
+--- pam_module/pam_oslogin_login.cc.orig	2018-06-11 17:16:50 UTC
 +++ pam_module/pam_oslogin_login.cc
 @@ -14,7 +14,6 @@
  

Modified: branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc
==============================================================================
--- branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc	Wed Jun 13 13:13:36 2018	(r472317)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/files/patch-utils_oslogin__utils.cc	Wed Jun 13 13:16:51 2018	(r472318)
@@ -1,6 +1,6 @@
---- utils/oslogin_utils.cc.orig	2017-12-13 23:47:59 UTC
+--- utils/oslogin_utils.cc.orig	2018-06-11 17:16:50 UTC
 +++ utils/oslogin_utils.cc
-@@ -218,7 +218,14 @@ bool ValidatePasswd(struct passwd* resul
+@@ -255,7 +255,14 @@ bool ValidatePasswd(struct passwd* resul
      }
    }
    if (strlen(result->pw_shell) == 0) {

Modified: branches/2018Q2/sysutils/google-compute-engine-oslogin/pkg-plist
==============================================================================
--- branches/2018Q2/sysutils/google-compute-engine-oslogin/pkg-plist	Wed Jun 13 13:13:36 2018	(r472317)
+++ branches/2018Q2/sysutils/google-compute-engine-oslogin/pkg-plist	Wed Jun 13 13:16:51 2018	(r472318)
@@ -1,6 +1,9 @@
 bin/google_authorized_keys
 bin/google_oslogin_control
+bin/google_oslogin_nss_cache
+lib/libnss_cache_google-compute-engine-oslogin-%%DISTVERSION%%.so
 lib/libnss_google-compute-engine-oslogin-%%DISTVERSION%%.so
 lib/nss_oslogin.so.1
+lib/nss_cache_oslogin.so.1
 lib/pam_oslogin_admin.so
 lib/pam_oslogin_login.so



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806131316.w5DDGqcR029929>