构建 Ruby 包时出现“无 XS-Ruby-Versions”错误消息

构建 Ruby 包时出现“无 XS-Ruby-Versions”错误消息

我正在尝试使用 git-buildpackage 构建一个 Ruby 包。在过程即将结束时,我收到此错误:

dh clean --buildsystem=ruby --with ruby
   dh_testdir -O--buildsystem=ruby
   dh_auto_clean -O--buildsystem=ruby
/usr/lib/ruby/vendor_ruby/gem2deb.rb:17: warning: setting Encoding.default_external
  Entering dh_ruby --clean
No XS-Ruby-Versions: field found in source!
dh_auto_clean: dh_ruby --clean returned exit code 1
make: *** [clean] Error 1
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
E: Failed autobuilding of package
I: unmounting dev/pts filesystem
I: unmounting proc filesystem
 -> Cleaning COW directory
  forking: rm -rf /var/cache/pbuilder/build//cow.7268 
gbp:error: Couldn't run 'git-pbuilder': git-pbuilder returned 1

文件如下rules

#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
                | cut -d- -f1)
TMP := debian/$(PACKAGE)

DH_VERBOSE=1

%:
        dh $@ --buildsystem=ruby --with ruby

override_dh_auto_install:
        rsync -C --recursive --links --perms --times -v \
          --exclude-from=debian/exclude.rsync --exclude debian $(CURDIR)/ debian/$(PACKAGE)

答案1

错误很明显。将缺失的XS-Ruby-Versions字段添加到文件中control

相关内容