[Bug 1749383] Review Request: mesos - Apache Mesos Cluster Manager

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

 



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



--- Comment #6 from Simone Caronni <negativo17@xxxxxxxxx> ---
> BuildRequires: systemd
> BuildRequires: systemd

Duplicate BuildRequires.
Also please sort all the BuildRequires tags all together, they are in 3 blocks
not in alphabetical order and with no explanation. Makes spotting obvious
mistakes a bit harder.

> %description
> Apache Mesos is a cluster manager that provides efficient resource
> isolation and sharing across distributed applications, or frameworks.
> It can run Hadoop, MPI, Hypertable, Spark, and other applications on
> a dynamically shared pool of nodes.

Please align to 80 characters columns, if possible.

> Group:    Development/Libraries

Remove all the Groups tags, they are obsolete since RHEL 5.

> Requires: mesos%{?_isa} = %{version}-%{release}

Should be %{name}%{?_isa}, for consistency.

> BuildRequires:  python2-devel

Do not sort BuildRequires in the subpackage definition. It is also a duplicate.

> %setup -q
> %patch0 -p1 -F2

Please use the %autosetup macro. Also do not change the fuzz lines, the strict
fuzz rules are there to avoid patching the wrong block (it happened!). Rebase
the patch if necessary.

> # Apparently bundled:
> # 1. CSI spec: https://github.com/container-storage-interface/spec/releases
> # 2. ConcurrentQueue: https://github.com/cameron314/concurrentqueue
> # 3. File gmock-all.cc from Google Gmock: https://github.com/google/googletest
> # 4. Nvidia GPU deployment kit nvml.h header file.
> cd 3rdparty
> tar xzf concurrentqueue-7b69a8f.tar.gz
> tar xzf googletest-release-1.8.0.tar.gz
> tar xzf nvml-352.79.tar.gz
> cd ..

If this is the case, then they must be listed in the bundled Provides tags.

> %make_build %{?_smp_mflags} V=1

Remove _smp_mflags, it's already part of the macro:

$ rpm --showrc | grep make_build
-13: make_build %{__make} %{_make_output_sync} %{?_smp_mflags}

> %if %skiptests
>   echo "Skipping tests, do to mock issues"
> %else
>   export LD_LIBRARY_PATH=`pwd`/src/.libs
>   make check
> %endif

I would not print anything if disabled, maybe add a comment, but as you wish.
If you want to keep the output then typo (s/do/due/g).

> %{__python2} setup.py install --root=%{buildroot} --prefix=/usr

Use %{_prefix} instead of explicit /usr.

> # fedora guidelines no .a|.la
> rm -f %{buildroot}%{_libdir}/*.la
> rm -f %{buildroot}%{_libdir}/libexamplemodule*
> rm -f %{buildroot}%{_libdir}/libtest*
> rm -f %{buildroot}/%{_libdir}/%{name}/modules/*.la

You can probably just do something like:

find %{buildroot} -name '*.a' -o -name '*.la' -delete

But as you prefer.

> mkdir -p -m0755 %{buildroot}%{_sysconfdir}/tmpfiles.d
> install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
> %config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf

Please replace these with the macro and don't mark it as a config file as it is
under /usr/lib/tmpfiles.d/:

mkdir -p -m0755 %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf
%{_tmpfilesdir}/%{name}.conf

> mkdir -p -m0755 %{buildroot}/%{_var}/log/%{name}
> mkdir -p -m0755 %{buildroot}/%{_var}/lib/%{name}

Please use:

mkdir -p -m0755 %{buildroot}/%{_localstatedir}/log/%{name}
mkdir -p -m0755 %{buildroot}/%{_sharedstatedir}/%{name}

> install -m
> cp -rf

Please replace with "install -p -m" as you are supposed to preserve timestamps
if possible. Same for cp, you can use the -a switch (for example).

> pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}/usr/bin/mesos-cat
> pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}/usr/bin/mesos-scp
> pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}/usr/bin/mesos-ps
> pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}/usr/bin/mesos-tail
> pathfix.py -pni "/usr/bin/bash" %{buildroot}/usr/share/mesos/examples
> pathfix.py -pni "/usr/bin/bash" %{buildroot}/usr/sbin/mesos*.sh

Please be consistent across the SPEC file, replace those paths with %{_bindir},
%{_sbindir}, and %{_datadir}.

> %files
> %doc LICENSE NOTICE

It should be:

%files
%license LICENSE
%doc NOTICE

Also, the license is fine in a reduced number of packages as long as it is
installed in any combination of the packages being installed. Considering the
base mesos package is required by all subpackages, you can skip entirely the
%license and %doc tag in all subpackages.

> %{_libdir}/*.so

Why is this unversioned? If it can not be versioned it needs an explanation or
to be moved to a different path.

> if ! getent passwd mesos >/dev/null ; then
>      useradd -r -g mesos -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
>              -c "%{name} daemon account" mesos
> fi

Please use the packaging guidelines format, and especially add the shadow-utils
requirement:
https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation

Also, you can probably use a variable at the top of the file:

%global user mesos
%global group mesos

And then replace all occurrences in the SPEC file, in the %pre and %files
section.

> %systemd_post %{name}-slave.service %{name}-master.service

Please use the BuildRequires indicated:

https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd

> /sbin/ldconfig

If you plan on building this only on Fedora & CentOS/RHEL 8 you can skip it
entirely.

Otherwise, if you also target EPEL-7 there is this:

https://fedoraproject.org/wiki/EPEL:Packaging#Shared_Libraries

> %changelog
> * Wed Sep 04 2019 Javi Roman  <javiroman@xxxxxxxxxx> - 1.8.1

Feel free to trim the changelog before you, maybe just leave one message before
yours. As you wish.
The package version at the end should be "1.8.1-1", you can update this
automatically with "rpmdev-bumpspec" to have it properly formatted.

-- 
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
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux