Bug 459924

Summary: Review Request: homestead - 3D real-time network visualiser
Product: [Fedora] Fedora Reporter: Simon <cassmodiah>
Component: Package ReviewAssignee: Randy Berry <randyn3lrx>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, gwync, herrold, kevin, notting, pahan, randyn3lrx, tmz
Target Milestone: ---Flags: randyn3lrx: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-31 10:26:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
conditionally use --vendor if building in epel none

Description Simon 2008-08-24 15:59:53 UTC
Spec URL: http://cassmodiah.fedorapeople.org/homestead-0.81-1/homestead.spec
SRPM URL: http://cassmodiah.fedorapeople.org/homestead-0.81-1/homestead-0.81-1.fc9.src.rpm
Description:
Homestead is a 3D real-time network visualizer, displaying hosts and packet traffic. 
Features include support for multiple sensors, analysis of packets to gather hostnames 
and services, configurable layout of subnetworks, recording/replaying of packet traffic, 
and the ability to filter packets by host, protocol or port. hsen (Homestead Sensor) is 
a packet capture daemon which reads and sends packet header information to Homestead, 
locally or remotely. hsen also equates hostname to IP by reading DNS packets 
(UDP type A class IN standard query response). The relationship between hsen to Homestead 
can be one-to-one, one-to-many, many-to-one or many-to-many (many Homesteads would be on 
multiple computers on the same subnet, receiving packet header information from hsen via broadcast).

Comment 3 Randy Berry 2008-10-15 00:13:15 UTC
Practice Review:

Checked vesrion 0.84
 
MUST: rpmlint must be run on every package. The output should be posted in the
review.

Clean.

- MUST: The package must be named according to the Package Naming Guidelines .

OK.

- MUST: The spec file name must match the base package %{name}, in the format 
%{name}.spec unless your package has an exemption on Package Naming Guidelines
.

OK.

- MUST: The package must meet the Packaging Guidelines .

OK.

- MUST: The package must be licensed with a Fedora approved license and meet
the Licensing Guidelines .

OK.

- MUST: The License field in the package spec file must match the actual
license.


- MUST: If (and only if) the source package includes the text of the license(s)
in its own file, then that file, containing the text of the license(s) for the
package must be included in %doc.

OK.

- MUST: The spec file must be written in American English.

OK.

- MUST: The spec file for the package MUST be legible. If the reviewer is
unable to read the spec file, it will be impossible to perform a review. Fedora
is not the place for entries into the Obfuscated Code Contest
(http://www.ioccc.org/).

OK.

- MUST: The sources used to build the package must match the upstream source,
as provided in the spec URL. Reviewers should use md5sum for this task. If no
upstream URL can be specified for this package, please see the Source URL
Guidelines for how to deal with this.

OK.

- MUST: The package must successfully compile and build into binary rpms on at
least one supported architecture.

OK.

- MUST: If the package does not successfully compile, build or work on an
architecture, then those architectures should be listed in the spec in
ExcludeArch. Each architecture listed in ExcludeArch needs to have a bug filed
in bugzilla, describing the reason that the package does not compile/build/work
on that architecture. The bug number should then be placed in a comment, next
to the corresponding ExcludeArch line. New packages will not have bugzilla
entries during the review process, so they should put this description in the
comment until the package is approved, then file the bugzilla entry, and
replace the long explanation with the bug number. The bug should be marked as
blocking one (or more) of the following bugs to simplify tracking such issues:
FE-ExcludeArch-x86 , FE-ExcludeArch-x64 , FE-ExcludeArch-ppc ,
FE-ExcludeArch-ppc64

OK. Successful mock build in F9-i386 and Rawhide-i386

- MUST: All build dependencies must be listed in BuildRequires, except for any
that are listed in the exceptions section of the Packaging Guidelines ;
inclusion of those as BuildRequires is optional. Apply common sense.

OK.

- MUST: The spec file MUST handle locales properly. This is done by using the
%find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.

OK.

- MUST: Every binary RPM package which stores shared library files (not just
symlinks) in any of the dynamic linker's default paths, must call ldconfig in
%post and %postun. If the package has multiple subpackages with libraries, each
subpackage should also have a %post/%postun section that calls /sbin/ldconfig.
An example of the correct syntax for this is:

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


N/A.

- MUST: If the package is designed to be relocatable, the packager must state
this fact in the request for review, along with the rationalization for
relocation of that specific package. Without this, use of Prefix: /usr is
considered a blocker.

N/A.

- MUST: A package must own all directories that it creates. If it does not
create a directory that it uses, then it should require a package which does
create that directory. Refer to the Guidelines for examples.

OK.

- MUST: A package must not contain any duplicate files in the %files listing.

OK.

- MUST: Permissions on files must be set properly. Executables should be set
with executable permissions, for example. Every %files section must include a
%defattr(...) line.

OK.

- MUST: Each package must have a %clean section, which contains rm -rf
%{buildroot} ( or $RPM_BUILD_ROOT ).

OK.

- MUST: Each package must consistently use macros, as described in the macros
section of Packaging Guidelines .

OK.

- MUST: The package must contain code, or permissable content. This is
described in detail in the code vs. content section of Packaging Guidelines .

OK.

- MUST: Large documentation files should go in a -doc subpackage. (The
definition of large is left up to the packager's best judgement, but is not
restricted to size. Large can refer to either size or quantity)

N/A.

- MUST: If a package includes something as %doc, it must not affect the runtime
of the application. To summarize: If it is in %doc, the program must run
properly if it is not present.

OK.

- MUST: Header files must be in a -devel package.

N/A.

- MUST: Static libraries must be in a -static package.

N/A.

- MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig'
(for directory ownership and usability).

N/A.

- MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1),
then library files that end in .so (without suffix) must go in a -devel
package.

