patch-iso script fails due to a pxeboot relocation-related change

Bug #1968566 reported by M. Vefa Bicakci
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
M. Vefa Bicakci

Bug Description

Brief Description
-----------------
When using patch-iso against a StarlingX patch file containing pxe-network-installer and an ISO file, patch-iso fails with error messages like the following:

+ rm -f .../patchiso_build_XXXXXX/var/pxeboot/pxelinux.0 .../patchiso_build_XXXXXX/var/pxeboot/menu.c32 .../patchiso_build_XXXXXX/var/pxeboot/chain.c32
+ cp --preserve=all pxeboot/pxelinux.0 pxeboot/menu.c32 pxeboot/chain.c32 .../patchiso_build_XXXXXX/var/pxeboot/
cp: target ‘.../patchiso_build_XXXXXX/var/pxeboot/’ is not a directory

Severity
--------
Minor

Steps to Reproduce
------------------
First build an ISO image. Afterwards, build a StarlingX patch that includes the pxe-network-installer RPM package, and then run a command like the following:

  bash -x ./cgcs-root/build-tools/patch-iso -i my_iso.iso -o my_patched_iso.iso kernel-001.patch

Expected Behavior
------------------
patch-iso works

Actual Behavior
----------------
patch-iso fails with the error messages shown in the description section.

Reproducibility
---------------
100% reproducible.

System Configuration
--------------------
Not applicable.

Last Pass
---------
Issue appears to have been introduced with the following commit:
  https://review.opendev.org/c/starlingx/root/+/822009

Timestamp/Logs
--------------
Please see the issue description.

Test Activity
-------------
Normal use.

Workaround
----------
None.

Changed in starlingx:
assignee: nobody → M. Vefa Bicakci (vbicakci)
status: New → Confirmed
Changed in starlingx:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/c/starlingx/root/+/836397
Committed: https://opendev.org/starlingx/root/commit/1a9872ca9d32b1af0517fd85a282c16efa37189e
Submitter: "Zuul (22348)"
Branch: master

commit 1a9872ca9d32b1af0517fd85a282c16efa37189e
Author: M. Vefa Bicakci <email address hidden>
Date: Mon Apr 4 15:29:50 2022 -0400

    patch-iso: Fix up paths

    Commit c8c75e81b551 ("relocate /pxeboot to /var/pxeboot", 2021-12-15)
    inadvertently introduced a few bugs to patch-iso that prevent successful
    execution of this script when a patch with pxe-network-installer is
    attempted to be used. This is necessary, for example, to be able to
    patch kernel and initial RAM file system images in an ISO image.

    Here is an example for the error messages:

      + cp --preserve=all pxeboot/pxelinux.0 pxeboot/menu.c32 \
        pxeboot/chain.c32 .../patchiso_build_XXXXXX/var/pxeboot/
      cp: target '.../patchiso_build_XXXXXX/var/pxeboot/' \
        is not a directory

    This commit fixes the paths used by patch-iso so that such errors are
    not encountered.

    Verification:
    - patch-iso is successfully executed against a patch file that includes
      a newer pxe-network-installer package.

    Closes-Bug: 1968566

    Change-Id: I4606d062b45ed03b64f514131d3d6e27434e7675
    Signed-off-by: M. Vefa Bicakci <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.7.0 stx.build stx.tools
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.