23245612 Deliver accountsservice 0.6.40 in Solaris
authorNiveditha Rau <Niveditha.Rau@Oracle.COM>
Fri, 01 Jul 2016 11:41:30 +0000
changeset 6331 076f03f94582
parent 6330 1b6d90edded0
child 6332 5256a695cfc2
23245612 Deliver accountsservice 0.6.40 in Solaris PSARC/2016/323 GNOME Login and Session Management
components/desktop/accountsservice/Makefile
components/desktop/accountsservice/accountsservice.p5m
components/desktop/accountsservice/files/accountsservice.xml
components/desktop/accountsservice/files/svc-accountsservice
components/desktop/accountsservice/patches/0001-WTMP_FILE.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/accountsservice/Makefile	Fri Jul 01 11:41:30 2016 +0000
@@ -0,0 +1,98 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+BUILD_BITS =            64_and_32
+# All components using gobject-introspection must be built with gcc as
+# gobject-introspection does not produce correct results when using Studio.
+COMPILER =              gcc
+include ../../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		accountsservice
+COMPONENT_VERSION=	0.6.40
+COMPONENT_PROJECT_URL=	http://freedesktop.org/wiki/Software/AccountsService/
+COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
+COMPONENT_ARCHIVE_HASH= \
+	sha256:f04f756600cbab558671658ab8e77212de2a000c07bc0469e7b51541871fcb2b
+COMPONENT_ARCHIVE_URL=	http://freedesktop.org/software/accountsservice/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB=	gnome/libraries
+
+TPNO=			25838
+
+TEST_TARGET = $(NO_TESTS)
+
+# Needs updated glib2, not available on S11.
+ifeq ($(BUILD_TYPE), evaluation)
+BUILD_32_and_64=
+INSTALL_32_and_64=
+PUBLISH_STAMP=
+endif
+
+include $(WS_MAKE_RULES)/common.mk
+
+# Assumes GNU xgettext in PATH
+COMPONENT_BUILD_ENV += PATH=$(GNUBIN):$(PATH)
+CONFIGURE_ENV += PATH=$(GNUBIN):$(PATH)
+
+# Make sure we haven't broken the SMF manifest formatting
+COMPONENT_PREP_ACTION += \
+    ( /usr/sbin/svccfg validate $(COMPONENT_DIR)/files/accountsservice.xml );
+
+# Solaris doesn't have a defined authpriv facility in syslog, so map it to
+# an unused one for now
+CPPFLAGS += -DLOG_AUTHPRIV='(10<<3)'
+
+CONFIGURE_OPTIONS += --enable-docbook-docs 
+CONFIGURE_OPTIONS += --enable-gtk-doc
+CONFIGURE_OPTIONS += --enable-shared
+CONFIGURE_OPTIONS += --disable-static
+CONFIGURE_OPTIONS += --disable-systemd
+CONFIGURE_OPTIONS += --with-pic
+CONFIGURE_OPTIONS += --libexecdir="$(USRLIBDIR)"
+CONFIGURE_OPTIONS += --sysconfdir="$(ETCDIR)"
+
+# Solaris reserves uids < 100 for system accounts
+CONFIGURE_OPTIONS += --with-minimum-uid=100
+
+# Solaris does not have a wheel group, so we use the "sysadmin" group to
+# determine which accounts should be ACT_USER_ACCOUNT_TYPE_ADMINISTRATOR
+CONFIGURE_OPTIONS += --enable-admin-group=sysadmin
+
+# Tell g-ir-scanner not to cache results in homedir of user running the build
+COMPONENT_BUILD_ENV += GI_SCANNER_DISABLE_CACHE=""
+
+# Only need to install library from 32-bit builds, everything else overlaps
+# with 64-bit builds
+COMPONENT_INSTALL_ARGS.32 += SUBDIRS=src/libaccountsservice
+COMPONENT_INSTALL_ARGS += $(COMPONENT_INSTALL_ARGS.$(BITS))
+
+# SMF manifest & method
+PKG_PROTO_DIRS += $(COMPONENT_DIR)/files
+
+REQUIRED_PACKAGES += developer/documentation-tool/xmlto
+REQUIRED_PACKAGES += library/desktop/gobject/gobject-introspection
+REQUIRED_PACKAGES += library/glib2
+REQUIRED_PACKAGES += library/libxslt
+REQUIRED_PACKAGES += system/core-os
+REQUIRED_PACKAGES += system/library/dbus
+REQUIRED_PACKAGES += system/library/polkit
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/accountsservice/accountsservice.p5m	Fri Jul 01 11:41:30 2016 +0000
@@ -0,0 +1,132 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+set name=pkg.fmri \
+    value=pkg:/system/library/accountsservice@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value=AccountsService
+set name=pkg.description \
+    value="AccountsService is a D-Bus service for accessing the list of user accounts and information attached to those accounts."
+set name=com.oracle.info.description value=accountsservice
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value="org.opensolaris.category.2008:System/Administration and Configuration"
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2016/323
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+
+
+file path=etc/dbus-1/system.d/org.freedesktop.Accounts.conf
+file accountsservice.xml path=lib/svc/manifest/system/accountsservice.xml
+file svc-accountsservice path=lib/svc/method/svc-accountsservice
+file path=usr/include/accountsservice-1.0/act/act-user-enum-types.h
+file path=usr/include/accountsservice-1.0/act/act-user-manager.h
+file path=usr/include/accountsservice-1.0/act/act-user.h
+file path=usr/include/accountsservice-1.0/act/act.h
+file path=usr/lib/$(MACH64)/girepository-1.0/AccountsService-1.0.typelib
+link path=usr/lib/$(MACH64)/libaccountsservice.so \
+    target=libaccountsservice.so.0.0.0
+link path=usr/lib/$(MACH64)/libaccountsservice.so.0 \
+    target=libaccountsservice.so.0.0.0
+file path=usr/lib/$(MACH64)/libaccountsservice.so.0.0.0
+file path=usr/lib/$(MACH64)/pkgconfig/accountsservice.pc
+file path=usr/lib/accounts-daemon mode=0555
+file path=usr/lib/girepository-1.0/AccountsService-1.0.typelib
+link path=usr/lib/libaccountsservice.so target=libaccountsservice.so.0.0.0
+link path=usr/lib/libaccountsservice.so.0 target=libaccountsservice.so.0.0.0
+file path=usr/lib/libaccountsservice.so.0.0.0
+file path=usr/lib/pkgconfig/accountsservice.pc
+file path=usr/share/dbus-1/interfaces/org.freedesktop.Accounts.User.xml
+file path=usr/share/dbus-1/interfaces/org.freedesktop.Accounts.xml
+file path=usr/share/dbus-1/system-services/org.freedesktop.Accounts.service
+file path=usr/share/doc/accountsservice/spec/AccountsService.html
+file path=usr/share/gir-1.0/AccountsService-1.0.gir
+file path=usr/share/gtk-doc/html/libaccountsservice/ActUser.html
+file path=usr/share/gtk-doc/html/libaccountsservice/ActUserManager.html
+file path=usr/share/gtk-doc/html/libaccountsservice/annotation-glossary.html
+file path=usr/share/gtk-doc/html/libaccountsservice/api-index-full.html
+file path=usr/share/gtk-doc/html/libaccountsservice/ch01.html
+file path=usr/share/gtk-doc/html/libaccountsservice/home.png
+file path=usr/share/gtk-doc/html/libaccountsservice/index.html
+file path=usr/share/gtk-doc/html/libaccountsservice/index.sgml
+file path=usr/share/gtk-doc/html/libaccountsservice/left-insensitive.png
+file path=usr/share/gtk-doc/html/libaccountsservice/left.png
+file path=usr/share/gtk-doc/html/libaccountsservice/libaccountsservice.devhelp2
+file path=usr/share/gtk-doc/html/libaccountsservice/right-insensitive.png
+file path=usr/share/gtk-doc/html/libaccountsservice/right.png
+file path=usr/share/gtk-doc/html/libaccountsservice/style.css
+file path=usr/share/gtk-doc/html/libaccountsservice/up-insensitive.png
+file path=usr/share/gtk-doc/html/libaccountsservice/up.png
+file path=usr/share/locale/ar/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/bg_BG/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/bn_IN/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ca/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ca@valencia/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/cs/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/da/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/de/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/el/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/en_GB/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/eo/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/es/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/fa_IR/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/fi/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/fr/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ga/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/gl/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/he/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/hi/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/hu/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ia/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/id/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/it/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ja/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ka/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/kk/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ko/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/lt/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/lv/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/nl/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/pa/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/pl/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/pt_BR/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ro/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/ru/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/sk/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/sl/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/sr/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/sr@latin/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/sv/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/te/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/tr/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/uk/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/vi/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/wa/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/zh_CN/LC_MESSAGES/accounts-service.mo
+file path=usr/share/locale/zh_TW/LC_MESSAGES/accounts-service.mo
+file path=usr/share/polkit-1/actions/org.freedesktop.accounts.policy
+dir  path=var/lib/AccountsService/icons
+dir  path=var/lib/AccountsService/users
+license COPYING license=GPLv3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/accountsservice/files/accountsservice.xml	Fri Jul 01 11:41:30 2016 +0000
@@ -0,0 +1,91 @@
+<?xml version="1.0" ?>
+<!DOCTYPE service_bundle
+  SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<!--
+    CDDL HEADER START
+
+    The contents of this file are subject to the terms of the
+    Common Development and Distribution License (the "License").
+    You may not use this file except in compliance with the License.
+
+    You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+    or http://www.opensolaris.org/os/licensing.
+    See the License for the specific language governing permissions
+    and limitations under the License.
+
+    When distributing Covered Code, include this CDDL HEADER in each
+    file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+    If applicable, add the following below this CDDL HEADER, with the
+    fields enclosed by brackets "[]" replaced with your own identifying
+    information: Portions Copyright [yyyy] [name of copyright owner]
+
+    CDDL HEADER END
+
+    Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+
+    NOTE:  This service manifest is not editable; its contents will
+    be overwritten by package or patch operations, including
+    operating system upgrade.  Make customizations in a different
+    file.
+-->
+<service_bundle type="manifest" name="system/accountsservice">
+    <service version="1" type="service" name="system/accountsservice">
+
+        <dependency restart_on="none" type="service"
+            name="multi_user_dependency" grouping="require_all">
+            <service_fmri value="svc:/milestone/multi-user"/>
+        </dependency>
+        <dependency restart_on="none" type="service"
+            name="name-services" grouping="require_all">
+            <service_fmri value="svc:/milestone/name-services"/>
+        </dependency>
+        <dependency restart_on="restart" type="service"
+            name="dbus" grouping="require_all">
+            <service_fmri value="svc:/system/dbus"/>
+        </dependency>
+
+        <method_context>
+            <method_credential user='root' clearance='ADMIN_HIGH' />
+        </method_context>
+
+	<exec_method timeout_seconds="60" type="method" name="start"
+            exec="/lib/svc/method/svc-accountsservice"/>
+        <exec_method timeout_seconds="60" type="method" name="stop"
+            exec=":kill"/>
+        <exec_method timeout_seconds="60" type="method" name="refresh"
+            exec=":true"/>
+
+        <!-- Authorization -->
+        <property_group name='general' type='framework'>
+                <propval name='action_authorization' type='astring'
+                        value='solaris.smf.manage.dt.login' />
+        </property_group>
+
+        <!--
+            We do not need a duration property group, because contract is
+            the default.  Search for duration in svc.startd(1M).
+        -->
+	<property_group name='options' type='application'>
+	    <propval name='debug' type='boolean' value='false' />
+	</property_group>
+
+        <instance enabled="true" name="default"/>
+
+        <template>
+            <common_name>
+                <loctext xml:lang="C">
+                        AccountsService
+                </loctext>
+            </common_name>
+            <description>
+                <loctext xml:lang="C">
+                        AccountsService is a D-Bus service for accessing the list of user accounts and information attached to those accounts.
+                </loctext>
+            </description>
+	    <documentation>
+                <doc_link name="AccountsService Documentation"
+		    uri='file:/usr/share/doc/accountsservice/spec/AccountsService.html' />
+            </documentation>
+        </template>
+    </service>
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/accountsservice/files/svc-accountsservice	Fri Jul 01 11:41:30 2016 +0000
@@ -0,0 +1,38 @@
+#! /usr/bin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+# Start method script for the AccountsService daemon.
+#
+
+. /lib/svc/share/smf_include.sh
+
+daemon_args=""
+
+debug="$(/usr/bin/svcprop -p options/debug "${SMF_FMRI}")"
+[[ "${debug}" == "true" ]] && daemon_args+=" --debug"
+
+/usr/lib/accounts-daemon ${daemon_args} &
+
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/accountsservice/patches/0001-WTMP_FILE.patch	Fri Jul 01 11:41:30 2016 +0000
@@ -0,0 +1,96 @@
+Accepted upstream: https://bugs.freedesktop.org/show_bug.cgi?id=90882
+
+From cad21b185af08b4aba79bf541549bb159a686e03 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <[email protected]>
+Date: Mon, 14 Dec 2015 18:57:27 -0800
+Subject: [PATCH] wtmp: fix wtmp file on solaris and netbsd
+
+This commit moves detection of the location
+of the wtmp file to configure and fixes that
+detection to work on Solaris and NetBSD.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=90882
+---
+ configure.ac      | 30 +++++++++++++++++++++++++++---
+ src/wtmp-helper.c | 14 ++++----------
+ 2 files changed, 31 insertions(+), 13 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index db4559c..4ba53ad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -185,9 +185,33 @@ fi
+ 
+ AC_SUBST(WARN_CFLAGS)
+ 
+-AC_CHECK_HEADERS([shadow.h utmpx.h])
+-
+-AC_CHECK_FUNCS([fgetpwent])
++AC_CHECK_HEADERS([paths.h shadow.h utmpx.h])
++
++AC_CHECK_FUNCS([fgetpwent setutxdb])
++
++wtmpx_found="no"
++AC_CHECK_DECLS([WTMPX_FILENAME], [wtmpx_found="WTMPX_FILENAME"],
++               [], [AC_INCLUDES_DEFAULT
++#include <utmpx.h>
++               ])
++if test "$wtmpx_found" = "no" ; then
++  AC_CHECK_DECLS([_PATH_WTMPX], [wtmpx_found="_PATH_WTMPX"],
++                 [], [AC_INCLUDES_DEFAULT
++#ifdef HAVE_PATHS_H
++#include <paths.h>
++#endif
++#ifdef HAVE_UTMPX_H
++#include <utmpx.h>
++#endif
++                 ])
++  if test "$wtmpx_found" = "no" ; then
++    AC_CHECK_FILE([/var/log/utx.log], [wtmpx_found='"/var/log/utx.log"'])
++    if test "$wtmpx_found" = "no" ; then
++      AC_MSG_FAILURE([Do not know which filename to watch for wtmp changes])
++    fi
++  fi
++fi
++AC_DEFINE_UNQUOTED([PATH_WTMP], [$wtmpx_found], [Path to wtmpx file])
+ 
+ dnl ---------------------------------------------------------------------------
+ dnl - gtk-doc Documentation
+diff --git a/src/wtmp-helper.c b/src/wtmp-helper.c
+index 0c29d82..83ac43b 100644
+--- a/src/wtmp-helper.c
++++ b/src/wtmp-helper.c
+@@ -56,12 +56,12 @@ user_previous_login_free (UserPreviousLogin *previous_login)
+ static gboolean
+ wtmp_helper_start (void)
+ {
+-#if defined(UTXDB_LOG)
++#if defined(HAVE_SETUTXDB)
+                 if (setutxdb (UTXDB_LOG, NULL) != 0) {
+                         return FALSE;
+                 }
+-#elif defined(WTMPX_FILENAME)
+-                if (utmpxname (WTMPX_FILENAME) != 0) {
++#elif defined(PATH_WTMP)
++                if (utmpxname (PATH_WTMP) != 0) {
+                         return FALSE;
+                 }
+ 
+@@ -212,13 +212,7 @@ wtmp_helper_entry_generator (GHashTable *users,
+ const gchar *
+ wtmp_helper_get_path_for_monitor (void)
+ {
+-#if defined(WTMPX_FILENAME)
+-        return WTMPX_FILENAME;
+-#elif defined(__FreeBSD__)
+-        return "/var/log/utx.log";
+-#else
+-#error Do not know which filename to watch for wtmp changes
+-#endif
++        return PATH_WTMP;
+ }
+ 
+ #else /* HAVE_UTMPX_H */
+-- 
+2.6.1
+