N/A.

- MUST: In the vast majority of cases, devel packages must require the base
package using a fully versioned dependency: Requires: %{name} =
%{version}-%{release}

N/A.

- MUST: Packages must NOT contain any .la libtool archives, these should be
removed in the spec.

OK.

- MUST: Packages containing GUI applications must include a %{name}.desktop
file, and that file must be properly installed with desktop-file-install in the
%install section. This is described in detail in the desktop files section of
the Packaging Guidelines . If you feel that your packaged GUI application does
not need a .desktop file, you must put a comment in the spec file with your
explanation.

OK.

- MUST: Packages must not own files or directories already owned by other
packages. The rule of thumb here is that the first package to be installed
should own the files or directories that other packages may rely upon. This
means, for example, that no package in Fedora should ever share ownership with
any of the files or directories owned by the filesystem or man package. If you
feel that you have a good reason to own a file or directory that another
package owns, then please present that at package review time.

OK.

- MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot}
( or $RPM_BUILD_ROOT ). See Prepping BuildRoot For %install for details.

OK.

- MUST: All filenames in rpm packages must be valid UTF-8.

OK.

Comment 4 Randy Berry 2008-10-15 00:16:23 UTC
Correct missed Field:

 - MUST: The License field in the package spec file must match the actual
license.

OK.

Comment 5 Gwyn Ciesla 2008-10-15 13:49:30 UTC
Corrections.  License tag should be GPLv2+.

Minor correction to desktop file handling, alter the vendor tag:
https://fedoraproject.org/wiki/Packaging/Guidelines#desktop
a la: --vendor="<vendor_id>"     

Otherwise, no major issues with the review or package.  Randall, once you're sponsored, you can take ownership, verify the fixes and approve.

Comment 6 Simon 2008-10-17 20:36:37 UTC
Thank you Randall, thank you Jon

License Tag:
GPLv2+

Desktop file:
Sorry, but I don't know what you mean.


----
Update to 0.85

SPEC:
http://cassmodiah.fedorapeople.org/homestead-0.85/homestead.spec

SRPM:
http://cassmodiah.fedorapeople.org/homestead-0.85/homestead-0.85-1.fc10.src.rpm
----

