Bug 1744032 - dpkg cannot build any package due to missing gtar --sort option
Summary: dpkg cannot build any package due to missing gtar --sort option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: dpkg
Version: epel7
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Sergio Basto
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-21 07:35 UTC by Avi Kivity
Modified: 2019-09-21 03:12 UTC (History)
4 users (show)

Fixed In Version: dpkg-1.18.25-9.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-21 03:12:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch removing --sort=name options from tar invocation (3.73 KB, application/mbox)
2019-08-26 11:26 UTC, Avi Kivity
no flags Details

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.


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