Upstream - Software developers. Those who create the software Downstream - Linux distros and end users. Those who download and use the software

Archives

  • tar xf for extracting files from a tarball
  • gzip -cd for explicity decompressing GZIP archives
  • bunzip2 -cd for explicitly decompressing BZIP2 archives
  • ZIP files use GZIP compression but use their own internal indexing
    • ZIP files do not preserve the original Unix ownerid or file permissions
    • Use unzip to extract ZIP archives
  • Security - Unpack files as a normal user, not as root
    • This measure is to prevent unintended file overwrites
    • The file-owner settings are only preserved when extracting as root. If you want to preserve them for whatever reason and you know what you’re doing, extract as root

Patching

  • Patches may be released in the following forms
    • A sed/awk command
    • A shell script containing sed/awk commands
    • A patch file
  • Apply patches only if you know it’s safe
  • sed/awk applies regexes to text files to make internal changes to them. awk is capable of applying more complex transformations than sed in most cases
  • A patch file is made using the output of the diff command
    • diff outputs the differences between two files being compared
    • The patch files applies the output of diff to the file that should be updated

Questions

  1. Which protocol is better for downloading files? HTTP or FTP? HTTP is the popular and modern protocol for file downloading but there’s a source that says FTP is better for downloading large files while HTTP is better for smaller files use HTTPS
    1. Anonymous FTP is old and isn’t used a lot these days (it even predates TCP/IP)

Source: https://moi.vonos.net/linux/beginners-installing-from-source/