Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26685

RPM spec files are using hardcoded -j24 make option

XMLWordPrintable

    • Support backlog

      Steps to reproduce:

      1. get SRPM from repo.zabbix.com for example for LTS 7.0 on RHEL 9 or RHEL 10

      Result:
      Example:

      ...
      
      %if 0%{?build_server} || 0%{?build_proxy}
      make_flags="EXTERNAL_SCRIPTS_PATH=/usr/lib/zabbix/externalscripts"
      %endif
      
      %if 0%{?build_server}
      make_flags="$make_flags ALERT_SCRIPTS_PATH=/usr/lib/zabbix/alertscripts"
      %endif
      
      # pass 1
      if [ -n "$build_conf_1" ]; then
              %configure $build_conf_common $build_conf_1
              make -j24 $make_flags
              mv src/zabbix_proxy/zabbix_proxy src/zabbix_proxy/zabbix_proxy_sqlite3
      fi
      
      
      # pass 2
      if [ -n "$build_conf_2" ]; then
              %configure $build_conf_common $build_conf_2
              make -j24 $make_flags
      %if 0%{?build_server}
              mv src/zabbix_server/zabbix_server src/zabbix_server/zabbix_server_pgsql
      %endif
      %if 0%{?build_proxy}
              mv src/zabbix_proxy/zabbix_proxy src/zabbix_proxy/zabbix_proxy_pgsql
      %endif
      fi
      
      ...
      
      [root@f4730f92fccf /]# grep -Rn 'j24' /root/rpmbuild/
      /root/rpmbuild/SPECS/zabbix.spec:652:	make -j24 $make_flags
      /root/rpmbuild/SPECS/zabbix.spec:660:	make -j24 $make_flags
      /root/rpmbuild/SPECS/zabbix.spec:673:	make -j24 $make_flags
      

      Expected:

      No hardcoded values for all rpm spec files.

      At least %{?_smp_mflags} is defined inside spec file and if you need to build with custom values it will be possible to use like this:

      rpmbuild -ba --define "_smp_mflags -j24" --define "_lto_cflags %{nil}" ...
      

            yurii Jurijs Klopovskis
            edgar.akhmetshin Edgar Akhmetshin
            Team I
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: