AMD AthlonII X2 240e

値段もこなれてきた、と言うかホントに安い。
懐に優しいAMDのCPU、AMD AthlonII X2 240eにテストサーバのCPUを換装してみた。

保守部品を買い込みに行ったついでに目に入ったので興味がてら買ってみたんですが、そろそろSSDにしようかなぁなんて考えながら店の中をウロウロしてたら、何故かCPUを持ってレジに行ってしまいました…。

$ cat /proc/cpuinfo

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 240e Processor
stepping        : 2
cpu MHz         : 800.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov                                                                                                                                                                                                      pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp                                                                                                                                                                                                      lm 3dnowext 3dnow constant_tsc rep_good nopl pni monitor cx16 popcnt lahf_lm cm                                                                                                                                                                                                     p_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs ski                                                                                                                                                                                                     nit wdt
bogomips        : 5639.71
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 240e Processor
stepping        : 2
cpu MHz         : 800.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov                                                                                                                                                                                                      pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp                                                                                                                                                                                                      lm 3dnowext 3dnow constant_tsc rep_good nopl pni monitor cx16 popcnt lahf_lm cm                                                                                                                                                                                                     p_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs ski                                                                                                                                                                                                     nit wdt
bogomips        : 5639.81
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
# cat /var/log/boot.log

Mar 13 02:35:20 localhost kernel: powernow-k8: Found 1 AMD Athlon(tm) II X2 240e Processor processors (2 cpu cores) (version 2.20.00)
Mar 13 02:35:20 localhost kernel: powernow-k8:    0 : pstate 0 (2800 MHz)
Mar 13 02:35:20 localhost kernel: powernow-k8:    1 : pstate 1 (2100 MHz)
Mar 13 02:35:20 localhost kernel: powernow-k8:    2 : pstate 2 (1600 MHz)
Mar 13 02:35:20 localhost kernel: powernow-k8:    3 : pstate 3 (800 MHz)

Apcupsd 3.14.8 Install (source)

停電対策としてApcupsd 3.14.8をインストールした時のメモ。

まずはApcupsdのサイトからtar玉を落としてくる。

$ cd /usr/local/src
$ tar zxvf apcupsd-3.14.8.tar.gz

で、うちのはAPC Smart-UPS用USBケーブルでUPSに接続していて、状態をブラウザで確認したいのでCGIも通す。

$ cd apcupsd-3.14.8
$ ./configure \
--enable-usb --with-upstype=usb --with-upscable=usb \
--enable-cgi --with-cgi-bin=/var/www/cgi-bin/apcupsd \
--with-log-dir=/var/log

makeしてinstall。

$ su
# make install

続く 🙂

ProFTPD 1.3.2 Install (rpm)

ProFTPD 1.3.2cをインストールした時のメモ。

  • Vine Linux 5.0
  • MySQL 5.1.41
  • ProFTPD 1.3.2c

まずはソースパッケージを落としてくる。

$ apt-get source proftpd
$ rpm -ivh proftpd-1.3.2c-1vl6.src.rpm

ユーザー管理をMySQLで行いたいのでspecに追記する。

$ cd ~/rpm/SPECS
$ vi proftpd.spec
%define _prefix		/usr
%define _localstatedir	/var/run
%define _sysconfdir	/etc
%define _rundir		/var/run/proftpd
%define tarballversion	1.3.2c
%define origversion	1.3.2c

Summary: ProFTPd -- Professional FTP Server.
Summary(ja): ProFTPd -- プロフェッショナル FTP サーバ
Name: proftpd
Epoch: 1
Version: %{origversion}
Release: 1%{?_dist_release}
License: GPL
Group: System Environment/Daemons
URL: http://www.proftpd.org/

Source0: ftp://ftp.proftpd.org/distrib/%{name}-%{origversion}.tar.bz2
Source1: proftpd.vine.conf
Source2: ftpusers.vine
Source3: proftpd.init
Source5: welcome.msg

# upstream bug fixes & security fixes

# auth 
Patch201: proftpd-1.3.1-use-system-auth-instead-of-pam_pwdb.patch

# iconv patch (CharsetLocal/CharsetRemote)
# Patch300: http://www.hakusan.tsg.ne.jp/tjkawa/software/misc/proftpd-iconv/pack/proftpd-1.3.0-iconv.patch.gz
Patch300: proftpd-1.3.1-iconv.patch.bz2

# fix build on recent kernel headers
# Patch400: proftpd-1.3.1-umode.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pam-devel, openldap-devel, openssl-devel
Requires: pam > 0.59
Obsoletes: wu-ftpd, anonftp
Provides: ftpserver

Vendor: Project Vine
Distribution: Vine Linux

%description
ProFTPd is an enhanced FTP server with a focus toward simplicity,
security, and ease of configuration.  It features a very Apache-like
configuration syntax, and a highly customizable server infrastructure,
including support for multiple 'virtual' FTP servers, anonymous FTP,
and permission-based directory visibility.

%description -l ja
ProFTPd は シンプルさ, セキュリティ, 設定の容易さに焦点をあてた 優れた
FTP サーバです。Apache に似た構文による設定や、複数の仮想 FTP サーバ、
anonymous FTP, パーミッションベースのディレクトリ可視性のサポートを含む、
高度にカスタマイズ可能なサーバ・インターフェイスを特徴としています。

%prep
%setup -q -n %{name}-%{tarballversion}
find . -type d -name CVS | xargs -r rm -frv

# upstream fixes

## patches from mdk
# use system-auth instaed of pam_pwdb
%patch201 -p1

# iconv patch (CharsetLocal/CharsetRemote)
%patch300 -p1

# fix build on recent kernel headers
# %patch400 -p0

%build
# Disable stripping in order to get useful debuginfo packages
%{__perl} -pi -e 's|"-s"|""|g' configure

%configure \
    --libexecdir="%{_libexecdir}/proftpd" \
    --localstatedir="%{_var}/run" \
    --enable-ctrls \
    --enable-facl \
    --enable-dso \
    --enable-ipv6 \
    --with-includes=/usr/include/openssl:/usr/include/mysql \
    --with-libraries=/usr/lib64:/usr/lib64/mysql \
    --with-modules=mod_tls:mod_load:mod_wrap2:mod_codeconv:mod_df \
    --with-shared=mod_quotatab:mod_quotatab_sql:mod_sql:mod_sql_mysql

