[WebSVN issue] [Issue 255] New - websvn generates tarball with 01-01-1970 dates

View: New views
4 Messages — Rating Filter:   Alert me  

[WebSVN issue] [Issue 255] New - websvn generates tarball with 01-01-1970 dates

by Neil Bird :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=255
                 Issue #|255
                 Summary|websvn generates tarball with 01-01-1970 dates
               Component|websvn
                 Version|2.2.1
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|Downloads
             Assigned to|issues@websvn
             Reported by|fnxweb






------- Additional comments from fnxweb@... Mon Oct  5 06:19:52 -0700 2009 -------
I'm seeing this on Linux (CentOS 5.3) and Solaris (10) boxes.  I've tracked it
down to two ... I shan't say bugs, in case it's something I've done locally, but
two places.

One is that the 'mktime' in dl.php seems to feed the values in the wrong order
(and doesn't correct for the year about 1900?).  I've had to change mine to:

  $timestamp = mktime(substr($revDate, 11, 2), // second
                      substr($revDate, 14, 2), // minute
                      substr($revDate, 17, 2), // hour
                      substr($revDate, 5, 2),  // day
                      substr($revDate, 8, 2),  // month
                      (-1900+substr($revDate, 0, 4))); // year

(note that as an attempt to fix this, I manually patched up the 2.2.1 dl.php to
include what looked like it might be a relevant fix;  it didn't help, but the
above will look more like trunk that 2.2.1).

It's possible that in PHP the 1990 year fix isn't necessary, I was just throwing
all fixes I could at it, and the above does work for me.  If it helps, the time
part of the dir. listing. repo. time I get looks like:

"2009-10-01 15:29:33"

I'm wondering if this is some locale issue?  I'm in the UK.  I don't *think*
I've done any websvn mods. that would affect that (I have only modded it to
allow for my custom template to contain a 'tsvn:' link to each dir. in the
header for the Windows users).

Also, I found that even when that was right (so that dirs. get stamped
correctly), the generated tar was wrong, and that seems to be the 'Archive_Tar'
PHP library (at least on the Linux box).  I've commented that out for force the
use of the 'tar' command.

I don't have admin access to the Solaris boxx (our production server), so cannot
state yet whether my fixes def. work there, but both mods. are required on my
CentOS box (PHP 5.1.6).

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2403591

[WebSVN issue] [Issue 255] websvn generates tarball with 01-01-1970 dates

by Neil Bird :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=255






------- Additional comments from fnxweb@... Mon Oct  5 09:05:36 -0700 2009 -------
OK, sorry, there's a red-herring in there.  I'd convinced myself that the mktime
is wrong as it doesn't match the normal API, but it's actually unchanged (aside
from the comments, which are now wrong!) from svn.  Don't know how I managed
that (I was printing strftime debug to a file, must've got switched around).

I now have that processing working identically on Linux and Solaris.  The only
issue seems to be that this PHP TAR library generates tars with 01-01-1970 (on
both platforms), so I have to resort to the OS tar.  The temporary exported dir.
hierarchy is OK.

Maybe it's as simple as allowing an option to force the use of the OS tar
instead of just the 'class_exists('Archive_Tar')' test?

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2403781

[WebSVN issue] [Issue 255] websvn generates tarball with 01-01-1970 dates

by Dirk Thomas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=255



User dirkthomas changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from dirkthomas@... Wed Oct 14 08:33:12 -0700 2009 -------
Thank you for your feedback.

I have looked into this issue.
This was a bug in the Archive_Tar library 1.3.3.
A patch has been applied to PEAR-SVN (see
https://pear.php.net/bugs/bug.php?id=16202).

I have just commited that patch to the trunk version of WebSVN - could you
please test if it works for you with current SVN trunk now?

If you have more on this issue please feel free to reopen/comment.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2407607

[WebSVN issue] [Issue 255] websvn generates tarball with 01-01-1970 dates

by Neil Bird :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=255



User fnxweb changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|RESOLVED                  |CLOSED
--------------------------------------------------------------------------------




------- Additional comments from fnxweb@... Thu Oct 15 03:42:06 -0700 2009 -------
Confirmed that the trunk fix in pear fixes the problem.  Thanks!

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2407843