• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • 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)

      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.

          [JENKINS-59977] P4 Plugin creates invalid AppleDouble files

          Peter DB added a comment -

          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".

          Peter DB added a comment - 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".

          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

          Doug Whitfield added a comment - 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

          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

          Doug Whitfield added a comment - 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

          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

          Doug Whitfield added a comment - 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

          Joel Brown added a comment -

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

           

          Joel Brown added a comment - This is a P4Java bug and has been reproduced.   Perforce internal job number is job100626.  

            Unassigned Unassigned
            peterdb Peter DB
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: