[Bug 1069988] New Package Build: Naemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1069988

Christopher Meng <cickumqt@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cickumqt@xxxxxxxxx



--- Comment #1 from Christopher Meng <cickumqt@xxxxxxxxx> ---
Ugly spec.

Please cleanup:

1. %if %{defined suse_version}

No SUSE please.

2. %define --> %global

https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over_.25define

3. Remove these:

Packager: Naemon Core Development Team <naemon-dev@xxxxxxxxxxxxxxxxxxxx>
Vendor: Naemon Core Development Team

https://fedoraproject.org/wiki/Packaging:Guidelines#Tags

4. Remove this:

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}

5. %if 0%{?el7}%{?fc20}%{?fc21}%{?fc22}

Oh!

So finally there will have such?

%if
0%{?el7}%{?el8}%{?el9}%{?el10}%{?fc20}%{?fc21}%{?fc22}%{?fc23}%{?fc24}%{?fc25}%{?fc26}%{?fc27}%{?fc28}%{?fc29}%{?fc30}???

6. CFLAGS="%{mycflags}" LDFLAGS="$CFLAGS" %configure \
    --prefix="%{_prefix}" \
    --bindir="%{_bindir}" \
    --datadir="%{_datadir}/%{name}" \
    --libdir="%{_libdir}/%{name}" \
    --localstatedir="%{_localstatedir}/lib/%{name}" \
    --sysconfdir="%{_sysconfdir}/%{name}" \
    --mandir="%{_mandir}" \
    --enable-event-broker \
    --without-tests \
    --with-pluginsdir="%{_libdir}/%{name}/plugins" \
    --with-tempdir="%{_localstatedir}/cache/%{name}" \
    --with-checkresultdir="%{_localstatedir}/cache/%{name}/checkresults" \
    --with-logdir="%{_localstatedir}/log/%{name}" \
    --with-initdir="%{_initrddir}" \
    --with-logrotatedir="%{_sysconfdir}/logrotate.d" \
    --with-naemon-user="%{naemonuser}" \
    --with-naemon-group="%{naemongroup}" \
    --with-lockfile="%{_localstatedir}/run/%{name}/%{name}.pid" \
    --with-thruk-user="%{apacheuser}" \
    --with-thruk-group="%{naemongroup}" \
    --with-thruk-libs="%{_libdir}/%{name}/perl5" \
    --with-thruk-tempdir="%{_localstatedir}/cache/%{name}/thruk" \
    --with-thruk-vardir="%{_localstatedir}/lib/%{name}/thruk" \
    --with-httpd-conf="%{_sysconfdir}/%{apachedir}/conf.d" \
    --with-htmlurl="/%{name}"

Please remove the redundant options passed by macro %configure.

rpm -E %configure will help.

7. make dox can also have %{?_smp_mflags}, but I haven't tested it yet, you can
have a try.

8. [ "%{buildroot}" != '/' ] && rm -rf %{buildroot}

RPM is better now :) Drop it.

9. # because we globally disabled binary striping, we have to do this manually
for some files


Fedora packages must have valid(useful) debuginfo package, please tell us the
reason.

10. No %clean section please.

11. No slash after %buildroot macro:

%{buildroot}/ --> %{buildroot}

12. %pre section not good:

http://fedoraproject.org/wiki/Packaging:UsersAndGroups#Dynamic_allocation

13. Too pedantic right? Wwhy not just conditonal lines?

%post core
case "$*" in
  2)
    # Upgrading so try and restart if already running
    # For systemctl systems we need to reload the configs
    # becaues it'll complain if we just installed a new
    # init script
    %if 0%{?el7}%{?fc20}%{?fc21}%{?fc22}
      %systemd_postun
      systemctl condrestart %{name}.service
    %else
      /etc/init.d/%{name} condrestart &>/dev/null ||
    %endif
  ;;
  1)
    %if 0%{?el7}%{?fc20}%{?fc21}%{?fc22}
      %systemd_post %{name}.service
    %else
      chkconfig --add %{name}
    %endif
  ;;
  *) echo case "$*" not handled in postun
esac

14. /var --> %{_localstatedir}

15. %files section:

%doc %{_mandir}/man3/nagexp.3

No %doc please.

and should be 

%{_mandir}/man3/nagexp.3*

Append * to manpages, RPM will compress them.

16. AutoReqProv: no

No this line please, please use filter if you meet problem with perl deps, or
this one:

http://fedoraproject.org/wiki/Packaging:Perl#Versioned_MODULE_COMPAT_Requires

Or this one:

https://fedoraproject.org/wiki/Perl/Tips#Filtering_autogenerated_dependencies_does_not_work

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]