Debian Bug report logs - #860116

RFH: cargo -- Rust package manager

Package: wnpp; Maintainer for wnpp is wnpp@debian.org;

Reported by: Ximin Luo <infinity0@debian.org> Date: Tue, 11 Apr 2017 15:27:01 UTC Severity: normal

Reply or subscribe to this bug.

Toggle useless messages

Report forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org, pkg-rust-maintainers@lists.alioth.debian.org, wnpp@debian.org :

Bug#860116 ; Package wnpp . (Tue, 11 Apr 2017 15:27:04 GMT) (full text, mbox, link).

Acknowledgement sent to Ximin Luo <infinity0@debian.org> :

New Bug report received and forwarded. Copy sent to debian-devel@lists.debian.org, pkg-rust-maintainers@lists.alioth.debian.org, wnpp@debian.org . (Tue, 11 Apr 2017 15:27:04 GMT) (full text, mbox, link).

Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org> To: Debian Bug Tracking System <submit@bugs.debian.org> Subject: RFH: cargo -- Rust package manager Date: Tue, 11 Apr 2017 17:24:55 +0200

Package: wnpp Severity: normal We request assistance with maintaining the cargo package, as well as Rust packaging in general. Firefox's next versions[1] will require rust, but the Debian pkg-rust team is severely short on time to maintain these packages. sylvestre@ and I are just about managing to keep rustc in Debian up-to-date in our spare time. lucab@ and gus@ know more about the rust ecosystem than either of us, but they have not been very active recently. lucab@ had been maintaining cargo. Right now, cargo needs to be updated to the next version, there are some open bugs about it: https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=cargo I have not yet looked at this package myself but if there are any questions you can probably prod lucab@ to answer them. He has a different handle on IRC, you can join #debian-rust on OFTC to talk to us. After this, we will need to update rustc to 1.16.0. This is packaged in git, and it works (doko@ has already uploaded it to Ubuntu) however it uses some deprecated Makefiles which are to be removed in the next 1.17.0 release. Therefore, we should try to upload 1.16.0 using the new "rustbuild" buildsystem which also build-depends on cargo. (To try this out, remove --disable-rustbuild from d/rules.) After that, we will have to figure out how to cross-compile cargo and rust for other architectures. So far, we have been bootstrapping rustc on other arches by using upstream's binary blobs, but this is not the ideal approach, and will become even harder once we have the rustc<->cargo cyclic build dependency. Upstream themselves prefer the cross-compilation approach, and had previously given me some tips that I need to go dig out again from my IRC logs. At some point we should also start packaging actual rust packages. Josh Triplett had been planning to automate a large part of this, the work is still incomplete but we have a Rust Packaging policy already: https://wiki.debian.org/Teams/RustPackaging/Policy Package automation tools: https://anonscm.debian.org/cgit/pkg-rust/dh-cargo.git (low-level dh glue) https://crates.io/crates/debcargo (high-level automater) [1] https://buildd.debian.org/status/package.php?p=firefox&suite=experimental

Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org :

Bug#860116 ; Package wnpp . (Tue, 11 Apr 2017 18:27:03 GMT) (full text, mbox, link).

Acknowledgement sent to Ximin Luo <infinity0@debian.org> :

Extra info received and forwarded to list. Copy sent to wnpp@debian.org . (Tue, 11 Apr 2017 18:27:03 GMT) (full text, mbox, link).

Message #10 received at 860116@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org> To: Luca Bruno <lucab@debian.org>, 860116@bugs.debian.org, Rust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org> Subject: Re: [Pkg-rust-maintainers] Bug#860116: RFH: cargo -- Rust package manager Date: Tue, 11 Apr 2017 18:24:00 +0000

Ximin Luo: > [..] > > Right now, cargo needs to be updated to the next version, there are some open > bugs about it: > > https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=cargo > > I have not yet looked at this package myself but if there are any questions you > can probably prod lucab@ to answer them. He has a different handle on IRC, you > can join #debian-rust on OFTC to talk to us. > > [..] I've updated our cargo.git with some documentation on how to update the package, and updated some configs and scripts etc to match. Now things will "work" if you run: $ debian/make_orig_multi.sh 0.16.0 # move the files over $ gbp import-orig ../cargo_0.16.0.orig.tar.gz # also imports the -deps tarball automatically However, I've decided to not yet push these 0.16.0 commits, because I'm not sure if we need to tweak the -deps tarball further. Luca, could you give us some guidance on how to proceed? Perhaps we need to first expand clean-cargo-deps.patch or deps-tarball-filter.txt? X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git

Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org :

Bug#860116 ; Package wnpp . (Wed, 19 Apr 2017 23:15:03 GMT) (full text, mbox, link).

Acknowledgement sent to Ximin Luo <infinity0@debian.org> :

Extra info received and forwarded to list. Copy sent to wnpp@debian.org . (Wed, 19 Apr 2017 23:15:03 GMT) (full text, mbox, link).

