0001-Added-a-blog-entry-on-Parameterized-Packages.patch 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. From 0fc309e4d337b0858ac2b55da8851471c104e76a Mon Sep 17 00:00:00 2001
  2. From: cel7t <shahsarthakw@gmail.com>
  3. Date: Wed, 7 Jun 2023 14:08:33 +0000
  4. Subject: [PATCH] Added a blog entry on Parameterized Packages
  5. * posts/parameterized-packages-for-guix.md: created this file
  6. ---
  7. .../posts/parameterized-packages-for-guix.md | 135 ++++++++++++++++++
  8. 1 file changed, 135 insertions(+)
  9. create mode 100644 website/posts/parameterized-packages-for-guix.md
  10. diff --git a/website/posts/parameterized-packages-for-guix.md b/website/posts/parameterized-packages-for-guix.md
  11. new file mode 100644
  12. index 0000000..9d3bf0c
  13. --- /dev/null
  14. +++ b/website/posts/parameterized-packages-for-guix.md
  15. @@ -0,0 +1,135 @@
  16. +title: Parameterized Packages for GNU Guix
  17. +date: 2023-06-06 13:37
  18. +author: Sarthak Shah
  19. +tags: GSoC
  20. +---
  21. +Hello Guix!
  22. +I'm Sarthak and I'll be working on implementing Parameterized Packages
  23. +for GNU Guix as a [Google Summer of Code](https://summerofcode.withgoogle.com/)
  24. +intern under the guidance of Pjotr Prins and Gábor Boskovits.
  25. +
  26. +#### What are Parameterized Packages?
  27. +
  28. +One of the many advantages of [free software](https://www.gnu.org/philosophy/free-sw.html) is the
  29. +availability of compile-time options for almost all packages.
  30. +Thanks to its dedication to building all packages from source,
  31. +Guix is one of the few GNU/Linux distributions that can take advantage
  32. +of these compile-time features; in fact, many advanced users such as
  33. +those using Guix on [High-Performance Computing Systems](https://hpc.guix.info)
  34. +and [new ISAs like RISC-V](https://10years.guix.gnu.org/video/gnu-guix-and-the-risc-v-future/) have already been doing this
  35. +by utilizing a feature known as [Package Transformations](https://guix.gnu.org/manual/en/html_node/Package-Transformation-Options.html).
  36. +
  37. +**Parameterized Packages** are a new type of package transformations
  38. +that will be able to tweak an even wider array of compile-time
  39. +options, such as removing unused dependencies or building a package
  40. +with support for just a specific locale. These will have a wide
  41. +variety of applications, ranging from High-Performance Computing to
  42. +Embedded Systems and could also help tackle a few of Guix's issues
  43. +like large binary sizes and dense dependency graphs.
  44. +
  45. +#### What would these look like?
  46. +
  47. +The *syntax* for parameterized packages is still under heavy
  48. +deliberation, however the final syntax will have the following
  49. +features:
  50. +- Maintainers will be able to specify what combinations of
  51. +parameters a package supports, along with a _default configuration_
  52. +of parameters for a given package.
  53. +- Users will be able to pass parameters they want enabled or disabled
  54. +through --with-parameters which will then get validated against the
  55. +valid combinations specified by maintainers before being run
  56. +- For a given package and a given set of parameters, only those in
  57. +the package's parameter specification will be used
  58. +- Users will be able to specify a global parameter transform that
  59. +will apply to all packages - Packages will be built with the
  60. +_default_ configuration if the global transform creates an
  61. +invalid configuration
  62. +
  63. +#### Potential Problems with Parameterization
  64. +
  65. +### Combinatorial Explosion of Variants
  66. +
  67. +One of the biggest and most obvious issues with parameters is the
  68. +combinatorial explosion of package variants they will create. One way
  69. +to address this is to use tools to calculate and regulate allowed
  70. +complexity; one such tool could be a function that takes a
  71. +parameter combination specification and returns the number of variants
  72. +it could create.
  73. +
  74. +### Increase in Maintenance Required
  75. +
  76. +Another concern is that this will lead to an increase in the workload
  77. +of maintainers, who have been generously volunteering their time and
  78. +have a lot of work as is. Hence, we will be treating parameters
  79. +the same way we have been treating other package transformations-
  80. +they are not expected to be stable, and should be used at the
  81. +user's discretion.
  82. +
  83. +### Availability of Substitutes for Variants
  84. +Lastly, parameterization could lead to an exponential increase in
  85. +the number of substitutes build farms will have to create, and
  86. +thus as such there are only plans on building substitutes for
  87. +default and very popular parameter combinations.
  88. +
  89. +#### Other topics under discussion
  90. +
  91. +Some of the other points of discussion with respect to parameters are
  92. +- **Scope**: Parameterization has a very wide and overarching scope,
  93. +and it would be useful to have guidelines in place for when a
  94. +particular property should be considered for parameterization
  95. +- **Syntax**: There are many proposed syntax designs for
  96. +parameterization, and more are welcome! The final syntax will most
  97. +probably be an amalgamation of the best parts of all proposed designs.
  98. +- **Substitutes**: There is a lot of discussion on exactly what
  99. +parameter combinations should be considered for substitutes; while it
  100. +is obvious that it won't be possible to build _all_ combinations, some
  101. +important combinations can and should be considered for having
  102. +substitutes built. We could perhaps have a separate category of
  103. +parameter combinations that would both receive substitutes and
  104. +support, and make these combinations discoverable through the
  105. +UI. Another suggestion is to have user-run channels for specific build
  106. +combinations, like for example there could be a RISC-V specific
  107. +channel supplying substitutes for the users running RISC-V.
  108. +
  109. +If you would like to join the discussion, check out [this mailing list
  110. +discussion about this project](https://lists.gnu.org/archive/html/guix-devel/2023-05/msg00156.html),
  111. +and also have a look at the [original thread](https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00312.html) about parameterization.
  112. +
  113. +#### Conclusion
  114. +
  115. +Parameters hold the potential to greatly increase Guix's flexibility,
  116. +but will also lead to greater complexity. In my opinion, Guix is
  117. +uniquely positioned to take full advantage of the customisability
  118. +provided by compile-time options while also enjoying relative
  119. +stability thanks to its transactional nature.
  120. +
  121. +#### About Me
  122. +
  123. +I'm a student studying Mathematics and ECE at BITS Pilani, and I love
  124. +computers and free software. I am the president of my university's
  125. +equivalent of a Free Software Advocacy Group, and I am also one of the
  126. +system administrators for my university's High-Performance Computing
  127. +System. As an advocate for free software and a Lisp user, I naturally
  128. +fell in love with GNU Guix when I discovered it. I have also used
  129. +Gentoo for some time in the past, which motivated me to try and bring
  130. +something similar to USE flags to Guix. You can find my blog at
  131. +[blog.lispy.tech](https://blog.lispy.tech), where I will be frequently
  132. +posting updates about the project.
  133. +
  134. +#### About GNU Guix
  135. +
  136. +[GNU Guix](https://guix.gnu.org) is a transactional package manager
  137. +and an advanced distribution of the GNU system that [respects user
  138. +freedom](https://www.gnu.org/distros/free-system-distribution-guidelines.html).
  139. +Guix can be used on top of any system running the Hurd or the Linux
  140. +kernel, or it can be used as a standalone operating system
  141. +distribution for i686, x86_64, ARMv7, AArch64 and POWER9 machines.
  142. +
  143. +In addition to standard package management features, Guix supports
  144. +transactional upgrades and roll-backs, unprivileged package
  145. +management, per-user profiles, and garbage collection. When used as a
  146. +standalone GNU/Linux distribution, Guix offers a declarative,
  147. +stateless approach to operating system configuration management. Guix
  148. +is highly customizable and hackable through
  149. +[Guile](https://www.gnu.org/software/guile) programming interfaces and
  150. +extensions to the [Scheme](http://schemers.org) language.
  151. --
  152. 2.38.1