Bug 193957 - Review Request: nant
Review Request: nant
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: John Mahowald
Fedora Package Reviews List
: Reopened
Depends On:
Blocks: FE-ACCEPT 189092
  Show dependency treegraph
 
Reported: 2006-06-03 07:28 EDT by Paul F. Johnson
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-21 06:08:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Paul F. Johnson 2006-06-03 07:28:23 EDT
Spec URL: http://www.smmp.salford.ac.uk/packages/nant.spec
SRPM URL: http://www.smmp.salford.ac.uk/packages/nant-0.85-1.src.rpm
Description: 

NAnt is a free .NET build tool which works in a very similar way to ant

This release is built using the 0.85.rc4 source tarball
Comment 1 Paul F. Johnson 2006-06-03 19:29:43 EDT
Spec URL: http://www.smmp.salford.ac.uk/packages/nant.spec
SRPM URL: http://www.smmp.salford.ac.uk/packages/nant-0.85-2.src.rpm

Fixed a couple of problems in the spec file
Comment 2 Paul F. Johnson 2006-06-04 09:38:15 EDT
Spec URL: http://www.knox.net.nz/~nodoid/nant.spec
SRPM URL: http://www.knox.net.nz/~nodoid/nant-0.85-2.src.rpm

Change of URL
Comment 3 Toshio Kuratomi 2006-06-06 23:57:18 EDT
* You should split out a -docs subpackage.
* The binaries are currently being installed in /usr/share which is plainly wrong.
Comment 4 Paul F. Johnson 2006-06-07 06:11:39 EDT
Spec URL: http://www.knox.net.nz/~nodoid/nant.spec
SRPM URL: http://www.knox.net.nz/~nodoid/nant-0.85-2.src.rpm

docs subpackage created
debuginfo package removed (empty)

As to the /usr/share, that is where nant installs itself to by default with the
make install with a symlink to %bindir. I'll need to think about how best to do
this.
Comment 5 Paul F. Johnson 2006-06-07 06:12:34 EDT
http://www.knox.net.nz/~nodoid/nant-0.85-3.src.rpm

D'oh!
Comment 6 Paul F. Johnson 2006-06-07 10:37:13 EDT
I'm going to refer this upstream - the package is correct in where it's putting
things - they just happen to be in the wrong place!
Comment 7 Toshio Kuratomi 2006-06-07 11:09:34 EDT
After sleeping on this, I'm not certain datadir is definitely wrong.  Java puts
jar files into /usr/share.  I believe PEs are portable to different
architectures but I'm not certain.  I'm going to ask on fedora-devel or
fedora-maintainers to see whether Core packagers have reached a concensus on
where mono apps should go.
Comment 8 Toshio Kuratomi 2006-06-07 12:56:14 EDT
Talked with caillon via IRC who says that all of /usr/lib/mono should move to
/usr/share/mono at some point.  So %{_datadir} nant would appear to be doing the
right thing and will be followd by the rest of mono at some point.
Comment 9 Paul F. Johnson 2006-06-08 04:08:37 EDT
I'm not sure on the advisability of moving all of the mono stuff to %{_datadir},
but I will carry on watching upstream and see what happens, though I can't see
there being much enthusiasm for such a change.
Comment 10 John Mahowald 2006-07-08 17:58:09 EDT
Mono packaging guidelines say to put in arch dependent, however, basically
%_libdir. http://fedoraproject.org/wiki/Packaging/Mono   In this case it seems
to be portable but since we have to allow for native compilation it's going into
arch dependent.

My attempt at forcing %_libdir:
http://fedorared.org/~john/review/nant-0.85-4.src.rpm

Note the hack to substiute in %_lib. It does make this self-building thing
install to /usr/lib64 on x86_64, however.
Comment 11 Paul F. Johnson 2006-07-08 18:55:04 EDT
Spec URL: http://www.knox.net.nz/~nodoid/nant.spec
SRPM URL: http://www.knox.net.nz/~nodoid/nant-0.85-4.src.rpm

Tested and looking good. I've built boo against it and that seems happy.
Comment 12 John Mahowald 2006-07-08 19:10:13 EDT
Almost there.

nant-0.85-4.src.rpm

On nant-docs:
* Missing dependancy on scrollkeeper-update for %post (package scrollkeeper)
* Missing dependancy on scrollkeeper-update for %postun (package scrollkeeper)


rpmlint:
W: nant non-standard-group Development/Other
Suggest Development/Tools

W: nant strange-permission nant-0.85-rc4-src.tar.gz 0666
W: nant strange-permission nant.spec 0666
Ignore.

E: nant non-utf8-spec-file nant.spec
file says nant.spec: ISO-8859 Java program text. Save as utf8.

W: nant rpm-buildroot-usage %build export MONO_PATH=%{buildroot}/lib
E: nant hardcoded-library-path in %{buildroot}/lib
Needed, as far as I can tell. Ignore.

E: nant no-binary
Ignore.

E: nant only-non-binary-in-usr-lib
Assemblies and such. Ignore.

W: nant wrong-file-end-of-line-encoding /usr/share/doc/nant-0.85/license.html
W: nant wrong-file-end-of-line-encoding /usr/share/doc/nant-0.85/COPYING.txt
W: nant wrong-file-end-of-line-encoding /usr/share/doc/nant-0.85/README.txt
W: nant wrong-file-end-of-line-encoding /usr/share/doc/nant-0.85/releasenotes.html

And everything from nant-docs has wrong-file-end-of-line-encoding. Optionally
fix these.

- package meets naming guidelines
- package meets packaging guidelines
- license (GPL) OK, text in %doc, matches source
- spec file legible, in am. english
- source matches upstream
- package compiles on devel (x86_64)
- no missing BR
- no unnecessary BR
- no locales
- not relocatable
- owns all directories that it creates
- no duplicate files
- permissions ok
- %clean ok
- macro use consistent
- code, not content
-  -docs package
- nothing in %doc affects runtime
- no need for .desktop file 
Comment 13 Paul F. Johnson 2006-07-08 20:09:43 EDT
Spec URL: http://www.knox.net.nz/~nodoid/nant.spec
SRPM URL: http://www.knox.net.nz/~nodoid/nant-0.85-5.src.rpm

All of the fixes as required in #12
Comment 14 John Mahowald 2006-07-09 17:41:05 EDT
You can also optionally fix the end of line on every other file in the package.

APPROVED
Comment 15 Paul F. Johnson 2006-07-09 17:50:06 EDT
Thanks :-)
Comment 16 Thomas Moschny 2006-07-19 08:58:28 EDT
A small problem with nant-0.85-5.src.rpm rebuilt on fc5: /usr/bin/nant tries to
call /var/tmp/nant-0.85-5fc5-root-user/usr/lib/NAnt/bin/NAnt.exe.

This small patch fixes it:

--- nant.spec.orig    2006-07-09 02:06:41.000000000 +0200
+++ nant.spec     2006-07-19 14:57:55.000000000 +0200
@@ -46,7 +46,7 @@
 %install
 rm -rf %{buildroot}
 %makeinstall
-sed -i -e "s#%buildroot##" %buildroot%_bindir/%name
+sed -i -e "s#%{buildroot}##" %{buildroot}%{_bindir}/%{name}
 find examples -name \*.dll -o -name \*.exe|xargs rm -f
 rm -rf %{buildroot}%{_datadir}/NAnt/doc

Comment 17 Ville Skyttä 2006-07-19 11:41:46 EDT
(In reply to comment #16)
> A small problem with nant-0.85-5.src.rpm rebuilt on fc5: /usr/bin/nant tries
> to call /var/tmp/nant-0.85-5fc5-root-user/usr/lib/NAnt/bin/NAnt.exe.

That's not a small problem, it's an arbitrary command execution vulnerability. 
Please install fedora-rpmdevtools and add check-buildroot and friends to your
~/.rpmmacros (eg. using fedora-buildrpmtree), it catches errors like this:

[...]
+ /usr/lib/rpm/check-buildroot
/var/tmp/nant-0.85-5-buildroot-scop/usr/bin/nant:exec
/usr/lib64/pkgconfig/../../bin/mono
/var/tmp/nant-0.85-5-buildroot-scop/usr/lib64/NAnt/bin/NAnt.exe "$@"
Found '/var/tmp/nant-0.85-5-buildroot-scop' in installed files; aborting
error: Bad exit status from /var/tmp/rpm-tmp.42428 (%install)

The same problem is in the package released in devel.  Filed as bug 199432.
Comment 18 Jason Tibbitts 2006-07-19 11:52:20 EDT
How can I get check-buildroot to run within mock?
Comment 19 Paul F. Johnson 2006-07-19 15:30:22 EDT
Thanks. I'll check onto the cause and patch it up.


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