めんてなのおしごと

Tue, Oct 10, 2017 in debian


rustを使ったソースのパッケージングについて。

https://github.com/sharkdp/fd というのを見かけて面白そうなのでパッケージングしてみようとする。

$ git clone https://github.com/sharkdp/fd; cd fd
$ git checkout -b debian
$ dh_make --createorig -s -p fd_4.0.0
(debianディレクトリをいじる…)
$ git add debian; git commit

で、ビルドすると通るけど何もしてない風味。ざっくりrustcを使うのはなにかあるのだろうか?と調べると dh-cargo というのが見つかった。どうやら、rustなパッケージは dh --buildsystem cargo という形で実施するようだ。

   dh_auto_install -O--buildsystem=cargo
cp: cannot stat './debian/cargo-checksum.json': No such file or directory
dh_auto_install: cp ./debian/cargo-checksum.json /build/fd-4.0.0/debian/cargo_registry/fd-4.0.0/.cargo-checksum.json returned exit code 1

debian/cargo-checksum.json が必要、らしいが https://wiki.debian.org/Teams/RustPackaging/Policy を見ても何書いていいかがさっぱりわからん… ソースを検索したけど、もとからあるファイルをコピーしているようにしか見えない(が、無いんだよな…)