[Slackbuilds-users] HAL 'plugdev' system-group (ivman/pmount)

Menno Duursma druiloor at zonnet.nl
Wed May 16 22:40:02 UTC 2007


Sorry to mess-up the threading in this discussion, but to answer some
questions. (The ones i think to know the answer to).

Robby Workman:
> [...] and assuming that it's fairly standard,

All Debian derivatives from sarge use it since:
http://groups.google.nl/group/linux.debian.devel/browse_thread/thread/517bf32ed697d99f/a01c9ee98ddd9480

Some googeling sugests that the 'standard' mantro for getting say gphoto
to work is just to add your user to the plugdev group on Gentoo an RedHat
aswell.

> In fact, i intended to do some more research into how other distros are
> handling it

RedHat uses at_console (which is a frontend to pam_console ?) and desktop
managers [GKX]GM might use 'ConsoleKit' which is somewhat like the
/etc/securetty file combined with pam_group (as i understand it):
http://mirror.linux.org.au/pub/linux.conf.au/2007/video/talks/220.pdf

> Okay, so if I'm understanding you correctly, to use those two as we've
> currently got hal done, ivman would have to be in 'users' group and
> pmount would have to be gid users, right?

Right, only you'd have to patch 'ivman' to use that group CMIIW.

> If so, yeah, we need to put some more thought into that...

IMO: Bad idee, both in security (POLA) and probably maintenance to...

> (unless there are other problems besides the ones from above) and figure
> out what to do with HAL first...

The auto-UNmounting via 'pumount' doesn't seem to work for me sofar... 
'sudo umount /dev/sda1' does the trick for (fore me for now).

firefox at pc0:/usr/local/src/ivman$ cat 
/home/firefox/Desktop/ivman/ivman.SlackBuild | diff -u - ivman.SlackBuild
--- -   2007-05-17 00:38:09.297886000 +0200
+++ ivman.SlackBuild    2007-05-14 19:02:27.000000000 +0200
@@ -55,10 +55,26 @@
  cp -a [A-Z][A-Z]* $PKG/usr/doc/$PRGNAM-$VERSION
  cat $CWD/$PRGNAM.SlackBuild > 
$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

+# Move configfiles to .new and let doinst.sh hanle them gracefully
+( cd $PKG/etc/ivman
+  mv IvmConfigBase.xml IvmConfigBase.xml.new
+  mv IvmConfigActions.xml IvmConfigActions.xml.new
+  mv IvmConfigProperties.xml IvmConfigProperties.xml.new
+  mv IvmConfigConditions.xml IvmConfigConditions.xml.new
+)
+
  # Copy the slack-desc (and a custom doinst.sh if necessary) into 
./install
  mkdir -p $PKG/install
  cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh

  # Make the package; be sure to leave it in $OUTPUT
  cd $PKG
  /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+
+# Clean up the temp stuff
+if [ "$1" = "--cleanup" ]; then
+   rm -rf $PKG
+   rm -rf $TMP/$PRGNAM-$VERSION
+fi
+


firefox at pc0:/usr/local/src/ivman$ cat doinst.sh
config()
{
   NEW="$1"
   OLD="`dirname $NEW`/`basename $NEW .new`"
   # If there's no config file by that name, mv it over:
   if [ ! -r $OLD ]; then
     mv $NEW $OLD
   elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
     # toss the redundant copy
     rm $NEW
   fi
   # Otherwise, we leave the .new copy for the admin to consider...
}

# Try not to mess over any costum settings
config etc/ivman/IvmConfigBase.xml.new
config etc/ivman/IvmConfigActions.xml.new
config etc/ivman/IvmConfigProperties.xml.new
config etc/ivman/IvmConfigConditions.xml.new

Cheers
-Menno.



More information about the Slackbuilds-users mailing list