
--lintian-opts
debuildには、lintian にオプションを渡すためのオプションがあります。pdebuild から lintian にオプションを渡すにはどうすればよいですか?
答え1
debuild
直接呼び出すlintian
ため、引数を渡すオプションがあります。 はpdebuild
そうではありません。
lintian
実行に呼び出しを追加したい場合はpdebuild
、通常pbuilder
フックを追加し、そこにオプションを指定します。/usr/share/doc/pbuilder/examples/B90lintian
フックの例については、pbuilder-dist から lintian を実行するにはどうすればよいですか?使用方法の詳細については、こちらをご覧ください。
答え2
B90lintian
以下は、lintian にオプションを渡すことをサポートするの拡張バージョンです。
#!/bin/bash
set -e
BUILDDIR="${BUILDDIR:-/tmp/buildd}"
if [ "$LINT" = 1 ] || [ -n "$LINTOPTS" ]; then
apt-get install -y "${APTGETOPT[@]}" lintian
# Because pbuilder has not home directory, calling su - pbuilder will print
# su: warning: cannot change directory to /nonexistent: No such file or directory
# To avoid that warning and to provide the proper current working directory for any
# relative file names used in LINTOPTS, set pbuilder's home directory to source
# directory, which is the (only) subdirectory of the build directory
usermod --home "$BUILDDIR"/*/ pbuilder
echo "I: start of lintian output"
# use this version if you want lintian to fail the build
#su -c "lintian -I --show-overrides $LINTARGS $BUILDDIR/*.changes" - pbuilder
# use this version if you don't want lintian to fail the build
su -c "lintian -I --show-overrides $LINTOPTS $BUILDDIR/*.changes; :" - pbuilder
echo "I: end of lintian output"
fi
環境変数を使用してLINT
、LINTOPTS
lintian を呼び出し、いくつかのオプションを渡すこともできます。