vsoch/nushell-debian

figure out fakeroot

vsoch opened this issue · 0 comments

vsoch commented

hey @yarikoptic I'm picking up from our previous issue because I thought it would be fun to figure this out myself. My idea is that after a release of nushell (at nushell/nushell) we can basically wget the .tar.gz release, and then update the version in the changelog, and then use a makefile to do the build:

cd nushell-0.3.0; sed -i "1s/.*/nu (0.3.0-1) unstable; urgency=low/" debian/changelog; \
dpkg-source -b .; \
dpkg-buildpackage
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building nu using existing ./nu_0.3.0.orig.tar.gz
dpkg-source: info: building nu in nu_0.3.0-1.debian.tar.xz
dpkg-source: info: building nu in nu_0.3.0-1.dsc
dpkg-buildpackage: info: source package nu
dpkg-buildpackage: info: source version 0.3.0-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Jan Koprowski <jan.koprowski@gmail.com>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build nushell-0.3.0
 fakeroot debian/rules clean
make[1]: Entering directory '/home/vanessa/Documents/Dropbox/Code/rust/nushell-debian/nushell-0.3.0'
dh clean
   dh_clean
make[1]: Leaving directory '/home/vanessa/Documents/Dropbox/Code/rust/nushell-debian/nushell-0.3.0'
 dpkg-source -b nushell-0.3.0
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building nu using existing ./nu_0.3.0.orig.tar.gz
dpkg-source: info: building nu in nu_0.3.0-1.debian.tar.xz
dpkg-source: info: building nu in nu_0.3.0-1.dsc
 debian/rules build
make[1]: Entering directory '/home/vanessa/Documents/Dropbox/Code/rust/nushell-debian/nushell-0.3.0'
dh build
   dh_update_autotools_config
   dh_autoreconf
   create-stamp debian/debhelper-build-stamp
make[1]: Leaving directory '/home/vanessa/Documents/Dropbox/Code/rust/nushell-debian/nushell-0.3.0'
 fakeroot debian/rules binary
make[1]: Entering directory '/home/vanessa/Documents/Dropbox/Code/rust/nushell-debian/nushell-0.3.0'
dh binary
   dh_testroot
   dh_prep
   dh_install
dh_install: Cannot find (any matches for) "target/release/nu" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu
dh_install: Cannot find (any matches for) "target/release/nu_plugin_binaryview" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_binaryview
dh_install: Cannot find (any matches for) "target/release/nu_plugin_edit" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_edit
dh_install: Cannot find (any matches for) "target/release/nu_plugin_inc" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_inc
dh_install: Cannot find (any matches for) "target/release/nu_plugin_skip" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_skip
dh_install: Cannot find (any matches for) "target/release/nu_plugin_str" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_str
dh_install: Cannot find (any matches for) "target/release/nu_plugin_sum" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_sum
dh_install: Cannot find (any matches for) "target/release/nu_plugin_sys" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_sys
dh_install: Cannot find (any matches for) "target/release/nu_plugin_textview" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_textview
dh_install: Cannot find (any matches for) "target/release/nu_plugin_tree" (tried in ., debian/tmp)

dh_install: nu missing files: target/release/nu_plugin_tree
dh_install: missing files, aborting
debian/rules:18: recipe for target 'binary' failed
make[1]: *** [binary] Error 25
make[1]: Leaving directory '/home/vanessa/Documents/Dropbox/Code/rust/nushell-debian/nushell-0.3.0'
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 2

I'm not familiar with the dpkg-buildpackage command to know exactly the error, but I can pretty easily guess it's not finding the compiled nushell (which should be in target/debug) and I'm also seeing that it's already using fakeroot, so my question is - where do I write proper commands for doing install/build using fakeroot, so that this runs cleanly and then builds the deb?

If you teach me to fish - I can help debian maintainers to fish in the future too! I'm actually really excited to be learning this, always wanted to :)