[Momonga-devel.ja:02571] Re: httpd.spec の suexec について
- From: yamagoo <yamagoo@xxxxxxxxxxxxxxxx>
- Date: Sun, 30 May 2004 17:14:50 +0900
yamagooです。
たぶちさんどうもありがとうございます。
が、ちと問題が・・・
Patchを適用している段階でコマンドがないっていって
オモコンが止まります。
んー。なんでだろ。
+ echo 'Patch #1 (httpd-2.0.40-apctl.patch):'
Patch #1 (httpd-2.0.40-apctl.patch):
+ patch -p0 -b --suffix $'.apctl\r' -s
+ echo 'Patch #2 (httpd-2.0.36-apxs.patch):'
Patch #2 (httpd-2.0.36-apxs.patch):
+ patch -p0 -b --suffix $'.apxs\r' -s
+ echo 'Patch #3 (httpd-2.0.36-sslink.patch):'
Patch #3 (httpd-2.0.36-sslink.patch):
+ patch -p0 -b --suffix $'.sslink\r' -s
+ $'\r'
: command not found595: line 44:
error: Bad exit status from /var/tmp/rpm-tmp.67595 (%prep)
こんな感じです。
> たぶちです.
>
> From: yamagoo <yamagoo@xxxxxxxxxxxxxxxx>
> Subject: [Momonga-devel.ja:02526] httpd.spec のsuexec について
> Date: Wed, 21 Apr 2004 19:12:26 +0900
> Message-ID: <20040421190311.E1C0.YAMAGOO@xxxxxxxxxxxxxxxx>
>
> > httpdのspecファイルでsuexec_callerがapacheに固定されているため
> > ビルド・インストール後httpd.confにてUser / Groupを変更した場合
> > public_html配下でsuexecされたcgiが動きません。
> >
> > また、UserとGroup名が違う場合も
> > > %attr(4510,root,%{suexec_caller}) %{_sbindir}/suexec
> > のところでGroup名にUser名が入ってしまうため不具合を起こします。
> >
> > 現状、バージョンアップのたびに毎回specファイルを書き換えることで
> > 対応しているのですが、
> > オモコンでビルドする際に別の定義ファイルをよみこんでここらへんを
> > 解決するようにはできないものでしょうか?
>
> specoptを使うように調整してみました.
>
> http://www.momonga-linux.org/%7Etab/httpd.spec
> を試してください.
>
> 差分は以下
>
> Index: httpd.spec
> ===================================================================
> --- httpd.spec (revision 1607)
> +++ httpd.spec (working copy)
> @@ -1,14 +1,15 @@
> -%define momorel 5
> +%global momorel 6
> Name: httpd
>
> ### include local configuration
> %{?include_specopt}
>
> -%define contentdir /var/www
> -%define suexec_caller apache
> -%define mmn 20020903
> -%{?!suexec_uidmin: %define suexec_uidmin 500}
> -%{?!suexec_gidmin: %define suexec_gidmin 500}
> +%global contentdir /var/www
> +%global mmn 20020903
> +%{?!suexec_caller_user: %global suexec_caller_user apache}
> +%{?!suexec_caller_group: %global suexec_caller_group apache}
> +%{?!suexec_uidmin: %global suexec_uidmin 500}
> +%{?!suexec_gidmin: %global suexec_gidmin 500}
>
> Summary: Apache HTTP Server
> Version: 2.0.49
> @@ -195,7 +196,7 @@
> --datadir=%{contentdir} \
> --with-mpm=$mpm \
> --enable-suexec --with-suexec \
> - --with-suexec-caller=%{suexec_caller} \
> + --with-suexec-caller=%{suexec_caller_user} \
> --with-suexec-docroot=%{contentdir} \
> --with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \
> --with-suexec-bin=%{_sbindir}/suexec \
> @@ -445,7 +446,7 @@
> %{_sbindir}/httpd.worker
> %{_sbindir}/apachectl
> %{_sbindir}/rotatelogs
> -%attr(4510,root,%{suexec_caller}) %{_sbindir}/suexec
> +%attr(4510,root,%{suexec_caller_group}) %{_sbindir}/suexec
>
> %dir %{_libdir}/httpd
> %dir %{_libdir}/httpd/modules
> @@ -533,7 +534,12 @@
> %{_libdir}/httpd/build/apr*.mk
>
> %changelog
> -* Thu May 21 2004 Yasuo Ohgaki <yohgaki@xxxxxxxxxxxxxxxxx>
> +* Sat May 22 2004 TABUCHI Takaaki <tab@xxxxxxxxxxxxxxxxx>
> +- (2.0.49-6m)
> +- adapt specopt suexec_caller_user and suexec_caller_group value
> + requested by [Momonga-devel.ja:02526]
> +
> +* Fri May 21 2004 Yasuo Ohgaki <yohgaki@xxxxxxxxxxxxxxxxx>
> - (2.0.49-5m)
> - work around sig HUP problem with PHP
> - add LoadModule for PHP
>
>
> ~/rpm/specopt/httpd.specopt
> というファイルに
> %{?!suexec_caller_user: %global suexec_caller_user hoge}
> %{?!suexec_caller_group: %global suexec_caller_group fuga}
> という内容を書いてbuildすると,
> defaultのapache:apacheでなくてhoge:fugaが使われます.
>
> 試してもらって問題が無ければcommitします.
>
> ---tab