$Id: TODO,v 1.121 2009-11-14 07:21:09 joostvb Exp $

1.1) finish convert to git: announce on webpage, create public repo
  ( http://git.fruit.je/caspar , http://git.mdcc.cx/ ,
  ssh://git/~joostvb/git/caspar.git )
  get rid of $ Id $ (find alternative!) and what have you
  update README on git status (see FIXME's).  set up commit list.

1.2) wait for and apply Fruit patches

--- release critical ----

2.1) deal with csp_helper.azm FIXME's.

2.2) test csp_install and csp_scp_keep_mode

--- ook best wel belangrijk ---

2.3) test & document rsync support

2.5) Ideas insprired by a discussion with Fred Vos:
  (Lots of users have asked for such a feature.)
  a "make check" could be usefull: test wether previous svn version is on server
  before scp-ing.
za 14 21:29 < hoppie> en als je dan helemaal over the top wilt, kun je
                      eventueel dat linken aan install, zodat alleen waar dat
                      nodig is geïnstalleerd wordt. Maar da's echt optioneel.
  Preliminary support added; Document this!  Nice trick:

   make diff || make install
   make foobar-diff || make foobar-install

  Make this work out of the box for all push mechanisms: add generic csp_REXEC
  next to csp_PUSH.


--- typesetting stuff ---

3.1) get toc printed in html mode. even while using nochunks mode.

3.2) license should be printed, see rh vs deb doc.

3.3) add zoem.mk, for zoem ( http://micans.org/zoem ) typesetting.


--- install stuff ---

4.1) ma 13 14:07 < arvid> joostvb, ik heb een feature request voor caspar :p
  ma 13 14:13 < arvid> joostvb, een exclude host mogelijkheid
  ma 13 14:13 < arvid> je bijv. een heleboel host en je wilt alleen 1 host 
                     uitsluiten
  ma 13 14:14 < arvid> s/host/hosts
  ma 13 14:16 < joostvb> een csp_TABOOUHOSTS wil je dus, i c
  ma 13 14:17 < arvid> joostvb, yep dat klopt 
   [14:18] [joostvb(+i)] [13:meuknet/#root(+ips)] 
  2009-07 Arvid Gibas

4.2) add standard target: "make print-hosts"

4.3) Should happen Real Soon Now (early 2008?): Get rid of
  obsolete variables.  Get rid of CP RULEs in caspar.mk.

4.4) "install" should depend upon "load".  (should it?) ("make" currently does
  both "install" and "load"; it does not do "build".  (really!?)).  and/or:
  caspar should support "make build-recursive".

4.5) csp_BUILD is a broken concept.

Users are better off declaring csp_EXTRAFILES and creating rules for each
file that needs to be built.
csp_BUILD is an alias to csp_EXTRAFILES for backwards compatibility.

4.6) caspar chokes on spaces in filenames:

 Makefile:

 csp_CPDIR = /var/php/public/jccpmanu/https
 include caspar/mk/caspar.mk

 joostvb@scriptix:~/sv...k/sources/jccpmanu/https% ls
 JCCP logo.jpg  Makefile    index.html      logo.html
 JCCPlogo.jpg   empty.html  loginform.html  php3
 joostvb@scriptix:~/sv...k/sources/jccpmanu/https% make -n
 /bin/sh: line 1: test: JCCP: binary operator expected
 /bin/sh: line 1: test: JCCP: binary operator expected
 cp  "JCCPlogo.jpg" /var/php/public/jccpmanu/https;
 cp  "empty.html" /var/php/public/jccpmanu/https;
 cp  "index.html" /var/php/public/jccpmanu/https;
 cp  "loginform.html" /var/php/public/jccpmanu/https;
 cp  "logo.html" /var/php/public/jccpmanu/https;

  make does not support arrays, but space-separated strings, so: tag won't fix.

4.7) caspar chokes on : in filenames:

 Makefile:

 csp_SCPDIR = /etc/sysconfig/network-scripts/
 csp_SUH = root@cauchy
 include caspar/mk/caspar.mk

 joostvb@kovalevskaya:~/sv...ysconfig/network-scripts% ls
 Makefile  ifcfg-eth0  ifcfg-eth0:1
 joostvb@kovalevskaya:~/sv...ysconfig/network-scripts% make
 caspar/mk/caspar.mk:87: *** multiple target patterns.  Stop.

 Bug found by Johan Hoeke.

