#6 Enable system_allocator in RHEL/ELN builds
Merged 11 months ago by luhliarik. Opened 12 months ago by yselkowitz.
rpms/ yselkowitz/varnish rawhide  into  rawhide

file modified
+8 -1
@@ -22,7 +22,11 @@ 

  

  # Default: Use jemalloc, as adviced by upstream project

  # Change to 1 to use system allocator (ie. glibc)

+ %if 0%{?rhel}

+ %bcond_without system_allocator

+ %else

  %bcond_with system_allocator

+ %endif

  

  %if %{with system_allocator}

  # use _lto_cflags if present
@@ -33,7 +37,7 @@ 

  Summary: High-performance HTTP accelerator

  Name: varnish

  Version: 7.3.0

- Release: 2%{?dist}

+ Release: 3%{?dist}

  License: BSD

  URL: https://www.varnish-cache.org/

  Source0: http://varnish-cache.org/_downloads/%{name}-%{version}.tgz
@@ -299,6 +303,9 @@ 

  

  

  %changelog

+ * Fri Jun 23 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 7.3.0-3

+ - Enable system_allocator in RHEL/ELN builds

+ 

  * Mon Mar 20 2023 Ingvar Hagelund <ingvar@redpill-linpro.com> - 7.3.0-2

  - Switched from bcond to bcond_with for compatibility with el8 and el9

  - haproxy builddep on systems with haproxy2

Just to remind you: Compiling Varnish with jemalloc is the adviced configuration by the upstream project. I maintain the jemalloc package in EPEL for exactly that purpose, though it is also used by other packages. For my earlier comments on this issue, see bz#1917697 and bz#1656034.

Unwanted or not, Red Hat already maintains several branches of jemalloc in el8, el9, and c9s. Why Varnish is special here, compared to eg. Firefox or Redis is beyond me.

While Red Hat keeps it's own rpm fork for el8, el9, and c9s without jemalloc, others that build Varnish for el8 and el9 from the Fedora package will get the obvious result, the Fedora configuration, that is, Varnish built with jemalloc. I observe by the way, that this is also how the upstream Varnish rpm packages are built. If upstream change their recommendation, suggesting running Varnish without jemalloc, I may reconsider this configuration.

Best regards,
Ingvar

Regardless of upstream's position, Red Hat has decided not to support jemalloc in RHEL, and therefore builds varnish without it since RHEL 8. jemalloc was at one point imported into c9s but subsequently retired, and is not shipped in RHEL or CentOS Stream. As the upstream of RHEL, many Fedora spec files carry conditionals to build differently in RHEL than Fedora. This change allows the RHEL, CentOS Stream, and ELN builds to conform to Red Hat's decision while not affecting how Fedora packages are built, where you are free to follow upstream's recommendations in this regard.

To be clear: with jemalloc unavailable in RHEL, attempting to compile this package on that platform without having first installed jemalloc through some other mechanism WILL fail.

It's preferable for users to get something that works, first and foremost. Furthermore, users of RHEL (and RHEL-compatible systems) generally prefer to avoid unsupported software (in the "paid support" sense) on their systems.

So I think it's definitely more sensible to ship with the system allocator by default and allow more advanced users to elect to build with a custom jemalloc using --without-system-allocator.

It makes sense to me to have varnish with system allocator in RHEL, since it has been decided to not ship jemalloc in RHEL 10/ELN. I will merge it.

Pull-Request has been merged by luhliarik

11 months ago
Metadata