我使用以下命令将源下载到软件包中:
$ apt-get source gkrellweather
我还确保我具有编译依赖项:
$ sudo apt-get build-dep gkrellweather
我测试了它是否可以正常运行:
$ cd gkrellweather-2.0.8
$ debuild
它.deb
在上面的文件夹中构建了一个程序包,我可以使用以下程序进行安装:
$ sudo dpkg -i ../gkrellweather*.deb
好的,一切就绪。让我们开始吧!
我在Vim中打开了源代码,并做了一些想要的更改。然后我尝试重建:
$ debuild
但我收到以下错误:
...
dh_clean: Compatibility levels before 5 are deprecated (level 4 in use)
dpkg-source -b gkrellweather-2.0.8
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: info: using source format `1.0'
dpkg-source: info: building gkrellweather using existing gkrellweather_2.0.8.orig.tar.gz
dpkg-source: info: building gkrellweather in gkrellweather_2.0.8-2.diff.gz
dpkg-source: error: cannot represent change to gkrellweather-2.0.8/.gkrellweather.c.swp: binary file contents changed
dpkg-source: warning: the diff modifies the following upstream files:
GrabWeather
Makefile
gkrellweather.c
dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -b gkrellweather-2.0.8 gave error exit status 1
debuild: fatal error at line 1357:
dpkg-buildpackage -rfakeroot -D -us -uc failed
为什么?
-i
传递debuild
给dpkg-buildpackage
,然后传递给dpkg-source
,其手册页上说可以提供正则表达式。没有测试,我想-i'(^|/)\.(git|idea|pybuild)($|/)'
可能对您有用。