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

add libsystemd dependency to grpc #22436

Merged

Conversation

AndreyMlashkin
Copy link
Contributor

@AndreyMlashkin AndreyMlashkin commented Jan 19, 2024

Specify library name and version: grpc/all


@AndreyMlashkin
Copy link
Contributor Author

implements #21253

@conan-center-bot

This comment has been minimized.

@AndreyMlashkin
Copy link
Contributor Author

@uilianries @SSE4 please approve

@@ -97,6 +97,7 @@ def requirements(self):
self.requires("re2/20230301")
self.requires("zlib/[>=1.2.11 <2]")
self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True, run=can_run(self))
self.requires("libsystemd/255")
Copy link
Contributor

@Nekto89 Nekto89 Jan 19, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor

@Nekto89 Nekto89 Jan 19, 2024

Choose a reason for hiding this comment

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

libsystemd is available only on Linux, so with this change grpc can't be built on Windows/Macos

Copy link
Contributor Author

@AndreyMlashkin AndreyMlashkin Jan 19, 2024

Choose a reason for hiding this comment

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

valid point. Thanks for saving CI time :)

@AndreyMlashkin AndreyMlashkin force-pushed the grpc/add-libsystemd-dependency branch from e31e8e0 to 1ebbc37 Compare January 19, 2024 13:00
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@bhutch29
Copy link

Running into this myself today, thanks for the PR. However, the "libsystemd/255" conan package appears to require conan v1.60. Not sure if it is appropriate to add that as an explicit check in this project so it is more clear to consumers?

The root cause is that libsystemd/255 fails to import "move_folder_contents", a 1.60.0 feature.

ERROR: libsystemd/255: Cannot load recipe.
Error loading conanfile at '/home/bhutch/.conan/data/libsystemd/255/_/_/export/conanfile.py': Unable to load conanfile in /home/bhutch/.conan/data/libsystemd/255/_/_/export/conanfile.py
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/imp.py", line 172, in load_source
    module = _load(spec)
             ^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 721, in _load
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/bhutch/.conan/data/libsystemd/255/_/_/export/conanfile.py", line 8, in <module>
    from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, replace_in_file, download, move_folder_contents
ImportError: cannot import name 'move_folder_contents' from 'conan.tools.files' (/home/bhutch/.local/lib/python3.11/site-packages/conan/tools/files/__init__.py)```

@valgur
Copy link
Contributor

valgur commented Jan 19, 2024

Thanks for mentioning this, @bhutch29. I added a PR to fix this in the original recipe #22447.

@bhutch29
Copy link

Is there documentation anywhere for pulling down this repository and doing something like "export-pkg" locally so I can test out this PR? I have cloned the repo but I am getting weird errors when attempting to install/build/export-pkg the grpc recipe, I am hoping that there is just a step I am missing.

I am not 100% sure, but it seems like these are recipes but they don't have the original sources? So that's why I can't build/export them locally?

@valgur
Copy link
Contributor

valgur commented Jan 19, 2024

@bhutch29 Doing conan create . --version <version> in the directory with the conanfile.py builds the recipe and stores it in the Conan cache under ~/.conan2/p/b. After that, the version in the cache will get used instead a version from ConanCenter for that package+version combination.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

@juansblanco juansblanco left a comment

Choose a reason for hiding this comment

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

Hi! Thanks a lot for your contribution, we appreciate it.

recipes/grpc/all/conanfile.py Outdated Show resolved Hide resolved
@juansblanco juansblanco self-assigned this Jan 22, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

recipes/grpc/all/conanfile.py Outdated Show resolved Hide resolved
@CLAassistant
Copy link

CLAassistant commented Jan 23, 2024

CLA assistant check
All committers have signed the CLA.

@AndreyMlashkin
Copy link
Contributor Author

@juansblanco, thank you!

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 11 (feea3c1662c78c6a62a620bff8b922529bfe08aa):

  • grpc/1.48.4:
    All packages built successfully! (All logs)

  • grpc/1.54.3:
    All packages built successfully! (All logs)

  • grpc/1.50.1:
    All packages built successfully! (All logs)

  • grpc/1.50.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 12 (feea3c1662c78c6a62a620bff8b922529bfe08aa):

  • grpc/1.54.3:
    All packages built successfully! (All logs)

  • grpc/1.50.1:
    All packages built successfully! (All logs)

  • grpc/1.50.0:
    All packages built successfully! (All logs)

  • grpc/1.48.4:
    All packages built successfully! (All logs)

@AndreyMlashkin
Copy link
Contributor Author

@uilianries @SSE4 please review

@conan-center-bot conan-center-bot merged commit 0f0eb47 into conan-io:master Jan 24, 2024
28 checks 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.

9 participants