-
Notifications
You must be signed in to change notification settings - Fork 658
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
fix importlib-metadata dependency #1748
fix importlib-metadata dependency #1748
Conversation
Can one of the admins verify this patch? |
Thanks @mgmgwi. @udosson, @pSchlarb, this PR is relying on the fact that |
Hm since version setting is also commented in plenum, i see no problem with that so far. |
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.
@mgmgwi thanks for the PR and spotting the issue.
Could you please make the small change?
@@ -33,6 +33,7 @@ if [ "$distro_packages" = "debian-packages" ]; then | |||
echo -e "\nAdapt the dependencies for the Canonical archive" | |||
sed -i "s~timeout-decorator~python3-timeout-decorator~" setup.py | |||
sed -i "s~distro~python3-distro~" setup.py | |||
sed -i "s~importlib-metadata~python3-importlib-metadata~" setup.py |
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.
@mgmgwi could you remove this line?
We don't use python3-importlib-metadata
from the Canonica archive because python3-importlib-metadata
is still at version 1.5.0-1
there (https://packages.ubuntu.com/focal/python3-importlib-metadata)
We build the Debian package based on the PyPi packages of python3-importlib-metadata
, publish it to Hyperledger's Artifactory and pull the artifact from there.
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.
Hmm, the problem is, that the .deb package contains a reference to importlib-metadata
which we have to replace or remove. If not here, where then?
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.
The dependencies are taken from setup.py
. importlib-metadata==3.10.1
is referenced there already.
When installing the Debian package of Indy-Node dpgk
looks for python3-importlib-metadata==3.10.1
which will be pulled from here https://hyperledger.jfrog.io/ui/native/indy/pool/focal/dev/i/importlib-metadata/
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.
🤔 are you sure? I think it will look for importlib-metadata=3.10.1
(missing the python3-
prefix) which still does not exists. I tried manually patching the control file in the .deb package like this:
Package: indy-node
Version: 1.13.0~dev24
License: Apache 2.0
Vendor: none
Architecture: amd64
Maintainer: Hyperledger <hyperledger-indy@lists.hyperledger.org>
Installed-Size: 2807
Depends: indy-plenum (= 1.13.0~dev14), importlib-metadata (= 3.10.1), python3-timeout-decorator (>= 0.5.0), python3-distro (>= 1.5.0), at, iptables, libsodium23
Section: default
Priority: extra
Homepage: https://github.com/hyperledger/indy-node
Description: Indy node
Please note the Depends
line. Then I repackaged it, but when I install it with apt install /tmp/indy-node_1.13.0_dev24-patched2_amd64.deb
it still complains:
The following packages have unmet dependencies:
indy-node : Depends: importlib-metadata (= 3.10.1) but it is not installable
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.
I'm quite sure but I cannot verify before Tuesday.
We use fpm
to build the Debian artifacts with the following flag --python-package-name-prefix "python3"
All install_requires
(https://github.com/hyperledger/indy-node/blob/ubuntu-20.04-upgrade/setup.py#L58) packages will be converted to python3-package_name
. In our case python3-importlib-metadata
Therefore we publish the third-party dependencies with the python3
prefix. And in case we use the artifacts from the canonical archive we adjust them to the correct build version. An example for Indy Plenum can be found here for Ubuntu 16.04.
We removed the override with sed
for Ubuntu 20.04 because we try to not pin versions anymore.
@WadeBarnes @pSchlarb Do you think we can remove this? https://github.com/hyperledger/indy-node/blob/ubuntu-20.04-upgrade/build-scripts/ubuntu-2004/prepare-package.sh#L34
I'd rather add the comment to |
c7fa709
to
fa686a7
Compare
I removed the sed replacement in build-scripts/ubuntu-2004/prepare-package.sh#L34 as requested by @udosson in the comment above. |
fa686a7
to
c7ac8e0
Compare
@mgmgwi - thank you for the changes. I'll test the build and install process on Tuesday and will merge after the successful testing. |
c7ac8e0
to
af29e5e
Compare
I talked with @udosson and for now, we have to add the |
- use sed to replace package name prefix - pinned importlib-metadata to 3.10.1 in setup.py Signed-off-by: mgmgwi <guido.wischrop@mgm-tp.com>
af29e5e
to
9244e1f
Compare
Thanks for adjusting the PR according to our discussion, @mgmgwi We need to at the |
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.
LGMT. Thanks, @mgmgwi
Perhaps an oversight. |
This should fix the wrong dependency in the indy-node .deb package.
Signed-off-by: mgmgwi guido.wischrop@mgm-tp.com