Bug 459989 - Review Request: gnurobots - A robot programming game
Review Request: gnurobots - A robot programming game
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mamoru TASAKA
Fedora Extras Quality Assurance
:
Depends On: 473814
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-25 10:29 EDT by Vivek Shah
Modified: 2008-12-17 19:43 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-08 12:34:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mtasaka: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)
Trial patch (557 bytes, patch)
2008-11-03 12:05 EST, Mamoru TASAKA
no flags Details | Diff

  None (edit)
Description Vivek Shah 2008-08-25 10:29:13 EDT
Spec URL: http://bonii.fedorapeople.org/spec/gnurobots.spec
SRPM URL: http://bonii.fedorapeople.org/srpms/gnurobots-1.2.0-1.fc8.src.rpm
Description: 
GNU Robots is a game/diversion where you construct a program for a little 
robot, then set him loose and watch him explore a world on his own.  
The robot program is written in Scheme, and is implemented using GNU Guile.
Comment 1 Victor Bogado 2008-09-21 11:22:16 EDT
The compilation requires libXft-devel, libXrender-devel, fontconfig-devel and freetype-devel. but it seems that those dependences should have been stated in the vte-devel package, I will file a bug, but maybe it should be stated in this spec also until the vte-devel package gets fixed.

There is no desktop file for the game, this is required.

Also the package is not using the fedora compiler flags.

bellow is review checklist :
===============================================================

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

$ rpmlint /home/bogado/rpmbuild/RPMS/x86_64/gnurobots-1.2.0-1.bog9.x86_64.rpm
gnurobots.x86_64: W: incoherent-version-in-changelog 1.2.0-1 1.2.0-1.bog9
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

$ rpmlint /home/bogado/rpmbuild/SRPMS/gnurobots-1.2.0-1.bog9.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

- 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 .
* NOT OK - the package does not uses the compiler flags. 

- 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.
* ok

- 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 (just checked x86-64)

- 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 (see above)

- 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.
* NO The package does not mention some BuildRequires, but those should have been mentioned in the pre-requisites of another package, see the observation above.

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

- 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

* do not apply


- 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.
* do not apply

- 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)
* no applicable 

- 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.
* not applicable

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

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

- 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.
* not applicable

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

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

- 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.
* NOT OK, the package does not include any desktop file

- 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

SHOULD Items:

- SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it.
* ok

- SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
* no

- SHOULD: The reviewer should test that the package builds in mock. See MockTricks for details on how to do this.
* not done.

- SHOULD: The package should compile and build into binary rpms on all supported architectures.
* not done

- SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.
* ok

- SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.
* not checked 


- SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
* not applicable

- SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb.
* not applicable

- SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself. Please see File Dependencies in the Guidelines for further information.
* not applicable
Comment 2 Vivek Shah 2008-09-29 01:02:28 EDT
Thanks for the review,

I will add libXft-devel in the BuildRequires as libXft-devel requires freetype-devel, fontconfig-devel and libXrender-devel.

I will upload the new SRPM and spec file in acouple of days.
Comment 3 Vivek Shah 2008-09-29 08:16:26 EDT
Also could you mention specifically what is the problem with the compiler flags.
Comment 4 Victor Bogado 2008-09-29 09:35:13 EDT
The application should be compiled using the fedora default compiler flags, those are stored in the variable $RPM_OPT_FLAGS or the rpm macro %{optflags}, either on could be used. This will ensure that the program get compiled with all the optimizations and security features that are standard. 

If the package needs to override some of those flags this need needs to be documented in the spec file for review. 

Check this : http://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
Comment 5 Vivek Shah 2008-10-13 09:39:24 EDT
The spec file uses %configure which appends %{optflags} to CFLAGS so an explicit listing of %{optflags} is not required in the %build stage.
I have updated BuildRequires to include libXft-devel which will pull in the other dependencies as mentioned by you in an earlier note. I have also added the desktop file.

SPEC URL : http://bonii.fedorapeople.org/spec/gnurobots.spec
SRPM URL : http://bonii.fedorapeople.org/srpms/gnurobots-1.2.0-2.fc9.src.rpm
Comment 6 Vivek Shah 2008-10-25 08:59:26 EDT
Please review the above mentioned SPEC and SRPM which have been updated based upon the suggestions submitted as part of the earlier package review.
Comment 7 Victor Bogado 2008-10-25 09:35:09 EDT
I think that the makefile don't respects the CFLAGS then because your spec is not compiling with the flags, look at this sample command-line: 

gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/readline/ -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/pango-1.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo   -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -I../include -DPKGLIBDIR=\"/usr/lib64/gnurobots\" -DABS_TOP_BUILDDIR=\"/home/bogado/rpmbuild/BUILD/gnurobots-1.2.0\" -DPKGDATADIR=\"/usr/share/gnurobots\" -DMAPS_PATH=\"/usr/share/gnurobots/maps\" -DSCRIPTS_PATH=\"/usr/share/gnurobots/scheme\"    -pedantic-errors -Werror -Wall -g -MT map.o -MD -MP -MF .deps/map.Tpo -c -o map.o map.c

The following flags (evaluated in my fedora 9 box) should show : 

$ rpm --eval %{optflags}
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic

As far as I can see it this is the only thing missing.
Comment 8 Mamoru TASAKA 2008-10-25 10:03:32 EDT
For CFLAGS issue

(In reply to comment #7)
> I think that the makefile don't respects the CFLAGS then because your spec is
> not compiling with the flags, 

Well, actually %configure sets CFLAGS as environment (see what
%configure does by $ rpm --eval %configure).

However for this package configure{,ac} resets CFLAGS environment
configure.ac says:
------------------------------------------------------------
    92  AC_C_CONST
    93  
    94  CFLAGS="-pedantic-errors -Werror -Wall -g"
    95  
    96  dnl Done.
------------------------------------------------------------
The line 94 resets CFLAGS, which is why Fedora specific compilation
flags are ignored.

For this package
------------------------------------------------------------
%prep
%setup -q
sed -i.optflags -e '/^CFLAGS=/d' configure

%build
......
-------------------------------------------------------------
will pass Fedora cflags (note: with Fedora cflags this package won't
build with -Werror).

By the way 
* "BuildRequires: guile >= 1.8 vte" are redundant because there
   are already "BuildRequires: guile-devel >= 1.8 vte-devel"

* Please make it sure that all directories which are created when
  installing this package are correctly owned by this package.
  Currently the directory %_datadir/%name and some directories
  under this directory are not owned by any packages.
  https://fedoraproject.org/wiki/Packaging/UnownedDirectories
Comment 9 Victor Bogado 2008-10-25 10:56:46 EDT
> will pass Fedora cflags (note: with Fedora cflags this package won't
> build with -Werror).

I don't think that -Werror will be missed, the program already compiles without any warnings already, also the program was already being compiled with -Wall before so no new warning should be presented(*).

*) this is not always true, sometime different optimizations level give a different set of warnings.
Comment 10 Vivek Shah 2008-10-30 16:15:13 EDT
Fixed the CFALGS issue by modifying the configure.ac shipped as suggested earlier and the absence of -Werror is not going to cause a problem I believe. Removed the obsolete BuildRequires and also added the missing Unowned directories.

SPEC URL : http://bonii.fedorapeople.org/spec/gnurobots.spec
SRPM URL : http://bonii.fedorapeople.org/srpms/gnurobots-1.2.0-3.fc9.src.rpm
Comment 11 Mamoru TASAKA 2008-11-02 09:22:08 EST
For -3:

* For BuildRequires
  - libXft-devel is required by pango-devel
       and pango-devel is required by gtk2-devel
  - gtk2-devel is required by vte-devel
    so these are redundant.

