whenjobs.git
7 years agoPersist variables to file (~/.whenjobs/variables). master
Richard W.M. Jones [Sat, 18 Aug 2012 14:40:23 +0000 (15:40 +0100)]
Persist variables to file (~/.whenjobs/variables).

7 years agolib: Don't include whenproto_aux.{ml,mli} in the tarball.
Richard W.M. Jones [Mon, 2 Jul 2012 09:01:07 +0000 (10:01 +0100)]
lib: Don't include whenproto_aux.{ml,mli} in the tarball.

These generated files are not compatible between releases of ocamlnet,
so must be regenerated each time.  A typical error is:

  File "whenproto_aux.ml", line 121, characters 13-25:
  Error: Unbound value Xdr.safe_add

7 years agodocs: Fix man entry for "changes" operator.
Richard W.M. Jones [Sat, 30 Jun 2012 14:06:38 +0000 (15:06 +0100)]
docs: Fix man entry for "changes" operator.

7 years agoImplement inequality operator (use: != or <>)
Richard W.M. Jones [Sat, 30 Jun 2012 14:06:18 +0000 (15:06 +0100)]
Implement inequality operator (use: != or <>)

7 years agoUpate TODO file.
Richard W.M. Jones [Sat, 30 Jun 2012 14:05:48 +0000 (15:05 +0100)]
Upate TODO file.

7 years agodocs: Minor fixes.
Richard W.M. Jones [Sat, 30 Jun 2012 13:57:29 +0000 (14:57 +0100)]
docs: Minor fixes.

7 years agoVersion 0.7.3. 0.7.3
Richard W.M. Jones [Sat, 30 Jun 2012 13:24:10 +0000 (14:24 +0100)]
Version 0.7.3.

7 years agoarm: Fix for test running slowly.
Richard W.M. Jones [Sat, 28 Apr 2012 19:41:33 +0000 (20:41 +0100)]
arm: Fix for test running slowly.

If the 'sed' command runs slowly (ie. on arm) then the regular
every-job fires twice, causing the test to fail.

7 years agoarm: Slow hardware causes server not to shut down in a timely manner.
Richard W.M. Jones [Sat, 28 Apr 2012 19:41:19 +0000 (20:41 +0100)]
arm: Slow hardware causes server not to shut down in a timely manner.

7 years ago32 bit: Fix for 31 bit int overflow in time_t.
Richard W.M. Jones [Sat, 28 Apr 2012 19:40:39 +0000 (20:40 +0100)]
32 bit: Fix for 31 bit int overflow in time_t.

7 years agodaemon: Report 'Dynlink.is_native' when starting daemon.
Richard W.M. Jones [Sat, 28 Apr 2012 18:44:56 +0000 (19:44 +0100)]
daemon: Report 'Dynlink.is_native' when starting daemon.

7 years agoRemove custom matching pattern from 'licensecheck'.
Richard W.M. Jones [Sun, 25 Mar 2012 18:18:56 +0000 (19:18 +0100)]
Remove custom matching pattern from 'licensecheck'.

licensecheck program upstream now checks OCaml files by default:
http://git.fedorahosted.org/git/?p=rpmdevtools.git;a=commitdiff;h=158c182ec48ce4a2e4e771bfed0098b565502c5b

7 years agoVersion 0.7.2. 0.7.2
Richard W.M. Jones [Fri, 23 Mar 2012 15:18:08 +0000 (15:18 +0000)]
Version 0.7.2.

7 years agoRenumber the jobs file so that it can be reloaded in native code.
Richard W.M. Jones [Fri, 23 Mar 2012 15:16:37 +0000 (15:16 +0000)]
Renumber the jobs file so that it can be reloaded in native code.

See:
https://sympa-roc.inria.fr/wws/arc/caml-list/2012-03/msg00276.html?checked_cas=2

7 years agoUpdate FSF address, add new 'licensecheck' target (thanks Michael Scherer).
Richard W.M. Jones [Thu, 22 Mar 2012 16:07:11 +0000 (16:07 +0000)]
Update FSF address, add new 'licensecheck' target (thanks Michael Scherer).

