Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56946

P4 Plugin does not sync Mac resource forks on Mac

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • P4 Plugin version: 1.9.6
      Jenkins version: 2.150.2
      Java version: 1.8.0_192
      macOS version: 10.13.6
      Perforce server version: P4D/NTX64/2014.2/1014956 (2015/02/26)

      When submitting a file with a resource fork from Mac with P4 or P4V, it is put in the depot as file type "apple". However, when syncing such an "apple" file back to Mac with the P4 Plugin, it is synced as two separate files "myfile" and "%myfile", instead of the original single file with a resource fork.

      Upon further inspection, these two separate files are the "AppleDouble" format: "myfile" contains the original data fork and "%myfile" contains the original resource fork. AppleDouble is normally used for syncing "apple" files by non-MacOS clients, as described in Perforce Platform Notes - Apple Macintosh. But in this case it's happening for a MacOS client too.  That is unexpected.

      The latest P4 and P4V for MacOS all sync "apple" files back to Mac as genuine Apple files. It seems logical to expect the same result from P4 Plugin as from P4 and P4V, when syncing. Also, it seems logical to expect getting the same file back as was submitted, if submitting and syncing happen on the same platform and possibly even on the same machine.

      I guess this is related to change #546744 in P4Java as mentioned on Release Notes for P4Java.

      Our setup is a Freestyle project, with P4 Workspace behaviour set to "Static (static view, master only)".

          [JENKINS-56946] P4 Plugin does not sync Mac resource forks on Mac

          Karl Wirth added a comment -

          Hi peterdb. Thanks for highlighting this. I cannot see any known bugs in P4Java so I will try this out and get back to you with my findings.

          Karl Wirth added a comment - Hi peterdb . Thanks for highlighting this. I cannot see any known bugs in P4Java so I will try this out and get back to you with my findings.

          Karl Wirth added a comment -

          Hi peterdb Sorry for the delay. Took me a while to get my hands on a Mac. Can you provide me with an exact example file please.

          I just tested with a ".webloc" that according to a page I found was a resource fork file and had to submit that as 'resource' instead of 'apple'. However that did sync correctly via Jenkins.

          Karl Wirth added a comment - Hi peterdb Sorry for the delay. Took me a while to get my hands on a Mac. Can you provide me with an exact example file please. I just tested with a ".webloc" that according to a page I found was a resource fork file and had to submit that as 'resource' instead of 'apple'. However that did sync correctly via Jenkins.

          Peter DB added a comment -

          Hello Karl.  Could you maybe try creating a file with a resource fork with the following command line commands:

          touch WithResourceFork.dat
          echo -n This is the resource fork.> WithResourceFork.dat/..namedfork/rsrc

          That should create a file with an empty data fork and a resource fork containing "This is the resource fork.".  That should be verifiable by running:

          xattr -l WithResourceFork.dat

          P4V should automatically make that an "apple" file when doing "Mark for Add" on it (on a Mac).

          If that doesn't work I'll look into delivering you one of our actual files (after the weekend).

          Kr,
          Peter DB.

          Peter DB added a comment - Hello Karl.  Could you maybe try creating a file with a resource fork with the following command line commands: touch WithResourceFork.dat echo -n This is the resource fork.> WithResourceFork.dat/..namedfork/rsrc That should create a file with an empty data fork and a resource fork containing "This is the resource fork.".  That should be verifiable by running: xattr -l WithResourceFork.dat P4V should automatically make that an "apple" file when doing "Mark for Add" on it (on a Mac). If that doesn't work I'll look into delivering you one of our actual files (after the weekend). Kr, Peter DB.

          Karl Wirth added a comment -

          Hi peterdb - OK now I'm getting some bizarre behavior with P4 and P4jenkins on that file so I'm going to contact you directly so I can get some more information.

          Karl Wirth added a comment - Hi peterdb - OK now I'm getting some bizarre behavior with P4 and P4jenkins on that file so I'm going to contact you directly so I can get some more information.

          It doesn't appear in the "Similar Issues", but JENKINS-59977 may well be related

          Doug Whitfield added a comment - It doesn't appear in the "Similar Issues", but JENKINS-59977 may well be related

            p4karl Karl Wirth
            peterdb Peter DB
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: