[JIRA] (JENKINS-59977) P4 Plugin creates invalid AppleDouble files

11 views
Skip to first unread message

peterdb@enfocus.com (JIRA)

unread,
Oct 29, 2019, 12:38:03 PM10/29/19
to jenkinsc...@googlegroups.com
Peter DB created an issue
 
Jenkins / Bug JENKINS-59977
P4 Plugin creates invalid AppleDouble files
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2019-10-29 16:37
Environment: P4 Plugin version: 1.10.5
Jenkins version: 2.190.1
Java version: 1.8.0_222
OS version: Windows 7 Professional SP1
P4V version: 2019.2
P4 version: 2019.1
Perforce server version: P4D/NTX64/2014.2/1014956 (2015/02/26)
Priority: Minor Minor
Reporter: Peter DB

When syncing a file of the Perforce "apple" file type (i.e. an old Mac file with a resource fork) from a depot, the expected behaviour (in recent versions of the Perforce tools) is that this "apple" file is created on the client in the AppleDouble format. That is: as two separate files "myfile" and "%myfile", where "myfile" contains the data fork of the original file and "%myfile" contains the resource fork of the original file.

Importantly, "%myfile" is also supposed to contain a header with some structural information, starting with the 4-byte magic number 0x00051607. (For this reason, "%myfile" is also referred to as the header file.)

When syncing such an "apple" file using the latest P4V visual client or the latest P4 command line tool, this works as just described. However, when syncing with the latest P4 Plugin for Jenkins the "%myfile" portion only contains the bare bytes of the original resource fork; the header is missing. This is easily verified by looking for the magic number 0x00051607; it's not there.

This means that a "%myfile" created by P4Jenkins is invalid; it cannot be recognized as part of the AppleDouble format by various tools that are otherwise able to work with this format.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

peterdb@enfocus.com (JIRA)

unread,
Oct 29, 2019, 12:39:02 PM10/29/19
to jenkinsc...@googlegroups.com
Peter DB commented on Bug JENKINS-59977
 
Re: P4 Plugin creates invalid AppleDouble files

Some background information:

Perforce's handling of resource forks is partially described here:
https://community.perforce.com/s/article/2999#FILEMGMT-FORK

One source of the technical details of this AppleDouble file type (and the related AppleSingle type) is RFC 1740:
https://tools.ietf.org/html/rfc1740

Note that this AppleDouble format is also used when copying a file with a resource fork from a Mac to a non-Mac system (such as Windows) f.i. over a network share or with a USB drive, except then the header file is called "._myfile" (with dot and underscore) instead of "%myfile".

dwhitfield@perforce.com (JIRA)

unread,
Oct 30, 2019, 10:46:06 AM10/30/19
to jenkinsc...@googlegroups.com

Leaving this P4Java link here for any community investigation https://www.perforce.com/manuals/p4java-javadoc/com/perforce/p4java/io/apple/AppleFile.FileFormat.html

 

Often, the Jenkins plugin will inherit bugs from P4Java

dwhitfield@perforce.com (JIRA)

unread,
Oct 30, 2019, 10:49:02 AM10/30/19
to jenkinsc...@googlegroups.com

Unclear at this time what issues this might cause, but the newest P4Java doesn't support the version of the server mentioned here. Rather, it supports "Perforce server at Release 2015.1 or higher": https://www.perforce.com/perforce/doc.current/user/p4javanotes.txt

dwhitfield@perforce.com (JIRA)

unread,
Nov 1, 2019, 4:44:02 PM11/1/19
to jenkinsc...@googlegroups.com

Just a quick note to say that this appears to have never worked in P4Jenkins. I hope to have more information to provide on Monday

j.f.brown@sbcglobal.net (JIRA)

unread,
Nov 18, 2019, 1:28:04 PM11/18/19
to jenkinsc...@googlegroups.com

j.f.brown@sbcglobal.net (JIRA)

unread,
Nov 18, 2019, 1:30:03 PM11/18/19
to jenkinsc...@googlegroups.com
Joel Brown commented on Bug JENKINS-59977
 
Re: P4 Plugin creates invalid AppleDouble files

This is a P4Java bug and has been reproduced.   Perforce internal job number is job100626.

 

Reply all
Reply to author
Forward
0 new messages