Comment 7 Gwyn Ciesla 2008-10-20 12:31:15 UTC
(In reply to comment #6)
> Thank you Randall, thank you Jon
> 
> License Tag:
> GPLv2+
> 
> Desktop file:
> Sorry, but I don't know what you mean.

You have --vendor="fedora".  Should be --vendor='<vendor_id>'.  That's all.

> 
> ----
> Update to 0.85
> 
> SPEC:
> http://cassmodiah.fedorapeople.org/homestead-0.85/homestead.spec
> 
> SRPM:
> http://cassmodiah.fedorapeople.org/homestead-0.85/homestead-0.85-1.fc10.src.rpm
> ----

Comment 9 Simon 2008-10-21 20:41:38 UTC
mh, this is incorrect.

--vendor="fedora"

should be the correct way.

Comment 10 Todd Zullinger 2008-10-21 20:46:51 UTC
(In reply to comment #7)
> You have --vendor="fedora".  Should be --vendor='<vendor_id>'.  That's all.

Huh?  <vendor_id> is used as a variable in the guidelines.  That string is to be replaced by whatever string upstream uses as the vendor id, if they use one.  In the case where a .desktop file is being created just for the fedora package or where upstream does not use any vendor id, then --vendor="fedora" is entirely correct.

Comment 11 Jason Tibbitts 2008-10-21 21:10:21 UTC
Just for everyone's info, the unfortunate miswording in the guidelines which gives the impression that --vendor="fedora" should be used if upstream doesn't provide one is being fixed.  Please see the draft at https://fedoraproject.org/wiki/TomCallaway/DesktopFileVendor which was approved by FPC today and may be acked by FESCo as soon as tomorrow.

Comment 12 Randy Berry 2008-10-21 23:24:09 UTC
Simon,
Sorry for the confusion this review has caused. According to the recent document posted above there is no longer any need for the vendor tag and since this is a new package you may remove it entirely. Seeing as everything else seems to be in check we'll get this package on its way once the correction is made.

Thanks again,
Randy

Comment 14 Randy Berry 2008-10-24 15:36:46 UTC
Approved, everything looks good. Thanks for your patience.

Comment 15 R P Herrold 2008-10-24 15:44:04 UTC
The law of unintended packaging consequesces may be in play here.  On a scratch
build without a set --vendor tag set I get:

+ desktop-file-install
--dir=/var/tmp/homestead-0.86-1orc-root-herrold/usr/share/applications
/home/herrold/rpmbuild/SOURCES/homestead.desktop
Must specify the vendor namespace for these files with --vendor
error: Bad exit status from /var/tmp/rpm-tmp.49715 (%install)

so a portibility patch of having a 

%define localvendor %vendor%nil  

and then using localvendor construct is needed, here and in the the broader
policy?

No criticism of this fine effort within the four walls of fedora and rhel
%vendor, but ...

Just talking out loud here on the broader issue of NOT fighting with other
efforts in how spec files are written.

-- Russ herrold

Comment 16 R P Herrold 2008-10-24 16:12:53 UTC
actually digging futher, it seems that there is are a couple of warnings (although not properly flagged as such by the freedesktop.org tool)

[herrold@centos-5 homestead]$ desktop-file-install --vendor=orc --dir=/var/tmp/homestead-0.86-1orc-root-herrold/usr/share/applications /home/herrold/rpmbuild/SOURCES/homestead.desktop

/home/herrold/rpmbuild/SOURCES/homestead.desktop: missing encoding  (guessed UTF-8)

/home/herrold/rpmbuild/SOURCES/homestead.desktop: key "Categories" string list not semicolon-terminated, fixing

==============================

This patch to SOURCE1 fixes the matter

[herrold@centos-5 homestead]$ diff -u homestead.desktop-ORIG homestead.desktop
--- homestead.desktop-ORIG      2008-10-24 12:11:12.000000000 -0400
+++ homestead.desktop   2008-10-24 12:11:34.000000000 -0400
@@ -5,4 +5,7 @@
 Comment=An 3D real-time network visualiser
 Exec=homestead
 Icon=homestead
-Categories=Network
+Categories=Network;
+#      and a deprecated item needed to quell a warning
+Encoding=UTF-8
+
[herrold@centos-5 homestead]$

Comment 17 R P Herrold 2008-10-24 16:36:21 UTC
An Implementation of comment 15 
   https://bugzilla.redhat.com/show_bug.cgi?id=459924#c15
showing a vendor and dist tag neutral packaging approach, and a 'worked case' diff are as follows:

[herrold@centos-5 homestead]$ ls
homestead-0.86-1.fc10.src.rpm  homestead.desktop-RPH~  homestead.spec-RPH
homestead.desktop              homestead.spec          homestead.spec-RPH~
homestead.desktop-ORIG         homestead.spec~
homestead.desktop-RPH          homestead.spec-ORIG
[herrold@centos-5 homestead]$ rpm -qlp /home/herrold/rpmbuild/SRPMS/homestead-0.86-1orc.src.rpm
homestead.desktop
homestead.png
homestead.spec
homestead086.tar.gz
[herrold@centos-5 homestead]$ rpm -qlp /home/herrold/rpmbuild/RPMS/x86_64/homestead-0.86-1orc.x86_64.rpm
/usr/bin/homestead
/usr/sbin/hsen
/usr/share/applications/orc-homestead.desktop
/usr/share/doc/homestead-0.86
/usr/share/doc/homestead-0.86/COPYING
/usr/share/doc/homestead-0.86/ChangeLog
/usr/share/doc/homestead-0.86/README
/usr/share/man/man1/homestead.1.gz
/usr/share/man/man8/hsen.8.gz
/usr/share/pixmaps/homestead.png
[herrold@centos-5 homestead]$ diff -u homestead.spec-ORIG homestead.spec
--- homestead.spec-ORIG 2008-10-24 11:49:24.000000000 -0400
+++ homestead.spec      2008-10-24 12:32:47.000000000 -0400
@@ -1,5 +1,5 @@
 %define srcversion 086
-%define        vendor  '%vendor%nil'
+%define        localvendor     %vendor%nil

 Name:           homestead
 Version:        0.86
@@ -49,7 +49,10 @@
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}

-desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
+#      seemingly 'desktop-file-install' is needed as its requirements
+#      could somehow not be handled by 'install' at freedesktop.org for
+#      managing .desktop files, whereas 'install' seems fine for pixmaps
+desktop-file-install --vendor=%localvendor --dir=%{buildroot}%{_datadir}/applications \
 %{SOURCE1}

 install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
@@ -66,7 +69,10 @@
 %{_mandir}/man1/%{name}.*
 %{_mandir}/man8/hsen.*
 %{_datadir}/pixmaps/%{name}.png
-%{_datadir}/applications/%{name}.desktop
+#
+#      two possible approaches here --specific or wildcarded
+%{_datadir}/applications/%{localvendor}-%{name}.desktop
+%{_datadir}/applications/*%{name}.desktop


 %changelog
[herrold@centos-5 homestead]$

Comment 18 R P Herrold 2008-10-24 16:38:51 UTC
I have upstreamed the needed enhancement to 
    desktop-file-install
to permit SEEING and FIXING suspect .desktop files at:
   https://bugs.freedesktop.org/show_bug.cgi?id=18206

Comment 19 R P Herrold 2008-10-24 16:50:56 UTC
Preparing to install homestead on a border router to place 'hsen' on a well placed sampling location, I find that it pulls in WAYY too much, and particularly GUI parts that are not welcome, and will never be used in such a context.  This causes problems with the security policy model for such units.


[herrold@centos-5 ~]$ rpm -q --requires homestead
libGL.so.1()(64bit)
libGLU.so.1()(64bit)
 ...
libglut.so.3()(64bit)
 ...
[herrold@centos-5 ~]$

The 'hsen' sampler needs to be split out to a sub package, such as '-sampler'

-- Russ herrold

Comment 20 R P Herrold 2008-10-24 17:01:25 UTC
This patch does the split to meet that goal.  As I have mand a substantive change, and add a Changelog entry I bump the Release here

[herrold@centos-5 homestead]$ rpm -qp --requires /home/herrold/rpmbuild/RPMS/x86_64/homestead-sampler-0.86-2orc.x86_64.rpm
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libgcc_s.so.1()(64bit)
libm.so.6()(64bit)
libpcap.so.0.9.4()(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
[herrold@centos-5 homestead]$

[herrold@centos-5 homestead]$ diff -u homestead.spec-ORIG homestead.spec
--- homestead.spec-ORIG 2008-10-24 11:49:24.000000000 -0400
+++ homestead.spec      2008-10-24 13:00:32.000000000 -0400
@@ -1,9 +1,9 @@
 %define srcversion 086
-%define        vendor  '%vendor%nil'
+%define        localvendor     %vendor%nil

 Name:           homestead
 Version:        0.86
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        3D real-time network visualiser

 Group:          Applications/Internet
@@ -18,6 +18,10 @@
 BuildRequires:  libpcap-devel
 BuildRequires:  desktop-file-utils

+%package sampler
+Summary:        sampling client for %{name}
+Group:          Applications/Internet
+License:        GPLv2+

 %description
 Homestead is a 3D real-time network visualizer, displaying
@@ -36,6 +40,12 @@
 same subnet, receiving packet header information
 from hsen via broadcast).

+%description sampler
+hsen (Homestead Sensor) is a (possibly remote) packet capture daemon which
+reads and sends packet header information to Homestead, locally or remotely.
+hsen also equates hostname to IP by reading DNS packets (UDP type A class IN
+standard query response).
+
 %prep
 %setup -q -n %{name}%{srcversion}

@@ -49,7 +59,10 @@
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}

-desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
+#      seemingly 'desktop-file-install' is needed as its requirements
+#      could somehow not be handled by 'install' at freedesktop.org for
+#      managing .desktop files, whereas 'install' seems fine for pixmaps
+desktop-file-install --vendor=%localvendor --dir=%{buildroot}%{_datadir}/applications \
 %{SOURCE1}

 install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
@@ -62,14 +75,25 @@
 %defattr(-,root,root,-)
 %doc README COPYING ChangeLog
 %{_bindir}/%{name}
-%{_sbindir}/hsen
 %{_mandir}/man1/%{name}.*
-%{_mandir}/man8/hsen.*
 %{_datadir}/pixmaps/%{name}.png
-%{_datadir}/applications/%{name}.desktop
+#
+#      two possible approaches here --specific or wildcarded
+%{_datadir}/applications/%{localvendor}-%{name}.desktop
+%{_datadir}/applications/*%{name}.desktop
+
+
+%files sampler
+%defattr(-,root,root,-)
+%{_sbindir}/hsen
+%{_mandir}/man8/hsen.*


 %changelog
+* Fri Oct 24 2008 R P Herrold <info> - 0.86-2
+- split out a -sampler sub-package to avoid dragging in the unneeded
+  GUI on remote TUI only sample heads
+
 * Wed Oct 22 2008 Simon Wesp <cassmodiah> - 0.86-1
 - Update to 0.86

[herrold@centos-5 homestead]$

Comment 21 R P Herrold 2008-10-24 17:35:05 UTC
Sadly I get function problems, but these seem outside of homestead

[herrold@centos-5 homestead]$ sudo rpm -Uvh /home/herrold/rpmbuild/RPMS/x86_64/homestead-0.86-2orc.x86_64.rpm
[sudo] password for herrold:
Preparing...                ########################################### [100%]
   1:homestead              ########################################### [100%]
[herrold@centos-5 homestead]$ homestead
libGL warning: 3D driver claims to not support visual 0x5a
Segmentation fault
[herrold@centos-5 homestead]$ homestead
libGL warning: 3D driver claims to not support visual 0x5a
Segmentation fault
[herrold@centos-5 homestead]$ homestead
libGL warning: 3D driver claims to not support visual 0x5a
Segmentation fault
[herrold@centos-5 homestead]$ homestead
libGL warning: 3D driver claims to not support visual 0x5a
Segmentation fault
[herrold@centos-5 homestead]$ homestead
libGL warning: 3D driver claims to not support visual 0x5a
Segmentation fault
[herrold@centos-5 homestead]$ rpm -qa \*GL
mesa-libGL-6.5.1-7.5.el5
mesa-libGL-6.5.1-7.5.el5
[herrold@centos-5 homestead]$

Comment 23 R P Herrold 2008-10-27 14:09:50 UTC
looks great -- thank you -- It certainly meets my approval

-- Russ herrold

Comment 24 Simon 2008-10-27 14:11:26 UTC
New Package CVS Request
=======================
Package Name: homestead
Short Description: 3D real-time network visualiser
Owners: cassmodiah
Branches: F-9
InitialCC:

Comment 25 Simon 2008-10-27 14:37:53 UTC
New Package CVS Request
=======================
Package Name: homestead
Short Description: 3D real-time network visualiser
Owners: cassmodiah
Branches: F-9 EL-5
InitialCC:

Comment 26 Kevin Fenzi 2008-10-29 18:25:50 UTC
Are you still passing --vendor to your desktop file install? 
It's unclear to me as you haven't been noting URL's to the latest spec/src.rpm. 

From the guideline "For new packages, do not apply a vendor tag to desktop files"

Comment 27 manuel wolfshant 2008-10-29 18:59:27 UTC
We've played with this a bit together yesterday. The vendor tag is imposed by desktop-install-file in EL-5 (the package fails build if no vendor tag is provided). So a bit of magic is needed in order to pass a correct argument, depending on the distro.

Comment 28 Kevin Fenzi 2008-10-29 21:40:59 UTC
ok, so we need to ping the packaging folks to handle the EL-5 case? 
Can one of you guys do that? Or would you like me to?

Perhaps we can import this now, and hold off building EL-5 until that case is covered in the guidelines?

Comment 29 manuel wolfshant 2008-10-29 21:49:54 UTC
Thanks Kevin, but it's just a problem of finding an elegant solution in the spec, in order to not fork it between Fedora and Epel.
I guess Simon will import it tomorrow, he + Russ + me were discussing about it less then an hour ago. That is, if Simon has the time to do it.

Comment 30 manuel wolfshant 2008-10-30 12:26:46 UTC
Created attachment 321923 [details]
conditionally use --vendor if building in epel

Comment 32 Kevin Fenzi 2008-10-30 18:40:33 UTC
I guess --vendor="" should work ok. We should still get it into the guidelines so everyone does the same thing however. 

cvs done.

Comment 33 Fedora Update System 2008-10-30 20:35:44 UTC
homestead-0.87-2.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/homestead-0.87-2.fc9

Comment 34 Fedora Update System 2008-10-31 10:26:53 UTC
homestead-0.87-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.