Bug 218694

Summary: sysutils/py-salt: Add patch to fix salt.modules.pw_user.chloginclass
Product: Ports & Packages Reporter: Ben Woods <woodsb02>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: christer.edwards
Priority: --- Keywords: patch, patch-ready
Version: LatestFlags: christer.edwards: maintainer-feedback+
Hardware: Any   
OS: Any   
URL: https://github.com/saltstack/salt/pull/40714
Attachments:
Description Flags
Patch to make salt.modules.pw_user.get_loginclass return string rather than dict woodsb02: maintainer-approval? (christer.edwards)

Description Ben Woods freebsd_committer 2017-04-17 04:42:53 UTC
Created attachment 181831 [details]
Patch to make salt.modules.pw_user.get_loginclass return string rather than dict

sysutils/py-salt: Add patch to fix salt.modules.pw_user.chloginclass

Make salt.modules.pw_user.get_loginclass return string rather than dict

This aligns with salt.modules.useradd.get_loginclass which is used
for OpenBSD.

This fixes salt.modules.pw_user.chloginclass which is used for FreeBSD
and expects a string to be returned. This was therefore returning False
even after successfully changing the loginclass.

This also fixes salt.states.user.present on FreeBSD when loginclass is
set.
Comment 1 Ben Woods freebsd_committer 2017-04-17 04:45:14 UTC
This has also been submitted as a pull request upstream:
https://github.com/saltstack/salt/pull/40714

Seeking maintainer feedback to commit this fix to the ports tree until it is incorporated upstream and the next version of salt is released.
Comment 2 Christer Edwards 2017-04-23 23:34:30 UTC
Thanks for the patch!
Comment 3 Ben Woods freebsd_committer 2017-04-24 13:09:47 UTC
Committed. Thanks for approving.
Comment 4 commit-hook freebsd_committer 2017-04-24 13:09:52 UTC
A commit references this bug:

Author: woodsb02
Date: Mon Apr 24 13:09:34 UTC 2017
New revision: 439289
URL: https://svnweb.freebsd.org/changeset/ports/439289

Log:
  sysutils/py-salt: Make salt.modules.pw_user.get_loginclass return string
  rather than dict.

  This fixes salt.modules.pw_user.chloginclass which is used for FreeBSD
  and expects a string to be returned. This was therefore returning False
  even after successfully changing the loginclass.

  This also fixes salt.states.user.present on FreeBSD when loginclass is
  set.

  PR:		218694
  Approved by:	Christer Edwards <christer.edwards@gmail.com> (maintainer)

Changes:
  head/sysutils/py-salt/Makefile
  head/sysutils/py-salt/files/patch-salt_modules_pw__user.py