[Pkg-rust-maintainers] Error while packaging

Wolfgang Silbermayr wolfgang at silbermayr.at
Sat Mar 14 14:12:29 GMT 2020


On 3/14/20 10:28 AM, abhijith sheheer wrote:
> I'm new to rust packaging. I thought of packaging bandwidth and I get
> this error.
> 
> abspython at debian:~/packaging/rust/debcargo-conf$ ./new-package.sh bandwhich
>     Updating crates.io <http://crates.io> index
> Generate binary crate with default name 'bandwhich', set bin_name to
> override or bin = false to disable.
> Wrote back file to overlay: copyright.debcargo.hint
> Wrote back file to overlay: changelog
> Something failed: Os { code: 39, kind: Other, message: "Directory not
> empty" }
> 
> I ignored this and tried building the crate in build/ and also got
> another error during cleanup .
> 
> debcargo-conf builder: build complete: bandwhich_0.9.0_amd64.changes
>  signfile dsc bandwhich_0.9.0.dsc Michael Aaron Murphy
> <michael at system76.com <mailto:michael at system76.com>>
> gpg: skipped "Michael Aaron Murphy <michael at system76.com
> <mailto:michael at system76.com>>": No secret
> key
> gpg: /tmp/debsign.UYIE2rHg/bandwhich_0.9.0.dsc: clear-sign failed: No
> secret key
> debsign: gpg error occurred!  Aborting....
> 
> Somehow, deb-cargo thinks I'm "Michael Aaron Murphy
> <michael at system76.com <mailto:michael at system76.com>>". My $DEBEMAIL and
> $DEBFULLNAME are correctly configured. Any way to fix it?

Hi Abhijith,

You're on the right track. The problem is that the bandwhich crate
distributes a `debian` subdirectory which means the files from the
upstream tarball are unpacked into `build/bandwhich/debian`
subdirectory, and when debcargo attempts to create a directory with the
same name, this fails. This upstream subdirectory is also where the
mentioned author is listed in the changelog file.

As a quick solution, you can add a line with `excludes = ["debian/**"]`
to the `src/bandwhich/debian/debcargo.toml` file, then delete everything
which relates to bandwhich from the `build` subdirectory, and finally
run `./update.sh bandwhich`. After that, everything should be as expected.

Note: I didn't try to build the package, so some other problems might
occur after that, just analyzed the concrete problem you described.

Hth,
Wolfgang.



More information about the Pkg-rust-maintainers mailing list