22893 Commits

Author SHA1 Message Date
Jeremi Piotrowski
b1ce3800a5 profiles/coreos/base: slsa: sort file checksums by name 2022-07-27 13:02:22 +02:00
Jeremi Piotrowski
1a0f396be4 profile/coreos/base: slsa: switch to bz2 compression for consistency
...and remove redundant mkdir. Mkdir is already called with the same argument a
couple of lines lower.
2022-07-27 13:02:22 +02:00
Jeremi Piotrowski
d211a2b168 profile/core/base: slsa: use nproc instead of parsing /proc/cpuinfo 2022-07-27 13:02:22 +02:00
Jeremi Piotrowski
91b64a5587 profile/coreos/base: slsa: remove name collision between variable and function
__slsa_provenance_report is both a variable and a function, which is confusing.
Rename the variable.
2022-07-27 13:02:22 +02:00
jenkins
39f1d45dff profiles/coreos/base: slsa: return when disabled and use die() 2022-07-27 13:02:22 +02:00
jenkins
7bd2f19fac profiles/coreos/base: slsa: use portageq to find repository path
This makes the lookup work within the catalyst chroot, as well as in the
SDK.
2022-07-27 13:02:22 +02:00
Thilo Fromm
d86d5ebe3f slsa-provenance: make generation optional 2022-07-27 13:02:22 +02:00
Thilo Fromm
be46ed7bb0 profiles/coreos/base/profile.bashrc: SLSA provenance reports
This change adds initial support for SLSA provenance report generation.
Reports are generated in package build post-install hooks after
compilation.

See https://slsa.dev/ for SLSA and https://slsa.dev/provenance/v0.2 for
the provenance report syntax.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-07-27 13:02:22 +02:00
Jeremi Piotrowski
3f39f48389 build_library: install initramfs/torcx SLSA reports into rootfs
Some packages are currently missing from the /usr/share/SLSA directory
compared to flatcar_production_image_packages.txt. For torcx packages,
extract the reports from the torcx bundle when adding it to the rootfs.
For initramfs packages, as a substitute we enumerate build dependencies
of coreos-kernel (image_packages_implicit()). At this time these are
bootengine and intel-microcode.
2022-07-27 13:00:20 +02:00
Jeremi Piotrowski
e20cf95bcb prod_image_util: unpack SLSA report along with gcc when building image
Prod images need libstdc++.so and other libraries produced by
sys-devel/gcc build, but because we don't want all of gcc in the image,
the binpkg is manually unpacked instead of installed with emerge. Make
sure to preserve SLSA metadata when unpacking as well.
2022-07-27 13:00:19 +02:00
Jeremi Piotrowski
7c87bb611f enable GENERATE_SLSA_PROVENANCE for board ROOT
This needs to be done in setup_board for ROOT=/build/$BOARD, but also in
toolchain_util because basic toolchains packages are built through
catalyst.
2022-07-27 12:59:49 +02:00
Jeremi Piotrowski
0eb44ea280 build_toolchains: add provenance metadata files to root overlay
Catalyst runs builds with copies of the portage/coreos overlays in a
chroot, which prevents us from accessing the git metadata necessary to
create provenance information. Copy some files over into the
root_overlay used by the toolchains catalyst build so that provenance
can be correctly captured.
2022-07-27 12:59:49 +02:00
Jeremi Piotrowski
95c5d94837 setup_board: fix building binpkgs for toolchain dependencies
install_cross_libs installs TOOLCHAIN_PKGS deps into /usr/$BOARD_CHOST,
so that TOOLCHAIN_PKGS binpkgs can be built. We also need binpkgs for
the TOOLCHAIN_PKGS deps so that we can install them into /build/$BOARD
later together with TOOLCHAIN_PKGS. This is where the flow is currently
broken. Due to a change in semantics, --emptyroot tries to rebuild host
packages as well, and dropping it leaves --onlydeps which results in no
binpkgs being built because they are already installed.

We can solve resolve this by reusing the dependency list generated by
install_cross_libs, and explicitly building those binpkgs. It is worth
remarking that this flow of building the toolchain binpkgs through
setup_board is not in use in Flatcar, because we normally build
toolchains with catalyst. We are interested in reviving it because we
want to build everything with SLSA provenance information.
2022-07-27 12:59:49 +02:00
Jeremi Piotrowski
a66bded4ce install_cross_libs: fix toolchain dependency installation
`./setup_board --nousepkg --nogetbinpkg` currently fails with a
circular dependency due to pulling in the whole systemd-cryptsetup-udev
dependency chain. This is due to several issue:

* `emerge --root=$ROOT --emptytree` considers ROOT=/ to also be empty,
  so it pulls in all host packages. This must've not always been the case.
  So we need to pipe the dependency package list through `egrep $ROOT`
  to filter only those that would get installed into the desired ROOT
* if SYSROOT=/ and not SYSROOT=ROOT, then virtual/os-headers is missing
  from $ROOT package list
* the final filter expression tries to previously looked like this:
  (=sys-devel/gcc|sys-devel/binutils-0.9) which also matches
  sys-devel/gcc-config and sys-devel/binutils-config, which are
  necessary dependencies. Rework the match expression to not filter
  those out.
2022-07-27 12:59:49 +02:00
Jeremi Piotrowski
13889874e3
Merge pull request #391 from flatcar-linux/jepio/libgcc-fix
prod_image_util: extract gcc libs to /usr/lib64
2022-07-27 11:26:02 +02:00
flatcar-ci
99bb586c3a New version: main-3312.0.0-nightly-20220726-2100 2022-07-26 21:00:24 +00:00
Dongsu Park
0d2a3f29fb Merge pull request #2059 from flatcar-linux/rust-1.62.1-main
Upgrade dev-lang/rust and virtual/rust in main from 1.62.0 to 1.62.1
2022-07-26 16:58:05 +02:00
Jeremi Piotrowski
c2c7f0d504 Merge pull request #2057 from flatcar-linux/jepio/systemd-resolve.conf
sys-apps/systemd: fix tmpfile entry for resolv.conf link
2022-07-26 11:07:09 +02:00
Jeremi Piotrowski
36ecad566a changelog: add entry for resolv.conf bugfix 2022-07-26 11:06:27 +02:00
Jeremi Piotrowski
d9972d4ad1 sys-apps/systemd: fix tmpfile entry for resolv.conf link
Our ebuild modifies the systemd owned tmpfiles.d entry that creates the
/etc/resolv.conf symlink to point to resolv.conf instead of stub-resolv.conf.
The file that contains that entry changed from etc.conf.in to
systemd-resolve.conf, so update the ebuild to touch that file.
2022-07-26 10:03:13 +02:00
Flatcar Buildbot
5acb31cbab dev-lang: Upgrade dev-lang/rust 1.62.0 to 1.62.1 2022-07-26 07:37:28 +00:00
flatcar-ci
a64011137b New version: main-3311.0.0-nightly-20220725-2100 2022-07-25 21:00:35 +00:00
Jeremi Piotrowski
6735a6d5c0
prod_image_util: extract gcc libs to /usr/lib64
This made no difference back when lib was a symlink to lib64, but now that they are separate,
libs belongs in /usr/lib64. This  mostly doesn't show up because ldconfig configures the ld.so cache
to include both locations, but when updating from an older release ld.so.cache is out of date.
Unfortunately ld.so.cache does not get updated until after multipathd, which causes
multipathd to dump core. This may also affect other packages that need access to
libgcc early.

See also: https://github.com/flatcar-linux/Flatcar/issues/809
2022-07-25 17:33:08 +02:00
Dongsu Park
f36c15c44d Merge pull request #2056 from flatcar-linux/cacerts-3.81-main
Upgrade ca-certificates in main from 3.80 to 3.81
2022-07-25 16:18:25 +02:00
Flatcar Buildbot
6058ad50fc app-misc: Upgrade ca-certificates 3.80 to 3.81 2022-07-25 07:24:01 +00:00
Dongsu Park
cd80387051 Merge pull request #2040 from flatcar-linux/dongsu/add-Go-CVE-2022-32148
changelog: add missing CVE for Go 1.18.4, 1.17.12
2022-07-22 15:04:15 +02:00
Krzesimir Nowak
fa391c188d Merge pull request #2045 from flatcar-linux/linux-5.15.56-main
Upgrade Linux Kernel in main from 5.15.55 to 5.15.56
2022-07-22 14:51:58 +02:00
Flatcar Buildbot
2568802c6e sys-kernel: Upgrade Kernel 5.15.55 to 5.15.56 2022-07-22 07:24:26 +00:00
Dongsu Park
1e1c30264e changelog: add missing CVE for Go 1.18.4, 1.17.12
Add missing CVE-2022-32148 for Go 1.18.4, 1.17.12.
2022-07-21 13:39:12 +02:00
flatcar-ci
1d47a32cc3 New version: main-3306.0.0-nightly-20220720-2100 2022-07-20 21:00:27 +00:00
Dongsu Park
39dc428bc1
Merge pull request #389 from flatcar-linux/dongsu/equinix-metal-arm64-dc
jenkins: fix PACKET_REGION to DC for more servers available
2022-07-20 15:21:56 +02:00
Dongsu Park
cb7b53188d jenkins: fix PACKET_REGION to DC for more servers available
`c3.large.arm64` instances of Equinix Metal are available in metro
either `DA` or `DC`. However, recently arm64 CI builds started to fail
due to too few servers available in the DA metro. As the DC metro has
more servers available, let's change metro to DC.