Message #15 received at 860116@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org> To: Luca Bruno <lucab@debian.org>, 860116@bugs.debian.org, Rust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org>, Josh Triplett <josh@joshtriplett.org> Subject: Re: [Pkg-rust-maintainers] Bug#860116: RFH: cargo -- Rust package manager Date: Wed, 19 Apr 2017 23:11:00 +0000

Ximin Luo: > [..] I've made some more process and have pushed 0.17.0 to git. However we're getting build errors and I don't know how to proceed: https://anonscm.debian.org/cgit/pkg-rust/cargo.git/tree/debian/TODO https://anonscm.debian.org/cgit/pkg-rust/cargo.git/tree/debian/cargo-vendor-pack.py I'm not familiar with the Cargo repo formats, and I don't know how d/cargo-vendor-pack.py should be fixed. Help would be appreciated. Josh, is this anything related to how your dh-cargo works? Any code that we can reuse? X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git

Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org :

Bug#860116 ; Package wnpp . (Thu, 20 Apr 2017 01:03:05 GMT) (full text, mbox, link).

Acknowledgement sent to Josh Triplett <josh@joshtriplett.org> :

Extra info received and forwarded to list. Copy sent to wnpp@debian.org . (Thu, 20 Apr 2017 01:03:05 GMT) (full text, mbox, link).

Message #20 received at 860116@bugs.debian.org (full text, mbox, reply):

From: Josh Triplett <josh@joshtriplett.org> To: Ximin Luo <infinity0@debian.org> Cc: Luca Bruno <lucab@debian.org>, 860116@bugs.debian.org, Rust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org> Subject: Re: [Pkg-rust-maintainers] Bug#860116: RFH: cargo -- Rust package manager Date: Wed, 19 Apr 2017 18:00:36 -0700

On Wed, Apr 19, 2017 at 11:11:00PM +0000, Ximin Luo wrote: > Ximin Luo: > > [..] > > I've made some more process and have pushed 0.17.0 to git. However we're getting build errors and I don't know how to proceed: > > https://anonscm.debian.org/cgit/pkg-rust/cargo.git/tree/debian/TODO > https://anonscm.debian.org/cgit/pkg-rust/cargo.git/tree/debian/cargo-vendor-pack.py > > I'm not familiar with the Cargo repo formats, and I don't know how d/cargo-vendor-pack.py should be fixed. Help would be appreciated. > > Josh, is this anything related to how your dh-cargo works? Any code that we can reuse? Not directly, until we're ready to package all the individual crate dependencies (which we'll want to do at some point). But you can definitely use the same mechanism; it'd be much easier to generate a directory registry than the full Cargo index format. Rather than generating an index file and repo, just: 1) Copy every crate directory, verbatim, into a subdirectory of a vendor directory. 2) Create a file .cargo-checksum.json in the crate directory, containing {"package":"$SHA256","files":{}} , where $SHA256 is the sha256 of the .crate file. 3) Create a directory containing a file "config", containing: [source.crates-io] replace-with = "my-registry" [source.my-registry] directory = "/path/to/the/vendor/directory" 4) Set CARGO_HOME to the directory containing that config file, and build. debcargo can help a bit with this. Run it on a crate, move debian/cargo-checksum.json to .cargo-checksum.json , aggregate debian/copyright, remove the rest of debian/ , and put the resulting directory into the registry directory. ...and looking at git from 20 minutes ago, it looks like you've switched over to directory registries now.

Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org :

Bug#860116 ; Package wnpp . (Thu, 20 Apr 2017 08:21:02 GMT) (full text, mbox, link).

Acknowledgement sent to Ximin Luo <infinity0@debian.org> :

Extra info received and forwarded to list. Copy sent to wnpp@debian.org . (Thu, 20 Apr 2017 08:21:02 GMT) (full text, mbox, link).

Message #25 received at 860116@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org> To: Josh Triplett <josh@joshtriplett.org> Cc: Luca Bruno <lucab@debian.org>, Rust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org>, 860116@bugs.debian.org Subject: Re: [Pkg-rust-maintainers] Bug#860116: RFH: cargo -- Rust package manager Date: Thu, 20 Apr 2017 08:16:00 +0000

Josh Triplett: > [..] > > ...and looking at git from 20 minutes ago, it looks like you've switched > over to directory registries now. > Thanks for the tip, yes I figured this out by looking at both your dh-cargo code and also the Fedora cargo package. [1] The new version is uploaded to experimental, but there's some more things I'd like to tidy up before uploading it to unstable. - I get errors about missing "cargotest" and "hamcrest" when I try to `make test`, it looks like cargotest is actually in the rustc package: https://github.com/rust-lang/rust/tree/master/src/tools/cargotest Any suggestions on how to deal with this? I guess the obvious thing to do is to package a librust-cargotest-xxx-dev package but I wonder if there are better options. - cargo still embeds libgit2-sys source code, and I can see that in the deps-tarball-filter.txt Luca was explicitly leaving it in. Is that because they patch the source code? Can we just get rid of it, and link to libgit2 instead? X [1] https://src.fedoraproject.org/cgit/rpms/cargo.git/tree/cargo.spec -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git

Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org :