7 years agoConditionally build bytecode or native code RPM (thanks Michael Scherer).
Richard W.M. Jones [Thu, 22 Mar 2012 08:34:52 +0000 (08:34 +0000)]
Conditionally build bytecode or native code RPM (thanks Michael Scherer).

7 years agoDon't need to clean buildroot (thanks Michael Scherer).
Richard W.M. Jones [Thu, 22 Mar 2012 08:34:36 +0000 (08:34 +0000)]
Don't need to clean buildroot (thanks Michael Scherer).

7 years agoUse %global instead of %define in spec file (thanks Michael Scherer).
Richard W.M. Jones [Thu, 22 Mar 2012 08:32:01 +0000 (08:32 +0000)]
Use %global instead of %define in spec file (thanks Michael Scherer).

7 years agoVersion 0.7.1. 0.7.1
Richard W.M. Jones [Wed, 21 Mar 2012 15:44:33 +0000 (15:44 +0000)]
Version 0.7.1.

7 years agoEnable native code compilation when ocamlopt is available.
Richard W.M. Jones [Wed, 21 Mar 2012 15:12:29 +0000 (15:12 +0000)]
Enable native code compilation when ocamlopt is available.

7 years agoAdd Config.have_ocamlc, Config.have_ocamlopt, Config.ocamlfind.
Richard W.M. Jones [Sun, 18 Mar 2012 11:32:55 +0000 (11:32 +0000)]
Add Config.have_ocamlc, Config.have_ocamlopt, Config.ocamlfind.

Use Config.ocamlfind instead of running ocamlfind directly.

7 years agoFix various problems in the spec file (thanks Michael Scherer).
Richard W.M. Jones [Sun, 18 Mar 2012 09:53:41 +0000 (09:53 +0000)]
Fix various problems in the spec file (thanks Michael Scherer).

7 years agorpm: Add BR pcre-devel.
Richard W.M. Jones [Tue, 13 Mar 2012 22:35:59 +0000 (22:35 +0000)]
rpm: Add BR pcre-devel.

7 years agorpm: Require and BR mailx.
Richard W.M. Jones [Tue, 13 Mar 2012 22:23:44 +0000 (22:23 +0000)]
rpm: Require and BR mailx.

7 years agoVersion 0.7.0. 0.7.0
Richard W.M. Jones [Tue, 13 Mar 2012 19:13:01 +0000 (19:13 +0000)]
Version 0.7.0.

7 years agoAdd support for multiple jobs files.
Richard W.M. Jones [Tue, 13 Mar 2012 18:56:59 +0000 (18:56 +0000)]
Add support for multiple jobs files.

7 years agoAdd 'whenjobs --whisper' which lets you set variables "quietly".
Richard W.M. Jones [Tue, 13 Mar 2012 17:58:52 +0000 (17:58 +0000)]
Add 'whenjobs --whisper' which lets you set variables "quietly".

No jobs resulting from the changed variables will run.

7 years agoRebuild tests when library changes.
Richard W.M. Jones [Tue, 13 Mar 2012 17:58:27 +0000 (17:58 +0000)]
Rebuild tests when library changes.

7 years agoMinor rearrangements to whenjobs(1) manpage.
Richard W.M. Jones [Tue, 13 Mar 2012 17:35:41 +0000 (17:35 +0000)]
Minor rearrangements to whenjobs(1) manpage.

7 years agoAdd better examples to the manual page.
Richard W.M. Jones [Tue, 13 Mar 2012 13:07:50 +0000 (13:07 +0000)]
Add better examples to the manual page.

7 years agoFix typo in documentation of 'whenjobs --test' option.
Richard W.M. Jones [Sat, 10 Mar 2012 16:33:35 +0000 (16:33 +0000)]
Fix typo in documentation of 'whenjobs --test' option.

