Results 1 to 3 of 3

Thread: CentOS RPM issues on x86_64

  1. #1

    Default CentOS RPM issues on x86_64

    The RPM specfile contains some Requires: lines that make the resulting RPM unable to install on 64-bit only systems without dragging in unnecessary 32-bit libraries.

    The Fedora packaging guidelines recommend that Requires: lines should be avoided if possible (for exactly this reason), and RPM should be allowed to compute RPM dependencies:

    [url]https://fedoraproject.org/wiki/Packaging/Guidelines#Requires[/url]

    These standards have been adopted by RH for the RHEL distribution.

    Without the Requires: lines, dependencies are still computed correctly:
    Code:
    [jman@dev-centos amanda]$ rpm -qp --requires amanda-backup_server-2.6.1p1-2.rhel5.x86_64.rpm
    [...]
    libc.so.6()(64bit)
    libm.so.6()(64bit)
    libnsl.so.1()(64bit)
    libtermcap.so.2()(64bit)
    [...]
    I rebuilt the zmanda RPM for our site because we require the '--with-smbclient' configure option for backing up Windows hosts. Perhaps the Zmanda packagers could consider adding this option to their RPMs, at least as a rebuild option.

    Patch for both of these changes (modifications for CentOS only; should also be applied to Fedora and RHEL) is below.

    John

    Code:
    [jman@dev-centos amanda]$ diff -u amanda.spec F/amanda.spec
    --- amanda.spec 2009-05-26 10:28:01.000000000 +0800
    +++ F/amanda.spec       2009-05-25 16:13:35.000000000 +0800
    @@ -112,7 +112,6 @@
             %define dist redhat
             %define disttag rhel
             %define distver 5
    -       %define requires_libtermcap Requires: libtermcap.so.2
         %endif
    
         # If dist is undefined, we didn't detect.
    @@ -148,7 +147,7 @@
    
     # Define amanda_version if it is not already defined.
     %{!?amanda_version: %define amanda_version 2.6.1p1}
    -%{!?amanda_release: %define amanda_release 1}
    +%{!?amanda_release: %define amanda_release 2}
     %define amanda_version_info "Amanda Community Edition - version %{amanda_version}"
     %define amanda_user amandabackup
     %define amanda_group disk
    @@ -197,9 +196,6 @@
     Requires: fileutils
     Requires: grep
     Requires: gnuplot
    -Requires: libc.so.6
    -Requires: libm.so.6
    -Requires: libnsl.so.1
     Requires: curl >= 7.10.0
     Requires: openssl
     Requires: xinetd
    @@ -219,9 +215,6 @@
     %{?requires_libtermcap}
     %{?requires_initscripts}
     Requires: xinetd
    -Requires: libc.so.6
    -Requires: libm.so.6
    -Requires: libnsl.so.1
     Requires: perl >= 5.6.0
     Requires: tar >= %{tarver}
     Requires: readline
    @@ -236,9 +229,6 @@
     Requires: /bin/awk
     Requires: fileutils
     Requires: grep
    -Requires: libc.so.6
    -Requires: libm.so.6
    -Requires: libnsl.so.1
     %{?requires_libtermcap}
     %{?requires_initscripts}
     Requires: xinetd
    @@ -352,6 +342,7 @@
             --libdir=%{LIBDIR} \
             --includedir=%{INCLUDEDIR} \
            --with-amdatadir=%{AMDATADIR} \
    +       --with-smbclient=/usr/bin/smbclient \
             --with-gnuplot=/usr/bin/gnuplot \
             --with-gnutar=/bin/tar \
             --with-gnutar-listdir=%{AMANDAHOMEDIR}/gnutar-lists \
    @@ -1593,6 +1584,10 @@
     # --- ChangeLog
    
     %changelog
    +* Mon May 25 2009 John Morris <jman@ablesky.com> - 2.6.1p1-2
    +- Add --with-smbclient for backing up windogs
    +- remove incorrect Requires:  libm.so.*, libc.so.*, libtermcap.so.*, libnsl.so.*
    +
     * Mon Sep 15 2008 Dan Locks <dwlocks at zmanda dot com> 2.6.1alpha
     - Added detection of CentOS 4 and 5 as suggested by dswartz
     - graceful failure when Distro/version is not detected correctly

  2. #2
    Join Date
    Feb 2008
    Posts
    34

    Default CentOS RPM issues on x86_64

    I'll have to double check whether the ancient fedora/rhel versions we support have old enough versions of RPM that the "Requires: lib*.so " are actually necessary. If not, I'll gladly toss them out. At the very least, I can conditionalize the Requires: to only affect old platforms.

    Generally, you're right about pulling in 32bit dependencies, and our solution in the past has been to delete the offending Requires: lines.

    As for "--with-smbclient=", ./configure finds /usr/bin/smbclient without adding this flag on my systems. Are you sure it's necessary?

    Dan
    -Zmanda Software Release Engineer Extrordinaire

  3. #3

    Default --with-smbclient not needed

    Dan, thanks for the quick reply.

    Quote Originally Posted by dwlocks View Post
    I'll have to double check whether the ancient fedora/rhel versions we support have old enough versions of RPM that the "Requires: lib*.so " are actually necessary. If not, I'll gladly toss them out. At the very least, I can conditionalize the Requires: to only affect old platforms.
    That would be great. The specfile does a pretty good job of identifying distro/release, so this shouldn't be too hard. I'd help out, but I don't have these other distros in front of me to test on.

    I've never understood why the distros don't put macros in the global RPM config that identify themselves and eliminate the necessity for the gymnastics of searching through /etc/redhat-release.

    As for "--with-smbclient=", ./configure finds /usr/bin/smbclient without adding this flag on my systems. Are you sure it's necessary?
    I went back and checked (had to remove the '--quiet' option from the specfile's ./configure statement), and no, it's not necessary. I've been carrying this modification for a while now, and am not sure if it's a remnant from an older version of amanda or if I once had something misconfigured and thought I solved it by adding this. Sorry for the noise.

    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •