Hi Michael,
On 16/06/2022 12:45, Michael Tremer wrote:
Hello Adolf,
I ran into those problems too when I packaged the first bunch of rust packages.
The problem is, that cargo cannot easily differentiate what dependencies it actually needs. Developers of those crates can list certain dependencies for only certain platforms (e.g. Windows), and those will only be built on those platforms then. However, they still need to be all present on all systems - even though they are not being built.
Not the best design, but probably okay for everyone who downloads those packages live using cargo.
What I have done in those cases is just remove those dependencies manually:
https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/patches/rust-dirs-1.0.... https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/patches/rust-getrandom... https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/patches/rust-home-0.5....
There are lots more in src/patches.
And this is the only way to avoid packaging stuff that will never and can never be used on IPFire.
Hope this helps.
That indeed helped. I now know how to get rid of them. Have created the patch to exclude winapi which will stop the need for the other winapi files. The build is running now.
I think I am now close to being able to release the updated python3-cryptography. Thanks very much for the help. I have learnt a lot with this.
Regards,
Adolf.
-Michael
On 15 Jun 2022, at 21:02, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
I added the rust-indoc and rust-paste packages as explicitly defined versions to deal with the requirement for an older version. After another couple of changes I have been able to get python3-cryptography to build successfully.
However, the build ended up requiring three packages that seem totally redundant to me as they are related to windows but I can't figure out how to eliminate them. Do these have to stay being included or is there a way to stop them being required.
The packages are:-
rust-winapi rust-winapi-i686-pc-windows-gnu rust-winapi-x86_64-pc-windows-gnu
Regards,
Adolf
On 03/05/2022 23:02, Adolf Belka wrote:
Hi Michael,
On 03/05/2022 12:32, Michael Tremer wrote:
Hello Adolf,
It looks like it is looking for a Rust package called asn1.
You can create this in a very simple way by running:
tools/download-rust-crate asn1
That will create a new LFS file for this package and automatically download any sources. You will only need to add this to make.sh and build it.
That is a very nice script. Worked very well.
You might need some further dependencies later on.
That is an understatement. I am at the stage where python3-cryptography has required asn1, ouroboros and pem and each of then has had additional dependencies. so I have reached an additional 20 new rust packages. 5 of those had to be separately re-downloaded as specific versions were required and not the latest version.
Then python3-cryptography indicated that a newer rust-pyo3 was required but not the most up to date version. I added that version in and then rust-pyo3 flagged up that the requirement was for indoc to be at version 0.3.6 but the currently installed version is 1.0.3. That would mean reverting indoc to a much older version than the one already installed and running. The log file for this is below.
I am not sure what to do now.
Regards, Adolf.
Building rust-pyo3 log
May 3 17:30:37: Building rust-pyo3 pyo3-0.15.1.tar.gz checksum OK
- cd /usr/src/lfs
- make -f rust-pyo3 LFS_BASEDIR=/usr/src install
====================================== Installing pyo3-0.15.1 ... Install started; saving file list to /usr/src/lsalr ... cd /usr/src/pyo3-0.15.1 && mkdir -p /usr/src/pyo3-0.15.1/.cargo && echo "${CARGO_CONFIG}" > /usr/src/pyo3-0.15.1/.cargo/config && rm -f Cargo.lock cd /usr/src/pyo3-0.15.1 && CARGOPATH=/usr/src/pyo3-0.15.1/.cargo RUSTC_BOOTSTRAP=1 cargo --offline build --release -Z avoid-dev-deps -j6 error: failed to select a version for the requirement `indoc = "^0.3.6"` candidate versions found which didn't match: 1.0.3 location searched: directory source `/usr/share/cargo/registry` (which is replacing registry `crates-io`) required by package `pyo3 v0.15.1 (/usr/src/pyo3-0.15.1)` perhaps a crate was updated and forgotten to be re-vendored? As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag. make: *** [rust-pyo3:77: /usr/src/log/pyo3-0.15.1] Error 101
-Michael
On 10 Apr 2022, at 12:32, Adolf Belka adolf.belka@ipfire.org wrote:
Hi All,
I have gone through and updated all python3 modules that I found with a new version. Everything built fine except for python3-cryptography.
I have gone through the log info and it seems to me, but I might be wrong, that wants pyasnl1 but it seems to be looking for asnl1.
However I have not been able to figure out where it should be changed to correct this, if my interpretation is even right.
I would appreciate any guidance/suggestions of what to look for.
Log feedback for the build of cryptography is attached below.
Regards,
Adolf. <_build.ipfire.log>