[Ubuntu-zh] 在 Ubuntu 下构建 Debian 打包环境

Zhengpeng Hou zhengpeng-hou在ubuntu.com
星期六 十月 2 13:08:48 BST 2010


2010/10/2 LI Daobing <lidaobing在gmail.com>

> 这个环境比 schroot 干净, 所以不必再加一层 pbuilder 了。
>
schroot的好处是可以配合 Xephyr一同使用, cowbuilder其实速度并不会比pbuilder+tmpfs快很多

>
> 2010/10/2 Zhengpeng Hou <zhengpeng-hou在ubuntu.com>:
> > 我从来都是用schroot + pbuilder + Xephyr
> > 的,一般我机器上总会有好几个chroot和pbuilder,程序的测试直接用Xephyr跑.
> >
> > 2010/10/2 LI Daobing <lidaobing在gmail.com>
> >
> >> From: http://www.cnblogs.com/lidaobing/archive/2010/10/02/1841349.html
> >> 0. 原因
> >> 尽管你是在 Ubuntu 下工作,但由于种种原因,你还是需要给 Debian
> >> 做打包工作,如果你不想你做的包因为一些简单的错误被退回,比如无法在 Debian 下编译,没有处理好 lintian 警告,那么最好在
> >> Ubuntu 下给 Debian 打包的环境,步骤如下所示:
> >>
> >> 1. 安装 approx
> >> 打包时经常需要反复下载一些包, 如果你的网速不够快,建议安装 approx 透明代理, 可以缓存大部分包。安装方法: "sudo
> >> apt-get install approx", 然后修改配置文件 /etc/approx/approx.conf 为
> >> ubuntu http://cn.archive.ubuntu.com/ubuntu
> >> debian http://mirrors.163.com/debian
> >>
> >> 2. 修改 /etc/apt/sources.list, 修改为如下的内容
> >> deb http://127.0.0.1:9999/ubuntu lucid main restricted universe
> multiverse
> >> deb http://127.0.0.1:9999/ubuntu lucid-security main restricted
> >> universe multiverse
> >> deb http://127.0.0.1:9999/ubuntu lucid-updates main restricted
> >> universe multiverse
> >>
> >> 3. 安装工具包, 运行 "sudo apt-get install ubuntu-dev-tools cowbuilder"
> >>
> >> 4. 准备 cowbuilder-sid
> >> $ sudo cp /usr/bin/pbuilder-dist /usr/bin/cowbuilder-sid
> >> $ sudo sed -ie 's,
> >> ftp://ftp.debian.org/debian,http://127.0.0.1:9999/debian,'
> >> /usr/bin/cowbuilder-sid
> >>
> >> 5. 准备开发环境
> >> $ sudo mkdir /var/cache/pbuilder-dist/sid_result
> >> $ cowbuilder-sid create
> >>
> >> 6. 开始开发
> >> $ dget http://ftp.debian.org/debian/pool/main/h/hello/hello_2.6-1.dsc
> >> $ dpkg-source -x hello_2.6-1.dsc
> >> $ cd hello-2.6
> >> $ # 修改 debian 包,版本改为 2.6-2
> >> $ debuild -S -sa
> >> $ cd ..
> >> $ cowbuilder-sid hello_2.6-2.dsc # 使用 sid 环境进行编译
> >>
> >> 7. 检查
> >> 7.1 安装最新版的 lintian
> >> Ubuntu 自带的 lintian 版本不够新,需要从 Debian 安装最新版本
> >> $ # 到 http://ftp.us.debian.org/debian/pool/main/l/lintian/ 下载最新版本的
> lintian
> >> $ wget
> >>
> http://ftp.us.debian.org/debian/pool/main/l/lintian/lintian_2.4.3_all.deb
> >> $ sudo dpkg -i lintian_2.4.3_all.deb
> >> $ sudo apt-get -f install
> >>
> >> 7.2 对包做最后的检查
> >> $ cd /var/cache/pbuilder-dist/sid_result
> >> $ lintian -i hello_2.6-2_amd64.changes
> >> $ #如果上一步出现错误,则继续修正
> >> $ debsign hello_2.6-2_amd64.changes #签名
> >>
> >> 8. 上传
> >> 根据 http://mentors.debian.net/cgi-bin/maintainer-intro 的介绍准备好
> >> mentors.debian.net 的上传的环境, 然后用如下的命令上传
> >> $ dput mentors hello_2.6-2_amd64.changes
> >>
> >> 9. 召唤 Debian Developer (DD)
> >> 到 mentors.debian.net, 登录后可以找到一份模板邮件, 把模板邮件中的内容填好,然后发到
> >> debian-mentors在lists.debian.org
> >> 如果你有相熟的 DD, 也可以直接发信给他让他帮忙检查。
> >>
> >> --
> >> Best Regards
> >> LI Daobing
> >> --
> >> ubuntu-zh mailing list
> >> ubuntu-zh在lists.ubuntu.com
> >> https://lists.ubuntu.com/mailman/listinfo/ubuntu-zh
> >>
> > -------------- 下一部分 --------------
> > 一个HTML附件被移除...
> > URL:
> https://lists.ubuntu.com/archives/ubuntu-zh/attachments/20101002/a0339a86/attachment.htm
> > --
> > ubuntu-zh mailing list
> > ubuntu-zh在lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-zh
> >
>
>
>
> --
> Best Regards
> LI Daobing
>
-------------- 下一部分 --------------
一个HTML附件被移除...
URL: https://lists.ubuntu.com/archives/ubuntu-zh/attachments/20101002/5af43a85/attachment.htm 


关于邮件列表 ubuntu-zh 的更多信息