opscode-cookbooks/jenkins — pull request #257 by miketheman (2014-08-08 17:38:36+00:00)
Title: add attribute for Jenkins user system account

Originally introduced in the Debian packaging system for jenkins in 2008
[1], the packagers determined that the user (hudson) at the time should
be a `system` user, meaning that there are no password aging information
or home directories automatically created, as well as be created in the
SYS_UID_* numeric range.

When introducing the `war` style installation [2], the user/group are
created as the next available uid/gid in UID_MIN/GID_MIN (see
/etc/login.defs), which collides with any users created after that may
be expecting specific UIDs.

Existing systems will be unaffected, as the `user` resource does not
modify the already-created user, rather only new systems using the war
method will have their `jenkins` daemon user created as a system user,
like the package does already.

[1]: https://issues.jenkins-ci.org/browse/JENKINS-1959
[2]: https://github.com/opscode-cookbooks/jenkins/commit/3e29e2f9e0d693b5ffa8d8a23f68440119a3c44c

Testing note:
I wasn't sure how to best add testing for this level of branching logic in ChefSpec, after discussion on IRC, it seemed like a `context` block was the right way to go. Please let me know if that's not the desired method.