Bug 218694 - sysutils/py-salt: Add patch to fix salt.modules.pw_user.chloginclass
Summary: sysutils/py-salt: Add patch to fix salt.modules.pw_user.chloginclass
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL: https://github.com/saltstack/salt/pul...
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2017-04-17 04:42 UTC by Ben Woods
Modified: 2017-04-24 13:09 UTC (History)
1 user (show)

See Also:
christer.edwards: maintainer-feedback+


Attachments
Patch to make salt.modules.pw_user.get_loginclass return string rather than dict (1.29 KB, patch)
2017-04-17 04:42 UTC, Ben Woods
woodsb02: maintainer-approval? (christer.edwards)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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