Skip to content
Snippets Groups Projects

Improve OS detection

Merged Herbert Valerio Riedel requested to merge github/fork/hvr/PR/improve-os-detection into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ghost User
  • Ghost User
    Ghost User @ghost started a thread on commit ed546767
  • 577 595 # shellcheck disable=SC1091
    578 596 . /etc/lsb-release
    579 597 printf "%s" "$DISTRIB_RELEASE"
    598 elif [ -f /etc/redhat-release ]; then
    599 case "$(cat /etc/redhat-release)" in
    600 # NB: Older CentOS releases didn't have a /etc/centos-release file
    601 "CentOS release "*|"Fedora release "*)
    602 printf "%s" "$(awk 'NR==1 { split($3, a, "."); print a[1] }' /etc/redhat-release)"
  • Contributor

    I also noticed we use a lot of .tar.xz

    http://www.nongnu.org/lzip/xz_inadequate.html

  • Herbert Valerio Riedel
    Herbert Valerio Riedel @hvr started a thread on commit ed546767
  • 577 595 # shellcheck disable=SC1091
    578 596 . /etc/lsb-release
    579 597 printf "%s" "$DISTRIB_RELEASE"
    598 elif [ -f /etc/redhat-release ]; then
    599 case "$(cat /etc/redhat-release)" in
    600 # NB: Older CentOS releases didn't have a /etc/centos-release file
    601 "CentOS release "*|"Fedora release "*)
    602 printf "%s" "$(awk 'NR==1 { split($3, a, "."); print a[1] }' /etc/redhat-release)"
    • I'm very confident; also this is mostly for legacy distro releases anyway (and the ones I've looked at had this uniform single-line "${NAME} release ${RELEASE}"-pattern); all recent Linux distros have switched to the /etc/os-release format anyway

  • I also noticed we use a lot of .tar.xz

    http://www.nongnu.org/lzip/xz_inadequate.html

    Well, it took a very long time to have all major Linux distros have .xz support out of the box... and I'm not willing to go back to .bz2 or .gz for bindists after we've finally standardised on .xz for cabal & ghc distributions... and this for the sake of future digital archaeologists... ;-)

    What I miss from that article is a concrete suggestion what to use as alternative (without sacrificing compression ratio); or is it simply to go back to using the original version-1 .lzma stream format?

  • Contributor

    or is it simply to go back to using the original version-1 .lzma stream format?

    Pretty much. But even .gz or .bz2 is better.

    Well, it took a very long time to have all major Linux distros have .xz support out of the box... and I'm not willing to go back to .bz2 or .gz for bindists after we've finally standardised on .xz for cabal & ghc distributions... and this for the sake of future digital archaeologists... ;-)

    But it's unreliable...

  • Please register or sign in to reply
    Loading