Skip to content

Instantly share code, notes, and snippets.

@rfairley
Last active June 25, 2019 21:17
Show Gist options
  • Save rfairley/35fbe1f1b122981b758ed357a7679e36 to your computer and use it in GitHub Desktop.
Save rfairley/35fbe1f1b122981b758ed357a7679e36 to your computer and use it in GitHub Desktop.
Testing ignition-dracut changes locally

Testing ignition-dracut changes locally in Fedora CoreOS

  1. Download the Ignition RPM source by cloning the following repository: https://src.fedoraproject.org/rpms/ignition

    git clone https://src.fedoraproject.org/rpms/ignition.git
    cd ignition
    
  2. From the ignition-dracut repository you made commits in, push your ignition-dracut changes to your fork of the ignition-dracut repository (any branch is fine).

    cd ignition-dracut
    git push --set-upstream my-remote my-feature-branch
    
  3. Find the commit hash of your last commit by doing git log. Copy this hash.

  4. In the ignition repo from step 1, paste the hash in the dracutcommit macro, on this line https://src.fedoraproject.org/rpms/ignition/blob/a614d3e5a05cbc2788b0cba592a5ee96c9f4cd0a/f/ignition.spec#_70.

  5. Change the dracutproject macro to your GitHub username where you forked the repo, so the specfile points to your fork, on this line: https://src.fedoraproject.org/rpms/ignition/blob/a614d3e5a05cbc2788b0cba592a5ee96c9f4cd0a/f/ignition.spec#_65.

  6. Change the Ignition version to a high number, e.g. 99.0.0 on this line https://src.fedoraproject.org/rpms/ignition/blob/a614d3e5a05cbc2788b0cba592a5ee96c9f4cd0a/f/ignition.spec#_75. This is so COSA picks up your built version, as it will pick up the latest version when overriding.

  7. Build the RPM by doing the following (this may require dnf install -y rpmdevtools fedpkg dnf-plugins-core first):

    cd ignition
    spectool -g ignition.spec
    dnf -y builddep ignition.spec
    fedpkg local
    
  8. The built RPMs should be in a directory x86_64. Copy all of the RPM files from there, into the overrides/rpm directory in your COSA working directory.

  9. From the COSA working directory, execute cosa build --force-nocache. You should see your custom 99.0.0 ignition and ignition-dracut versions included.

@rfairley
Copy link
Author

rfairley commented Jun 25, 2019

Minor: dnf-plugins-core

@zonggen Thanks, fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment