Re: mkisofs and timestamps in ISO-9660 filesystems

2008-01-25 Thread Steve
On Jan 23, 2008 10:25 PM, Bob Johnson [EMAIL PROTECTED] wrote:
 I posted this a few days ago and got only marginally helpful responses, so
 here it is again with more detail:
[...]

I'm seeing the same thing.  However, I created the ISO on a Gentoo
2005 box, and burned it and checked the dates/times on a FreeBSD 6.2-R
box.

Gentoo PC:
Linux gentoobox 2.4.26 #5 SMP Sun Feb 18 11:12:34 EST 2007 i686
Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux
mkisofs 2.01.01a34 (i686-pc-linux-gnu) Copyright (C) 1993-1997 Eric
Youngdale (C) 1997-2007 Jörg Schilling

FreeBSD PC:
FreeBSD freebsdbox 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Sun Aug  5
21:06:38 EDT 2007 [EMAIL PROTECTED]:/usr/src/sys/i386/compile/K0
i386
Cdrecord-ProDVD-ProBD-Clone 2.01.01a37 (i386-unknown-freebsd6.2)
Copyright (C) 1995-2008 Jörg Schilling
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mkisofs and timestamps in ISO-9660 filesystems

2008-01-25 Thread Lowell Gilbert
Bob Johnson [EMAIL PROTECTED] writes:

 6) Now when I look at the dates on the ISO filesystem, they are wrong. They 
 look like the correction for offset from GMT has been applied twice. Note 
 that the correct local timestamp for the file on the ISO filesystem is  Jan 
 23 21:28 and the correct GMT timestamp is Jan 24 02:28.

I specify a TZ variable directly when I care about mkisofs getting the
right times.  Even so, I can get confused, so when the dates
*really* matter, I write a tar file on the 9660 filesystem, and then
everything works the way my hindbrain expects.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


mkisofs and timestamps in ISO-9660 filesystems

2008-01-23 Thread Bob Johnson
I posted this a few days ago and got only marginally helpful responses, so 
here it is again with more detail:

1) I'm using reasonably recent versions of things:

# uname -a
FreeBSD acer.wb4jcm.org 7.0-RC1 FreeBSD 7.0-RC1 #0: Mon Dec 24 10:10:07 UTC 
2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  amd64

# mkisofs -version
mkisofs 2.01.01a37 (amd64-unknown-freebsd7.0) Copyright (C) 1993-1997 Eric 
Youngdale (C) 1997-2007 Jörg Schilling

# pkg_info | grep cdrtools
cdrtools-devel-2.01.01a37,1 CD/DVD and ISO-9660 image creation and extraction 
tools

2) My system is set to US Eastern Standard Time:

# date
Wed Jan 23 21:45:27 EST 2008
# date -u
Thu Jan 24 02:45:49 UTC 2008
# TZ=EST date
Wed Jan 23 21:46:53 EST 2008
# TZ=GMT date
Thu Jan 24 02:46:58 GMT 2008
# echo $TZ

# 

This is a dual boot system (with MS Vista), so the hardware clock is set to 
local time, not to GMT. I suspect this is significant.


3) I have a test file (just a bunch of zeroes). It's big because I wanted to 
see how quickly this system could write out a GB of data, but I get the same 
results with small files). The time stamp displayed by ls is correct for 
local time, and shows correct GMT time if I ask for it:
# ls -l
total 1049104
-rw-r--r--  1 root  bobj  1073741824 Jan 23 21:28 test.file --CORRECT
# TZ=GMT ls -l
total 1049104
-rw-r--r--  1 root  bobj  1073741824 Jan 24 02:28 test.file --CORRECT
#  


4) I use mkisofs to create an ISO filesystem with this test file in it:

# mkisofs -R -J -o test.iso test.file
  0.95% done, estimate finish Wed Jan 23 21:55:59 2008
[...]
 99.15% done, estimate finish Wed Jan 23 21:54:46 2008
Total translation table size: 0
Total rockridge attributes bytes: 274
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
524469 extents written (1024 MB)

5) I use mdconfig to mount the ISO filesystem (I get the same results if I use 
burncd to burn a CD and then mount the CD):

# mdconfig -a -t vnode -f test.iso -u 4
# mount_cd9660 /dev/md4 /mnt
#

6) Now when I look at the dates on the ISO filesystem, they are wrong. They 
look like the correction for offset from GMT has been applied twice. Note 
that the correct local timestamp for the file on the ISO filesystem is  Jan 
23 21:28 and the correct GMT timestamp is Jan 24 02:28.

# ls -l /mnt
total 1048576
-rw-r--r--  1 root  bobj  1073741824 Jan 23 16:28 test.file -- WRONG!
# TZ=EST ls -l /mnt
total 1048576
-rw-r--r--  1 root  bobj  1073741824 Jan 23 16:28 test.file -- WRONG!
# TZ=GMT ls -l /mnt
total 1048576
-rw-r--r--  1 root  bobj  1073741824 Jan 23 21:28 test.file -- WRONG!
#
# ls -lc /mnt
total 1048576
-rw-r--r--  1 root  bobj  1073741824 Jan 23 16:28 test.file -- WRONG!
# ls -lt /mnt
total 1048576
-rw-r--r--  1 root  bobj  1073741824 Jan 23 16:28 test.file -- WRONG!
# ls -lu /mnt
total 1048576
-rw-r--r--  1 root  bobj  1073741824 Jan 23 16:37 test.file -- WRONG!
#   

So what is going on here? Is this a bug, or a misconfiguration, or a 
misunderstanding? 

And as a side issue, why is the incorrect last access time 16:37, rather than 
16:54, since I built the ISO filesystem at 21:54?

I have not yet tried moving a CD to a Windows system to see what the file 
timestamp shows there. I have tried this on two different FreeBSD systems 
(7.0-RC1 amd64, and 6.2-RELEASE-p9 i386) with both cdrtools and 
cdrtools-devel from ports, and get the same results.

- Bob
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]