2006-01-14  Junichi Uekawa  <dancer@debian.org>

	* cowdancer.c (initialize_functions): use mkstemp to create a temp
	file.
	(check_inode_and_copy): thinko. fix ~~ handling.

	* tests/017_tempfilecheck.sh: fix temp file handling.

	* tests/015_test_ilistdelete.c: update to be a pthread-based test.

	* tests/018_testcxx.cc (main): test for C++ code.

	* tests/018_testcxx.sh: add test for C++ code

	* debian/changelog: 0.10 preparation.

	* NEWS: 0.10 preparation

	* tests/016_memleakcheck.sh: use mcheck to see if memory leaks
	happen.
	Why does this not fail when check is failing?

	* tests/015_test_ilistdelete.sh: disabled the check since it's
	difficult to formulate the test yet.

	* tests/002_test_open.c (main): fix thinko. It was never tested,
	really.

2006-01-13  Junichi Uekawa  <dancer@debian.org>

	* tests/015_test_ilistdelete.c (main): a preliminary
	implementation, this is wrong.
	I should also test pthread and doing something racy.

	* cowdancer.c (initialize_functions): logic error, if someone else
	is initializing and it has failed, we'd probably need to retry,
	not hang.

	* tests/015_test_ilistdelete.sh: test ilist delete code path.

2006-01-08  Junichi Uekawa  <dancer@debian.org>

	* NEWS: update

	* debian/TODO: document the problem with ld.so overwrite

	* cowdancer.c (check_inode_and_copy): try to tackle the problem of
	ld.so overwrite while exec.

	This happens because we do rename before cp.
	before:
	rename a a~~
	cp -a a~~ a (requires working libc)
	rm a~~

	modified:
	cp -a a a~~ 
	rename a~~ a

2006-01-07  Junichi Uekawa  <dancer@debian.org>

	* tests/900_test_pbuilder.sh: skip this test unless it's a known
	working location

	* Makefile: make it easier to see test failure results.

	* debian/pbuilder-test/000_prepinstall: 
	* debian/pbuilder-test/001_makecheck: testsuite to run make-check inside chroot.

	* tests/900_test_pbuilder.sh: 

	* debian/TODO: note that cpbuilder test fails today, because it's
	probably forking when it should not be.

	* Makefile: use VERSION string without debian dependency.

2005-12-29  Junichi Uekawa  <dancer@debian.org>

	* debian/TODO: update 

	* debian/README.Debian (BUGS): add fchown/fchmod notes.

	* tests/014_ilistdump_test.sh: add a test to check for ilist dumping.

	* tests/014_ilistdump_test.c: add a test program for dumping ilist file contents.

	* cowdancer.c (load_ilist): add error checks.

	* Makefile (%.o): define _REENTRANT

2005-12-28  Junichi Uekawa  <dancer@debian.org>

	* NEWS: update news file.

	* cowdancer.c: insert sched_yield in parts to make things look a
	bit more quasi-thread-safe.

2005-12-25  Junichi Uekawa  <dancer@debian.org>

	* cowdancer.c (check_inode_and_copy): use bsearch
	(check_fd_inode_and_warn): use bsearch

	* ilist.h (compare_ilist): comparison function here.

	* cow-shell.c: move compare_ilist to header file.

	* tests/900_test_pbuilder.sh: ignore this test for now.

	* cowdancer.c (load_ilist): use mmap.

	* cow-shell.c: include ilist.
	
	* ilist.h (struct ilist_struct): create ilist struct separately.

2005-11-23  Junichi Uekawa  <dancer@debian.org>

	* debian/changelog: 0.7

	* tests/002_test_open.c: write(2) requires unistd.h

	* NEWS: add comments on what has been changed.

	* tests/900_test_pbuilder.sh (COWDEB): use a better algorithm for 
	determining the deb package to use.
	
	* Makefile (DESTDIR): export VERSION

	* tests/013_test_chmod.sh (TESTCODE): 
	* tests/012_test_chown.sh (NEWID): 
	* tests/004_test_fopen64.sh (TESTCODE): 
	* tests/003_test_fopen.sh (TESTCODE): 
	* tests/002_test_open.sh (TESTCODE): 
	* tests/001_test_symlink.sh (TESTDIR): 
	* tests/000_test_basic.sh (TESTDIR): cp -al 1/ 2/ no longer works,
	change to cp -al 1/ 2
	
	* cow-shell.c (main): work around new 'stat' feature, which doesn't 
	add a newline after --format.
	Add a space after it so that scanf can read in.
	Tested with Debian sarge and sid.

	* cow-shell.1: add reference to COWDANCER_DEBUG environmental variable.

	* cowdancer.c (debug_cowdancer_2, debug_cowdancer): use COWDANCER_DEBUG
	environment variable for debug toggling.

2005-11-02  Junichi Uekawa  <dancer@debian.org>

	* Makefile (VERSION): Change VERSION to be dpkg-parsechangelog-based

	* tests/012_test_chown.c (main): 
	* tests/013_test_chmod.c (main): do not test fchmod, fchown.

	* cowdancer.c (check_fd_inode_and_warn): do not die even if 
	fchown/fchmod is used; try allowing things to run albeit the warning...
	I am guessing test_pbuilder.sh is going to be non-functional.

2005-10-31  Junichi Uekawa  <dancer@debian.org>

	* tests/900_test_pbuilder.sh: update for 0.6
	 test fails for pbuilder test since fchmod is used here:
	
	    cowdancer-unsupported operation, read-only open and fchown/fchmod: 2049:274641
	    dpkg: error processing /var/cache/apt/archives/libc6-dev_2.3.5-7_amd64.deb (--unpack):
	     error setting ownership of `./usr/bin/gencat': No such file or directory


2005-10-28  Junichi Uekawa  <dancer@debian.org>

	* tests/013_test_chmod.c (main): 
	* tests/012_test_chown.c (main): expect fchown and fchmod to fail.

        * cowdancer.c (initialize_functions): chown, fchown, and lchown implementation. they look like the following:
	chown("/tmp/1/a", 1000, 24)             = 0
	fchown(3, 1000, 24)                     = 0
	lchown("/tmp/1/c", 1000, 24)            = 0
	fchown will be an unsupported operation, hopefully noone will use that.
	(check_fd_inode_and_warn, fchown, lchown, chown): implement.
	(chmod, fchmod): implement.
	chmod("/tmp/1/a", 0400)                 = 0
	fchmod(3, 0400)                         = 0
	
	* cowdancer.c (load_ilist): use calloc instead of malloc.
	(check_inode_and_copy): clear memory before match.
	Required to get working on my ibook. Probably the 
	structs weren't packed.

2005-10-08  Junichi Uekawa  <dancer@debian.org>

	* tests/012_test_chown.sh (TESTCODE): 
	* tests/013_test_chmod.sh (TESTCODE): 
	* tests/012_test_chown.c: 
	* tests/013_test_chmod.c: test for chown/chmod functionality.
	
2005-09-21  Junichi Uekawa  <dancer@debian.org>

	* cow-shell.c (main): SHELL may contain non-full path value.
	'SHELL=bash', execlp instead of execl.
	Fall back to /bin/sh if SHELL is bogus.

2005-08-30  Junichi Uekawa  <dancer@debian.org>

	* NEWS: 0.4 release.

	* tests/900_test_pbuilder.sh (COWDEB): update to 0.4; 
	note that this test depends on local ../cowdancer.
	It will be updated when cowdancer package exists in Debian.

2005-08-29  Junichi Uekawa  <dancer@debian.org>

	* cowdancer.c (load_ilist): add error checking for NULL.

	* tests/010_test_noilistfile.sh: new test to test error checking; the log is more significant.

	* Makefile (VERSION): 0.4

	* cowdancer.c (load_ilist): errorcheck
	(outofmemory): do not kill myself.
	(initialize_functions): return 1 on error.
	(fopen, fopen64): return NULL on error
	(creat64, creat, open64, open): return -1 on error.

2005-08-20  Junichi Uekawa  <dancer@debian.org>

	* NEWS: update NEWS

	* debian/changelog: update changelog

	* tests/900_test_pbuilder.sh: use dsh as example, not cowdancer itself.

2005-08-19  Junichi Uekawa  <dancer@debian.org>

	* tests/900_test_pbuilder.sh: with fixed pbuilder 0.130, it works

	* cowdancer.c (likely_fopen_write, fopen, fopen64): implement fopen.
	(initialize_functions): implement fopen.

	* tests/004_test_fopen64.sh: 
	* tests/004_test_fopen64.c: 
	* tests/003_test_fopen.sh: 
	* tests/003_test_fopen.c: 
	* tests/002_test_open.sh: 
	* tests/002_test_open.c: Add testsuite. fopen test fails.

2005-08-18  Junichi Uekawa  <dancer@debian.org>

	* Makefile (check): fix redirect in testsuite.

	* cowdancer.c (check_inode_and_copy): use the canonical filename
	rather than the possible symbollic link.

	* tests/001_test_symlink.sh: create code to test symlink handling.

	* tests/README: add a readme.

	* tests/900_test_pbuilder.sh: rename to 900.

2005-08-17  Junichi Uekawa  <dancer@debian.org>

	* cowdancer.c (check_inode_and_copy): add hook to avoid looping around; should not be
	a problem, but as a safety measure.
	(check_inode_and_copy): Fix free routine location.
	(check_inode_and_copy): add debugging error message
	(check_inode_and_copy): check that the file is a regular file
	before trying to do anything on it; directories and special files
	and sockets really don't want this.

	* cow-shell.c (main): -xdev to find.

	* tests/001_test_pbuilder.sh: cow working simulation

	* Makefile (check): create logfiles.

2005-08-16  Junichi Uekawa  <dancer@debian.org>

	* tests/000_test_basic.sh: Created a basic test.

2005-08-13  Junichi Uekawa  <dancer@debian.org>

	* Makefile (VERSION): 0.2

	* cowdancer.c (load_ilist): buffer overflow.

	* Makefile: install manpage

	* cow-shell.1: create a manpage

	* cow-shell.c: unset COWDANCER_IGNORE

	* NEWS: create a NEWS file.

	* cowdancer.c: fix obscure messages.

	* cow-shell.c: fix a few thinko's

	* Makefile (clean): new target for cleaning.
	(BINARY): -ldl is required, some programs are not linked against -ldl.

	* cow-shell.c: created

	* Makefile: created.

	* cowdancer.c: Created.


 cowdancer -- a Copy-on-write data-access; No-cow-easy-replacement

 Copyright 2005 Junichi Uekawa
 GPL v2 or later.
