logo

drewdevault.com

[mirror] blog and personal website of Drew DeVault git clone https://hacktivis.me/git/mirror/drewdevault.com.git

Developers-shouldnt-distribute.md (4409B)


  1. ---
  2. date: 2019-12-09
  3. layout: post
  4. title: Developers shouldn't distribute their own software
  5. tags: [practices]
  6. ---
  7. An oft-heard complaint about Linux is that software distribution often takes
  8. several forms: a Windows version, a macOS version, and... a Debian version, an
  9. Ubuntu version, a Fedora version, a CentOS version, an openSUSE version... but
  10. these complaints miss the point. The true distributable form for Linux software,
  11. and rather for Unix software in general, is a .tar.gz file containing the source
  12. code.
  13. **Note**: This article presumes that proprietary/nonfree software is irrelevant,
  14. and so should you.
  15. That's not to imply that end-users should take this tarball and run `./configure
  16. && make && sudo make install` themselves. Rather, the responsibility for
  17. end-user software distribution is on the distribution itself. That's why we call
  18. it a *distribution*. This relationship may feel like an unnecessary middleman to
  19. the software developer who just wants to get their code into their user's hands,
  20. but on the whole this relationship has far more benefits than drawbacks.
  21. As the old complaint would suggest, there are hundreds of variants of Linux
  22. alone, not to mention the BSD flavors and any novel new OS that comes out next
  23. week. Each of these environments has its own take on how the system as a whole
  24. should be organized and operate, and it's a fools' errand for a single team to
  25. try and make sense of it all. More often than not, software which tries to field
  26. this responsibility itself sticks out like a sore thumb on the user's operating
  27. system, totally flying in the face the conventions set out by the distribution.
  28. Thankfully, each distro includes its own set of volunteers dedicated to this
  29. specific job: packaging software for the distribution and making sure it
  30. conforms to the norms of the target environment. This model also adds a set of
  31. checks and balances to the system, in which the distro maintainers can audit
  32. each other's work for bugs and examine the software being packaged for
  33. anti-features like telemetry or advertisements, patching it out as necessary.
  34. These systems keep malware out of the repositories, handle distribution of
  35. updates, cryptographically verifying signatures, scaling the distribution out
  36. across many mirrors - it's a robust system with decades of refinement.
  37. The difference in trust between managed software repositories like Debian,
  38. Alpine Linux, Fedora, and so on; and unmanaged software repositories like PyPI,
  39. npm, Chrome extensions, the Google Play store, Flatpak, etc — is starkly
  40. obvious. Debian and its peers are full of quality software which integrates well
  41. into the host system and is free of malware. Unmanaged repositories, however,
  42. are [constant sources][pypi malware] for crapware and malware. I don't trust
  43. developers to publish software with my best interests in mind, and developers
  44. shouldn't ask for that level of trust. It's only through a partnership with
  45. distributions that we can build a mutually trustworthy system for software
  46. distribution.
  47. [pypi malware]: https://www.zdnet.com/article/two-malicious-python-libraries-removed-from-pypi/
  48. Some developers may complain that distros ship their software too slowly, but
  49. you shouldn't sweat it. End-user distros ship updates reasonably quickly, and
  50. server distros ship updates at a schedule which meets the user's needs. This
  51. inconsistent pace in release schedules among free software distributions is a
  52. feature, not a bug, and allows the system to work to the needs of its specific
  53. audience. You should use a distro that ships updates to *you* at the pace you
  54. wish, and let your users do the same.
  55. So, to developers: just don't worry about distribution! Stick a tarball on your
  56. release page and leave the rest up to distros. And to users: install packages
  57. from your distro's repositories, and learn how its packaging process works so
  58. you can get involved when you find a package missing. It's not as hard as it
  59. looks, and they could use your help. For my part, I work both as a developer,
  60. packager, and end-user, publishing my software as tarballs, packaging some of it
  61. up for my [distro of choice][pkgs], report bugs to other maintainers, and field
  62. requests from maintainers of other distros as necessary. Software distribution
  63. is a social system and it works.
  64. [pkgs]: https://pkgs.alpinelinux.org/packages?name=&branch=edge&arch=x86_64&maintainer=Drew+DeVault