# It seems that with _smp_mflags -lsupp tries to get linked before being built
# (as of 1.3.0a-4 F7/devel with koji, happened on F8 x86_64 and F7 ppc64)
%{__make}


%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot} \
    rundir="%{_var}/run/proftpd" \
    INSTALL_USER=`id -un` \
    INSTALL_GROUP=`id -gn`

# auth
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
%{__install} -m 644 contrib/dist/rpm/ftp.pamd %{buildroot}%{_sysconfdir}/pam.d/ftp

# logrotate
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
%{__install} -m 644 contrib/dist/rpm/proftpd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/proftpd

# init.d
%{__install} -D -p -m 0755 %{SOURCE3} \
    %{buildroot}%{_sysconfdir}/rc.d/init.d/proftpd

%{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/proftpd.conf
%{__install} -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/ftpusers
%{__install} -D -p -m 0644 %{SOURCE5} %{buildroot}/%{_var}/ftp/welcome.msg

touch %{buildroot}%{_sysconfdir}/ftpusers

rm contrib/README.* || :
# eliminate executable bit in %doc
find doc/ sample-configurations/ -type f -perm +111 | xargs -r chmod -x

# remove .{la,a}
rm -f %{buildroot}%{_libexecdir}/proftpd/*.{la,a}

# remove development files (headers and pkgconfig file)
# who need these files?
rm -rf %{buildroot}%{_includedir}/proftpd
rm -rf %{buildroot}%{_libdir}/pkgconfig

%preun
if [ -d %{_rundir} ] ; then
	rm -rf %{_rundir}/*
fi

if [ $1 = 0 ] ; then
	/sbin/chkconfig --del proftpd
fi

%postun
if [ $1 -ge 1 ]; then
    /sbin/service proftpd condrestart
fi

%post
/sbin/chkconfig --add proftpd


%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING CREDITS ChangeLog INSTALL NEWS
%doc README.{LDAP,PAM,modules} doc/*
%doc contrib/README contrib/xferstats.holger-preiss
%doc sample-configurations/
%{_sbindir}/*
%{_bindir}/*
%{_mandir}/*/*
%{_var}/ftp/welcome.msg
%dir %{_libexecdir}/proftpd/
%{_libexecdir}/proftpd/mod_*
%dir %{_rundir}
%dir %{_var}/ftp
%config %{_sysconfdir}/rc.d/init.d/proftpd
%config(noreplace) %{_sysconfdir}/pam.d/ftp
%config(noreplace) %{_sysconfdir}/proftpd.conf
%config(noreplace) %{_sysconfdir}/ftpusers
%config(noreplace) %{_sysconfdir}/logrotate.d/proftpd


%changelog
* Mon Dec 28 2009 Satoshi IWAMOTO  1.3.2c-1
- new upstream release with security fix (CVE-2009-3555)

* Wed Oct 21 2009 Satoshi IWAMOTO  1.3.2b-1
- new upstream release with security fix (NULL char in X.509 certificate)
- add chkconfig --add in post script

* Mon Jul 06 2009 Daisuke SUZUKI  1.3.2a-3
- remove .{la,a}
- remove headers and pkgconfig file

* Mon Jul  6 2009 Satoshi IWAMOTO  1.3.2a-2
- update Source1 (sample config file for vine)
  set default char set to UTF-8

* Fri Jul  3 2009 Satoshi IWAMOTO  1.3.2a-1
- new upstream release

* Sat Apr 04 2009 Daisuke SUZUKI  1.3.2-3
- rebuild with openldap-2.4.11

* Tue Mar 31 2009 Satoshi IWAMOTO  1.3.2-2
- built with openssl-0.9.8k

* Sat Feb 07 2009 Satoshi IWAMOTO  1.3.2-1
- new upstream release
- add configure option to activate new modules
- drop patch400

* Wed Jan 14 2009 Shu KONNO  1.3.1-6
- built with openssl-0.9.8j

* Mon Sep 22 2008 Shu KONNO  1.3.1-5
- built with openssl-0.9.8i

* Sun Aug 10 2008 MATSUBAYASHI Kohji  - 1.3.1-4
- add Patch400 to fix build failure at least on i386
- spec in UTF-8

* Tue Jul 15 2008 Shu KONNO  1.3.1-3
- built with openssl-0.9.8h

* Sun Mar 23 2008 Satoshi IWAMOTO  1.3.1-2
- update proftpd.vine.conf (use DisplayChdir instead of DisplayFirstChdir)

* Sun Mar 23 2008 Satoshi IWAMOTO  1.3.1-1
- new upstream release
- drop old patches which are included in new release
- update patch201, 300
- build under new versioning policy

* Mon Sep 10 2007 Satoshi IWAMOTO  1.3.0a-0vl1
- new upstream release
- built with openssl098
- drop old (for 1.2.10) patches
- Patch100-150 from FC8 package
- Patch160-170 from upstream CVS (maybe will be fixed in 1.3.1)
- update patch300 for 1.3.0
- change configure option refer to FC8
- add process reboot with message output when package is upgraded 
- docfiles list update
- fix changelog ver number typo

* Sun Sep 09 2007 Satoshi IWAMOTO  1.2.10-0vl6
- add patch202 for fix timestamp (backport from 1.3.0rc1 #2798)
  ()
- add Vendor/Distribution tag
- add patch104 for fix pr_ctrls_recv_request issue
- add patch103 for fix CVE-2006-6170
- add patch102 for fix CVE-2006-5815
- add patch101 for fix CVE-2006-6171

* Sun Aug 27 2006 NAKAMURA Kenta  1.2.10-0vl5
- rebuilt with openldap-2.3.27-0vl

* Sun Jul 02 2006 Satoshi MACHINO  1.2.10-0vl4
- rebuilt with openldap-2.3.24-0vl1

* Sun May 14 2006 Shoji Matsumoto  1.2.10-0vl3
- add patch300 for iconv patch

* Thu Mar 16 2006 Daisuke SUZUKI  1.2.10-0vl2
- enable mod_ldap
- add BuildRequires: openldap-devel, openssl-devel
- add Patch200 from MDK to support ldap
- add Patch201 from MDK to use system-auth instead of pam_pwdb
  (pam_pwdb is now obsolete, and will be removed in the future pam version)

* Fri Sep 09 2005 Satoshi IWAMOTO 
- 1.2.10-0vl1.1
- add patch100 for fix CAN-2005-2390

* Sun Sep 05 2004 Daisuke SUZUKI  1.2.10-0vl1
- new upstream release

* Tue Aug 03 2004 Daisuke SUZUKI  1.2.10-0vl0.3
- new upstream release (1.2.10rc3)
- build for Vine Linux 3.0

* Fri May 21 2004 IKEDA Katsumi  1.2.10-0vl0.1
- new upstream release
- fix security issue: http://secunia.com/advisories/11527/

* Tue Apr 13 2004 Daisuke SUZUKI  1.2.9-0vl1
- new upstream release

* Wed Sep 24 2003 Daisuke SUZUKI  1.2.8p-0vl1
- new upstream release
- fix security issue: http://xforce.iss.net/xforce/alerts/id/154

* Sun Mar  9 2003 Daisuke SUZUKI  1.2.8-0vl1
- new upstream release

* Fri Dec  6 2002 Daisuke SUZUKI  1.2.7-0vl1
- new upstream release 1.2.7
- add logrotate config file.
- move ftp home directory from /home/ftp to /var/ftp

* Mon Jun 10 2002 Daisuke SUZUKI  1.2.6-0vl1
- new upstream release 1.2.6

* Mon Jun 10 2002 Daisuke SUZUKI  1.2.5-0vl4
- new upstream release 1.2.5 (stable release version)

* Mon Jun 03 2002 Daisuke SUZUKI  1.2.5-0vl3
- new upstream release 1.2.5-rc3

* Mon Jan 28 2002 Toru Sagami  1.2.5-0vl2
- eliminate executable bit in %doc (requierment for /usr/bin/perl)
- put files in sample-configurations/ to the according directory
- remove unnecessary README.* files

* Thu Dec 20 2001 Toru Sagami  1.2.5-0vl1
- updated to 1.2.5rc1 for problems in file globbing

* Sun Oct 21 2001 Toru Sagami 
- 1.2.4-0vl1

* Fri Oct 19 2001 Toru Sagami 
- 1.2.3-0vl1

* Sat Aug 18 2001 Toru Sagami 
- 1.2.2-0vl1: update to 1.2.2 release
- added more documents

* Sun Jul 15 2001 Daisuke SUZUKI  1.2.2-0vl0.rc3
- update to 1.2.2rc3
- use macros

* Mon Jun 11 2001 MATSUBAYASHI 'Shaolin' Kohji 
- 1.2.1-0vl3
- rebuilt for VineSeed

* Tue Feb 27 2001 KAJIKI Yoshihiro  [1.2.1-0vl2]
- update to 1.2.1

* Tue Feb 27 2001 KAJIKI Yoshihiro  [1.2.0-0vl2]
- build for VineSeed

* Tue Feb 27 2001 KAJIKI Yoshihiro  [1.2.0-0vl1]
- update to 1.2.0
- set Epoch 1 to update from pre* and rc* version
 
* Tue Feb 20 2001 Toru Sagami 
- 1.2.0rc3-0vl3
- removed PreReq and postun about /etc/ftpusers stuff

* Mon Feb 19 2001 KAJIKI Yoshihiro  [1.2.0rc3-0vl3]
- remove setup of /etc/ftpusers in %%pre script
- add ftpusers.vine insted of the %%pre script
- remove contrib/README.* frpm %%files
- add BuildRequires: pam-devel

* Mon Feb 19 2001 KAJIKI Yoshihiro  [1.2.0rc3-0vl2]
- rebuild for VineSeed

* Wed Feb 07 2001 KAJIKI Yoshihiro  [1.2.0rc3-0vl1]
- update to 1.2.0rc3
- add 'TimesGMT FALSE' in default configuration file
- build on Vine 2.1

* Mon Feb 05 2001 Toru Sagami 
- modified pre script to make it run by bash2 and added PreReq
- remove /etc/ftpusers after uninstall

* Thu Feb 01 2001 MATSUBAYASHI 'Shaolin' Kohji 
- 1.2.0rc2-0vl8
- rebuilt on VineSeed

* Thu Feb 01 2001 KAJIKI Yoshihiro  [1.2.0rc2-0vl7]
- remove patch from CVS to avoid 'after 5min data brake'
- add passive patch insted of abobe CVS patch
- revival contribute's proftpd.init.d

* Tue Jan 23 2001 KAJIKI Yoshihiro  [1.2.0rc2-0vl6]
- fixed %pre script and remove /etc/ftpusers from files
- modify Japanese summary and descriptions

* Sun Dec 03 2000 Toru Sagami 
- actually fixed to make the package relocatable.
- non-root build failure by broken %prein, which should be %pre.
- dont include CVS directory in doc
- add %config /etc/rc.d/init.d/proftpd

* Tue Nov 14 2000 KAJIKI Yoshihiro  [1.2.0rc2-0vl4]
- correct config directive of the init.d script

* Wed Oct 18 2000 Yoshihiro Kajiki  [1.2.0rc2-0vl3]
- adopt current patch from CVS to avoid the 'put on passive mode' probrem

* Sun Jul 30 2000 Jun Nishii 
- 1.2.0rc2-0vl1
- obsoletes anonftp
- do not chkconfig --add in %post
- requires: pam
- added proftpd.vine.conf

* Fri Jul 28 2000 Daisuke SUZUKI 
- libtoolize for alpha

* Sat Jul 15 2000 Kazuhisa TAKEI
- [1.2.0rc2]

* Wed Jun 28 2000 Kazuhisa TAKEI
- repackaging for VineLinux

* Thu Oct 3 1999 O.Elliyasa 
- Multi package creation.
  Created core, standalone, inetd (&doc) package creations.
  Added startup script for init.d
  Need to make the "standalone & inetd" packages being created as "noarch"
- Added URL.
- Added prefix to make the package relocatable.

* Wed Sep 8 1999 O.Elliyasa 
- Corrected inetd.conf line addition/change logic.

* Sat Jul 24 1999 MacGyver 
- Initial import of spec.

ビルドする。

$ rpmbuild -bb --clean proftpd.spec

インストールする。

$ cd ../RPMS/x86_64
$ su
# rpm -ivh proftpd-1.3.2c-1vl5.x86_64.rpm

続く 🙂

Postfix 2.6.5 Install (rpm)

Postfix 2.6.5をVDAに対応させてビルドした時のメモ。

  • Vine Linux 5.0
  • Postfix 2.6.5
  • MySQL 5.1.41
  • Cyrus-SASL 2.1.23

まずはVine Seedからソースパッケージを落としてくる。

$ rpm -ivh postfix-2.6.5-2vl6.src.rpm

VDAパッチを落としてSOURCESフォルダに入れておく。

$ cd ~/rpm/SOURCES
$ wget http://vda.cvs.sourceforge.net/viewvc/*checkout*/vda/VDA/postfix-2.6.5-vda-ng.patch

続く 🙂

Cyrus-SASL 2.1.23 Install (rpm)

Cyrus-SASL 2.1.23をインストールをした時のメモ。

  • Vine Linux 5.0
  • Cyrus-SASL 2.1.23

まずはSASLライブラリが組み込まれてるかチェック。
後でSMTP認証の際に使用するので一応。
最近のディストリはほぼ間違いなく入っていると思うが念のため。

$ rpm qa | grep sasl
cyrus-sasl-devel-2.1.23-4vl5
cyrus-sasl-2.1.23-4vl5
cyrus-sasl-plain-2.1.23-4vl5
cyrus-sasl-md5-2.1.23-4vl5

SMTP認証にMySQLを使うので必要な物を入れる。

$ su
# apt-get install cyrus-sasl-sql-2.1.23-4vl5

続く 🙂

PHP 5.3.0 Install (rpm)

PHP 5.3.0をインストールした時のメモ。

  • Vine Linux 5.0
  • Apache 2.2.13
  • PHP 5.3.0

まずはソースパッケージを落としてくる。

$ apt-get source php5
$ rpm -ivh php5-5.3.0-1vl5.src.rpm

で、Apacheをworkerで動かしてるのでspecファイルをいじる。

$ cd ~/rpm/SPECS
$ vi php53.spec

--enable-maintainer-zts \
--with-tsrm-pthreads \

ビルドする。

$ rpmbuild -bb --clean php53.spec

そしてコーヒーを飲んで、インストールする。

$ cd ../RPMS/x86_64
$ su
# rpm -Uvh php5-5.3.0-1vl5.x86_64.rpm ...

続く 🙂

MySQL 5.1.41 Install (rpm)

MySQL 5.1.41をインストールした時のメモ。

  • Vine Linux 5.0
  • MySQL 5.1.41

ユーザ管理・エイリアスをMySQLにさせるので必要なrpmパッケージを入れる。

# apt-get install MySQL-server-5.1.41-1vl5 MySQL-client-5.1.41-1vl5 MySQL-shared-5.1.41-1vl5 MySQL-devel-5.1.41-1vl5

テストサーバはオールイン(多用途)サーバなんで、設定ファイルもそれ用に考えて選ぶ。

# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
# vi /etc/my.cnf

続く 🙂

HGST 7K1000.B HDT721016SLA380

入れ替えて1年が過ぎたテストサーバのHDDを換装。
静粛性に定評があったHGSTの250GBプラッターP7K500シリーズから、333GBプラッターのHGST 7K1000.B HDT721016SLA380へ換装。

# smartctl -i /dev/sda

=== START OF INFORMATION SECTION ===
Device Model:     Hitachi HDT721016SLA380
Serial Number:    
Firmware Version: ST1OA31B
User Capacity:    160,040,803,840 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Thu Feb  5 09:58:29 2010 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

換装後はどんどん倉庫用HDDが増えていく…。

Apache 2.2.13 Install (rpm)

Apache 2.2.13をインストールした時のメモ。

  • Vine Linux 5.0
  • Apache 2.2.13

まずはApacheのソースを落とす。

$ apt-get source apache2
$ rpm -ivh apache2-2.2.13-1vl5.src.rpm

VineのデフォルトではPreforkで動くので、後でPHPも合わせてWorkerで動かす為にspecファイルをいじる。

$ cd ~/rpm/SPECS
$ vi apache2-vl.spec
%define contentdir /path/to/directory
%define suexec_caller apache
%define mmn 20020903
%define pkgname apache2

Summary: Apache HTTP Server
Name: %{pkgname}
Version: 2.2.13
Release: 1%{_dist_release}
URL: http://httpd.apache.org/

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke

Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html.ja
Source3: apache2.logrotate
Source4: apache2.init
Source5: README.confd
Source6: vine.png
Source10: httpd.conf
Source11: ssl.conf
Source12: migration.html
Source13: migration.css
Source14: mod_ssl-Makefile.crt
Source14: mod_ssl-Makefile.crl
# add vine entry to config.layout
Source100: vine-config.layout
# man files 
Source101: apache2.8
Source102: apache2ctl.8
#Source103: config_vars.mk
# build/scripts patches
Patch1: httpd-2.1.10-apctl.patch
Patch2: httpd-2.2.3-apxs.patch
Patch3: httpd-2.0.45-deplibs.patch
Patch4: httpd-2.1.10-disablemods.patch
# features/functional changes
Patch21: httpd-2.0.40-xfsz.patch
Patch22: httpd-2.1.10-pod.patch
Patch23: httpd-2.0.45-export.patch
Patch24: httpd-2.0.48-corelimit.patch
# Bug fixes
Patch54: httpd-2.2.0-authnoprov.patch
Patch60: httpd-2.2.3-sslusername.patch

# Security fixes


License: Apache Software License
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: db4-devel, expat-devel
BuildRequires: findutils, perl, openldap-devel, zlib-devel
BuildRequires: apr-devel, apr-util-devel
BuildRequires: pcre-devel, sqlite3-devel
Requires: mailcap, gawk, file, findutils, apr, apr-util
Prereq: chkconfig, mktemp, fileutils
Prereq: sh-utils, textutils, shadow-utils
Provides: webserver
Provides: httpd = %{version}
Provides: httpd-mmn = %{mmn}
Conflicts: thttpd
Obsoletes: secureweb
Obsoletes: apache2-apr, apache2-apr-devel

%description
Apache is a powerful, full-featured, efficient, and freely-available
Web server. Apache is also the most popular Web server on the
Internet.

%package devel
Group: Development/Libraries
Summary: Development tools for the Apache HTTP server.
Obsoletes: secureweb-devel
Requires: libtool, httpd = %{version}
Requires: apr-devel, apr-util-devel

%description devel
The httpd-devel package contains the APXS binary and other files
that you need to build Dynamic Shared Objects (DSOs) for Apache.

If you are installing the Apache HTTP server and you want to be
able to compile or develop additional modules for Apache, you need
to install this package.

%package manual
Group: Applications/Documentation
Summary: Documentation for the Apache HTTP server.
Obsoletes: secureweb-manual

%description manual
The httpd-manual package contains the complete manual and
reference guide for the Apache HTTP server. The information can
also be found at http://httpd.apache.org/docs/.

%package -n mod_ssl-apache2
Group: System Environment/Daemons
Summary: SSL/TLS module for the Apache HTTP server
Epoch: 1
BuildPrereq: openssl-devel
Prereq: openssl, dev, /bin/cat
Requires: httpd, make, httpd-mmn = %{mmn}

%description -n mod_ssl-apache2
The mod_ssl module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.

%prep
%setup -q -n httpd-%{version}

%patch1 -p1 -b .apctl
%patch2 -p1 -b .apxs
#patch3 -p1 -b .deplibs
%patch4 -p1 -b .disablemods

%patch21 -p0 -b .xfsz
%patch22 -p1 -b .pod
%patch23 -p1 -b .export
%patch24 -p1 -b .corelimit

%patch54 -p1 -b .authnoprov
%patch60 -p1 -b .sslusername


# copy across the migration guide and sed it's location into apachectl
cp $RPM_SOURCE_DIR/migration.{html,css} .
%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \
	support/apachectl.in


# add Vine configure's option to config.layout
sed -e "s|${prefix}/lib|${prefix}/%{_lib}|" \
  < $RPM_SOURCE_DIR/vine-config.layout >> config.layout

# regenerate configure scripts
./buildconf

%build
# remove bundled apr, apr-util, pcre
rm -rf srclib/{apr,apr-util,pcre}

#CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
#AP_LIBS="-lssl -lcrypto"
#export CFLAGS AP_LIBS
CFLAGS="$RPM_OPT_FLAGS"
SH_LDFLAGS="-Wl,-z,relro"
export CFLAGS SH_LDFLAGS

%define mpms worker prefork
%define prefer_mpm prefork

AP_CONFOPTS="\
	--prefix=%{_sysconfdir}/apache2 \
	--exec-prefix=%{_prefix} \
	--bindir=%{_bindir} \
	--sbindir=%{_sbindir} \
	--mandir=%{_mandir} \
	--libdir=%{_libdir} \
	--sysconfdir=%{_sysconfdir}/apache2/conf \
        --includedir=%{_includedir}/apache2 \
	--libexecdir=%{_libdir}/apache2/modules \
	--datadir=%{contentdir} \
	--with-installbuilddir=%{_libdir}/apache2/build \
	--enable-layout=Vine \
 	--with-program-name=apache2 \
	--with-ldap \
	--enable-ldap --enable-authnz-ldap \
	--enable-mods-shared=all \
        --enable-cache=shared \
        --enable-cgi=shared \
        --enable-cgid=shared \
        --enable-rewrite=shared \
        --enable-disk-cache=shared \
        --enable-file-cache=shared \
        --enable-mem-cache=shared \
	--enable-authn-anon --enable-authn-alias \
	--with-apr=%{_prefix} --with-apr-util=%{_prefix} \
	--enable-suexec --with-suexec \
	--with-suexec-caller=%{suexec_caller} \
	--with-suexec-docroot=%{contentdir} \
	--with-suexec-logfile=%{_localstatedir}/log/apache2/suexec.log \
	--with-suexec-bin=%{_libdir}/%{pkgname}/suexec \
	--with-suexec-uidmin=500 --with-suexec-gidmin=500 \
	--with-pcre \
	--enable-ssl --with-ssl \
	--enable-deflate \
	--enable-proxy --enable-proxy-connect \
	--enable-proxy-http --enable-proxy-ftp"
#all  mpm build
for mpm in %{mpms}; do
   mkdir mpm-$mpm;
   cd mpm-$mpm;
   ../configure $AP_CONFOPTS --with-mpm=$mpm --srcdir=../ ;
   make %{?_smp_mflags} ;
#   mv apache2 apache2.$mpm ;
   cd ../
done

%install
rm -rf $RPM_BUILD_ROOT

# Classify ab and logresolve as section 1 commands, as they are in /usr/bin
cp -p docs/man/ab.8 docs/man/ab.1
sed -e "1s/logresolve 8/logresolve 1/" \
  < docs/man/logresolve.8 > docs/man/logresolve.1
#rm docs/man/logresolve.8

# install mpms binary 
pushd mpm-worker
  make DESTDIR=$RPM_BUILD_ROOT install
  rm -f $RPM_BUILD_ROOT/%{_sbindir}/apache2
popd

for mpm in %{mpms}; do
    install -m755 mpm-$mpm/apache2 $RPM_BUILD_ROOT/%{_sbindir}/apache2.$mpm
done

# install conf file/directory
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf.d
install -m 644 $RPM_SOURCE_DIR/README.confd \
   $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf.d/README
install -m 644 $RPM_SOURCE_DIR/ssl.conf \
   $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf.d/ssl.conf

rm $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/*.conf
install -m 644 $RPM_SOURCE_DIR/httpd.conf \
   $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/httpd.conf

# mod_ssl bits
for suffix in crl crt csr key prm; do
   mkdir $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/ssl.${suffix}
done

# Makefiles for certificate management
for ext in crt crl; do 
  install -m 644 $RPM_SOURCE_DIR/mod_ssl-Makefile.${ext} \
	$RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/ssl.${ext}/Makefile.${ext}
done
ln -s ../../../usr/share/ssl/certs/Makefile $RPM_BUILD_ROOT/etc/apache2/conf

# for holding mod_dav lock database
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav

# create a prototype session cache
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl
touch $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl/scache.{dir,pag,sem}

# move utilities to /usr/bin
mv $RPM_BUILD_ROOT%{_sbindir}/{ab,htdbm,logresolve,htpasswd,htdigest} \
   $RPM_BUILD_ROOT%{_bindir}

# Make the MMN accessible to module packages
echo %{mmn} > $RPM_BUILD_ROOT%{_includedir}/apache2/.mmn

# docroot
# mkdir $RPM_BUILD_ROOT%{contentdir}/html
install -m 644 $RPM_SOURCE_DIR/index.html.ja \
	$RPM_BUILD_ROOT%{contentdir}/error/noindex.html
rm -r $RPM_BUILD_ROOT%{contentdir}/manual/style

install -m 644 $RPM_SOURCE_DIR/vine.png \
	$RPM_BUILD_ROOT%{contentdir}/icons

# logs
# rmdir $RPM_BUILD_ROOT%{_sysconfdir}/apache2/logs
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/apache2

ln -sf %{_sysconfdir}/%{pkgname}/conf/httpd.conf $RPM_BUILD_ROOT/%{_sysconfdir}/%{pkgname}/conf/apache2.conf


# symlinks for /etc/apache2
ln -s ../..%{_localstatedir}/log/apache2 $RPM_BUILD_ROOT/etc/apache2/logs
ln -s ../..%{_localstatedir}/run $RPM_BUILD_ROOT/etc/apache2/run
ln -s ../..%{_libdir}/apache2/modules $RPM_BUILD_ROOT/etc/apache2/modules
ln -s ../..%{_libdir}/apache2/build $RPM_BUILD_ROOT/etc/apache2/build

# install SYSV init stuff
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m755 $RPM_SOURCE_DIR/apache2.init \
	$RPM_BUILD_ROOT/etc/rc.d/init.d/apache2
%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \
	$RPM_BUILD_ROOT/etc/rc.d/init.d/apache2	

# install log rotation stuff
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m644 $RPM_SOURCE_DIR/apache2.logrotate \
	$RPM_BUILD_ROOT/etc/logrotate.d/apache2

mv $RPM_BUILD_ROOT/%{_sbindir}/apachectl $RPM_BUILD_ROOT/%{_sbindir}/apache2ctl

# fix man page paths
sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/apache2/conf/httpd.conf|" \
    -e "s|/usr/local/apache2/conf/mime.types|/etc/mime.types|" \
    -e "s|/usr/local/apache2/conf/magic|/etc/apache2/conf/magic|" \
    -e "s|/usr/local/apache2/logs/error_log|/var/log/apache2/error_log|" \
    -e "s|/usr/local/apache2/logs/access_log|/var/log/apache2/access_log|" \
    -e "s|/usr/local/apache2/logs/httpd.pid|/var/run/apache2.pid|" \
    -e "s|/usr/local/apache2|/etc/httpd|" < $RPM_SOURCE_DIR/apache2.8 \
  > $RPM_BUILD_ROOT%{_mandir}/man8/apache2.8

install -m644 $RPM_SOURCE_DIR/apache2ctl.8 \
	$RPM_BUILD_ROOT%{_mandir}/man8/apache2ctl.8

# change command name to avoid conflict with apache1 pacjage
%define cflcmd /usr/bin/htdigest /usr/bin/htpasswd /usr/sbin/rotatelogs 

for i in %{cflcmd}; do \
  echo $i 
  mv $RPM_BUILD_ROOT$i $RPM_BUILD_ROOT$i"2";
done;

mv $RPM_BUILD_ROOT/%{_sbindir}/apxs $RPM_BUILD_ROOT/%{_bindir}/apxs

%define cflman usr/share/man/man1/dbmmanage.1 usr/share/man/man1/htdigest.1 usr/share/man/man1/htpasswd.1 usr/share/man/man8/rotatelogs.8 usr/share/man/man8/suexec.8 usr/share/man/man8/apxs.8 usr/share/man/man8/httpd.8

(cd $RPM_BUILD_ROOT;
for i in %{cflman}; do \
    echo $i | sed -e "s|\.1|2\.1|" -e "s|\.8|2\.8|" |    xargs mv $i ;
    
done;
)

#cp $RPM_SOURCE_DIR/config_vars.mk $RPM_BUILD_ROOT/%{_sysconfdir}/%{pkgname}/build/.
mv $RPM_BUILD_ROOT/%{_sbindir}/suexec $RPM_BUILD_ROOT/%{_libdir}/%{pkgname}/suexec


rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ab*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/logresolve*
# conflict with apache 1, so removed...
rm -f $RPM_BUILD_ROOT%{_mandir}/man8/ab*
rm -f $RPM_BUILD_ROOT%{_mandir}/man8/logresolve*

# remove unpackaged files
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/mime.types \
      $RPM_BUILD_ROOT%{_libdir}/*.la \
      $RPM_BUILD_ROOT%{_libdir}/*.exp \
      $RPM_BUILD_ROOT%{_libdir}/apache2/modules/*.exp \
      $RPM_BUILD_ROOT%{_libdir}/apache2/build/config.nice \
      $RPM_BUILD_ROOT%{_sbindir}/{apache2,checkgid,dbmmanage,envvars*} \
      $RPM_BUILD_ROOT%{contentdir}/html/* \
      $RPM_BUILD_ROOT%{contentdir}/cgi-bin/*

%pre
# Add the "apache" user
/usr/sbin/useradd -c "Apache" -u 48 \
	-s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || :

%triggerpostun -- apache < 2.0
/sbin/chkconfig --add apache2


%post
# Register the httpd service
for mpm in %{mpms}; do
  /sbin/update-alternatives --install %{_sbindir}/apache2 apache2 %{_sbindir}/apache2.$mpm 20;
done
/sbin/update-alternatives --install %{_sbindir}/apache2 apache2 %{_sbindir}/apache2.%{prefer_mpm} 30
/sbin/chkconfig --add apache2

%preun
if [ $1 = 0 ]; then
	/sbin/service apache2 stop > /dev/null 2>&1
	/sbin/chkconfig --del apache2
	for mpm in %{mpms}; do
	  /sbin/update-alternatives --remove apache2 %{_sbindir}/apache2.$mpm;
	done  
fi

%postun
if [ "$1" -ge 1 ]; then
	/sbin/service apache2 condrestart
fi
/sbin/ldconfig

%post -n mod_ssl-apache2
/sbin/ldconfig ### is this needed?
umask 077

if [ ! -f %{_sysconfdir}/apache2/conf/ssl.key/server.key ] ; then
%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/apache2/conf/ssl.key/server.key 2> /dev/null
fi

FQDN=`hostname`
if [ "x${FQDN}" = "x" ]; then
   FQDN=localhost.localdomain
fi

if [ ! -f %{_sysconfdir}/apache2/conf/ssl.crt/server.crt ] ; then
cat < < EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/apache2/conf/ssl.key/server.key -x509 -days 365 -out %{_sysconfdir}/apache2/conf/ssl.crt/server.crt 2>/dev/null
--
SomeState
SomeCity
SomeOrganization
SomeOrganizationalUnit
${FQDN}
root@${FQDN}
EOF
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)

%doc ABOUT_APACHE README CHANGES LAYOUT LICENSE
%doc migration.html migration.css

%dir %{_sysconfdir}/apache2
%{_sysconfdir}/apache2/modules
%{_sysconfdir}/apache2/logs
%{_sysconfdir}/apache2/run
%dir %{_sysconfdir}/apache2/conf
%config(noreplace) %{_sysconfdir}/apache2/conf/*.conf
%config(noreplace) %{_sysconfdir}/apache2/conf/magic

%config %{_sysconfdir}/logrotate.d/apache2
%config %{_sysconfdir}/rc.d/init.d/apache2

%dir %{_sysconfdir}/apache2/conf.d
%{_sysconfdir}/apache2/conf.d/README

%dir %{_sysconfdir}/apache2/conf/extra
%config %{_sysconfdir}/apache2/conf/extra/*

%dir %{_sysconfdir}/apache2/conf/original
%{_sysconfdir}/apache2/conf/original/*

%{_bindir}/ab
%{_bindir}/ht*
%{_bindir}/logresolve
%{_sbindir}/ht*
%{_sbindir}/apache2.*
%{_sbindir}/apache2ctl
%{_sbindir}/rotatelogs2
%attr(4510,root,%{suexec_caller}) %{_libdir}/%{pkgname}/suexec

%dir %{_libdir}/apache2
%dir %{_libdir}/apache2/modules
# everything but mod_ssl.so:
%{_libdir}/apache2/modules/mod_[a-r]*.so
%{_libdir}/apache2/modules/mod_s[petu]*.so
%{_libdir}/apache2/modules/mod_[t-z]*.so

%dir %{contentdir}
%dir %{contentdir}/cgi-bin
%dir %{contentdir}/html
%dir %{contentdir}/icons
%dir %{contentdir}/error
%dir %{contentdir}/error/include
%{contentdir}/icons/*
%{contentdir}/error/README
%{contentdir}/error/noindex.html
%config(noreplace) %{contentdir}/error/*.var
%config(noreplace) %{contentdir}/error/include/*.html

%attr(0700,root,root) %dir %{_localstatedir}/log/apache2

%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav

%{_mandir}/man1/*

%{_mandir}/man8/*

%files manual
%defattr(-,root,root)
%{contentdir}/manual

%files -n mod_ssl-apache2
%defattr(-,root,root)
%{_libdir}/apache2/modules/mod_ssl.so
%config(noreplace) %{_sysconfdir}/apache2/conf.d/ssl.conf
%attr(0700,root,root) %dir %{_sysconfdir}/apache2/conf/ssl.*
%config %{_sysconfdir}/apache2/conf/Makefile
%config %{_sysconfdir}/apache2/conf/ssl.*/*
%attr(0700,apache,root) %dir %{_localstatedir}/cache/mod_ssl
%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.dir
%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.pag
%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.sem

%files devel
%defattr(-,root,root)
%{_includedir}/apache2
%{_sysconfdir}/apache2/build
%{_bindir}/apxs
%{_mandir}/man8/apxs*
%{_libdir}/apache2/build/*.mk
%{_libdir}/apache2/build/*.sh

%changelog
* Sun Aug 09 2009 Daisuke SUZUKI  2.2.13-1
- new upstream release

* Wed Jul 29 2009 Daisuke SUZUKI  2.2.12-1
- new upstream release 
  (including security fix for CVE-2009-1890, CVE-2009-1191,
   CVE-2009-1195, CVE-2009-1955, CVE-2009-1956, CVE-2009-0023)

* Fri Jan 09 2009 NAKAMURA Kenta  2.2.11-2
- rebuilt with openldap-2.4.11

* Fri Jan  2 2009 Ryoichi INAGAKI  2.2.11-1
- new upstream release

* Sat Oct 18 2008 Ryoichi INAGAKI  2.2.10-1
- new upstream release (including security fix for CVE-2008-2939)

* Fri Jun 20 2008 Ryoichi INAGAKI  2.2.9-1
- new upstream release (including security fix for CVE-2008-2364, CVE-2007-6420)
- built with db4-4.6.21, apr 1.3.0

* Sun Apr 27 2008 Tomohiro 'Tomo-p' KATO  2.2.8-1
- add Patch60 (to fix bug#31418).

* Thu Feb 21 2008 AKIYAMA Kazuhito  2.2.8-0vl2
- rebuild with expat-2.0.1

* Tue Jan 22 2008 Daisuke SUZUKI  2.2.8-0vl1
- new upstream release

* Sat Nov  3 2007 Ryoichi INAGAKI  2.2.6-0vl2
- added postun script from VinePlus/4.0 package
  * Tue Sep 11 2007 Satoshi IWAMOTO  2.2.3-0vl3.2
  - add postun script to restart daemon with message

* Sun Jul 01 2007 NAKAMURA Kenta  2.2.3-0vl8
- updated Patch2: httpd-2.2.3-apxs.patch

* Sun Jun 24 2007 NAKAMURA Kenta  2.2.3-0vl7
- modified libdir in config.layout for lib64 architecture

* Sun May 27 2007 Ryoichi INAGAKI  2.2.3-0vl6
- rebuilt with openssl-0.9.8e

* Thu May 10 2007 MATSUBAYASHI Kohji  2.2.3-0vl5
- rebuilt with new toolchain and db4-4.3.x

* Tue Feb  7 2007 Ryoichi INAGAKI  2.2.3-0vl4
- added BuildRequires: pcre-devel, sqlite3-devel 

* Mon Sep 11 2006 Kazutaka HARADA  2.2.3-0vl3
- change manual Group to Applications/Documentation. 

* Sun Aug 27 2006 NAKAMURA Kenta  2.2.3-0vl2
- rebuilt with openldap-2.3.27-0vl1

* Sat Jul 29 2006 Ryoichi INAGAKI  2.2.3-0vl1
- new upstream release including security fix (CVE-2006-3747)

* Sun May 28 2006 Daisuke SUZUKI  2.2.2-0vl1
- new upstream release
  - update to 2.2.2
- remove apr/apr-devel subpackage, 
  use external apr/apr-util instead of internal one.

* Sun May 28 2006 Daisuke SUZUKI  2.0.58-0vl1
- new upstream release
- use apache2.prefork as default.

* Thu Mar 23 2006 Daisuke SUZUKI  2.0.55-0vl3
- rebuild to use new _localstatedir (rpm-4.4.2-0vl11)
- remove unpackaged files in %%install section

* Fri Jan 27 2006 Daisuke SUZUKI  2.0.55-0vl2
- fix logrotate configuration (use apache2.pid instead of httpd.pid)
  (BTS:10)
- use Epoch instead of Serial

* Sat Oct 15 2005 Daisuke SUZUKI  2.0.55-0vl1
- new upstream release
- drop obsolete security patches which is merged in upstream

* Sat Oct 08 2005 Daisuke SUZUKI  2.0.54-0vl1
- new upstream release

* Sun Sep 11 2005 Ryoichi INAGAKI  2.0.53-0vl2
- added Patch122 to 125 for secutiry fix
  (CAN-2004-{1268,2088,2700,2728})
- fix %install section

* Sun Apr 10 2005 Ryoichi INAGAKI  2.0.53-0vl1
- new upstream release

* Sat Nov 06 2004 Daisuke SUZUKI  2.0.52-0vl1
- new upstream release

* Sun Oct 24 2004 MATSUBAYASHI Kohji  2.0.50-0vl4
- rebuilt with db4-4.2.52

* Sat Sep  4 2004 USAMI Kosuke  - 2.0.50-0vl3
- separate apr, apr-devel packages
- add BuildPreReq: zlib-devel

* Sun Jul 11 2004 Daisuke SUZUKI  2.0.50-0vl2
- fix %%files to include instdso.sh
  thanks to jax 
- add %%{?_smp_mflags} to make option.

* Sun Jul  4 2004 IWAI, Masaharu  2.0.50-0vl1
- new upstream version

* Sun Nov 23 2003 IWAI, Masaharu  2.0.48-0vl1
- new upstream version

* Mon Sep 15 2003 IWAI, Masaharu  2.0.47-0vl1
- new upstream version
- update apxs patch (Patch101)
- fix dependency:
    - change file name to package name in Requires and {Build,}Prereq
- add BuildPrereq: openldap-devel
- update %%files section
- rename httpd.8 manpage

* Tue May 12 2003 Satoshi MACHINO  2.0.45-0vl1
- new upstream version
- used vine-config.layout in srclib

* Tue May 12 2003 Satoshi MACHINO  2.0.44-0vl9
- rebuild

* Sun Apr  6 2003 Kazuhisa TAKEI  2.0.44-0vl8
- change pkg name from mod_ssl to mod_ssl-apache2
- remove "apache-manual" entry from Obsoletes:

* Thu Apr  3 2003 Kazuhisa TAKEI  2.0.44-0vl7
- remove "mod_dav" and "apache-devel" from Obsoletes: 
- enable MPMS(worker %mpms )

* Sun Mar 30 2003 Kazuhisa TAKEI  2.0.44-0vl6
- add correct config_vars.mk

* Sun Mar 30 2003 Kazuhisa TAKEI  2.0.44-0vl5
- apply apxs's patch ( from Debian)

* Sun Mar 30 2003 Kazuhisa TAKEI  2.0.44-0vl4
- add apr-config,apu-config to devel's %file 

* Sun Mar 30 2003 Kazuhisa TAKEI  2.0.44-0vl3
- change apxs path ( /usr/sbin -> /usr/bin
- add symlink under /etc/apache2/conf
  (logs, run), httpd.conf -> apache2.conf
- fixed apache2 initscript.

* Sat Mar 29 2003 Kazuhisa TAKEI  2.0.44-0vl2
- build Vine Linux
- new upstream version
- sharing with apache1

* Wed Sep  4 2002 Nalin Dahyabhai  2.0.40-8
- link httpd with libssl to avoid library loading/unloading weirdness

* Tue Sep  3 2002 Joe Orton  2.0.40-7
- add LoadModule lines for proxy modules in httpd.conf (#73349)
- fix permissions of conf/ssl.*/ directories; add Makefiles for
  certificate management (#73352)

* Mon Sep  2 2002 Joe Orton  2.0.40-6
- provide "httpd-mmn" to manage module ABI compatibility

* Sun Sep  1 2002 Joe Orton  2.0.40-5
- fix SSL session cache (#69699)
- revert addition of LDAP support to apr-util

* Mon Aug 26 2002 Joe Orton  2.0.40-4
- set SIGXFSZ disposition to "ignored" (#69520)
- make dummy connections to the first listener in config (#72692)

* Mon Aug 26 2002 Joe Orton  2.0.40-3
- allow "apachectl configtest" on a 1.3 httpd.conf
- add mod_deflate
- enable LDAP support in apr-util
- don't package everything in /path/to/directory/error as config(noreplace)

* Wed Aug 21 2002 Bill Nottingham  2.0.40-2
- add trigger (#68657)

* Mon Aug 12 2002 Joe Orton  2.0.40-1
- update to 2.0.40

* Wed Jul 24 2002 Joe Orton  2.0.36-8
- improve comment on use of UserDir in default config (#66886)

* Wed Jul 10 2002 Joe Orton  2.0.36-7
- use /sbin/nologin as shell for apache user (#68371)
- add patch from CVS to fix possible infinite loop when processing
  internal redirects

* Wed Jun 26 2002 Gary Benson  2.0.36-6
- modify init script to detect 1.3.x httpd.conf's and direct users
  to the migration guide

* Tue Jun 25 2002 Gary Benson  2.0.36-5
- patch apachectl to detect 1.3.x httpd.conf's and direct users
  to the migration guide
- ship the migration guide

* Fri Jun 21 2002 Joe Orton 
- move /etc/httpd2 back to /etc/httpd
- add noindex.html page and poweredby logo; tweak default config
  to load noindex.html if no default "/" page is present.
- add patch to prevent mutex errors on graceful restart

* Fri Jun 21 2002 Tim Powers  2.0.36-4
- automated rebuild

* Wed Jun 12 2002 Joe Orton  2.0.36-3
- add patch to fix SSL mutex handling

* Wed Jun 12 2002 Joe Orton  2.0.36-2
- improved config directory patch

* Mon May 20 2002 Joe Orton 
- initial build; based heavily on apache.spec and mod_ssl.spec
- fixes: #65214, #58490, #57376, #61265, #65518, #58177, #57245

そしてビルド。

$ rpmbuild -bb --clean apache2-vl.spec

ビルド後インストール。

$ cd ../RPMS/x86_64
$ su
# rpm -ivh apache2-2.2.13-1vl5.x86_64.rpm apache2-devel-2.2.13-1vl5.x86_64.rpm mod_ssl-apache2-2.2.13-1vl5.x86_64.rpm

続く 🙂