Spec URL: http://jjames.fedorapeople.org/gap/gap.spec SRPM URL: http://jjames.fedorapeople.org/gap/gap-4.4.12-1.fc16.src.rpm Description: GAP is a system for computational discrete algebra, with particular emphasis on Computational Group Theory. GAP provides a programming language, a library of thousands of functions implementing algebraic algorithms written in the GAP language as well as large data libraries of algebraic objects. GAP is used in research and teaching for studying groups and their representations, rings, vector spaces, algebras, combinatorial structures, and more. This is one of the components of SAGE.
This turned out to be a somewhat difficult review. Problems: 1. gac can't find config.h. Try: gac tst/testall.g gac will try to run: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DSYS_DEFAULT_PATHS="/usr/share/gap" -o /tmp/gac31213/31213_testall.o -I/usr/share/gap -I/usr/bin -DCONFIG_H -c /tmp/gac31213/31213_testall.c Which fails with: In file included from /usr/share/gap/src/compiled.h:8:0, from /tmp/gac31213/31213_testall.c:2: /usr/share/gap/src/system.h:30:20: fatal error: config.h: No such file or directory Since config.h is found at: /usr/share/gap/bin/x86_64-unknown-linux-gnu-gcc/config.h Patching /usr/bin/gac like this works: --- /usr/bin/gac.orig 2011-12-22 02:54:52.249442817 +0800 +++ /usr/bin/gac 2011-12-22 02:55:01.465442409 +0800 @@ -111,9 +111,9 @@ ## c_compile () { echo ${c_compiler} $3 -o $1 -I${gap_dir} \ - -I${gap_bin} -DCONFIG_H -c $2 + -I${gap_binary} -DCONFIG_H -c $2 ${c_compiler} $3 -o $1 -I${gap_dir} \ - -I${gap_bin} -DCONFIG_H -c $2 + -I${gap_binary} -DCONFIG_H -c $2 } 2. You're not shipping sysinfo.gap. This will break compilation of external GAP packages. http://www.gap-system.org/Manuals/doc/htm/ext/CHAP004.htm says: "We suggest that your GAP package contains a file configure which is called with the path of the GAP root directory as parameter. This file then will read sysinfo.gap and set up everything for compiling under the given architecture (for example creating a Makefile from Makefile.in ... The standard GAP distribution contains a GAP package ``example'' whose installation script shows an example way of how to do this." I think this shows that we want something like a "GAP packaging template" that is tested to work with this base GAP package. Time permitting, picking one noarch and one arch specific package from http://www.gap-system.org/Packages/packages.html and try packaging them should produce a workable GAP packaging template ^_^ (I'm half joking. Obviously time and effort is an issue) Debian does have a GAP packaing policy: http://scottt.tw/debian/gap-policy.txt (I extracted it from Debian's gap-doc package for convenience) I don't think we need to follow their naming policy or placing arch specific and noarch files separately in /usr/lib/gap and /usr/share/gap but it's worth reading. Debian's gap-dev has a very different file layout: http://packages.debian.org/sid/amd64/gap-dev/filelist Placing arch specific files in /usr/lib does get rid of one rpmlint warning but in Fedora at least ngspice also places native .o files in /usr/share. I think keeping your exiting file layout is fine if it's possible to build other GAP packages. Debian only has core gap packaged. Frank Lübeck's gapsync binary distribution: http://www.math.rwth-aachen.de:8001/RsyncLinuxGAP/index.html (linked to from the upstream GAP download page so hopefully somewhat sensible) has packages distributed upstream installed. I placed the shell scripts he used to build for x86 and x86_64 here: http://scottt.tw/gapsync/InstForRsync32 http://scottt.tw/gapsync/InstForRsync64 He statically links everything though. (I havn't read the scripts. Just googled around for how people package GAP) 3. The upstream gap download page (http://www.gap-system.org/Download/index.html) suggests running: gap> tst := Filename( DirectoriesLibrary("tst"), "testall.g" ); gap> Read(tst); as a simple self test after installation but gap> DirectoriesLibrary("tst"); fails looking for /usr/share/gap/tst 4. The emacs packaging guidelines suggest you change the Requires and BuildRequires like this: @@ -29,8 +29,8 @@ Patch2: gap-emacs.patch BuildRequires: desktop-file-utils BuildRequires: netpbm-progs -BuildRequires: emacs-nox -BuildRequires: xemacs-devel xemacs-packages-base +BuildRequires: emacs +BuildRequires: xemacs Requires: gzip @@ -65,7 +65,7 @@ Both syntax highlighting and indentation are supported. %package emacs Summary: Edit GAP files with Emacs Group: Applications/Engineering -Requires: %{name} = %{version}-%{release}, emacs(bin) +Requires: %{name} = %{version}-%{release}, emacs(bin) >= %{_emacs_version} BuildArch: noarch %description emacs @@ -86,7 +86,7 @@ GAP Emacs support. Summary: Edit GAP files with XEmacs Group: Applications/Engineering Requires: %{name} = %{version}-%{release} -Requires: xemacs(bin), xemacs-packages-base +Requires: xemacs(bin) >= %{_xemacs_version} BuildArch: noarch See: http://fedoraproject.org/wiki/Packaging:Emacs#Package_Requires I've verified that those BuildRequires do work in mock build 5. For updating the icon cache, the packaging guidelines recommends: %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : which is marginally more efficient on package updates as gtk-udpate-icon-cache is only run once. See: http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache 6. debugvim.txt is shipped twice: /usr/share/gap/etc/debugvim.txt (in gap) /usr/share/doc/gap-vim-4.4.12/debugvim.txt (in gap-vim) you should remove the latter since it's related to /usr/share/gap/etc/debug.vim 7. Personally, I recommend adding a comment before "Requires gzip": +# /usr/bin/gap requires gunzip Requires: gzip
Scott, thanks again for a careful review. I didn't realize Debian had a GAP package. I'm going to go through their package and guidelines before I do anything else, then update this package. It may take me a couple of days to fix all the issues you identified.
So it was more than just a couple of days... I believe I have all of these issues sorted out. I have mostly copied Debian's package layout. Note that Debian doesn't ship the test files, so your 3rd point applies to them, also. Nevertheless, I included those files in -devel, on the theory that they can then be used for package tests. I did not split out a -small-groups-extra package because, frankly, I found it confusing and because the gzipped files aren't all *that* large (< 26 Mbytes for the entire collection). Also, I did not create a separate -doc subpackage like Debian because the online help can look for those files, too. I lumped them all into -online-help. New URLs: http://jjames.fedorapeople.org/gap/gap.spec http://jjames.fedorapeople.org/gap/gap-4.4.12-2.fc16.src.rpm
Created attachment 551952 [details] vim filetype detection plugin for gap
Sorry for the delay for this review: 1. gap-core should own /usr/lib/gap/ (%{gaparchdir}) since it owns /usr/lib/gap/sysinfo.gap 2. For gap-vim, since you're not shipping README.vim-utils I recommend you ship the attached gap.vim as /usr/share/vimfiles/ftdetect/gap.vim. Otherwise the user would have to know to manually ":set filetype=vim" to activate the VIM sytnax hightlighting and indentation plugins. Hopefully the *.g, *.gi, *.gd file extensions are not used by other file types. 3. Placing "README.fedora" in gap-libs and placing "description4r4p10" in gap-core seems a bit strange to me. Maybe move "README" and "README.fedora" to gap-core? (not critical) 4. Since Fedora packaging lack Debian's "recommand" and "suggest" functionality, I'm not sure splitting out the prim, small and trans group subpackages is really a good idea but I'll leave it to your disgression. 5. I was able to build and load the "Example" package from http://www.gap-system.org/Packages/packages.html sucessfully. Formal Package Review ============== Key: - = N/A x = Pass ! = Fail ? = Not evaluated ==== C/C++ ==== [x]: MUST Header files in -devel subpackage, if present. [x]: MUST Package does not contain any libtool archives (.la) [x]: MUST Package does not contain kernel modules. [x]: MUST Package contains no static executables. [x]: MUST Rpath absent or only used for internal libs. [x]: MUST Package is not relocatable. ==== Generic ==== [x]: MUST Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [x]: MUST Package successfully compiles and builds into binary rpms on at least one supported architecture. [x]: MUST All build dependencies are listed in BuildRequires, except for any that are listed in the exceptions section of Packaging Guidelines. [x]: MUST Buildroot is not present Note: Unless packager wants to package for EPEL5 this is fine [x]: MUST Package contains no bundled libraries. [x]: MUST Changelog in prescribed format. [x]: MUST Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) Note: Clean would be needed if support for EPEL is required [x]: MUST Sources contain only permissible code or content. [x]: MUST Each %files section contains %defattr if rpm < 4.4 Note: Note: defattr macros not found. They would be needed for EPEL5 [x]: MUST Macros in Summary, %description expandable at SRPM build time. [x]: MUST Package contains a properly installed %{name}.desktop using desktop- file-install file if it is a GUI application. [x]: MUST Package requires other packages for directories it uses. [x]: MUST Package uses nothing in %doc for runtime. [x]: MUST Package is not known to require ExcludeArch. [x]: MUST Permissions on files are set properly. [x]: MUST Package does not contain duplicates in %files. [x]: MUST Spec file lacks Packager, Vendor, PreReq tags. [x]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. Note: rm -rf would be needed if support for EPEL5 is required [x]: 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 is included in %doc. [x]: MUST License field in the package spec file matches the actual license. [x]: MUST License file installed when any subpackage combination is installed. [x]: MUST Package consistently uses macros (instead of hard-coded directory names). [x]: MUST Package meets the Packaging Guidelines. [x]: MUST Package is named according to the Package Naming Guidelines. [x]: MUST Package does not generates any conflict. [x]: MUST Package obeys FHS, except libexecdir and /usr/target. [x]: MUST Package must own all directories that it creates. [x]: MUST Package does not own files or directories owned by other packages. [x]: MUST Package installs properly. [x]: MUST Requires correct, justified where necessary. [x]: MUST Rpmlint output is silent. rpmlit warnings and errors are all justified: incorrect-fsf-address is not a bit deal rpmlint gap-libs-4.4.12-2.fc17.noarch.rpm gap-libs.noarch: E: incorrect-fsf-address /usr/share/doc/gap-libs-4.4.12/GPL 1 packages and 0 specfiles checked; 1 errors, 0 warnings. no-documentation is fine for gap-emacs-el rpmlint gap-emacs-el-4.4.12-2.fc17.noarch.rpm gap-emacs-el.noarch: W: no-documentation 1 packages and 0 specfiles checked; 0 errors, 1 warnings. /usr/lib/sysinfo.gap is non-binary and it's fine rpmlint gap-core-4.4.12-2.fc17.x86_64.rpm gap-core.x86_64: W: only-non-binary-in-usr-lib gap-core.x86_64: E: zero-length /var/lib/gap/workspace 1 packages and 0 specfiles checked; 1 errors, 1 warnings. Though gap.x86_64 is empty, it can't be noarch since it depends on gap-core. Those are not really spelling errors. no-documentation is fine for gap. rpmlint gap-4.4.12-2.fc17.x86_64.rpm gap.x86_64: W: spelling-error %description -l en_US combinatorial -> combination gap.x86_64: W: spelling-error %description -l en_US metapackage -> meta package, meta-package, prepackage gap.x86_64: E: no-binary gap.x86_64: W: no-documentation 1 packages and 0 specfiles checked; 1 errors, 3 warnings. no-documentation is fine for gap-prim-groups. rpmlint gap-prim-groups-4.4.12-2.fc17.noarch.rpm gap-prim-groups.noarch: W: no-documentation 1 packages and 0 specfiles checked; 0 errors, 1 warnings. no-documentation is fine for gap-prim-groups. gap-trans-groups.noarch: W: no-documentation 1 packages and 0 specfiles checked; 0 errors, 1 warnings. no-documentation is fine for gap-small-groups. rpmlint gap-small-groups-4.4.12-2.fc17.noarch.rpm gap-small-groups.noarch: W: no-documentation 1 packages and 0 specfiles checked; 0 errors, 1 warnings. no-documentation is fine for gap-vim. rpmlint gap-vim-4.4.12-2.fc17.noarch.rpm gap-vim.noarch: W: no-documentation 1 packages and 0 specfiles checked; 0 errors, 1 warnings. %{_prefix}/lib/gap is not really a harcoded-library-path. update-gap-workspace having 0755 permissionin the src rpm is fine. Those are not really spelling errors. rpmlint gap-4.4.12-2.fc17.src.rpm gap.src: W: spelling-error %description -l en_US combinatorial -> combination gap.src: W: spelling-error %description -l en_US metapackage -> meta package, meta-package, prepackage gap.src: W: strange-permission update-gap-workspace 0755L gap.src:4: E: hardcoded-library-path in %{_prefix}/lib/gap 1 packages and 0 specfiles checked; 1 errors, 3 warnings. no-documentation is fine for gap-xemacs-el rpmlint gap-xemacs-el-4.4.12-2.fc17.noarch.rpm gap-xemacs-el.noarch: W: no-documentation 1 packages and 0 specfiles checked; 0 errors, 1 warnings. no-documentation is fine for gap-online-help answers.tex being empty is a bit perculiar but it's like that in the upstream tarball. rpmlint gap-online-help-4.4.12-2.fc17.noarch.rpm gap-online-help.noarch: W: no-documentation gap-online-help.noarch: E: zero-length /usr/share/gap/doc/tut/answers.tex 1 packages and 0 specfiles checked; 1 errors, 1 warnings. [x]: MUST Sources used to build the package match the upstream source, as provided in the spec URL. update-gap-workspace : MD5SUM this package : d4a980c11de9b52b865e1eb8922ee884 MD5SUM upstream package : upstream source not found gap.xml : MD5SUM this package : ee18c6f9efe9bf6b505ecef15eb6f137 MD5SUM upstream package : upstream source not found /home/scottt/work/gap/gap4r4p12.tar.bz2 : MD5SUM this package : 2808c00e85e98843bb0e1a62c33ad5f0 MD5SUM upstream package : 2808c00e85e98843bb0e1a62c33ad5f0 gap-README.fedora : MD5SUM this package : 678ca9de660d5fa489de82e4db9f7e8e MD5SUM upstream package : upstream source not found gap.1.in : MD5SUM this package : 92d1bc5e0acd996c650170bcb2583e35 MD5SUM upstream package : upstream source not found gac.1.in : MD5SUM this package : 379c8943fdce42bdd8302420153b8d4f MD5SUM upstream package : upstream source not found gap.desktop : MD5SUM this package : a97be403c8b9aa74cc8cdea5488f9666 MD5SUM upstream package : upstream source not found gap.el : MD5SUM this package : e28f5579433842bb3e73b1a8120bc72b MD5SUM upstream package : upstream source not found update-gap-workspace.1 : MD5SUM this package : e5644d608a5f88272a844d7867567fbd MD5SUM upstream package : upstream source not found [x]: MUST Spec file is legible and written in American English. [x]: MUST Spec file name must match the spec package %{name}, in the format %{name}.spec. [-]: MUST Package contains a SysV-style init script if in need of one. [x]: MUST File names are valid UTF-8. [x]: SHOULD Reviewer should test that the package builds in mock. [-]: 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. [x]: SHOULD Dist tag is present. [x]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q --requires). [x]: SHOULD Package functions as described. [x]: SHOULD Package does not include license text files separate from upstream. [x]: SHOULD Patches link to upstream bugs/comments/lists or are otherwise justified. [x]: SHOULD Scriptlets must be sane, if used. [x]: SHOULD SourceX / PatchY prefixed with %{name}. Note: Source1: gap-README.fedora (gap-README.fedora) Source2: update-gap- workspace (update-gap-workspace) Source3: gap.xml (gap.xml) Source4: gap.desktop (gap.desktop) Source5: gap.el (gap.el) Source6: gap.1.in (gap.1.in) Source7: gac.1.in (gac.1.in) Source8: update-gap-workspace.1 (update-gap-workspace.1) Patch0: gap-paths.patch (gap-paths.patch) Patch1: gap-raw.patch (gap-raw.patch) Patch2: gap-help.patch (gap- help.patch) Patch3: gap-crc.patch (gap-crc.patch) Patch4: gap-env.patch (gap-env.patch) Patch5: gap-alias.patch (gap-alias.patch) Patch6: gap- emacs.patch (gap-emacs.patch) [x]: SHOULD SourceX is a working URL. [x]: SHOULD Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [x]: SHOULD Package should compile and build into binary rpms on all supported architectures. [x]: SHOULD %check is present and all tests pass. [x]: SHOULD Packages should try to preserve timestamps of original installed files. [x]: SHOULD Spec use %global instead of %define. I'll approve this as soon as you fix points one and two above.
(In reply to comment #5) > Sorry for the delay for this review: No problem. I've been quite busy with the mass rebuild for F17 anyway. You've done a lot of work on this review, and I appreciate it a lot. > 1. gap-core should own /usr/lib/gap/ (%{gaparchdir}) since it owns > /usr/lib/gap/sysinfo.gap Done. > 2. For gap-vim, since you're not shipping README.vim-utils I recommend you ship > the attached gap.vim as /usr/share/vimfiles/ftdetect/gap.vim. Otherwise the > user would have to know to manually ":set filetype=vim" to activate the VIM > sytnax hightlighting and indentation plugins. > Hopefully the *.g, *.gi, *.gd file extensions are not used by other file types. Thank you. I've added this. > 3. Placing "README.fedora" in gap-libs and placing "description4r4p10" in > gap-core seems a bit strange to me. Maybe move "README" and "README.fedora" to > gap-core? (not critical) Good point. I have moved the READMEs to gap-core. > 4. Since Fedora packaging lack Debian's "recommand" and "suggest" > functionality, I'm not sure splitting out the prim, small and trans group > subpackages is really a good idea but I'll leave it to your disgression. I think this is still a good idea considering the size of those packages. However, to address the point that we have no way to recommend them, I made the gap metapackage Require all 3 of these. That way, somebody you does "yum install gap" will get them all, and others can be more selective. > 5. I was able to build and load the "Example" package from > http://www.gap-system.org/Packages/packages.html sucessfully. Great! [snip] > I'll approve this as soon as you fix points one and two above. New URLs: http://jjames.fedorapeople.org/gap/gap.spec http://jjames.fedorapeople.org/gap/gap-4.4.12-3.fc16.src.rpm
(In reply to comment #6) Bravo, this was one tough package! APPROVED.
New Package SCM Request ======================= Package Name: gap Short Description: Computational discrete algebra Owners: jjames Branches: f16 InitialCC:
Git done (by process-git-requests).
It appears that the F16 branch was not created: [jamesjer@diannao gap]$ fedpkg switch-branch f16 Could not execute switch branch: Could not create branch f16
git branch -a lists remotes/origin/f16 for me, and fedpkg switch-branch f16 works too... odd.
Hmmmm, git branch -a lists it for me too, but fedpkg switch-branch is steadfastly refusing to work. I nuked the entire directory and did a fresh fedpkg clone, and now it works. Weird. I guess I can live with not knowing what happened as long as it works now. :-) I'll turn the cvs flag off.
gap-4.4.12-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/gap-4.4.12-3.fc16
gap-4.4.12-3.fc16 has been pushed to the Fedora 16 testing repository.
gap-4.4.12-3.fc16 has been pushed to the Fedora 16 stable repository.