Re: Available for testing: tar-1.13.25-5

2003-11-11 Thread Jeremy Green
Listed-incremental backups are working again with the new binary.
Although, upgrading from tar-1.13.25-1 (the last version where
listed-incremental backups functioned correctly) to tar-1.13.25-5 will
cause all files (except those in the top-level directory) to be archived,
even if they haven't been changed. This is because the inode and device
numbers stored by tar in the directory file have changed.

Jeremy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: New tar available for testing (was Re: here is a patch for gnu tar incremental backup...)

2003-11-10 Thread Jeremy Green
On Sat, Nov 8, 2003 cgf wrote:

> Thanks for the patch but I don't think it is quite right and I don't
> think it catches everything.
>
> I'm uploading a new version of tar for testing now.  I'd appreciate
> feedback (to the cygwin list) on whether it solves the reported problem.

The binary you've uploaded, and the binary I built from the new source
exhibit the same problem that tar-1.13.25-3 showed:

$ touch f1
$ mkdir foo
$ touch foo/bar
$ ls -lR files/
files/:
total 0
-rw-r--r--1 jeremyNone0 Nov 10 12:26 f1
drwxr-xr-x+   2 jeremyNone0 Nov 10 12:26 foo

files/foo:
total 0
-rw-r--r--1 jeremyNone0 Nov 10 12:26 bar
$ /usr/src/tar-1.13.25-4/src/tar --verbose --listed-incremental=list \
-cf archive.tar files
/usr/src/tar-1.13.25-4/src/tar: files/foo: Directory is new
files/
files/foo/
files/f1
files/foo/bar
$ /usr/src/tar-1.13.25-4/src/tar --verbose
--listed-incremental=list -cf archive.tar files
/usr/src/tar-1.13.25-4/src/tar: files/foo: Directory has been renamed
files/
files/foo/
files/foo/bar

I.e. files/foo/bar is backed-up even though it hasn't changed. With the
application of the following patch to the tar-1.13.25-4 source package:

--- src/incremen.c.orig 2003-11-10 12:27:36.094206400 +
+++ src/incremen.c  2003-11-10 12:33:06.629492800 +
@@ -437,7 +437,7 @@ read_directory_file (void)

  errno = 0;
 #ifdef __CYGWIN_USE_BIG_TYPES__
- ino = strtoul (strp, &ebuf, 10);
+ ino = strtoull (strp, &ebuf, 10);
 #else
  ino = strtoul (strp, &ebuf, 10);
 #endif

The test works as expected:

$ rm list
$ /usr/src/tar-1.13.25-4/src/tar --verbose \
--listed-incremental=list -cf archive.tar files
/usr/src/tar-1.13.25-4/src/tar: files/foo: Directory is new
files/
files/foo/
files/f1
files/foo/bar
$ cat list
1068469530
+3160087061 8677873531989524896 files/foo
$ /usr/src/tar-1.13.25-4/src/tar --verbose \
--listed-incremental=list -cf archive.tar files
files/
files/foo/

However, if I use the tar-1.13.25-1 binary using this list file, I get...

$ cygcheck -c tar
Cygwin Package Information
Package  VersionStatus
tar  1.13.25-1  OK
$ tar --verbose --listed-incremental=list -cf archive.tar files
tar: list:2: Device number out of range
tar: list:2: Inode number out of range
tar: files/foo: Directory has been renamed
files/
files/foo/
files/foo/bar
tar: Error exit delayed from previous errors
$ tar --verbose --listed-incremental=list -cf archive.tar files
files/
files/foo/
ichthus$ cat list
1068469660
23317 2020475296 files/foo

i.e. different inode and device numbers are stored in the list file by
tar-1.13.25-1 and the patched version of tar-1.13.25-4. This doesn't
really matter as far as I'm concerned.

Jeremy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygwin dll makes gnu tar think that directories have been renamed?

2003-10-30 Thread Jeremy Green
For future reference, see:

http://sources.redhat.com/ml/cygwin/2003-10/msg01653.html

for a possible patch for this issue.

Jeremy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygwin dll makes gnu tar think that directories have been renamed?

2003-10-23 Thread Jeremy Green
I've had a similar problem. Here's some more detail, and what I found when
I looked into the problem...

With the tar executable from the tar-1.13.25-1 binary package,
listed-incremental backups work as expected:

ichthus$ mkdir test
ichthus$ touch test/foobar
ichthus$ mkdir test/foo
ichthus$ touch test/foo/bar
ichthus$ tar --verbose --listed-incremental=list -cf archive.tar test
tar: test/foo: Directory is new
test/
test/foo/
test/foobar
test/foo/bar
ichthus$ tar --verbose --listed-incremental=list -cf archive.tar test
test/
test/foo/
ichthus$ cat list
1066902650
23317 921534 test/foo

...all the files are backed up first time round, and none are the second
time round.

With the tar-1.13.25-3 package tar executable, or an executable built from
the tar-1.13.25-3 or tar-1.13.25-1 sources packages, the following occurs:

