Merge remote-tracking branch 'origin/master' into staging

* origin/master: (693 commits)
  buildGoModule: use go_1_12 instead of go_1_11 (#58103)
  gitAndTools.lab: 0.15.2 -> 0.15.3 (#58091)
  signal-desktop: 1.22.0 -> 1.23.0
  added missing semicolon to documentation
  terminus_font_ttf: 4.46.0 -> 4.47.0
  buildGoModule: remove SSL env vars in favor of cacert in buildInputs (#58071)
  dav1d: init at 0.2.1
  dropbox-cli: 2018.11.28 -> 2019.02.14
  atlassian-confluence: 6.14.1 -> 6.14.2
  maintainers: update email for dywedir
  python.pkgs.hglib: use patch to specify hg path (#57926)
  chkrootkit: 0.52 -> 0.53
  radare2-cutter: 1.7.2 -> 1.8.0
  autorandr: 1.7 -> 1.8
  pythonPackages.pyhepmc: fix build
  llvm-polly/clang-polly: use latest llvm
  apulse: 0.1.11.1 -> 0.1.12, cleanup
  factorio: experimental 0.17.14 → 0.17.16 (#58000)
  sequeler: 0.6.7 -> 0.6.8
  nasc: 0.5.1 -> 0.5.2
  ...
This commit is contained in:
Wael M. Nasreddine
2019-03-21 21:01:25 -07:00
722 changed files with 34695 additions and 27611 deletions
@@ -15,8 +15,10 @@ isExecutable() {
# *or* there is an INTERP section. This also catches position-independent
# executables, as they typically have an INTERP section but their ELF type
# is DYN.
LANG=C readelf -h -l "$1" 2> /dev/null \
| grep -q '^ *Type: *EXEC\>\|^ *INTERP\>'
isExeResult="$(LANG=C readelf -h -l "$1" 2> /dev/null \
| grep '^ *Type: *EXEC\>\|^ *INTERP\>')"
# not using grep -q, because it can cause Broken pipe
[ -n "$isExeResult" ]
}
# We cache dependencies so that we don't need to search through all of them on
@@ -207,10 +209,11 @@ autoPatchelf() {
isELF "$file" || continue
segmentHeaders="$(LANG=C readelf -l "$file")"
# Skip if the ELF file doesn't have segment headers (eg. object files).
echo "$segmentHeaders" | grep -q '^Program Headers:' || continue
# not using grep -q, because it can cause Broken pipe
[ -n "$(echo "$segmentHeaders" | grep '^Program Headers:')" ] || continue
if isExecutable "$file"; then
# Skip if the executable is statically linked.
echo "$segmentHeaders" | grep -q "^ *INTERP\\>" || continue
[ -n "$(echo "$segmentHeaders" | grep "^ *INTERP\\>")" ] || continue
fi
autoPatchelfFile "$file"
done < <(find "$@" ${norecurse:+-maxdepth 1} -type f -print0)