#15 Rpmbuild issues (was: Support for CentOS 4.4)

main
closed-fixed
unSpawn
5
2006-11-21
2006-10-31
Bradley Leonard
No

When running on CentOS 4.4 i get the following:

=== begin ===
[root@stygia tmp]# rkhunter -c

Rootkit Hunter 1.2.9 is running

Determining OS... Unknown
Warning: This operating system is not fully supported!
All MD5 checks will be skipped!

Checking binaries
* Selftests
Strings (command)
[ OK ]

* System tools
Skipped!

Check rootkits
* Default files and directories
=== end ===

Additionally, I am running on an AMD 64 system:

[root@stygia tmp]# uname -a
Linux stygia.stygianresearch.com 2.6.9-42.0.3.ELsmp #1
SMP Fri Oct 6 06:28:26 CDT 2006 x86_64 x86_64 x86_64
GNU/Linux

I have build a RPM of the rkhunter-1.2.9 via "rpmbuild
-ta rkhunter.1.2.9.tar.gz. The RPM puts files here:
[root@stygia security]# rpm -q -l rkhunter
/etc/cron.daily/01-rkhunter
/etc/rkhunter.conf
/usr/bin/rkhunter
/usr/lib64/rkhunter
/usr/lib64/rkhunter/scripts
/usr/lib64/rkhunter/scripts/check_modules.pl
/usr/lib64/rkhunter/scripts/check_port.pl
/usr/lib64/rkhunter/scripts/check_update.sh
/usr/lib64/rkhunter/scripts/filehashmd5.pl
/usr/lib64/rkhunter/scripts/filehashsha1.pl
/usr/lib64/rkhunter/scripts/showfiles.pl
/usr/share/doc/rkhunter-1.2.9
/usr/share/doc/rkhunter-1.2.9/CHANGELOG
/usr/share/doc/rkhunter-1.2.9/LICENSE
/usr/share/doc/rkhunter-1.2.9/README
/usr/share/doc/rkhunter-1.2.9/WISHLIST
/usr/share/man/man8/rkhunter.8.gz
/var/rkhunter/db
/var/rkhunter/db/backdoorports.dat
/var/rkhunter/db/defaulthashes.dat
/var/rkhunter/db/md5blacklist.dat
/var/rkhunter/db/mirrors.dat
/var/rkhunter/db/os.dat
/var/rkhunter/db/programs_bad.dat
/var/rkhunter/db/programs_good.dat
/var/rkhunter/tmp
[root@stygia security]#

You'll notice that the scripts are located in
/usr/lib64/rkhunter/scripts. However, rkhunter is
looking for them in /usr/lib/rkhunter/scripts. A
simple "ln -fs /usr/lib64/rkhunter /usr/lib/rkhunter"
fixes the problem.

Thanks.

Discussion

