No announcement yet.

SVN add, commit and checkout alters tool functionality

  • Filter
  • Time
  • Show
Clear All
new posts

  • SVN add, commit and checkout alters tool functionality

    I do have a serious problem:
    We distribute our tool binaries via SVN to other locations - this is working properly since years.
    Now I have a tool that is not working anymore after SVN checkout.

    1. I install the "3rd party" tool binaries on the server and test it (e.g. in /tools/toolA)
    2. Then I commit it completly into SVN via "svn add --force --no-ignore toolA; svn ci -m "" toolA"
    3. Then I move the tool-folder to another name (e.g. mv toolA toolA_org)
    4. Then I checkout the tool from SVN via "svn up toolA"
    5. Then the tool is not working anymore - without any error-message - it just starts and stops in the middle.
    6. As a verification-test I renamed it to "toolA_svn" and the original folder back to "toolA" - and thus it is working again.

    I compared the content and the permission setting of all files in the two folders - any difference I found I matched, but NO change in behaviour.
    Even if I take away all write permissions after install, the behaviour is the same.

    Do you have any idea how SVN could alter the files or change the behaviour ?

    Could it be that the tool is creating some checksums during installation, which will not be valid anymore after SVN checkin and checkout ?

    Any idea/hint/proposal is appreciated.

  • #2
    Just observed that the same behaiour occures when the install folder is copied and not checkedin/out from SVN.
    Thus, the problem is not related to SVN.


    • #3
      Glad to learn that -I was having difficult imagining how SVN could corrupt them, short of someone configuring Keyword Substitution on binary files (ugh).


      • #4
        Some new findings on this topic:

        When using "cp -r src/ dest/" or "rsync -av src/ dest/" the tool does not work anymore.
        When using "cp -Rav" the tool is working in its copied location.

        This tells me, that the tool requires some "metadata" of the default installation files/folders, which are not preserved during "cp -r" and "rsync -av".

        Is it possible to tell SVN to do the exact same thing as "cp -Rav" is doing ?


        • #5
          I further investigated the difference by checksumming the tarballs of the installation folders.
          The checksum outout is a follows:
          #cksum ....
          <cksum> <bytecount> <filename>

          The checksums are all different of course, but interestingly, both working folders - the original (..._iscape) and the “cp -Rav” (…_iscape_cpRav) - do have exactly the same byte-count.
          The other – non-working - folders do all have different byte-counts.

          #cksum XCELIUM18.09.010_iscape.tar
          1596820167 18854666240 XCELIUM18.09.010_iscape.tar

          # cksum XCELIUM18.09.010_iscape_cpRav.tar
          3066105680 18854666240 XCELIUM18.09.010_cpRav.tar

          # cksum XCELIUM18.09.010_iscape_rsyncav.tar
          817130533 18892963840 XCELIUM18.09.010_iscape_rsyncav.tar

          # cksum XCELIUM18.09.010_iscape_cpr.tar
          1762198152 18864506880 XCELIUM18.09.010_iscape_cpr.tar

          # cksum XCELIUM18.09.010_svn.tar
          506589326 18372802560 XCELIUM18.09.010_svn.tar

          What I want is, to have the SVN version to have the same bytecount to get a working tool.
          Any idea ?


          • #6
            By checking the difference between “cp -r” and “cp -Rav” I found that the option “—preserve” makes the difference.
            I checked the following “—preserve” options:

            cp -r --preserve=all --> working
            cp -r --preserve=mode,ownership --> not working
            cp -r --preverve=timestamp --> working

            This clearly tells me that the tool check the timestamps of the files !

            Is it possible to preserve timestamps in SVN throughout the whole "add/commit/update" procedure ?

            I want to keep the "last modification time" I throughout the whole SVN procedure.
            I read that there are options to keep the last commit date, but that does not sound what I am looking for.

            Last edited by HWe; 03-29-2019, 09:56 AM.


            • #7
              SVN enables preservation of "last commit time" but not "last modification time". I'd say to fix the tool: it really should be using checksums, not timestamps as timestamps are insecure.