Mar*_*ppi 10 debootstrap chroot
我有一组软件包,希望与 debootstrap 中的 minibase 变体一起安装。我最难弄清楚如何自定义变体,以便在运行 debootstrap 时在 chroot 中安装的不仅仅是基础。有什么方法可以实现这一目标吗?
ish*_*ish 10
将您自己的变体和额外的自定义包添加到debootstrap非常容易。
该debootstrap的配置/运行脚本位于/usr/share/debootstrap/scripts
。让我们创建一个allmybase
变体,其中包含所有内容minbase
以及包htop
和traceroute
.
/usr/share/debootstrap/scripts/precise
在您的编辑器中打开。
/usr/share/debootstrap/scripts/gutsy
;的符号链接。如果您只想影响特定版本,请断开链接并使其成为勇敢脚本的副本。在第 22 行附近,找到以 开头的行variants
并在末尾添加您的自定义变体:
变体 - 构建 fakechroot minbase allmybase
找到第work_out_debs()
34 行附近的函数,并查看base
“基本”变体(此处为 )的变量的默认设置minbase
:
elif do_variant fakechroot || do_variant minbase; 然后 基地=“适合”
在函数末尾使用自定义包附加您自己的变体:
elif do_variant allmybase; 然后 base="apt htop traceroute"
保存、退出并使用--print-debs
“模拟”标志对其进行测试,例如
sudo debootstrap --print-debs --variant=allmybase 精确 /tmp/prec-chroot
htop
和traceroute
包将包含在allmybase chroot 中。 归档时间: |
|
查看次数: |
7564 次 |
最近记录: |