7 years agoVersion 0.6. 0.6
Richard W.M. Jones [Sat, 10 Mar 2012 14:01:24 +0000 (14:01 +0000)]
Version 0.6.

7 years agoImplement whenjobs --daemon-start and --daemon-restart flags.
Richard W.M. Jones [Sat, 10 Mar 2012 13:58:22 +0000 (13:58 +0000)]
Implement whenjobs --daemon-start and --daemon-restart flags.

7 years agoImplement 'whenjobs --daemon-status'.
Richard W.M. Jones [Sat, 10 Mar 2012 13:21:59 +0000 (13:21 +0000)]
Implement 'whenjobs --daemon-status'.

7 years agodaemon: Implement ping command.
Richard W.M. Jones [Sat, 10 Mar 2012 13:17:53 +0000 (13:17 +0000)]
daemon: Implement ping command.

7 years agoImplement 'whenjobs --test' to test the effect of variable setting.
Richard W.M. Jones [Sat, 10 Mar 2012 13:15:19 +0000 (13:15 +0000)]
Implement 'whenjobs --test' to test the effect of variable setting.

7 years agodaemon: Implement 'test_variables'.
Richard W.M. Jones [Sat, 10 Mar 2012 12:32:32 +0000 (12:32 +0000)]
daemon: Implement 'test_variables'.

This is the same as 'set_variables', but it doesn't update the state.
It just returns the names of the jobs that *would* run if these
variables were set.

7 years agoPass the state through reevaluate_whenjobs and run_job.
Richard W.M. Jones [Sat, 10 Mar 2012 12:45:20 +0000 (12:45 +0000)]
Pass the state through reevaluate_whenjobs and run_job.

7 years agoImplement 'whenjobs --job-names' which lists all loaded jobs.
Richard W.M. Jones [Sat, 10 Mar 2012 12:26:42 +0000 (12:26 +0000)]
Implement 'whenjobs --job-names' which lists all loaded jobs.

7 years agodaemon: Implement 'get_job_names' call to list all loaded jobs.
Richard W.M. Jones [Sat, 10 Mar 2012 12:22:39 +0000 (12:22 +0000)]
daemon: Implement 'get_job_names' call to list all loaded jobs.

7 years agoChange whenjobs --set syntax (NOTE: breaks compatibility).
Richard W.M. Jones [Sat, 10 Mar 2012 12:14:32 +0000 (12:14 +0000)]
Change whenjobs --set syntax (NOTE: breaks compatibility).

Change the whenjobs --set syntax to allow multiple variables to be set
atomically.  The new syntax looks like:

  whenjobs --set variable=value [variable=value ...]

NOTE: This breaks compatibility with whenjobs <= 0.5.

7 years agoSimplify code in the whenjobs tool by creating nr_args, arg1 variables.
Richard W.M. Jones [Sat, 10 Mar 2012 12:13:40 +0000 (12:13 +0000)]
Simplify code in the whenjobs tool by creating nr_args, arg1 variables.

7 years agodaemon: Implement 'set_variables' (atomic set multiple variables) call.
Richard W.M. Jones [Sat, 10 Mar 2012 12:09:13 +0000 (12:09 +0000)]
daemon: Implement 'set_variables' (atomic set multiple variables) call.

7 years agoAllow get_dependencies to check dependencies of multiple variables.
Richard W.M. Jones [Sat, 10 Mar 2012 12:08:07 +0000 (12:08 +0000)]
Allow get_dependencies to check dependencies of multiple variables.

7 years agoVersion 0.5 0.5
Richard W.M. Jones [Wed, 29 Feb 2012 15:29:08 +0000 (15:29 +0000)]
Version 0.5

A large(-ish) version jump to indicate that the code now works for
careful production use.

7 years agoAdd 'whenjobs --tail <serial>' to tail output messages from jobs.
Richard W.M. Jones [Wed, 29 Feb 2012 15:53:04 +0000 (15:53 +0000)]
Add 'whenjobs --tail <serial>' to tail output messages from jobs.

7 years agoCosmetic changes to the help output and man page.
Richard W.M. Jones [Wed, 29 Feb 2012 15:49:47 +0000 (15:49 +0000)]
Cosmetic changes to the help output and man page.

7 years agoCopy previous variables / eval result across file reloads.
Richard W.M. Jones [Wed, 29 Feb 2012 14:58:57 +0000 (14:58 +0000)]
Copy previous variables / eval result across file reloads.

This makes functions like prev(), changes() etc behave
more predictably when the file is reloaded.

7 years agoVersion 0.0.4 0.0.4
Richard W.M. Jones [Tue, 28 Feb 2012 13:40:28 +0000 (13:40 +0000)]
Version 0.0.4

7 years agoImplement pre functions.
Richard W.M. Jones [Tue, 28 Feb 2012 12:56:35 +0000 (12:56 +0000)]
Implement pre functions.

7 years agoIn comment: Cleanup -> Post.
Richard W.M. Jones [Tue, 28 Feb 2012 12:58:09 +0000 (12:58 +0000)]
In comment: Cleanup -> Post.

This updates commit 0c9faf57f9239b0fe1c0b46353d222bb4cf5cd74.

7 years agoNote that mailto is a post function.
Richard W.M. Jones [Tue, 28 Feb 2012 12:56:07 +0000 (12:56 +0000)]
Note that mailto is a post function.

7 years agoFix grammar in whentools(1).
Richard W.M. Jones [Tue, 28 Feb 2012 12:55:57 +0000 (12:55 +0000)]
Fix grammar in whentools(1).

7 years agoUse labelled arguments in call_stmt.
Richard W.M. Jones [Tue, 28 Feb 2012 11:55:04 +0000 (11:55 +0000)]
Use labelled arguments in call_stmt.

7 years agoRename 'cleanup' to 'post'.
Richard W.M. Jones [Tue, 28 Feb 2012 11:54:01 +0000 (11:54 +0000)]
Rename 'cleanup' to 'post'.

We will have 'pre' and 'post' functions.

7 years agoUpdate TODO.
Richard W.M. Jones [Fri, 24 Feb 2012 13:17:58 +0000 (13:17 +0000)]
Update TODO.

7 years agoAdd commands to list, cancel, start jobs.
Richard W.M. Jones [Thu, 23 Feb 2012 22:09:36 +0000 (22:09 +0000)]
Add commands to list, cancel, start jobs.

7 years agoMove string_of_time_t to Whenutils module.
Richard W.M. Jones [Thu, 23 Feb 2012 22:24:29 +0000 (22:24 +0000)]
Move string_of_time_t to Whenutils module.

This is just code motion.

7 years agoWhitespace change.
Richard W.M. Jones [Thu, 23 Feb 2012 20:30:13 +0000 (20:30 +0000)]
Whitespace change.

7 years agoIn XDR, introduce a new type 'string_big_int'.
Richard W.M. Jones [Thu, 23 Feb 2012 20:29:56 +0000 (20:29 +0000)]
In XDR, introduce a new type 'string_big_int'.

This is just code motion.

7 years agoPass JOBSERIAL through to the cleanup function.
Richard W.M. Jones [Thu, 23 Feb 2012 20:28:25 +0000 (20:28 +0000)]
Pass JOBSERIAL through to the cleanup function.

7 years agoUpdate TODO.
Richard W.M. Jones [Thu, 23 Feb 2012 19:46:37 +0000 (19:46 +0000)]
Update TODO.

7 years agolib: Missing \ caused list of CMI files to be truncated.
Richard W.M. Jones [Thu, 23 Feb 2012 19:10:47 +0000 (19:10 +0000)]
lib: Missing \ caused list of CMI files to be truncated.

7 years agoVersion 0.0.3. 0.0.3
Richard W.M. Jones [Thu, 23 Feb 2012 17:27:57 +0000 (17:27 +0000)]
Version 0.0.3.

7 years agoImplement cleanup functions, including 'mailto'.
Richard W.M. Jones [Thu, 23 Feb 2012 16:08:53 +0000 (16:08 +0000)]
Implement cleanup functions, including 'mailto'.

7 years agodaemon: On fork, open stdin/stdout/stderr on /dev/null.
Richard W.M. Jones [Thu, 23 Feb 2012 17:06:32 +0000 (17:06 +0000)]
daemon: On fork, open stdin/stdout/stderr on /dev/null.

7 years agoFix perldoc test in configure script.
Richard W.M. Jones [Thu, 23 Feb 2012 16:47:56 +0000 (16:47 +0000)]
Fix perldoc test in configure script.

7 years agoAdd Whentools library, test, documentation.
Richard W.M. Jones [Thu, 23 Feb 2012 15:07:23 +0000 (15:07 +0000)]
Add Whentools library, test, documentation.

7 years agoAllow job names to be arbitrary OCaml expressions.
Richard W.M. Jones [Thu, 23 Feb 2012 15:06:17 +0000 (15:06 +0000)]
Allow job names to be arbitrary OCaml expressions.

7 years agoRemove dead code.
Richard W.M. Jones [Thu, 23 Feb 2012 15:06:43 +0000 (15:06 +0000)]
Remove dead code.

7 years agoDocument job names.
Richard W.M. Jones [Thu, 23 Feb 2012 14:58:03 +0000 (14:58 +0000)]
Document job names.

7 years agoMove variable checking to check_valid_variable_name function.
Richard W.M. Jones [Thu, 23 Feb 2012 14:56:51 +0000 (14:56 +0000)]
Move variable checking to check_valid_variable_name function.

7 years agoAdd 'len <expr>' operator.
Richard W.M. Jones [Thu, 23 Feb 2012 14:56:05 +0000 (14:56 +0000)]
Add 'len <expr>' operator.

7 years agoRefactor state into a separate [Whenstate] module.
Richard W.M. Jones [Thu, 23 Feb 2012 13:23:25 +0000 (13:23 +0000)]
Refactor state into a separate [Whenstate] module.

The new module contains all jobs and variables.

7 years agoReorder SOURCES for consistency.
Richard W.M. Jones [Thu, 23 Feb 2012 11:35:18 +0000 (11:35 +0000)]
Reorder SOURCES for consistency.

7 years agoSplit large 'Whenutils' module into two (creating new module 'Whenexpr').
Richard W.M. Jones [Thu, 23 Feb 2012 11:24:14 +0000 (11:24 +0000)]
Split large 'Whenutils' module into two (creating new module 'Whenexpr').

7 years agoVersion 0.0.2. 0.0.2
Richard W.M. Jones [Wed, 22 Feb 2012 14:07:30 +0000 (14:07 +0000)]
Version 0.0.2.

7 years agoFix double-scheduled timer problem caused by reloading the jobs file.
Richard W.M. Jones [Wed, 22 Feb 2012 18:15:57 +0000 (18:15 +0000)]
Fix double-scheduled timer problem caused by reloading the jobs file.

7 years agoDisplay version when daemon starts.
Richard W.M. Jones [Wed, 22 Feb 2012 14:42:41 +0000 (14:42 +0000)]
Display version when daemon starts.

7 years agoDistribute the *.cmi files.
Richard W.M. Jones [Wed, 22 Feb 2012 14:07:08 +0000 (14:07 +0000)]
Distribute the *.cmi files.

They are required for compiling the jobs file.

7 years agoAdd an explicit interface config.mli.
Richard W.M. Jones [Wed, 22 Feb 2012 14:13:02 +0000 (14:13 +0000)]
Add an explicit interface config.mli.

7 years agoReorder SOURCES for consistency.
Richard W.M. Jones [Wed, 22 Feb 2012 14:12:45 +0000 (14:12 +0000)]
Reorder SOURCES for consistency.

7 years agoAdd 'make rpm' rule which builds an RPM.
Richard W.M. Jones [Wed, 22 Feb 2012 14:06:24 +0000 (14:06 +0000)]
Add 'make rpm' rule which builds an RPM.

