[Bug 676308] Review Request: rubygem-net-scp - A pure Ruby implementation of the SCP client protocol

bugzilla at redhat.com bugzilla at redhat.com
Fri Mar 18 10:14:17 UTC 2011


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


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

--- Comment #8 from Vít Ondruch <vondruch at redhat.com> 2011-03-18 06:14:16 EDT ---
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #4)
> >
> > I agree that we have to avoid pollution. But at the end, if the test pollutes
> > the %buildroot of %_builddir, you still have to either do cleanup or exclude
> > these files from installing/copying. So building into %buildroot cannot save
> > you and it is invalid argument in this discussion.
> 
> - Well, perhaps you are just confused about %_builddir vs %buildroot
>   (I don't know what you mean here by "the %buildroot of %_builddir")

This is clear to me.

>   Usually 
>   * %_builddir is ~/rpmbuild/BUILD
>     With normal %setup -q,
>     - rpmbuild firstly moves to ~/rpmbuild/BUILD (%_builddir)
>     - unpack tarball
>     - then move to  ~/rpmbuild/BUILD/%name-%version
>     - And then, when %build, %install, %check begins, rpmbuild
>       will always move to ~/rpmbuild/BUILD/%name-%version first
>   * On the other hand, %buildroot is usually ~/
>     rpmbuild/BUILDROOT/%{name}-%{version}-%{release}-%{_arch}.
>     On install, files must be installed under %buildroot.
> 
>   So what I am saying is that usually 
>   - %install section should generally just do copy files under 
>     ~/rpmbuild/BUILD into ~/rpmbuild/BUILDROOT
>   - and do not touch files under ~/rpmbuild/BUILDROOT during %check
>     and touch only files under ~/rpmbuild/BUILD
>   And rpmbuild always do the scripts in the order of
>   %prep -> %build -> %install -> %check (not %prep -> %build -> %check
>   -> %install).

I did not realized the order, you are right.

> 
>   So even if testsuite may pollute files under %_builddir on %check,
>   files under %buildroot won't be polluted (again %install is done
>   before %check).
> 
>   Also please check this:
> 
>  
> https://fedoraproject.org/wiki/Packaging/Guidelines#Scriplets_are_only_allowed_to_write_in_certain_directories
> 
>   (%_builddir and %buildroot are clearly distinguished and it is written
>    that %check should not write anything under %buildroot).

While I agree that pollution is wrong and the guideline is reasonable, I have
the feeling that the guideline comes from C/C++ world. For such applications,
you are typically executing test suite using "make test" and it is hard to
adjust the test suite to run from different place, so nobody bothers. In this
case the test suite ensures that the build was correct, but does not ensure
that much that the installation itself will be working.

But we can do this with Ruby. We can try to ensure that the installation
structure, i.e. the %buildroot, is correct, although it is not free of
penalties. Even better, we should foster upstream in preventing pollution of
the %buildroot, i.e. they should place temporary files on suitable places, such
as /tmp folder.

> 
> > It is always good to follow parallels. So I agree that we should probably
> > follow the %prep, %build and %install as you described above, although in this
> > particular case it will be more work. But we should be strict about it,
> > therefore I would like to see this in Ruby packaging guidelines, instead of
> > this paragraph: "The %prep and %build sections of the specfile should be
> > empty."
> 
> - Note that when containing C extension modules, the paragraph is already
>   invalid (as written in ruby packaging guidelines). 
>   Well, we may really have to revise current ruby packaging guideline
>   (even for arch-independent gem based srpm).

+1

> 
> > But I can't agree that the test suite should be always executed in %_builddir,
> > because as I already pointed above, it might happen that you will not catch all
> > possible bugs and you have to care about pollution anyway.
> 
> - Well, I don't think we can catch all possible bugs anyway...

Everybody knows that, but we can't reconcile with it.

>   And for %buildroot pollution issue, please check my comments above.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the package-review mailing list