build of package initscripts fails intermittently due to fuzzy patches

Bug #1794611 reported by Scott Little
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Scott Little

Bug Description

Title
-----
build of package initscripts fails

Brief Description
-----------------
build-pkgs fails on package initscripts.

Initscripts is failing during packaging due to the creation of
unexpected .orig files.

Creation of .orig files are a consequence of applying patches
that are not clean. Unclean patches are ones that require
'fuzzing', i.e. treat the patch line numbers as approximate,
rather than a strict requirement, just so long as the
before/after context seems to be correct.

There appears to be a race condition complicating the
reproducability of this bug. The first build fails,
but sometimes it passes on a retry.

A failed build attempt shows the patches being applied with
   rpm-4.11.3
   /usr/bin/patch -p1 --fuzz=0
while a successfull build attempt uses
   rpm-4.14.0
   /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0

--no-backup-if-mismatch causes patch to not create .orig files.

From rpm-4.13 release notes
   Enable –no-backup-if-mismatch by default in %patch macro (RhBug:884755)

Severity
--------
Major

Steps to Reproduce
------------------
build-pkg clean; build-pkgs
grep 'error: Installed (but unpackaged) file(s) found:' $MY_WORKSPACE/std/results/*/initscripts-9.49.41-1.el7.tis.16/build.log

Expected Behavior
------------------
build-pkgs should be able to build initscripts consistently on the first attempt.

Actual Behavior
----------------
build-pkgs generally fails to build initscripts on the first pass
when it typically build ahead of rpm.

It might pass on subsequent build attempts, largely dependent on
if rpm has been upgraded to 4.14 within the mock environmnet.

Reproducibility
---------------
50%

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
master, starting with upgrade to Centos 7.5

Timestamp/Logs
--------------
11:51:28 Start: rpmbuild initscripts-9.49.41-1.el7.tis.16.src.rpm
11:51:28 ERROR: Exception(/localdisk/loadbuild/jenkins/StarlingX_Upstream_build/2018-09-26_11-37-22/std/rpmbuild/SRPMS/initscripts-9.49.41-1.el7.tis.16.src.rpm) Config(mock/b3) 0 minutes 6 seconds
11:51:28 INFO: Results and/or logs in: /localdisk/loadbuild/jenkins/StarlingX_Upstream_build/2018-09-26_11-37-22/std/results/jenkins-StarlingX_Upstream_build-2018-09-26_11-37-22-tis-r6-pike-std/initscripts-9.49.41-1.el7.tis.16
11:51:28 ERROR: Command failed. See logs for output.
11:51:28 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/initscripts.spec
11:51:28 End build on 'b3': /localdisk/loadbuild/jenkins/StarlingX_Upstream_build/2018-09-26_11-37-22/std/rpmbuild/SRPMS/initscripts-9.49.41-1.el7.tis.16.src.rpm
11:51:28 Error building initscripts-9.49.41-1.el7.tis.16.src.rpm on 'b3'.
...
Patch #4 (support-interface-scriptlets.patch):
+ /usr/bin/cat /builddir/build/SOURCES/support-interface-scriptlets.patch
+ /usr/bin/patch -p1 --fuzz=0
patching file sysconfig/network-scripts/ifdown
patching file sysconfig/network-scripts/ifdown-post
Hunk #1 succeeded at 69 (offset 8 lines).
patching file sysconfig/network-scripts/ifup
patching file sysconfig/network-scripts/ifup-post
Hunk #1 succeeded at 148 (offset 31 lines).
...
Patch #9 (0001-force-delay-check-link-down.patch):
+ /usr/bin/cat /builddir/build/SOURCES/0001-force-delay-check-link-down.patch
+ /usr/bin/patch -p1 --fuzz=0
patching file sysconfig/network-scripts/network-functions
Hunk #1 succeeded at 470 (offset 10 lines).
...
Patch #14 (ifup-eth-stop-waiting-if-link-is-up.patch):
+ /usr/bin/cat /builddir/build/SOURCES/ifup-eth-stop-waiting-if-link-is-up.patch
+ /usr/bin/patch -p1 --fuzz=0
patching file sysconfig/network-scripts/ifup-eth
Hunk #1 succeeded at 168 (offset 17 lines).
Hunk #2 succeeded at 188 (offset 17 lines).
Hunk #3 succeeded at 244 (offset 17 lines).
Hunk #4 succeeded at 259 (offset 17 lines).
...
Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/initscripts-9.49.41-1.el7.tis.16.x86_64
error: Installed (but unpackaged) file(s) found:
   /etc/sysconfig/network-scripts/ifdown-post.orig
   /etc/sysconfig/network-scripts/ifup-eth.orig
   /etc/sysconfig/network-scripts/ifup-post.orig
   /etc/sysconfig/network-scripts/network-functions.orig
    File listed twice: /etc/rc.d/init.d/mountnfs
    File listed twice: /usr/lib/systemd/system/mountnfs.service
    Installed (but unpackaged) file(s) found:
   /etc/sysconfig/network-scripts/ifdown-post.orig
   /etc/sysconfig/network-scripts/ifup-eth.orig
   /etc/sysconfig/network-scripts/ifup-post.orig
   /etc/sysconfig/network-scripts/network-functions.orig
RPM build errors:

On a subsequent build attempt

...
/usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0
...
success

Ghada Khalil (gkhalil)
tags: added: stx.build
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Scott Little (slittle1)
summary: - build of package initscripts fails
+ build of package initscripts fails intermittently
tags: added: stx.2018.10
Changed in starlingx:
importance: Undecided → High
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-integ (master)

Fix proposed to branch: master
Review: https://review.openstack.org/605531

Changed in starlingx:
status: Triaged → In Progress
Ghada Khalil (gkhalil)
summary: - build of package initscripts fails intermittently
+ build of package initscripts fails intermittently due to fuzzy patches
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-integ (master)

Reviewed: https://review.openstack.org/605531
Committed: https://git.openstack.org/cgit/openstack/stx-integ/commit/?id=e7efbe11050033b1e76a2de7b175b13e7b8d7c76
Submitter: Zuul
Branch: master

commit e7efbe11050033b1e76a2de7b175b13e7b8d7c76
Author: Scott Little <email address hidden>
Date: Wed Sep 26 14:02:07 2018 -0400

    de-fuzz initscript patches

    Problem:
    - Centos 7.5 upgraded initscripts.
    - Porting of initscripts patches did not resolve and 'fuzz' in the line
      numbers of the patches.
    - If initscript is built by rpm 4.11, or default version of rpm
      until 4.14 is compiled, a fuzzy patch results in the creating
      of an .orig file.
    - Packaging of initscripts failes due to the unexpected, and
      unpackaged .orig file

    Solution:
      Safest solution is to de-fuzz our initscripts patches.

      A seperate investigation will bug report will address the
    broader issues.

    Closes-Bug: 1794611
    Change-Id: I1e91a230194c0c21798b7e91b444f929b54106d6
    Signed-off-by: Scott Little <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ken Young (kenyis)
tags: added: stx.1.0
removed: stx.2018.10
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.