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

New release? #516

Open
Sharparam opened this issue May 27, 2023 · 7 comments
Open

New release? #516

Sharparam opened this issue May 27, 2023 · 7 comments
Assignees

Comments

@Sharparam
Copy link

The AUR packages currently fail to build because the latest release (0.1.12) locks the openssl dependency to an ancient version that breaks with modern OpenSSL.

@murlakatamenka
Copy link

@Sharparam can I as a maintainer do anything to remedy it as of now?

Didn't investigate it for now, the first idea would be to see if patching helps. Also, there is pre-built intermodal-bin that I maintain as well.

@Sharparam
Copy link
Author

Sharparam commented Jun 12, 2023

Since the latest code on master builds fine, I think it will simply be solved if a new release is made with more up to date code. If it is ready for a new release that is.

A patch that updates some of the dependencies could probably work. I think the main issue is the pinned version of openssl-sys (0.9.58) (and maybe other related openssl packages/crates).

Edit to add: When checking out v0.1.12 and running cargo update before the build that also makes it work (which updates dependencies in the lockfile to the latest allowed as specified by Cargo.toml).

@atomgardner
Copy link
Collaborator

@Sharparam, this got fixed a while back when it broke the testing infra.

It looks like I can cut a new release on Github that captures the SSL update. I'll ping you once I've worked out all the details.

@atomgardner atomgardner self-assigned this Jul 25, 2023
@atomgardner
Copy link
Collaborator

@Sharparam, OK done. Let me know if I messed it up.

@Sharparam
Copy link
Author

@atomgardner The v0.1.13 tag seems to build fine for me.

When doing the same commands that the PKGBUILD does however, it fails on cargo run --package gen -- --bin target/release/imdl book --no-git with the following:

❯ cargo run --package gen -- --bin target/release/imdl book --no-git
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
warning: the following packages contain code that will be rejected by a future version of Rust: fs_extra v1.2.0, git2 v0.13.11, nom v5.1.2
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
     Running `target/debug/gen --bin target/release/imdl book --no-git`
error: Found argument '--no-git' which wasn't expected, or isn't valid in this context

USAGE:
    gen book [FLAGS]

For more information try --help

Has the options changed and --no-git now needs to be replaced with something else?

@Sharparam
Copy link
Author

Ah it was changed here: 61bbd3b

Updating to the new flag (--no-changelog) in the PKGBUILD makes it build and generate the package without error :)

However, the AUR package does not build in a clean chroot I discovered, for some reason.

The first issue is missing makedepends for libgit2 and libssh2, but even when I add those it still has an issue with libssh2 for some reason.

The build complains about an undefined reference to libssh2_exit. I have no idea what that's about though, because it's the same libssh2 being used inside the chroot as outside...

Here's a gist with the build log and the updated PKGBUILD I'm using: https://gist.github.com/Sharparam/f3e32112753d3846f0c8fea6af349909

In both log files, cargo is run as such: cargo build -vv --release --locked ("very verbose" mode).

I'm afraid I'm stumped, do either of you have any ideas? @atomgardner @murlakatamenka

@Sharparam
Copy link
Author

Sharparam commented Aug 11, 2023

After much digging, I found this comment: aurutils/aurutils#891 (comment)

Which mentions that the "lto" function apparently breaks something for some Rust projects, at least when built in chroot.

As the comment mentions, adding options=(!lto) to the PKGBUILD makes intermodal build just fine in the chroot.

Update: LTO seems to only be enabled by default when aurutils does the build, when I build manually with makepkg it's not enabled, and forcing it with options=(lto) makes the non-chroot build fail with the same error. Something to do with Arch devtools apparently, which enables LTO by default and which I think aurutils uses.

@murlakatamenka Here's a diff with all the changes I made to the PKGBUILD to make it work:

diff --git a/PKGBUILD b/PKGBUILD
index 6b37f5d..57ffd3a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,17 @@
 # Maintainer: Sergey A. <[email protected]>
 
 pkgname=intermodal
-pkgver=0.1.12
+pkgver=0.1.13
 pkgrel=2
 pkgdesc="User-friendly and featureful CLI BitTorrent metainfo utility, written in Rust"
 arch=('x86_64')
 url="https://github.com/casey/intermodal"
 license=('custom:CC0')
-makedepends=(cargo help2man)
+makedepends=(cargo help2man libgit2 libssh2)
 conflicts=(intermodal-bin)
+options=(!lto)
 source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
-sha256sums=('cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a')
+sha256sums=('57e7cba3529c301a460f7a479ee9a5b39afea476a5cd58074847f3f36c9c5b3d')
 
 build() {
     cd "$pkgname-$pkgver"
@@ -20,7 +21,7 @@ build() {
     # cargo run --package gen -- --bin target/release/imdl all --no-git
     cargo run --package gen -- --bin target/release/imdl completion-scripts
     cargo run --package gen -- --bin target/release/imdl man
-    cargo run --package gen -- --bin target/release/imdl book --no-git
+    cargo run --package gen -- --bin target/release/imdl book --no-changelog
 }
 
 package() {

And for .SRCINFO:

diff --git a/.SRCINFO b/.SRCINFO
index a8e10de..a5180dc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
 pkgbase = intermodal
 	pkgdesc = User-friendly and featureful CLI BitTorrent metainfo utility, written in Rust
-	pkgver = 0.1.12
+	pkgver = 0.1.13
 	pkgrel = 2
 	url = https://github.com/casey/intermodal
 	arch = x86_64
 	license = custom:CC0
 	makedepends = cargo
 	makedepends = help2man
+	makedepends = libgit2
+	makedepends = libssh2
 	conflicts = intermodal-bin
-	source = intermodal-0.1.12.tar.gz::https://github.com/casey/intermodal/archive/v0.1.12.tar.gz
-	sha256sums = cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+	options = !lto
+	source = intermodal-0.1.13.tar.gz::https://github.com/casey/intermodal/archive/v0.1.13.tar.gz
+	sha256sums = 57e7cba3529c301a460f7a479ee9a5b39afea476a5cd58074847f3f36c9c5b3d
 
 pkgname = intermodal
-

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

No branches or pull requests

3 participants