SummaryRefsLogTreeCommitDiffStats
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Add "maint.mk"Mathieu Lirzin2018-03-263-0/+32
| | | | | | * maint.mk: New maintainer-only Makefile fragment. * Makefile.am: Include it. * configure.ac: Substitute "maint.mk" content when it exists.
* maint: Document how to get code coverage reportsMathieu Lirzin2018-03-251-0/+8
| | | | * HACKING <Code coverage>: New section.
* maint: Update files from upstream with "build-aux/gnu-fetch"Mathieu Lirzin2018-03-251-9/+28
| | | | * build-aux/test-driver.scm: Update.
* utils: It's 2018!Mathieu Lirzin2018-03-251-1/+1
| | | | * src/mcron/utils.scm (show-version): Update copyright.
* utils: Check 'mcron-error'Mathieu Lirzin2018-03-251-1/+43
| | | | | * tests/utils.scm ("mcron-error: exit code", "mcron-error: output") ("mcron-error: output no-exit", "mcron-error: only stderr"): New tests.
* tests: Add "tests/utils.scm"Mathieu Lirzin2018-03-252-1/+53
| | | | | * tests/utils.scm: New test. * Makefile.am (TESTS): Add it.
* maint: Update files from upstream with "build-aux/gnu-fetch"Mathieu Lirzin2018-03-242-65/+92
| | | | | * build-aux/gitlog-to-changelog: Update. * build-aux/test-driver.scm: Likewise.
* maint: Add "build-aux/gnu-fetch" script.Mathieu Lirzin2018-03-242-1/+104
| | | | | | * build-aux/gnu-fetch: New script for fetching auxilary scripts maintained in other GNU repositories. * HACKING: Document how to run it.
* tests: Remove unused schedule stubsMathieu Lirzin2018-03-241-13/+12
| | | | | | * tests/base.scm ("number-children: init") ("update-number-children!: 1+", "update-number-children!: 1-"): Remove 'let' form defining the schedule stub.
* environment: Check configuration environmentMathieu Lirzin2018-03-241-1/+54
| | | | | | | * tests/environment.scm ("current-environment-mods-copy: empty") ("current-environment-mods: init", "append-environment-mods: basic") ("append-environment-mods: twice", "clear-environment-mods: effect") ("current-environment-mods-copy: basic"): New tests.
* environment: Refactor configuration environment handlingMathieu Lirzin2018-03-241-35/+38
| | | | | | | | * src/mcron/environment.scm (current-environment-mods): Rename to ... (%current-environment-mods): ... this. Box it using SRFI-111 to be explicit about the mutability of this object. (get-current-environment-mods-copy, clear-environment-mods) (append-environment-mods): New '#:ENVIRON' argument.
* base: Check 'run-job'Mathieu Lirzin2018-03-241-0/+16
| | | | * tests/base.scm ("run-job: basic"): New test.
* base: Box 'number-children'Mathieu Lirzin2018-03-242-6/+47
| | | | | | | | | * src/mcron/base.scm (number-children): Box it using SRFI-111 to be explicit about the mutability of this object. (update-number-children!): New procedure. (run-job, child-cleanup): Use it. * tests/base.scm ("update-number-children!: 1+") ("number-children: init", "update-number-children!: 1-"): New tests.
* base: Rewrite 'child-cleanup'Mathieu Lirzin2018-03-241-6/+6
| | | | * src/mcron/base.scm (child-cleanup): Use recursion instead of 'do'.
* utils: Add 'get-user'Mathieu Lirzin2018-03-243-8/+17
| | | | | | * src/mcron/utils.scm (get-user): New procedure. * src/mcron/job-specifier.scm (job): Use it. * src/mcron/base.scm (remove-user-jobs): Likewise.
* base: Rewrite 'find-next-jobs' docstring.Mathieu Lirzin2018-03-241-15/+4
| | | | | * src/mcron/base.scm (find-next-jobs): Don't explain the detail of implementation in the docstring.
* tests: Add "tests/base.scm"Mathieu Lirzin2018-03-242-0/+152
| | | | | * tests/base.scm: New test. * Makefile.am (TESTS): Add it.
* base: Add '<schedule>' record data typeMathieu Lirzin2018-03-242-71/+87
| | | | | | | | | | | | | | | | | | Reifying the notion of a schedule helps reasoning about the code. Passing a schedule as an argument to related procedures allows writing simpler unit tests. * src/mcron/base.scm(<schedule>): New record data type. (make-schedule, schedule-user, set-schedule-user!) (schedule-system, set-schedule-system!) (schedule-current, set-schedule-current!): New procedures. (system-job-list, user-job-list, configuration-source): Replace those global variables with ... (%global-schedule): ... this global <schedule> instance. * src/mcron/base.scm (use-system-job-list, use-user-job-list) (remove-user-jobs, clear-system-jobs, add-job, find-next-jobs) (display-schedule, run-job-loop): Add '#:SCHEDULE' keyword argument. * doc/mcron.texi (The base module): Update documentation.
* build: Check non-standard C functions at configure timeMathieu Lirzin2018-03-231-0/+6
| | | | * configure.ac: Check 'argp_parse' and 'asprintf' presence.
* job-specifier: Use 'simple-format'Mathieu Lirzin2018-03-231-4/+3
| | | | | * src/mcron/job-specifier.scm (job): Use 'simple-format' instead of 'with-output-to-string'.
* maint: Update copyright yearsMathieu Lirzin2018-03-203-3/+3
|
* utils: Use 'scandir' instead of custom 'for-each-file'Mathieu Lirzin2018-03-205-36/+26
| | | | | | | | | | | | * src/mcron/utils.scm (for-each-file): Delete. * src/mcron/scripts/cron.scm (process-files-in-system-directory): Use 'scandir' which has the benefit of being deterministic. * src/mcron/scripts/mcron.scm (process-files-in-user-directory): Likewise. * tests/schedule.sh: Update expected output which is now more reliable. * NEWS: Update. Suggested-by: Ludovic Courtès <ludo@gnu.org>
* tests: Set timezone in "schedule.sh"Mathieu Lirzin2018-03-201-21/+26
| | | | | | | | | | Previously the test environment was implicitly expecting the current timezone to be UTC+1. * tests/schedule.sh: Set TZ environment variable to 'UTC0'. Update expected result. Reported-by: Ludovic Courtès <ludo@gnu.org>
* maint: Update NEWSMathieu Lirzin2018-03-201-0/+5
| | | | * NEWS: Announce the availability of 'make installcheck'.
* build: Support 'make installcheck'Mathieu Lirzin2018-03-202-1/+17
| | | | | | | * configure.ac: Pass 'std-options' to AM_INIT_AUTOMAKE to check that the "--help" and "--version" options can be passed to installed programs. * Makefile.am (installcheck-local): New rule which checks the programs presence and configuration.
* build: Properly set Guile load paths in programsMathieu Lirzin2018-03-202-2/+5
| | | | | | | | | | This fixes an issue where the installed Guile load paths were set by the undefined 'moduledir' Make macro. * Makefile.am (AM_CPPFLAGS): Define PACKAGE_LOAD_PATH with 'guilesitedir' macro and PACKAGE_LOAD_COMPILED_PATH with 'guilesitegodir'. * NEWS: Update.
* build: Handle all programs names transformationsMathieu Lirzin2018-03-202-11/+4
| | | | | | | | | | | | Previously only prepending a prefix was handled when installing 'crontab'. Using the 'transform' Make macro allows the installation process to support generic transformations as defined by the '--program-suffix' and '--program-transform-name' configure options. * configure.ac: Don't substitue '@real_program_prefix@'. * Makefile.am (fpp): Remove. (transform_exe): New macro. [MULTI_USER] (install-exec-hook): Use it when installing 'crontab'.
* build: Reverse '--disable-multi-user' effectMathieu Lirzin2018-03-192-1/+5
| | | | | | | | This fixes a bug where the '--disable-multi-user' was actually having the reverse effect of installing 'cron' and 'crontab'. * configure.ac: Reverse equality test when setting 'MULTI_USER' Automake conditional.
* maint: Remove obsolete configure checksMathieu Lirzin2018-03-191-18/+0
| | | | | | * configure.ac: Don't check for 'sed' and 'cp' programs which are considered portable. Don't check for 'head' and 'which' programs which are not required.
* maint: Post-release administriviaMathieu Lirzin2018-03-192-1/+4
| | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version.
* version 1.1v1.1Mathieu Lirzin2018-03-191-1/+1
| | | | * NEWS: Record release date.
* maint: Add ".prev-version"Mathieu Lirzin2018-03-181-0/+1
| | | | | | This file is used by the "build-aux/do-release-commit-and-tag" script. * .prev-version: New file
* maint: Include maintainer scripts from GnulibMathieu Lirzin2018-03-184-0/+1386
| | | | | | | * build-aux/announce-gen: New script. * build-aux/do-release-commit-and-tag: Likewise. * build-aux/gnu-web-doc-update: Likewise. * build-aux/gnupload: Likewise.
* build: Programs are not implicitly depending on librariesMathieu Lirzin2018-03-171-3/+3
| | | | | | | | Before that change, it was possible for 'make' to try linking programs before 'src/libmcron.a' was built. * Makefile.am (bin_mcron_DEPENDENCIES, bin_cron_DEPENDENCIES) (bin_crontab_DEPENDENCIES): Add '$(noinst_LIBRARIES)'.
* tests: Add 'schedule.sh'Mathieu Lirzin2018-03-163-1/+128
| | | | | | | * tests/schedule.sh: New test. * Makefile.am (TESTS): Add it. * src/mcron/job-specifier.scm (configuration-time): Use SOURCE_DATE_EPOCH for reproducible tests.
* base: Add 'display-schedule' procedureMathieu Lirzin2018-03-165-32/+32
| | | | | | | | | | | | | This procedure is a more generic and less coupled version of 'get-schedule' which has been kept for backward compatibility and deprecated. * src/mcron/base.scm (display-schedule): New procedure. (get-schedule): Move to ... * src/mcron/core.scm: ... here. * src/mcron/scripts/cron.scm (main): Use 'display-schedule'. * src/mcron/scripts/mcron.scm (main): Likewise. * doc/mcron.texi (The base module): Document it.
* crontab: Extract procedures from 'main'Mathieu Lirzin2018-03-161-35/+34
| | | | | * src/mcron/scripts/crontab.scm (in-access-file?) (hit-server): New procedures.
* maint: Remove old mailing-lists from READMEMathieu Lirzin2017-09-291-4/+1
| | | | * README: Remove non-existing mailing-lists.
* maint: Replace "README--git" with "HACKING"Mathieu Lirzin2017-09-293-20/+77
| | | | | | * README--git: Delete. * HACKING: New file documenting how to contribute to Mcron. * Makefile.am (EXTRA_DIST): Distribute it.
* maint: Add Ludovic Courtès to the authorsMathieu Lirzin2017-09-291-0/+1
| | | | * AUTHORS: Add Ludovic Courtès.
* maint: Update NEWSMathieu Lirzin2017-09-291-0/+45
| | | | * NEWS: Update with changes made since last release.
* maint: Rewrite old NEWSMathieu Lirzin2017-09-281-69/+52
| | | | * NEWS: Follow the format used by GNU Coreutils.
* tests: Add 'basic.sh'Mathieu Lirzin2017-09-285-1/+647
| | | | | | | | | | * tests/init.sh: New test framework from Gnulib. * tests/basic.sh: New test. * Makefile.am (TESTS): Add it. (TEST_EXTENSIONS): Add '.sh'. (SH_LOG_COMPILER): Use 'pre-inst-env'. (EXTRA_DIST): Add 'tests/init.sh'. * build-aux/pre-inst-env.in: export $srcdir for shell tests.
* doc: Use 'unless' formMathieu Lirzin2017-09-281-3/+3
| | | | | * doc/mcron.texi (Invoking cron or crond): Use 'unless' form and put "/etc/crontab" inside a @code command.
* utils: Add 'assq_symbol_set_x' functionMathieu Lirzin2017-09-285-16/+18
| | | | | * src/utils.c (assq_symbol_set_x): New function. * src/mcron.c (parse_opt): Use it.
* mcron: Handle command line arguments in C with argpMathieu Lirzin2017-09-282-61/+108
| | | | | | | | | | | 'argp' is a convenient and maintainable way to parse command line arguments. Guile doesn't offer an equivalent of this, so the command line handling has been moved to C. * src/mcron.c (parse_args, parse_opt): New functions. (inner_main): Call 'parse_args'. * src/mcron/scripts/mcron.scm (show-help, %options): Delete. (main): Remove command line handling.
* Replace generic C wrapper with individual programsMathieu Lirzin2017-09-285-28/+113
| | | | | | | | | | | * src/wrapper.c: Delete. * src/crontab.c: New file. * src/mcron.c: Likewise. * src/cron.c: Likewise. * configure.ac: Adapt 'AC_CONFIG_DIR' to use "src/mcron.c". * Makefile.am (bin_crontab_SOURCES, bin_cron_SOURCES) (bin_mcron_SOURCES): Use new files. (bin_cron_CPPFLAGS, bin_mcron_CPPFLAGS, bin_crontab_CPPFLAGS): Delete.
* wrapper: Move 'wrap_env_path' to a new 'utils' module.Mathieu Lirzin2017-09-286-26/+83
| | | | | | | | | * src/wrapper.c: Move 'wrap_env_path' to ... * src/utils.h: ... here. New module. * src/utils.c: New file. * configure.ac: Use AC_PROG_RANLIB and AM_PROG_AR. * Makefile.am (noinst_LIBRARIES, src_libmcron_a_SOURCES): New variables. (LDADD): Add 'src/libmcron.a'.
* build: Remove "--enable-debug" configure optionMathieu Lirzin2017-09-282-15/+8
| | | | | | | | | | | Unlike C code where debugging impose the "-g" compilation flags. This debugging option only affects Guile code, so using an environment variable works better since it doesn't impose to recompile Mcron or to edit "config.scm". * configure.ac: Remove "--enable-debug" configure option. * src/mcron/config.scm.in (config-debug): Use MCRON_DEBUG environment variable to trigger the debug mode at runtime.
* build: Remove "maintainer-mode" configure option.Mathieu Lirzin2017-09-281-4/+0
| | | | * configure.ac: Remove "maintainer-mode" configure option.