Skip to content

Commit a02df4a

Browse files
committed
refactor!: rework rootfs to be based on Ubuntu 24.04
1 parent 44ddfa4 commit a02df4a

32 files changed

+135
-9703
lines changed

.dockerignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 32 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,51 @@
11
name: Build
22
on: [push]
3-
env:
4-
TOOLCHAIN_REPOSITORY: cartesi/toolchain
5-
TOOLCHAIN_VERSION: 0.15.0
6-
CACHE_DIR: /home/runner/work/image-rootfs/image-rootfs/cache
7-
permissions:
8-
id-token: write
9-
packages: write
10-
contents: read
113
jobs:
124
build:
13-
runs-on: ubuntu-22.04
5+
runs-on: ubuntu-latest
146
steps:
15-
- uses: actions/checkout@v3
7+
- name: Install libarchive-tools
8+
run: |
9+
export DEBIAN_FRONTEND=noninteractive
10+
sudo apt-get update
11+
sudo apt-get install -y --no-install-recommends build-essential autoconf automake libarchive-dev libarchive-tools pandoc
12+
13+
# Building from source cause the provided debian package is for Debian Bookworm
14+
- name: Download, build and install xgenext2fs
15+
run: |
16+
wget https://github.com/cartesi/genext2fs/archive/refs/tags/v1.5.6.tar.gz
17+
echo "34bfc26a037def23b85b676912462a3d126a87ef15c66c212b3500650da44f9e v1.5.6.tar.gz" | sha256sum -c -
18+
tar -xzf v1.5.6.tar.gz
19+
cd genext2fs-1.5.6
20+
./autogen.sh
21+
./configure
22+
make
23+
sudo make install
24+
rm -rf genext2fs-1.5.6 v1.5.6.tar.gz
25+
- uses: actions/checkout@v4
1626
with:
1727
submodules: recursive
18-
fetch-depth: 0 # fetch tags
1928

20-
- name: Copy default Buildroot and Busybox config
21-
run: make init-config
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
2231

23-
- name: Resolve rootfs filename from Makefile
24-
run: echo ROOTFS_FILENAME="$(make rootfs-filename)" >> $GITHUB_ENV
32+
- name: Buildx setup
33+
uses: docker/setup-buildx-action@v3
2534

26-
- name: Docker meta
27-
id: docker_meta
28-
uses: docker/metadata-action@v4
29-
with:
30-
images: |
31-
ghcr.io/${{ github.repository_owner }}/rootfs
32-
docker.io/${{ github.repository_owner }}/rootfs,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/tags/v') }}
33-
tags: |
34-
type=ref,event=branch
35-
type=semver,pattern={{version}}
36-
37-
- name: Login to GitHub Container Registry
38-
uses: docker/login-action@v2
39-
with:
40-
registry: ghcr.io
41-
username: ${{ github.actor }}
42-
password: ${{ secrets.GITHUB_TOKEN }}
35+
- name: Build rootfs.ext2 artifact
36+
run: make build
4337