Note:
(In reply to comment #1)
> The compilation requires libXft-devel, libXrender-devel, fontconfig-devel and
> freetype-devel. but it seems that those dependences should have been stated in
> the vte-devel package,

  - vte-devel requires gtk2-devel
       and gtk2-devel requires pango-devel
       and pango-devel requires 
           libXft-devel libXrender-devel fontconfig-devel freetype-devel

* Files under xpm/
--------------------------------------------------------------
%{__cp} -av xpm/ $RPM_BUILD_ROOT%{_datadir}/%{name}
--------------------------------------------------------------
  - I don't think xpm/Makefile{,am,in} are needed.

* Desktop file vendor suffix
  - Packaging guidelines changed and for new packages
    --vendor=fedora must not be used anymore:
    https://fedoraproject.org/wiki/TomCallaway/DesktopFileVendor

    ! If you want to maintain this package also on EPEL??,
      --vendor="" is needed (because EPEL uses old desktop-file-utils
      which won't accept desktop-file-install command without
      specifying vendor)

! %changelog
  - I recommend to put one line between each %changelog entry like:
---------------------------------------------------------------
* Thu Oct 30 2008 Vivek Shah <boni.vivek gmail.com> 1.2.0-3
- Fixed BuildRequires to remove unrequired dependencies
- Added missing unowned directories
- Added directive to use Fedora CFLAGS while building

* Mon Oct 14 2008 Vivek Shah <boni.vivek@gmail.com> 1.2.0-2
- Added desktop file, fixed new build requires

* Wed Aug 20 2008 Vivek Shah <boni.vivek gmail.com> 1.2.0-1
- Fixed permissions of files under scheme/ to 644 
---------------------------------------------------------------
    This is useful when you use "make clog" on Fedora CVS.
Comment 12 Vivek Shah 2008-11-03 10:45:18 EST
Thanks for the notes,
I created a package keeping in mind all the above notes but it encounters a problem when I added the sed script modification as you suggested in order to pass the CFLAGS.
The binary which is installed from the package built with Fedora CFLAGS does not load the guile interactive mode while it does without it.
I will be investigating the issue to see what is causing the problem but would like your take on the matter as well.

You can see the issue for yourself by installing from release 3 (which uses the CFLAGS) while release 2 (does not)
Comment 13 Mamoru TASAKA 2008-11-03 10:58:35 EST
(In reply to comment #12)
> Thanks for the notes,
> I created a package keeping in mind all the above notes but it encounters a
> problem when I added the sed script modification as you suggested in order to
> pass the CFLAGS.

Would you write a procedure to reproduce the problem?
Comment 14 Vivek Shah 2008-11-03 11:08:09 EST
From gnurobots.spec remove the following line from %prep
sed -i.optflags -e '/^CFLAGS=/d' configure
Build the package and run the binary
You can see the interactive mode being launched with guile prompt and this is how the binary SHOULD behave

In gnurobots.spec keep the above line in %prep
Build the package and run the binary
You can see the interactive mode not being launched which is how the binary should not behave.

I hope this is what you wanted.
Comment 15 Mamoru TASAKA 2008-11-03 12:05:57 EST
Created attachment 322343 [details]
Trial patch

Ah, actually now I understood.

Will the patch attached fix the problem?
Comment 16 Mamoru TASAKA 2008-11-10 04:32:40 EST
ping?
Comment 17 Vivek Shah 2008-11-11 23:23:10 EST
I am currently in the process of shifting and will apply the patch and check it up in a couple of days.
Comment 18 Mamoru TASAKA 2008-11-27 02:57:03 EST
ping again?
Comment 19 Vivek Shah 2008-11-27 23:45:12 EST
Yes the trial patch successfully worked and the guile prompt loaded up. I will be uploading the new SRPM and spec file tomorrow. Sorry for the delay
Comment 20 Vivek Shah 2008-12-02 09:58:22 EST
Sorry for the delay, I have updated the package with the suggested changes and the patch.
Spec URL: http://bonii.fedorapeople.org/spec/gnurobots.spec
SRPM URL: http://bonii.fedorapeople.org/srpms/gnurobots-1.2.0-4.fc9.src.rpm
Comment 21 Mamoru TASAKA 2008-12-02 10:56:49 EST
Good.

! Note:
  Currently on dist-f11 (rawhide) this package won't build due to bug
  in "rpm" (bug 473814).

-----------------------------------------------------------
    This package (gnurobots) is APPROVED by mtasaka
-----------------------------------------------------------
Comment 22 Vivek Shah 2008-12-03 00:12:11 EST
New Package CVS Request
=======================
Package Name: gnurobots
Short Description: A robot programming game
Owners: bonii
Branches: F-9 F-10
InitialCC:
Comment 23 Kevin Fenzi 2008-12-03 19:50:13 EST
cvs done.
Comment 24 Fedora Update System 2008-12-06 06:09:01 EST
gnurobots-1.2.0-4.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/gnurobots-1.2.0-4.fc10
Comment 25 Fedora Update System 2008-12-06 06:09:06 EST
gnurobots-1.2.0-4.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/gnurobots-1.2.0-4.fc9
Comment 26 Vivek Shah 2008-12-06 06:11:40 EST
Waiting for https://bugzilla.redhat.com/show_bug.cgi?id=473814 to be resolved before building for devel branch and pushing it into Bodhi
Comment 27 Mamoru TASAKA 2008-12-06 10:11:59 EST
I guess bug 473814 issue should be okay now, so please try for dist-f11.
Comment 28 Fedora Update System 2008-12-08 08:03:56 EST
gnurobots-1.2.0-4.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update gnurobots'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-10943
Comment 29 Fedora Update System 2008-12-08 08:10:00 EST
gnurobots-1.2.0-4.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gnurobots'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2008-10999
Comment 30 Mamoru TASAKA 2008-12-08 12:34:32 EST
Okay. If you think this package can be moved from testing to stable,
please revisit bodhi interface and edit your requests.
Comment 31 Fedora Update System 2008-12-17 19:37:53 EST
gnurobots-1.2.0-4.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 32 Fedora Update System 2008-12-17 19:43:29 EST
gnurobots-1.2.0-4.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.