und*_*cat 6 package-management dpkg
介绍
我有一个源代码包(通过下载apt source ...),我想在代码编辑器中使用rtags来探索它。执行此操作的标准方法是空运行构建系统生成的 makefile,rtags以便它可以使用这些命令(重新)构建其上下文源代码导航和自动完成数据库。
问题
通常,我只是autogen//获取一个autoconfmakefile configure,然后使用make -nk.
但是,由于我使用的是 Debian 软件包,因此我需要将 Debian 特定的配置命令与dpkg-buildpackage或 一起使用dpkg-source,以便源代码导航能够反映官方构建中使用的相同构建选项。
我浏览了buildpackage的手册页,但找不到任何可以在该./configure步骤之后、执行任何实际构建命令之前停止构建的选项。虽然它确实有--build=source( -S) 选项,但它没有执行我想要的操作:它应用 Ubuntu 特定的补丁,然后在运行/之前停止。这是不可接受的,因为我希望/步骤也被执行。automakeconfigureautomakeconfigure
问题
如何在dpkg-buildpackage运行后autogen//但运行前停止?automakeconfiguremake
建议的方法应该适用于dnsutils源包。
如果您查看dpkg-buildpackage联机帮助页,您会发现它不区分configure步骤和make步骤 - 就其而言,有一个build步骤和一个binary步骤。虽然./configure; make; make install很常见,但它并没有被视为一种真正的构建方法dpkg-buildpackage;需要根据debian/rules需要调用适当的操作。
在特定情况下dnsutils,或者更确切地说bind,debian/rules似乎是高度手动的(即使它调用了许多 debhelper 实用程序,但它不依赖于 debhelper 的自动化)。因此,在这里,最简单的方法是利用以下目标debian/rules:
$ debian/rules stamps/configure
dh_testdir
if [ ! -d autoreconf-bck ]; then \
mkdir autoreconf-bck; \
cp -pr config.h.in configure libtool.m4 ltmain.sh autoreconf-bck; \
fi
cp -r bin/named bin/named-pkcs11
cp -r bin/dnssec bin/dnssec-pkcs11
cp -r lib/isc lib/isc-pkcs11
cp -r lib/dns lib/dns-pkcs11
patch -p1 < debian/patches/extra-add_native_pkcs11.diff
patching file bin/dnssec-pkcs11/Makefile.in
patching file bin/named-pkcs11/Makefile.in
...
========================================================================
Configuration summary:
------------------------------------------------------------------------
Optional features enabled:
Multiprocessing support (--enable-threads)
GeoIP access control (--with-geoip)
GSS-API (--with-gssapi)
Native PKCS#11/Cryptoki support (--enable-native-pkcs11)
Provider library: ${prefix}/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so
GOST algorithm support (encoding: raw) (--with-gost)
ECDSA algorithm support (--with-ecdsa)
AAAA filtering (--enable-filter-aaaa)
Print backtrace on crash (--enable-backtrace)
Use symbol table for backtrace, named only (--enable-symtable)
Use GNU libtool (--with-libtool)
Dynamically loadable zone (DLZ) drivers:
None
Features disabled or unavailable on this platform:
Large-system tuning (--with-tuning)
Recursive fetch limits for DoS attack mitigation (--enable-fetchlimit)
Source Identity Token support (--enable-sit)
Allow 'fixed' rrset-order (--enable-fixed-rrset)
OpenSSL cryptography/DNSSEC (--with-openssl)
Use libseccomp system call filtering (--enable-seccomp)
Very verbose query trace logging (--enable-querytrace)
Automated Testing Framework (--with-atf)
JSON statistics (--with-libjson)
Unrecognized options:
--enable-rrl
========================================================================
touch stamps/configure
Run Code Online (Sandbox Code Playgroud)
如果它使用 debhelper's dh_auto_configure,另一种方法是覆盖dh_auto_configureindebian/rules以使之后的构建过程失败。
一般来说,dpkg-buildpackage对 不了解configure,因此无法就此止步。
| 归档时间: |
|
| 查看次数: |
1708 次 |
| 最近记录: |