Bug#860116 ; Package wnpp . (Thu, 20 Apr 2017 10:00:03 GMT) (full text, mbox, link).

Acknowledgement sent to Josh Triplett <josh@joshtriplett.org> :

Extra info received and forwarded to list. Copy sent to wnpp@debian.org . (Thu, 20 Apr 2017 10:00:03 GMT) (full text, mbox, link).

Message #30 received at 860116@bugs.debian.org (full text, mbox, reply):

From: Josh Triplett <josh@joshtriplett.org> To: Ximin Luo <infinity0@debian.org> Cc: Luca Bruno <lucab@debian.org>, Rust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org>, 860116@bugs.debian.org Subject: Re: [Pkg-rust-maintainers] Bug#860116: RFH: cargo -- Rust package manager Date: Thu, 20 Apr 2017 02:57:28 -0700

On Thu, Apr 20, 2017 at 08:16:00AM +0000, Ximin Luo wrote: > Josh Triplett: > > [..] > > > > ...and looking at git from 20 minutes ago, it looks like you've switched > > over to directory registries now. > > > > Thanks for the tip, yes I figured this out by looking at both your dh-cargo code and also the Fedora cargo package. [1] > > The new version is uploaded to experimental, but there's some more things I'd like to tidy up before uploading it to unstable. > > - I get errors about missing "cargotest" and "hamcrest" when I try to `make test`, it looks like cargotest is actually in the rustc package: > > https://github.com/rust-lang/rust/tree/master/src/tools/cargotest > > Any suggestions on how to deal with this? I guess the obvious thing to do is to package a librust-cargotest-xxx-dev package but I wonder if there are better options. > > - cargo still embeds libgit2-sys source code, and I can see that in the deps-tarball-filter.txt Luca was explicitly leaving it in. Is that because they patch the source code? > > Can we just get rid of it, and link to libgit2 instead? git2-rs doesn't modify libgit2, but it does use a snapshot from git, via a submodule. And unfortunately, while it supports building against a system version via pkg-config, it doesn't include any version number in its dependency. libgit2 itself doesn't have a stable ABI, so either an older *or* a newer version can potentially fail due to incompatibilities. (Also, like many libraries, libgit2 doesn't really update its SONAME and similar except when releasing, even though many people run git snapshots.) Fortunately, git2-rs uses ctest now to attempt to make sure its bindings match the actual signatures of the functions, so at least an attempt to build against an older (or sometimes newer) version of libgit2 will tend to produce compile errors (assuming you get all the environment variables set correctly to find it). However, I know of at least one case where git2-rs pulled in a new snapshot of libgit2 to obtain critical bugfixes rather than differences in ABI. In short, I think we *could* switch to pulling in the system version of libgit2, but we'd need to work very closely with the libgit2 maintainer, and sometimes package snapshots of libgit2 from git. We might also want to work with libgit2 and git2-rs upstreams to 1) get more regular updates to the version number that appears in the pkg-config file and 2) get libgit2-sys to declare a pkg-config dependency that matches its snapshot of libgit2. - Josh Triplett

Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org :

Bug#860116 ; Package wnpp . (Thu, 20 Apr 2017 10:30:04 GMT) (full text, mbox, link).

Acknowledgement sent to Luca BRUNO <lucab@debian.org> :

Extra info received and forwarded to list. Copy sent to wnpp@debian.org . (Thu, 20 Apr 2017 10:30:04 GMT) (full text, mbox, link).

Message #35 received at 860116@bugs.debian.org (full text, mbox, reply):

From: Luca BRUNO <lucab@debian.org> To: Ximin Luo <infinity0@debian.org> Cc: Josh Triplett <josh@joshtriplett.org>, Rust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org>, 860116@bugs.debian.org Subject: Re: [Pkg-rust-maintainers] Bug#860116: RFH: cargo -- Rust package manager Date: Thu, 20 Apr 2017 10:01:07 +0000

On Thursday, April 20, 2017 8:16:00 AM UTC Ximin Luo wrote: > - cargo still embeds libgit2-sys source code, and I can see that in the > deps-tarball-filter.txt Luca was explicitly leaving it in. Is that because > they patch the source code? > > Can we just get rid of it, and link to libgit2 instead? It would be nice, but last time I tried upstream was tracking libgit2 from master: https://github.com/alexcrichton/git2-rs/pull/80 Things may have changed in the meanwhile, I did not re-assess since then. Ciao, Luca -- "If you build a wall, think of what you leave outside it" - Italo Calvino

Send a report that this bug log contains spam.