From 38ce80f8a295e193b336b20bad45d6a14bf099dc Mon Sep 17 00:00:00 2001 From: Ahree Hong Date: Wed, 17 Apr 2024 16:09:43 -0700 Subject: [PATCH] Bump tinkerbell/actions to latest commit --- UPSTREAM_PROJECTS.yaml | 4 +- ...I2DISK_ATTRIBUTION.txt => ATTRIBUTION.txt} | 201 ++++++++- projects/tinkerbell/hub/CEXEC_ATTRIBUTION.txt | 267 ------------ projects/tinkerbell/hub/CHECKSUMS | 20 +- projects/tinkerbell/hub/GIT_TAG | 2 +- projects/tinkerbell/hub/GOLANG_VERSION | 2 +- projects/tinkerbell/hub/Help.mk | 16 +- .../tinkerbell/hub/IMAGE2DISK_ATTRIBUTION.txt | 396 ------------------ projects/tinkerbell/hub/KEXEC_ATTRIBUTION.txt | 304 -------------- projects/tinkerbell/hub/Makefile | 13 +- projects/tinkerbell/hub/README.md | 2 +- .../tinkerbell/hub/WRITEFILE_ATTRIBUTION.txt | 362 ---------------- .../hub/docker/linux/cexec/Dockerfile | 2 +- .../hub/docker/linux/image2disk/Dockerfile | 2 +- .../hub/docker/linux/kexec/Dockerfile | 2 +- .../hub/docker/linux/oci2disk/Dockerfile | 2 +- .../hub/docker/linux/writefile/Dockerfile | 2 +- ...otconfig-support-to-WriteFile-action.patch | 123 ------ ...-Add-Bootconfig-support-to-WriteFile.patch | 88 ++++ ...er-data-from-Hegel-and-write-to-disk.patch | 113 +++-- ...te-DHCP-offer-to-static-Netplan-file.patch | 319 ++++++++------ ...ed-interface-if-vlan_id-exists-in-pr.patch | 169 ++++++++ ...ite-file-to-read-multiple-HEGEL_URLS.patch | 105 ----- ...c-IP-configuration-for-Bottlerocket.patch} | 61 +-- ...ed-interface-if-vlan_id-exists-in-pr.patch | 225 ---------- ...ch => 0006-Fix-net-interface-lookup.patch} | 32 +- .../patches/0007-Update-vlan-checking.patch | 91 ---- .../patches/0008-Fix-netplan-vlan-file.patch | 80 ---- ...dress-in-Bottlerocket-network-config.patch | 47 --- ...0-status-codes-from-metadata-service.patch | 28 -- ...ent-is-specified-before-writing-file.patch | 36 -- ..._CONTENTS-and-CONTENTS-to-be-checked.patch | 31 -- 32 files changed, 780 insertions(+), 2367 deletions(-) rename projects/tinkerbell/hub/{OCI2DISK_ATTRIBUTION.txt => ATTRIBUTION.txt} (71%) delete mode 100644 projects/tinkerbell/hub/CEXEC_ATTRIBUTION.txt delete mode 100644 projects/tinkerbell/hub/IMAGE2DISK_ATTRIBUTION.txt delete mode 100644 projects/tinkerbell/hub/KEXEC_ATTRIBUTION.txt delete mode 100644 projects/tinkerbell/hub/WRITEFILE_ATTRIBUTION.txt delete mode 100644 projects/tinkerbell/hub/patches/0001-Add-Bootconfig-support-to-WriteFile-action.patch create mode 100644 projects/tinkerbell/hub/patches/0001-Add-Bootconfig-support-to-WriteFile.patch create mode 100644 projects/tinkerbell/hub/patches/0004-Create-VLAN-tagged-interface-if-vlan_id-exists-in-pr.patch delete mode 100644 projects/tinkerbell/hub/patches/0004-Modify-write-file-to-read-multiple-HEGEL_URLS.patch rename projects/tinkerbell/hub/patches/{0006-Add-static-IP-configuration-for-Bottlerocket.patch => 0005-Add-static-IP-configuration-for-Bottlerocket.patch} (80%) delete mode 100644 projects/tinkerbell/hub/patches/0005-Create-VLAN-tagged-interface-if-vlan_id-exists-in-pr.patch rename projects/tinkerbell/hub/patches/{0013-Fix-net-interface-lookup.patch => 0006-Fix-net-interface-lookup.patch} (86%) delete mode 100644 projects/tinkerbell/hub/patches/0007-Update-vlan-checking.patch delete mode 100644 projects/tinkerbell/hub/patches/0008-Fix-netplan-vlan-file.patch delete mode 100644 projects/tinkerbell/hub/patches/0009-Use-MAC-address-in-Bottlerocket-network-config.patch delete mode 100644 projects/tinkerbell/hub/patches/0010-Handle-non-200-status-codes-from-metadata-service.patch delete mode 100644 projects/tinkerbell/hub/patches/0011-Ensure-content-is-specified-before-writing-file.patch delete mode 100644 projects/tinkerbell/hub/patches/0012-Allow-BOOTCONFIG_CONTENTS-and-CONTENTS-to-be-checked.patch diff --git a/UPSTREAM_PROJECTS.yaml b/UPSTREAM_PROJECTS.yaml index 3d3733289a..dae2efdb81 100644 --- a/UPSTREAM_PROJECTS.yaml +++ b/UPSTREAM_PROJECTS.yaml @@ -277,8 +277,8 @@ projects: go_version: "1.17" - name: hub versions: - - commit: 404dab73a8a7f33e973c6e71782f07e82b125da9 - go_version: "1.17" + - commit: d524b77c7a44525c4318da3d2b5857c03711f3f8 + go_version: "1.21" - name: rufio versions: - tag: v0.3.3 diff --git a/projects/tinkerbell/hub/OCI2DISK_ATTRIBUTION.txt b/projects/tinkerbell/hub/ATTRIBUTION.txt similarity index 71% rename from projects/tinkerbell/hub/OCI2DISK_ATTRIBUTION.txt rename to projects/tinkerbell/hub/ATTRIBUTION.txt index 1470e3ac08..880f05a15f 100644 --- a/projects/tinkerbell/hub/OCI2DISK_ATTRIBUTION.txt +++ b/projects/tinkerbell/hub/ATTRIBUTION.txt @@ -2,14 +2,23 @@ ** github.com/containerd/containerd; version v1.4.4 -- https://github.com/containerd/containerd +** github.com/klauspost/compress; version v1.17.7 -- +https://github.com/klauspost/compress + ** github.com/opencontainers/go-digest; version v1.0.0 -- https://github.com/opencontainers/go-digest ** github.com/opencontainers/image-spec/specs-go; version v1.0.1 -- https://github.com/opencontainers/image-spec -** github.com/tinkerbell/hub/actions/oci2disk/v1; version 404dab73a8a7f33e973c6e71782f07e82b125da9 -- -https://github.com/tinkerbell/hub/actions/oci2disk/v1 +** github.com/spf13/cobra; version v1.1.3 -- +https://github.com/spf13/cobra + +** github.com/tinkerbell/actions; version d524b77c7a44525c4318da3d2b5857c03711f3f8 -- +https://github.com/tinkerbell/actions + +** github.com/vishvananda/netns; version v0.0.4 -- +https://github.com/vishvananda/netns ** google.golang.org/genproto/googleapis/rpc/status; version v0.0.0-20191108220845-16a3f7862a1a -- https://github.com/googleapis/go-genproto @@ -304,11 +313,45 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/klauspost/compress; version v1.11.12 -- +** github.com/insomniacslk/dhcp; version v0.0.0-20240419123447-f1cffa2c0c49 -- +https://github.com/insomniacslk/dhcp + +BSD 3-Clause License + +Copyright (c) 2018, Andrea Barberio +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------ + +** github.com/klauspost/compress/internal/snapref; version v1.17.7 -- https://github.com/klauspost/compress -Copyright (c) 2012 The Go Authors. All rights reserved. -Copyright (c) 2019 Klaus Post. All rights reserved. +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -338,10 +381,45 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/klauspost/compress/snappy; version v1.11.12 -- -https://github.com/klauspost/compress +** github.com/pierrec/lz4/v4; version v4.1.14 -- +https://github.com/pierrec/lz4/v4 -Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. +Copyright (c) 2015, Pierre Curto +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of xxHash nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------ + +** github.com/spf13/pflag; version v1.0.5 -- +https://github.com/spf13/pflag + +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -371,10 +449,45 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** github.com/ulikunitz/xz; version v0.5.10 -- +** github.com/u-root/uio; version v0.0.0-20230220225925-ffce2a382923 -- +https://github.com/u-root/uio + +BSD 3-Clause License + +Copyright (c) 2012-2021, u-root Authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------ + +** github.com/ulikunitz/xz; version v0.5.11 -- https://github.com/ulikunitz/xz -Copyright (c) 2014-2021 Ulrich Kunitz +Copyright (c) 2014-2022 Ulrich Kunitz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -403,16 +516,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------ -** golang.org/go; version go1.17.13 -- +** golang.org/go; version go1.21.8 -- https://github.com/golang/go -** golang.org/x/net/context/ctxhttp; version v0.0.0-20191004110552-13f9640d40b9 -- +** golang.org/x/net; version v0.23.0 -- https://golang.org/x/net -** golang.org/x/sync; version v0.0.0-20201207232520-09787c993a3a -- +** golang.org/x/sync; version v0.3.0 -- https://golang.org/x/sync -** golang.org/x/sys; version v0.0.0-20210124154548-22da62e12c0c -- +** golang.org/x/sys/unix; version v0.18.0 -- https://golang.org/x/sys Copyright (c) 2009 The Go Authors. All rights reserved. @@ -472,11 +585,48 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE ------ -** github.com/klauspost/compress/zstd/internal/xxhash; version v1.11.12 -- +** github.com/dustin/go-humanize; version v1.0.0 -- +https://github.com/dustin/go-humanize +Copyright (c) 2005-2008 Dustin Sallings + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------ + +** github.com/josharian/native; version v1.1.0 -- +https://github.com/josharian/native + +Copyright 2020 Josh Bleecher Snyder + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------ + +** github.com/klauspost/compress/zstd/internal/xxhash; version v1.17.7 -- https://github.com/klauspost/compress Copyright (c) 2016 Caleb Spare -** github.com/sirupsen/logrus; version v1.8.1 -- +** github.com/sirupsen/logrus; version v1.9.0 -- https://github.com/sirupsen/logrus Copyright (c) 2014 Simon Eskildsen @@ -499,3 +649,22 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------ + +** github.com/mdlayher/packet; version v1.1.2 -- +https://github.com/mdlayher/packet +Copyright (C) 2022 Matt Layher + +** github.com/mdlayher/socket; version v0.4.1 -- +https://github.com/mdlayher/socket +Copyright (C) 2021 Matt Layher + +# MIT License + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------ diff --git a/projects/tinkerbell/hub/CEXEC_ATTRIBUTION.txt b/projects/tinkerbell/hub/CEXEC_ATTRIBUTION.txt deleted file mode 100644 index b30eb8e4d2..0000000000 --- a/projects/tinkerbell/hub/CEXEC_ATTRIBUTION.txt +++ /dev/null @@ -1,267 +0,0 @@ - -** github.com/tinkerbell/hub/actions/cexec/v1; version 404dab73a8a7f33e973c6e71782f07e82b125da9 -- -https://github.com/tinkerbell/hub/actions/cexec/v1 - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ------- - -** golang.org/go; version go1.17.13 -- -https://github.com/golang/go - -** golang.org/x/sys/unix; version v0.0.0-20200420163511-1957bb5e6d1f -- -https://golang.org/x/sys - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** github.com/sirupsen/logrus; version v1.7.0 -- -https://github.com/sirupsen/logrus -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ------- diff --git a/projects/tinkerbell/hub/CHECKSUMS b/projects/tinkerbell/hub/CHECKSUMS index 3ac079a77b..12805cc5ec 100644 --- a/projects/tinkerbell/hub/CHECKSUMS +++ b/projects/tinkerbell/hub/CHECKSUMS @@ -1,10 +1,10 @@ -44a34cec86053a6f7a5e44c476c899accf0954c2f3d9ffad31db338526f81ee5 _output/bin/hub/linux-amd64/cexec -e004f52237340707b753fd226c6c369931d9d6c1f966615d6475d4c2fd13dcf0 _output/bin/hub/linux-amd64/image2disk -dcfec6b7c4fc2452defdaaec7a611fbe6cdf00e8e5dae86768447578849a4766 _output/bin/hub/linux-amd64/kexec -cdf00127e3c815c792e3eb7e61fa858095a62afb98bda2714f92e463ca95f0cb _output/bin/hub/linux-amd64/oci2disk -2e11b5eadab9dacba3df8e2b28d7426a342da14c189f0c73fe0f7df66c39c4c7 _output/bin/hub/linux-amd64/writefile -0f112017256dd3811ec477798bc527f3e5407878f766a06c287cdb4a633b168f _output/bin/hub/linux-arm64/cexec -0aac72372e42218ac7068bf9783ace087f8069ceb6eb8a040f74610974b2bb18 _output/bin/hub/linux-arm64/image2disk -9d317f30fa3ee4fe78fdb2f2480790a6ea57fad6c2eea9383fe6929e5ea68e64 _output/bin/hub/linux-arm64/kexec -e97a4c3ef71775028f9f6bed4f03f6e1abc97d843ef6e8ea5f9e1225c9786db0 _output/bin/hub/linux-arm64/oci2disk -cbda03c6c653fc388f1c43d224881ff8eba8f9ea313644c08a0f15ab6fb8720f _output/bin/hub/linux-arm64/writefile +bbf2393c2c7d1d46d1e5daea8a5611827a39c5f94e1503debf975c7c473590d2 _output/bin/hub/linux-amd64/cexec +769beeb17c9323984f624290bd027f693b3a30f0d9a4ec826825120c3f16e4be _output/bin/hub/linux-amd64/image2disk +b140ac5244a878693053b514d5ee4a61042fa63af032e329a8ca62c559878c23 _output/bin/hub/linux-amd64/kexec +cd935537219f4608c0de2f8c8e87888522d71dde32a2d9449d438de6c69d077b _output/bin/hub/linux-amd64/oci2disk +8bcf9b5b2ba2beb28868f9e211297b14dc5e09ac32eb93dc991a9fee86476313 _output/bin/hub/linux-amd64/writefile +052bc8f5991cc1449fce0e27cf7b7a0957fbf2accea725a7d7e816825334486d _output/bin/hub/linux-arm64/cexec +d9311bdd154687338aff2f494f0b62a0c116da8b8c885cda63f9d744ef505c96 _output/bin/hub/linux-arm64/image2disk +ae5902e704232a3a4b907a87fe4e4449a3acb0621a345b7a92cbc1891e314b51 _output/bin/hub/linux-arm64/kexec +574b853cf9f45f11883c6629ccc22b8d9d08dc1d5951e7992646c7b5dc7c45fa _output/bin/hub/linux-arm64/oci2disk +03a0087dad8afbacd326f0a17efc7dbcbc0ec5879dcf9250123cc278d78758d4 _output/bin/hub/linux-arm64/writefile diff --git a/projects/tinkerbell/hub/GIT_TAG b/projects/tinkerbell/hub/GIT_TAG index b2132c29c6..72d6173e84 100644 --- a/projects/tinkerbell/hub/GIT_TAG +++ b/projects/tinkerbell/hub/GIT_TAG @@ -1 +1 @@ -404dab73a8a7f33e973c6e71782f07e82b125da9 +d524b77c7a44525c4318da3d2b5857c03711f3f8 diff --git a/projects/tinkerbell/hub/GOLANG_VERSION b/projects/tinkerbell/hub/GOLANG_VERSION index b48f322609..d2ab029d32 100644 --- a/projects/tinkerbell/hub/GOLANG_VERSION +++ b/projects/tinkerbell/hub/GOLANG_VERSION @@ -1 +1 @@ -1.17 +1.21 diff --git a/projects/tinkerbell/hub/Help.mk b/projects/tinkerbell/hub/Help.mk index 98d6c97a98..7002773efd 100644 --- a/projects/tinkerbell/hub/Help.mk +++ b/projects/tinkerbell/hub/Help.mk @@ -60,11 +60,7 @@ run-in-docker/checksums: ## Run `checksums` in docker builder container run-in-docker/clean: ## Run `clean` in docker builder container run-in-docker/clean-go-cache: ## Run `clean-go-cache` in docker builder container run-in-docker/validate-checksums: ## Run `validate-checksums` in docker builder container -run-in-docker/hub/actions/cexec/v1/eks-anywhere-go-mod-download: ## Run `hub/actions/cexec/v1/eks-anywhere-go-mod-download` in docker builder container -run-in-docker/hub/actions/kexec/v1/eks-anywhere-go-mod-download: ## Run `hub/actions/kexec/v1/eks-anywhere-go-mod-download` in docker builder container -run-in-docker/hub/actions/image2disk/v1/eks-anywhere-go-mod-download: ## Run `hub/actions/image2disk/v1/eks-anywhere-go-mod-download` in docker builder container -run-in-docker/hub/actions/oci2disk/v1/eks-anywhere-go-mod-download: ## Run `hub/actions/oci2disk/v1/eks-anywhere-go-mod-download` in docker builder container -run-in-docker/hub/actions/writefile/v1/eks-anywhere-go-mod-download: ## Run `hub/actions/writefile/v1/eks-anywhere-go-mod-download` in docker builder container +run-in-docker/hub/eks-anywhere-go-mod-download: ## Run `hub/eks-anywhere-go-mod-download` in docker builder container run-in-docker/_output/bin/hub/linux-amd64/cexec: ## Run `_output/bin/hub/linux-amd64/cexec` in docker builder container run-in-docker/_output/bin/hub/linux-amd64/kexec: ## Run `_output/bin/hub/linux-amd64/kexec` in docker builder container run-in-docker/_output/bin/hub/linux-amd64/image2disk: ## Run `_output/bin/hub/linux-amd64/image2disk` in docker builder container @@ -75,11 +71,11 @@ run-in-docker/_output/bin/hub/linux-arm64/kexec: ## Run `_output/bin/hub/linux-a run-in-docker/_output/bin/hub/linux-arm64/image2disk: ## Run `_output/bin/hub/linux-arm64/image2disk` in docker builder container run-in-docker/_output/bin/hub/linux-arm64/oci2disk: ## Run `_output/bin/hub/linux-arm64/oci2disk` in docker builder container run-in-docker/_output/bin/hub/linux-arm64/writefile: ## Run `_output/bin/hub/linux-arm64/writefile` in docker builder container -run-in-docker/_output/cexec/attribution/go-license.csv: ## Run `_output/cexec/attribution/go-license.csv` in docker builder container -run-in-docker/_output/kexec/attribution/go-license.csv: ## Run `_output/kexec/attribution/go-license.csv` in docker builder container -run-in-docker/_output/image2disk/attribution/go-license.csv: ## Run `_output/image2disk/attribution/go-license.csv` in docker builder container -run-in-docker/_output/oci2disk/attribution/go-license.csv: ## Run `_output/oci2disk/attribution/go-license.csv` in docker builder container -run-in-docker/_output/writefile/attribution/go-license.csv: ## Run `_output/writefile/attribution/go-license.csv` in docker builder container +run-in-docker/_output/attribution/go-license.csv: ## Run `_output/attribution/go-license.csv` in docker builder container +run-in-docker/_output/attribution/go-license.csv: ## Run `_output/attribution/go-license.csv` in docker builder container +run-in-docker/_output/attribution/go-license.csv: ## Run `_output/attribution/go-license.csv` in docker builder container +run-in-docker/_output/attribution/go-license.csv: ## Run `_output/attribution/go-license.csv` in docker builder container +run-in-docker/_output/attribution/go-license.csv: ## Run `_output/attribution/go-license.csv` in docker builder container ##@ License Targets gather-licenses: ## Helper to call $(GATHER_LICENSES_TARGETS) which gathers all licenses diff --git a/projects/tinkerbell/hub/IMAGE2DISK_ATTRIBUTION.txt b/projects/tinkerbell/hub/IMAGE2DISK_ATTRIBUTION.txt deleted file mode 100644 index 32a2889295..0000000000 --- a/projects/tinkerbell/hub/IMAGE2DISK_ATTRIBUTION.txt +++ /dev/null @@ -1,396 +0,0 @@ - -** github.com/tinkerbell/hub/actions/image2disk/v1; version 404dab73a8a7f33e973c6e71782f07e82b125da9 -- -https://github.com/tinkerbell/hub/actions/image2disk/v1 - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ------- - -** github.com/klauspost/compress; version v1.11.12 -- -https://github.com/klauspost/compress - -Copyright (c) 2012 The Go Authors. All rights reserved. -Copyright (c) 2019 Klaus Post. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** github.com/klauspost/compress/snappy; version v1.11.12 -- -https://github.com/klauspost/compress - -Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** github.com/ulikunitz/xz; version v0.5.10 -- -https://github.com/ulikunitz/xz - -Copyright (c) 2014-2021 Ulrich Kunitz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* My name, Ulrich Kunitz, may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** golang.org/go; version go1.17.13 -- -https://github.com/golang/go - -** golang.org/x/sys/unix; version v0.0.0-20191026070338-33540a1f6037 -- -https://golang.org/x/sys - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** github.com/dustin/go-humanize; version v1.0.0 -- -https://github.com/dustin/go-humanize -Copyright (c) 2005-2008 Dustin Sallings - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ------- - -** github.com/klauspost/compress/zstd/internal/xxhash; version v1.11.12 -- -https://github.com/klauspost/compress -Copyright (c) 2016 Caleb Spare - -** github.com/sirupsen/logrus; version v1.7.0 -- -https://github.com/sirupsen/logrus -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------- diff --git a/projects/tinkerbell/hub/KEXEC_ATTRIBUTION.txt b/projects/tinkerbell/hub/KEXEC_ATTRIBUTION.txt deleted file mode 100644 index 450a862b6a..0000000000 --- a/projects/tinkerbell/hub/KEXEC_ATTRIBUTION.txt +++ /dev/null @@ -1,304 +0,0 @@ - -** github.com/spf13/cobra; version v1.1.1 -- -https://github.com/spf13/cobra - -** github.com/tinkerbell/hub/actions/kexec/v1; version 404dab73a8a7f33e973c6e71782f07e82b125da9 -- -https://github.com/tinkerbell/hub/actions/kexec/v1 - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ------- - -** github.com/spf13/pflag; version v1.0.5 -- -https://github.com/spf13/pflag - -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** golang.org/go; version go1.17.13 -- -https://github.com/golang/go - -** golang.org/x/sys/unix; version v0.0.0-20200420163511-1957bb5e6d1f -- -https://golang.org/x/sys - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** github.com/sirupsen/logrus; version v1.7.0 -- -https://github.com/sirupsen/logrus -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ------- diff --git a/projects/tinkerbell/hub/Makefile b/projects/tinkerbell/hub/Makefile index c2e5231b5f..1ce7d1d5d6 100644 --- a/projects/tinkerbell/hub/Makefile +++ b/projects/tinkerbell/hub/Makefile @@ -14,30 +14,21 @@ WRITEFILE_IMAGE_COMPONENT=tinkerbell/hub/writefile REBOOT_IMAGE_COMPONENT=tinkerbell/hub/reboot BINARY_TARGET_FILES=cexec kexec image2disk oci2disk writefile -GO_MOD_PATHS=actions/cexec/v1 actions/kexec/v1 actions/image2disk/v1 actions/oci2disk/v1 actions/writefile/v1 -# by default the first target is assumed to be the primary and will produce a attribution with no prefix -# for this build we want to prefix all the files -CEXEC_ATTRIBUTION_OVERRIDE=cexec +SOURCE_PATTERNS=./cexec ./kexec ./image2disk ./oci2disk ./writefile +GO_MOD_PATHS=. . . . . IMAGE_NAMES=$(BINARY_TARGET_FILES) reboot DOCKERFILE_FOLDER=./docker/linux/$(IMAGE_NAME) -IMAGE_BUILD_ARGS=ATTRIBUTION_FILE -ATTRIBUTION_FILE=$(call TO_UPPER,$(IMAGE_NAME))_ATTRIBUTION.txt - PROJECT_DEPENDENCIES=eksa/torvalds/linux BUILDSPEC_DEPENDS_ON_OVERRIDE=torvalds_linux_linux_amd64 torvalds_linux_linux_arm64 -FIX_LICENSES=$(foreach path,$(GO_MOD_PATHS),$(REPO)/$(path)/LICENSE) - EXCLUDE_FROM_UPGRADE_BUILDSPEC=true include $(BASE_DIRECTORY)/Common.mk -$(GATHER_LICENSES_TARGETS): | $(FIX_LICENSES) - # reboot action image requires touch. # We are using eks-distro-minimal-base-glibc as the base to install touch reboot/images/%: BASE_IMAGE_NAME=eks-distro-minimal-base-glibc diff --git a/projects/tinkerbell/hub/README.md b/projects/tinkerbell/hub/README.md index 8971cf8647..ce79bec101 100644 --- a/projects/tinkerbell/hub/README.md +++ b/projects/tinkerbell/hub/README.md @@ -1,5 +1,5 @@ ## **Hub** -![Version](https://img.shields.io/badge/version-404dab73a8a7f33e973c6e71782f07e82b125da9-blue) +![Version](https://img.shields.io/badge/version-d524b77c7a44525c4318da3d2b5857c03711f3f8-blue) ![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiQkRkY0htL2tWTlM0QmVLSS9SakxYOHBRTUxJNmczcVM4Nm1Wa0U1TFQvVkRDTHRadys0aEVIOStxc0V4aGxSQzNsdVZlaXV5R1YvaHZaOUZIZnRTTWtzPSIsIml2UGFyYW1ldGVyU3BlYyI6ImZjajIxazcybkxaZVdUR24iLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=main) [Hub](https://github.com/tinkerbell/hub) is the repository that contains reusable Tinkerbell Actions. The different images are listed under [/actions](https://github.com/tinkerbell/hub/tree/main/actions). diff --git a/projects/tinkerbell/hub/WRITEFILE_ATTRIBUTION.txt b/projects/tinkerbell/hub/WRITEFILE_ATTRIBUTION.txt deleted file mode 100644 index e4795a915f..0000000000 --- a/projects/tinkerbell/hub/WRITEFILE_ATTRIBUTION.txt +++ /dev/null @@ -1,362 +0,0 @@ - -** github.com/tinkerbell/hub/actions/writefile/v1; version 404dab73a8a7f33e973c6e71782f07e82b125da9 -- -https://github.com/tinkerbell/hub/actions/writefile/v1 - -** github.com/vishvananda/netns; version v0.0.0-20211101163701-50045581ed74 -- -https://github.com/vishvananda/netns - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ------- - -** github.com/insomniacslk/dhcp; version v0.0.0-20220504074936-1ca156eafb9f -- -https://github.com/insomniacslk/dhcp - -BSD 3-Clause License - -Copyright (c) 2018, Andrea Barberio -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** github.com/u-root/uio; version v0.0.0-20210528114334-82958018845c -- -https://github.com/u-root/uio - -BSD 3-Clause License - -Copyright (c) 2012-2021, u-root Authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** golang.org/go; version go1.17.13 -- -https://github.com/golang/go - -** golang.org/x/net/bpf; version v0.0.0-20201110031124-69a78807bb2b -- -https://golang.org/x/net - -** golang.org/x/sys; version v0.0.0-20210525143221-35b2ab0089ea -- -https://golang.org/x/sys - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------- - -** github.com/mdlayher/ethernet; version v0.0.0-20190606142754-0394541c37b7 -- -https://github.com/mdlayher/ethernet -Copyright (C) 2015 Matt Layher - -** github.com/mdlayher/raw; version v0.0.0-20191009151244-50f2db8cc065 -- -https://github.com/mdlayher/raw -Copyright (C) 2015 Matt Layher - -=========== - - - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------- - -** github.com/sirupsen/logrus; version v1.7.0 -- -https://github.com/sirupsen/logrus -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ------- diff --git a/projects/tinkerbell/hub/docker/linux/cexec/Dockerfile b/projects/tinkerbell/hub/docker/linux/cexec/Dockerfile index 102af6e514..08f91da726 100644 --- a/projects/tinkerbell/hub/docker/linux/cexec/Dockerfile +++ b/projects/tinkerbell/hub/docker/linux/cexec/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETOS ARG ATTRIBUTION_FILE COPY _output/bin/hub/$TARGETOS-$TARGETARCH/cexec /usr/bin/cexec -COPY _output/cexec/LICENSES /LICENSES +COPY _output/LICENSES /LICENSES COPY $ATTRIBUTION_FILE /ATTRIBUTION.txt ENTRYPOINT ["/usr/bin/cexec"] diff --git a/projects/tinkerbell/hub/docker/linux/image2disk/Dockerfile b/projects/tinkerbell/hub/docker/linux/image2disk/Dockerfile index 7f65f9c3e8..7af4b77b43 100644 --- a/projects/tinkerbell/hub/docker/linux/image2disk/Dockerfile +++ b/projects/tinkerbell/hub/docker/linux/image2disk/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETOS ARG ATTRIBUTION_FILE COPY _output/bin/hub/$TARGETOS-$TARGETARCH/image2disk /usr/bin/image2disk -COPY _output/image2disk/LICENSES /LICENSES +COPY _output/LICENSES /LICENSES COPY $ATTRIBUTION_FILE /ATTRIBUTION.txt ENTRYPOINT ["/usr/bin/image2disk"] diff --git a/projects/tinkerbell/hub/docker/linux/kexec/Dockerfile b/projects/tinkerbell/hub/docker/linux/kexec/Dockerfile index 9cb88cdf59..22c9947ba6 100644 --- a/projects/tinkerbell/hub/docker/linux/kexec/Dockerfile +++ b/projects/tinkerbell/hub/docker/linux/kexec/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETOS ARG ATTRIBUTION_FILE COPY _output/bin/hub/$TARGETOS-$TARGETARCH/kexec /usr/bin/kexec -COPY _output/kexec/LICENSES /LICENSES +COPY _output/LICENSES /LICENSES COPY $ATTRIBUTION_FILE /ATTRIBUTION.txt ENTRYPOINT ["/usr/bin/kexec"] diff --git a/projects/tinkerbell/hub/docker/linux/oci2disk/Dockerfile b/projects/tinkerbell/hub/docker/linux/oci2disk/Dockerfile index db163357db..83839fea9c 100644 --- a/projects/tinkerbell/hub/docker/linux/oci2disk/Dockerfile +++ b/projects/tinkerbell/hub/docker/linux/oci2disk/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETOS ARG ATTRIBUTION_FILE COPY _output/bin/hub/$TARGETOS-$TARGETARCH/oci2disk /usr/bin/oci2disk -COPY _output/oci2disk/LICENSES /LICENSES +COPY _output/LICENSES /LICENSES COPY $ATTRIBUTION_FILE /ATTRIBUTION.txt ENTRYPOINT ["/usr/bin/oci2disk"] diff --git a/projects/tinkerbell/hub/docker/linux/writefile/Dockerfile b/projects/tinkerbell/hub/docker/linux/writefile/Dockerfile index 54fee83332..3bddd79839 100644 --- a/projects/tinkerbell/hub/docker/linux/writefile/Dockerfile +++ b/projects/tinkerbell/hub/docker/linux/writefile/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETOS ARG ATTRIBUTION_FILE COPY _output/bin/hub/$TARGETOS-$TARGETARCH/writefile /usr/bin/writefile -COPY _output/writefile/LICENSES /LICENSES +COPY _output/LICENSES /LICENSES COPY $ATTRIBUTION_FILE /ATTRIBUTION.txt COPY _output/dependencies/$TARGETOS-$TARGETARCH/eksa/torvalds/linux/tools/bootconfig /usr/bin/bootconfig diff --git a/projects/tinkerbell/hub/patches/0001-Add-Bootconfig-support-to-WriteFile-action.patch b/projects/tinkerbell/hub/patches/0001-Add-Bootconfig-support-to-WriteFile-action.patch deleted file mode 100644 index 862a4ede35..0000000000 --- a/projects/tinkerbell/hub/patches/0001-Add-Bootconfig-support-to-WriteFile-action.patch +++ /dev/null @@ -1,123 +0,0 @@ -From f419d5be2d823656215b7351ff80bcf78dcb28a6 Mon Sep 17 00:00:00 2001 -From: Vignesh Goutham Ganesh -Date: Mon, 9 May 2022 12:46:46 -0700 -Subject: [PATCH] Add Bootconfig support to WriteFile action - -Signed-off-by: Vignesh Goutham Ganesh ---- - actions/writefile/v1/go.sum | 6 ------ - actions/writefile/v1/main.go | 30 +++++++++++++++++++++++++++++- - 2 files changed, 29 insertions(+), 7 deletions(-) - -diff --git a/actions/writefile/v1/go.sum b/actions/writefile/v1/go.sum -index 221a802..67a36b2 100644 ---- a/actions/writefile/v1/go.sum -+++ b/actions/writefile/v1/go.sum -@@ -5,7 +5,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs - github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= - github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= - github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= --github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= - github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= - github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= - github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -@@ -13,21 +12,16 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb - github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= - github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= - github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= --github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= - github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= --github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= - github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= - github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= - github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= --golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= - golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= - gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= --gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index e5ed3cf..b38ef1c 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -5,6 +5,7 @@ import ( - "fmt" - "io/ioutil" - "os" -+ "os/exec" - "path/filepath" - "strconv" - "strings" -@@ -13,7 +14,10 @@ import ( - log "github.com/sirupsen/logrus" - ) - --const mountAction = "/mountAction" -+const ( -+ mountAction = "/mountAction" -+ bootConfigAction = "/usr/bin/bootconfig" -+) - - func main() { - fmt.Printf("WriteFile - Write file to disk\n------------------------\n") -@@ -23,6 +27,7 @@ func main() { - filePath := os.Getenv("DEST_PATH") - - contents := os.Getenv("CONTENTS") -+ bootconfig := os.Getenv("BOOTCONFIG_CONTENTS") - uid := os.Getenv("UID") - gid := os.Getenv("GID") - mode := os.Getenv("MODE") -@@ -42,6 +47,10 @@ func main() { - log.Fatalf("Could not parse mode: %v", err) - } - -+ if bootconfig != "" && contents != "" { -+ log.Fatal("Both BOOTCONFIG_CONTENTS and CONTENTS cannot be set.") -+ } -+ - fileMode := os.FileMode(modePrime) - - dirModePrime, err := strconv.ParseUint(dirMode, 8, 32) -@@ -82,12 +91,31 @@ func main() { - log.Fatalf("Failed to ensure directory exists: %v", err) - } - -+ // If bootconfig is set, contents will be empty and will serve as output initrd file provided -+ // to bootconfig tool - fqFilePath := filepath.Join(mountAction, filePath) - // Write the file to disk - if err := ioutil.WriteFile(fqFilePath, []byte(contents), fileMode); err != nil { - log.Fatalf("Could not write file %s: %v", filePath, err) - } - -+ if bootconfig != "" { -+ // Write the input bootconfig to file to serve as input to the tool -+ inputFilePath := "/userInputBootConfig" -+ err := ioutil.WriteFile(inputFilePath, []byte(bootconfig), fileMode) -+ if err != nil { -+ log.Fatalf("Could not write file %s: %v", filePath, err) -+ } -+ defer os.Remove(inputFilePath) -+ -+ // Parse through bootconfig if enabled -+ cmd := exec.Command(bootConfigAction, "-a", inputFilePath, fqFilePath) -+ output, err := cmd.Output() -+ if err != nil { -+ log.Fatalf("Error running Bootconfig tool. Err: %v, Output: %s", err, string(output)) -+ } -+ } -+ - if err := os.Chown(fqFilePath, fileUID, fileGID); err != nil { - log.Fatalf("Could not modify ownership of file %s: %v", filePath, err) - } --- -2.24.3 (Apple Git-128) - diff --git a/projects/tinkerbell/hub/patches/0001-Add-Bootconfig-support-to-WriteFile.patch b/projects/tinkerbell/hub/patches/0001-Add-Bootconfig-support-to-WriteFile.patch new file mode 100644 index 0000000000..de9a59ebd7 --- /dev/null +++ b/projects/tinkerbell/hub/patches/0001-Add-Bootconfig-support-to-WriteFile.patch @@ -0,0 +1,88 @@ +From 7a690047cfd6bf4370b41020eb89af10f91f7863 Mon Sep 17 00:00:00 2001 +From: Ahree Hong +Date: Thu, 2 May 2024 12:20:29 -0700 +Subject: [PATCH 1/6] Add Bootconfig support to WriteFile + +Signed-off-by: Ahree Hong +--- + writefile/main.go | 30 +++++++++++++++++++++++++++++- + 1 file changed, 29 insertions(+), 1 deletion(-) + +diff --git a/writefile/main.go b/writefile/main.go +index 3961281..9e7d78f 100644 +--- a/writefile/main.go ++++ b/writefile/main.go +@@ -4,6 +4,7 @@ import ( + "errors" + "fmt" + "os" ++ "os/exec" + "path/filepath" + "strconv" + "strings" +@@ -12,7 +13,10 @@ import ( + log "github.com/sirupsen/logrus" + ) + +-const mountAction = "/mountAction" ++const ( ++ mountAction = "/mountAction" ++ bootConfigAction = "/usr/bin/bootconfig" ++) + + func main() { + fmt.Printf("WriteFile - Write file to disk\n------------------------\n") +@@ -22,6 +26,7 @@ func main() { + filePath := os.Getenv("DEST_PATH") + + contents := os.Getenv("CONTENTS") ++ bootconfig := os.Getenv("BOOTCONFIG_CONTENTS") + uid := os.Getenv("UID") + gid := os.Getenv("GID") + mode := os.Getenv("MODE") +@@ -41,6 +46,10 @@ func main() { + log.Fatalf("Could not parse mode: %v", err) + } + ++ if bootconfig != "" && contents != "" { ++ log.Fatal("Both BOOTCONFIG_CONTENTS and CONTENTS cannot be set.") ++ } ++ + fileMode := os.FileMode(modePrime) + + dirModePrime, err := strconv.ParseUint(dirMode, 8, 32) +@@ -81,12 +90,31 @@ func main() { + log.Fatalf("Failed to ensure directory exists: %v", err) + } + ++ // If bootconfig is set, contents will be empty and will serve as output initrd file provided ++ // to bootconfig tool + fqFilePath := filepath.Join(mountAction, filePath) + // Write the file to disk + if err := os.WriteFile(fqFilePath, []byte(contents), fileMode); err != nil { + log.Fatalf("Could not write file %s: %v", filePath, err) + } + ++ if bootconfig != "" { ++ // Write the input bootconfig to file to serve as input to the tool ++ inputFilePath := "/userInputBootConfig" ++ err := os.WriteFile(inputFilePath, []byte(bootconfig), fileMode) ++ if err != nil { ++ log.Fatalf("Could not write file %s: %v", filePath, err) ++ } ++ defer os.Remove(inputFilePath) ++ ++ // Parse through bootconfig if enabled ++ cmd := exec.Command(bootConfigAction, "-a", inputFilePath, fqFilePath) ++ output, err := cmd.Output() ++ if err != nil { ++ log.Fatalf("Error running Bootconfig tool. Err: %v, Output: %s", err, string(output)) ++ } ++ } ++ + if err := os.Chown(fqFilePath, fileUID, fileGID); err != nil { + log.Fatalf("Could not modify ownership of file %s: %v", filePath, err) + } +-- +2.40.0 + diff --git a/projects/tinkerbell/hub/patches/0002-Get-user-data-from-Hegel-and-write-to-disk.patch b/projects/tinkerbell/hub/patches/0002-Get-user-data-from-Hegel-and-write-to-disk.patch index 69a4eb98be..aacd3e01f1 100644 --- a/projects/tinkerbell/hub/patches/0002-Get-user-data-from-Hegel-and-write-to-disk.patch +++ b/projects/tinkerbell/hub/patches/0002-Get-user-data-from-Hegel-and-write-to-disk.patch @@ -1,21 +1,22 @@ -From c1c0cc0dec41e6dacea3e2fffa3bfa37a9a60679 Mon Sep 17 00:00:00 2001 -From: Vignesh Goutham Ganesh -Date: Thu, 19 May 2022 12:56:33 -0700 -Subject: [PATCH] Get user-data from Hegel and write to disk +From bf184a742d070d1dd80726a56259b3dc4b1bf9c7 Mon Sep 17 00:00:00 2001 +From: Ahree Hong +Date: Thu, 2 May 2024 12:20:47 -0700 +Subject: [PATCH 2/6] Get user-data from Hegel and write to disk -Signed-off-by: Vignesh Goutham Ganesh +Signed-off-by: Ahree Hong --- - actions/writefile/v1/main.go | 38 ++++++++++++++++++++++++++++++++++-- - 1 file changed, 36 insertions(+), 2 deletions(-) + writefile/main.go | 69 ++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 65 insertions(+), 4 deletions(-) -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index 5e91045..83562d4 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -4,8 +4,11 @@ import ( +diff --git a/writefile/main.go b/writefile/main.go +index 9e7d78f..67dd63e 100644 +--- a/writefile/main.go ++++ b/writefile/main.go +@@ -3,19 +3,25 @@ package main + import ( "errors" "fmt" - "io/ioutil" ++ "io" + "net/http" + "net/url" "os" @@ -24,69 +25,101 @@ index 5e91045..83562d4 100644 "path/filepath" "strconv" "strings" -@@ -17,6 +20,7 @@ import ( + "syscall" ++ "time" + + log "github.com/sirupsen/logrus" + ) + const ( - mountAction = "/mountAction" - bootConfigAction = "/usr/bin/bootconfig" +- mountAction = "/mountAction" +- bootConfigAction = "/usr/bin/bootconfig" ++ mountAction = "/mountAction" ++ bootConfigAction = "/usr/bin/bootconfig" + hegelUserDataVersion = "2009-04-04" ) func main() { -@@ -28,6 +32,7 @@ func main() { +@@ -27,6 +33,7 @@ func main() { contents := os.Getenv("CONTENTS") bootconfig := os.Getenv("BOOTCONFIG_CONTENTS") -+ hegelUrl := os.Getenv("HEGEL_URL") ++ hegelUrls := os.Getenv("HEGEL_URLS") uid := os.Getenv("UID") gid := os.Getenv("GID") mode := os.Getenv("MODE") -@@ -47,8 +52,15 @@ func main() { +@@ -46,8 +53,15 @@ func main() { log.Fatalf("Could not parse mode: %v", err) } - if bootconfig != "" && contents != "" { - log.Fatal("Both BOOTCONFIG_CONTENTS and CONTENTS cannot be set.") -+ // Only set one of contents, bootconfig or hegelUrl ++ // Only set one of contents, bootconfig or hegelUrls + validationCount := 0 -+ for _, envVar := range []string{contents, bootconfig, hegelUrl} { ++ for _, envVar := range []string{contents, bootconfig, hegelUrls} { + if envVar != "" { + validationCount++ + } + } + if validationCount != 1 { -+ log.Fatal("Only one environment vars of CONTENTS, BOOTCONFIG_CONTENTS, HEGEL_URL can be set") ++ log.Fatal("Only one environment vars of CONTENTS, BOOTCONFIG_CONTENTS, HEGEL_URLS can be set") } fileMode := os.FileMode(modePrime) -@@ -91,6 +103,28 @@ func main() { +@@ -90,6 +104,53 @@ func main() { log.Fatalf("Failed to ensure directory exists: %v", err) } -+ // If hegelUrl is set, get the user-data from hegel and set it to contents -+ if hegelUrl != "" { -+ userDataServiceUrl, err := url.Parse(hegelUrl) -+ if err != nil { -+ log.Fatalf("Error parsing hegel url: %v", err) -+ } -+ userDataServiceUrl.Path = path.Join(userDataServiceUrl.Path, hegelUserDataVersion, "user-data") -+ resp, err := http.Get(userDataServiceUrl.String()) -+ if err != nil { -+ log.Fatalf("Error with HTTP GET call: %v", err) ++ if hegelUrls != "" { ++ success := false ++ // go through all urls in hegelUrls, and attempt to retrieve userdata from them ++ // upon a successful userdata retrieval, this loop will exit and populate the userdata contents in contents ++ for _, hegelUrl := range strings.Split(hegelUrls, ",") { ++ userDataServiceUrl, err := url.ParseRequestURI(hegelUrl) ++ if err != nil { ++ log.Warnf("Error parsing hegel url: %v", err) ++ continue ++ } ++ userDataServiceUrl.Path = path.Join(userDataServiceUrl.Path, hegelUserDataVersion, "user-data") ++ client := http.Client{ ++ Timeout: time.Second * 10, ++ } ++ resp, err := client.Get(userDataServiceUrl.String()) ++ if err != nil { ++ log.Warnf("Error with HTTP GET call: %v", err) ++ continue ++ } ++ defer resp.Body.Close() ++ ++ // Ensure non-200 responses are considered an error and move to the next metadata server. ++ if resp.StatusCode != http.StatusOK { ++ continue ++ } ++ ++ respBody, err := io.ReadAll(resp.Body) ++ if err != nil { ++ log.Warnf("Error reading HTTP GET response body: %v", err) ++ continue ++ } ++ ++ // Set contents to be the user-data ++ contents = string(respBody) ++ success = true ++ break + } -+ defer resp.Body.Close() + -+ respBody, err := ioutil.ReadAll(resp.Body) -+ if err != nil { -+ log.Fatalf("Error reading HTTP GET response body: %v", err) ++ if !success { ++ log.Fatalf("Failed to read user-data, exhausted all the urls defined in HEGEL_URLS: {%v}", hegelUrls) + } ++ } + -+ // Set contents to be the user-data -+ contents = string(respBody) ++ if contents == "" && bootconfig == "" { ++ log.Fatal("No content. Either the CONTENTS or BOOTCONFIG_CONTENTS env vars were not set or a data retrieval action failed.") + } + // If bootconfig is set, contents will be empty and will serve as output initrd file provided // to bootconfig tool fqFilePath := filepath.Join(mountAction, filePath) -- -2.24.3 (Apple Git-128) +2.40.0 diff --git a/projects/tinkerbell/hub/patches/0003-Write-DHCP-offer-to-static-Netplan-file.patch b/projects/tinkerbell/hub/patches/0003-Write-DHCP-offer-to-static-Netplan-file.patch index fed0ef5938..c54e1c7fd3 100644 --- a/projects/tinkerbell/hub/patches/0003-Write-DHCP-offer-to-static-Netplan-file.patch +++ b/projects/tinkerbell/hub/patches/0003-Write-DHCP-offer-to-static-Netplan-file.patch @@ -1,7 +1,7 @@ -From a79c136b5d0c9d880e6ae37461bd6f5ee5c5b585 Mon Sep 17 00:00:00 2001 -From: Jacob Weinstock -Date: Thu, 9 Jun 2022 10:15:06 -0600 -Subject: [PATCH] Write DHCP offer to static Netplan file: +From 2c4e53757a4cf7de9c49799a20809341b64a3c5e Mon Sep 17 00:00:00 2001 +From: Ahree Hong +Date: Thu, 2 May 2024 12:23:00 -0700 +Subject: [PATCH 3/6] Write DHCP offer to static Netplan file This is useful when the host being provisioned will run the Boots DHCP server. This happens @@ -12,129 +12,190 @@ a permanent management cluster is created, and all components, including Boots, are pivoted to this permanent management cluster. -Signed-off-by: Jacob Weinstock +Signed-off-by: Ahree Hong --- - actions/writefile/v1/go.mod | 3 +- - actions/writefile/v1/go.sum | 68 ++++++++++++- - actions/writefile/v1/main.go | 189 ++++++++++++++++++++++++++++++++++- - 3 files changed, 255 insertions(+), 5 deletions(-) + go.mod | 13 +++- + go.sum | 40 ++++++++-- + writefile/main.go | 184 ++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 226 insertions(+), 11 deletions(-) -diff --git a/actions/writefile/v1/go.mod b/actions/writefile/v1/go.mod -index 58febf6..374846c 100644 ---- a/actions/writefile/v1/go.mod -+++ b/actions/writefile/v1/go.mod -@@ -3,10 +3,11 @@ module github.com/tinkerbell/hub/actions/writefile/v1 - go 1.15 +diff --git a/go.mod b/go.mod +index acf9299..0c287c3 100644 +--- a/go.mod ++++ b/go.mod +@@ -7,13 +7,15 @@ require ( + github.com/deislabs/oras v0.11.1 + github.com/diskfs/go-diskfs v1.1.1 + github.com/dustin/go-humanize v1.0.0 ++ github.com/insomniacslk/dhcp v0.0.0-20240419123447-f1cffa2c0c49 + github.com/klauspost/compress v1.17.7 + github.com/opencontainers/go-digest v1.0.0 + github.com/pkg/errors v0.9.1 + github.com/sirupsen/logrus v1.9.0 + github.com/spf13/cobra v1.1.3 + github.com/ulikunitz/xz v0.5.11 +- golang.org/x/sys v0.5.0 ++ github.com/vishvananda/netns v0.0.4 ++ golang.org/x/sys v0.18.0 + ) require ( -+ github.com/insomniacslk/dhcp v0.0.0-20220504074936-1ca156eafb9f - github.com/kr/text v0.2.0 // indirect - github.com/sirupsen/logrus v1.7.0 - github.com/stretchr/testify v1.7.0 // indirect -- golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect -+ github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - ) -diff --git a/actions/writefile/v1/go.sum b/actions/writefile/v1/go.sum -index 67a36b2..3909e4b 100644 ---- a/actions/writefile/v1/go.sum -+++ b/actions/writefile/v1/go.sum -@@ -2,23 +2,87 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 - github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= - github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= - github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -+github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= -+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -+github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= -+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +@@ -25,11 +27,16 @@ require ( + github.com/google/uuid v1.3.0 // indirect + github.com/hashicorp/golang-lru v0.5.1 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect ++ github.com/josharian/native v1.1.0 // indirect ++ github.com/mdlayher/packet v1.1.2 // indirect ++ github.com/mdlayher/socket v0.4.1 // indirect + github.com/opencontainers/image-spec v1.0.1 // indirect ++ github.com/pierrec/lz4/v4 v4.1.14 // indirect + github.com/spf13/pflag v1.0.5 // indirect ++ github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 // indirect + go.opencensus.io v0.22.0 // indirect +- golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 // indirect +- golang.org/x/sync v0.0.0-20201207232520-09787c993a3a // indirect ++ golang.org/x/net v0.23.0 // indirect ++ golang.org/x/sync v0.3.0 // indirect + google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a // indirect + google.golang.org/grpc v1.23.1 // indirect + gopkg.in/djherbis/times.v1 v1.3.0 // indirect +diff --git a/go.sum b/go.sum +index 4570f76..d6823fd 100644 +--- a/go.sum ++++ b/go.sum +@@ -125,8 +125,9 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z + github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= + github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= + github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +-github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= + github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= ++github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= ++github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= + github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= + github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= + github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +@@ -166,11 +167,18 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO + github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= + github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= + github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 h1:/jC7qQFrv8CrSJVmaolDVOxTfS9kc36uB6H40kdbQq8= +github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= -+github.com/insomniacslk/dhcp v0.0.0-20220504074936-1ca156eafb9f h1:l1QCwn715k8nYkj4Ql50rzEog3WnMdrd4YYMMwemxEo= -+github.com/insomniacslk/dhcp v0.0.0-20220504074936-1ca156eafb9f/go.mod h1:h+MxyHxRg9NH3terB1nfRIUaQEcI0XOVkdR9LNBlp8E= -+github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= -+github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= -+github.com/jsimonetti/rtnetlink v0.0.0-20201009170750-9c6f07d100c1/go.mod h1:hqoO/u39cqLeBLebZ8fWdE96O7FxrAsRYhnVOdgHxok= -+github.com/jsimonetti/rtnetlink v0.0.0-20201110080708-d2c240429e6c/go.mod h1:huN4d1phzjhlOsNIjFsw2SVRbwIHj3fJDMEU2SDPTmg= -+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= - github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= - github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= - github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= - github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= - github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= - github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -+github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7 h1:lez6TS6aAau+8wXUP3G9I3TGlmPFEq2CTxBaRqY6AGE= -+github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= -+github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= -+github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= -+github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= -+github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= -+github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= -+github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065 h1:aFkJ6lx4FPip+S+Uw4aTegFMct9shDvP+79PsSxpm3w= -+github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= - github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= - github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= - github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= - github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -+github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= - github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= - github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= - github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= + github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= + github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= ++github.com/insomniacslk/dhcp v0.0.0-20240419123447-f1cffa2c0c49 h1:/OuvSMGT9+xnyZ+7MZQ1zdngaCCAdPoSw8B/uurZ7pg= ++github.com/insomniacslk/dhcp v0.0.0-20240419123447-f1cffa2c0c49/go.mod h1:KclMyHxX06VrVr0DJmeFSUb1ankt7xTfoOA35pCkoic= + github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= + github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= + github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= ++github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= ++github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= ++github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= + github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= + github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= + github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +@@ -193,6 +201,10 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO + github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= + github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= + github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= ++github.com/mdlayher/packet v1.1.2 h1:3Up1NG6LZrsgDVn6X4L9Ge/iyRyxFEFD9o6Pr3Q1nQY= ++github.com/mdlayher/packet v1.1.2/go.mod h1:GEu1+n9sG5VtiRE4SydOmX5GTwyyYlteZiFU+x0kew4= ++github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= ++github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= + github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= + github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= + github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +@@ -223,6 +235,8 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI + github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= + github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= + github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= ++github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= ++github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= + github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= + github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= + github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +@@ -287,9 +301,13 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -+github.com/u-root/uio v0.0.0-20210528114334-82958018845c h1:BFvcl34IGnw8yvJi8hlqLFo9EshRInwWBs2M5fGWzQA= -+github.com/u-root/uio v0.0.0-20210528114334-82958018845c/go.mod h1:LpEX5FO/cB+WF4TYGY1V5qktpaZLkKkSegbr0V4eYXA= -+github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 h1:gga7acRE695APm9hlsSMoOoE65U4/TcqNj90mc69Rlg= -+github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -+golang.org/x/net v0.0.0-20190419010253-1f3472d942ba/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -+golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -+golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -+golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -+golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -+golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= -+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -+golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20190418153312-f0ce4c0180be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20190606122018-79a91cf218c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= --golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= --golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea h1:+WiDlPBBaO+h9vPNZi8uJ3k4BkKQB7Iow3aqwHVA5hI= -+golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -+golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= - gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index 7ea1235..23ca768 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -1,28 +1,44 @@ + github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= + github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= ++github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 h1:tHNk7XK9GkmKUR6Gh8gVBKXc2MVSZ4G/NnWLtzw4gNA= ++github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264= + github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= + github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= + github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= ++github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= ++github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= + github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= + github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= + github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +@@ -309,8 +327,9 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf + golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= + golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= + golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +-golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= ++golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= ++golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= + golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= + golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= + golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +@@ -345,8 +364,9 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn + golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= + golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= + golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +-golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= + golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= ++golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= ++golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= + golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= + golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +@@ -355,8 +375,9 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ + golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= + golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= + golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs= + golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= ++golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= ++golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= + golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= + golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= + golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +@@ -379,14 +400,16 @@ golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7w + golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= ++golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +-golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= ++golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= ++golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= + golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= + golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= + golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= + golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= ++golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= ++golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= + golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= + golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= + golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +@@ -455,8 +478,9 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= + gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= + gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= + gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= ++gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= ++gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= + gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= + gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= + gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +diff --git a/writefile/main.go b/writefile/main.go +index 67dd63e..efe6261 100644 +--- a/writefile/main.go ++++ b/writefile/main.go +@@ -1,21 +1,29 @@ package main import ( @@ -143,7 +204,7 @@ index 7ea1235..23ca768 100644 "errors" "fmt" + "html/template" - "io/ioutil" + "io" + "net" "net/http" "net/url" @@ -155,7 +216,7 @@ index 7ea1235..23ca768 100644 "strconv" "strings" "syscall" -+ "time" + "time" + "github.com/insomniacslk/dhcp/dhcpv4" + "github.com/insomniacslk/dhcp/dhcpv4/nclient4" @@ -164,10 +225,7 @@ index 7ea1235..23ca768 100644 ) const ( -- mountAction = "/mountAction" -- bootConfigAction = "/usr/bin/bootconfig" -+ mountAction = "/mountAction" -+ bootConfigAction = "/usr/bin/bootconfig" +@@ -24,6 +32,13 @@ const ( hegelUserDataVersion = "2009-04-04" ) @@ -181,7 +239,7 @@ index 7ea1235..23ca768 100644 func main() { fmt.Printf("WriteFile - Write file to disk\n------------------------\n") -@@ -38,6 +54,25 @@ func main() { +@@ -39,6 +54,25 @@ func main() { mode := os.Getenv("MODE") dirMode := os.Getenv("DIRMODE") @@ -207,7 +265,7 @@ index 7ea1235..23ca768 100644 // Validate inputs if blockDevice == "" { log.Fatalf("No Block Device speified with Environment Variable [DEST_DISK]") -@@ -157,6 +192,48 @@ func main() { +@@ -183,6 +217,48 @@ func main() { log.Infof("Successfully wrote file [%s] to device [%s]", filePath, blockDevice) } @@ -256,7 +314,7 @@ index 7ea1235..23ca768 100644 func dirExists(mountPath, path string) (bool, error) { fqPath := filepath.Join(mountPath, path) info, err := os.Stat(fqPath) -@@ -229,3 +306,111 @@ func ensureDir(mountPath, path string, mode os.FileMode, uid, gid int) error { +@@ -255,3 +331,111 @@ func ensureDir(mountPath, path string, mode os.FileMode, uid, gid int) error { return nil } @@ -369,6 +427,5 @@ index 7ea1235..23ca768 100644 + return info +} -- -2.35.1 - +2.40.0 diff --git a/projects/tinkerbell/hub/patches/0004-Create-VLAN-tagged-interface-if-vlan_id-exists-in-pr.patch b/projects/tinkerbell/hub/patches/0004-Create-VLAN-tagged-interface-if-vlan_id-exists-in-pr.patch new file mode 100644 index 0000000000..3b46b09f67 --- /dev/null +++ b/projects/tinkerbell/hub/patches/0004-Create-VLAN-tagged-interface-if-vlan_id-exists-in-pr.patch @@ -0,0 +1,169 @@ +From 780976be05711814b494d316e4ceab405d8924af Mon Sep 17 00:00:00 2001 +From: Ahree Hong +Date: Thu, 2 May 2024 12:42:22 -0700 +Subject: [PATCH 4/6] Create VLAN tagged interface if vlan_id exists in + /proc/cmdline + +This enables a vlan tagged machine to boot properly. + +Signed-off-by: Ahree Hong +--- + writefile/main.go | 107 +++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 87 insertions(+), 20 deletions(-) + +diff --git a/writefile/main.go b/writefile/main.go +index efe6261..e724375 100644 +--- a/writefile/main.go ++++ b/writefile/main.go +@@ -14,6 +14,7 @@ import ( + "os/exec" + "path" + "path/filepath" ++ "regexp" + "runtime" + "strconv" + "strings" +@@ -37,6 +38,7 @@ type Info struct { + IPAddr net.IPNet + Gateway net.IP + Nameservers []net.IP ++ VLANID int + } + + func main() { +@@ -67,7 +69,28 @@ func main() { + log.Errorf("Invalid DHCP_TIMEOUT: %s, using default: %v", t, timeout) + } + } +- contents, err = dhcpAndWriteNetplan(ifname, timeout) ++ netplanTemplate := `network: ++ version: 2 ++ renderer: networkd ++ ethernets: ++ id0: ++ match: ++ macaddress: {{ .HWAddr }} ++ addresses: ++ - {{ ToString .IPAddr }} ++ nameservers: ++ addresses: [{{ ToStringSlice .Nameservers ", " }}] ++ {{- if .Gateway }} ++ routes: ++ - to: default ++ via: {{ ToString .Gateway }} ++ {{- end }} ++` ++ if n, template, err := vlanEnabled("/proc/cmdline"); err == nil { ++ netplanTemplate = template ++ ifname = n ++ } ++ contents, err = dhcpAndWriteNetplan(ifname, timeout, netplanTemplate) + if err != nil { + log.Fatal(err) + } +@@ -332,7 +355,43 @@ func ensureDir(mountPath, path string, mode os.FileMode, uid, gid int) error { + return nil + } + +-func dhcpAndWriteNetplan(ifname string, dhcpTimeout time.Duration) (string, error) { ++func vlanEnabled(f string) (ifname, netplanTemplate string, err error) { ++ ifname = determineNetIF() ++ // want "eth0.X", where X is between 1 and 4096 ++ // This interface will exist if Hook creates it. Hook will create it if "vlan_id" is set in /proc/cmdline. ++ exp := `^eth([0-9]).(409[0-6]|(40[0-8]|[1-3]\d\d|[1-9]\d|[1-9])\d|[1-9])$` ++ if match, err := regexp.MatchString(exp, ifname); err != nil || !match { ++ return "", "", fmt.Errorf("failed to match interface name %s with regex %s: %w", ifname, exp, err) ++ } ++ ++ netplanTemplate = `network: ++ version: 2 ++ renderer: networkd ++ ethernets: ++ mainif: ++ match: ++ macaddress: {{ .HWAddr }} ++ set-name: mainif ++ ++ vlans: ++ vlan{{ .VLANID }}: ++ id: {{ .VLANID }} ++ link: mainif ++ addresses: ++ - {{ ToString .IPAddr }} ++ nameservers: ++ addresses: [{{ ToStringSlice .Nameservers ", " }}] ++ {{- if .Gateway }} ++ routes: ++ - to: default ++ via: {{ ToString .Gateway }} ++ {{- end }} ++` ++ ++ return ifname, netplanTemplate, nil ++} ++ ++func dhcpAndWriteNetplan(ifname string, dhcpTimeout time.Duration, netplanTemplate string) (string, error) { + // After locking a goroutine to its current OS thread with runtime.LockOSThread() + // and changing its network namespace, any new subsequent goroutine won't be scheduled + // on that thread while it's locked. Therefore, the new goroutine will run in a +@@ -361,24 +420,6 @@ func dhcpAndWriteNetplan(ifname string, dhcpTimeout time.Duration) (string, erro + return "", err + } + +- netplanTemplate := `network: +- version: 2 +- renderer: networkd +- ethernets: +- id0: +- match: +- macaddress: {{ .HWAddr }} +- addresses: +- - {{ ToString .IPAddr }} +- nameservers: +- addresses: [{{ ToStringSlice .Nameservers ", " }}] +- {{- if .Gateway }} +- routes: +- - to: default +- via: {{ ToString .Gateway }} +- {{- end }} +-` +- + return createNetplan(netplanTemplate, translate(d)) + } + +@@ -436,6 +477,32 @@ func translate(d *dhcpv4.DHCPv4) Info { + info.IPAddr = net.IPNet{IP: d.YourIPAddr, Mask: d.SubnetMask()} + info.Gateway = d.GetOneOption(dhcpv4.OptionRouter) + info.Nameservers = d.DNS() ++ s, err := os.ReadFile("/proc/cmdline") ++ if err != nil { ++ fmt.Println("failed to read /proc/cmdline while looking for vlan_id=: ", err) ++ return info ++ } ++ if vlanID, err := getVLANID(string(s)); err == nil { ++ info.VLANID = vlanID ++ } + + return info + } ++ ++// getVLANID parses a string for a value from key `vlan_id=` and returns it. ++func getVLANID(b string) (int, error) { ++ i := strings.Index(b, "vlan_id=") ++ if i == -1 { ++ return -1, errors.New("no vlan_id= key found") ++ } ++ ++ value := b[i : i+12] // max acceptable vlan id is 4 digits, so 12 chars (vlan_id=1234) is enough. ++ value = strings.Split(value, " ")[0] ++ value = strings.TrimRight(value, " ") ++ parsed := strings.Split(value, "=") ++ if len(parsed[1]) == 0 { ++ return -1, errors.New("no vlan_id found") ++ } ++ ++ return strconv.Atoi(parsed[1]) ++} +-- +2.40.0 + diff --git a/projects/tinkerbell/hub/patches/0004-Modify-write-file-to-read-multiple-HEGEL_URLS.patch b/projects/tinkerbell/hub/patches/0004-Modify-write-file-to-read-multiple-HEGEL_URLS.patch deleted file mode 100644 index bfc0156aea..0000000000 --- a/projects/tinkerbell/hub/patches/0004-Modify-write-file-to-read-multiple-HEGEL_URLS.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 4052552ab13b658cb8a31fb88d0703fccfb8db93 Mon Sep 17 00:00:00 2001 -From: Abhinav Pandey -Date: Mon, 20 Jun 2022 17:30:53 -0400 -Subject: [PATCH] Modify write-file to read multiple HEGEL_URLS - -Signed-off-by: Abhinav Pandey ---- - actions/writefile/v1/main.go | 58 +++++++++++++++++++++++------------- - 1 file changed, 37 insertions(+), 21 deletions(-) - -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index 23ca768..cfd9974 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -48,7 +48,7 @@ func main() { - - contents := os.Getenv("CONTENTS") - bootconfig := os.Getenv("BOOTCONFIG_CONTENTS") -- hegelUrl := os.Getenv("HEGEL_URL") -+ hegelUrls := os.Getenv("HEGEL_URLS") - uid := os.Getenv("UID") - gid := os.Getenv("GID") - mode := os.Getenv("MODE") -@@ -87,15 +87,15 @@ func main() { - log.Fatalf("Could not parse mode: %v", err) - } - -- // Only set one of contents, bootconfig or hegelUrl -+ // Only set one of contents, bootconfig or hegelUrls - validationCount := 0 -- for _, envVar := range []string{contents, bootconfig, hegelUrl} { -+ for _, envVar := range []string{contents, bootconfig, hegelUrls} { - if envVar != "" { - validationCount++ - } - } - if validationCount != 1 { -- log.Fatal("Only one environment vars of CONTENTS, BOOTCONFIG_CONTENTS, HEGEL_URL can be set") -+ log.Fatal("Only one environment vars of CONTENTS, BOOTCONFIG_CONTENTS, HEGEL_URLS can be set") - } - - fileMode := os.FileMode(modePrime) -@@ -138,26 +138,42 @@ func main() { - log.Fatalf("Failed to ensure directory exists: %v", err) - } - -- // If hegelUrl is set, get the user-data from hegel and set it to contents -- if hegelUrl != "" { -- userDataServiceUrl, err := url.Parse(hegelUrl) -- if err != nil { -- log.Fatalf("Error parsing hegel url: %v", err) -- } -- userDataServiceUrl.Path = path.Join(userDataServiceUrl.Path, hegelUserDataVersion, "user-data") -- resp, err := http.Get(userDataServiceUrl.String()) -- if err != nil { -- log.Fatalf("Error with HTTP GET call: %v", err) -- } -- defer resp.Body.Close() -+ if hegelUrls != "" { -+ success := false -+ // go through all urls in hegelUrls, and attempt to retrieve userdata from them -+ // upon a successful userdata retrieval, this loop will exit and populate the userdata contents in contents -+ for _, hegelUrl := range strings.Split(hegelUrls, ",") { -+ userDataServiceUrl, err := url.ParseRequestURI(hegelUrl) -+ if err != nil { -+ log.Warnf("Error parsing hegel url: %v", err) -+ continue -+ } -+ userDataServiceUrl.Path = path.Join(userDataServiceUrl.Path, hegelUserDataVersion, "user-data") -+ client := http.Client{ -+ Timeout: time.Second * 10, -+ } -+ resp, err := client.Get(userDataServiceUrl.String()) -+ if err != nil { -+ log.Warnf("Error with HTTP GET call: %v", err) -+ continue -+ } -+ defer resp.Body.Close() - -- respBody, err := ioutil.ReadAll(resp.Body) -- if err != nil { -- log.Fatalf("Error reading HTTP GET response body: %v", err) -+ respBody, err := ioutil.ReadAll(resp.Body) -+ if err != nil { -+ log.Warnf("Error reading HTTP GET response body: %v", err) -+ continue -+ } -+ -+ // Set contents to be the user-data -+ contents = string(respBody) -+ success = true -+ break - } - -- // Set contents to be the user-data -- contents = string(respBody) -+ if !success { -+ log.Fatalf("Failed to read user-data, exhausted all the urls defined in HEGEL_URLS: {%v}", hegelUrls) -+ } - } - - // If bootconfig is set, contents will be empty and will serve as output initrd file provided --- -2.30.1 (Apple Git-130) - diff --git a/projects/tinkerbell/hub/patches/0006-Add-static-IP-configuration-for-Bottlerocket.patch b/projects/tinkerbell/hub/patches/0005-Add-static-IP-configuration-for-Bottlerocket.patch similarity index 80% rename from projects/tinkerbell/hub/patches/0006-Add-static-IP-configuration-for-Bottlerocket.patch rename to projects/tinkerbell/hub/patches/0005-Add-static-IP-configuration-for-Bottlerocket.patch index 5153454d1f..0abc1dda5d 100644 --- a/projects/tinkerbell/hub/patches/0006-Add-static-IP-configuration-for-Bottlerocket.patch +++ b/projects/tinkerbell/hub/patches/0005-Add-static-IP-configuration-for-Bottlerocket.patch @@ -1,19 +1,23 @@ -From decdec5c435935fcb1365872bea492e40257ebc3 Mon Sep 17 00:00:00 2001 -From: Jacob Weinstock -Date: Thu, 8 Dec 2022 19:35:32 -0700 -Subject: [PATCH] Add static IP configuration for Bottlerocket: +From dff6baf346690eec9589b52458eaaa2fd40c25b0 Mon Sep 17 00:00:00 2001 +From: Ahree Hong +Date: Thu, 2 May 2024 12:47:50 -0700 +Subject: [PATCH 5/6] Add static IP configuration for Bottlerocket Static IPs provide more reliable IP handling. +Since Bottlerocket v1.11.0 we can use the MAC +address to define the network config. This will +make the network config more flexible across +hardware. -Signed-off-by: Jacob Weinstock +Signed-off-by: Ahree Hong --- - actions/writefile/v1/main.go | 127 ++++++++++++++++++++++++++++------- - 1 file changed, 102 insertions(+), 25 deletions(-) + writefile/main.go | 128 +++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 103 insertions(+), 25 deletions(-) -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index 339dedd..d2a5ff2 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go +diff --git a/writefile/main.go b/writefile/main.go +index e724375..a64e696 100644 +--- a/writefile/main.go ++++ b/writefile/main.go @@ -31,6 +31,7 @@ const ( mountAction = "/mountAction" bootConfigAction = "/usr/bin/bootconfig" @@ -31,12 +35,12 @@ index 339dedd..d2a5ff2 100644 +var bottlerocketNetTOMLTemplate = `# Version is required, it will change as we support +# additional settings -+version = 2 ++version = 3 + -+[{{ .IFName }}.static4] ++["{{ .IFName }}".static4] +addresses = ["{{ ToString .IPAddr }}"] + -+[[{{ .IFName }}.route]] ++[["{{ .IFName }}".route]] +to = "default" +via = "{{ ToString .Gateway }}" +route-metric = 100 @@ -70,7 +74,7 @@ index 339dedd..d2a5ff2 100644 func main() { fmt.Printf("WriteFile - Write file to disk\n------------------------\n") -@@ -69,23 +109,6 @@ func main() { +@@ -69,23 +109,7 @@ func main() { log.Errorf("Invalid DHCP_TIMEOUT: %s, using default: %v", t, timeout) } } @@ -91,10 +95,11 @@ index 339dedd..d2a5ff2 100644 - via: {{ ToString .Gateway }} - {{- end }} -` - if name, template, err := vlanEnabled("/proc/cmdline"); err == nil { ++ + if n, template, err := vlanEnabled("/proc/cmdline"); err == nil { netplanTemplate = template - ifname = name -@@ -117,8 +140,8 @@ func main() { + ifname = n +@@ -117,8 +141,8 @@ func main() { validationCount++ } } @@ -105,7 +110,7 @@ index 339dedd..d2a5ff2 100644 } fileMode := os.FileMode(modePrime) -@@ -199,6 +222,38 @@ func main() { +@@ -204,6 +228,38 @@ func main() { } } @@ -125,7 +130,7 @@ index 339dedd..d2a5ff2 100644 + log.Fatal(err, " IFName=", ifn) + } + i := translate(d) -+ i.IFName = os.Getenv("IFNAME") ++ i.IFName = d.ClientHWAddr.String() + contents, err = doTemplating(bottlerocketNetTOMLTemplate, i) + if err != nil { + log.Fatal(err) @@ -141,10 +146,10 @@ index 339dedd..d2a5ff2 100644 + } + } + - // If bootconfig is set, contents will be empty and will serve as output initrd file provided - // to bootconfig tool - fqFilePath := filepath.Join(mountAction, filePath) -@@ -231,6 +286,19 @@ func main() { + if contents == "" && bootconfig == "" { + log.Fatal("No content. Either the CONTENTS or BOOTCONFIG_CONTENTS env vars were not set or a data retrieval action failed.") + } +@@ -240,6 +296,19 @@ func main() { log.Infof("Successfully wrote file [%s] to device [%s]", filePath, blockDevice) } @@ -164,7 +169,7 @@ index 339dedd..d2a5ff2 100644 func determineNetIF() string { runtime.LockOSThread() defer runtime.UnlockOSThread() -@@ -404,7 +472,7 @@ func vlanEnabled(f string) (ifname, netplanTemplate string, err error) { +@@ -391,7 +460,7 @@ func vlanEnabled(f string) (ifname, netplanTemplate string, err error) { return ifname, netplanTemplate, nil } @@ -173,7 +178,7 @@ index 339dedd..d2a5ff2 100644 // After locking a goroutine to its current OS thread with runtime.LockOSThread() // and changing its network namespace, any new subsequent goroutine won't be scheduled // on that thread while it's locked. Therefore, the new goroutine will run in a -@@ -418,22 +486,31 @@ func dhcpAndWriteNetplan(ifname string, dhcpTimeout time.Duration, netplanTempla +@@ -405,22 +474,31 @@ func dhcpAndWriteNetplan(ifname string, dhcpTimeout time.Duration, netplanTempla // Change to PID 1 network namespace so we can do a DHCP using the host's interface. ns1, err := netns.GetFromPid(1) if err != nil { @@ -208,7 +213,7 @@ index 339dedd..d2a5ff2 100644 } func netIPToString(ip []net.IP, sep string) string { -@@ -457,8 +534,8 @@ func netToString(v interface{}) string { +@@ -444,8 +522,8 @@ func netToString(v interface{}) string { return fmt.Sprintf("%v", v) } @@ -220,5 +225,5 @@ index 339dedd..d2a5ff2 100644 return "", err } -- -2.34.1 +2.40.0 diff --git a/projects/tinkerbell/hub/patches/0005-Create-VLAN-tagged-interface-if-vlan_id-exists-in-pr.patch b/projects/tinkerbell/hub/patches/0005-Create-VLAN-tagged-interface-if-vlan_id-exists-in-pr.patch deleted file mode 100644 index ba182ec69b..0000000000 --- a/projects/tinkerbell/hub/patches/0005-Create-VLAN-tagged-interface-if-vlan_id-exists-in-pr.patch +++ /dev/null @@ -1,225 +0,0 @@ -From 8a84e41f0725d86f3e1f833546d52887cc82cffa Mon Sep 17 00:00:00 2001 -From: Jacob Weinstock -Date: Wed, 9 Nov 2022 16:36:15 +0000 -Subject: [PATCH] Create VLAN tagged interface if vlan_id= exists in - /proc/cmdline: - -This enables a vlan tagged machine to boot properly. - -Signed-off-by: Jacob Weinstock ---- - actions/writefile/v1/go.mod | 1 + - actions/writefile/v1/go.sum | 4 ++ - actions/writefile/v1/main.go | 127 +++++++++++++++++++++++++++++------ - 3 files changed, 112 insertions(+), 20 deletions(-) - -diff --git a/actions/writefile/v1/go.mod b/actions/writefile/v1/go.mod -index 374846c..399c5a3 100644 ---- a/actions/writefile/v1/go.mod -+++ b/actions/writefile/v1/go.mod -@@ -7,6 +7,7 @@ require ( - github.com/kr/text v0.2.0 // indirect - github.com/sirupsen/logrus v1.7.0 - github.com/stretchr/testify v1.7.0 // indirect -+ github.com/vishvananda/netlink v1.1.0 // indirect - github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect -diff --git a/actions/writefile/v1/go.sum b/actions/writefile/v1/go.sum -index 3909e4b..15d11a9 100644 ---- a/actions/writefile/v1/go.sum -+++ b/actions/writefile/v1/go.sum -@@ -47,6 +47,9 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc - github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= - github.com/u-root/uio v0.0.0-20210528114334-82958018845c h1:BFvcl34IGnw8yvJi8hlqLFo9EshRInwWBs2M5fGWzQA= - github.com/u-root/uio v0.0.0-20210528114334-82958018845c/go.mod h1:LpEX5FO/cB+WF4TYGY1V5qktpaZLkKkSegbr0V4eYXA= -+github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= -+github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -+github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= - github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 h1:gga7acRE695APm9hlsSMoOoE65U4/TcqNj90mc69Rlg= - github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -@@ -67,6 +70,7 @@ golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7w - golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20190418153312-f0ce4c0180be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20190606122018-79a91cf218c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -+golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index cfd9974..339dedd 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -23,6 +23,7 @@ import ( - "github.com/insomniacslk/dhcp/dhcpv4" - "github.com/insomniacslk/dhcp/dhcpv4/nclient4" - log "github.com/sirupsen/logrus" -+ "github.com/vishvananda/netlink" - "github.com/vishvananda/netns" - ) - -@@ -37,6 +38,7 @@ type Info struct { - IPAddr net.IPNet - Gateway net.IP - Nameservers []net.IP -+ VLANID int - } - - func main() { -@@ -67,7 +69,28 @@ func main() { - log.Errorf("Invalid DHCP_TIMEOUT: %s, using default: %v", t, timeout) - } - } -- contents, err = dhcpAndWriteNetplan(ifname, timeout) -+ netplanTemplate := `network: -+ version: 2 -+ renderer: networkd -+ ethernets: -+ id0: -+ match: -+ macaddress: {{ .HWAddr }} -+ addresses: -+ - {{ ToString .IPAddr }} -+ nameservers: -+ addresses: [{{ ToStringSlice .Nameservers ", " }}] -+ {{- if .Gateway }} -+ routes: -+ - to: default -+ via: {{ ToString .Gateway }} -+ {{- end }} -+` -+ if name, template, err := vlanEnabled("/proc/cmdline"); err == nil { -+ netplanTemplate = template -+ ifname = name -+ } -+ contents, err = dhcpAndWriteNetplan(ifname, timeout, netplanTemplate) - if err != nil { - log.Fatal(err) - } -@@ -323,7 +346,65 @@ func ensureDir(mountPath, path string, mode os.FileMode, uid, gid int) error { - return nil - } - --func dhcpAndWriteNetplan(ifname string, dhcpTimeout time.Duration) (string, error) { -+func vlanEnabled(f string) (ifname, netplanTemplate string, err error) { -+ cmdline, err := ioutil.ReadFile(f) -+ if err != nil { -+ return "", "", fmt.Errorf("failed to read /proc/cmdline: %w", err) -+ } -+ var vlan int -+ if vlan, err = getVLANID(string(cmdline)); err == nil { -+ // create new interface with vlan id -+ l := netlink.NewLinkAttrs() -+ parent := determineNetIF() -+ n, err := net.InterfaceByName(parent) -+ if err != nil { -+ return "", "", err -+ } -+ -+ ifname = fmt.Sprintf(parent+".%d", vlan) -+ l.Name = ifname -+ l.ParentIndex = n.Index -+ link := &netlink.Vlan{LinkAttrs: l, VlanId: vlan, VlanProtocol: netlink.VLAN_PROTOCOL_8021Q} -+ // creat vlan interface -+ if err = netlink.LinkAdd(link); err != nil { -+ return "", "", err -+ } -+ // set interface up -+ if err = netlink.LinkSetUp(link); err != nil { -+ return "", "", err -+ } -+ } else { -+ return "", "", err -+ } -+ -+ netplanTemplate = `network: -+ version: 2 -+ renderer: networkd -+ ethernets: -+ mainif: -+ match: -+ macaddress: {{ .HWAddr }} -+ set-name: mainif -+ -+ vlans: -+ vlan{{ .VLANID }}: -+ id: {{ .VLANID }} -+ link: mainif -+ addresses: -+ - {{ ToString .IPAddr }} -+ nameservers: -+ addresses: [{{ ToStringSlice .Nameservers ", " }}] -+ {{- if .Gateway }} -+ routes: -+ - to: default -+ via: {{ ToString .Gateway }} -+ {{- end }} -+` -+ -+ return ifname, netplanTemplate, nil -+} -+ -+func dhcpAndWriteNetplan(ifname string, dhcpTimeout time.Duration, netplanTemplate string) (string, error) { - // After locking a goroutine to its current OS thread with runtime.LockOSThread() - // and changing its network namespace, any new subsequent goroutine won't be scheduled - // on that thread while it's locked. Therefore, the new goroutine will run in a -@@ -352,24 +433,6 @@ func dhcpAndWriteNetplan(ifname string, dhcpTimeout time.Duration) (string, erro - return "", err - } - -- netplanTemplate := `network: -- version: 2 -- renderer: networkd -- ethernets: -- id0: -- match: -- macaddress: {{ .HWAddr }} -- addresses: -- - {{ ToString .IPAddr }} -- nameservers: -- addresses: [{{ ToStringSlice .Nameservers ", " }}] -- {{- if .Gateway }} -- routes: -- - to: default -- via: {{ ToString .Gateway }} -- {{- end }} --` -- - return createNetplan(netplanTemplate, translate(d)) - } - -@@ -427,6 +490,30 @@ func translate(d *dhcpv4.DHCPv4) Info { - info.IPAddr = net.IPNet{IP: d.YourIPAddr, Mask: d.SubnetMask()} - info.Gateway = d.GetOneOption(dhcpv4.OptionRouter) - info.Nameservers = d.DNS() -+ o := dhcpv4.Options{} -+ o.FromBytes(d.GetOneOption(dhcpv4.OptionVendorSpecificInformation)) -+ s := o.Get(dhcpv4.GenericOptionCode(116)) -+ if vlan, err := strconv.Atoi(string(s)); err == nil { -+ info.VLANID = vlan -+ } - - return info - } -+ -+// getVLANID parses a string for a value from key `vlan_id=` and returns it. -+func getVLANID(b string) (int, error) { -+ i := strings.Index(b, "vlan_id=") -+ if i == -1 { -+ return -1, errors.New("no vlan_id= key found") -+ } -+ -+ value := b[i : i+12] // max acceptable vlan id is 4 digits, so 12 chars (vlan_id=1234) is enough. -+ value = strings.Split(value, " ")[0] -+ value = strings.TrimRight(value, " ") -+ parsed := strings.Split(value, "=") -+ if len(parsed[1]) == 0 { -+ return -1, errors.New("no vlan_id found") -+ } -+ -+ return strconv.Atoi(parsed[1]) -+} --- -2.34.1 - diff --git a/projects/tinkerbell/hub/patches/0013-Fix-net-interface-lookup.patch b/projects/tinkerbell/hub/patches/0006-Fix-net-interface-lookup.patch similarity index 86% rename from projects/tinkerbell/hub/patches/0013-Fix-net-interface-lookup.patch rename to projects/tinkerbell/hub/patches/0006-Fix-net-interface-lookup.patch index e83ef4e300..d79ca7ed5d 100644 --- a/projects/tinkerbell/hub/patches/0013-Fix-net-interface-lookup.patch +++ b/projects/tinkerbell/hub/patches/0006-Fix-net-interface-lookup.patch @@ -1,7 +1,7 @@ -From f39ec645991b0e7585d34a00788b4546b8915a8b Mon Sep 17 00:00:00 2001 -From: Jacob Weinstock -Date: Tue, 17 Oct 2023 15:12:47 -0600 -Subject: [PATCH] Fix net interface lookup: +From 657eb0ea31d32e38fdf94db7b89063c67f5933e6 Mon Sep 17 00:00:00 2001 +From: Ahree Hong +Date: Thu, 2 May 2024 12:51:23 -0700 +Subject: [PATCH 6/6] Fix net interface lookup We use the mac address in /proc/cmdline to be sure we use the interface that is @@ -10,18 +10,18 @@ known to the Tinkerbell stack. This fixes issues when multiple configured interfaces are present. -Signed-off-by: Jacob Weinstock +Signed-off-by: Ahree Hong --- - actions/writefile/v1/cmdline.go | 157 ++++++++++++++++++++++++++++++++ - actions/writefile/v1/main.go | 16 ++++ + writefile/cmdline.go | 157 +++++++++++++++++++++++++++++++++++++++++++ + writefile/main.go | 16 +++++ 2 files changed, 173 insertions(+) - create mode 100644 actions/writefile/v1/cmdline.go + create mode 100644 writefile/cmdline.go -diff --git a/actions/writefile/v1/cmdline.go b/actions/writefile/v1/cmdline.go +diff --git a/writefile/cmdline.go b/writefile/cmdline.go new file mode 100644 index 0000000..d80d5bd --- /dev/null -+++ b/actions/writefile/v1/cmdline.go ++++ b/writefile/cmdline.go @@ -0,0 +1,157 @@ +// Copyright 2018 the u-root Authors. All rights reserved +// Use of this source code is governed by a BSD-style @@ -180,11 +180,11 @@ index 0000000..d80d5bd + value, present := c.AsMap[canonicalFlag] + return value, present +} -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index d5f923c..d83867a 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -308,6 +308,22 @@ func appendToUserData(contents string, filePath string) error { +diff --git a/writefile/main.go b/writefile/main.go +index a64e696..9922f7c 100644 +--- a/writefile/main.go ++++ b/writefile/main.go +@@ -309,6 +309,22 @@ func appendToUserData(contents string, filePath string) error { return nil } @@ -208,5 +208,5 @@ index d5f923c..d83867a 100644 runtime.LockOSThread() defer runtime.UnlockOSThread() -- -2.42.0 +2.40.0 diff --git a/projects/tinkerbell/hub/patches/0007-Update-vlan-checking.patch b/projects/tinkerbell/hub/patches/0007-Update-vlan-checking.patch deleted file mode 100644 index 4c25304843..0000000000 --- a/projects/tinkerbell/hub/patches/0007-Update-vlan-checking.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 79e91b25c1ee99611f4f40f84cab34e92e3467c3 Mon Sep 17 00:00:00 2001 -From: Jacob Weinstock -Date: Wed, 25 Jan 2023 21:03:49 -0700 -Subject: [PATCH] Update vlan checking: - -Hook creates the vlan interface so we don't need -to create it here. - -Signed-off-by: Jacob Weinstock ---- - actions/writefile/v1/main.go | 41 ++++++++---------------------------- - 1 file changed, 9 insertions(+), 32 deletions(-) - -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index d2a5ff2..018c2a7 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -14,6 +14,7 @@ import ( - "os/exec" - "path" - "path/filepath" -+ "regexp" - "runtime" - "strconv" - "strings" -@@ -23,7 +24,6 @@ import ( - "github.com/insomniacslk/dhcp/dhcpv4" - "github.com/insomniacslk/dhcp/dhcpv4/nclient4" - log "github.com/sirupsen/logrus" -- "github.com/vishvananda/netlink" - "github.com/vishvananda/netns" - ) - -@@ -109,9 +109,9 @@ func main() { - log.Errorf("Invalid DHCP_TIMEOUT: %s, using default: %v", t, timeout) - } - } -- if name, template, err := vlanEnabled("/proc/cmdline"); err == nil { -+ if n, template, err := vlanEnabled("/proc/cmdline"); err == nil { - netplanTemplate = template -- ifname = name -+ ifname = n - } - contents, err = dhcpAndWriteNetplan(ifname, timeout, netplanTemplate) - if err != nil { -@@ -415,36 +415,13 @@ func ensureDir(mountPath, path string, mode os.FileMode, uid, gid int) error { - } - - func vlanEnabled(f string) (ifname, netplanTemplate string, err error) { -- cmdline, err := ioutil.ReadFile(f) -- if err != nil { -- return "", "", fmt.Errorf("failed to read /proc/cmdline: %w", err) -- } -- var vlan int -- if vlan, err = getVLANID(string(cmdline)); err == nil { -- // create new interface with vlan id -- l := netlink.NewLinkAttrs() -- parent := determineNetIF() -- n, err := net.InterfaceByName(parent) -- if err != nil { -- return "", "", err -- } -- -- ifname = fmt.Sprintf(parent+".%d", vlan) -- l.Name = ifname -- l.ParentIndex = n.Index -- link := &netlink.Vlan{LinkAttrs: l, VlanId: vlan, VlanProtocol: netlink.VLAN_PROTOCOL_8021Q} -- // creat vlan interface -- if err = netlink.LinkAdd(link); err != nil { -- return "", "", err -- } -- // set interface up -- if err = netlink.LinkSetUp(link); err != nil { -- return "", "", err -- } -- } else { -- return "", "", err -+ ifname = determineNetIF() -+ // want "eth0.X", where X is between 1 and 4096 -+ // This interface will exist if Hook creates it. Hook will create it if "vlan_id" is set in /proc/cmdline. -+ exp := `^eth0.(409[0-6]|(40[0-8]|[1-3]\d\d|[1-9]\d|[1-9])\d|[1-9])$` -+ if match, err := regexp.MatchString(exp, ifname); err != nil || !match { -+ return "", "", fmt.Errorf("failed to match interface name %s with regex %s: %w", ifname, exp, err) - } -- - netplanTemplate = `network: - version: 2 - renderer: networkd --- -2.34.1 - diff --git a/projects/tinkerbell/hub/patches/0008-Fix-netplan-vlan-file.patch b/projects/tinkerbell/hub/patches/0008-Fix-netplan-vlan-file.patch deleted file mode 100644 index a06febe5c0..0000000000 --- a/projects/tinkerbell/hub/patches/0008-Fix-netplan-vlan-file.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 54e157d9565bf868079920a2b427f289df4be85a Mon Sep 17 00:00:00 2001 -From: Jacob Weinstock -Date: Fri, 27 Jan 2023 12:26:17 -0700 -Subject: [PATCH] Fix netplan vlan file: - -Formatting was bad and caused netplan to fail. - -Signed-off-by: Jacob Weinstock ---- - actions/writefile/v1/main.go | 40 +++++++++++++++++++----------------- - 1 file changed, 21 insertions(+), 19 deletions(-) - -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index 018c2a7..07e816a 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -418,7 +418,7 @@ func vlanEnabled(f string) (ifname, netplanTemplate string, err error) { - ifname = determineNetIF() - // want "eth0.X", where X is between 1 and 4096 - // This interface will exist if Hook creates it. Hook will create it if "vlan_id" is set in /proc/cmdline. -- exp := `^eth0.(409[0-6]|(40[0-8]|[1-3]\d\d|[1-9]\d|[1-9])\d|[1-9])$` -+ exp := `^eth([0-9]).(409[0-6]|(40[0-8]|[1-3]\d\d|[1-9]\d|[1-9])\d|[1-9])$` - if match, err := regexp.MatchString(exp, ifname); err != nil || !match { - return "", "", fmt.Errorf("failed to match interface name %s with regex %s: %w", ifname, exp, err) - } -@@ -431,19 +431,19 @@ func vlanEnabled(f string) (ifname, netplanTemplate string, err error) { - macaddress: {{ .HWAddr }} - set-name: mainif - -- vlans: -- vlan{{ .VLANID }}: -- id: {{ .VLANID }} -- link: mainif -- addresses: -- - {{ ToString .IPAddr }} -- nameservers: -- addresses: [{{ ToStringSlice .Nameservers ", " }}] -- {{- if .Gateway }} -- routes: -- - to: default -- via: {{ ToString .Gateway }} -- {{- end }} -+ vlans: -+ vlan{{ .VLANID }}: -+ id: {{ .VLANID }} -+ link: mainif -+ addresses: -+ - {{ ToString .IPAddr }} -+ nameservers: -+ addresses: [{{ ToStringSlice .Nameservers ", " }}] -+ {{- if .Gateway }} -+ routes: -+ - to: default -+ via: {{ ToString .Gateway }} -+ {{- end }} - ` - - return ifname, netplanTemplate, nil -@@ -544,11 +544,13 @@ func translate(d *dhcpv4.DHCPv4) Info { - info.IPAddr = net.IPNet{IP: d.YourIPAddr, Mask: d.SubnetMask()} - info.Gateway = d.GetOneOption(dhcpv4.OptionRouter) - info.Nameservers = d.DNS() -- o := dhcpv4.Options{} -- o.FromBytes(d.GetOneOption(dhcpv4.OptionVendorSpecificInformation)) -- s := o.Get(dhcpv4.GenericOptionCode(116)) -- if vlan, err := strconv.Atoi(string(s)); err == nil { -- info.VLANID = vlan -+ s, err := ioutil.ReadFile("/proc/cmdline") -+ if err != nil { -+ fmt.Println("failed to read /proc/cmdline while looking for vlan_id=: ", err) -+ return info -+ } -+ if vlanID, err := getVLANID(string(s)); err == nil { -+ info.VLANID = vlanID - } - - return info --- -2.34.1 - diff --git a/projects/tinkerbell/hub/patches/0009-Use-MAC-address-in-Bottlerocket-network-config.patch b/projects/tinkerbell/hub/patches/0009-Use-MAC-address-in-Bottlerocket-network-config.patch deleted file mode 100644 index c1121d082e..0000000000 --- a/projects/tinkerbell/hub/patches/0009-Use-MAC-address-in-Bottlerocket-network-config.patch +++ /dev/null @@ -1,47 +0,0 @@ -From a5d8410a200c7dd52714b511c9e39748c5391dc5 Mon Sep 17 00:00:00 2001 -From: Prow Bot -Date: Thu, 18 May 2023 22:47:28 -0600 -Subject: [PATCH] Use MAC address in Bottlerocket network config: - -Since Bottlerocket v1.11.0 we can use the MAC -address to define the network config. This will -make the network config more flexible across -hardware. - -Signed-off-by: Jacob Weinstock ---- - actions/writefile/v1/main.go | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index 07e816a..db393fe 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -45,12 +45,12 @@ type Info struct { - - var bottlerocketNetTOMLTemplate = `# Version is required, it will change as we support - # additional settings --version = 2 -+version = 3 - --[{{ .IFName }}.static4] -+["{{ .IFName }}".static4] - addresses = ["{{ ToString .IPAddr }}"] - --[[{{ .IFName }}.route]] -+[["{{ .IFName }}".route]] - to = "default" - via = "{{ ToString .Gateway }}" - route-metric = 100 -@@ -238,7 +238,7 @@ func main() { - log.Fatal(err, " IFName=", ifn) - } - i := translate(d) -- i.IFName = os.Getenv("IFNAME") -+ i.IFName = d.ClientHWAddr.String() - contents, err = doTemplating(bottlerocketNetTOMLTemplate, i) - if err != nil { - log.Fatal(err) --- -2.39.2 - diff --git a/projects/tinkerbell/hub/patches/0010-Handle-non-200-status-codes-from-metadata-service.patch b/projects/tinkerbell/hub/patches/0010-Handle-non-200-status-codes-from-metadata-service.patch deleted file mode 100644 index a56956e7a7..0000000000 --- a/projects/tinkerbell/hub/patches/0010-Handle-non-200-status-codes-from-metadata-service.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 9935e57fc9fb02b2af061f1de7ea9976c1b6ab17 Mon Sep 17 00:00:00 2001 -From: Chris Doherty -Date: Fri, 23 Jun 2023 09:18:26 -0500 -Subject: [PATCH] Handle non-200 status codes from metadata service - ---- - actions/writefile/v1/main.go | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index db393fe..954a45e 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -205,6 +205,11 @@ func main() { - } - defer resp.Body.Close() - -+ // Ensure non-200 responses are considered an error and move to the next metadata server. -+ if resp.StatusCode != http.StatusOK { -+ continue -+ } -+ - respBody, err := ioutil.ReadAll(resp.Body) - if err != nil { - log.Warnf("Error reading HTTP GET response body: %v", err) --- -2.34.1 - diff --git a/projects/tinkerbell/hub/patches/0011-Ensure-content-is-specified-before-writing-file.patch b/projects/tinkerbell/hub/patches/0011-Ensure-content-is-specified-before-writing-file.patch deleted file mode 100644 index bf9632f7d9..0000000000 --- a/projects/tinkerbell/hub/patches/0011-Ensure-content-is-specified-before-writing-file.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 5c7b24fde808e5c175df6ff9f1286b49a0f156a9 Mon Sep 17 00:00:00 2001 -From: Chris Doherty -Date: Tue, 15 Aug 2023 13:34:34 -0500 -Subject: [PATCH] Ensure content is specified before writing file - ---- - actions/writefile/v1/main.go | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index 954a45e..bf9f4ac 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -259,6 +259,10 @@ func main() { - } - } - -+ if contents == "" { -+ log.Fatal("No content. Either the CONTENTS env var was not set or a data retrieval action failed.") -+ } -+ - // If bootconfig is set, contents will be empty and will serve as output initrd file provided - // to bootconfig tool - fqFilePath := filepath.Join(mountAction, filePath) -@@ -292,7 +296,7 @@ func main() { - } - - func appendToUserData(contents string, filePath string) error { -- f, err := os.OpenFile(filePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) -+ f, err := os.OpenFile(filePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) - if err != nil { - return err - } --- -2.40.1 - diff --git a/projects/tinkerbell/hub/patches/0012-Allow-BOOTCONFIG_CONTENTS-and-CONTENTS-to-be-checked.patch b/projects/tinkerbell/hub/patches/0012-Allow-BOOTCONFIG_CONTENTS-and-CONTENTS-to-be-checked.patch deleted file mode 100644 index 9ad25384c3..0000000000 --- a/projects/tinkerbell/hub/patches/0012-Allow-BOOTCONFIG_CONTENTS-and-CONTENTS-to-be-checked.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1f42fd3edda7bd83a1b1770e6038c7c6d6de6ece Mon Sep 17 00:00:00 2001 -From: Prow Bot -Date: Mon, 28 Aug 2023 11:05:36 -0600 -Subject: [PATCH] Allow BOOTCONFIG_CONTENTS and CONTENTS to be checked: - -Without this a Bottlerocket action that only -specifies BOOTCONFIG_CONTENTS will fail. - -Signed-off-by: Prow Bot ---- - actions/writefile/v1/main.go | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/actions/writefile/v1/main.go b/actions/writefile/v1/main.go -index bf9f4ac..d5f923c 100644 ---- a/actions/writefile/v1/main.go -+++ b/actions/writefile/v1/main.go -@@ -259,8 +259,8 @@ func main() { - } - } - -- if contents == "" { -- log.Fatal("No content. Either the CONTENTS env var was not set or a data retrieval action failed.") -+ if contents == "" && bootconfig == "" { -+ log.Fatal("No content. Either the CONTENTS or BOOTCONFIG_CONTENTS env vars were not set or a data retrieval action failed.") - } - - // If bootconfig is set, contents will be empty and will serve as output initrd file provided --- -2.41.0 -