How is glibc-32bit created?

We need to patch glibc for the new GHOST vulnerability. Currently we use SLES 11 SP1 x86_64 (yes I know) and I’ve been able to rebuild the 64 series just fine but for the life of me I cannot figure out where the -32bit family of the packages came from so I can rebuild them. Doing an rpm -qa glibc-32bit I see the source rpm is glibc-2.11.1-0.34.1.nosrc.rpm but when I obtain it and try and ‘setarch i686 rpmbuild -ba glibc.spec’ it there are no references to -32bit, it won’t compile without heavy modifications, and when it does it spits out glibc-2.11…i686.rpm.

Does anyone know how these -32bit rpm’s from glibc are created so I can rebuild with my patch?

Thanks,
Tyler

These are actually forums for openSUSE, not SLES but you’ll find the answer here; https://forums.opensuse.org/showthread.php/417255-building-a-32-bit-lib-package-on-x86-64

On Fri 30 Jan 2015 08:56:01 PM CST, tyler ats wrote:

We need to patch glibc for the new GHOST vulnerability. Currently we use
SLES 11 SP1 x86_64 (yes I know) and I’ve been able to rebuild the 64
series just fine but for the life of me I cannot figure out where the
-32bit family of the packages came from so I can rebuild them. Doing an
rpm -qa glibc-32bit I see the source rpm is
glibc-2.11.1-0.34.1.nosrc.rpm but when I obtain it and try and ‘setarch
i686 rpmbuild -ba glibc.spec’ it there are no references to -32bit, it
won’t compile without heavy modifications, and when it does it spits out
glibc-2.11…i686.rpm.

Does anyone know how these -32bit rpm’s from glibc are created so I can
rebuild with my patch?

Thanks,
Tyler

Hi
You need to create a baselibs.conf file. Look on OBS for an example.

You don’t have LTSS?


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.32-33-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

On Fri 30 Jan 2015 09:36:08 PM CST, Miuku wrote:

These are actually forums for openSUSE, not SLES but you’ll find the
answer here; building a 32-bit lib package on x86-64 - Programming/Scripting - openSUSE Forums

Hi
This Build service forums covers any of the distributions available as
build targets, SLE is one of them so it’s moot.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.32-33-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Ah my bad, I thought f.s.c had their own OBS forum.

/tiphat.

Thanks for the response but I’m still a little lost.

LTSS does not provide the fix for the GHOST vulernablity and even if it did we prefer not to deviate from the currently installed version.

I see the OSC can do this but there are no RPM’s available for SLES 11 SP1. I even tried using the SLES11 SP2 RPM’s but it complained about python-urlgrabber dep which I cannot install…

As for baselibs.conf and the link you provided, I don’t really understand how to translate that for our SLES11 SP1 environment. It seems to me this should have already been provided in the src.rpm, no? Looking at the comments I see the following:

  • added baselibs.conf file to build xxbit packages for multilib support

Yes!! Except, it does not appear to exist:

test-db-01:/usr/src/packages> rm -rf SOURCES/*
test-db-01:/usr/src/packages> rpm -ivh /root/glibc-2.11.1-0.34.1.nosrc.rpm
1:glibc ########################################### [100%]
test-db-01:/usr/src/packages> find . -name baselibs.conf
test-db-01:/usr/src/packages>

Can someone help be better understand?

Thanks,

Hi
LTSS does provide the fix, else what’s the point of long term support? :wink:
https://www.suse.com/support/update/announcement/2015/suse-su-20150158-1.html
The glibc link I provided was the latest update which included the GHOST fix…

That’s right baselibs.conf doesn’t exist, you need to create it… that’s why I linked to the glibc example… the use of the conf file implemented later in life and as part of OBS.

Ah thanks, that link shows the fix. I cannot however install it:

test-db-01:/usr/src/packages>zypper in -t patch slessp1-glibc-10202
Refreshing service’nu_novell_com’.
Loading repositorydata…
Reading installedpackages…
'slessp1-glibc-10202’not found.
Resolving packagedependencies…

Nothing to do.
test-db-01:/usr/src/packages>cat /etc/SuSE-release
SUSE LinuxEnterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

Regardless, as I mentioned before, we are dealing with production environments and really need to keep the system unaltered as much as possible. If its what we have to do then fine but the patch itself is pretty simple and (hopefully) low impact and I would like to go down that route first. Would you be able to point me in the right direction for documentation on how to incorporate this baselibs.conf file so I can generate the -32bit packages off the src.rpm I already have.

Thanks again for the help
Tyler

I know this sounds dumb but what is your current glibc version? ( rpm -q glibc )

Did you manually refresh the repos before you tried the patch? ( zypper ref )

On Mon 02 Feb 2015 05:26:01 PM CST, tyler ats wrote:

Ah thanks, that link shows the fix. I cannot however install it:

test-db-01:/usr/src/packages>zypper in -t patch slessp1-glibc-10202
Refreshing service’nu_novell_com’.
Loading repositorydata…
Reading installedpackages…
'slessp1-glibc-10202’not found.
Resolving packagedependencies…

Nothing to do.
test-db-01:/usr/src/packages>cat /etc/SuSE-release
SUSE LinuxEnterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

Regardless, as I mentioned before, we are dealing with production
environments and really need to keep the system unaltered as much as
possible. If its what we have to do then fine but the patch itself is
pretty simple and (hopefully) low impact and I would like to go down
that route first. Would you be able to point me in the right direction
for documentation on how to incorporate this baselibs.conf file so I can
generate the -32bit packages off the src.rpm I already have.

Thanks again for the help
Tyler

Hi
If you don’t have a LTSS subscription they, no you wouldn’t be able to
see/download…

AFAIK you would copy it (baselibs.conf) to your build root SOURCES
directory, if on OBS just add to the build… You should AFAIK be able
to use the example on OBS I linked to.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.2 (Harlequin) (x86_64) GNOME 3.14.0 Kernel 3.16.7-7-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

After much hair pulling and the invention of new 4 letter words I finally figure this out. I ended up having to install osc for SLES 11 SP2 (we run SLES 11 SP1) and modify baselibs.conf pointed out by malcomlewis to not include the ‘block!’ suffix in the arch stanza.

For anyone having this issue here are the steps I needed to do:

  • Create an account on OBS https://build.opensuse.org
  • Checkout your home directory: osc co home:username
  • Create a new package project: osc mkpac glibc
  • Obtain the desired src.rpm and run ‘unrpm’ on it inside the package directory created previously.
  • Modify and add files as needed for your build.
  • Create the file baselibs.conf with these contents (NOTE: block! is not present):
    glibc
    arch i586
    targettype x86 +/etc/ld.so.conf
    targettype x86 “/lib/ld-linux.so.2 -> <prefix>/lib/ld-linux.so.2”
    targettype x86 obsoletes “baselibs-x86”
    targettype ia32 +/etc/ld.so.conf
    targettype ia32 “/lib/ld-linux.so.2 -> <prefix>/lib/ld-linux.so.2”
    prereq -glibc-x86
    +/usr/lib/getconf/^g]
    glibc-locale
    arch i586
    +/usr/lib(64)?/gconv/gconv-modules
    targettype x86-/usr/lib(64)?/gconv/gconv-modules
    glibc-devel
    requires “glibc-<targettype> = %version”
    arch i586
    +^/usr/include/gnu/stubs-.*.h$
    glibc-devel-static
    arch i586
    glibc-profile
    arch i586
    glibc-utils
  • Run ‘osc build-b SLE_11_SP2 i586 glibc.spec’ to create the RPMs.