From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <415E8C1E.5040909@yandex.ru> Date: Sat, 02 Oct 2004 15:08:14 +0400 From: =?KOI8-R?Q?=EE=C5=CD=CF=D3?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040808 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: ALT Linux Sisyphus discussion list Subject: Re: [sisyphus] I: pentium4 arch support in rpm References: <20040928124441.GE20415@immo.ru> <4159631D.3060804@solin.spb.ru> <20040928131850.GF20415@immo.ru> <415AE74F.5050701@yandex.ru> <20040929182549.GC3122@wrars-comp.wrarsdomain> <415BB88D.4030205@yandex.ru> <20040930075159.GG14252@immo.ru> <415C1EE9.6000902@yandex.ru> <20041001035650.GA4211@immo.ru> <415D6073.6040106@yandex.ru> <20041001141157.GP4211@immo.ru> In-Reply-To: <20041001141157.GP4211@immo.ru> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig88D88B911B66C7B34492B729" X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nemos-linux@yandex.ru, ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2004 11:08:28 -0000 Archived-At: List-Archive: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig88D88B911B66C7B34492B729 Content-Type: multipart/mixed; boundary="------------070309080809040209030302" This is a multi-part message in MIME format. --------------070309080809040209030302 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Alexey I. Froloff пишет: > * Немос [041001 17:50]: > >>А кто нибудь может сказать удалось нормально собрать пропатченым rpm не в >>хашере. > > Мне же и удалось. rpm -bb --target i586 rpm-4_0.spec, все нужные > файлы создались. Нашел в чем проблема кажись все таки ошибка в вашем патче: вместо + i[3456]86|k6|athlon|pentium4) SUBSTS='s_\(i[3456]86\|k6\|athlon|pentium4\)_i386_ и т.д. должено быть + i[3456]86|k6|athlon|pentium4) SUBSTS='s_\(i[3456]86\|k6\|athlon\|pentium4\)_i386_ и т.д. После этой правке(и аналогичных в этой же строке) все собирается нормально. В аттаче суммарный патч для rpm добавляющий поддержку pentium4 и athlonxp, и патч для libtool_1.5 (думаю и для 1.4 пойдет) добавлющий поддержку athlonxp-alt-linux. --------------070309080809040209030302 Content-Type: text/x-patch; name="rpm-4_0-4.0.4-alt-pentium4-and-athlonxp-arch.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rpm-4_0-4.0.4-alt-pentium4-and-athlonxp-arch.patch" diff -urN rpm-4_0-4.0.4-orig/installplatform rpm-4_0-4.0.4/installplatform --- rpm-4_0-4.0.4-orig/installplatform 2002-03-26 01:36:00 +0300 +++ rpm-4_0-4.0.4/installplatform 2004-10-02 14:23:41 +0400 @@ -35,7 +35,7 @@ ln -s ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${OS} case "$arch" in - i[3456]86|k6|athlon) SUBSTS='s_\(i[3456]86\|k6\|athlon\)_i386_ s_\(i[3456]86\|k6\|athlon\)_i486_ s_\(i[3456]86\|k6\|athlon\)_i586_ s_\(i[3456]86\|k6\|athlon\)_i686_ s_\(i[3456]86\|k6\|athlon\)_k6_ s_\(i[3456]86\|k6\|athlon\)_athlon_' ;; + i[3456]86|k6|athlon|athlonxp|pentium4) SUBSTS='s_\(i[3456]86\|k6\|athlon\|athlonxp\|pentium4\)_i386_ s_\(i[3456]86\|k6\|athlon\|athlonxp\|pentium4\)_i486_ s_\(i[3456]86\|k6\|athlon\|athlonxp\|pentium4\)_i586_ s_\(i[3456]86\|k6\|athlon\|athlonxp\|pentium4\)_i686_ s_\(i[3456]86\|k6\|athlon\|athlonxp\|pentium4\)_k6_ s_\(i[3456]86\|k6\|athlon\|athlonxp\|pentium4\)_athlon_ s_\(i[3456]86\|k6\|athlon\|athlonxp\|pentium4\)_athlonxp_ s_\(i[3456]86\|k6\|athlon\|athlonxp\|pentium4\)_pentium4_' ;; alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;; sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;; powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6]\|$\)_ppc64\1_' ;; diff -urN rpm-4_0-4.0.4-orig/lib/rpmrc.c rpm-4_0-4.0.4/lib/rpmrc.c --- rpm-4_0-4.0.4-orig/lib/rpmrc.c 2004-02-29 17:14:02 +0300 +++ rpm-4_0-4.0.4/lib/rpmrc.c 2004-10-02 14:23:41 +0400 @@ -1031,7 +1031,7 @@ } #endif -static const char *checkAMD( void ) +static const char *checkCPU( void ) { int fd = open( "/proc/cpuinfo", O_RDONLY ); if ( !fd ) @@ -1044,14 +1044,22 @@ read( fd, buffer, sizeof buffer - 1 ); close( fd ); - if ( !strstr( buffer, "AMD" ) ) - return 0; + if ( strstr( buffer, "AMD" ) ) { + if ( strstr( buffer, "Athlon(tm) XP" ) ) + return "athlonxp"; + + if ( strstr( buffer, "Athlon" ) || strstr( buffer, "Duron" ) ) + return "athlon"; - if ( strstr( buffer, "Athlon" ) || strstr( buffer, "Duron" ) ) - return "athlon"; + if ( strstr( buffer, "K6" ) ) + return "k6"; + } - if ( strstr( buffer, "K6" ) ) - return "k6"; + if ( strstr( buffer, "Intel" ) ) { + /* XXX: check for Xeon(R) */ + if ( strstr( buffer, "Pentium(R) 4" ) ) + return "pentium4"; + } return 0; } @@ -1290,9 +1298,9 @@ if ( !strcmp( un.machine, "i586" ) || !strcmp( un.machine, "i686" ) ) { - const char *amd = checkAMD(); - if ( amd ) - strcpy( un.machine, amd ); + const char *cpu = checkCPU(); + if ( cpu ) + strcpy( un.machine, cpu ); } # endif diff -urN rpm-4_0-4.0.4-orig/macros.in rpm-4_0-4.0.4/macros.in --- rpm-4_0-4.0.4-orig/macros.in 2004-02-04 16:37:46 +0300 +++ rpm-4_0-4.0.4/macros.in 2004-10-02 14:23:41 +0400 @@ -812,8 +812,8 @@ # rpm can use regular expressions against target platforms in macro # conditionals. # -%intel i386 i486 i586 i686 i786 i886 i986 -%amd k6 athlon +%intel i386 i486 i586 i686 i786 i886 i986 pentium4 +%amd k6 athlon athlonxp %ix86 %intel %amd #------------------------------------------------------------------------ diff -urN rpm-4_0-4.0.4-orig/Makefile.am rpm-4_0-4.0.4/Makefile.am --- rpm-4_0-4.0.4-orig/Makefile.am 2004-01-21 18:15:19 +0300 +++ rpm-4_0-4.0.4/Makefile.am 2004-10-02 14:23:41 +0400 @@ -140,7 +140,9 @@ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i486 ;\ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i586 ;\ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i686 ;\ - $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\ + $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;\ + $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlonxp ;\ + $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/pentium4 ;;\ alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\ sparc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc ;\ diff -urN rpm-4_0-4.0.4-orig/rpmrc.in rpm-4_0-4.0.4/rpmrc.in --- rpm-4_0-4.0.4-orig/rpmrc.in 2003-09-12 20:09:59 +0400 +++ rpm-4_0-4.0.4/rpmrc.in 2004-10-02 14:23:41 +0400 @@ -17,6 +17,8 @@ optflags: i686 %optflags_default -march=i686 optflags: k6 %optflags_default -march=k6 optflags: athlon %optflags_default -march=athlon +optflags: athlonxp %optflags_default -march=athlon-xp -mcpu=athlon-xp -msse -m3dnow -mmmx -mfpmath=sse +optflags: pentium4 %optflags_default -march=pentium4 optflags: ia64 %optflags_default # XXX Please note that -mieee has been added in rpm-3.0.5. @@ -67,6 +69,8 @@ ############################################################# # Canonical arch names and numbers +arch_canon: pentium4: pentium4 1 +arch_canon: athlonxp: athlonxp 1 arch_canon: athlon: athlon 1 arch_canon: i686: i686 1 arch_canon: k6: k6 1 @@ -164,6 +168,8 @@ buildarchtranslate: ia64: ia64 +buildarchtranslate: pentium4: pentium4 +buildarchtranslate: athlonxp: athlonxp buildarchtranslate: athlon: athlon buildarchtranslate: i686: i686 buildarchtranslate: k6: k6 @@ -210,6 +216,8 @@ arch_compat: alphaev5: alpha arch_compat: alpha: axp noarch +arch_compat: pentium4: i686 +arch_compat: athlonxp: athlon arch_compat: athlon: i686 k6 arch_compat: i686: i586 arch_compat: k6: i586 @@ -297,6 +305,8 @@ buildarch_compat: ia64: noarch +buildarch_compat: pentium4: i686 +buildarch_compat: athlonxp: athlon buildarch_compat: athlon: i686 k6 buildarch_compat: i686: i586 buildarch_compat: k6: i586 diff -urN rpm-4_0-4.0.4-orig/rpm.spec.in rpm-4_0-4.0.4/rpm.spec.in --- rpm-4_0-4.0.4-orig/rpm.spec.in 2002-06-05 15:06:46 +0400 +++ rpm-4_0-4.0.4/rpm.spec.in 2004-10-02 14:23:41 +0400 @@ -355,9 +355,11 @@ %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmpopt* %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmrc -%ifarch i386 i486 i586 i686 athlon +%ifarch i386 i486 i586 i686 athlon athlonxp pentium4 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/i[3456]86* %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/athlon* +%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/athlonxp* +%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/pentium4* %endif %ifarch alpha alphaev5 alphaev56 alphapca56 alphaev6 alphaev67 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/alpha* --------------070309080809040209030302 Content-Type: text/x-patch; name="libtool_1.5.8-alt-athlonxp_alt_linux-machine.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libtool_1.5.8-alt-athlonxp_alt_linux-machine.patch" diff -urN libtool-1.5.8-orig/config.sub libtool-1.5.8/config.sub --- libtool-1.5.8-orig/config.sub 2004-08-07 16:14:19 +0400 +++ libtool-1.5.8/config.sub 2004-09-30 10:26:50 +0400 @@ -787,7 +787,7 @@ pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) + pentiumpro | p6 | 6x86 | athlon | athlonxp | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) @@ -799,7 +799,7 @@ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlonxp-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) diff -urN libtool-1.5.8-orig/libltdl/config.sub libtool-1.5.8/libltdl/config.sub --- libtool-1.5.8-orig/libltdl/config.sub 2004-08-07 16:14:19 +0400 +++ libtool-1.5.8/libltdl/config.sub 2004-09-30 10:26:31 +0400 @@ -787,7 +787,7 @@ pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) + pentiumpro | p6 | 6x86 | athlon | athlonxp | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) @@ -799,7 +799,7 @@ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlonxp-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) --------------070309080809040209030302-- --------------enig88D88B911B66C7B34492B729 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBXoweynzxTJycySERAnD5AKC14APoLA1YIDoXD6No/4Medvre+QCfec7i IAr1ZIv+UxrfQr2lIrovM8E= =+bCq -----END PGP SIGNATURE----- --------------enig88D88B911B66C7B34492B729--