install devmon systemd service files (or --disable-systemd) #10

This commit is contained in:
IgnorantGuru 2012-10-15 07:16:28 -06:00
parent 147b61587c
commit 262a37232f
10 changed files with 254 additions and 8 deletions

View File

@ -1,5 +1,7 @@
0.3.3+
btrfs moint point detection workaround - spacefm issue 165
adjustment for build on debian squeeze
install devmon systemd service files (or --disable-systemd) #10
0.3.3 2012-09-14:
update ru.po
no quote cifs password

View File

@ -54,8 +54,8 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
config.guess config.sub depcomp install-sh ltmain.sh missing \
mkinstalldirs
compile config.guess config.sub depcomp install-sh ltmain.sh \
missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \

11
README
View File

@ -16,10 +16,10 @@ CONTENTS
CREATE DEB PACKAGE
POST INSTALL
Kernel Polling
Set SUID
Networks and Files
FTP Support
NTFS-3G
Set SUID
systemd Service
ENABLE KERNEL POLLING
UNINSTALL
TRANSLATIONS
@ -246,6 +246,13 @@ POST INSTALL
You can also limit users and groups by editing /etc/udevil/udevil.conf
systemd Service
---------------
To start devmon as a systemd service:
systemctl start devmon@<user>
ENABLE KERNEL POLLING
You may need to enable kernel polling for device media to be detected by

35
aclocal.m4 vendored
View File

@ -10137,6 +10137,41 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 6
# AM_PROG_CC_C_O
# --------------
# Like AC_PROG_CC_C_O, but changed for automake.
AC_DEFUN([AM_PROG_CC_C_O],
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
if test "$am_t" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
dnl Make sure AC_PROG_CC is never called again, or it will override our
dnl setting of CC.
m4_define([AC_PROG_CC],
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008

View File

@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Copy devmon daemon systemd files */
#undef ADD_SYSTEMD
/* always defined to indicate that i18n is enabled */
#undef ENABLE_NLS
@ -61,6 +64,9 @@
/* path to mount */
#undef MOUNTPROG
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Name of package */
#undef PACKAGE

161
configure vendored
View File

@ -654,6 +654,8 @@ GLIB_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
ADD_SYSTEMD_FALSE
ADD_SYSTEMD_TRUE
OTOOL64
OTOOL
LIPO
@ -819,6 +821,7 @@ with_mount_prog
with_umount_prog
with_losetup_prog
with_setfacl_prog
enable_systemd
'
ac_precious_vars='build_alias
host_alias
@ -1462,6 +1465,8 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-systemd disable installation of devmon daemon files for
systemd (default: enable)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -4429,6 +4434,132 @@ if test "$ac_res" != no; then :
fi
if test "x$CC" != xcc; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
fi
set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
rm -f conftest2.*
if { { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } &&
test -f conftest2.$ac_objext && { { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
if { ac_try='cc -c conftest.$ac_ext >&5'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
rm -f conftest2.*
if { { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } &&
test -f conftest2.$ac_objext && { { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; };
then
# cc works too.
:
else
# cc exists but doesn't like -o.
eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
fi
fi
else
eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
rm -f core conftest*
fi
if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
fi
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
if test "$am_t" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@ -12130,6 +12261,29 @@ fi
setfaclprog="$withval"
# options
# Check whether --enable-systemd was given.
if test "${enable_systemd+set}" = set; then :
enableval=$enable_systemd; use_systemd=$enableval
else
use_systemd="yes"
fi
if test x"$use_systemd" = x"yes"; then
$as_echo "#define ADD_SYSTEMD 1" >>confdefs.h
fi
if test "$use_systemd" = "yes"; then
ADD_SYSTEMD_TRUE=
ADD_SYSTEMD_FALSE='#'
else
ADD_SYSTEMD_TRUE='#'
ADD_SYSTEMD_FALSE=
fi
# check for libs gobject-2.0 gmodule-2.0 gthread-2.0
@ -13306,6 +13460,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ADD_SYSTEMD_TRUE}" && test -z "${ADD_SYSTEMD_FALSE}"; then
as_fn_error $? "conditional \"ADD_SYSTEMD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@ -15570,7 +15728,7 @@ fi
echo
echo udevil....................................... : Version $VERSION BETA TEST
echo udevil....................................... : Version $VERSION
echo
echo Linux device support......................... : libudev
if test x"$mountprog" != x""; then
@ -15593,6 +15751,7 @@ echo setfacl program.............................. : $setfaclprog
else
echo setfacl program.............................. : /usr/bin/setfacl
fi
echo install devmon systemd service............... : $use_systemd
echo
echo Installation Prefix.......................... : $prefix
echo " The binary will be installed as $prefix/bin/udevil"

View File

@ -9,6 +9,7 @@ AC_PROG_INTLTOOL([0.21])
AM_MAINTAINER_MODE
AC_ISC_POSIX
AM_PROG_CC_C_O
AC_HEADER_STDC
AM_PROG_LIBTOOL
AC_PROG_INSTALL
@ -75,6 +76,18 @@ AC_ARG_WITH(setfacl-prog,
setfaclprog="$withval"
# options
AC_ARG_ENABLE(
[systemd],
AS_HELP_STRING([--disable-systemd],
[disable installation of devmon daemon files for systemd (default: enable)]),
use_systemd=$enableval, use_systemd="yes")
if test x"$use_systemd" = x"yes"; then
AC_DEFINE([ADD_SYSTEMD], [1], [Copy devmon daemon systemd files])
fi
AM_CONDITIONAL(ADD_SYSTEMD, test "$use_systemd" = "yes")
# check for libs gobject-2.0 gmodule-2.0 gthread-2.0
dnl Check for glib 2.0
PKG_CHECK_MODULES(GLIB, [glib-2.0], , [
@ -132,7 +145,7 @@ src/Makefile
echo
echo udevil....................................... : Version $VERSION BETA TEST
echo udevil....................................... : Version $VERSION
echo
echo Linux device support......................... : libudev
if test x"$mountprog" != x""; then
@ -155,6 +168,7 @@ echo setfacl program.............................. : $setfaclprog
else
echo setfacl program.............................. : /usr/bin/setfacl
fi
echo install devmon systemd service............... : $use_systemd
echo
echo Installation Prefix.......................... : $prefix
echo " The binary will be installed as $prefix/bin/udevil"

3
debian/rules vendored
View File

@ -11,3 +11,6 @@
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- --disable-systemd

View File

@ -1,7 +1,19 @@
if ADD_SYSTEMD
EXTRA_DIST = udevil.conf devmon devmon@.service
else
EXTRA_DIST = udevil.conf
endif
install-data-hook:
test -d $(DESTDIR)/etc/udevil || mkdir -p -- $(DESTDIR)/etc/udevil
test -f $(DESTDIR)/etc/udevil/udevil.conf || $(INSTALL_DATA) \
$(srcdir)/udevil.conf $(DESTDIR)/etc/udevil/udevil.conf
if ADD_SYSTEMD
test -d $(DESTDIR)/etc/conf.d || mkdir -p -- $(DESTDIR)/etc/conf.d
test -f $(DESTDIR)/etc/conf.d/devmon || $(INSTALL_DATA) \
$(srcdir)/systemd/devmon $(DESTDIR)/etc/conf.d/devmon
test -d $(DESTDIR)/$(libdir)/systemd/system || \
mkdir -p -- $(DESTDIR)/$(libdir)/systemd/system
$(INSTALL_DATA) $(srcdir)/systemd/devmon@.service \
$(DESTDIR)/$(libdir)/systemd/system/devmon@.service
endif

View File

@ -220,7 +220,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = udevil.conf
@ADD_SYSTEMD_FALSE@EXTRA_DIST = udevil.conf
@ADD_SYSTEMD_TRUE@EXTRA_DIST = udevil.conf devmon devmon@.service
all: all-am
.SUFFIXES:
@ -417,6 +418,13 @@ install-data-hook:
test -d $(DESTDIR)/etc/udevil || mkdir -p -- $(DESTDIR)/etc/udevil
test -f $(DESTDIR)/etc/udevil/udevil.conf || $(INSTALL_DATA) \
$(srcdir)/udevil.conf $(DESTDIR)/etc/udevil/udevil.conf
@ADD_SYSTEMD_TRUE@ test -d $(DESTDIR)/etc/conf.d || mkdir -p -- $(DESTDIR)/etc/conf.d
@ADD_SYSTEMD_TRUE@ test -f $(DESTDIR)/etc/conf.d/devmon || $(INSTALL_DATA) \
@ADD_SYSTEMD_TRUE@ $(srcdir)/systemd/devmon $(DESTDIR)/etc/conf.d/devmon
@ADD_SYSTEMD_TRUE@ test -d $(DESTDIR)/$(libdir)/systemd/system || \
@ADD_SYSTEMD_TRUE@ mkdir -p -- $(DESTDIR)/$(libdir)/systemd/system
@ADD_SYSTEMD_TRUE@ $(INSTALL_DATA) $(srcdir)/systemd/devmon@.service \
@ADD_SYSTEMD_TRUE@ $(DESTDIR)/$(libdir)/systemd/system/devmon@.service
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.