徒然メモ

技術的なことを書いたり書かなかったり

CentOS6でOpenssh5.8をビルドする

yum -y install pam-devel cd /usr/local/src/ wget http://ftp.jaist.ac.jp/pub/OpenBSD/OpenSSH/portable/openssh-5.8p2.tar.gz tar zxvf openssh-5.8p2.tar.gz vi openssh-5.8p2/contrib/redhat/openssh.spec


Do we want to disable building of x11-askpass? (1=yes 0=no)

%define no_x11_askpass 1 ←0から1に

Do we want to disable building of gnome-askpass? (1=yes 0=no)

%define no_gnome_askpass 1 ←0から1に

%configure –without-zlib-version-check ←追加する

–sysconfdir=%{_sysconfdir}/ssh

cd openssh-5.8p2 rm -rf contrib/aix/ rm -rf contrib/suse/ rm -rf contrib/caldera/ rm -rf contrib/cygwin/ rm -rf contrib/hpux/ rm -rf contrib/solaris/ mv openssh-5.8p2.tar.gz openssh-5.8p2.tar.gz.org tar czvf openssh-5.8p2.tar.gz openssh-5.8p2 rpmbuild -tb –clean openssh-5.8p2.tar.gz


checking whether GLOB_NOMATCH is declared… yes checking whether struct dirent allocates space for d_name… yes checking for /proc/pid/fd directory… yes checking for libwrap… configure: error: *** libwrap missing エラー: /var/tmp/rpm-tmp.QA2hLp の不正な終了ステータス (%build)

RPM ビルドエラー: line 85: prereq is deprecated: PreReq: initscripts >= 5.00 line 89: buildprereq is deprecated: BuildPreReq: perl, openssl-devel, tcp_wrappers line 90: buildprereq is deprecated: BuildPreReq: /bin/login line 94: buildprereq is deprecated: BuildPreReq: /usr/include/security/pam_appl.h line 103: buildprereq is deprecated: BuildPreReq: krb5-devel line 104: buildprereq is deprecated: BuildPreReq: krb5-libs line 117: prereq is deprecated: PreReq: openssh = 5.8p2-1, chkconfig >= 0.9

/var/tmp/rpm-tmp.QA2hLp の不正な終了ステータス (%build)

エラーが出たので

yum install tcp_wrappers-devel

rpmbuild -tb –clean openssh-5.8p2.tar.gz

今度は完了 できたRPMは以下の場所 /root/rpmbuild/RPMS/x86_64

ls -la


合計 856 -rw-r–r–. 1 root root 255744  7月 11 19:57 2011 openssh-5.8p2-1.x86_64.rpm -rw-r–r–. 1 root root 335716  7月 11 19:57 2011 openssh-clients-5.8p2-1.x86_64.rpm -rw-r–r–. 1 root root  16952  7月 11 19:57 2011 openssh-debuginfo-5.8p2-1.x86_64.rpm

-rw-r–r–. 1 root root 262048  7月 11 19:57 2011 openssh-server-5.8p2-1.x86_64.rpm