tizen: added support for primary user group name 39/27239/1 accepted/tizen/common/20140908.140314 accepted/tizen/ivi/20140911.212405 submit/tizen/20140908.132141
authorImran Zaman <imran.zaman@intel.com>
Mon, 8 Sep 2014 13:11:41 +0000 (16:11 +0300)
committerImran Zaman <imran.zaman@intel.com>
Mon, 8 Sep 2014 13:12:52 +0000 (16:12 +0300)
Change-Id: Icfcd30f18a5d060adf509ef450d7d5c6c0f1837e
Signed-off-by: Imran Zaman <imran.zaman@intel.com>
1  2 
packaging/gumd-tizen.conf
packaging/gumd.changes
packaging/gumd.spec

index 4a956c3,0000000..1022ef3
mode 100644,000000..100644
--- /dev/null
@@@ -1,132 -1,0 +1,137 @@@
 +#
 +# gumd Configuration file.
 +#
 +
 +#
 +# This group contains top-level settings.
 +#
 +[General]
 +
++# Primary group name for the new user. If the primary group does not
++# exist, it will be created otherwise user gid will be set accordingly.
++# Default primary group name is same as name of the user.
++USR_PRIMARY_GRPNAME=users
++
 +# Comma separate listed of groups, which every user (other than system user)
 +# will be added to at the time of user account creation. Default value is:
 +# ''
 +#DEFAULT_USR_GROUPS=
 +
 +# Comma separate listed of groups, which admin user will be added to at the
 +# time of user account creation. Default value is: ''
 +#DEFAULT_ADMIN_GROUPS=
 +
 +# Path to passwd file which represents user information. Default is
 +# /etc/passwd. More information about the file format can be read at the
 +# manpages for 'passwd'.
 +# Can be overriden in debug builds by setting UM_PASSWD_FILE
 +# environment variable.
 +#PASSWD_FILE=/etc/passwd
 +
 +# Path to shadow file which represents user shadowed password information.
 +# Default is /etc/shadow. More information about the file format can be read
 +# at the manpages for 'shadow'.
 +# Can be overriden in debug builds by setting UM_SHADOW_FILE
 +# environment variable.
 +#SHADOW_FILE=/etc/shadow
 +
 +# Path to group file which represents group information. Default is /etc/group.
 +# More information about the file format can be read at the manpages for
 +# 'group'.
 +# Can be overriden in debug builds by setting UM_GROUP_FILE
 +# environment variable.
 +#GROUP_FILE=/etc/group
 +
 +# Path to group file which represents shadowed group information.
 +# Default is /etc/gshadow. More information about the file format can be read
 +# at the manpages for 'gshadow'.
 +# Can be overriden in debug builds by setting UM_GSHADOW_FILE
 +# environment variable.
 +#GSHADOW_FILE=/etc/gshadow
 +
 +# Prefix to be used when creating home directory for the user. For example,
 +# with prefix '/home', user 'newu' home directory will be created as
 +# '/home/newu'. Default value is '/home'
 +# Can be overriden in debug builds by setting UM_HOMEDIR_PREFIX
 +# environment variable.
 +#HOME_DIR=/home
 +
 +# Path to user shell executable. Default value is '/bin/bash'
 +#SHELL=/bin/bash
 +
 +# Path to skeleton folder. When new users are created, contents of the skel
 +# folder is copied to user home directory. Default value is '/etc/skel'
 +# Can be overriden in debug builds by setting UM_SKEL_DIR
 +# environment variable.
 +#SKEL_DIR=/etc/skel
 +
 +# Minimum value for the automatic uid selection. Default value is: 2000
 +#UID_MIN=2000
 +
 +# Maximum value for the automatic uid selection. Default value is: 60000
 +#UID_MAX=60000
 +
 +# Minimum value for the automatic uid selection for system user. Default
 +# value is: 200
 +#SYS_UID_MIN=200
 +
 +# Maximum value for the automatic uid selection for system user. Default value
 +# is: 999
 +#SYS_UID_MAX=999
 +
 +# Minimum value for the automatic gid selection. Default value is: 2000
 +#GID_MIN=2000
 +
 +# Maximum value for the automatic gid selection. Default value is: 60000
 +#GID_MAX=60000
 +
 +# Minimum value for the automatic gid selection for system user. Default value
 +# is: 200
 +#SYS_GID_MIN=200
 +
 +# Maximum value for the automatic gid selection for system user. Default value
 +# is: 999
 +#SYS_GID_MAX=999
 +
 +# Minimum number of days a password may be used. Default value is: 0
 +#PASS_MIN_DAYS=0
 +
 +# Maximum number of days allowed between password changes. Default value is:
 +# 99999
 +#PASS_MAX_DAYS=99999
 +
 +# Number of days warning given before a password expires. Default value is:
 +# 7
 +#PASS_WARN_AGE=7
 +
 +# Value used to set the mode of home directories created for new users.
 +# Default value is: 022
 +#UMASK=022
 +
 +# Value used to set the encryption algorithm. Default
 +# value is: 'SHA512' (other supported options are: 'MD5', 'SHA256', 'DES')
 +#ENCRYPT_METHOD=SHA512
 +
 +# Value used to set the smack label for newly created files and folders.
 +SMACK64_NEW_FILES=_
 +
 +# Value used to set the smack label for User files and folders.
 +SMACK64_USER_FILES=User
 +
 +#
 +# D-Bus related settings.
 +#
 +[ObjectTimeouts]
 +
 +# Timeout in seconds for the daemon. Daemon will exit after specified idle time.
 +# If not set (or set to 0), the daemon will not exit. Has no effect if P2P DBus
 +# is in use.
 +#DAEMON_TIMEOUT=7
 +
 +# Timeout in seconds for user dbus objects. If not set (or set to 0), the dbus
 +# objects will persist
 +#USER_TIMEOUT=5
 +
 +# Timeout in seconds for group dbus objects. If not set (or set to 0), the dbus
 +# objects will persist
 +#GROUP_TIMEOUT=5
