build directory empty with rust plugin

Bug #1654721 reported by Mark Shuttleworth
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Incomplete
High
Sergio Schvezov

Bug Description

Using the rust plugin and snapcraft 2.24 the build directory was empty. 'cd parts/foo/build; cp -ar ../src/*' fixed the issue manually.

Changed in snapcraft:
assignee: nobody → Sergio Schvezov (sergiusens)
importance: Undecided → Medium
importance: Medium → High
milestone: none → next
status: New → Triaged
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Download full text (3.1 KiB)

I am not seeing this issue. Is this the same yaml as for rust revision.

sergiusens@snapcraft:~/snapcraft/integration_tests/snaps/simple-rust-with-revision$ ls
Cargo.toml snapcraft.yaml src
sergiusens@snapcraft:~/snapcraft/integration_tests/snaps/simple-rust-with-revision$ snapcraft build
"grade" property not specified: defaulting to "stable"
Preparing to pull simple-rust
Pulling simple-rust
Downloading 'rustup.sh'[===========================================================================] 100%
/home/sergiusens/snapcraft/integration_tests/snaps/simple-rust-with-revision/parts/simple-rust/rust/rustup.sh --prefix=/home/sergiusens/snapcraft/integration_tests/snaps/simple-rust-with-revision/parts/simple-rust/rust --disable-sudo --save --revision=1.13.0
rustup: gpg available. signatures will be verified
rustup: downloading manifest for '1.13.0'
rustup: downloading toolchain for '1.13.0'
gpg: assuming signed data in '/home/sergiusens/.rustup.sh/dl/a48639c801ec5abc20d9/rust-1.13.0-x86_64-unknown-linux-gnu.tar.gz'
gpg: Signature made Tue 08 Nov 2016 05:30:31 PM UTC using RSA key ID 7B3B09DC
gpg: Good signature from "Rust Language (Tag and Release Signing Key) <email address hidden>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE
     Subkey fingerprint: C134 66B7 E169 A085 1886 3216 5CB4 A934 7B3B 09DC
rustup: installing toolchain for '1.13.0'
rustup: extracting installer
install: creating uninstall script at /home/sergiusens/snapcraft/integration_tests/snaps/simple-rust-with-revision/parts/simple-rust/rust/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component 'rust-docs'
install: installing component 'cargo'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    Rust is ready to roll.

/home/sergiusens/snapcraft/integration_tests/snaps/simple-rust-with-revision/parts/simple-rust/rust/bin/cargo fetch
    Updating registry `https://github.com/rust-lang/crates.io-index`
Preparing to build simple-rust
Building simple-rust
/home/sergiusens/snapcraft/integration_tests/snaps/simple-rust-with-revision/parts/simple-rust/rust/bin/cargo install -j4 --root /home/sergiusens/snapcraft/integration_tests/snaps/simple-rust-with-revision/parts/simple-rust/install
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling log v0.3.6
   Compiling simple-rust v0.1.0 (file:///home/sergiusens/snapcraft/integration_tests/snaps/simple-rust-with-revision/parts/simple-rust/build)
    Finished release [optimized] target(s) in 1.13 secs
  Installing /home/sergiusens/snapcraft/integration_tests/snaps/simple-rust-with-revision/parts/simple-rust/install/bin/simple-rust
sergiusens@snapcraft:~/snapcraft/integration_tests/snaps/simple-rust-with-revision$ ls parts/simple-rust/build/
Cargo.lock Cargo.toml src target
sergiusens@snapcraft:~/snapcraft/integration_tests/snaps/simple-rust-with-revisio...

Read more...

Changed in snapcraft:
status: Triaged → Incomplete
Revision history for this message
Domas Monkus (tasdomas) wrote :

I see this behavior with snapcraft 2.24 running this snapcraft.yaml: https://github.com/tasdomas/ripgrep-snap

```
➜ ripgrep-snap % snapcraft build
"grade" property not specified: defaulting to "stable"
Preparing to pull rg
Pulling rg
Cloning into '/home/d/src/snappy/ripgrep-snap/parts/rg/src'...
remote: Counting objects: 2688, done.
remote: Compressing objects: 100% (159/159), done.
remote: Total 2688 (delta 85), reused 0 (delta 0), pack-reused 2528
Receiving objects: 100% (2688/2688), 1.07 MiB | 1.72 MiB/s, done.
Resolving deltas: 100% (1669/1669), done.
Checking connectivity... done.
Downloading 'rustup.sh'[====================================================================================================================================================================================================================================================] 100%
/home/d/src/snappy/ripgrep-snap/parts/rg/rust/rustup.sh --prefix=/home/d/src/snappy/ripgrep-snap/parts/rg/rust --disable-sudo --save
rustup: gpg available. signatures will be verified
rustup: downloading manifest for 'stable'
rustup: downloading toolchain for 'stable'
gpg: assuming signed data in '/home/d/.rustup.sh/dl/b58947592f101b4e9d44/rust-1.14.0-x86_64-unknown-linux-gnu.tar.gz'
gpg: Signature made 2016 m. gruodžio 21 d. 17:46:12 EET using RSA key ID 7B3B09DC
gpg: Good signature from "Rust Language (Tag and Release Signing Key) <email address hidden>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE
     Subkey fingerprint: C134 66B7 E169 A085 1886 3216 5CB4 A934 7B3B 09DC
rustup: installing toolchain for 'stable'
rustup: extracting installer
install: creating uninstall script at /home/d/src/snappy/ripgrep-snap/parts/rg/rust/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component 'rust-docs'
install: installing component 'cargo'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    Rust is ready to roll.

/home/d/src/snappy/ripgrep-snap/parts/rg/rust/bin/cargo fetch
error: could not find `Cargo.toml` in `/home/d/src/snappy/ripgrep-snap/parts/rg/build` or any parent directory
Command '['/bin/sh', '/tmp/tmpaj00v_gp', '/home/d/src/snappy/ripgrep-snap/parts/rg/rust/bin/ca
```

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

I Can replicate this issue when doing `snapcraft build` but not when doing `snapcraft cleanbuild` with the project at https://github.com/jwilm/alacritty

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

I have the same issue (build dir empty) both doing snapcraft on my laptop and using cleanbuild.

http://paste.ubuntu.com/23776829/ - yaml
http://paste.ubuntu.com/23776838/ - output

"error: could not find `Cargo.toml` in `/root/parts/titun/build` or any parent directory"

Revision history for this message
Leo Arias (elopio) wrote :

The issue for Cargo.toml not found is https://bugs.launchpad.net/snapcraft/+bug/1654764

It has a fix ready to land.

Revision history for this message
Leo Arias (elopio) wrote :

Alright, I think I understand now! I think this is the same as bug #1654764.

Mark, can you confirm that your Cargo.toml file is not on the same directory where you are running the snapcraft command?

Changed in snapcraft:
milestone: 2.25 → none
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1654721] Re: build directory empty with rust plugin

I can't confirm that, sorry, nuked the snap directory after I saw
someone smarter than me making good progress :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.