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

Updates required for pkgsrc #20

Closed
pfr-dev opened this issue Mar 12, 2024 · 13 comments
Closed

Updates required for pkgsrc #20

pfr-dev opened this issue Mar 12, 2024 · 13 comments

Comments

@pfr-dev
Copy link

pfr-dev commented Mar 12, 2024

Hello,

While i3lock is in pkgsrc already, I'd like to have i3lockr packaged also.

Currently building i3lockr on NetBSD using cargo fails with the following error:

Updating crates.io index
Updating git repository `https://github.com/owenthewizard/scrap`
Updating git repository `https://github.com/LoganDark/stackblur-iter`
...
Compiling scrap v0.6.0-owenthewizard (https://github.com/owenthewizard/scrap#21b9f233)
...
Compiling stackblur-iter v0.1.3 (https://github.com/LoganDark/stackblur-iter?branch=rayon#7996893e)
...
Compiling itertools v0.10.3
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin" VSLANG="1033" "cc" "-Wl,-R/usr/pkg/lib/libatomic" "-Wl,-L/usr/pkg/lib/libatomic" "-m64" "/tmp/rustcQnB9Gv/symbols.o" "/home/pin/Downloads/i3lockr-1.2.0/target/release/deps/i3lockr-343b684a8037cd3f.i3lockr.ade0f1cbf37b0664-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/pin/Downloads/i3lockr-1.2.0/target/release/deps" "-L" "/home/pin/Downloads/i3lockr-1.2.0/target/release/build/miniz-sys-8915ba2743c71f8a/out" "-L" "/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/lib" "-Wl,-Bstatic" "/tmp/rustcQnB9Gv/libminiz_sys-5750fc446e9092ed.rlib" "/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/lib/libcompiler_builtins-c881afc69c2b540c.rlib" "-Wl,-Bdynamic" "-lxcb" "-lxcb" "-lxcb-shm" "-lxcb-randr" "-lutil" "-lrt" "-lutil" "-lexecinfo" "-lpthread" "-lrt" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lrt" "-lutil" "-lexecinfo" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/lib" "-o" "/home/pin/Downloads/i3lockr-1.2.0/target/release/deps/i3lockr-343b684a8037cd3f" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1"
= note: ld: cannot find -lxcb: No such file or directory
ld: cannot find -lxcb: No such file or directory
ld: cannot find -lxcb-shm: No such file or directory
ld: cannot find -lxcb-randr: No such file or directory
ld: /home/pin/Downloads/i3lockr-1.2.0/target/release/deps/i3lockr-343b684a8037cd3f.i3lockr.ade0f1cbf37b0664-cgu.0.rcgu.o: in function `core::ptr::drop_in_place<scrap::common::x11::Capturer>':
i3lockr.ade0f1cbf37b0664-cgu.0:(.text._ZN4core3ptr49drop_in_place$LT$scrap..common..x11..Capturer$GT$17hd6c97e6ddc03c5b6E+0x44): warning: warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference


error: could not compile `i3lockr` (bin "i3lockr") due to 1 previous error

This could be patched fairly easily, however the problem is things are a bit out of date. Dependency scrap appears to be an inactive crate and stackblur-iter an archived crate. While it might technically be possible to work around this for now, things will be broken in the near future.

I think its safe to say you can possibly assist in updating both i3lockr and scrap, and perhaps you might reach out to @LoganDark to request an update to stackblur-iter?

This wold be grately appreciated and would mean that i3lockr would be available in pkgsrc, and that would certainly be cool!

Thanks 👍

@LoganDark
Copy link

perhaps you might reach out to @LoganDark to request an update to stackblur-iter?

Is there an issue with it? stackblur-iter is archived because it's complete ATM.

@pfr-dev
Copy link
Author

pfr-dev commented Mar 12, 2024

Is there an issue with it? stackblur-iter is archived because it's complete ATM.

Hey, thanks for the quick reply.

I'll be honest, I'm not the one who'll be packaging this crate in pkgsrc, I'm just doing some recon to see whether it's worth trying to package it or not. I'll see if I can ping them and get them involved in the discussion, however they live in Sweden so probably asleep right now. Check back in about 7 hours or so.

@LoganDark
Copy link

It should be possible to package since the license is MIT but just in case it's not, please let me know.

@pfr-dev
Copy link
Author

pfr-dev commented Mar 13, 2024

While i've got you, are your thoughts the same on the scrap package? I'm not holding my breath for @quadrupleslap to reply

@LoganDark
Copy link

LoganDark commented Mar 13, 2024

While i've got you, are your thoughts the same on the scrap package? I'm not holding my breath for @quadrupleslap to reply

That I can't really comment on since I haven't used scrap myself. It claims to also have an MIT license but the license text isn't included in the distribution so I'm not sure how valid that is.

@pfr-dev
Copy link
Author

pfr-dev commented Mar 13, 2024

Cargo appears to be using Owen's fork of stackblur-iter which is 16 commits behind the master (v0.2.0)

Compiling stackblur-iter v0.1.3 (https://github.com/LoganDark/stackblur-iter?branch=rayon#7996893e)

scrap looks to be ahead so we might be ok there.

EDIT

I take that back. Looks like building from git with cargo build --release builds the latest stackblur-iter, however the problem now is that it pulls scrap from git at buildtime which is not allowed within pkgsrc.

   Compiling scrap v0.6.0-owenthewizard (https://github.com/owenthewizard/scrap#21b9f233)

This needs to be patched first.

@owenthewizard
Copy link
Owner

the problem now is that it pulls scrap from git at buildtime which is not allowed within pkgsrc.
This needs to be patched first.

Would a git submodule suffice?

@pfr-dev
Copy link
Author

pfr-dev commented Mar 14, 2024

Would a git submodule suffice?

Unfortunately no. But that's ok, I'm speaking to a pkgsrc maintainer who may submit a PR soon

@0323pin
Copy link

0323pin commented Mar 14, 2024

@owenthewizard
Disclaimer: pkgsrc/NetBSD dev here ...

git submodules are a PITA to package.
Just give me a diff against the latest scrap release and I'll patch it locally, it's much easier. I'd guess, this is the diff, quadrupleslap/scrap#24

EDIT: I see now, it's 13 commits ahead of master, quadrupleslap/scrap@master...owenthewizard:scrap:master

@0323pin
Copy link

0323pin commented Mar 14, 2024

😞 ok, git submodule it is ...

@0323pin
Copy link

0323pin commented Mar 15, 2024

@owenthewizard At the moment, you don't need to do/change anything, i.e. please do not change to a git submodule, I've worked around the issue within the package build.

=> Bootstrap dependency digest>=20211023: found digest-20220214
=> Checksum BLAKE2s OK for ansi_term-0.12.1.crate
=> Checksum SHA512 OK for ansi_term-0.12.1.crate
=> Checksum BLAKE2s OK for atty-0.2.14.crate
=> Checksum SHA512 OK for atty-0.2.14.crate
=> Checksum BLAKE2s OK for autocfg-1.1.0.crate
=> Checksum SHA512 OK for autocfg-1.1.0.crate
=> Checksum BLAKE2s OK for bitflags-1.3.2.crate
=> Checksum SHA512 OK for bitflags-1.3.2.crate
=> Checksum BLAKE2s OK for blend-srgb-0.1.1.crate
=> Checksum SHA512 OK for blend-srgb-0.1.1.crate
=> Checksum BLAKE2s OK for block-0.1.6.crate
=> Checksum SHA512 OK for block-0.1.6.crate
=> Checksum BLAKE2s OK for bytemuck-1.12.1.crate
=> Checksum SHA512 OK for bytemuck-1.12.1.crate
=> Checksum BLAKE2s OK for cc-1.0.73.crate
=> Checksum SHA512 OK for cc-1.0.73.crate
=> Checksum BLAKE2s OK for cfg-if-1.0.0.crate
=> Checksum SHA512 OK for cfg-if-1.0.0.crate
=> Checksum BLAKE2s OK for clap-2.34.0.crate
=> Checksum SHA512 OK for clap-2.34.0.crate
=> Checksum BLAKE2s OK for crossbeam-channel-0.5.6.crate
=> Checksum SHA512 OK for crossbeam-channel-0.5.6.crate
=> Checksum BLAKE2s OK for crossbeam-deque-0.8.2.crate
=> Checksum SHA512 OK for crossbeam-deque-0.8.2.crate
=> Checksum BLAKE2s OK for crossbeam-epoch-0.9.10.crate
=> Checksum SHA512 OK for crossbeam-epoch-0.9.10.crate
=> Checksum BLAKE2s OK for crossbeam-utils-0.8.11.crate
=> Checksum SHA512 OK for crossbeam-utils-0.8.11.crate
=> Checksum BLAKE2s OK for either-1.8.0.crate
=> Checksum SHA512 OK for either-1.8.0.crate
=> Checksum BLAKE2s OK for flate2-0.2.20.crate
=> Checksum SHA512 OK for flate2-0.2.20.crate
=> Checksum BLAKE2s OK for heck-0.3.3.crate
=> Checksum SHA512 OK for heck-0.3.3.crate
=> Checksum BLAKE2s OK for hermit-abi-0.1.19.crate
=> Checksum SHA512 OK for hermit-abi-0.1.19.crate
=> Checksum BLAKE2s OK for i3lockr-1.2.0-b4acd8a87957806681dc57876af01c6d435bd8e3.tar.gz
=> Checksum SHA512 OK for i3lockr-1.2.0-b4acd8a87957806681dc57876af01c6d435bd8e3.tar.gz
=> Checksum BLAKE2s OK for imagefmt-4.0.0.crate
=> Checksum SHA512 OK for imagefmt-4.0.0.crate
=> Checksum BLAKE2s OK for imgref-1.9.3.crate
=> Checksum SHA512 OK for imgref-1.9.3.crate
=> Checksum BLAKE2s OK for imgref-iter-0.4.0.crate
=> Checksum SHA512 OK for imgref-iter-0.4.0.crate
=> Checksum BLAKE2s OK for itertools-0.10.3.crate
=> Checksum SHA512 OK for itertools-0.10.3.crate
=> Checksum BLAKE2s OK for lazy_static-1.4.0.crate
=> Checksum SHA512 OK for lazy_static-1.4.0.crate
=> Checksum BLAKE2s OK for libc-0.2.132.crate
=> Checksum SHA512 OK for libc-0.2.132.crate
=> Checksum BLAKE2s OK for memchr-2.5.0.crate
=> Checksum SHA512 OK for memchr-2.5.0.crate
=> Checksum BLAKE2s OK for memoffset-0.6.5.crate
=> Checksum SHA512 OK for memoffset-0.6.5.crate
=> Checksum BLAKE2s OK for miniz-sys-0.1.12.crate
=> Checksum SHA512 OK for miniz-sys-0.1.12.crate
=> Checksum BLAKE2s OK for num_cpus-1.13.1.crate
=> Checksum SHA512 OK for num_cpus-1.13.1.crate
=> Checksum BLAKE2s OK for once_cell-1.14.0.crate
=> Checksum SHA512 OK for once_cell-1.14.0.crate
=> Checksum BLAKE2s OK for proc-macro-error-1.0.4.crate
=> Checksum SHA512 OK for proc-macro-error-1.0.4.crate
=> Checksum BLAKE2s OK for proc-macro-error-attr-1.0.4.crate
=> Checksum SHA512 OK for proc-macro-error-attr-1.0.4.crate
=> Checksum BLAKE2s OK for proc-macro2-1.0.43.crate
=> Checksum SHA512 OK for proc-macro2-1.0.43.crate
=> Checksum BLAKE2s OK for quick-xml-0.22.0.crate
=> Checksum SHA512 OK for quick-xml-0.22.0.crate
=> Checksum BLAKE2s OK for quote-1.0.21.crate
=> Checksum SHA512 OK for quote-1.0.21.crate
=> Checksum BLAKE2s OK for rayon-1.5.3.crate
=> Checksum SHA512 OK for rayon-1.5.3.crate
=> Checksum BLAKE2s OK for rayon-core-1.9.3.crate
=> Checksum SHA512 OK for rayon-core-1.9.3.crate
=> Checksum BLAKE2s OK for rgb-0.8.33.crate
=> Checksum SHA512 OK for rgb-0.8.33.crate
=> Checksum BLAKE2s OK for scopeguard-1.1.0.crate
=> Checksum SHA512 OK for scopeguard-1.1.0.crate
=> Checksum BLAKE2s OK for scrap-21b9f233bb8ad0b650b8eabb8a796054538c64be.tar.gz
=> Checksum SHA512 OK for scrap-21b9f233bb8ad0b650b8eabb8a796054538c64be.tar.gz
=> Checksum BLAKE2s OK for stackblur-iter-0.2.0.crate
=> Checksum SHA512 OK for stackblur-iter-0.2.0.crate
=> Checksum BLAKE2s OK for strsim-0.8.0.crate
=> Checksum SHA512 OK for strsim-0.8.0.crate
=> Checksum BLAKE2s OK for structopt-0.3.26.crate
=> Checksum SHA512 OK for structopt-0.3.26.crate
=> Checksum BLAKE2s OK for structopt-derive-0.4.18.crate
=> Checksum SHA512 OK for structopt-derive-0.4.18.crate
=> Checksum BLAKE2s OK for syn-1.0.99.crate
=> Checksum SHA512 OK for syn-1.0.99.crate
=> Checksum BLAKE2s OK for textwrap-0.11.0.crate
=> Checksum SHA512 OK for textwrap-0.11.0.crate
=> Checksum BLAKE2s OK for unicode-ident-1.0.3.crate
=> Checksum SHA512 OK for unicode-ident-1.0.3.crate
=> Checksum BLAKE2s OK for unicode-segmentation-1.9.0.crate
=> Checksum SHA512 OK for unicode-segmentation-1.9.0.crate
=> Checksum BLAKE2s OK for unicode-width-0.1.9.crate
=> Checksum SHA512 OK for unicode-width-0.1.9.crate
=> Checksum BLAKE2s OK for unique-0.9.1.crate
=> Checksum SHA512 OK for unique-0.9.1.crate
=> Checksum BLAKE2s OK for version_check-0.9.4.crate
=> Checksum SHA512 OK for version_check-0.9.4.crate
=> Checksum BLAKE2s OK for winapi-0.3.9.crate
=> Checksum SHA512 OK for winapi-0.3.9.crate
=> Checksum BLAKE2s OK for winapi-i686-pc-windows-gnu-0.4.0.crate
=> Checksum SHA512 OK for winapi-i686-pc-windows-gnu-0.4.0.crate
=> Checksum BLAKE2s OK for winapi-x86_64-pc-windows-gnu-0.4.0.crate
=> Checksum SHA512 OK for winapi-x86_64-pc-windows-gnu-0.4.0.crate
=> Checksum BLAKE2s OK for xcb-1.1.1.crate
=> Checksum SHA512 OK for xcb-1.1.1.crate
===> Installing dependencies for i3lockr-1.2.0
==========================================================================
The following variables will affect the build process of this package,
i3lockr-1.2.0.  Their current value is shown below:

        * PYTHON_VERSION_DEFAULT = 311

Based on these variables, the following variables have been set:

        * PYPACKAGE = python311

You may want to abort the process now with CTRL-C and change the value
of variables in the first group before continuing.  Be sure to run
`/usr/bin/make clean' after the changes.
==========================================================================
=> Tool dependency python311>=3.11.6nb1: found python311-3.11.8
=> Tool dependency mktools-[0-9]*: found mktools-20220614
=> Tool dependency pkgconf-[0-9]*: found pkgconf-2.1.1
=> Tool dependency cwrappers>=20150314: found cwrappers-20220403
=> Tool dependency checkperms>=1.1: found checkperms-1.12
=> Build dependency x11-links>=1.35: found x11-links-1.35nb1
=> Build dependency rust>=1.56.1: found rust-1.76.0
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/pkg/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Overriding tools for i3lockr-1.2.0
===> Extracting for i3lockr-1.2.0
=> Extracting local cargo crates
mv /usr/pkgsrc/wip/i3lockr/work/scrap-* /usr/pkgsrc/wip/i3lockr/work/i3lockr-b4acd8a87957806681dc57876af01c6d435bd8e3
===> Patching for i3lockr-1.2.0
=> Applying pkgsrc patches for i3lockr-1.2.0
=> Verifying /usr/pkgsrc/wip/i3lockr/patches/patch-Cargo.toml
=> Applying pkgsrc patch /usr/pkgsrc/wip/i3lockr/patches/patch-Cargo.toml
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD$
|
|Work around unpublished crate.
|
|--- Cargo.toml.orig	2024-03-15 10:49:08.345033311 +0000
|+++ Cargo.toml
--------------------------
Patching file Cargo.toml using Plan A...
Hunk #1 succeeded at 26.
done
===> Creating toolchain wrappers for i3lockr-1.2.0
===> Configuring for i3lockr-1.2.0
=> Checking for portability problems in extracted files
===> Building for i3lockr-1.2.0
   Compiling libc v0.2.132
   Compiling autocfg v1.1.0
   Compiling version_check v0.9.4
   Compiling proc-macro2 v1.0.43
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.3
   Compiling proc-macro-error-attr v1.0.4
   Compiling crossbeam-utils v0.8.11
   Compiling syn v1.0.99
   Compiling cfg-if v1.0.0
   Compiling memoffset v0.6.5
   Compiling proc-macro-error v1.0.4
   Compiling once_cell v1.14.0
   Compiling crossbeam-epoch v0.9.10
   Compiling unicode-segmentation v1.9.0
   Compiling memchr v2.5.0
   Compiling heck v0.3.3
   Compiling scopeguard v1.1.0
   Compiling unicode-width v0.1.9
   Compiling rayon-core v1.9.3
   Compiling cc v1.0.73
   Compiling atty v0.2.14
   Compiling textwrap v0.11.0
   Compiling strsim v0.8.0
   Compiling ansi_term v0.12.1
   Compiling bitflags v1.3.2
   Compiling clap v2.34.0
   Compiling quick-xml v0.22.0
   Compiling miniz-sys v0.1.12
   Compiling crossbeam-deque v0.8.2
   Compiling crossbeam-channel v0.5.6
   Compiling num_cpus v1.13.1
   Compiling rayon v1.5.3
   Compiling lazy_static v1.4.0
   Compiling either v1.8.0
   Compiling xcb v1.1.1
   Compiling structopt-derive v0.4.18
   Compiling imgref v1.9.3
   Compiling scrap v0.6.0-owenthewizard (/usr/pkgsrc/wip/i3lockr/work/i3lockr-b4acd8a87957806681dc57876af01c6d435bd8e3/scrap-21b9f233bb8ad0b650b8eabb8a796054538c64be)
   Compiling imgref-iter v0.4.0
   Compiling structopt v0.3.26
   Compiling i3lockr v1.2.0 (/usr/pkgsrc/wip/i3lockr/work/i3lockr-b4acd8a87957806681dc57876af01c6d435bd8e3)
   Compiling flate2 v0.2.20
   Compiling unique v0.9.1
   Compiling bytemuck v1.12.1
   Compiling blend-srgb v0.1.1
   Compiling rgb v0.8.33
   Compiling imagefmt v4.0.0
   Compiling stackblur-iter v0.2.0
   Compiling itertools v0.10.3
    Finished release [optimized] target(s) in 2m 22s
warning: the following packages contain code that will be rejected by a future version of Rust: quick-xml v0.22.0
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`

Maybe you want to fix the future-incompatibility, though.

@pfr-dev Please test the package and let me know.

@0323pin
Copy link

0323pin commented Mar 15, 2024

Feel free to close this issue, a package is now available on our wip-repo, https://github.com/NetBSD/pkgsrc-wip/tree/790a362404f64bca3cb0ce4483585c12cfa2e214/i3lockr

@0323pin
Copy link

0323pin commented Mar 19, 2024

I've now moved the package from the wip repo into the main branch, https://mail-index.netbsd.org/pkgsrc-changes/2024/03/18/msg295476.html

This means it's now available to all users and binaries will be produced for the coming Q-release.

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

4 participants