Added --enable-no-vixie-clobber to configure.ac.

This commit is contained in:
Dale Mellor 2010-06-13 03:49:39 +01:00
commit 323033546d
3 changed files with 47 additions and 19 deletions

View file

@ -1,4 +1,17 @@
2008-02-21 Dale Mellor <Dale Mellor <dale_mellor@users.sourceforge.net> 2010-06-13 Dale Mellor <dale_mellor@users.sourceforge.net>
* configure.ac: added --enable-no-vixie-clobber argument to
configure so that the root user can avoid overwriting a legacy
cron installation.
* mcron.1: added simple, minimal man page using help2man (the
texinfo file is still the primary documentation source).
* makefile.am: replaced use of mkinstalldirs with install; the
former is not supplied with the latest automake (1.11).
2008-02-21 Dale Mellor <dale_mellor@users.sourceforge.net>
* ALL FILES: Replaced version 2 GPL notices with version 3 ones. * ALL FILES: Replaced version 2 GPL notices with version 3 ones.
@ -8,12 +21,13 @@
* configure.ac: Bumped version to 1.0.4. * configure.ac: Bumped version to 1.0.4.
2008-01-25 Dale Mellor <Dale Mellor <dale_mellor@users.sourceforge.net>
2008-01-25 Dale Mellor <dale_mellor@users.sourceforge.net>
* main.scm (command-type): Files which are listed on the command * main.scm (command-type): Files which are listed on the command
line are assumed to be guile configurations if they do not end in line are assumed to be guile configurations if they do not end in
.guile or .vixie (previously they were silently ignored). .guile or .vixie (previously they were silently ignored).
* main.scm: Argument to --schedule is no longer optional (the * main.scm: Argument to --schedule is no longer optional (the
options system goes really screwy with optional values, usually options system goes really screwy with optional values, usually
pulling the first non-option argument as a value if one was not pulling the first non-option argument as a value if one was not
@ -24,9 +38,9 @@
AM_PROGS_CC_C_O in configure.ac (!) AM_PROGS_CC_C_O in configure.ac (!)
* Version is currently at 1.0.3. * Version is currently at 1.0.3.
2005-09-02 hydro23 <Dale Mellor <dale_mellor@users.sourceforge.net>
2005-09-02 Dale Mellor <dale_mellor@users.sourceforge.net>
* makefile.am, mcron.c.template (main): Modified install-exec-hook * makefile.am, mcron.c.template (main): Modified install-exec-hook
so that a proper installation of a Vixie-compatible cron only so that a proper installation of a Vixie-compatible cron only
@ -41,7 +55,7 @@
laptop awakes from suspend mode). laptop awakes from suspend mode).
* Bumped version to 1.0.2. * Bumped version to 1.0.2.
2004-05-15 Dale Mellor <dale_mellor@users.sourceforge.net> 2004-05-15 Dale Mellor <dale_mellor@users.sourceforge.net>
@ -49,7 +63,7 @@
properly homed at www.gnu.org. properly homed at www.gnu.org.
* Bumped version to 1.0.1. * Bumped version to 1.0.1.
2003-12-11 Dale Mellor <dale_mellor@users.sourceforge.net> 2003-12-11 Dale Mellor <dale_mellor@users.sourceforge.net>
@ -58,7 +72,7 @@
* Bumped version to 1.0.0. * Bumped version to 1.0.0.
2003-12-07 Dale Mellor <dale_mellor@users.sourceforge.net> 2003-12-07 Dale Mellor <dale_mellor@users.sourceforge.net>
* configure.ac: Added switches for files and directories used by * configure.ac: Added switches for files and directories used by
@ -67,24 +81,24 @@
these configure options (including the source for the texinfo these configure options (including the source for the texinfo
manual). manual).
2003-12-05 Dale Mellor <dale_mellor@users.sourceforge.net> 2003-12-05 Dale Mellor <dale_mellor@users.sourceforge.net>
* configure.ac: Added test for guile version >= 1.6.4. * configure.ac: Added test for guile version >= 1.6.4.
* bumped version to 0.99.4. * bumped version to 0.99.4.
2003-08-03 Dale Mellor <dale_mellor@users.sourceforge.net> 2003-08-03 Dale Mellor <dale_mellor@users.sourceforge.net>
* Third cut, fully functional, modular, production quality, still * Third cut, fully functional, modular, production quality, still
needs testing... needs testing...
* Pulled all functionality into modules, so it can be incorporated * Pulled all functionality into modules, so it can be incorporated
into other programs. into other programs.
* Bumped version to 0.99.3. * Bumped version to 0.99.3.
2003-07-20 Dale Mellor <dale_mellor@users.sourceforge.net> 2003-07-20 Dale Mellor <dale_mellor@users.sourceforge.net>
@ -111,7 +125,7 @@
* Broken/incomplete Guile prevents vixie compatibility from * Broken/incomplete Guile prevents vixie compatibility from
working - this has been disabled by default in the configuration. working - this has been disabled by default in the configuration.
* Version set at 0.99.1 * Version set at 0.99.1

