ubuntu submission

Launchpad recipes

  1. 將代碼放到launchpad,生成PPA
  2. 如果生成recipe能方便之後參考
  3. 安裝bzr-builder和pbuilder
  4. 生成項目名.recipe
    # bzr-builder format 0.3 deb-version {debupstream}+{revno}+{revno:packaging}或{debupstream}-0-{revno}
    lp:項目名
    merge 編譯用分支名 lp:~用戶名/項目名/分支名
  5. bzr dailydeb --allow-fallback-to-native 項目名.recipe 編譯用目錄(一臨時目錄即可)
  6. 生成~/.pbuilderrc

    COMPONENTS="main universe multiverse restricted"
  7. sudo pbuilder create 使用前注意下個步驟
  8. 如果有其它依賴,可參考使用參數 --othermirror,如--othermirror "deb http://ppa.launchpad.net/bon-ami/ezcommon/ubuntu precise main|deb-src http://ppa.launchpad.net/bon-ami/ezcommon/ubuntu precise main|deb https://launchpad.net/~dolik-rce/+archive/upp/ precise main"
    或用
    sudo pbuilder --login --save-after-login
    修改已經生成的pbuilder(),如果沒有--save-after-login則退出時都不會保存
  9. sudo pbuilder build 編譯用目錄/項目名_版本號.dsc

以下內容是探索過程,鏈接比較有用。

bzr 提交到新分支:bzr push lp:~用戶名/項目名/分支名


Debian packaging tutorial

  1. Download the upstream source
  2. Rename to 源包名_上游版本號.orig.tar.gz
  3. untar it
  4. Rename the directory to 源包名-上游版本號
  5. under that directory
  6. dh_mak(見下面的bzr dh-make)之後debian目錄會生成很多文件
  7. 修改debian/changelog用dch -i
  8. 修改debian/control
  9. debian/rules會調用debhelper(dh_*)
  10. 包不在Debian目錄:mk-build-deps -ir
  11. debuild或dpkg-buildpackage -us -uc(見下面的bzr builddeb -- -us -uc)
  12. ……pbuilder or schroot and sbuild……

sudo apt-get install dh-make bzr-builddeb
cd hello
make dist
如果已經有了debian目錄,可能直接到步驟9

  1. bzr dh-make hello 2.7 hello-2.7.tar.gz 這步會生成debian目錄,如果之前已經有了,則會重命名,在服務器上形成新的代碼提交
  2. cd hello/debian
  3. rm *ex *EX
  4. rm README.sourceREADME.Debian
  5. vi changelog control copyright
  6. vi hello-dev.install
  7. cd ..
  8. bzr commit -m "Initial commit of Debian packaging."
  9. bzr builddeb -- -us -uc
    or, use "debuild" to see what goes wrong when building results will be in debian/tmp.
  10. cd ..
  11. lesspipe hello_2.7-0ubuntu1_amd64.deb
  12. sudo dpkg --install hello_2.7-0ubuntu1_amd64.deb
  13. lintian hello_2.7-0ubuntu1.dsc
  14. lintian hello_2.7-0ubuntu1_amd64.deb
  15. cd hello
  16. bzr builddeb -S
  17. cd ../build-area
  18. pbuilder-dist precise build hello_2.7-0ubuntu1.dsc

提交後,

dput ppa:<lp-username> hello_2.7-0ubuntu1.changes

將bzr提交與缺陷關聯:在缺陷號處填 lp:號碼


提交代碼後,在launchpad上生成recipe讓服務器編譯


參考:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章