Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages: cleanups & new distros #1287

Merged
merged 6 commits into from
Jul 3, 2024
Merged

Conversation

thresheek
Copy link
Member

This adds Ubuntu 24.04.

While at it, remove some older EOLed distributions from both rpm and deb worlds.

Copy link
Member

@ac000 ac000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @thresheek

 Packages: don't redefine FORTIFY_SOURCE on Ubuntu 24+

The default on Ubuntu 24.04 and newer is now -D_FORTIFY_SOURCE=3 which clashes
with our definition.

Could you re-flow the commit message to wrap after 72 chars please? That allows for 4 chars of left/right margin in the likes of git-log(1)...

Comment on lines 6 to 16
include /usr/share/dpkg/vendor.mk
ifeq ($(shell $(call dpkg_vendor_derives_from,ubuntu)),yes)
DISTROREL_MAJOR := $(shell lsb_release -rs | cut -d. -f 1)
ifeq ($(shell test $(DISTROREL_MAJOR) -ge 24; echo $$?), 0)
export DEB_CFLAGS_MAINT_APPEND=-fPIC
else
export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC
endif
else
export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC
endif
Copy link
Member

@ac000 ac000 May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way we can loose one of those duplicate branches?, i.e only having one of

export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC

Ditto for the others...

Or do you envisage them diverging at some point?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it looks like we can drop most of the patch for Ubuntus, since they seem to be using FORTIFY_SOURCE=2 for all their releases since ages, and moved to FORTIFY_SOURCE=3 for 24.04:

https://salsa.debian.org/toolchain-team/gcc/-/commit/ae01f86e0731d2661946866464939aba79b49da9

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the patchset accordingly. Thanks!

@callahad
Copy link
Collaborator

callahad commented Jun 18, 2024

@thresheek While we're at it, could you please drop CentOS 7 and 8 (both effectively EOL), as well as Amazon Linux 2?

@thresheek
Copy link
Member Author

I agree about CentOS 7 - it will EOL in a couple of weeks.

However CentOS 8 here designates RHEL 8 as well, so we need to keep it.
Amazon Linux 2 EOL is end of June 2025, is there another reason to drop it?

@callahad
Copy link
Collaborator

Unit can drop RHEL 8, too - its Full Support Phase ended last month. 😉

@callahad
Copy link
Collaborator

callahad commented Jun 18, 2024

Less flippantly, dropping CentOS / RHEL 8 and AL 2 moves our baseline GCC from 7 to 9.

Then to GCC 10 when we drop Ubuntu 20.04, and to GCC 11 when we drop Debian 11. Both of which I'd advocate for doing sooner rather than later, but not necessarily in this PR.

@thresheek
Copy link
Member Author

One can argue that "Maintenance support" for RHEL 8 is pretty much the usual way of supporting any other Linux distros through their lifetime; see https://access.redhat.com/support/policy/updates/errata#Full_Support_Phase (and further paragraphs) for more details on that.

In general, we'd consider any official non-gated (GA, not additionally paid) support that includes security fixes and errata as something we can also build packages for. For RHEL, that includes Full Support and Maintenance Support.

Of course this is not my call to make, I'm just adding context on why it's the way it is - and it's your call to make to end the distribution of binary packages for those targets.

@callahad
Copy link
Collaborator

Appreciate that :)

For purposes of keeping this PR on track, let's drop CentOS 7 and leave the rest.

I'll start a separate discussion to define our baseline binary support targets, which we can address in a subsequent PR. (The tl;dr of my position is that we're a tiny team that needs to skew more towards innovation than maintenance; we're currently losing more by imposing these limits than we gain.)

The default on Ubuntu 24.04 and newer is now -D_FORTIFY_SOURCE=3 which
clashes with our definition.  We shouldnt be setting it for Ubuntus
anyway since _FORTIFY_SOURCE=2 for older distros is already handled by
the defaults in their gcc builds.
@thresheek
Copy link
Member Author

I've removed CentOS 7 / RHEL 7 in the new patches. Looks like we had some more leftovers from Fedora cleanups, and ahem CentOS 6 days, so I've removed those as well.

@callahad
Copy link
Collaborator

Here's the separate discussion on packaging targets: #1333

@thresheek
Copy link
Member Author

Ping for a review

@ac000
Copy link
Member

ac000 commented Jun 27, 2024

No Fedora 40?

@thresheek
Copy link
Member Author

It looks like Fedora 40 doesnt require any changes compared to what we have for Fedora 39... And on my VMs it builds the packaging just fine.

@callahad callahad self-assigned this Jul 1, 2024
@lchastel
Copy link

lchastel commented Jul 3, 2024

When do you plan to merge and release this update ?

@callahad
Copy link
Collaborator

callahad commented Jul 3, 2024

Merging should happen shortly. I'd expect us to release Unit 1.33 in the next 6 weeks.

@thresheek thresheek merged commit 63fb95e into nginx:master Jul 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants