Access from '216.73.217.19'
You are in US.
It is 02:43 JST now.

背景

debian,Ubuntuに関わらず手順は同じであるので少し変更したい時やdebianの パッケージでバグなどがある場合Ubuntuのソースパッケージをを入手して、 debianでパーッケージを作り直すことも可能である。 実際にminidlnaはUbuntuパッケージでは問題ないのに、多くのディレクトリで 多くのファイルがある場合debinでは動作が停止してしまう、 しかしUbuntuサーバーはESMのお値段が高価で不要なパッケージが多いのでminidlna のようなアップデートが少ないパッケージにはかなり有効である。

手順
  1. ソースコードのダウンロード方法
  2. APTリポジトリーのdeb-src設定を有効になっていることを確認する。
    /etc/apt/sources.listの deb-src http...... に#(コメント)で始まってないとOK
    #deb cdrom:[Debian GNU/Linux 13.4.0 _Trixie_ - Official amd64 DVD Binary-1 with firmware 20260314-11:54]/ trixie contrib main non-free-firmware
    
    deb http://deb.debian.org/debian/ trixie main non-free-firmware
    deb-src http://deb.debian.org/debian/ trixie main non-free-firmware
    
    deb http://security.debian.org/debian-security trixie-security main non-free-firmware
    deb-src http://security.debian.org/debian-security trixie-security main non-free-firmware
    
    # trixie-updates, to get updates before a point release is made;
    # see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
    deb http://deb.debian.org/debian/ trixie-updates main non-free-firmware
    deb-src http://deb.debian.org/debian/ trixie-updates main non-free-firmware
        
    Shell(bash)コマンド
    apt-get source [パッケージ名]
        
  3. ソースからDebパッケージをビルドする
  4. Shell(bash)コマンド - ダウンロードしたディレクトリ行う。
    # 必要なビルド依存関係をインストール
    sudo apt-get build-dep [パッケージ名]
    
    # パッケージのビルドを実行 ソースの署名(GPGキー)を入れる場合は-us -uc は付けない
    cd [ソースディレクトリのパス]
    dpkg-buildpackage -us -uc