44-
- name: Login to Docker Hub
45-
uses: docker/login-action@v2
38+
- name: Upload artifacts
39+
uses: actions/upload-artifact@v4
4640
with:
47-
username: ${{ secrets.DOCKER_USERNAME }}
48-
password: ${{ secrets.DOCKER_PASSWORD }}
49-
50-
- name: Set up Depot CLI
51-
uses: depot/setup-action@v1
52-
53-
- name: Create distribution details
54-
run: make os-release
55-
56-
- name: Build docker image
57-
uses: depot/build-push-action@v1
58-
with:
59-
context: .
60-
platforms: linux/amd64,linux/arm64
61-
tags: cartesi/rootfs:devel
62-
push: false
63-
load: true
64-
build-args: |
65-
TOOLCHAIN_REPOSITORY=${{ env.TOOLCHAIN_REPOSITORY }}
66-
TOOLCHAIN_VERSION=${{ env.TOOLCHAIN_VERSION }}
67-
ROOTFS_FILENAME=${{ env.ROOTFS_FILENAME }}
68-
cache-from: type=gha,scope=regular
69-
cache-to: type=gha,mode=max,scope=regular
70-
project: ${{ vars.DEPOT_PROJECT }}
71-
72-
- name: Export rootfs.ext2 artifact
73-
run: make copy
74-
75-
- name: Export download cache
76-
run: make copy-br2-dl-cache CACHE_DIR=${{ env.CACHE_DIR }}
41+
if-no-files-found: error
42+
path: |
43+
rootfs.ext2
7744
7845
- uses: softprops/action-gh-release@v1
7946
if: startsWith(github.ref, 'refs/tags/v')
8047
with:
8148
prerelease: true
82-
files: rootfs-*.ext2
49+
files: rootfs.ext2
8350
env:
8451
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
85-
86-
- name: Push docker image
87-
uses: depot/build-push-action@v1
88-
with:
89-
context: .
90-
platforms: linux/amd64,linux/arm64
91-
tags: ${{ steps.docker_meta.outputs.tags }}
92-
push: true
93-
load: false
94-
build-args: |
95-
TOOLCHAIN_REPOSITORY=${{ env.TOOLCHAIN_REPOSITORY }}
96-
TOOLCHAIN_VERSION=${{ env.TOOLCHAIN_VERSION }}
97-
cache-from: type=gha,scope=regular
98-
cache-to: type=gha,mode=max,scope=regular
99-
project: ${{ vars.DEPOT_PROJECT }}

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
rootfs-*.ext2
2-
cartesi-buildroot-config
3-
cartesi-busybox-fragment
1+
rootfs.ext2
2+
rootfs.tar
3+

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Added
9+
- Installed many new cli applications for testing and debugging purposes
10+
11+
### Changed
12+
- Rework rootfs image to be based on Ubuntu 24.04 LTS
13+
- Update machine-guest-tools to v0.17.0
814

915
## [0.19.0] - 2023-10-13
1016
### Changed
@@ -101,25 +107,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
101107
- [0.2.0]
102108
- [0.1.0]
103109

104-
[Unreleased]: https://github.com/cartesi/image-rootfs/compare/v0.19.0...HEAD
105-
[0.19.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.19.0
106-
[0.18.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.18.0
107-
[0.17.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.17.0
108-
[0.16.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.16.0
109-
[0.15.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.15.0
110-
[0.14.1]: https://github.com/cartesi/image-rootfs/releases/tag/v0.14.1
111-
[0.14.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.14.0
112-
[0.13.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.13.0
113-
[0.12.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.12.0
114-
[0.11.1]: https://github.com/cartesi/image-rootfs/releases/tag/v0.11.1
115-
[0.11.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.11.0
116-
[0.10.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.10.0
117-
[0.9.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.9.0
118-
[0.8.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.8.0
119-
[0.7.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.7.0
120-
[0.6.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.6.0
121-
[0.5.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.5.0
122-
[0.4.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.4.0
123-
[0.3.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.3.0
124-
[0.2.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.2.0
125-
[0.1.0]: https://github.com/cartesi/image-rootfs/releases/tag/v0.1.0
110+
[Unreleased]: https://github.com/cartesi/machine-rootfs-image/compare/v0.19.0...HEAD
111+
[0.19.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.19.0
112+
[0.18.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.18.0
113+
[0.17.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.17.0
114+
[0.16.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.16.0
115+
[0.15.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.15.0
116+
[0.14.1]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.14.1
117+
[0.14.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.14.0
118+
[0.13.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.13.0
119+
[0.12.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.12.0
120+
[0.11.1]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.11.1
121+
[0.11.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.11.0
122+
[0.10.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.10.0
123+
[0.9.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.9.0
124+
[0.8.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.8.0
125+
[0.7.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.7.0
126+
[0.6.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.6.0
127+
[0.5.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.5.0
128+
[0.4.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.4.0
129+
[0.3.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.3.0
130+
[0.2.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.2.0
131+
[0.1.0]: https://github.com/cartesi/machine-rootfs-image/releases/tag/v0.1.0

Dockerfile

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)