index ff2677b,0000000..6485c7f
mode 100644,000000..100644
--- /dev/null
@@@ -1,59 -1,0 +1,62 @@@
++* Mon Sep 08 2014 Imran Zaman <imran.zaman@intel.com>
++- Added primary group name for new user in the configuration file
++
 +* Fri Sep 05 2014 Imran Zaman <imran.zaman@intel.com>
 +- Fixed bug TC-1580 which fixes user's folder and file access permissions
 +
 +* Tue Aug 26 2014 Imran Zaman <imran.zaman@intel.com>
 +- Made gum-utils logs printible always
 +- Fixed bug for guest user which can login without authentication
 +
 +* Thu Aug 21 2014 Imran Zaman <imran.zaman@intel.com>
 +- Added support for scripts which can be run after a user/group is added
 +  or before a user/group is deleted
 +
 +* Tue Aug 12 2014 Imran Zaman <imran.zaman@intel.com>
 +- Fix access permissions for user home directory
 +
 +* Tue Aug 05 2014 Imran Zaman <imran.zaman@intel.com>
 +- Log only when logging is enabled
 +- Fixed p2p stream descriptor leak
 +
 +* Thu May 22 2014 Imran Zaman <imran.zaman@intel.com>
 +- Renamed gum-example as gum-utils to be used as command line utility
 +
 +* Wed May 21 2014 Imran Zaman <imran.zaman@intel.com>
 +- Fixed Bug # TIVI-2988
 +- Updated logs
 +
 +* Tue May 20 2014 Imran Zaman <imran.zaman@intel.com>
 +- Fixed bug#TIVI-3170 (fixed smack labels for newly created files and folders
 +  as reported in https://bugs.tizen.org/jira/browse/TIVI-3170)
 +
 +* Wed Feb 12 2014 Imran Zaman <imran.zaman@intel.com>
 +- Simplified gumd packages for Tizen and SUSE
 +- Simplified gumd packages
 +- fix uninstalled pkgconfig files
 +
 +* Fri Feb 07 2014 Patrick McCarty <patrick.mccarty@linux.intel.com> fe07066
 +- Move the packaging files into the packaging/ directory, since a symlink with
 +  the same name does not work with 'gbs build'. (DEVT-148)
 +
 +* Fri Dec 27 2013 Imran Zaman <imran.zaman@intel.com>
 +- Obsoletes gum package as the package is renamed to gumd
 +
 +* Mon Dec 23 2013 Imran Zaman <imran.zaman@intel.com>
 +- added test cases for error and dictionary objects
 +- utilized dictionary functions for get/set key-value pairs
 +- clean up generated coverage files on make clean
 +- enable tests by default if coverage is enabled
 +- exclude external and generated dbus files from code coverage calculation
 +
 +* Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
 +- Corrected spec and changes file names
 +
 +* Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
 +- Removed dist spec packaging folder from main source tree
 +
 +* Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
 +- Release 0.0.1  (First release)
 +
 +* Mon Sep 02 2013 Imran Zaman <imran.zaman@intel.com>
 +- Initial RPM packaging
index 793dcc4,0000000..163950c
mode 100644,000000..100644
--- /dev/null
@@@ -1,142 -1,0 +1,142 @@@
- Release: 4
 +# define used dbus type [p2p, session, system]
 +%define dbus_type system
 +# enable debug features such as control environment variables
 +# WARNING! do not use for production builds as it will break security
 +%define debug_build 0
 +
 +Name: gumd
 +Summary: User management daemon and client library
 +Version: 0.0.4
