-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
libzmq: modernize and deprecate @:4.3.2
#40399
base: develop
Are you sure you want to change the base?
libzmq: modernize and deprecate @:4.3.2
#40399
Conversation
@:4.3.2
@:4.3.2
# @:4.0 legacy release 2016 (http://wiki.zeromq.org/intro:get-the-software), | ||
# http://download.zeromq.org/zeromq-4.0.7.tar.gz -> 503 Service Unavailable | ||
|
||
def deprecated(*values, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you just use version(..., deprecated=True) please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would make the line hit the length limit and reformat each version into a 5-line beast hurting readability a lot, unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you feel about adding it as an official DSL helper? e.g.
--- a/lib/spack/spack/directives.py
+++ b/lib/spack/spack/directives.py
@@ -25,7 +25,7 @@ class OpenMpi(Package):
* ``provides``
* ``resource``
* ``variant``
- * ``version``
+ * ``version`` (``deprecated``)
* ``requires``
"""
@@ -70,6 +70,7 @@ class OpenMpi(Package):
"resource",
"build_system",
"requires",
+ "deprecated",
]
#: These are variant names used by Spack internally; packages can't use them
@@ -77,7 +78,7 @@ class OpenMpi(Package):
#: Names of possible directives. This list is mostly populated using the @directive decorator.
#: Some directives leverage others and in that case are not automatically added.
-directive_names = ["build_system"]
+directive_names = ["build_system", "deprecated"]
_patch_order_index = 0
@@ -490,6 +491,15 @@ def _depends_on(pkg, spec, when=None, type=dt.DEFAULT_TYPES, patches=None):
execute_patch(dependency)
+def deprecated(*values, **kwargs):
+ """Helper to declare a deprecated version
+
+ which fits into a single line for the standard case
+ """
+ kwargs["deprecated"] = True
+ return version(*values, **kwargs)
+
+
@directive("conflicts")
def conflicts(conflict_spec, when=None, msg=None):
"""Allows a package to define a conflict.
--- a/var/spack/repos/builtin/packages/libzmq/package.py
+++ b/var/spack/repos/builtin/packages/libzmq/package.py
@@ -46,10 +46,6 @@ def url_for_version(self, ver):
# @:4.0 legacy release 2016 (http://wiki.zeromq.org/intro:get-the-software),
# http://download.zeromq.org/zeromq-4.0.7.tar.gz -> 503 Service Unavailable
- def deprecated(*values, **kwargs):
- kwargs["deprecated"] = True
- return version(*values, **kwargs)
-
deprecated("4.3.2", sha256="ebd7b5c830d6428956b67a0454a7f8cbed1de74b3b01e5c33c5378e22740f763")
deprecated("4.3.1", sha256="bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb")
deprecated("4.3.0", sha256="8e9c3af6dc5a8540b356697081303be392ade3f014615028b3c896d0148397fd")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just keep it declarative instead of inventing package specific ad-hoc syntax. #39964 should improve this in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#39964 should improve this in the future.
Alright, removed the helper. (I mistakenly pushed the wrong branch in between, sry for the noise)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applied now the new context manager
|
||
class AutotoolsBuilder(autotools.AutotoolsBuilder): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the point if there's just one build system? can you just leave it if it's irrelevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other packages with only a single build system using this new API (mesa, lua-luafilesystem, glvis) from which I inferred it is the new API to be used?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyways, removed it.
maintainers("dennisklein") | ||
|
||
conflicts("%gcc@8:", when="@:4.2.2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
versions usually go first, can you leave that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved them down again just above the depends_on
s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
87e63f8
to
32c46d6
Compare
32c46d6
to
6c7b2e1
Compare
9f806bc
to
eb899a4
Compare
eb899a4
to
dce9447
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
I have one question (in as an inline comment).
c4ea28d
to
2961b7b
Compare
Also remove unused `url`.
Policy: https://spack.readthedocs.io/en/latest/packaging_guide.html#deprecating-old-versions Version Deprecation Reason ======= =============================================================================== @:4.3.2 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13132, https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15166, https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-36400, https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-20234, https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-20235, https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-20236, https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-20237, poor modern compiler support, see conflicts @:4.3.1 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6250 @:4.2 legacy release 2018 (https://github.com/zeromq/libzmq/releases/tag/v4.2.5) @:4.1 legacy release 2016 (http://wiki.zeromq.org/intro:get-the-software), http://download.zeromq.org/zeromq-4.1.4.tar.gz -> 503 Service Unavailable @:4.0 legacy release 2016 (http://wiki.zeromq.org/intro:get-the-software), http://download.zeromq.org/zeromq-4.0.7.tar.gz -> 503 Service Unavailable
When building from dist tarballs, docs come pre-compiled, so no extra dependency is needed. On builds from a git working tree `libzmq` actually used to depend on `asciidoc` and `xmlto` which was recently modernized to `ruby-asciidoctor`, see zeromq/libzmq#4607
2961b7b
to
7bfa65a
Compare
rebased because the recipe now depends on #39964 which was only merged few days ago. |
hmm, https://gitlab.spack.io/spack/spack/-/jobs/9044690 failed with:
a bit further up in the log one can see
which explains the failed check: the lib directory is called |
I see three solutions: A. Do not hardcode the sanity_check_is_file = [
join_path("include", "zmq.h"),
join_path("lib", "libzmq.so"),
join_path("lib", "pkgconfig", "libzmq.pc"),
] However, not sure, if spack has (or wants to have) any knowledge about those paths? B. Force the build system to always install to C. Not use those sanity checks. However, one of them already has proven useful when upstream modernized their documentation target. So, I'd rather keep those. |
8df9143
to
97662d8
Compare
97662d8
to
c966f12
Compare
Spacks test suite has shown that on some CRAY SLES system the install tree directories may change, e.g. `lib` becomes `lib64` which then breaks the sanity file checks.
c966f12
to
074f74d
Compare
ping? |
What is the preferred way to move this forward (besides rebasing)? Shall I split it into smaller PRs? Are you opposing any proposed changes I should drop (in other words, are there parts of this PR which are good enough for merging)? |
I have grepped the builtin repo for
libzmq
dependents and did not find any conflicts with the proposed deprecation.Note, the libzmq v4.3.3 release is already three years old.