From 34f0a367e9a5cf22c4f057f7c64a043a7bff77d7 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 10 Oct 2023 16:39:44 -0500 Subject: [PATCH 1/8] libmount: Add version 2.40, use Meson --- recipes/libmount/config.yml | 2 + recipes/libmount/meson/conandata.yml | 8 ++ recipes/libmount/meson/conanfile.py | 105 ++++++++++++++++++ ...-blkzone-and-blkpr-if-the-required-l.patch | 75 +++++++++++++ ...d569049ac48a3867a59537cea769fa319e8f.patch | 32 ++++++ .../meson/test_package/CMakeLists.txt | 7 ++ .../libmount/meson/test_package/conanfile.py | 26 +++++ .../meson/test_package/test_package.c | 16 +++ 8 files changed, 271 insertions(+) create mode 100644 recipes/libmount/meson/conandata.yml create mode 100644 recipes/libmount/meson/conanfile.py create mode 100644 recipes/libmount/meson/patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch create mode 100644 recipes/libmount/meson/patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch create mode 100644 recipes/libmount/meson/test_package/CMakeLists.txt create mode 100644 recipes/libmount/meson/test_package/conanfile.py create mode 100644 recipes/libmount/meson/test_package/test_package.c diff --git a/recipes/libmount/config.yml b/recipes/libmount/config.yml index 867141253ca23..40f9f0f053f45 100644 --- a/recipes/libmount/config.yml +++ b/recipes/libmount/config.yml @@ -1,4 +1,6 @@ versions: + "2.40-rc2": + folder: meson "2.39.2": folder: all "2.39": diff --git a/recipes/libmount/meson/conandata.yml b/recipes/libmount/meson/conandata.yml new file mode 100644 index 0000000000000..662d1e106ef27 --- /dev/null +++ b/recipes/libmount/meson/conandata.yml @@ -0,0 +1,8 @@ +sources: + "2.40-rc2": + url: "https://github.com/util-linux/util-linux/archive/refs/tags/v2.40-rc2.tar.gz" + sha256: "0fdf4a47eb415639cfcdf2ca4cb76919ca971dc173ce5bb034857a77188a7c27" +patches: + "2.40-rc2": + - patch_file: "patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch" + - patch_file: "patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch" diff --git a/recipes/libmount/meson/conanfile.py b/recipes/libmount/meson/conanfile.py new file mode 100644 index 0000000000000..b61d348531815 --- /dev/null +++ b/recipes/libmount/meson/conanfile.py @@ -0,0 +1,105 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +import os + +required_conan_version = ">=1.53.0" + + +class LibmountConan(ConanFile): + name = "libmount" + description = ( + "The libmount library is used to parse /etc/fstab, /etc/mtab and " + "/proc/self/mountinfo files, manage the mtab file, evaluate mount options, etc" + ) + topics = ("mount", "linux", "util-linux") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" + license = "LGPL-2.1-or-later" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.os != "Linux": + raise ConanInvalidConfiguration(f"{self.ref} only supports Linux") + + def build_requirements(self): + self.tool_requires("bison/3.8.2") + self.tool_requires("flex/2.6.4") + self.tool_requires("meson/1.3.2") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = MesonToolchain(self) + tc.project_options["auto_features"] = "disabled" + tc.project_options["build-libblkid"] = "enabled" + tc.project_options["build-libmount"] = "enabled" + # Enable libutil for older versions of glibc which still provide an actual libutil library. + tc.project_options["libutil"] = "enabled" + tc.project_options["program-tests"] = False + tc.generate() + virtual_build_env = VirtualBuildEnv(self) + virtual_build_env.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + # Disable translations. + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "subdir('po')", "#subdir('po')") + # Disable tests for libmount. + replace_in_file(self, os.path.join(self.source_folder, "libmount", "meson.build"), "foreach libmount_test: libmount_tests", "foreach libmount_test: []") + + def build(self): + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING", os.path.join(self.source_folder, "libmount"), os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING.LGPL-2.1-or-later", os.path.join(self.source_folder, "Documentation", "licenses"), os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "sbin")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "usr")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + # util-linux always builds both the shared and static libraries of libblkid, so delete the one that isn't needed. + rm(self, "libblkid.a" if self.options.shared else "libblkid.so*", os.path.join(self.package_folder, "lib")) + + def package_info(self): + self.cpp_info.components["libblkid"].libs = ["blkid"] + self.cpp_info.components["libblkid"].set_property("pkg_config_name", "blkid") + + self.cpp_info.components["libmount"].libs = ["mount"] + self.cpp_info.components["libmount"].system_libs = ["rt"] + self.cpp_info.components["libmount"].includedirs.append(os.path.join("include", "libmount")) + self.cpp_info.components["libmount"].set_property("pkg_config_name", "mount") + self.cpp_info.components["libmount"].requires = ["libblkid"] diff --git a/recipes/libmount/meson/patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch b/recipes/libmount/meson/patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch new file mode 100644 index 0000000000000..fcb85b42e0177 --- /dev/null +++ b/recipes/libmount/meson/patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch @@ -0,0 +1,75 @@ +From 360814e853ea39aa3827e99b5581aecb483ce476 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 20 Mar 2024 11:41:49 -0500 +Subject: [PATCH] meson: Only build blkzone and blkpr if the required linux + header exists + +Checks for the required headers for blkzone and blkptr are done for + Autotools. +This logic wasn't carried over to Meson. +This PR just adds the same checks. + +Fixes #2850. + +Signed-off-by: Jordan Williams +--- + meson.build | 42 +++++++++++++++++++++++------------------- + 1 file changed, 23 insertions(+), 19 deletions(-) + +diff --git a/meson.build b/meson.build +index b6efc4220..a7b8e1d25 100644 +--- a/meson.build ++++ b/meson.build +@@ -1556,26 +1556,30 @@ exes += exe + manadocs += ['sys-utils/blkdiscard.8.adoc'] + bashcompletions += ['blkdiscard'] + +-exe = executable( +- 'blkzone', +- blkzone_sources, +- include_directories : includes, +- link_with : [lib_common], +- install_dir : sbindir, +- install : true) +-exes += exe +-manadocs += ['sys-utils/blkzone.8.adoc'] +-bashcompletions += ['blkzone'] ++if cc.has_header('linux/blkzoned.h') ++ exe = executable( ++ 'blkzone', ++ blkzone_sources, ++ include_directories : includes, ++ link_with : [lib_common], ++ install_dir : sbindir, ++ install : true) ++ exes += exe ++ manadocs += ['sys-utils/blkzone.8.adoc'] ++ bashcompletions += ['blkzone'] ++endif + +-exe = executable( +- 'blkpr', +- blkpr_sources, +- include_directories : includes, +- link_with : [lib_common], +- install_dir : sbindir, +- install : true) +-exes += exe +-manadocs += ['sys-utils/blkpr.8.adoc'] ++if cc.has_header('linux/pr.h') ++ exe = executable( ++ 'blkpr', ++ blkpr_sources, ++ include_directories : includes, ++ link_with : [lib_common], ++ install_dir : sbindir, ++ install : true) ++ exes += exe ++ manadocs += ['sys-utils/blkpr.8.adoc'] ++endif + + exe = executable( + 'ldattach', +-- +2.44.0 + diff --git a/recipes/libmount/meson/patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch b/recipes/libmount/meson/patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch new file mode 100644 index 0000000000000..65a72094f1799 --- /dev/null +++ b/recipes/libmount/meson/patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch @@ -0,0 +1,32 @@ +From 4ebdd569049ac48a3867a59537cea769fa319e8f Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 20 Mar 2024 15:03:05 +0100 +Subject: [PATCH] lib/sha1: fix for old glibc + +Fixes: https://github.com/util-linux/util-linux/issues/2830 +References: http://github.com/util-linux/util-linux/commit/a8902e4cdd6149e5124383b25db8688dcdacd790 +Signed-off-by: Karel Zak +--- + lib/sha1.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/sha1.c b/lib/sha1.c +index 32ef5b9ca9..3edff122c4 100644 +--- a/lib/sha1.c ++++ b/lib/sha1.c +@@ -156,11 +156,15 @@ void ul_SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) + state[3] += d; + state[4] += e; + /* Wipe variables */ ++#ifdef HAVE_EXPLICIT_BZERO + explicit_bzero(&a, sizeof(a)); + explicit_bzero(&b, sizeof(b)); + explicit_bzero(&c, sizeof(c)); + explicit_bzero(&d, sizeof(d)); + explicit_bzero(&e, sizeof(e)); ++#else ++ a = b = c = d = e = 0; ++#endif + #ifdef UL_SHA1HANDSOFF + memset(block, '\0', sizeof(block)); + #endif diff --git a/recipes/libmount/meson/test_package/CMakeLists.txt b/recipes/libmount/meson/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..4b97a71d1061a --- /dev/null +++ b/recipes/libmount/meson/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(libmount REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libmount::libmount) diff --git a/recipes/libmount/meson/test_package/conanfile.py b/recipes/libmount/meson/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/libmount/meson/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libmount/meson/test_package/test_package.c b/recipes/libmount/meson/test_package/test_package.c new file mode 100644 index 0000000000000..d4e4d653742e8 --- /dev/null +++ b/recipes/libmount/meson/test_package/test_package.c @@ -0,0 +1,16 @@ +#include + +#include +#include + +int main() +{ + struct libmnt_context *ctx = mnt_new_context(); + if (!ctx) { + printf("failed to initialize libmount\n"); + return EXIT_FAILURE; + } + printf("path to fstab: %s", mnt_get_fstab_path()); + mnt_free_context(ctx); + return EXIT_SUCCESS; +} From f1d8fa1745897216bf645f31d49db3f4bb28e13f Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 26 Mar 2024 07:19:10 -0500 Subject: [PATCH 2/8] Remove change to disable translations --- recipes/libmount/meson/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/libmount/meson/conanfile.py b/recipes/libmount/meson/conanfile.py index b61d348531815..4509e458a3ef9 100644 --- a/recipes/libmount/meson/conanfile.py +++ b/recipes/libmount/meson/conanfile.py @@ -70,8 +70,6 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - # Disable translations. - replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "subdir('po')", "#subdir('po')") # Disable tests for libmount. replace_in_file(self, os.path.join(self.source_folder, "libmount", "meson.build"), "foreach libmount_test: libmount_tests", "foreach libmount_test: []") From 47600caa35f500aa097fbee8f0b41d754dd50f58 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Fri, 29 Mar 2024 08:42:10 -0500 Subject: [PATCH 3/8] Update for the 2.40 release --- recipes/libmount/config.yml | 2 +- recipes/libmount/meson/conandata.yml | 12 ++- ...-blkzone-and-blkpr-if-the-required-l.patch | 75 ------------------- ...d569049ac48a3867a59537cea769fa319e8f.patch | 32 -------- 4 files changed, 6 insertions(+), 115 deletions(-) delete mode 100644 recipes/libmount/meson/patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch delete mode 100644 recipes/libmount/meson/patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch diff --git a/recipes/libmount/config.yml b/recipes/libmount/config.yml index 40f9f0f053f45..26dae8f7a5fea 100644 --- a/recipes/libmount/config.yml +++ b/recipes/libmount/config.yml @@ -1,5 +1,5 @@ versions: - "2.40-rc2": + "2.40": folder: meson "2.39.2": folder: all diff --git a/recipes/libmount/meson/conandata.yml b/recipes/libmount/meson/conandata.yml index 662d1e106ef27..2ce79a8acb4d6 100644 --- a/recipes/libmount/meson/conandata.yml +++ b/recipes/libmount/meson/conandata.yml @@ -1,8 +1,6 @@ sources: - "2.40-rc2": - url: "https://github.com/util-linux/util-linux/archive/refs/tags/v2.40-rc2.tar.gz" - sha256: "0fdf4a47eb415639cfcdf2ca4cb76919ca971dc173ce5bb034857a77188a7c27" -patches: - "2.40-rc2": - - patch_file: "patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch" - - patch_file: "patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch" + "2.40": + # Official release tarball is missing meson.build files, so use GitHub archive. + # Refer to https://github.com/util-linux/util-linux/issues/2875. + url: "https://github.com/util-linux/util-linux/archive/refs/tags/v2.40.tar.gz" + sha256: "f7ff8573289313e38ee3378cbc2938f34444a8cb546e1236e46151834be69784" diff --git a/recipes/libmount/meson/patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch b/recipes/libmount/meson/patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch deleted file mode 100644 index fcb85b42e0177..0000000000000 --- a/recipes/libmount/meson/patches/0001-meson-Only-build-blkzone-and-blkpr-if-the-required-l.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 360814e853ea39aa3827e99b5581aecb483ce476 Mon Sep 17 00:00:00 2001 -From: Jordan Williams -Date: Wed, 20 Mar 2024 11:41:49 -0500 -Subject: [PATCH] meson: Only build blkzone and blkpr if the required linux - header exists - -Checks for the required headers for blkzone and blkptr are done for - Autotools. -This logic wasn't carried over to Meson. -This PR just adds the same checks. - -Fixes #2850. - -Signed-off-by: Jordan Williams ---- - meson.build | 42 +++++++++++++++++++++++------------------- - 1 file changed, 23 insertions(+), 19 deletions(-) - -diff --git a/meson.build b/meson.build -index b6efc4220..a7b8e1d25 100644 ---- a/meson.build -+++ b/meson.build -@@ -1556,26 +1556,30 @@ exes += exe - manadocs += ['sys-utils/blkdiscard.8.adoc'] - bashcompletions += ['blkdiscard'] - --exe = executable( -- 'blkzone', -- blkzone_sources, -- include_directories : includes, -- link_with : [lib_common], -- install_dir : sbindir, -- install : true) --exes += exe --manadocs += ['sys-utils/blkzone.8.adoc'] --bashcompletions += ['blkzone'] -+if cc.has_header('linux/blkzoned.h') -+ exe = executable( -+ 'blkzone', -+ blkzone_sources, -+ include_directories : includes, -+ link_with : [lib_common], -+ install_dir : sbindir, -+ install : true) -+ exes += exe -+ manadocs += ['sys-utils/blkzone.8.adoc'] -+ bashcompletions += ['blkzone'] -+endif - --exe = executable( -- 'blkpr', -- blkpr_sources, -- include_directories : includes, -- link_with : [lib_common], -- install_dir : sbindir, -- install : true) --exes += exe --manadocs += ['sys-utils/blkpr.8.adoc'] -+if cc.has_header('linux/pr.h') -+ exe = executable( -+ 'blkpr', -+ blkpr_sources, -+ include_directories : includes, -+ link_with : [lib_common], -+ install_dir : sbindir, -+ install : true) -+ exes += exe -+ manadocs += ['sys-utils/blkpr.8.adoc'] -+endif - - exe = executable( - 'ldattach', --- -2.44.0 - diff --git a/recipes/libmount/meson/patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch b/recipes/libmount/meson/patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch deleted file mode 100644 index 65a72094f1799..0000000000000 --- a/recipes/libmount/meson/patches/4ebdd569049ac48a3867a59537cea769fa319e8f.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4ebdd569049ac48a3867a59537cea769fa319e8f Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 20 Mar 2024 15:03:05 +0100 -Subject: [PATCH] lib/sha1: fix for old glibc - -Fixes: https://github.com/util-linux/util-linux/issues/2830 -References: http://github.com/util-linux/util-linux/commit/a8902e4cdd6149e5124383b25db8688dcdacd790 -Signed-off-by: Karel Zak ---- - lib/sha1.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/lib/sha1.c b/lib/sha1.c -index 32ef5b9ca9..3edff122c4 100644 ---- a/lib/sha1.c -+++ b/lib/sha1.c -@@ -156,11 +156,15 @@ void ul_SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) - state[3] += d; - state[4] += e; - /* Wipe variables */ -+#ifdef HAVE_EXPLICIT_BZERO - explicit_bzero(&a, sizeof(a)); - explicit_bzero(&b, sizeof(b)); - explicit_bzero(&c, sizeof(c)); - explicit_bzero(&d, sizeof(d)); - explicit_bzero(&e, sizeof(e)); -+#else -+ a = b = c = d = e = 0; -+#endif - #ifdef UL_SHA1HANDSOFF - memset(block, '\0', sizeof(block)); - #endif From 1c7e0aec15f84260079f151966a3365373b98d98 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Fri, 29 Mar 2024 10:44:59 -0500 Subject: [PATCH 4/8] Add patch to only require the crypt library when necessary --- recipes/libmount/meson/conandata.yml | 6 ++++ ...ire-the-crypt-library-when-necessary.patch | 33 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 recipes/libmount/meson/patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch diff --git a/recipes/libmount/meson/conandata.yml b/recipes/libmount/meson/conandata.yml index 2ce79a8acb4d6..17cc15d76b6c5 100644 --- a/recipes/libmount/meson/conandata.yml +++ b/recipes/libmount/meson/conandata.yml @@ -4,3 +4,9 @@ sources: # Refer to https://github.com/util-linux/util-linux/issues/2875. url: "https://github.com/util-linux/util-linux/archive/refs/tags/v2.40.tar.gz" sha256: "f7ff8573289313e38ee3378cbc2938f34444a8cb546e1236e46151834be69784" +patches: + "2.40": + - patch_file: "patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch" + patch_description: "Only require the crypt library when necessary" + patch_type: "portability" + patch_source: "https://github.com/util-linux/util-linux/pull/2877" diff --git a/recipes/libmount/meson/patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch b/recipes/libmount/meson/patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch new file mode 100644 index 0000000000000..13980f5392e6a --- /dev/null +++ b/recipes/libmount/meson/patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch @@ -0,0 +1,33 @@ +From f52903f43c091fd4487811ce948fbc67f341bf97 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Fri, 29 Mar 2024 10:31:27 -0500 +Subject: [PATCH] meson: Only require the crypt library when necessary + +The `crypt` library is only necessary for two executables. +These are build-newgrp and build-sulogin. +Don't otherwise require this dependency. + +Signed-off-by: Jordan Williams +--- + meson.build | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index bc335709d..a80f96460 100644 +--- a/meson.build ++++ b/meson.build +@@ -346,7 +346,10 @@ lib_udev = dependency( + required : get_option('systemd')) + conf.set('HAVE_LIBUDEV', lib_udev.found() ? 1 : false) + +-lib_crypt = cc.find_library('crypt') ++lib_crypt = cc.find_library('crypt', required : get_option('build-newgrp')) ++if not lib_crypt.found() ++ lib_crypt = cc.find_library('crypt', required : get_option('build-sulogin')) ++endif + + lib_pam = cc.find_library('pam', required : get_option('build-login')) + if not lib_pam.found() +-- +2.44.0 + From 6b08c209e843e4fe82db505d2200d79161930d8f Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 7 May 2024 09:22:14 -0500 Subject: [PATCH 5/8] Bump to version 2.40.1 --- recipes/libmount/config.yml | 2 +- recipes/libmount/meson/conandata.yml | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/recipes/libmount/config.yml b/recipes/libmount/config.yml index 26dae8f7a5fea..058f3e506645c 100644 --- a/recipes/libmount/config.yml +++ b/recipes/libmount/config.yml @@ -1,5 +1,5 @@ versions: - "2.40": + "2.40.1": folder: meson "2.39.2": folder: all diff --git a/recipes/libmount/meson/conandata.yml b/recipes/libmount/meson/conandata.yml index 17cc15d76b6c5..734f92e74cdb3 100644 --- a/recipes/libmount/meson/conandata.yml +++ b/recipes/libmount/meson/conandata.yml @@ -1,12 +1,4 @@ sources: - "2.40": - # Official release tarball is missing meson.build files, so use GitHub archive. - # Refer to https://github.com/util-linux/util-linux/issues/2875. - url: "https://github.com/util-linux/util-linux/archive/refs/tags/v2.40.tar.gz" - sha256: "f7ff8573289313e38ee3378cbc2938f34444a8cb546e1236e46151834be69784" -patches: - "2.40": - - patch_file: "patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch" - patch_description: "Only require the crypt library when necessary" - patch_type: "portability" - patch_source: "https://github.com/util-linux/util-linux/pull/2877" + "2.40.1": + url: "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.1.tar.xz" + sha256: "59e676aa53ccb44b6c39f0ffe01a8fa274891c91bef1474752fad92461def24f" From c6dcdd3cb83dde4f79f6dfdac64af357bc59ceac Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Sat, 8 Jun 2024 07:38:03 -0500 Subject: [PATCH 6/8] Remove lingering patch file --- ...ire-the-crypt-library-when-necessary.patch | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 recipes/libmount/meson/patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch diff --git a/recipes/libmount/meson/patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch b/recipes/libmount/meson/patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch deleted file mode 100644 index 13980f5392e6a..0000000000000 --- a/recipes/libmount/meson/patches/2.40-0001-meson-Only-require-the-crypt-library-when-necessary.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f52903f43c091fd4487811ce948fbc67f341bf97 Mon Sep 17 00:00:00 2001 -From: Jordan Williams -Date: Fri, 29 Mar 2024 10:31:27 -0500 -Subject: [PATCH] meson: Only require the crypt library when necessary - -The `crypt` library is only necessary for two executables. -These are build-newgrp and build-sulogin. -Don't otherwise require this dependency. - -Signed-off-by: Jordan Williams ---- - meson.build | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index bc335709d..a80f96460 100644 ---- a/meson.build -+++ b/meson.build -@@ -346,7 +346,10 @@ lib_udev = dependency( - required : get_option('systemd')) - conf.set('HAVE_LIBUDEV', lib_udev.found() ? 1 : false) - --lib_crypt = cc.find_library('crypt') -+lib_crypt = cc.find_library('crypt', required : get_option('build-newgrp')) -+if not lib_crypt.found() -+ lib_crypt = cc.find_library('crypt', required : get_option('build-sulogin')) -+endif - - lib_pam = cc.find_library('pam', required : get_option('build-login')) - if not lib_pam.found() --- -2.44.0 - From 58c61a2eaea02ebc9e3357ace37a0a4f2cd8dbc5 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Mon, 15 Jul 2024 07:42:35 -0500 Subject: [PATCH 7/8] Update libmount to version 2.40.2 --- recipes/libmount/config.yml | 2 +- recipes/libmount/meson/conandata.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/libmount/config.yml b/recipes/libmount/config.yml index 058f3e506645c..0bd7fd2cf95bf 100644 --- a/recipes/libmount/config.yml +++ b/recipes/libmount/config.yml @@ -1,5 +1,5 @@ versions: - "2.40.1": + "2.40.2": folder: meson "2.39.2": folder: all diff --git a/recipes/libmount/meson/conandata.yml b/recipes/libmount/meson/conandata.yml index 734f92e74cdb3..17e830c607209 100644 --- a/recipes/libmount/meson/conandata.yml +++ b/recipes/libmount/meson/conandata.yml @@ -1,4 +1,4 @@ sources: - "2.40.1": - url: "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.1.tar.xz" - sha256: "59e676aa53ccb44b6c39f0ffe01a8fa274891c91bef1474752fad92461def24f" + "2.40.2": + url: "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.2.tar.xz" + sha256: "d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3" From 23be7f3fabd1d8e41ef5cc7e5aedc7e260bb9138 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 10 Sep 2024 07:31:23 -0500 Subject: [PATCH 8/8] Update recipes/libmount/meson/conanfile.py Co-authored-by: Martin Valgur --- recipes/libmount/meson/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libmount/meson/conanfile.py b/recipes/libmount/meson/conanfile.py index 4509e458a3ef9..d10abba2c5af2 100644 --- a/recipes/libmount/meson/conanfile.py +++ b/recipes/libmount/meson/conanfile.py @@ -49,9 +49,9 @@ def validate(self): def build_requirements(self): self.tool_requires("bison/3.8.2") self.tool_requires("flex/2.6.4") - self.tool_requires("meson/1.3.2") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True)