View file

@ -105,6 +105,18 @@ fi
SENDMAIL=$ac_cv_prog_SENDMAIL SENDMAIL=$ac_cv_prog_SENDMAIL
# Find out if we are avoiding Vixie.
AC_MSG_CHECKING([whether to avoid clobbering a Vixie installation])
AC_ARG_ENABLE(no-vixie-clobber,
AC_HELP_STRING([--enable-no-vixie-clobber],
[do not install with program names that would override a legacy cron installation]),
NO_VIXIE_CLOBBER=$enableval,
NO_VIXIE_CLOBBER=[no])
AC_MSG_RESULT($NO_VIXIE_CLOBBER)
AC_SUBST(NO_VIXIE_CLOBBER)
# Configure the various files that mcron uses at runtime. # Configure the various files that mcron uses at runtime.
AC_MSG_CHECKING([which spool directory to use]) AC_MSG_CHECKING([which spool directory to use])

View file

@ -50,12 +50,12 @@ pkgdata_DATA = core.scm environment.scm job-specifier.scm redirect.scm \
# of this). # of this).
core.scm : mcron-core.scm core.scm : mcron-core.scm
$(CP) mcron-core.scm core.scm $(CP) mcron-core.scm core.scm
mcron.c : main.scm crontab.scm makefile.ed mcron.c.template mcron.c : main.scm crontab.scm makefile.ed mcron.c.template
@echo 'Building mcron.c...' @echo 'Building mcron.c...'
@$(ED) < makefile.ed > /dev/null 2>&1 @$(ED) < makefile.ed > /dev/null 2>&1
@rm -f mcron.escaped.scm > /dev/null 2>&1 @rm -f mcron.escaped.scm > /dev/null 2>&1
#full program prefix #full program prefix
@ -63,7 +63,7 @@ fpp = $(DESTDIR)$(bindir)/@real_program_prefix@
install-exec-hook: install-exec-hook:
@if [ "`id -u`" -eq "0" ]; then \ @if [ "x@NO_VIXIE_CLOBBER@" != "xyes" -a "`id -u`" -eq "0" ]; then \
rm -f $(fpp)cron$(EXEEXT) > /dev/null 2>&1; \ rm -f $(fpp)cron$(EXEEXT) > /dev/null 2>&1; \
$(INSTALL) --mode='u=rwx' mcron$(EXEEXT) $(fpp)cron$(EXEEXT); \ $(INSTALL) --mode='u=rwx' mcron$(EXEEXT) $(fpp)cron$(EXEEXT); \
rm -f $(fpp)crontab$(EXEEXT) > /dev/null 2>&1; \ rm -f $(fpp)crontab$(EXEEXT) > /dev/null 2>&1; \
@ -72,12 +72,14 @@ install-exec-hook:
$(INSTALL) -d --mode='u=rwx,og=rx' /var/run; \ $(INSTALL) -d --mode='u=rwx,og=rx' /var/run; \
$(INSTALL) -d --mode='u=rwx,og=rx' @GUILE_SITE@; \ $(INSTALL) -d --mode='u=rwx,og=rx' @GUILE_SITE@; \
$(INSTALL) -d --mode='u=rwx,og=rx' @GUILE_SITE@/mcron; \ $(INSTALL) -d --mode='u=rwx,og=rx' @GUILE_SITE@/mcron; \
elif [ "x@NO_VIXIE_CLOBBER@" = "xyes" ]; then \
echo "Not installing Vixie-style programs"; \
else \ else \
echo "+++ WARNING: NON-ROOT INSTALL: ONLY mcron WILL BE INSTALLED, NOT ANY OF THE VIXIE REPLACEMENT PROGRAMS"; \ echo "+++ WARNING: NON-ROOT INSTALL: ONLY mcron WILL BE INSTALLED, NOT ANY OF THE VIXIE REPLACEMENT PROGRAMS"; \
fi fi
uninstall-hook: uninstall-hook:
if [ "`id -u`" -eq "0" ]; then \ if [ "`id -u`" -eq "0" ]; then \
rm -f $(fpp){cron,crontab}$(EXEEXT); \ rm -f $(fpp){cron,crontab}$(EXEEXT); \
fi fi