pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

hal issues for gnome users



Hal today is built with the options consolekit and policykit

but the options in the pkgsrc does not allows to mount external
(hotplug) devices, requires code of policykit files and consolekit files
that is not documented.. and the message on nautilus is only: cannot
mount, does not gives you a clue of what is happening...

As hal uses dbus, the security can be controlled by the dbus policy,
so I code an option in the sysutil/hal/Makefile to compile WITHOUT
console kit and policykit

This will build an hal more "open" so it mounts pen-drives
cds, dvds... using nautilus... 

together (in this patch) there is a fix for the umass device
with FAT...  If it does not compile, giving error in patch file,
it is because it is already pached, just remove the file patch-umass
from patches directory, make mps clean, and make again...

Please note that the default is to build hal WITHOUT consolekit and
WITHOUT policykit...

you can choose option using make show-options 
patch follows

===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/hal/Makefile,v
retrieving revision 1.72
diff -u -r1.72 Makefile
--- Makefile	31 Jan 2015 12:08:55 -0000	1.72
+++ Makefile	31 Jan 2015 21:30:12 -0000
@@ -11,6 +11,22 @@
 COMMENT=		FreeDesktop hardware abstraction layer
 LICENSE=		gnu-gpl-v2
 
+.include "../../mk/bsd.prefs.mk"
+
+PKG_OPTIONS_VAR=        PKG_OPTIONS.hal
+PKG_SUPPORTED_OPTIONS+= securekit
+PLIST_VARS+=		${PKG_SUPPORTED_OPTIONS}
+
+.include "../../mk/bsd.options.mk"
+
+.if empty(PKG_OPTIONS:Msecurekit)
+CONFIGURE_ARGS+=	--disable-console-kit
+CONFIGURE_ARGS+=	--disable-policy-kit
+PLIST_SUBST+=		SECUREKIT="@comment "
+.else
+PLIST_SUBST+=		SECUREKIT=""
+.endif
+
 BUILD_DEFS+=		VARBASE PKG_SYSCONFBASE
 
 GNU_CONFIGURE=		YES
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/hal/PLIST,v
retrieving revision 1.7
diff -u -r1.7 PLIST
--- PLIST	11 Mar 2014 14:05:15 -0000	1.7
+++ PLIST	31 Jan 2015 21:30:12 -0000
@@ -5,7 +5,7 @@
 bin/hal-find-by-property
 bin/hal-get-property
 bin/hal-is-caller-locked-out
-bin/hal-is-caller-privileged
+${SECUREKIT}bin/hal-is-caller-privileged
 bin/hal-lock
 bin/hal-set-property
 bin/lshal
@@ -48,19 +48,19 @@
 man/man1/hal-find-by-property.1
 man/man1/hal-get-property.1
 man/man1/hal-is-caller-locked-out.1
-man/man1/hal-is-caller-privileged.1
+${SECUREKIT}man/man1/hal-is-caller-privileged.1
 man/man1/hal-lock.1
 man/man1/hal-set-property.1
 man/man1/lshal.1
 man/man8/hald.8
 sbin/hald
-share/PolicyKit/policy/org.freedesktop.hal.dockstation.policy
-share/PolicyKit/policy/org.freedesktop.hal.killswitch.policy
-share/PolicyKit/policy/org.freedesktop.hal.leds.policy
-share/PolicyKit/policy/org.freedesktop.hal.policy
-share/PolicyKit/policy/org.freedesktop.hal.power-management.policy
-share/PolicyKit/policy/org.freedesktop.hal.storage.policy
-share/PolicyKit/policy/org.freedesktop.hal.wol.policy
+${SECUREKIT}share/PolicyKit/policy/org.freedesktop.hal.dockstation.policy
+${SECUREKIT}share/PolicyKit/policy/org.freedesktop.hal.killswitch.policy
+${SECUREKIT}share/PolicyKit/policy/org.freedesktop.hal.leds.policy
+${SECUREKIT}share/PolicyKit/policy/org.freedesktop.hal.policy
+${SECUREKIT}share/PolicyKit/policy/org.freedesktop.hal.power-management.policy
+${SECUREKIT}share/PolicyKit/policy/org.freedesktop.hal.storage.policy
+${SECUREKIT}share/PolicyKit/policy/org.freedesktop.hal.wol.policy
 share/examples/hal/hal.conf
 share/gtk-doc/html/libhal-storage/home.png
 share/gtk-doc/html/libhal-storage/index.html
@@ -101,6 +101,12 @@
 share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
 share/hal/fdi/policy/10osvendor/20-storage-methods.fdi
 share/hal/fdi/policy/10osvendor/30-wol.fdi
+libexec/hald-addon-storage
+libexec/hald-probe-storage
+libexec/hald-probe-volume
+libexec/scripts/netbsd/hal-system-power-reboot-netbsd
+libexec/scripts/netbsd/hal-system-power-shutdown-netbsd
+libexec/scripts/netbsd/hal-system-power-suspend-netbsd
 @exec ${MKDIR} ${PKG_SYSCONFDIR}/hal/fdi/information
 @exec ${MKDIR} ${PKG_SYSCONFDIR}/hal/fdi/policy
 @exec ${MKDIR} ${PKG_SYSCONFDIR}/hal/fdi/preprobe
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/hal/distinfo,v
retrieving revision 1.24
diff -u -r1.24 distinfo
--- distinfo	14 May 2012 03:12:01 -0000	1.24
+++ distinfo	31 Jan 2015 21:30:12 -0000
@@ -48,3 +48,4 @@
 SHA1 (patch-nb) = 1693b7a2faa5bee20a594f0b60b8ff6caea0efdc
 SHA1 (patch-nc) = 32453e49734902749ce24eb4364fc7f531986227
 SHA1 (patch-nd) = 877dcbafaca0cebd3fdce74c5a622721823c153b
+SHA1 (patch-umass) = b5048088dec7025bf193a192f2737ca7bc196900
diff -up patches/patch-umass.orig patches/patch-umass
--- patches/patch-umass.orig	2015-01-31 19:30:53.000000000 -0200
+++ patches/patch-umass	2015-01-31 19:05:50.000000000 -0200
@@ -0,0 +1,15 @@
+diff -up hald/netbsd/drvctl.c.orig hald/netbsd/drvctl.c
+--- hald/netbsd/drvctl.c.orig	2015-01-27 21:09:39.000000000 -0200
++++ hald/netbsd/drvctl.c	2015-01-27 21:12:00.000000000 -0200
+@@ -136,6 +136,10 @@ drvctl_dev_add(gchar *name)
+ static void
+ drvctl_dev_remove(gchar *name)
+ {
++	if (!strncmp(name,"umass",5)) {
++		HAL_INFO (("NOT REMOVE dev_remove: %s", name));
++		return;
++	}
+ 	HAL_INFO (("dev_remove: %s", name));
+ 
+ 	devinfo_remove_branch (name, NULL);
+diff -up hald/netbsd/hotplug.c.orig hald/netbsd/hotplug.c




Home | Main Index | Thread Index | Old Index