Bug 246803

Summary: rpm: please add arm support
Product: [Fedora] Fedora Reporter: Lennert Buytenhek <buytenh>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: arm9   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-23 11:38:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 245418    
Attachments:
Description Flags
Spec file diff for ARM.
none
ARM config.guess tweak.
none
Implement RPMCANONGNU.
none
Remaining rpm ARM spec file fixes. none

Description Lennert Buytenhek 2007-07-05 01:53:20 UTC
These two patches enable building the rawhide rpm package on ARM
platforms.  The issues addressed are:

1. On ARM platforms, we need a slight tweak to config.guess to be able
   to detect ARM EABI platforms.  This patch was submitted to the
   upstream rpm project recently as part of a larger ARM patch, and
   while almost all of that patch was merged into 4.4.2.1-rc1, this
   particular hunk for some reason wasn't.

2. On ARM EABI platforms, we want %{_gnu} to expand to "-gnueabi" (since
   building for EABI is signaled to binutils/gcc/glibc/etc by configuring
   with a target triple that ends in -gnueabi.)  The attached patch does
   a blunt s/-gnu$/%{_gnu}/ over macros.in at prep time, which fixes it,
   but this might not be the cleanest method.  Ideas welcome.

These patches allow building the rawhide rpm package on the arm
platform.  Please considering applying them.

Thanks for your time.

Comment 1 Lennert Buytenhek 2007-07-05 01:53:20 UTC
Created attachment 158570 [details]
Spec file diff for ARM.

Comment 2 Lennert Buytenhek 2007-07-05 01:56:19 UTC
Created attachment 158571 [details]
ARM config.guess tweak.

Comment 3 Panu Matilainen 2007-07-09 09:21:04 UTC
Ah.. the reason why config.guess tweak didn't get applied is that it's not
version controlled but is inherited from system libtool at build. I can carry
the config.guess patch temporarily in rawhide but the proper fix is to get the
config.guess tweak to libtool itself.

The s/-gnu$/%{_gnu}/ hack doesn't look right to me as it basically creates a
cyclic %_gnu definition. A better fix might be to figure it out in configure.ac
and make macros.in have something like %_gnu @RPMCANONGNU@ ?

Comment 4 Lennert Buytenhek 2007-07-21 19:36:21 UTC
Created attachment 159729 [details]
Implement RPMCANONGNU.

Thanks for your comments!

This patch implements your RPMCANONGNU suggestion -- how does it look?
It seems to do the trick for me on ARM, and doesn't seem to break x86_64
at least.

Comment 5 Lennert Buytenhek 2007-07-21 20:02:04 UTC
I submitted the config.guess ARM EABI patch to upstream some time ago:

        http://savannah.gnu.org/patch/?5634

Could you carry it until it gets merged into upstream (at which point
it'll end up in libtool semi-automatically)?  I'll pester the upstream
maintainer about merging it a bit more.

Note that the redhat-rpm-config %configure macro copies config.guess
from /usr/lib/rpm/redhat into the build directory, and the copy of
config.guess in redhat-rpm-config was already updated to recognise ARM
EABI.  And so, packages that use %configure will get that version of
config.guess automatically.  However, the RH rpm spec file doesn't
use %configure, so it builds with its own version of config.guess.

Comment 6 Panu Matilainen 2007-07-23 11:38:56 UTC
Both issues should be fixed in next rawhide build (currently building), holler
if not...

Comment 7 Lennert Buytenhek 2007-08-04 16:45:22 UTC
Created attachment 160696 [details]
Remaining rpm ARM spec file fixes.

The attached spec file diff is still necessary.  With this applied,
things look good to me.  I'm doing a test build now to make sure.

Thanks again.