Bug 672538 - rpmbuild post-install hooks should not touch RPM_BUILD_DIR
Summary: rpmbuild post-install hooks should not touch RPM_BUILD_DIR
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-25 13:50 UTC by Petr Pisar
Modified: 2016-11-16 09:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-16 09:47:25 UTC
Type: ---


Attachments (Terms of Use)

Description Petr Pisar 2011-01-25 13:50:21 UTC
When packaging perl-Test-DistManifest (not yet in Fedora), I found tests run in %check phase fails. If I run the tests at the end of %install, they would pass. The tests works with content of BUILDROOT:

t/02manifest.t ...... 1/4 # Distribution files are missing in MANIFEST:
# debugfiles.list
# debugsources.list
# debuglinks.list

I snapshot BUILDROOT content at the end of %install and at the begin of %check and found following difference:

# LANG=en_US diff -aur  before/ after/
Only in after/Test-DistManifest-1.009: debugfiles.list
Only in after/Test-DistManifest-1.009: debuglinks.list
Only in after/Test-DistManifest-1.009: debugsources.list

I search build log and following commands are run at the end of %install:

+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id /home/test/rpmbuild/BUILD/Test-DistManifest-1.009
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars

So the problem is rpmbuild helpers create temporary files in BUILDROOT instead of some sort of TMPDIR.

I propose to create all temporary files in different directory than in BUILDROOT.

Comment 1 Panu Matilainen 2011-01-28 14:26:38 UTC
I agree that $RPM_BUILD_ROOT is no place to put temporary files ... and none of the scripts do so AFAIK. Find-debuginfo creates its temporary files (those debug*.list files) in $RPM_BUILD_DIR, ie the compilation directory. If they get copied into the actual buildroot, the package's build process is doing something like 'cp * <dest>' instead of installing known contents.

Comment 2 Petr Pisar 2011-01-28 14:52:04 UTC
Sorry, I always mangle the name.

I have problem the temporary files are stored into RPM_BUILD_DIR (i.e. CWD of %build and %check). Would it be possible to make the helpers to use different directory, or to clean up before %check?

You can see my problem in package under review https://bugzilla.redhat.com/show_bug.cgi?id=672543 (see the first command in %check section of spec file).

Comment 3 Fedora Admin XMLRPC Client 2012-04-13 23:05:41 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2012-04-13 23:08:39 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora End Of Life 2013-04-03 16:45:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 6 Fedora End Of Life 2015-01-09 16:31:38 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2015-05-29 08:38:08 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Petr Pisar 2015-05-29 08:48:51 UTC
debuginfo generators still pollute BUILDROOT.

Comment 9 Jan Kurik 2015-07-15 15:17:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 10 Panu Matilainen 2016-11-16 09:47:25 UTC
(In reply to Petr Pisar from comment #8)
> debuginfo generators still pollute BUILDROOT.

And still its not BUILDROOT you're talking about but RPM_BUILD_DIR, changing the bug summary to reflect that.

Anyway, RPM_BUILD_DIR is the place where software gets built and is by definition a temporary location during build. The debuginfo lists fit that definition and life cycle perfectly, I dont see why we should pollute any other place and then separately worry about cleaning that when there already is a place that fits the bill. WONTFIX.

Having problems with extra files in directory is IMO an upstream problem: software should damn well know which files it owns and only touch those, and not any arbitrary junk that might be laying around, whether its coming from rpm or a human who might or might not be friendly.


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