Bug 1744032

Summary: dpkg cannot build any package due to missing gtar --sort option
Product: [Fedora] Fedora EPEL Reporter: Avi Kivity <avi.kivity>
Component: dpkgAssignee: Sergio Basto <sergio>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel7CC: andrew, robinlee.sysu, sergio, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dpkg-1.18.25-9.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 03:12:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch removing --sort=name options from tar invocation none

Description Avi Kivity 2019-08-21 07:35:13 UTC
Description of problem:

When dpkg builds a package, it calls gtar --sort, but the version of tar supplied in RHEL 7 / CentOS 7 does not provide this option.

Version-Release number of selected component (if applicable):
dpkg-1.18.25-8.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Use dpkg-deb to build a package

Actual results:

Crash due to gtar not accepting the --sort option.


Expected results:

Built package.


Additional info:

The offending call is in scripts/Dpkg/Source/Archive.pm:

    $spawn_opts{exec} = [ $Dpkg::PROGTAR, '-cf', '-', '--format=gnu', '--sort=name',
                          '--mtime', "\@$mtime", '--clamp-mtime', '--null',
                          '--numeric-owner', '--owner=0', '--group=0',
                          @{$opts{options}}, '-T', '-' ];


It can be solved by just dropping that option. I can provide a patch if needed.

Comment 1 Sergio Basto 2019-08-26 04:35:45 UTC
yes please provide a patch , I will review it Thanks

Comment 2 Sergio Basto 2019-08-26 05:43:41 UTC
hum --clamp-mtime should not be there ! , it already should be removed by this patch [1]. I will investigate more tomorrow 

[1] 
https://src.fedoraproject.org/rpms/dpkg/blob/epel7/f/dpkg-clamp-mtime.patch

Comment 3 Avi Kivity 2019-08-26 10:57:17 UTC
A patch removing --sort=name will conflict with your patch removing --clamp-mtime. So either you do both, or I'll post mine after you commit yours.

Comment 4 Avi Kivity 2019-08-26 10:58:50 UTC
Or I'll send a patch removing both :)

Comment 5 Avi Kivity 2019-08-26 11:26:17 UTC
Created attachment 1608087 [details]
patch removing --sort=name options from tar invocation

Comment 6 Sergio Basto 2019-08-31 15:21:05 UTC
err , --sort was introduced also just in tar version 1.28 , I will think what is the best solution bundled tar 1.28 or still try user tar 1.27 from el7 . What do you think , we can live with tar without sort or not ?

Thanks for the report .

Comment 7 Avi Kivity 2019-08-31 15:25:36 UTC
Sorting is just a nice-to-have, I don't think there is any problem in not sorting.

Comment 8 Avi Kivity 2019-09-05 17:00:00 UTC
Ping?

Comment 9 Fedora Update System 2019-09-05 21:32:14 UTC
FEDORA-EPEL-2019-a3b4d50e09 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-a3b4d50e09

Comment 10 Sergio Basto 2019-09-05 21:32:48 UTC
done

Comment 11 Fedora Update System 2019-09-06 17:16:03 UTC
dpkg-1.18.25-9.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-a3b4d50e09

Comment 12 Fedora Update System 2019-09-21 03:12:55 UTC
dpkg-1.18.25-9.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.