Ad Widget

Collapse

RPM spec file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • linuxdan
    Junior Member
    • Sep 2008
    • 18

    #1

    RPM spec file

    Hello All

    I've been building RPMs for Zabbix via an old 1.4 spec file that I found floating around the net. I just keep updating it for newer versions of Zabbix. It's worked for me up through 1.6.2. Now I'm trying to upgrade to 1.6.4 and I'm running into problems. Does anyone else build zabbix RPMs for RHEL or CentOS? I'm not very familiar with RPMs and spec files so my spec file is just a horrible hack. I'll attach it in case anyone wants to play with it.

    Does anyone have a working spec file for 1.6.4?

    Cheers

    Dan
    Attached Files
  • t2y
    Member
    • Feb 2009
    • 60

    #2
    Hi linuxdan,

    I made zabbix-1.6.4 RPM package on CentOS 5.3.
    My spec file came from fedora project originally.

    You don't need to patch "zabbix-1.5.4-cpustats.patch". Because, this function is merged into zabbix-1.6.3.

    You can download from as follows hyper-link if you want my SRC.RPM.
    download zabbix-1.6.4-1.src.rpm
    Attached Files

    Comment

    • linuxdan
      Junior Member
      • Sep 2008
      • 18

      #3
      Doesn't quite work.

      That is odd, you spec file looks pretty much the same as mine except for those patches. However I'm still having problems. I get the following error:
      Code:
      rm: cannot remove `/var/tmp/zabbix-1.6.4-1-root-root/usr/sbin/zabbix_server': No such file or directory
      Anyone else running into this problem?

      Comment

      • t2y
        Member
        • Feb 2009
        • 60

        #4
        Hi linuxdan,

        I don't know the error factor. However, could you remove the directory manually?
        # rm -rf /var/tmp/zabbix-1.6.4-1-root-root/
        If above command cannot help, could you attach error log for rpmbuild?

        Comment

        • linuxdan
          Junior Member
          • Sep 2008
          • 18

          #5
          Don't know where the rpmbuild log is.

          Hey T2Y

          I hadn't thought of nuking the entire build dir. However that didn't help.
          I'd be glad to post a rpmbuild error log but I don't know where it is. Forgive my ignorance but I'm new to RPMs and a quick google for "rpmbuild error log" didn't turn up anything helpful. Where does rpmbuild store logs?

          Dan

          Comment

          • t2y
            Member
            • Feb 2009
            • 60

            #6
            Hi linuxdan,

            OK. I'm RPM specialist.
            About rpmbuild log which I want, you can get as follows.

            # rpmbuild -ba zabbix.spec > rpmbuild.log 2>&1

            Comment

            • linuxdan
              Junior Member
              • Sep 2008
              • 18

              #7
              Ah just a copy of the output.

              Ok I've attached a copy of the output from rpmbuild. I thought by the way you asked for it that there was an actual log file. Hope it helps you more than it helped me.

              Thanks Again

              Dan
              Attached Files

              Comment

              • t2y
                Member
                • Feb 2009
                • 60

                #8
                Hi linuxdan,

                I compared your rpmbuild.log and mine(it's succeeded).
                I think "zabbix_server" is not built normally in your environment.

                I found the diff about libcurl directory between yours and mine.
                I suspect rpmbuild cannot find the libcurl directory correctly, however, I'm not sure.

                -+ ./configure --host=i686-redhat-linux-gnu --build=i686-redhat-linux-gnu --target=i686-redhat-linux --program-prefix= --prefi
                x=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/inclu
                de --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodi
                r=/usr/share/info --enable-server --enable-agent --enable-proxy --enable-ipv6 --with-mysql --with-net-snmp --with-ldap --with-
                libcurl=/usr/src/redhat/SOURCES/libcurl/curl-7.19.0/curl-config --with-jabber --with-unixodbc
                ++ ./configure --host=i686-redhat-linux-gnu --build=i686-redhat-linux-gnu --target=i386-redhat-linux --program-prefix= --prefi
                x=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/inclu
                de --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodi
                r=/usr/share/info --enable-server --enable-agent --enable-proxy --enable-ipv6 --with-mysql --with-net-snmp --with-ldap --with-
                libcurl --with-jabber --with-unixodbc
                checking for a BSD-compatible install... /usr/bin/install -c
                checking whether build environment is sane... yes
                checking for a thread-safe mkdir -p... /bin/mkdir -p
                @@ -363,8 +361,8 @@
                checking for IKSEMEL... yes
                checking for getaddrinfo... yes
                checking for gawk... (cached) gawk
                -checking for curl-config... /usr/src/redhat/SOURCES/libcurl/curl-7.19.0/curl-config
                -checking for the version of libcurl... 7.19.0
                +checking for curl-config... /usr/bin/curl-config
                +checking for the version of libcurl... 7.15.5
                checking for libcurl >= version 7.13.1... yes
                checking for main in -lcurl... yes
                checking whether libcurl is usable... yes
                @@ -374,10 +372,10 @@
                checking whether unixodbc is usable... yes
                checking for net-snmp-config... /usr/bin/net-snmp-config
                checking for main in -lnetsnmp ... yes
                -checking for localname in struct snmp_session... no
                +checking for localname in struct snmp_session... yes
                checking for LDAP support... yes
                checking for architecture... ok (linux-gnu)
                -checking for the kernel version... 2.6 family (2.6.9-67.ELsmp)
                +checking for the kernel version... 2.6 family (2.6.18-128.1.6.el5)
                In my environment(CentOS5.3), the libcurl is provided by curl-devel package.
                # rpm -qf /usr/lib/libcurl.so
                curl-devel-7.15.5-2.1.el5_3.4
                Could you rpmbuild again after you installed curl-devel package into your environment?
                Last edited by t2y; 02-05-2009, 03:46.

                Comment

                • linuxdan
                  Junior Member
                  • Sep 2008
                  • 18

                  #9
                  curl-devel already installed

                  I already have curl-devel installed.

                  Code:
                  $ rpm -q curl-devel
                  curl-devel-7.12.1-11.1.el4_7.1
                  Also oddly enough I'm having the same problems building the RPMs on RHEL 5 which should be identical to CentOS 5 if I'm not mistaken. Thanks for all your help, and let me know if you have any other ideas.

                  Thanks

                  Dan

                  Comment

                  • t2y
                    Member
                    • Feb 2009
                    • 60

                    #10
                    Hi linuxdan,

                    Hmm, I have no idea.
                    You use my spec file, don't you? There is an unimaginable problem since it works for me. Dependency, library, or something,,,

                    Comment

                    • xaeth
                      Member
                      • Nov 2004
                      • 67

                      #11
                      BTW for anyone interested the Fedora SRPM can me utilized to build RHEL packages. It can be grabbed from their build system here:



                      One thing to keep in mind when installing some (if not all) SRPMs from F11+ is that you must use the --nomd5 otherwise you will see a invalid MD5 sum error.

                      Comment

                      Working...