7 years agoMake RPM release in spec file into a variable (RPM_RELEASE).
Richard W.M. Jones [Wed, 22 Feb 2012 14:05:57 +0000 (14:05 +0000)]
Make RPM release in spec file into a variable (RPM_RELEASE).

7 years agoRun jobs with 'set -e' so that they exit on error.
Richard W.M. Jones [Wed, 22 Feb 2012 14:06:44 +0000 (14:06 +0000)]
Run jobs with 'set -e' so that they exit on error.

7 years agoIgnore tarballs.
Richard W.M. Jones [Wed, 22 Feb 2012 13:32:15 +0000 (13:32 +0000)]
Ignore tarballs.

7 years agoAdd a rule to build whenjobs.txt for the website.
Richard W.M. Jones [Wed, 22 Feb 2012 13:31:55 +0000 (13:31 +0000)]
Add a rule to build whenjobs.txt for the website.

7 years agoMore TODO. 0.0.1
Richard W.M. Jones [Wed, 22 Feb 2012 13:18:10 +0000 (13:18 +0000)]
More TODO.

7 years agoPrevent unwanted bytecode stripping by RPM.
Richard W.M. Jones [Wed, 22 Feb 2012 12:04:31 +0000 (12:04 +0000)]
Prevent unwanted bytecode stripping by RPM.

7 years agoAdd prelink blacklist to specfile.
Richard W.M. Jones [Wed, 22 Feb 2012 11:22:37 +0000 (11:22 +0000)]
Add prelink blacklist to specfile.

7 years agoFix EXTRA_DIST in Makefiles.
Richard W.M. Jones [Tue, 21 Feb 2012 19:25:12 +0000 (19:25 +0000)]
Fix EXTRA_DIST in Makefiles.

7 years agoUpdate whenjobs(1) manual page reference section.
Richard W.M. Jones [Tue, 21 Feb 2012 19:14:42 +0000 (19:14 +0000)]
Update whenjobs(1) manual page reference section.

7 years agoComment: compare_values should be able to promote numeric types.
Richard W.M. Jones [Tue, 21 Feb 2012 19:14:19 +0000 (19:14 +0000)]
Comment: compare_values should be able to promote numeric types.

7 years agoUse $SHELL environment variable to run the shell scripts.
Richard W.M. Jones [Tue, 21 Feb 2012 19:13:53 +0000 (19:13 +0000)]
Use $SHELL environment variable to run the shell scripts.

7 years agoAdd a test of many jobs running at once.
Richard W.M. Jones [Tue, 21 Feb 2012 16:04:14 +0000 (16:04 +0000)]
Add a test of many jobs running at once.

7 years agoFix comparisons in 'increases' and 'decreases' functions.
Richard W.M. Jones [Tue, 21 Feb 2012 17:55:47 +0000 (17:55 +0000)]
Fix comparisons in 'increases' and 'decreases' functions.

The tests were the wrong way round.

7 years agoRemove Whenutils.no_job_private and refactor prev-related code.
Richard W.M. Jones [Tue, 21 Feb 2012 17:13:32 +0000 (17:13 +0000)]
Remove Whenutils.no_job_private and refactor prev-related code.

7 years agoAdd unit variable type and 'reloaded()' function.
Richard W.M. Jones [Tue, 21 Feb 2012 16:01:31 +0000 (16:01 +0000)]
Add unit variable type and 'reloaded()' function.

The reloaded() function is true only when we have just loaded a new
file.

This lets you initialize variables, with some caveats.

7 years agoFix error message; arguments were swapped around.
Richard W.M. Jones [Tue, 21 Feb 2012 16:03:33 +0000 (16:03 +0000)]
Fix error message; arguments were swapped around.

7 years agoPrevent users from setting JOBSERIAL and from setting variables with invalid names.
Richard W.M. Jones [Tue, 21 Feb 2012 15:06:49 +0000 (15:06 +0000)]
Prevent users from setting JOBSERIAL and from setting variables with invalid names.