pslaboが試したことの記録

はてなダイヤリーからはてなブログに引っ越してきました

この日記は現在実行中の減量記録を含む個人的なメモとして始めましたが、最近はコンピュータやガジェット、ハック、セキュリティネタのほうがメインになっております。

はてなダイヤリー時代はカテゴリ分けが適当だったのですが、これはそのうち直します。


OpenSSH 3.8 on Cobalt RaQ3

zlib のバージョンが 1.1.4 以降でないとダメらしいので、これを先に入れ替えておく。zlib は RedHat だと 7.3 までは 1.1.3 ベースなので、8.0 の SRPM を入手する。また、OpenSSL のバージョンが CobaltRaQ3 に標準で組み込まれているものではバージョンが古すぎてダメなので、適切なものを予め入れておく。


wget http://riksun.riken.go.jp/archives/Linux/redhat/redhat/linux/8.0/en/os/i386/SRPMS/zlib-1.1.4-4.src.rpm
rpm --rebuild zlib-1.1.4-4.src.rpm
cd /usr/src/redhat/RPMS/i386/
rpm -Uvh zlib-1.1.4-4.i386.rpm zlib-devel-1.1.4-4.i386.rpm

つぎに、次の2つのファイルを入手する。


wget ftp://ftp.kddlabs.co.jp/OpenBSD/OpenSSH/portable/rpm/SRPMS/openssh-3.7.1p1-1.src.rpm
wget ftp://ftp.kddlabs.co.jp/OpenBSD/OpenSSH/portable/openssh-3.8p1.tar.gz
最初の SRPM パッケージからは spec ファイルだけ流用する。本当にインストールしたいのはもちろん後者の tar ball。

rpm -ivh openssh-3.7.1p1-1.src.rpm
cp -p openssh-3.8p1.tar.gz /usr/src/redhat/SOURCES/

/usr/src/redhat/SPECS/openssh.spec を次のようにパッチする。



--- openssh.spec.default Wed Sep 17 06:45:18 2003
+++ openssh.spec Thu Mar 4 13:55:13 2004
@@ -1,20 +1,20 @@
-%define ver 3.7.1p1
+%define ver 3.8p1
%define rel 1

# OpenSSH privilege separation requires a user & group ID
%define sshd_uid 74
%define sshd_gid 74

# Version of ssh-askpass
%define aversion 1.2.4.1

# Do we want to disable building of x11-askpass? (1=yes 0=no)
-%define no_x11_askpass 0
+%define no_x11_askpass 1

# Do we want to disable building of gnome-askpass? (1=yes 0=no)
-%define no_gnome_askpass 0
+%define no_gnome_askpass 1

# Do we want to link against a static libcrypto? (1=yes 0=no)
%define static_libcrypto 0

# Do we want smartcard support (1=yes 0=no)
@@ -22,11 +22,11 @@

# Use GTK2 instead of GNOME in gnome-ssh-askpass
%define gtk2 1

# Is this build for RHL 6.x?
-%define build6x 0
+%define build6x 1

# Do we want kerberos5 support (1=yes 0=no)
-%define kerberos5 1
+%define kerberos5 0

# Reserve options to override askpass settings with:

ここまで終わったら普通に rpm -bb してパッケージが出来上がるのを待つ。出来上がったら rpm -Fvh openssh*3.8p1*.rpm などと入力し、インストールする。