++Release: 5
 +Group: Security/Accounts
 +License: LGPL-2.1+
 +Source: %{name}-%{version}.tar.gz
 +URL: https://github.com/01org/gumd
 +Source1001:     %{name}.manifest
 +Source1002:     libgum.manifest
 +Source1003:     %{name}-tizen.conf
 +Obsoletes: gum
 +Requires:   libgum = %{version}-%{release}
 +%if %{dbus_type} != "p2p"
 +Requires: dbus-1
 +%endif
 +Requires(post): /sbin/ldconfig
 +Requires(postun): /sbin/ldconfig
 +BuildRequires: pkgconfig(systemd)
 +BuildRequires: pkgconfig(dbus-1)
 +BuildRequires: pkgconfig(gtk-doc)
 +BuildRequires: pkgconfig(glib-2.0) >= 2.30
 +BuildRequires: pkgconfig(gobject-2.0)
 +BuildRequires: pkgconfig(gio-2.0)
 +BuildRequires: pkgconfig(gio-unix-2.0)
 +BuildRequires: pkgconfig(gmodule-2.0)
 +
 +
 +%description
 +%{summary}.
 +
 +
 +%package -n libgum
 +Summary:    User management client library
 +Group:      Security/Libraries
 +
 +
 +%description -n libgum
 +%{summary}.
 +
 +
 +%package -n libgum-devel
 +Summary:    Development files for user management client library
 +Group:      Security/Development
 +Requires:   libgum = %{version}-%{release}
 +
 +
 +%description -n libgum-devel
 +%{summary}.
 +
 +
 +%package doc
 +Summary:    Documentation files for %{name}
 +Group:      Security/Documentation
 +Requires:   libgum = %{version}-%{release}
 +
 +
 +%description doc
 +%{summary}.
 +
 +
 +%prep
 +%setup -q -n %{name}-%{version}
 +
 +
 +%build
 +%if %{debug_build} == 1
 +%configure --enable-dbus-type=%{dbus_type} --enable-debug
 +%else
 +%configure --enable-dbus-type=%{dbus_type}
 +%endif
 +
 +
 +make %{?_smp_mflags}
 +
 +
 +%install
 +rm -rf %{buildroot}
 +%make_install
 +cp -a %{SOURCE1001} %{buildroot}%{_datadir}/%{name}.manifest
 +cp -a %{SOURCE1002} %{buildroot}%{_datadir}/libgum.manifest
 +cp -a %{SOURCE1003} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
 +
 +
 +%post
 +/sbin/ldconfig
 +/usr/bin/chmod u+s %{_bindir}/%{name}
 +/usr/bin/getent group gumd > /dev/null || /usr/sbin/groupadd -r gumd
 +/usr/bin/mkdir -p %{_sysconfdir}/%{name}/useradd.d
 +/usr/bin/mkdir -p %{_sysconfdir}/%{name}/userdel.d
 +/usr/bin/mkdir -p %{_sysconfdir}/%{name}/groupadd.d
 +/usr/bin/mkdir -p %{_sysconfdir}/%{name}/groupdel.d
 +
 +
 +%postun -p /sbin/ldconfig
 +
 +
 +%files -n libgum
 +%defattr(-,root,root,-)
 +%manifest %{_datadir}/libgum.manifest
 +%{_libdir}/libgum*.so.*
 +%{_bindir}/gum-utils
 +
 +
 +%files -n libgum-devel
 +%defattr(-,root,root,-)
 +%{_includedir}/gum/*
 +%{_libdir}/libgum*.so
 +%{_libdir}/pkgconfig/libgum.pc
 +%if %{dbus_type} != "p2p"
 +%{_datadir}/dbus-1/interfaces/*UserManagement*.xml
 +%endif
 +
 +
 +%files
 +%defattr(-,root,root,-)
 +%manifest %{_datadir}/%{name}.manifest
 +%doc AUTHORS COPYING.LIB INSTALL NEWS README
 +%{_bindir}/%{name}
 +%dir %{_sysconfdir}/%{name}
 +%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
 +%if %{dbus_type} == "session"
 +%dir %{_datadir}/dbus-1/services
 +%{_datadir}/dbus-1/services/*UserManagement*.service
 +%else if %{dbus_type} == "system"
 +%dir %{_datadir}/dbus-1/system-services
 +%{_datadir}/dbus-1/system-services/*UserManagement*.service
 +%dir %{_sysconfdir}/dbus-1
 +%dir %{_sysconfdir}/dbus-1/system.d
 +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/gumd-dbus.conf
 +%endif
 +
 +
 +%files doc
 +%defattr(-,root,root,-)
 +%{_datadir}/gtk-doc/html/gumd/*