Bug 683449

Summary: 'make dist-bzip2 dist-gzip' creates empty tar.gz archive
Product: [Fedora] Fedora Reporter: Andris Pavenis <andris.pavenis>
Component: automakeAssignee: Karsten Hopp <karsten>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: karsten
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 13:43:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andris Pavenis 2011-03-09 12:37:06 UTC
Description of problem:

Specifying more than one of targets dist-* on the same make command line
causes only first of them built OK.

For example
    make dist-bzip2 dist-gzip
creates tar.bz2 package without problems, but building of tar.gz package silently fails (size < 100 bytes, no make failure)

Version-Release number of selected component (if applicable):

automake-1.11.1-5.fc14.noarch
autoconf-2.66-2.fc14.noarch

How reproducible:

Always

Steps to Reproduce:
1. Take arbitrary package which uses GNU automake and autoconf. If necessary run autoreconf (to get proper versions of automake and autoconf used)
2. Configure package: ./configure
3. Create at least 2 dist-* targets with the same make invokation (eg. make dist-bz2 dist-gzip) 
  
Actual results:

Only first of dist-* target is built OK. The second silently generates
empty archive

Expected results:

All specified dist-* targets are built OK


Additional info:

The contents of Makefile.in is evidently incorrect for these targets:
dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        $(am__remove_distdir)
dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)

dist-lzma: distdir
        tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
        $(am__remove_distdir)

$(distdir) is removed after building first dist-* target and as result there is no more build distribution directory left for following dist-* targets.

For example for asio-1.5.2 (http://think-async.com/) I'm getting:

[apavenis@callisto asio-1.5.2]$ make dist-bzip2 dist-gzip
{ test ! -d "asio-1.5.2" || { find "asio-1.5.2" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "asio-1.5.2"; }; }
test -d "asio-1.5.2" || mkdir "asio-1.5.2"
 (cd include && make  top_distdir=../asio-1.5.2 distdir=../asio-1.5.2/include \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[1]: Entering directory `/home/apavenis/Source/nobackup/asio/asio-1.5.2/include'
make[1]: Leaving directory `/home/apavenis/Source/nobackup/asio/asio-1.5.2/include'
 (cd src && make  top_distdir=../asio-1.5.2 distdir=../asio-1.5.2/src \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[1]: Entering directory `/home/apavenis/Source/nobackup/asio/asio-1.5.2/src'
make[1]: Leaving directory `/home/apavenis/Source/nobackup/asio/asio-1.5.2/src'
test -n "" \
|| find "asio-1.5.2" -type d ! -perm -755 \
	-exec chmod u+rwx,go+rx {} \; -o \
  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
  ! -type d ! -perm -444 -exec /bin/sh /home/apavenis/Source/nobackup/asio/asio-1.5.2/install-sh -c -m a+r {} {} \; \
|| chmod -R a+r "asio-1.5.2"
tardir=asio-1.5.2 && tar --format=ustar -chf - "$tardir" | bzip2 -9 -c >asio-1.5.2.tar.bz2
{ test ! -d "asio-1.5.2" || { find "asio-1.5.2" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "asio-1.5.2"; }; }
tardir=asio-1.5.2 && tar --format=ustar -chf - "$tardir" | GZIP=--best gzip -c >asio-1.5.2.tar.gz
tar: asio-1.5.2: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
{ test ! -d "asio-1.5.2" || { find "asio-1.5.2" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "asio-1.5.2"; }; }

Comment 1 Fedora End Of Life 2012-08-16 13:43:28 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached 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 to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping