使用 pdebuild 时出现文件未找到错误

使用 pdebuild 时出现文件未找到错误

我正在尝试在主要开发服务器(运行 Debian wheezy)上构建 Debian 软件包pdebuild。这是我运行的命令:

pdebuild --pbuilder cowbuilder --buildresult .. \
         --debbuildopts -i -- \
         --basepath /var/cache/pbuilder/base-wheezy.cow \
         --distribution wheezy --configfile /etc/pbuilder/wheezy

这在其他服务器上有效,但在一台服务器上我得到以下输出:

I: using cowbuilder as pbuilder
dpkg-buildpackage: source package libexample-orange-util-perl
dpkg-buildpackage: source version 0.08
dpkg-buildpackage: source changed by John User <[email protected]>
 dpkg-source -i --before-build libexample-orange-util-perl
 fakeroot debian/rules clean
dh clean
   dh_testdir
   dh_auto_clean
   dh_clean
 dpkg-source -i -b libexample-orange-util-perl
dpkg-source: info: using source format `3.0 (native)'
dpkg-source: info: building libexample-orange-util-perl in libexample-orange-util-perl_0.08.tar.gz
dpkg-source: info: building libexample-orange-util-perl in libexample-orange-util-perl_0.08.dsc
 dpkg-genchanges -S >../libexample-orange-util-perl_0.08_source.changes
dpkg-genchanges: including full source code in upload
 dpkg-source -i --after-build libexample-orange-util-perl
dpkg-buildpackage: source only upload: Debian-native package
File not found: ../libexample-orange-util-perl_0.08.dsc

没有文件../libexample-orange-util-perl_0.08.dsc,但在其他构建服务器上不需要这样的文件(它由包构建创建)。

是什么原因导致这个“未找到文件”错误?

答案1

我从未使用过 pdbuild,但我认为是一个路径错误,因为你的 libexample-orange-util-perl_0.08.dsc 已生成。

也许,这个链接可以帮助到你:http://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-sourcebuild

答案2

事实证明,我的问题在于我试图在 AFS 目录中进行构建。我通过使用 sudo 的不同 pam 模块解决了该问题:

#%PAM-1.0
# /etc/pam.d/sudo

@include common-auth
@include common-account

# @include common-session-noninteractive
#
# Instead of including the stock common-session-noninteractive we
# use parts of it, overriding minimum_uid for pam_afs_session
# so that sudo will be able to get AFS tokens (helps with cowbuilder)
session optional                pam_krb5.so minimum_uid=1000
session required                pam_unix.so
session optional                pam_afs_session.so minimum_uid=0

相关内容