rpms/ivman/devel ivman-0.6.12-daemon.patch, NONE, 1.1 ivman-0.6.12-gnome-mount.patch, NONE, 1.1 ivman-0.6.12-new_hal.patch, NONE, 1.1 ivman-initscript, NONE, 1.1 ivman.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Patrice Dumas (pertusus)
fedora-extras-commits at redhat.com
Tue Oct 3 07:51:01 UTC 2006
Author: pertusus
Update of /cvs/extras/rpms/ivman/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32717/devel
Modified Files:
.cvsignore sources
Added Files:
ivman-0.6.12-daemon.patch ivman-0.6.12-gnome-mount.patch
ivman-0.6.12-new_hal.patch ivman-initscript ivman.spec
Log Message:
auto-import ivman-0.6.12-1 on branch devel from ivman-0.6.12-1.src.rpm
ivman-0.6.12-daemon.patch:
--- NEW FILE ivman-0.6.12-daemon.patch ---
--- ivman-0.6.12/src/IvmConfig/IvmConfigBase.xml.daemon 2006-04-18 09:48:11.000000000 +0200
+++ ivman-0.6.12/src/IvmConfig/IvmConfigBase.xml 2006-09-29 12:36:46.000000000 +0200
@@ -7,7 +7,7 @@
<!-- Whether or not to give debugging output. Warning, this is very
verbose! -->
- <ivm:Option name="debug" value="true" />
+ <ivm:Option name="debug" value="false" />
<!-- whether or not system-wide ivman should sleep a little while before
mounting volumes. Default: true. -->
@@ -24,7 +24,7 @@
<ivm:Option name="user" value="ivman" />
<!-- group for Ivman to run as. Should have permissions to run 'pmount'. -->
- <ivm:Option name="group" value="plugdev" />
+ <ivm:Option name="group" value="daemon" />
<!-- mount command. default is autodetected. Must be specified with
umountcommand. -->
ivman-0.6.12-gnome-mount.patch:
--- NEW FILE ivman-0.6.12-gnome-mount.patch ---
--- ivman-0.6.12/src/manager.c.gnome-mount 2006-04-18 09:48:11.000000000 +0200
+++ ivman-0.6.12/src/manager.c 2006-10-01 09:46:03.000000000 +0200
@@ -11,7 +11,7 @@
*
* See http://www.troll.no/qpl for QPL licensing information.
*
- * $Id: manager.c,v 1.74 2006/04/18 04:20:23 ro_han Exp $
+ * $Id: manager.c,v 1.76 2006/10/01 07:18:57 ro_han Exp $
************************************************************************/
#define _GNU_SOURCE
@@ -266,11 +266,11 @@
// Test if pmount-hal exists
if ( usermode ) {
- if ( !command_exists( "pmount-hal &> /dev/null" ) ) {
+ if ( !command_exists( "pmount-hal > /dev/null 2>&1" ) ) {
DEBUG(_("pmount-hal was not found on your system.\n"));
}
else {
- if ( !command_exists( "pumount &> /dev/null" ) ) {
+ if ( !command_exists( "pumount > /dev/null 2>&1" ) ) {
DEBUG(_("pmount-hal was found on your system, but pumount "
"wasn't!\n"));
}
@@ -284,20 +284,33 @@
return;
}
}
+ // Test if gnome-mount exists
+ if ( !command_exists( "gnome-mount > /dev/null 2>&1" ) ) {
+ DEBUG(_("gnome-mount was not found on your system.\n"));
+ }
+ else {
+ DEBUG(_
+ ("gnome-mount was found on your system. It will be "
+ "used for mounting.\n"));
+ known_mount_command = "gnome-mount -h '$hal.info.udi$'";
+ unknown_mount_command = known_mount_command;
+ umount_command = "gnome-mount -u -d '$hal.block.device$'";
+ return;
+ }
}
else {
DEBUG(_
- ("pmount-hal detection skipped, as we are a root instance "
- "of Ivman. pmount-hal is only used for user instances.\n"));
+ ("pmount-hal/gnome-mount detection skipped, as we are a root instance "
+ "of Ivman. pmount-hal/gnome-mount is only used for user instances.\n"));
}
// Now try looking for regular pmount.
- if ( !command_exists( "pmount &> /dev/null" ) ) {
+ if ( !command_exists( "pmount > /dev/null 2>&1" ) ) {
DEBUG(_("pmount was not found on your system.\n"));
}
else {
- if ( !command_exists( "pumount &> /dev/null" ) ) {
+ if ( !command_exists( "pumount > /dev/null 2>&1" ) ) {
DEBUG(_
("pmount was found on your system, but pumount "
"wasn't!\n"));
@@ -323,7 +336,7 @@
g_string_append( pmount_umask_check, " --help | " );
pmount_umask_check =
g_string_append( pmount_umask_check, GREP_PATH
- " -- '-u <' &> /dev/null");
+ " -- '-u <' > /dev/null 2>&1");
gboolean umask_accepted =
command_succeeds( pmount_umask_check->str );
@@ -366,12 +379,12 @@
// At the bottom of the barrel is plain old mount ...
- if ( !command_exists( "mount &> /dev/null" ) ) {
+ if ( !command_exists( "mount > /dev/null 2>&1" ) ) {
DEBUG(_("mount was not found on your system.\n"));
}
else {
- if ( !command_exists( "umount &> /dev/null" ) ) {
+ if ( !command_exists( "umount > /dev/null 2>&1" ) ) {
DEBUG(_
("mount was found on your system, but umount was "
"not!\n"));
ivman-0.6.12-new_hal.patch:
--- NEW FILE ivman-0.6.12-new_hal.patch ---
--- ivman-0.6.12/src/IvmConfig/IvmConfigCommon.c.hal 2006-10-01 09:42:45.000000000 +0200
+++ ivman-0.6.12/src/IvmConfig/IvmConfigCommon.c 2006-10-01 09:43:14.000000000 +0200
@@ -251,7 +251,6 @@
of these being true is sufficient)
1) volume is a disc with no data
2) storage.automount_enabled_hint = false on block.storage_device
- 3) volume.is_mounted == true
*/
if (libhal_device_property_exists
(hal_ctx, udi, "volume.disc.has_data", &dbus_error)
@@ -301,18 +300,6 @@
}
libhal_free_string(new_udi);
}
-
- if (libhal_device_property_exists
- (hal_ctx, udi, "volume.is_mounted", &dbus_error)
- && (libhal_device_get_property_bool(hal_ctx, udi,
- "volume.is_mounted",
- &dbus_error)))
- {
- DEBUG(_("\
-Won't try to mount device %s, as it is already mounted"), device);
- libhal_free_string(device);
- return FALSE;
- }
// yay, we made it!!!
--- NEW FILE ivman-initscript ---
#!/bin/sh
#
# ivman This script starts ivman deamon
#
# chkconfig: - 26 59
# description: This script starts and stops the ivman deamon
# processname: ivman
# pid /var/run/ivman.pid
# config: /etc/ivman/*
#
### BEGIN INIT INFO
# Provides: ivman
# Required-Start: haldaemon
# Required-Stop: haldaemon
# Default-Stop: 0 1 6
# Short-Description: ivman daemon to handle HAL events
# Description: Ivman is a generic handler for HAL events. \
# It can be used to automount, run arbitrary commands when \
# events or conditions occur or properties are modified on your hardware \
# (e.g., run a command when you close your laptop's lid, run a command when \
# a particular device is attached or a particular CD is inserted, etc).
### END INIT INFO
. /etc/init.d/functions
processname=ivman
servicename=ivman
# Sanity checks.
[ -x /usr/bin/ivman ] || exit 0
RETVAL=0
function ivman_start() {
echo -n "Starting ivman daemon: "
daemon --check $servicename $processname
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
touch /var/lock/subsys/$servicename
echo `/sbin/pidof $processname` > /var/run/ivman.pid
fi
return $RETVAL
}
function ivman_stop() {
echo -n "Stopping ivman daemon: "
killproc $servicename -TERM
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
rm -f /var/lock/subsys/$servicename
rm -f /var/run/ivman.pid
fi
return $RETVAL
}
function ivman_status() {
status $processname
RETVAL=$?
return $RETVAL
}
case "$1" in
start)
ivman_start
RETVAL=$?
;;
stop)
ivman_stop
RETVAL=$?
;;
restart|reload)
ivman_stop
sleep 1
ivman_start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/$servicename ]; then
ivman_stop
sleep 1
ivman_start
RETVAL=$?
fi
;;
status)
ivman_status
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status|condrestart}"
exit 1
;;
esac
exit $RETVAL
--- NEW FILE ivman.spec ---
Name: ivman
Version: 0.6.12
Release: 1%{?dist}
Summary: Generic handler for HAL events
Group: System Environment/Libraries
License: GPL/QPL
URL: http://ivman.sourceforge.net/
Source0: http://ovh.dl.sourceforge.net/sourceforge/ivman/ivman-%{version}.tar.bz2
# taken from mandriva spec and modified
Source1: ivman-initscript
Patch0: ivman-0.6.12-daemon.patch
# patches from ivman cvs
# detect gnome-mount and remove bashisms from command calls
Patch1: ivman-0.6.12-gnome-mount.patch
# fix automount for new hal
Patch2: ivman-0.6.12-new_hal.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig gettext
BuildRequires: libxml2-devel glib2-devel dbus-glib-devel hal-devel
#Requires:
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
%description
Ivman is a generic handler for HAL events. Originally for automounting,
it can now be used to run arbitrary commands when events or conditions
occur or properties are modified on your hardware (e.g., run a command
when you close your laptop's lid, run a command when a particular device
is attached or a particular CD is inserted, etc).
To be able to mount devices automatically as a user, you should also
install gnome-mount and/or pmount.
%prep
%setup -q
%patch0 -p1 -b .daemon
%patch1 -p1 -b .gnome-mount
%patch2 -p1 -b .hal
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
install -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name}
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%pre
useradd -r -s /sbin/nologin -d / -M -c 'Ivman user' -g daemon ivman &>/dev/null || :
%post
# This adds the proper /etc/rc*.d links for the script
/sbin/chkconfig --add %{name}
%preun
if [ $1 = 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING* AUTHORS ChangeLog README TODO
%dir %{_sysconfdir}/ivman
%config(noreplace) %{_sysconfdir}/ivman/IvmConfig*.xml
%{_initrddir}/%{name}
%{_bindir}/ivman*
%{_mandir}/man5/IvmConfig*.5*
%{_mandir}/man8/ivman*.8*
%changelog
* Sun Sep 24 2006 Patrice Dumas <pertusus at free.fr> 0.6.12-1
- initial packaging
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ivman/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 3 Oct 2006 07:49:59 -0000 1.1
+++ .cvsignore 3 Oct 2006 07:51:01 -0000 1.2
@@ -0,0 +1 @@
+ivman-0.6.12.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ivman/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 3 Oct 2006 07:49:59 -0000 1.1
+++ sources 3 Oct 2006 07:51:01 -0000 1.2
@@ -0,0 +1 @@
+031c763d6acc927bf2fefd7c6140247d ivman-0.6.12.tar.bz2
More information about the fedora-extras-commits
mailing list