Webページの差分を生成する
Webページの差分を取得するにはおもに2つの方法が考えられます。
まずはHTMLやその他のファイル一式をこれまで説明したやり方で差分を取る方法です。このとき,
$ diff -ruN www1/ www2/
「-r」
もう1つは対象のWebページ全体を何らかの方法で画像化してしまい,
CUIで画像を生成したいのであれば,
$ sudo apt install cutycapt $ cutycapt --url=https://gihyo.jp/ --out=gihyo.jp.png
これでWebページ全体をレンダリングしたものがgihyo.
Debianパッケージの差分を生成する
devscriptsパッケージに含まれているdebdiffコマンドを使うと,
$ sudo apt install devscripts $ curl -LO http://jp.archive.ubuntu.com/ubuntu/pool/main/a/apt/apt_0.9.9.1~ubuntu3.1_amd64.deb $ curl -LO http://jp.archive.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.0.2ubuntu2_amd64.deb $ debdiff apt_0.9.9.1~ubuntu3.1_amd64.deb apt_1.0.2ubuntu2_amd64.deb (中略) Files in second .deb but not in first ------------------------------------- (中略) -rw-r--r-- root/root DEBIAN/shlibs -rwxr-xr-x root/root /usr/bin/apt -rwxr-xr-x root/root /usr/lib/apt/apt-helper
前回紹介したように,
上記はバイナリパッケージを直接比較しましたが,
$ apt-get source openssl=1.0.1f-1ubuntu2 $ apt-get source openssl=1.0.1f-1ubuntu2.2 $ debdiff openssl_1.0.1f-1ubuntu2{,.2}.dsc (中略) --- openssl-1.0.1f/debian/patches/CVE-2014-0224-1.patch 1970-01-01 09:00:00.000000000 +0900 +++ openssl-1.0.1f/debian/patches/CVE-2014-0224-1.patch 2014-06-03 00:00:03.000000000 +0900 (中略) diff -Nru openssl-1.0.1f/debian/patches/series openssl-1.0.1f/debian/patches/series --- openssl-1.0.1f/debian/patches/series 2014-04-08 04:37:33.000000000 +0900 +++ openssl-1.0.1f/debian/patches/series 2014-06-03 02:56:46.000000000 +0900 @@ -36,3 +36,11 @@ ppc64-support CVE-2014-0076.patch CVE-2014-0160.patch +CVE-2010-5298.patch +CVE-2014-0198.patch +CVE-2014-0195.patch +CVE-2014-0221.patch +CVE-2014-0224-1.patch +CVE-2014-0224-2.patch +CVE-2014-3470.patch +CVE-2014-0224-3.patch
debian/
- 注3)
- Ubuntuのセキュリティアップデートでは,
バージョンの最後に 「.1, .2」 という形で数字を増加していきます。リリース時のパッケージ (今回の場合はubuntu2) はそのままリポジトリに残るのですが, セキュリティアップデートとして提供されたパッケージ (ubuntu2. 1) は, 新しいバージョン (ubuntu2. 2) が出ると削除されます。そこで今回はubuntu2とubuntu2. 2を比較しています。
まとめ
コンピューターに限らずどんな分野でも,