[Momonga-devel.ja:01989] rpm の %_topdir と %optflags
- From: Yonekawa Susumu <yonekawa@xxxxxxxxxxx>
- Date: Wed, 30 Jul 2003 02:11:42 +0900 (JST)
よねかわです
ちょっと前から気になっていた修正をしてみました。自信が無いので自前で
commit せずにこちらへ投げてみます。査読 && 取り込みを よろしくおねがい
します。
・`rpmbuild -ba --target=i586-momonga-linux *.spec` すると、
%optflags を使っているパッケージはビルド失敗する
・%_topdir が /usr/src/redhat のままなので、
`rpm -ivh *.src.rpm` するとエラーになる
1点目は問題無いと思うのですが、2点目は '%_topdir' という響きが私の自
信を減らしています(細い仕組みがよくわかっていないもんで…)。
手元ではうまく動いているようですが、どうでしょうか?
添付ファイル
1. diffファイル。rpm-4.0.3-i686.patch と rpm.spec を修正
rpm-4.0.3-i686.patch は、CVS の pkgs/rpmrc をパクって
ます
2. rpm-momonga-topdir.patch
--
米川
? rpm-momonga-topdir.patch
Index: rpm-4.0.3-i686.patch
===================================================================
RCS file: /home/cvs/pkgs/rpm/rpm-4.0.3-i686.patch,v
retrieving revision 1.3
diff -u -r1.3 rpm-4.0.3-i686.patch
--- rpm-4.0.3-i686.patch 18 Nov 2002 18:55:17 -0000 1.3
+++ rpm-4.0.3-i686.patch 29 Jul 2003 17:04:37 -0000
@@ -6,8 +6,8 @@
optflags: i486 -O2 -march=i486
-optflags: i586 -O2 -march=i586
-optflags: i686 -O2 -march=i686
-+optflags: i586 -O6 -mcpu=i586 -Wall -fstrength-reduce -Wno-parentheses -ffast-math -malign-functions=2 -malign-jumps=2 -malign-loops=2
-+optflags: i686 -O6 -march=i686 -Wall -fstrength-reduce -Wno-parentheses -ffast-math -malign-functions=2 -malign-jumps=2 -malign-loops=2
++optflags: i586 -O2 -march=i586 -march=i586 -funroll-loops -fomit-frame-pointer -ffast-math -fstack-protector
++optflags: i686 -O2 -march=i686 -march=i686 -funroll-loops -fomit-frame-pointer -ffast-math -fstack-protector
+
optflags: athlon -O2 -march=athlon
optflags: ia64 -O2
Index: rpm.spec
===================================================================
RCS file: /home/cvs/pkgs/rpm/rpm.spec,v
retrieving revision 1.43
diff -u -r1.43 rpm.spec
--- rpm.spec 14 Jul 2003 14:42:59 -0000 1.43
+++ rpm.spec 29 Jul 2003 17:04:37 -0000
@@ -96,6 +96,7 @@
Patch133: rpm-4.0.4-cross-build.mv-f.patch
Patch134: rpm-4.0.4-modify-la.mv-f.patch
Patch135: rpm-4.0.4-modify-la.force_0644.patch
+Patch136: rpm-momonga-topdir.patch
#---------------------------------------------------------------------------
BuildPreReq: autoconf >= 2.52-8k
BuildPreReq: automake >= 1.5-8k
@@ -254,6 +255,7 @@
%patch133 -p0
%patch134 -p0
%patch135 -p1
+%patch136 -p1 -b .topdir
#---------------------------------------------------------------------------
%build
diff -urN rpm-4.0.4.orig/apidocs/html/config_macros.html rpm-4.0.4/apidocs/html/config_macros.html
--- rpm-4.0.4.orig/apidocs/html/config_macros.html 2003-07-06 15:09:16.000000000 +0900
+++ rpm-4.0.4/apidocs/html/config_macros.html 2003-07-30 00:16:48.000000000 +0900
@@ -173,7 +173,7 @@
%_tmppath %{_var}/tmp
# Path to top of build area.
-%_topdir %{_usrsrc}/redhat
+%_topdir %{_usrsrc}/momonga
# The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip}
diff -urN rpm-4.0.4.orig/apidocs/man/man3/config_macros.3 rpm-4.0.4/apidocs/man/man3/config_macros.3
--- rpm-4.0.4.orig/apidocs/man/man3/config_macros.3 2003-07-06 15:09:16.000000000 +0900
+++ rpm-4.0.4/apidocs/man/man3/config_macros.3 2003-07-30 00:16:58.000000000 +0900
@@ -172,7 +172,7 @@
%_tmppath %{_var}/tmp
# Path to top of build area.
-%_topdir %{_usrsrc}/redhat
+%_topdir %{_usrsrc}/momonga
# The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip}
diff -urN rpm-4.0.4.orig/macros.in rpm-4.0.4/macros.in
--- rpm-4.0.4.orig/macros.in 2003-07-30 00:14:00.000000000 +0900
+++ rpm-4.0.4/macros.in 2003-07-30 00:15:25.000000000 +0900
@@ -165,7 +165,7 @@
%_tmppath %{_var}/tmp
# Path to top of build area.
-%_topdir %{_usrsrc}/redhat
+%_topdir %{_usrsrc}/momonga
# The path to the unzip executable (legacy, use %{__unzip} instead).
%_unzipbin %{__unzip}
diff -urN rpm-4.0.4.orig/tests/macros.in rpm-4.0.4/tests/macros.in
--- rpm-4.0.4.orig/tests/macros.in 1999-09-30 08:29:58.000000000 +0900
+++ rpm-4.0.4/tests/macros.in 2003-07-30 00:16:30.000000000 +0900
@@ -72,7 +72,7 @@
%_specdir %{_topdir}/SPECS
%_srcrpmdir %{_topdir}/SRPMS
%_tmppath %{_var}/tmp
-%_topdir %{_usrsrc}/redhat
+%_topdir %{_usrsrc}/momonga
#
#==============================================================================
# ---- Optional rpmrc macros.