[Tokyodebian-2007] Debian勉強会31事前課題

David Smith davidsmith at acm.org
Thu Aug 16 18:23:31 UTC 2007


デービッドです。遅れてすみません。事前課題を提出します。

「ここ最近 Debian を使っていて ハマったこと/ちょっと感激したこと」
仕事で設定ファイルをパッケージにまとめたかったなと思ってやってみたら
cdbsで意外に簡単で感動しました。以前cdbs等のツールについてお話しが
あったと思いますが誰でもできることはあまり示されなかったかもしれないので、
こんなような作ったと紹介したいです。

■ "/"ファイルシステムのようなディレクトリ階層を作成。
設定ファイルをそこで管理する。例えば~/project/shorewall-basic-settingsだったら
そこにetc/shorewallディレクトリを作って設定ファイルを格納。
僕のプロジェクトは以下の感じ、

$ find ~/project/shorewall-basic-settings
.
./etc
./etc/shorewall
./etc/shorewall/interfaces
./etc/shorewall/policy
./etc/shorewall/rules
./etc/shorewall/zones
./etc/default/shorewall

■そのディレクトリにdebianディレクトリを作成、以下のファイルを記入
==./debian/rules==
#!/usr/bin/make -f
DH_ALWAYS_EXCLUDE".svn"
include /usr/share/cdbs/1/rules/debhelper.mk

==./debian/install==
etc/shorewall/*
etc/default/shorewall

==./debian/changelog==
dds-shorewall-basic-settings (1.0) unstable; urgency=low

 * Initial release of shorewall settings package.

 -- David Smith <davidsmith at acm.org>  Thu, 16 Aug 2007 14:12:45 +0900

==./debian/control==
Source: dds-shorewall-basic-settings
Section: misc
Priority: extra
Build-Depends: debhelper (>= 5), cdbs
Maintainer: David Smith <davidsmith at acm.org>
Standards-Version: 3.7.2

Package: dds-shorewall-basic-settings
Architecture: all
Depends: shorewall, ${misc:Depends}
Description: Customized basic shorewall configuration for my servers
 These settings set up shorewall to run allowing basic services that all
 hosts should support. It blocks everything except ping, ssh, and UDP
 traceroute from the outside world.

==./debian/copyright==
Copyright 2007 David Smith <davidsmith at acm.org>. Public Domain.

**終わり**

debianディレクトリはchangelog以外ほとんど変更しないので管理しやすくて
明瞭だと思います。

「apt の sources.list はこう書く」
最近sources.listを空っぽにしてsources.list.dにstable.list、testing.list、
security.listなどで分別してみました。目的としてはcron-aptでsecurity.list
だけに指したり自作パッケージで専用レポジトリを追加削除したりしたかったの
ですが、結局libaptのバグらしくてsources.list.dを使っているならDir::Etc::SourcesList
を設定しても効かないみたいだったから止めてしまって新規インストールのような
綺麗にまとまったsources.listを書くことにしちゃいました。

以上。

Cheers,
David
-- 
=========================================================
  David D. Smith <davidsmith at acm.org>
Jabber/GoogleTalk: dds at jabber.org ; GPG: 0xE6511C7E
IRC: dds on irc.freenode.net ; MSN: dds4418 at hotmail.com
==========================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/tokyodebian-2007/attachments/20070817/dece550c/attachment.pgp 


More information about the Tokyodebian-2007 mailing list