Bug 195963 - [patch] emulators/pipelight: fix pipelight-mkufs, add usergroup
Summary: [patch] emulators/pipelight: fix pipelight-mkufs, add usergroup
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: Kris Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-14 12:33 UTC by f0andrey
Modified: 2014-12-15 17:01 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (kmoore)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description f0andrey 2014-12-14 12:33:02 UTC
When the user does not have the same name group, the script pipelight-mkufs does not correctly work out

super-block backups (for fsck_ffs -b #) at:
 192, 205056, 409920, 614784
chown: andrey: illegal group name
ZVOL created and mounted to: /home/andrey/.wine-pipelight

# groups andrey
wheel operator _pkcs11

Hotfix
--- emulators/pipelight/files/pipelight-mkufs.in     2014-10-24 01:20:15.503045748 +0400
+++ emulators/pipelight/files/pipelight-mkufs.in     2014-12-14 15:07:57.049832379 +0300
@@ -85,8 +85,11 @@
    exit 1
 fi
 
+# Get user group
+usergroup=`groups $username | cut -d " " -f 1`
+
 # Chown the directory
-chown $username:$username ${userhome}/.wine-pipelight
+chown $username:$usergroup ${userhome}/.wine-pipelight
 
 # Save to fstab
 echo "/dev/zvol/$zpool/$username-pipelight  ${userhome}/.wine-pipelight        ufs            rw,late              0       0" >> /etc/fstab
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-12-14 12:33:02 UTC
Auto-assigned to maintainer kmoore@FreeBSD.org
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-12-15 17:01:00 UTC
A commit references this bug:

Author: kmoore
Date: Mon Dec 15 17:00:24 UTC 2014
New revision: 374755
URL: https://svnweb.freebsd.org/changeset/ports/374755

Log:
   - Fix a bug in pipelight-mkufs script
   - Bump PORTREV

  PR: 195963
  Submitted by: f0andrey@gmail.com

Changes:
  head/emulators/pipelight/Makefile
  head/emulators/pipelight/files/pipelight-mkufs.in