4.8) Suggest (or offer) a more generic interface than my_EXEC for the load
  target.  Users are invited to extend the interface.
  They can add extra variables to their push mechanisms.  So we might be
  able to abstract LOAD one day.  Perhaps something like

    $(foreach uh,$(csp_UHOSTS),$(call csp_EXEC,$(uh),$(csp_DIR),$(csp_XARG));)

  could work.  If a user's exec wrapper needs more arguments, these can get
  introduced as implicit variables, outside $1, $2, ...

4.9) Explain why it's good practice to do
    include ../../include/install.mk
  in manpage example.

4.10) Don't do
   csp_scp_FUNC  = $(csp_SCP) $(csp_CPFLAGS) $(1) $(2):$(3)
  but do
   csp_scp_FUNC  = $(csp_SCP) $(4) $(1) $(2):$(3)
  and use $(csp_CPFLAGS) for csp_XARGS.
  _Do_ test this!

4.11) load stuff:
  - Create a ``load-recursive'' target.
  - supply daemons.mk: csp_SSHDEBIANLOAD csp_URUKREDHATLOAD , etc, to use
    in load targets

4.12) install-recursive should call mkdir if appropriate.  install should, too.

 Thu 31 15:16 < Fruit> kan ik 'm ook vertellen dat-ie voordat gaat kopiëren ff
                       mkdir -p op de smurfer doet?
 Thu 31 15:19 < joostvb> een eigen csp_PUSH schrijven
 Thu 31 15:20 < joostvb> csp_PUSH krijgt zowel filenaam als directory mee als
                         argument
 Thu 31 15:20 < joostvb> dus das kei makkelijk
 Thu 31 15:20 < Fruit> csp_OLD_PUSH := $(csp_PUSH)
 Thu 31 15:20 < Fruit> csp_PUSH := ssh $iets mkdir $dir; $(csp_OLD_PUSH)

4.13) The scp invocation is inefficient:

   % make -n README.txt-install net.txt-install
   scp "README.txt" pong:/data/www/doc/doc/;
   scp "net.txt" pong:/data/www/doc/doc/;

  Should be:

   scp "README.txt" "net.txt" pong:/data/www/doc/doc/;

  $@ vs $? might be helpful.

4.14) test wether file is up to date before scp-ing it, in order to prevent us from
  doing useless (and expensive) installs.   use ControlMaster
  ssh_config(5) to reuse one ssh conection?  Perhaps this:

   ControlMaster auto
   ControlPath ~/.ssh/control/%r@%h:%p

  in your ~/.ssh/config (and having an ssh connection open to all relevant
  hosts) fixes all "troubles". (This option is not available on Debian sarge.)

4.15) Ideas insprired by a discussion with Fred Vos:
  Perhaps a note on how to use commit-hooks could be added to
  documentation.  Perhaps a note on ssh forced commands could be added.  Perhaps
  a note on a "make commit" could be added.

4.16) document this: including an included Makefile:

    here := $(dir $(lastword $(MAKEFILE_LIST)))
    include $(here)../../foo/bar/install.mk

  Thanks Wessel.

  Alternative: /usr/local/foo, as used in svn/its-unix

4.17) if one really wants, one can overrule caspar's default target:

 ---------

 csp_SCPDIR = /etc/ssl/chains/
 csp_TABOOFILES_ADD = %.asc

 all: install
 install: check makedir

 include ../../../include/install.mk

 check:
        for cert in *.pem; do \
                echo "$$cert:"; \
                gpg --verify $$cert.asc $$cert; \
        done

 makedir:
        for suh in $(csp_SUHS); do \
          ssh $$suh mkdir -p /etc/ssl/chains; \
        done

 .PHONY: check makedir

 ---------

 very likely, one could better use the "build" target for this.

4.18) it's not necessary to have Makefile in all directories of a tree, provided
caspar is fixed:

replace

 DIRS := $(shell for d in *; do test -d $$d && echo $$d; done)

by

 DIRS :=  $(patsubst %/Makefile,%,$(shell find * -mindepth 1 -name Makefile))

thanks Wessel. (This might break for trees combining GNUmakefile with Makefile
[za 14 22:29 <Fruit> dat breekt niet voor dat soort directories, ga maar na!
;)] .) Once this fix is implemented, get rid of the example toplevel Makefile
in caspar(7).
