Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-arch-pipeline: fix patch to gf-platformid #401

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

dustymabe
Copy link
Member

Update the hack patch from ddd9da9 to account for the change to the
gf-platformid source file from [1]. The patch is now:

diff --git a/usr/lib/coreos-assembler/gf-platformid b/usr/lib/coreos-assembler/gf-platformid
index 429ca1beb..812359469 100755
--- a/usr/lib/coreos-assembler/gf-platformid
+++ b/usr/lib/coreos-assembler/gf-platformid
@@ -46,7 +46,11 @@ blscfg_path=$(coreos_gf glob-expand /boot/loader/entries/ostree-*.conf)
 coreos_gf download "${blscfg_path}" "${tmpd}"/bls.conf
 # Remove any platformid currently there
 sed -i -e 's, ignition.platform.id=[a-zA-Z0-9]*,,g' "${tmpd}"/bls.conf
-sed -i -e '/^options / s,$, ignition.platform.id='"${platformid}"',' "${tmpd}"/bls.conf
+if [ "${platformid}" == 'aws' ]; then
+    sed -i -e 's|^\(options .*\)|\1 ignition.platform.id='"${platformid}"' console=ttyS0,115200n8|' "${tmpd}"/bls.conf
+else
+    sed -i -e '/^options / s,$, ignition.platform.id='"${platformid}"',' "${tmpd}"/bls.conf
+fi
 coreos_gf upload "${tmpd}"/bls.conf "${blscfg_path}"

 if [ "$basearch" = "s390x" ] ; then

Hopefully we'll be able to drop this hack soon.

[1] coreos/coreos-assembler@be80390

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One optional comment, LGTM otherwise.

@@ -310,7 +310,7 @@ stages:
- kola testiso -S --output-dir tmp/kola-metal
- kola testiso -SP --qemu-native-4k --scenarios iso-install --output-dir tmp/kola-metal4k
- cosa buildextend-openstack
- echo 'ZGlmZiAtLWdpdCBhL3Vzci9saWIvY29yZW9zLWFzc2VtYmxlci9nZi1wbGF0Z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gY29uc29sZT10dHlTMCwxMTUyMDBuOHwnICIke3RtcGR9Ii9ibHMuY29uZgorZWxzZQorICAgIHNlZCAtaSAtZSAnL15vcHRpb25zIC8gcywkLCBpZ25pdGlvbi5wbGF0Zm9ybS5pZD0nIiR7cGxhdGZvcm1pZH0iJywnICIke3RtcGR9Ii9ibHMuY29uZgorZmkKIGNvcmVvc19nZiB1cGxvYWQgIiR7dG1wZH0iL2Jscy5jb25mICIke2Jsc2NmZ19wYXRofSIKIAogaWYgWyAiJGJhc2VhcmNoIiA9ICJzMzkweCIgXSA7IHRoZW4K' | base64 --decode | sudo patch /usr/lib/coreos-assembler/gf-platformid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment just above this line to this comment would be helpful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Update the hack patch from ddd9da9 to account for the change to the
gf-platformid source file from [1]. The patch is now:

```
diff --git a/usr/lib/coreos-assembler/gf-platformid b/usr/lib/coreos-assembler/gf-platformid
index 429ca1beb..812359469 100755
--- a/usr/lib/coreos-assembler/gf-platformid
+++ b/usr/lib/coreos-assembler/gf-platformid
@@ -46,7 +46,11 @@ blscfg_path=$(coreos_gf glob-expand /boot/loader/entries/ostree-*.conf)
 coreos_gf download "${blscfg_path}" "${tmpd}"/bls.conf
 # Remove any platformid currently there
 sed -i -e 's, ignition.platform.id=[a-zA-Z0-9]*,,g' "${tmpd}"/bls.conf
-sed -i -e '/^options / s,$, ignition.platform.id='"${platformid}"',' "${tmpd}"/bls.conf
+if [ "${platformid}" == 'aws' ]; then
+    sed -i -e 's|^\(options .*\)|\1 ignition.platform.id='"${platformid}"' console=ttyS0,115200n8|' "${tmpd}"/bls.conf
+else
+    sed -i -e '/^options / s,$, ignition.platform.id='"${platformid}"',' "${tmpd}"/bls.conf
+fi
 coreos_gf upload "${tmpd}"/bls.conf "${blscfg_path}"

 if [ "$basearch" = "s390x" ] ; then
```

Hopefully we'll be able to drop this hack soon.

[1] coreos/coreos-assembler@be80390
@dustymabe dustymabe merged commit 0f193a8 into coreos:main Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants