pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/accountsservice



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Tue Jun 26 09:54:30 UTC 2018

Modified Files:
        pkgsrc/sysutils/accountsservice: Makefile distinfo
Added Files:
        pkgsrc/sysutils/accountsservice/patches: patch-src_util.c

Log Message:
accountsservice: Requires msgfmt.  Fix build on SunOS.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/accountsservice/Makefile \
    pkgsrc/sysutils/accountsservice/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/accountsservice/patches/patch-src_util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/accountsservice/Makefile
diff -u pkgsrc/sysutils/accountsservice/Makefile:1.1 pkgsrc/sysutils/accountsservice/Makefile:1.2
--- pkgsrc/sysutils/accountsservice/Makefile:1.1        Mon Jun 11 23:55:50 2018
+++ pkgsrc/sysutils/accountsservice/Makefile    Tue Jun 26 09:54:30 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2018/06/11 23:55:50 youri Exp $
+# $NetBSD: Makefile,v 1.2 2018/06/26 09:54:30 jperkin Exp $
 
 DISTNAME=      accountsservice-0.6.42
 CATEGORIES=    sysutils
@@ -12,13 +12,16 @@ LICENSE=    gnu-gpl-v3
 
 GNU_CONFIGURE= yes
 USE_LIBTOOL=   yes
-USE_TOOLS+=    pkg-config intltool gmake autoconf autoreconf automake
+USE_TOOLS+=    pkg-config intltool gmake autoconf autoreconf automake msgfmt
 
 EGDIR=         ${PREFIX}/share/examples/accountsservice
 
 CONFIGURE_ARGS+=       --disable-systemd \
                        --sysconfdir=${EGDIR}
 
+CONFIGURE_ENV.SunOS+=  ac_cv_have_decl_WTMPX_FILENAME=yes
+CPPFLAGS.SunOS+=       -DWTMPX_FILENAME=WTMPX_FILE
+
 LDFLAGS.NetBSD+=       -lutil # pw_getpwconf
 
 ALL_ENV+=      EGDIR=${EGDIR}
Index: pkgsrc/sysutils/accountsservice/distinfo
diff -u pkgsrc/sysutils/accountsservice/distinfo:1.1 pkgsrc/sysutils/accountsservice/distinfo:1.2
--- pkgsrc/sysutils/accountsservice/distinfo:1.1        Mon Jun 11 23:55:50 2018
+++ pkgsrc/sysutils/accountsservice/distinfo    Tue Jun 26 09:54:30 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2018/06/11 23:55:50 youri Exp $
+$NetBSD: distinfo,v 1.2 2018/06/26 09:54:30 jperkin Exp $
 
 SHA1 (accountsservice-0.6.42.tar.xz) = 4461347acf3878e100afcc2e3f960fb2c9fd87f4
 RMD160 (accountsservice-0.6.42.tar.xz) = 72b3025468b855d50517729530a92e5cb31ca82e
@@ -8,4 +8,5 @@ SHA1 (patch-data_Makefile.am) = b059cd21
 SHA1 (patch-src_daemon.c) = b39c9e4fe82b086002d760eb191de55ac791dc91
 SHA1 (patch-src_libaccountsservice_act-user.c) = 50015cd0d4c32d1b97efa3620697790cca1db541
 SHA1 (patch-src_user.c) = a55c2daf41a8c833de4af0517d353d3fcb73beff
+SHA1 (patch-src_util.c) = 1acd3a534e4c6c3892078f1e89456f732bbee813
 SHA1 (patch-src_wtmp-helper.c) = eb32d598784f31e9baac44bd63ab248f5873c9c3

Added files:

Index: pkgsrc/sysutils/accountsservice/patches/patch-src_util.c
diff -u /dev/null pkgsrc/sysutils/accountsservice/patches/patch-src_util.c:1.1
--- /dev/null   Tue Jun 26 09:54:30 2018
+++ pkgsrc/sysutils/accountsservice/patches/patch-src_util.c    Tue Jun 26 09:54:30 2018
@@ -0,0 +1,54 @@
+$NetBSD: patch-src_util.c,v 1.1 2018/06/26 09:54:30 jperkin Exp $
+
+Provide getgrouplist for SunOS.  This is available in newer releases,
+so if that becomes a problem we'll need to add a configure test.
+
+--- src/util.c.orig    2013-10-15 20:25:19.000000000 +0000
++++ src/util.c
+@@ -259,6 +259,46 @@ spawn_with_login_uid (GDBusMethodInvocat
+         return ret;
+ }
+ 
++#ifdef __sun
++int
++getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
++{
++      const struct group *grp;
++      int i, maxgroups, ngroups, ret;
++
++      ret = 0;
++      ngroups = 0;
++      maxgroups = *grpcnt;
++      groups ? groups[ngroups++] = agroup : ngroups++;
++      if (maxgroups > 1)
++              groups ? groups[ngroups++] = agroup : ngroups++;
++      setgrent();
++      while ((grp = getgrent()) != NULL) {
++              if (groups) {
++                      for (i = 0; i < ngroups; i++) {
++                              if (grp->gr_gid == groups[i])
++                                      goto skip;
++                      }
++              }
++              for (i = 0; grp->gr_mem[i]; i++) {
++                      if (!strcmp(grp->gr_mem[i], uname)) {
++                              if (ngroups >= maxgroups) {
++                                      ret = -1;
++                                      break;
++                              }
++                              groups ? groups[ngroups++] = grp->gr_gid : ngroups++;
++                              break;
++                      }
++              }
++skip:
++              ;
++      }
++      endgrent();
++      *grpcnt = ngroups;
++      return (ret);
++}
++#endif
++
+ gint
+ get_user_groups (const gchar  *user,
+                  gid_t         group,



Home | Main Index | Thread Index | Old Index