# Debian packaging workshop (1) ###### tags: `Debian packaging workshop` 下週的筆記:Debian packaging workshop 2 ## 日期:2015/04/07 直播錄影:http://youtu.be/EnyQ9ZWHEh8 參考文件: https://www.debian.org/doc/manuals/maint-guide/index.en.html maint-guide - Debian New Maintainers' Guide https://www.debian.org/doc/debian-policy/ debian-policy - Debian Policy Manual and related documents ## 主題:從 hello 這個軟體套件開始 安裝 sudo apt-get install hello 這個套件是特別設計過用來給使用者測試與了解不同的元件用法與格式(好長的句子) 使用 dpkg -L hello 來瀏覽所安裝的檔案 apt-get changelog hello # 看軟體套件的變更記錄 sudo apt-get install build-essential # 編譯任何 Debian package 之前至少會安裝的工具組 sudo apt-get build-dep hello # 安裝編譯所需要的軟體套件們 apt-get source hello # 取得套件原始碼 debian ├── changelog # Debian package 本身的變更記錄 ├── control # 主要的描述檔 ├── copyright # 版權宣告 ├── patches # 補丁修正 patch to modify the source if you want │ ├── 99-config-guess-config-sub │ └── series # 藉由井字號註解來決定要 apply 哪個 patch;這是有順序性的。 ├── rules # 其實就是一般的 Makefile 只是有幾個固定的 target rules for Debian packaging ├── source │ └── format # Debian package 的格式 └── watch # 搭配 uscan 使用,方便地比對本地版本與上游版本並自動下載 Source Tarball 2 directories, 8 files P.S. 此可以用 tree 工具產生 檔案結構大致分兩類: debian:今天重點,打包相關設定與撰寫在此 其他目錄:hello 本身相關的原始碼(不是今天討論主題,略過) debian/rules fakeroot debian/rules binary Command to build the binary by the configuration of rules fakeroot debian/rules clean Command to clean the files by the configuration of rules build-indep 編跟套件執行碼、函式庫較無直接關係的檔案,例如文件 patch 如果有打算動到原本的 source code,可以用這個方法進行修改 watch 配合 uscan 這個指令,去檢查 upstream 有無更新,若有,幫你取得。 debian/control any 編譯成任何平台適用 all 直接適用任何平台 any 和 all 的差異:all 是指 python script, html 之類的東西 source package = .orig + .dsc + .debian.tar.gz 回家練習 打包更新到 hello 2.10 的 Debian package (hint) Package 版號與 changelog 內容有關 (hint) 要通過 debuild (lintian) 嚴厲的考驗,魔王關卡:修正 no-md5sums-control-file 下週主題 1. 回家練習的討論 2. 打包 Python 的 Debian package 斷線了囧rz 看起來是直播結束了,session was terminated. 技術問題 (手殘不小心關掉了) 請重新使用上面的連結參加
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up