How to check how many servers are available in a specific metro:

```
curl -X POST \
  -H "Content-Type: application/json" -H "X-Auth-Token: ..." \
  https://api.equinix.com/metal/v1/capacity/metros \
  -d '{"servers": [ { \
    "metro": "dc", \
    "plan": "c3.large.arm64", \
     "quantity": 34 \
  } ] }'
curl -X POST \
  -H "Content-Type: application/json" -H "X-Auth-Token: ..." \
  https://api.equinix.com/metal/v1/capacity/metros \
  -d '{"servers": [ { \
    "metro": "da", \
    "plan": "c3.large.arm64", \
    "quantity": 17 \
  } ] }'
```
2022-07-20 14:58:59 +02:00
flatcar-ci
cc4a96ed6d New version: main-3305.0.0-nightly-20220719-2100 2022-07-19 21:00:25 +00:00
Kai Lüke
a2e0b7b233
Merge pull request #386 from flatcar-linux/kai/new-packages-top-job
ci-automation: Move git tagging into own script
2022-07-19 19:35:13 +02:00
Mathieu Tortuyaux
5d941bd885 Merge pull request #345 from flatcar-linux/tormath1/nmap
net-analyzer/nmap: sync ebuild revision
2022-07-19 14:12:08 +02:00
Mathieu Tortuyaux
ace84f7d4f Merge pull request #2038 from flatcar-linux/tormath1/nmap
profiles: enable symlink for nmap
2022-07-19 14:11:09 +02:00
Mathieu Tortuyaux
f334da4fb5 changelog: add entry
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-07-19 08:45:57 +02:00
Sayan Chowdhury
6aa0ab8a87 Merge pull request #2036 from flatcar-linux/linux-5.15.55-main
Upgrade Linux Kernel in main from 5.15.54 to 5.15.55
2022-07-19 02:59:46 +05:30
flatcar-ci
7e796bf561 New version: main-3304.0.0-nightly-20220718-2100 2022-07-18 21:00:27 +00:00
Kai Lüke
a21daa36c0
Merge pull request #387 from flatcar-linux/kai/checkout-test
.github: Specify remote when checking out c-o/p-s ref in workflow
2022-07-18 20:33:51 +02:00
Kai Lueke
71510fb117 .github: Specify remote when checking out c-o/p-s ref in workflow
When the specified remote contains a same-named branch as origin,
the checkout fails with "fatal: 'X' matched multiple (Y) remote
tracking branches".
Add the remote name as prefix to make the reference unambiguous.
2022-07-18 20:12:06 +02:00
Kai Lueke
5e0dc0a85d ci-automation: Move git tagging into own script
When the build system runs the packages jobs for both architectures in
parallel and has to create a new tag, tagging fails due to the race in
the tagging.
Move the git tagging to its own script that is run from a new top-level
job that starts the packages jobs for both architectures.
2022-07-18 19:20:44 +02:00
Mathieu Tortuyaux
606ba61447 profiles: enable symlink for nmap
For compatiblity, it's good to have `nc` in the PATH too.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-07-18 11:23:09 +02:00
Mathieu Tortuyaux
5b172ffb99 net-analyzer/nmap: sync ebuild revision
it basically pulls this: f1367051f3

Commit-Ref: 0bcf4941145004296ef49e39d2e69fac3d2dbbc6

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-07-18 11:19:50 +02:00
jenkins
a938fb9b5c app-containers/syft: apply downstream changes
* pass additional ldflags so that `syft version` prints the package
  version.
* keyword stable for amd64 and arm64 (to reduce differences between the
  two).
2022-07-18 07:49:27 +00:00
jenkins
e995d9a4b1 app-containers/syft: Import from Gentoo
Upstream commit c691680319ac2f00f203533c3dca0b21ecf77f80
2022-07-18 07:49:22 +00:00
Flatcar Buildbot
d68ffc61cc sys-kernel: Upgrade Kernel 5.15.54 to 5.15.55 2022-07-16 07:22:06 +00:00
flatcar-ci
51f740a2a8 New version: main-3301.0.0-nightly-20220715-2100 2022-07-15 21:00:30 +00:00
Krzesimir Nowak
6dea2f8ae7 Merge pull request #2024 from flatcar-linux/linux-5.15.54-main
Upgrade Linux Kernel in main from 5.15.52 to 5.15.54
2022-07-15 16:03:41 +02:00
Jeremi Piotrowski
d3edc97063 build_image: use syft to generate SBOM for prod image
Since v0.51.0 syft supports generating parsing the gentoo package
database. This is a first go at integrating that into our image build
process. This doesn't yet include packages inside torcx packages, or the
kernel, or initramfs-only packages.
2022-07-15 11:52:33 +00:00