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

libsystemd: add v255.7, drop vulnerable versions (< 253.6) #23247

Merged
merged 6 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 7 additions & 62 deletions recipes/libsystemd/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"255.7":
url: "https://github.com/systemd/systemd-stable/archive/v255.7.tar.gz"
sha256: "da29f2490c192ca743511098b1d15e385b1b5e7744979661dc30514c1ac61f0e"
"255.2":
url: "https://github.com/systemd/systemd-stable/archive/v255.2.tar.gz"
sha256: "ba7354a742dc9a8bb7dbeaa40cbf7cf2ca84f506d5b7ae5ab8d14c8eecb7aca0"
Expand All @@ -14,25 +17,11 @@ sources:
"253.6":
url: "https://github.com/systemd/systemd-stable/archive/v253.6.tar.gz"
sha256: "a0aebcfaa2e001a4d846691631d1722c4cfa1a175e4ea62db6edca0ea3cf1e3e"
"252.12":
url: "https://github.com/systemd/systemd-stable/archive/v252.12.tar.gz"
sha256: "c6c249d65b3aff0a2b99410f430f404068c74a7cd96b63f482c933afd7288112"
"251.18":
url: "https://github.com/systemd/systemd-stable/archive/v251.18.tar.gz"
sha256: "aaa5eca2dcf3fda242ed6816a00a83c91762b44ef3c76ee4eb8476a592c38f7f"
"249.16":
url: "https://github.com/systemd/systemd-stable/archive/v249.16.tar.gz"
sha256: "e6c8a686023ef0ce402f4abde42245e3ada661e000c4811dc16c8cd9b4c6d885"
"248.12":
url: "https://github.com/systemd/systemd-stable/archive/v248.12.tar.gz"
sha256: "d0826453439363b57a4f092ae078b128a95e87047281a79e8b136116ab83abc9"
"247.13":
url: "https://github.com/systemd/systemd-stable/archive/v247.13.tar.gz"
sha256: "0958bfcebf3ed4e451f6cc49802f338fcc80eb4fe4f0cf5cb5b1b90fa62e5f47"
"246.16":
url: "https://github.com/systemd/systemd-stable/archive/v246.16.tar.gz"
sha256: "b69f9940d65870f090269a28f1047a633d4b80d0001e091d53a031dd40a822d2"
patches:
"255.7":
- patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch"
patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable"
patch_type: "conan"
"255.2":
- patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch"
patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable"
Expand Down Expand Up @@ -74,47 +63,3 @@ patches:
patch_source: "https://patch-diff.githubusercontent.com/raw/systemd/systemd/pull/29538"
patch_description: "fixes cross-compilation by passing necessary compiler arguments to generator scripts"
patch_type: "portability"
"252.12":
- patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch"
patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script"
patch_type: "conan"
- patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch"
patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable"
patch_type: "conan"
"251.18":
- patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch"
patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script"
patch_type: "conan"
- patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch"
patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable"
patch_type: "conan"
"249.16":
- patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch"
patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script"
patch_type: "conan"
- patch_file: "patches/249.16/0001-Remove-dependency-from-coreutils.patch"
patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable"
patch_type: "conan"
"248.12":
- patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch"
patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script"
patch_type: "conan"
- patch_file: "patches/247.13/0001-Remove-dependency-from-coreutils.patch"
patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable"
patch_type: "conan"
"247.13":
- patch_file: "patches/247.13/0001-Remove-dependency-from-coreutils.patch"
patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable"
patch_type: "conan"
"246.16":
- patch_file: "patches/246.16/0001-Drop-bundled-copy-of-linux-if_arp.h.patch"
patch_description: "fix build error with Linux headers >= 5.14 by removing a bundled copy of it"
patch_type: "portability"
patch_source: "https://github.com/systemd/systemd-stable/commit/06dea04b38ce506c1436cd4fef9bf9919a34f441"
- patch_file: "patches/246.16/0002-meson.build-change-operator-combining-bools-from-to-.patch"
patch_description: "allow to build with meson >= 0.60.0 by fixing syntax error"
patch_type: "bugfix"
patch_source: "https://github.com/systemd/systemd-stable/commit/3d0666d9091dd097022f02fae79890b5746285c1"
- patch_file: "patches/246.16/0003-Remove-dependency-from-coreutils.patch"
patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable"
patch_type: "conan"
40 changes: 24 additions & 16 deletions recipes/libsystemd/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from conan.tools.meson import Meson, MesonToolchain
from conan.tools.scm import Version

required_conan_version = ">=1.60.0"
required_conan_version = ">=1.64.0"


class LibsystemdConan(ConanFile):
Expand Down Expand Up @@ -52,13 +52,19 @@ def configure(self):
def layout(self):
basic_layout(self, src_folder="src")

@property
def _compilers_minimum_version(self):
return {
"gcc": "7", # gcc 5 is failing
"clang": "10"
}

def requirements(self):
self.requires("libcap/2.69")
self.requires("libmount/2.39.2")
if Version(self.version) >= "251.18":
self.requires("libxcrypt/4.4.36")
self.requires("libxcrypt/4.4.36")
if self.options.with_selinux:
self.requires("libselinux/3.5")
self.requires("libselinux/3.6")
if self.options.with_lz4:
self.requires("lz4/1.9.4")
if self.options.with_xz:
Expand All @@ -69,9 +75,14 @@ def requirements(self):
def validate(self):
if self.settings.os != "Linux":
raise ConanInvalidConfiguration("Only Linux supported")
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if Version(self.version) >= "255.0" and minimum_version and Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"{self.ref} requires {str(self.settings.compiler)} >= {minimum_version}."
)

def build_requirements(self):
self.tool_requires("meson/1.3.0")
self.tool_requires("meson/1.4.0")
self.tool_requires("m4/1.4.19")
self.tool_requires("gperf/3.1")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
Expand Down Expand Up @@ -134,14 +145,10 @@ def generate(self):
"libiptc", "elfutils", "repart", "homed", "importd", "acl",
"dns-over-tls", "log-trace"]

if Version(self.version) >= "247.1":
unrelated.append("oomd")
if Version(self.version) >= "248.1":
unrelated.extend(["sysext", "nscd"])
if Version(self.version) >= "251.1":
unrelated.append("link-boot-shared")
if Version(self.version) >= "252.1":
unrelated.append("link-journalctl-shared")
unrelated.append("oomd")
unrelated.extend(["sysext", "nscd"])
unrelated.append("link-boot-shared")
unrelated.append("link-journalctl-shared")
if Version(self.version) < "254.7":
unrelated.extend(["gnu-efi", "valgrind"])
else:
Expand All @@ -150,9 +157,10 @@ def generate(self):
for opt in unrelated:
tc.project_options[opt] = "false"

# 'rootprefix' is unused during libsystemd packaging but systemd > v247
# build files require 'prefix' to be a subdirectory of 'rootprefix'.
tc.project_options["rootprefix"] = self.package_folder
if Version(self.version) < "255":
# 'rootprefix' is unused during libsystemd packaging but systemd > v247
# build files require 'prefix' to be a subdirectory of 'rootprefix'.
tc.project_options["rootprefix"] = "/" # Since, Conan 1.64

# There are a few places in libsystemd where pkgconfig dependencies are
# not used in compile time and only used in link time. And because of
Expand Down

This file was deleted.

Loading
Loading