[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser-build][maint-15.0] Bug 40338: Use cp -al instead of mv in projects/release.



Title: GitLab

Pier Angelo Vendrame pushed to branch maint-15.0 at The Tor Project / Applications / tor-browser-build

Commits:

  • 2c9daf78
    by Pier Angelo Vendrame at 2026-02-04T11:59:09+01:00
    Bug 40338: Use cp -al instead of mv in projects/release.
    
    Currently, we use mv in projects/release/build.
    However, since we also use hard links, re-running the release project
    might fail (because we end up trying to mv the same inode).
    
    Rather than checking stat, we can just use `cp -al`, which simplifies
    also the current mechanism we have to handle subdirectories.
    
    RBM will take care of deleting the temporary directory where the script
    runs, so we do not even need to remove the files after the copy.
    

1 changed file:

Changes:

  • projects/release/build
    ... ... @@ -5,65 +5,53 @@
    5 5
     destdir="[% dest_dir _ '/' _ c("var/publish_dir") %]"
    
    6 6
     mkdir -p "$destdir"
    
    7 7
     
    
    8
    -function mv_files {
    
    9
    -  inputfile="$1"
    
    10
    -  if test -d "$inputfile"/artifacts
    
    11
    -  then
    
    12
    -    mkdir -p "$destdir"/artifacts
    
    13
    -    mv "$inputfile"/artifacts/* "$destdir"/artifacts
    
    14
    -    rmdir "$inputfile"/artifacts
    
    15
    -  fi
    
    16
    -  mv "$inputfile"/* "$destdir"/
    
    17
    -}
    
    18
    -
    
    19 8
     [% IF c("var/browser_platforms/android-armv7") -%]
    
    20
    -  mv_files "[% c('input_files_by_name/android-armv7') %]"
    
    9
    +  cp -alf "[% c('input_files_by_name/android-armv7') %]"/* "$destdir"/
    
    21 10
     [% END -%]
    
    22 11
     [% IF c("var/browser_platforms/android-x86") -%]
    
    23 12
       mv_files "[% c('input_files_by_name/android-x86') %]"
    
    24 13
     [% END -%]
    
    25 14
     [% IF c("var/browser_platforms/android-x86_64") -%]
    
    26
    -  mv_files "[% c('input_files_by_name/android-x86_64') %]"
    
    15
    +  cp -alf "[% c('input_files_by_name/android-x86_64') %]"/* "$destdir"/
    
    27 16
     [% END -%]
    
    28 17
     [% IF c("var/browser_platforms/android-aarch64") -%]
    
    29
    -  mv_files "[% c('input_files_by_name/android-aarch64') %]"
    
    18
    +  cp -alf "[% c('input_files_by_name/android-aarch64') %]"/* "$destdir"/
    
    30 19
     [% END -%]
    
    31 20
     [% IF c("var/browser_platforms/windows-i686") -%]
    
    32
    -  mv_files "[% c('input_files_by_name/windows-i686') %]"
    
    21
    +  cp -alf "[% c('input_files_by_name/windows-i686') %]"/* "$destdir"/
    
    33 22
     [% END -%]
    
    34 23
     [% IF c("var/browser_platforms/windows-x86_64") -%]
    
    35
    -  mv_files "[% c('input_files_by_name/windows-x86_64') %]"
    
    24
    +  cp -alf "[% c('input_files_by_name/windows-x86_64') %]"/* "$destdir"/
    
    36 25
     [% END -%]
    
    37 26
     [% IF c("var/browser_platforms/macos") -%]
    
    38
    -  mv_files "[% c('input_files_by_name/macos') %]"
    
    27
    +  cp -alf "[% c('input_files_by_name/macos') %]"/* "$destdir"/
    
    39 28
     [% END -%]
    
    40 29
     [% IF c("var/browser_platforms/macos-x86_64") -%]
    
    41
    -  mv_files "[% c('input_files_by_name/macos-x86_64') %]"
    
    30
    +  cp -alf "[% c('input_files_by_name/macos-x86_64') %]"/* "$destdir"/
    
    42 31
     [% END -%]
    
    43 32
     [% IF c("var/browser_platforms/macos-aarch64") -%]
    
    44
    -  mv_files "[% c('input_files_by_name/macos-aarch64') %]"
    
    33
    +  cp -alf "[% c('input_files_by_name/macos-aarch64') %]"/* "$destdir"/
    
    45 34
     [% END -%]
    
    46 35
     [% IF c("var/browser_platforms/linux-i686") -%]
    
    47 36
       mv_files "[% c('input_files_by_name/linux-i686') %]"
    
    48 37
     [% END -%]
    
    49 38
     [% IF c("var/browser_platforms/linux-x86_64") -%]
    
    50
    -  mv_files "[% c('input_files_by_name/linux-x86_64') %]"
    
    39
    +  cp -alf "[% c('input_files_by_name/linux-x86_64') %]"/* "$destdir"/
    
    51 40
     [% END -%]
    
    52 41
     [% IF c("var/browser_platforms/linux-aarch64") -%]
    
    53
    -  mv_files "[% c('input_files_by_name/linux-aarch64') %]"
    
    42
    +  cp -alf "[% c('input_files_by_name/linux-aarch64') %]"/* "$destdir"/
    
    54 43
     [% END -%]
    
    55 44
     [% IF c("var/linux-packages") || c("var/linux-packages-aarch64") -%]
    
    56 45
       [% IF c("var/linux-packages") -%]
    
    57
    -    mv_files "[% c('input_files_by_name/deb-packages') %]"
    
    46
    +    cp -alf "[% c('input_files_by_name/deb-packages') %]"/* "$destdir"/
    
    58 47
       [% END -%]
    
    59 48
       [% IF c("var/linux-packages-aarch64") -%]
    
    60
    -    mv_files "[% c('input_files_by_name/deb-packages-aarch64') %]"
    
    49
    +    cp -alf "[% c('input_files_by_name/deb-packages-aarch64') %]"/* "$destdir"/
    
    61 50
       [% END -%]
    
    62
    -  mv_files "[% c('input_files_by_name/rpm-packages') %]"
    
    51
    +  cp -alf "[% c('input_files_by_name/rpm-packages') %]"/* "$destdir"/
    
    63 52
     [% END -%]
    
    64 53
     [% IF c("var/browser-src") -%]
    
    65
    -  mv  [% c('input_files_by_name/src-firefox') %]      \
    
    66
    -      "$destdir"/
    
    54
    +  cp -alf "[% c('input_files_by_name/src-firefox') %]" "$destdir"/
    
    67 55
     [% END -%]
    
    68 56
     cd "$destdir"
    
    69 57
     cat > .htaccess <<'EOF'
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx