RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1386662 - [RFE] support for cpio --reproducible
Summary: [RFE] support for cpio --reproducible
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cpio
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Raiskup
QA Contact: Vaclav Danek
URL:
Whiteboard:
Depends On: 1254537
Blocks: 1386675
TreeView+ depends on / blocked
 
Reported: 2016-10-19 12:06 UTC by Giuseppe Scrivano
Modified: 2018-04-10 10:07 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of: 1254537
Environment:
Last Closed: 2018-04-10 10:07:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0693 0 None None None 2018-04-10 10:07:49 UTC

Description Giuseppe Scrivano 2016-10-19 12:06:52 UTC
cloning to RHEL

+++ This bug was initially created as a clone of Bug #1254537 +++

Description of problem:

The OSTree system uses content-addressed storage, and when initramfs images generated by dracut are in the tree, because the cpio format contains modification and it causes a different checksum every time
it's created, so causing the download of the initrd even if not changed from last time.

Dracut has already support for --reproducible and it is used whenever it is supported by cpio.

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

How reproducible:

Steps to Reproduce:
1. cpio --help | grep reproducible


Actual results:

no support for --reproducible


Expected results:

--reproducible is supported

Additional info:

The backport of the upstream patch:

commit 3945f9db44c935608caa5f084fd7f67ae59ee9e1
Author: Sergey Poznyakoff <gray.ua>
Date:   Mon Dec 1 15:02:38 2014 +0200

    New options to create device and inode-independent archives.
    
    * src/util.c (inode_val): New member trans_inode
    (find_inode_val): New function.
    (find_inode_file): Rewrite using the above.
    (add_inode): Initialize the trans_inode member
    depending on the value of renumber_inodes_option.
    (get_inode_and_dev): New function.
    (stat_to_cpio): Use get_inode_and_dev.
    (arf_stores_inode_p): New function.
    * src/extern.h (renumber_inodes_option)
    (ignore_devno_option): New externs.
    * src/global.c (renumber_inodes_option)
    (ignore_devno_option): New variables.
    * src/main.c: Add new options.
    
    * NEWS: Document changes.
    * doc/cpio.1: Document new options.
    * doc/cpio.texi: Likewise.


is required

--- Additional comment from Ondrej Vasik on 2015-08-18 09:35:04 EDT ---

It is 5 years since the cpio-2.11 was released. I think it would be better to ask upstream to release cpio-2.12 - this might be good excuse for it. Backport is of course doable (although almost all hunks fail when applying directly) - but there are more useful commits in cpio upstream in the last 5 years (and we backported just a few).

Pavel, will you ask Sergey there?

--- Additional comment from Giuseppe Scrivano on 2015-08-20 05:35:50 EDT ---

Good idea.

I have sent some patches to bug-cpio (still didn't appear in the archives)  to get the latest version built on Fedora 22 and get "make check" to pass.

--- Additional comment from Giuseppe Scrivano on 2015-08-26 09:37:25 EDT ---

now they are on the archives:

https://lists.gnu.org/archive/html/bug-cpio/2015-08/msg00000.html

--- Additional comment from Giuseppe Scrivano on 2015-09-13 06:24:29 EDT ---

cpio 2.12 that was released on the 12th of September contains --reproducible:

http://lists.gnu.org/archive/html/bug-cpio/2015-09/msg00004.html

Comment 1 Pavel Raiskup 2016-10-19 12:26:21 UTC
As Ondřej originally said (when we talked about this in Fedora), the patch
doesn't apply now (though probably doable).  And I don't think it is worth
doing a rebase in RHEL7.

Giuseppe, do we know about existing back-port attempts?

Comment 4 Giuseppe Scrivano 2016-10-24 17:15:47 UTC
Pavel, no I don't know of any attempt to rebase that patch on top of rhel-7.3.  The patch itself should not be very difficult to backport, the conflicts in the code part seem quite straightforward to solve (but I have no really tried to see if they hide something else).

Some conflicts in the src/ directory can be solved backporting this additional patch before:

commit 4c7d4359d2dc58126e4e7c6e3dd7cc196322ef28
Author: Sergey Poznyakoff <gray.ua>
Date:   Thu Jul 22 11:34:56 2010 +0300

    Provide a tar-like --directory (-D) option.

before:

commit 3945f9db44c935608caa5f084fd7f67ae59ee9e1
Author: Sergey Poznyakoff <gray.ua>
Date:   Mon Dec 1 15:02:38 2014 +0200

    New options to create device and inode-independent archives.

Comment 13 errata-xmlrpc 2018-04-10 10:07:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0693


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