1 2 3 > >> (Page 1 of 3)
  • unSpawn
    unSpawn
    2006-11-02

    • assigned_to: nobody --> unspawn
    • status: open --> pending
     
  • unSpawn
    unSpawn
    2006-11-02

    Logged In: YES
    user_id=600864

    Hello Bradley,

    1. Support for CentOS 4.4 should not be an issue: it is in
    the current os.dat.
    Please make sure to update using only the Sourceforge mirror.

    2. .spec file /usr/lib vs /usr/lib64: I'll add that to the
    TODO list. Thanks.

    Cheers, unSpawn

     
  • Logged In: YES
    user_id=140796

    Thanks. Just before I got your response, I had downloaded
    hashupd.sh and ran it. That fixed the issue.

    Thanks.

     
    • status: pending --> open
     
  • unSpawn
    unSpawn
    2006-11-14

    • milestone: --> main
    • status: open --> pending-fixed
     
  • unSpawn
    unSpawn
    2006-11-14

    Logged In: YES
    user_id=600864

    > 2. .spec file /usr/lib vs /usr/lib64
    Installer and .spec file (%{_lib}) updated in CVS.
    Please test.

    TIA, unSpawn

     
    • status: pending-fixed --> open-fixed
     
  • Logged In: YES
    user_id=140796
    Originator: YES

    I've downloaded the entire source via cvs. I run rpmbuild -ta rkhunter-1.2.9.tar.gz and the RPM build fails. I looks like its defaulting to /usr/local instead of /usr. Here is the entire output:
    [root@stygia security]# rpmbuild -ta rkhunter-1.2.9.tar.gz
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.50818
    + umask 022
    + cd /usr/src/redhat/BUILD
    + LANG=C
    + export LANG
    + unset DISPLAY
    + cd /usr/src/redhat/BUILD
    + rm -rf rkhunter-1.2.9
    + /bin/gzip -dc /usr/local/src/security/rkhunter-1.2.9.tar.gz
    + tar -xf -
    + STATUS=0
    + '[' 0 -ne 0 ']'
    + cd rkhunter-1.2.9
    ++ /usr/bin/id -u
    + '[' 0 = 0 ']'
    + /bin/chown -Rhf root .
    ++ /usr/bin/id -u
    + '[' 0 = 0 ']'
    + /bin/chgrp -Rhf root .
    + /bin/chmod -Rf a+rX,u+w,g-w,o-w .
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.50818
    + umask 022
    + cd /usr/src/redhat/BUILD
    + cd rkhunter-1.2.9
    + LANG=C
    + export LANG
    + unset DISPLAY
    + exit 0
    Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.50818
    + umask 022
    + cd /usr/src/redhat/BUILD
    + cd rkhunter-1.2.9
    + LANG=C
    + export LANG
    + unset DISPLAY
    + sh ./installer.sh --install --layout RPM
    Checking system for:
    Rootkit Hunter installer files: found. OK
    available file retrieval tools:
    wget: found. OK
    expected default tool locations:
    perl: found. OK
    Starting installation/update

    Checking installation directories:
    Directory /var/tmp/rkhunter-1.2.9/usr/local/share/doc/rkhunter-1.2.9: exists, and is writable. OK
    Directory /var/tmp/rkhunter-1.2.9/usr/local/share/man/man8: exists, and is writable. OK
    Directory /var/tmp/rkhunter-1.2.9/etc: exists, and is writable. OK
    Directory /var/tmp/rkhunter-1.2.9/usr/local/bin: exists, and is writable. OK
    Directory /var/tmp/rkhunter-1.2.9/usr/local/lib/rkhunter/scripts: exists, and is writable. OK
    Directory /var/tmp/rkhunter-1.2.9/var/rkhunter/db: exists, and is writable. OK
    Directory /var/tmp/rkhunter-1.2.9/var/rkhunter/tmp: exists, and is writable. OK
    Installing check_modules.pl: OK.
    Installing check_update.sh: OK.
    Installing check_port.pl: OK.
    Installing filehashmd5.pl: OK.
    Installing filehashsha1.pl: OK.
    Installing showfiles.pl: OK.
    Installing backdoorports.dat: OK.
    Installing mirrors.dat: OK.
    Installing os.dat: OK.
    Installing programs_bad.dat: OK.
    Installing programs_good.dat: OK.
    Installing defaulthashes.dat: OK.
    Installing md5blacklist.dat: OK.
    Installing development/rkhunter.8: OK.
    Installing ACKNOWLEDGMENTS: OK.
    Installing CHANGELOG: OK.
    Installing FAQ: OK.
    Installing LICENSE: OK.
    Installing README: OK.
    Installing WISHLIST: OK.
    Installing rkhunter: OK.
    Installing rkhunter.conf in no-clobber mode: OK.
    >>>
    >>> PLEASE NOTE: inspect for update changes in /var/tmp/rkhunter-1.2.9/etc/rkhunter.conf.1163700295
    >>> and apply to /var/tmp/rkhunter-1.2.9/etc/rkhunter.conf before running Rootkit Hunter.
    >>>
    + /bin/mkdir -p /var/tmp/rkhunter-1.2.9//etc/cron.daily
    + /bin/cat
    + /bin/chmod a+rwx,g-w,o-rwx /var/tmp/rkhunter-1.2.9/etc/cron.daily/01-rkhunter
    + /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/rkhunter-1.2.9
    0 blocks
    find: /var/tmp/rkhunter-1.2.9/usr/lib/debug: No such file or directory
    + /usr/lib/rpm/redhat/brp-compress
    + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
    + /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
    Processing files: rkhunter-1.2.9-1
    error: File not found: /var/tmp/rkhunter-1.2.9/usr/local/lib64/rkhunter/scripts
    error: File not found by glob: /var/tmp/rkhunter-1.2.9/usr/local/lib64/rkhunter/scripts/*.pl
    error: File not found by glob: /var/tmp/rkhunter-1.2.9/usr/local/lib64/rkhunter/scripts/*.sh
    error: File not found: /var/tmp/rkhunter-1.2.9/usr/share/man/man8/rkhunter.8
    Processing files: rkhunter-debuginfo-1.2.9-1

    RPM build errors:
    File not found: /var/tmp/rkhunter-1.2.9/usr/local/lib64/rkhunter/scripts
    File not found by glob: /var/tmp/rkhunter-1.2.9/usr/local/lib64/rkhunter/scripts/*.pl
    File not found by glob: /var/tmp/rkhunter-1.2.9/usr/local/lib64/rkhunter/scripts/*.sh
    File not found: /var/tmp/rkhunter-1.2.9/usr/share/man/man8/rkhunter.8

     
  • unSpawn
    unSpawn
    2006-11-19

    • status: open-fixed --> pending-fixed
     
  • unSpawn
    unSpawn
    2006-11-19

    Logged In: YES
    user_id=600864
    Originator: NO

    Thanks for reporting again: installer and .spec file updated in CVS.
    Should work now: please test.

    TIA, unSpawn

     
1 2 3 > >> (Page 1 of 3)