ichthus$ rm list
ichthus$ /usr/src/tar-1.13.25-3/src/tar --verbose \
--listed-incremental=list -cf archive.tar test
/usr/src/tar-1.13.25-3/src/tar: test/foo: Directory is new
test/
test/foo/
test/foobar
test/foo/bar
ichthus$ /usr/src/tar-1.13.25-3/src/tar --verbose \
--listed-incremental=list -cf archive.tar test
/usr/src/tar-1.13.25-3/src/tar: test/foo: Directory has been renamed
test/
test/foo/
test/foo/bar
ichthus$ cat list
1066903009
+3160087061 4030 test/foo

I.e., the second time the command is run, all the files in the
subdirectories of the base directory are stored in the incremental
archive, even if they haven't changed. Files in the base directory are
handled OK.

The problem is presumably caused by a recent change in the cygwin dll (or
perhaps the compiler), since the source code for the tar-1.13.25-3 and
tar-1.13.25-1 packages are effectively identical (the -3 package has an
extra configure.ac.orig file). Unfortunately, I couldn't find the
announcement messages for the packages in the mailing lists, so I wasn't
able to work out when they were released.

Running tar under insight, and stepping throught the code in incremen.c
shows that the "Directory has been renamed" message is displayed because
the following test fails:

directory->inode_number == stat_data.st_ino

Perhaps the problem is due to the recent migration of ino_t to 64 bits?
The values displayed during debugging, and the value of +3160087061 shown
above in the list file for the bugged version of tar, suggests that this
is a data type problem. Elsewhere in incremen.c, the code seems to assume
that ino_t has type unsigned long.

Jeremy

Cygwin Win95/NT Configuration Diagnostics

Current System Time: Thu Oct 23 11:07:08 2003



Windows NT Ver 4.0 Build 1381 Service Pack 6



Path:   c:\users\jg210\bin

D:\cygwin\usr\local\bin

D:\cygwin\bin

D:\cygwin\bin

d:\WINNT\system32

d:\WINNT

d:\Program Files\jdk1.2\bin

D:\cygwin\usr\X11R6\bin



Output from D:\cygwin\bin\id.exe (nontsec)

UID: 1001(jg210) GID: 513(None)

513(None)



Output from D:\cygwin\bin\id.exe (ntsec)

UID: 1001(jg210) GID: 513(None)

513(None)545(Users)



SysDir: D:\WINNT\System32

WinDir: D:\WINNT



HOME = `c:\users\jg210'

MAKE_MODE = `unix'

PWD = `/users/jg210/temp'

USER = `jg210'



COLORFGBG = `0;default;15'

COLORTERM = `rxvt-xpm'

COMPUTERNAME = `ICHTHUS'

COMSPEC = `D:\WINNT\system32\cmd.exe'

CVS_RSH = `ssh'

DISPLAY = `:0'

EDITOR = `emacs -nw'

HOMEDRIVE = `c:'

HOMEPATH = `\users\jg210'

HOSTNAME = `ichthus'

LANG = `en_GB'

LOGONSERVER = `\\ICHTHUS'

LYNX_CFG = `/users/jg210/.lynxrc'

MANPATH = `:/usr/ssl/man'

NUMBER_OF_PROCESSORS = `1'

OLDPWD = `/users/jg210'

OS2LIBPATH = `D:\WINNT\system32\os2\dll;'

OS = `Windows_NT'

PAGER = `less'

PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'

PROCESSOR_ARCHITECTURE = `x86'

PROCESSOR_IDENTIFIER = `x86 Family 5 Model 4 Stepping 3, GenuineIntel'

PROCESSOR_LEVEL = `5'

PROCESSOR_REVISION = `0403'

PROMPT = `$P$G'

PS1 = `\h$ '

RSYNC_RSH = `ssh'

SHLVL = `1'

SSH_AGENT_PID = `304'

SSH_AUTH_SOCK = `/tmp/ssh-lAJqU316/agent.316'

SYSTEMDRIVE = `D:'

SYSTEMROOT = `D:\WINNT'

TEMP = `d:\TEMP'

TERM = `xterm'

TEXDOCVIEW_dvi = `xdvi'

TEXDOCVIEW_html = `lynx'

TEXDOCVIEW_pdf = `acrord32'

TEXDOCVIEW_ps = `gsview32'

TEXDOCVIEW_txt = `less'

TMP = `c:\tmp'

USERDOMAIN = `ICHTHUS'

USERNAME = `jg210'

USERPROFILE = `D:\WINNT\Profiles\jg210'

WINDIR = `D:\WINNT'

WINDOWID = `168045912'

_ = `/usr/bin/cygcheck'



HKEY_CURRENT_USER\Software\Cygnus Solutions

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options

HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup

HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0

HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts

HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00

  (default) = `\\.\tape1:'

  unix = `/dev/st1'

  fbinary = 0x

  fsilent = 0x0001

  fmixed = 0x