├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── disabled │ └── qa-extra.yaml └── workflows │ ├── autobump.yml │ ├── cleanup.yml │ ├── desktop-genprovides.yml │ ├── images-dev.yml │ ├── images.yml │ └── qa_charts.yml ├── .gitignore ├── Makefile ├── README.md ├── packer ├── config.yaml ├── images.json └── vagrant.yaml ├── specs ├── community.yaml ├── cosmic-dev.yaml ├── fynedesk-dev.yaml ├── gnome-dev.yaml ├── gnome.yaml ├── kde-dev.yaml ├── kde.yaml ├── mate-dev.yaml ├── mate.yaml ├── maui-dev.yaml ├── micro-dev.yaml ├── micro-server.yaml ├── micro.yaml ├── minimal-dev.yaml ├── minimal.yaml ├── xfce-dev.yaml └── xfce.yaml └── tests ├── assets └── libtest.sh ├── go.mod ├── go.sum ├── graphics_test.go ├── smoke_test.go ├── tests_suite_test.go └── utils_test.go /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: mudler 7 | 8 | --- 9 | 10 | 11 | 12 | **Luet version:** 13 | 14 | 15 | **CPU architecture, OS, and Version:** 16 | 17 | 18 | **Describe the bug** 19 | 20 | 21 | **To Reproduce** 22 | 23 | 24 | **Expected behavior** 25 | 26 | 27 | **Logs** 28 | 29 | 30 | **Additional context** 31 | 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: mudler 7 | 8 | --- 9 | 10 | 11 | 12 | **Is your feature request related to a problem? Please describe.** 13 | 14 | 15 | **Describe the solution you'd like** 16 | 17 | 18 | **Describe alternatives you've considered** 19 | 20 | 21 | **Additional context** 22 | 23 | -------------------------------------------------------------------------------- /.github/disabled/qa-extra.yaml: -------------------------------------------------------------------------------- 1 | name: QA Mocaccino Smoke 2 | 3 | on: 4 | schedule: 5 | - cron: '* 1 * * *' 6 | 7 | jobs: 8 | generate-matrix-extra: 9 | name: Generate matrix for Mocaccino Extra 10 | runs-on: ubuntu-latest 11 | outputs: 12 | matrix: ${{ steps.set-matrix.outputs.matrix }} 13 | steps: 14 | - uses: actions/checkout@v2 15 | with: 16 | repository: MocaccinoOS/mocaccino-extra 17 | - name: Install deps 18 | env: 19 | PREVIOUS: ${{ github.event.before }} 20 | run: | 21 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 22 | sudo luet install repository/mocaccino-extra 23 | sudo luet install system/luet-extensions utils/jq 24 | - name: Set matrix for build 25 | id: set-matrix 26 | run: | 27 | JSON="{\"include\":" 28 | JSONline="$(luet tree pkglist --tree amd64 -t multi-arch -o json | jq -rc '.packages')" 29 | JSON="$JSON$JSONline" 30 | JSON="$JSON}" 31 | # Set output 32 | echo "::set-output name=matrix::$( echo "$JSON" )" 33 | 34 | generate-matrix-micro: 35 | name: Generate matrix for Mocaccino Micro 36 | runs-on: ubuntu-latest 37 | outputs: 38 | matrix: ${{ steps.set-matrix.outputs.matrix }} 39 | steps: 40 | - uses: actions/checkout@v2 41 | with: 42 | repository: MocaccinoOS/mocaccino-micro 43 | - name: Install deps 44 | env: 45 | PREVIOUS: ${{ github.event.before }} 46 | run: | 47 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 48 | sudo luet install repository/mocaccino-extra 49 | sudo luet install system/luet-extensions utils/jq 50 | - name: Set matrix for build 51 | id: set-matrix 52 | run: | 53 | JSON="{\"include\":" 54 | JSONline="$(luet tree pkglist --tree amd64 -t multi-arch -o json | jq -rc '.packages')" 55 | JSON="$JSON$JSONline" 56 | JSON="$JSON}" 57 | # Set output 58 | echo "::set-output name=matrix::$( echo "$JSON" )" 59 | test-extra: 60 | runs-on: ubuntu-latest 61 | needs: generate-matrix-extra 62 | strategy: 63 | matrix: ${{fromJson(needs.generate-matrix-extra.outputs.matrix)}} 64 | steps: 65 | - name: Install deps 66 | run: | 67 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 68 | sudo luet install repository/mocaccino-extra 69 | sudo luet install system/luet-extensions utils/charty 70 | - name: Test package 71 | continue-on-error: true 72 | env: 73 | PACKAGE: ${{ matrix.category }}/${{ matrix.name }} 74 | run: | 75 | charty start https://github.com/mocaccinoOS/mocaccino-charty/releases/download/v0.2.2/package-smoke-0.2.2.tar.gz --set "packages[0]=$PACKAGE" --set "debug=true" 76 | test-micro: 77 | runs-on: ubuntu-latest 78 | needs: generate-matrix-micro 79 | strategy: 80 | matrix: ${{fromJson(needs.generate-matrix-micro.outputs.matrix)}} 81 | steps: 82 | - name: Install deps 83 | run: | 84 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 85 | sudo luet install repository/mocaccino-extra 86 | sudo luet install system/luet-extensions utils/charty 87 | - name: Test package 88 | continue-on-error: true 89 | env: 90 | PACKAGE: ${{ matrix.category }}/${{ matrix.name }} 91 | run: | 92 | charty start https://github.com/mocaccinoOS/mocaccino-charty/releases/download/v0.2.2/package-smoke-0.2.2.tar.gz --set "packages[0]=$PACKAGE" --set "debug=true" 93 | -------------------------------------------------------------------------------- /.github/workflows/autobump.yml: -------------------------------------------------------------------------------- 1 | name: Marvin Autobump 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '0 0 */3 * *' 7 | jobs: 8 | bump: 9 | runs-on: ubuntu-latest 10 | env: 11 | GIT_AUTHOR_NAME: MarvinHatesOceans 12 | GIT_AUTHOR_EMAIL: github-bots@sabayon.com 13 | GIT_COMMITTER_NAME: MarvinHatesOceans 14 | GIT_COMMITTER_EMAIL: github-bots@sabayon.com 15 | WORK_BRANCH: bumps 16 | AUTO_GIT: true 17 | LUET_NOLOCK: true 18 | LUET_YES: true 19 | TOKEN: ${{ secrets.MARVIN_GITHUB_TOKEN }} 20 | GITHUB_PRIVATE_KEY: "${{ secrets.MARVIN_GITHUB_PRIVATE_KEY }}" 21 | GITHUB_PUBLIC_KEY: "${{ secrets.MARVIN_GITHUB_PUBLIC_KEY }}" 22 | HUB_CREDENTIALS: "${{ secrets.MARVIN_HUB_CREDENTIALS }}" 23 | strategy: 24 | fail-fast: false 25 | matrix: 26 | include: 27 | - upstream_branch: "master" 28 | fork: "git@github.com:auto-maintainers/repository-index.git" 29 | upstream_repo: "https://github.com/mocaccinoOS/repository-index" 30 | name: "Mocaccino Repository index" 31 | - upstream_branch: "master" 32 | fork: "git@github.com:auto-maintainers/luet-repo.git" 33 | upstream_repo: "https://github.com/Luet-lab/luet-repo" 34 | name: "Luet official repository" 35 | - upstream_branch: "master" 36 | fork: "git@github.com:auto-maintainers/mocaccino-extra.git" 37 | upstream_repo: "https://github.com/mocaccinoOS/mocaccino-extra" 38 | name: "Mocaccino Extra" 39 | # - upstream_branch: "master" 40 | # fork: "git@github.com:auto-maintainers/mocaccino-micro.git" 41 | # upstream_repo: "https://github.com/mocaccinoOS/mocaccino-micro" 42 | # name: "Mocaccino Micro" 43 | - upstream_branch: "master" 44 | fork: "git@github.com:auto-maintainers/desktop.git" 45 | upstream_repo: "https://github.com/mocaccinoOS/desktop" 46 | name: "Mocaccino Desktop" 47 | # - upstream_branch: "master" 48 | # fork: "git@github.com:auto-maintainers/mocaccino-musl-universe.git" 49 | # upstream_repo: "https://github.com/mocaccinoOS/mocaccino-musl-universe" 50 | # name: "Mocaccino Musl Universe" 51 | - upstream_branch: "master" 52 | fork: "git@github.com:auto-maintainers/kernel-repo.git" 53 | upstream_repo: "https://github.com/mocaccinoOS/kernel-repo" 54 | name: "Mocaccino Kernel repository" 55 | # - upstream_branch: "master" 56 | # fork: "git@github.com:auto-maintainers/mocaccino-stage3.git" 57 | # upstream_repo: "https://github.com/mocaccinoOS/mocaccino-stage3" 58 | # name: "Mocaccino stage3" 59 | steps: 60 | - env: 61 | HUB_ARGS: "-b ${{ matrix.upstream_branch }}" 62 | FORK_REPO: ${{ matrix.fork }} 63 | UPSTREAM_REPO: ${{ matrix.upstream_repo }} 64 | RESET_BRANCH: ${{ matrix.upstream_branch }} 65 | name: Autobump ${{matrix.name}} 66 | run: | 67 | sudo rm -rf /usr/local/bin/yq 68 | sudo apt-get install -y skopeo 69 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 70 | sudo luet install -y repository/mocaccino-extra 71 | sudo luet install -y system/luet-extensions system/luet-devkit utils/jq utils/yq vcs/hub 72 | mkdir -p $HOME/.ssh 73 | mkdir -p $HOME/.config 74 | echo "$GITHUB_PRIVATE_KEY" > $HOME/.ssh/id_rsa 75 | echo "$GITHUB_PUBLIC_KEY" > $HOME/.ssh/id_rsa.pub 76 | echo "$HUB_CREDENTIALS" > $HOME/.config/hub 77 | chmod 700 ~/.ssh 78 | chmod 600 ~/.ssh/id_rsa 79 | chmod 600 ~/.ssh/id_rsa.pub 80 | 81 | git clone $FORK_REPO fork 82 | cd fork 83 | git remote add upstream $UPSTREAM_REPO 84 | git fetch --all 85 | git reset --hard upstream/${RESET_BRANCH} 86 | git push -fv 87 | echo "Removing working branch if present" 88 | git branch -D $WORK_BRANCH || true 89 | 90 | git checkout -b $WORK_BRANCH 91 | git reset --hard upstream/${RESET_BRANCH} 92 | git push -fv -u origin $WORK_BRANCH 93 | make autobump 94 | -------------------------------------------------------------------------------- /.github/workflows/cleanup.yml: -------------------------------------------------------------------------------- 1 | name: Bucket cleanup 2 | 3 | on: 4 | schedule: 5 | - cron: '0 3 * * *' 6 | 7 | jobs: 8 | iso: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Install minio and login 12 | env: 13 | MINIO_API_URL: ${{ secrets.MINIO_API_URL }} 14 | MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} 15 | MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} 16 | run: | 17 | sudo wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/bin/mc 18 | sudo chmod +x /usr/bin/mc 19 | mc alias set minio $MINIO_API_URL $MINIO_ACCESS_KEY $MINIO_SECRET_KEY 20 | 21 | - name: Clean 🚀 22 | run: | 23 | mc find minio/mocaccino-iso --older-than 7d --exec "mc rm {}" 24 | 25 | packages: 26 | runs-on: ubuntu-latest 27 | strategy: 28 | matrix: 29 | include: 30 | - bucket: "mocaccino-extra" 31 | upstream_repo: "mocaccinoOS/mocaccino-extra" 32 | name: "Mocaccino Extra" 33 | tree_dir: "amd64 multi-arch" 34 | - bucket: "mocaccino-micro" 35 | upstream_repo: "mocaccinoOS/mocaccino-micro" 36 | name: "Mocaccino Micro" 37 | - bucket: "mocaccino-desktop" 38 | upstream_repo: "mocaccinoOS/desktop" 39 | name: "Mocaccino Desktop" 40 | - bucket: "mocaccino-musl-universe" 41 | upstream_repo: "mocaccinoOS/mocaccino-musl-universe" 42 | name: "Mocaccino Musl Universe" 43 | - bucket: "mocaccino-distfiles-collection" 44 | upstream_repo: "mocaccinoOS/distfiles-collection" 45 | name: "Mocaccino Distfiles collection" 46 | - bucket: "mocaccino-kernel" 47 | upstream_repo: "mocaccinoOS/kernel-repo" 48 | name: "Mocaccino Kernel repository" 49 | env: 50 | MINIO_API_URL: ${{ secrets.MINIO_API_URL }} 51 | MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} 52 | MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} 53 | BUCKET: ${{matrix.bucket}} 54 | TREE_DIR: ${{matrix.tree_dir}} 55 | steps: 56 | - uses: actions/checkout@v2 57 | with: 58 | repository: ${{matrix.upstream_repo}} 59 | - run: | 60 | git fetch --prune --unshallow 61 | - name: Installing dependencies 62 | run: | 63 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 64 | sudo luet install -y repository/mocaccino-extra-stable 65 | sudo luet install -y system/luet-extensions system/luet-devkit utils/jq net-fs/minio-client 66 | - name: Prune repository 🔧 67 | run: | 68 | BUILD_PHASE=false CREATE_REPO=false PRUNE_PHASE=true luet k8s-build-scheduler 69 | -------------------------------------------------------------------------------- /.github/workflows/desktop-genprovides.yml: -------------------------------------------------------------------------------- 1 | name: Marvin Provides generation for desktop 2 | 3 | on: 4 | schedule: 5 | - cron: '0 20 * * *' 6 | jobs: 7 | syncprovides: 8 | runs-on: ubuntu-latest 9 | env: 10 | GIT_AUTHOR_NAME: MarvinHatesOceans 11 | GIT_AUTHOR_EMAIL: github-bots@sabayon.com 12 | GIT_COMMITTER_NAME: MarvinHatesOceans 13 | GIT_COMMITTER_EMAIL: github-bots@sabayon.com 14 | WORK_BRANCH: genprovides 15 | AUTO_GIT: true 16 | LUET_NOLOCK: true 17 | LUET_YES: true 18 | TOKEN: ${{ secrets.MARVIN_GITHUB_TOKEN }} 19 | GITHUB_PRIVATE_KEY: "${{ secrets.MARVIN_GITHUB_PRIVATE_KEY }}" 20 | GITHUB_PUBLIC_KEY: "${{ secrets.MARVIN_GITHUB_PUBLIC_KEY }}" 21 | HUB_CREDENTIALS: "${{ secrets.MARVIN_HUB_CREDENTIALS }}" 22 | strategy: 23 | matrix: 24 | include: 25 | - upstream_branch: "master" 26 | fork: "git@github.com:auto-maintainers/desktop.git" 27 | upstream_repo: "https://github.com/mocaccinoOS/desktop" 28 | name: "Mocaccino Desktop" 29 | steps: 30 | - env: 31 | HUB_ARGS: "-b ${{ matrix.upstream_branch }}" 32 | FORK_REPO: ${{ matrix.fork }} 33 | UPSTREAM_REPO: ${{ matrix.upstream_repo }} 34 | RESET_BRANCH: ${{ matrix.upstream_branch }} 35 | name: Autobump ${{matrix.name}} 36 | run: | 37 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 38 | sudo luet install -y repository/mocaccino-extra 39 | sudo luet install -y dev-util/pkgs-checker-minimal system/luet-extensions system/luet-devkit utils/jq utils/yq vcs/hub 40 | mkdir -p $HOME/.ssh 41 | mkdir -p $HOME/.config 42 | echo "$GITHUB_PRIVATE_KEY" > $HOME/.ssh/id_rsa 43 | echo "$GITHUB_PUBLIC_KEY" > $HOME/.ssh/id_rsa.pub 44 | echo "$HUB_CREDENTIALS" > $HOME/.config/hub 45 | chmod 700 ~/.ssh 46 | chmod 600 ~/.ssh/id_rsa 47 | chmod 600 ~/.ssh/id_rsa.pub 48 | 49 | git clone $FORK_REPO fork 50 | cd fork 51 | git remote add upstream $UPSTREAM_REPO 52 | git fetch --all 53 | git reset --hard upstream/${RESET_BRANCH} 54 | git push -fv 55 | echo "Removing working branch if present" 56 | git branch -D $WORK_BRANCH || true 57 | 58 | git checkout -b $WORK_BRANCH 59 | git reset --hard upstream/${RESET_BRANCH} 60 | git push -fv -u origin $WORK_BRANCH 61 | ./scripts/generate_all_provides.sh 62 | git add packages 63 | git commit -m "Update layer provides" 64 | git push -f -v origin $WORK_BRANCH 65 | hub pull-request $HUB_ARGS -m "$(git log -1 --pretty=%B)" 66 | -------------------------------------------------------------------------------- /.github/workflows/images-dev.yml: -------------------------------------------------------------------------------- 1 | name: Labs ISO building 2 | concurrency: 3 | group: ci-dev-${{ github.head_ref || github.ref }}-${{ github.repository }} 4 | cancel-in-progress: true 5 | on: 6 | workflow_dispatch: 7 | push: 8 | paths: 9 | - 'conf/**' 10 | - 'specs/**' 11 | - 'scripts/**' 12 | - '.github/workflows/**' 13 | - 'Makefile' 14 | - 'tests/**' 15 | pull_request: 16 | paths: 17 | - 'conf/**' 18 | - 'specs/**' 19 | - 'scripts/**' 20 | - '.github/workflows/**' 21 | - 'tests/**' 22 | - 'Makefile' 23 | schedule: 24 | - cron: '0 1 * * *' 25 | create: 26 | tags: 27 | - v* 28 | jobs: 29 | iso: 30 | runs-on: ubuntu-latest 31 | strategy: 32 | fail-fast: false 33 | matrix: 34 | include: 35 | # - spec: "micro" 36 | # name: "Mocaccino Micro" 37 | - spec: "fynedesk-dev" 38 | name: "Mocaccino Fynedesk Development version" 39 | - spec: "cosmic-dev" 40 | name: "Mocaccino Cosmic Development version" 41 | # - spec: "maui-dev" 42 | # name: "Mocaccino Maui Development version" 43 | # - spec: "micro-dev" 44 | # name: "Mocaccino Micro Development version" 45 | - spec: "mate-dev" 46 | name: "Mocaccino MATE Desktop Development version" 47 | - spec: "gnome-dev" 48 | name: "Mocaccino GNOME Desktop Development version" 49 | - spec: "kde-dev" 50 | name: "Mocaccino KDE Desktop Development version" 51 | - spec: "xfce-dev" 52 | name: "Mocaccino XFCE Desktop Development version" 53 | steps: 54 | - uses: actions/checkout@v4 55 | - uses: fkirc/skip-duplicate-actions@master 56 | - name: Install Luet and deps 🔧 57 | run: | 58 | sudo apt-get install -y xorriso squashfs-tools dosfstools 59 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 60 | sudo luet install -y repository/mocaccino-extra 61 | sudo luet install -y utils/jq utils/yq extension/makeiso 62 | - name: ${{matrix.name}} ISO Build 🔧 63 | env: 64 | LUET_NOLOCK: "true" 65 | LUET_CONFIG_PROTECT_SKIP: "true" 66 | SPEC: ${{matrix.spec}} 67 | run: | 68 | sudo -E HTTP_TIMEOUT="900" luet-makeiso specs/$SPEC.yaml 69 | mkdir isobuild 70 | mv *.iso *.sha256 isobuild/ 71 | - uses: actions/upload-artifact@v4 72 | with: 73 | name: mOS-${{ matrix.spec }}.iso.zip 74 | path: | 75 | isobuild/*.iso 76 | isobuild/*.sha256 77 | test-iso: 78 | runs-on: ubuntu-latest 79 | strategy: 80 | fail-fast: false 81 | matrix: 82 | include: 83 | - spec: "minimal-dev" 84 | name: "Mocaccino Desktop Minimal Development version" 85 | steps: 86 | - uses: actions/checkout@v4 87 | - uses: fkirc/skip-duplicate-actions@master 88 | - name: Install Luet and deps 🔧 89 | run: | 90 | sudo apt-get install -y xorriso squashfs-tools dosfstools 91 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 92 | sudo luet install -y repository/mocaccino-extra 93 | sudo luet install -y utils/jq utils/yq extension/makeiso 94 | - name: ${{matrix.name}} ISO Build 🔧 95 | env: 96 | LUET_NOLOCK: "true" 97 | LUET_CONFIG_PROTECT_SKIP: "true" 98 | SPEC: ${{matrix.spec}} 99 | run: | 100 | sudo -E HTTP_TIMEOUT="900" luet-makeiso specs/$SPEC.yaml 101 | mkdir isobuild 102 | mv *.iso *.sha256 isobuild/ 103 | - uses: actions/upload-artifact@v4 104 | with: 105 | name: mOS-${{ matrix.spec }}.iso.zip 106 | path: | 107 | isobuild/*.iso 108 | isobuild/*.sha256 109 | 110 | 111 | vbox-vagrant: 112 | runs-on: macos-15 113 | needs: test-iso 114 | strategy: 115 | matrix: 116 | include: 117 | - spec: "minimal-dev" 118 | flavor: "Minimal-dev" 119 | steps: 120 | - uses: actions/checkout@v4 121 | - name: Download ISO 122 | uses: actions/download-artifact@v4 123 | with: 124 | name: mOS-${{ matrix.spec }}.iso.zip 125 | - name: Install deps 126 | run: | 127 | brew tap hashicorp/tap 128 | brew install hashicorp/tap/packer 129 | - name: Build VBox Image 🔧 130 | run: | 131 | packer plugins install github.com/hashicorp/virtualbox 132 | packer plugins install github.com/hashicorp/vagrant 133 | build=$(date +%Y%m%d) 134 | PACKER_ARGS="-var='sleep=5m' -var='vagrant=true' -var=build=$build -var='flavor=${{ matrix.flavor }}' -only virtualbox-iso" make packer 135 | ls packer 136 | - uses: actions/upload-artifact@v4 137 | with: 138 | name: mOS-${{ matrix.spec }}.box 139 | path: | 140 | packer/*.box 141 | 142 | tests: 143 | runs-on: macos-latest 144 | needs: vbox-vagrant 145 | strategy: 146 | matrix: 147 | include: 148 | - spec: "minimal-dev" 149 | flavor: "Minimal-dev" 150 | steps: 151 | - name: Install Go 152 | uses: actions/setup-go@v4 153 | with: 154 | go-version: '^1.16' 155 | - uses: actions/checkout@v4 156 | - name: Download vagrant box 157 | uses: actions/download-artifact@v4 158 | with: 159 | name: mOS-${{ matrix.spec }}.box 160 | path: packer 161 | - name: Run tests 🔧 162 | run: | 163 | go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.1.3 164 | make test 165 | 166 | # release: 167 | # if: startsWith(github.ref, 'refs/tags/') 168 | # runs-on: ubuntu-latest 169 | # needs: tests 170 | # strategy: 171 | # matrix: 172 | # include: 173 | # - spec: "micro" 174 | # name: "Mocaccino Micro" 175 | # steps: 176 | # - uses: actions/checkout@v4 177 | # - name: Download ISO 178 | # uses: actions/download-artifact@v4 179 | # with: 180 | # name: mOS-${{ matrix.spec }}.iso.zip 181 | # path: release 182 | # - name: Download vagrant box 183 | # uses: actions/download-artifact@v4 184 | # with: 185 | # name: mOS-${{ matrix.spec }}.box 186 | # path: release 187 | # - name: Download vagrant box 188 | # uses: actions/download-artifact@v4 189 | # with: 190 | # name: mOS-${{ matrix.spec }}.ova 191 | # path: release 192 | # - name: Download vagrant box 193 | # uses: actions/download-artifact@v4 194 | # with: 195 | # name: mOS-${{ matrix.spec }}.qcow 196 | # path: release 197 | # - name: Release 198 | # uses: fnkr/github-action-ghr@v1 199 | # if: startsWith(github.ref, 'refs/tags/') 200 | # env: 201 | # GHR_PATH: release/ 202 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 203 | # GHR_COMPRESS: xz 204 | -------------------------------------------------------------------------------- /.github/workflows/images.yml: -------------------------------------------------------------------------------- 1 | name: Iso building 2 | concurrency: 3 | group: ci-${{ github.head_ref || github.ref }}-${{ github.repository }} 4 | cancel-in-progress: true 5 | on: 6 | workflow_dispatch: 7 | push: 8 | paths: 9 | - 'conf/**' 10 | - 'specs/**' 11 | - 'scripts/**' 12 | - '.github/workflows/**' 13 | branches: [ master, develop ] 14 | pull_request: 15 | paths: 16 | - 'conf/**' 17 | - 'specs/**' 18 | - 'scripts/**' 19 | - '.github/workflows/**' 20 | branches: [ master, develop ] 21 | schedule: 22 | - cron: '0 1 * * *' 23 | create: 24 | tags: 25 | - v* 26 | jobs: 27 | iso: 28 | runs-on: ubuntu-latest 29 | strategy: 30 | fail-fast: false 31 | matrix: 32 | include: 33 | # - spec: "micro" 34 | # name: "Mocaccino Micro" 35 | # - spec: "micro-dev" 36 | # name: "Mocaccino Micro Development version" 37 | - spec: "community" 38 | name: "Mocaccino Community Desktop" 39 | - spec: "gnome" 40 | name: "Mocaccino GNOME Desktop" 41 | - spec: "mate" 42 | name: "Mocaccino MATE Desktop" 43 | - spec: "kde" 44 | name: "Mocaccino KDE Desktop" 45 | - spec: "xfce" 46 | name: "Mocaccino XFCE Desktop" 47 | - spec: "minimal" 48 | name: "Mocaccino Desktop Minimal" 49 | steps: 50 | - uses: actions/checkout@v4 51 | - uses: fkirc/skip-duplicate-actions@master 52 | - name: Install Luet and deps 🔧 53 | run: | 54 | sudo apt-get install -y xorriso squashfs-tools dosfstools 55 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 56 | sudo luet install -y repository/mocaccino-extra 57 | sudo luet install -y utils/jq utils/yq extension/makeiso 58 | - name: ${{matrix.name}} ISO Build 🔧 59 | env: 60 | LUET_NOLOCK: "true" 61 | LUET_CONFIG_PROTECT_SKIP: "true" 62 | SPEC: ${{matrix.spec}} 63 | run: | 64 | sudo -E HTTP_TIMEOUT="900" luet-makeiso specs/$SPEC.yaml 65 | mkdir isobuild 66 | mv *.iso *.sha256 isobuild/ 67 | - uses: actions/upload-artifact@v4 68 | with: 69 | name: mOS-${{ matrix.spec }}.iso.zip 70 | path: | 71 | isobuild/*.iso 72 | isobuild/*.sha256 73 | 74 | # qemu: 75 | # runs-on: ubuntu-latest 76 | # needs: iso 77 | 78 | # strategy: 79 | # matrix: 80 | # include: 81 | # - spec: "minimal" 82 | # flavor: "Minimal" 83 | # steps: 84 | # - uses: actions/checkout@v4 85 | # - name: Download ISO 86 | # uses: actions/download-artifact@v4 87 | # with: 88 | # name: mOS-${{ matrix.spec }}.iso.zip 89 | 90 | # - name: Install deps 91 | # run: | 92 | # sudo apt-get update 93 | # sudo apt-get install -y qemu qemu-system qemu-kvm 94 | # sudo -E make deps 95 | # sudo luet install -y utils/packer 96 | # - name: Build QEMU Image 🔧 97 | # run: | 98 | # build=$(date +%Y%m%d) 99 | # PACKER_ARGS="-var='accellerator=none' -var='sleep=5m' -var=build=$build -var='flavor=${{ matrix.flavor }}' -only qemu" make packer 100 | # - uses: actions/upload-artifact@v4 101 | # with: 102 | # name: mOS-${{ matrix.spec }}.qcow 103 | # path: | 104 | # packer/*.tar.gz 105 | 106 | vbox: 107 | runs-on: macos-latest 108 | needs: iso 109 | strategy: 110 | matrix: 111 | include: 112 | - spec: "minimal" 113 | flavor: "Minimal" 114 | steps: 115 | - uses: actions/checkout@v4 116 | - name: Download ISO 117 | uses: actions/download-artifact@v4 118 | with: 119 | name: mOS-${{ matrix.spec }}.iso.zip 120 | 121 | - name: Install deps 122 | run: | 123 | brew tap hashicorp/tap 124 | brew install hashicorp/tap/packer 125 | - name: Build VBox Image 🔧 126 | run: | 127 | packer plugins install github.com/hashicorp/virtualbox 128 | packer plugins install github.com/hashicorp/vagrant 129 | build=$(date +%Y%m%d) 130 | PACKER_ARGS="-var='sleep=5m' -only virtualbox-iso -var=build=$build -var='flavor=${{ matrix.flavor }}'" make packer 131 | ls packer 132 | - uses: actions/upload-artifact@v4 133 | with: 134 | name: mOS-${{ matrix.spec }}.ova 135 | path: | 136 | packer/*.tar.gz 137 | 138 | vbox-vagrant: 139 | runs-on: macos-latest 140 | needs: iso 141 | strategy: 142 | matrix: 143 | include: 144 | - spec: "minimal" 145 | flavor: "Minimal" 146 | steps: 147 | - uses: actions/checkout@v4 148 | - name: Download ISO 149 | uses: actions/download-artifact@v4 150 | with: 151 | name: mOS-${{ matrix.spec }}.iso.zip 152 | - name: Install deps 153 | run: | 154 | brew tap hashicorp/tap 155 | brew install hashicorp/tap/packer 156 | - name: Build VBox Image 🔧 157 | run: | 158 | packer plugins install github.com/hashicorp/virtualbox 159 | packer plugins install github.com/hashicorp/vagrant 160 | build=$(date +%Y%m%d) 161 | PACKER_ARGS="-var='sleep=5m' -var='vagrant=true' -var=build=$build -var='flavor=${{ matrix.flavor }}' -only virtualbox-iso" make packer 162 | ls packer 163 | - uses: actions/upload-artifact@v4 164 | with: 165 | name: mOS-${{ matrix.spec }}.box 166 | path: | 167 | packer/*.box 168 | 169 | tests: 170 | runs-on: macos-latest 171 | needs: vbox-vagrant 172 | strategy: 173 | matrix: 174 | include: 175 | - spec: "minimal" 176 | flavor: "Minimal" 177 | steps: 178 | - name: Install Go 179 | uses: actions/setup-go@v2 180 | with: 181 | go-version: '^1.16' 182 | - uses: actions/checkout@v4 183 | - name: Download vagrant box 184 | uses: actions/download-artifact@v4 185 | with: 186 | name: mOS-${{ matrix.spec }}.box 187 | path: packer 188 | 189 | - name: Run tests 🔧 190 | run: | 191 | go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.1.3 192 | make test 193 | 194 | release: 195 | if: startsWith(github.ref, 'refs/tags/') 196 | runs-on: ubuntu-latest 197 | needs: iso 198 | strategy: 199 | matrix: 200 | include: 201 | - spec: "gnome" 202 | name: "Mocaccino GNOME Desktop" 203 | - spec: "mate" 204 | name: "Mocaccino MATE Desktop" 205 | - spec: "kde" 206 | name: "Mocaccino KDE Desktop" 207 | - spec: "xfce" 208 | name: "Mocaccino XFCE Desktop" 209 | - spec: "minimal" 210 | name: "Mocaccino Minimal Desktop" 211 | steps: 212 | - uses: actions/checkout@v4 213 | - name: Download ISO 214 | uses: actions/download-artifact@v4 215 | with: 216 | name: mOS-${{ matrix.spec }}.iso.zip 217 | path: release 218 | - name: Release 219 | uses: fnkr/github-action-ghr@v1 220 | if: startsWith(github.ref, 'refs/tags/') 221 | env: 222 | GHR_PATH: release/ 223 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 224 | GHR_COMPRESS: xz 225 | -------------------------------------------------------------------------------- /.github/workflows/qa_charts.yml: -------------------------------------------------------------------------------- 1 | name: QA Charts 2 | 3 | on: 4 | schedule: 5 | - cron: '0 20 * * *' 6 | jobs: 7 | qa: 8 | runs-on: ubuntu-latest 9 | env: 10 | LUET_NOLOCK: true 11 | LUET_YES: true 12 | MINIO_API_URL: ${{ secrets.MINIO_API_URL }} 13 | MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} 14 | MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} 15 | strategy: 16 | matrix: 17 | include: 18 | - url: "https://github.com/mocaccinoOS/mocaccino-charty/releases/download/v0.3.1/artifact-qa-0.3.tar.gz" 19 | from_repo: true 20 | repo: "https://github.com/mocaccinoOS/mocaccino-charty" 21 | chartpath: "testcharts/artifact-qa" 22 | name: "File conflicts in MocaccinoOS Desktop" 23 | args: > 24 | --set packages_dir=/repo 25 | --set luet_version=0.10.2 26 | --set features.verify_fileconflicts=true 27 | bucket: 28 | enabled: true 29 | name: "mocaccino-desktop" 30 | dest: "/repo" 31 | steps: 32 | - name: QA ${{matrix.name}} 33 | env: 34 | BUCKET_ENABLED: "${{matrix.bucket.enabled}}" 35 | BUCKET_DIR: "${{matrix.bucket.dest}}" 36 | BUCKET_NAME: "${{matrix.bucket.name}}" 37 | FROM_REPO: "${{matrix.from_repo}}" 38 | CHART_URL: "${{matrix.url}}" 39 | CHART_ARGS: "${{matrix.args}}" 40 | CHART_PATH: "${{matrix.chartpath}}" 41 | CHART_REPO: "${{matrix.repo}}" 42 | run: | 43 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh 44 | sudo luet install -y repository/mocaccino-extra 45 | sudo luet install -y system/luet-extensions system/luet-devkit net-fs/minio-client utils/jq utils/yq utils/charty 46 | 47 | if [[ "${BUCKET_ENABLED}" == "true" ]]; then 48 | mc alias set minio-ci $MINIO_API_URL $MINIO_ACCESS_KEY $MINIO_SECRET_KEY 49 | sudo mkdir -p $BUCKET_DIR 50 | sudo chmod 777 $BUCKET_DIR 51 | mc mirror --exclude '*.gz' --exclude '*.zstd' --exclude '*.zst' minio-ci/$BUCKET_NAME/ $BUCKET_DIR 52 | fi 53 | if [[ "${FROM_REPO}" == "true" ]]; then 54 | git clone $CHART_REPO chart 55 | charty start chart/$CHART_PATH $CHART_ARGS 56 | else 57 | charty start $CHART_URL $CHART_ARGS 58 | fi 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | isowork/ 2 | *.swp 3 | vars.yaml 4 | .qemu -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | export ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) 2 | export ISO?=$(ROOT_DIR)/$(shell ls *.iso) 3 | 4 | deps: 5 | ifneq ($(shell id -u), 0) 6 | @echo "You must be root to perform this action." 7 | exit 1 8 | endif 9 | curl https://get.mocaccino.org/luet/get_luet_root.sh | sh 10 | luet install -y repository/mocaccino-extra-stable 11 | luet install -y utils/jq utils/yq system/luet-devkit 12 | 13 | # QEMU 14 | 15 | $(ROOT_DIR)/.qemu: 16 | mkdir -p $(ROOT_DIR)/.qemu 17 | 18 | $(ROOT_DIR)/.qemu/drive.img: $(ROOT_DIR)/.qemu 19 | qemu-img create -f qcow2 $(ROOT_DIR)/.qemu/drive.img 16g 20 | 21 | run-qemu: $(ROOT_DIR)/.qemu/drive.img 22 | $(QEMU) \ 23 | -m $(QEMU_MEMORY) \ 24 | -cdrom $(ISO) \ 25 | -nographic \ 26 | -serial mon:stdio \ 27 | -rtc base=utc,clock=rt \ 28 | -chardev socket,path=$(ROOT_DIR)/.qemu/qga.sock,server,nowait,id=qga0 \ 29 | -device virtio-serial \ 30 | -hda $(ROOT_DIR)/.qemu/drive.img $(QEMU_ARGS) 31 | 32 | # Packer 33 | 34 | .PHONY: packer 35 | packer: 36 | cd $(ROOT_DIR)/packer && packer build -var "iso=$(ISO)" $(PACKER_ARGS) images.json 37 | 38 | # Tests 39 | 40 | prepare-test: 41 | vagrant box add mocaccino packer/*.box 42 | vagrant up || true 43 | 44 | Vagrantfile: 45 | vagrant init mocaccino 46 | 47 | test-clean: 48 | vagrant destroy || true 49 | vagrant box remove mocaccino || true 50 | 51 | test: test-clean Vagrantfile prepare-test 52 | cd $(ROOT_DIR)/tests && ginkgo -timeout 30m -r ./... 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mocaccino-ci 2 | 3 | ![MocaccinoOS Micro](https://github.com/mocaccinoOS/ci/workflows/MocaccinoOS%20Micro/badge.svg) 4 | ![MocaccinoOS GNOME](https://github.com/mocaccinoOS/ci/workflows/MocaccinoOS%20GNOME/badge.svg) 5 | 6 | 7 | ![MocaccinoOS MATE](https://github.com/mocaccinoOS/ci/workflows/MocaccinoOS%20MATE/badge.svg) 8 | ![MocaccinoOS KDE](https://github.com/mocaccinoOS/ci/workflows/MocaccinoOS%20KDE/badge.svg) 9 | 10 | This repository contains GitHub Actions to build MocaccinoOS ISOs. 11 | 12 | The [CI](https://www.linux.com/news/what-cicd-0) will deploy from master the iso built in the [mocaccino minio instance](https://get.mocaccino.org/minio/mocaccino-iso). 13 | 14 | 15 | ## Flavors 16 | 17 | Each flavor is composed by packages coming from multiple repositories, here is a short summary. 18 | 19 | | Flavor | [Mocaccino Micro Repository](https://github.com/mocaccinoOS/mocaccino-micro) | [Mocaccino Extra Repository](https://github.com/mocaccinoOS/mocaccino-extra) | [Mocaccino Desktop Repository](https://github.com/mocaccinoOS/desktop/tree/master/packages) | [LiveCD Repository](https://github.com/Luet-lab/livecd-specs) | [Luet Official Repository](https://github.com/Luet-lab/luet-repo) | 20 | |--------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|---------------------------------------------------------------|-------------------------------------------------------------------| 21 | | [Micro](https://github.com/mocaccinoOS/ci/blob/master/specs/micro.yaml) ([conf](https://github.com/mocaccinoOS/ci/blob/master/conf/luet-micro.yaml)) | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | 22 | | [GNOME](https://github.com/mocaccinoOS/ci/blob/master/specs/gnome.yaml) ([conf](https://github.com/mocaccinoOS/ci/blob/master/conf/luet-desktop.yaml)) | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 23 | | [MATE](https://github.com/mocaccinoOS/ci/blob/master/specs/mate.yaml) ([conf](https://github.com/mocaccinoOS/ci/blob/master/conf/luet-desktop.yaml)) | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 24 | | [KDE](https://github.com/mocaccinoOS/ci/blob/master/specs/kde.yaml) ([conf](https://github.com/mocaccinoOS/ci/blob/master/conf/luet-desktop.yaml)) | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 25 | | [XFCE](https://github.com/mocaccinoOS/ci/blob/master/specs/xfce.yaml) ([conf](https://github.com/mocaccinoOS/ci/blob/master/conf/luet-desktop.yaml)) | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | 26 | 27 | 28 | ## ISO specs 29 | 30 | Each ISO has a corresponding spec that defines which packages and [luet](https://github.com/mudler/luet) repositories are required to build the ISO. 31 | 32 | The specs are under the `spec/` folder. Here is an example: 33 | 34 | ```yaml 35 | packages: 36 | # Packages to be installed in the rootfs 37 | rootfs: 38 | - utils/busybox 39 | # Packages to be installed in the uefi image 40 | uefi: 41 | - live/systemd-boot 42 | - system/mocaccino-live-boot 43 | # Packages to be installed in the isoimage 44 | isoimage: 45 | - live/syslinux 46 | - system/mocaccino-live-boot 47 | # Packages to be installed in the initramfs 48 | initramfs: 49 | - distro/mocaccino-initramfs 50 | 51 | # This configuration isn't necessarly required. You can also just specify the repository to be used in the luet configuration file 52 | repository: 53 | packages: 54 | - repository/mocaccino-micro 55 | - repository/mocaccino-musl-universe 56 | initramfs: 57 | - repository/mocaccino-micro 58 | 59 | # Optionally, you can specify initramfs/kernel and avoid generation on-the-fly 60 | # files must be present on /boot folder in either initramfs or rootfs 61 | initramfs: 62 | kernel_file: "bzImage" 63 | rootfs_file: "rootfs.cpio.xz" 64 | 65 | # Use overlayfs to mount the rootfs. If disabled, only the initramfs will be booted. 66 | overlay: "true" 67 | 68 | # Image prefix. If Image date is disabled is used as the full title. 69 | image_prefix: "MocaccinoOS-Micro-0." 70 | image_date: "true" 71 | 72 | # Luet config to use. 73 | # It has to contain the repositories required to install the packages defined above. 74 | luet: 75 | config: conf/luet-micro.yaml 76 | ``` 77 | 78 | Each spec defines which packages to be installed from [luet](https://github.com/mudler/luet) repositories. A config file for each spec has to be provided and placed in `conf/`. 79 | 80 | To build the iso, you need to run `luet makeiso` for e.g. 81 | 82 | ```bash 83 | $> git clone https://github.com/mocaccinoOS/ci.git mocaccino-ci 84 | $> cd mocaccino-ci 85 | $> luet makeiso specs/micro.yaml 86 | ``` 87 | 88 | `luet makeiso` can be installed with `luet install extension/makeiso` after [Luet official repository](https://github.com/Luet-lab/luet-repo) repositories are enabled in the system. 89 | 90 | ## Local Requirements 91 | 92 | When running it locally, you need these tools installed: 93 | 94 | - [luet](https://github.com/mudler/luet) 95 | - luet-makeiso 96 | - xorriso (provided by the dev-libs/libisoburn package in Gentoo/Sabayon) 97 | - squashfs-tools 98 | 99 | e.g. the CI installs them as the following: 100 | 101 | ```bash 102 | $> sudo apt-get install -y xorriso squashfs-tools dosfstools 103 | $> curl https://gist.githubusercontent.com/mudler/8b8d6c53c4669f4b9f9a72d1a2b92172/raw/e9d38b8e0702e7f1ef9a5db1bfa428add12a2d24/get_luet_root.sh | sudo sh 104 | $> sudo luet install repository/mocaccino-extra 105 | $> sudo luet install utils/jq utils/yq 106 | ``` 107 | -------------------------------------------------------------------------------- /packer/config.yaml: -------------------------------------------------------------------------------- 1 | # stages: 2 | # boot: 3 | # - name: "Setup users" 4 | # ensure_entities: 5 | # - path: /etc/passwd 6 | # entity: | 7 | # kind: "user" 8 | # username: "vagrant" 9 | # password: "x" 10 | # homedir: "/run/tmp/vagrant" 11 | # shell: "/bin/bash" 12 | # - path: /etc/shadow 13 | # entity: | 14 | # kind: "shadow" 15 | # username: "vagrant" 16 | # password: "" 17 | # commands: 18 | # - mkdir -p /run/tmp/vagrant 19 | # - name: "Setup pubkey" 20 | # authorized_keys: 21 | # vagrant: 22 | # - | 23 | # ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key 24 | 25 | -------------------------------------------------------------------------------- /packer/images.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "boot_wait": "{{user `sleep`}}", 5 | "disk_size": "{{user `disk_size`}}", 6 | "guest_additions_mode": "disable", 7 | "guest_os_type": "MocaccinoOS", 8 | "headless": true, 9 | "iso_url": "{{user `iso`}}", 10 | "memory": 1024, 11 | "iso_checksum": "none", 12 | "shutdown_command": "shutdown -hP now", 13 | "ssh_password": "{{user `root_password`}}", 14 | "ssh_username": "{{user `root_username`}}", 15 | "format": "ova", 16 | "ssh_timeout": "1m", 17 | "ssh_handshake_attempts": "20", 18 | "type": "virtualbox-iso", 19 | "vm_name": "MocaccinoOS" 20 | }, 21 | { 22 | "boot_wait": "{{user `sleep`}}", 23 | "disk_interface": "ide", 24 | "disk_size": "{{user `disk_size`}}", 25 | "format": "qcow2", 26 | "accelerator": "{{user `accelerator`}}", 27 | "headless": true, 28 | "iso_url": "{{user `iso`}}", 29 | "iso_checksum": "none", 30 | "qemuargs": [ 31 | [ 32 | "-m", 33 | "8192M" 34 | ] 35 | ], 36 | "shutdown_command": "shutdown -hP now", 37 | "ssh_password": "{{user `root_password`}}", 38 | "ssh_timeout": "1m", 39 | "ssh_handshake_attempts": "20", 40 | "ssh_username": "{{user `root_username`}}", 41 | "type": "qemu", 42 | "vm_name": "MocaccinoOS" 43 | } 44 | ], 45 | "description": "MocaccinoOS", 46 | "post-processors": [ 47 | { 48 | "only": [ 49 | "virtualbox-iso", 50 | "qemu" 51 | ], 52 | "output": "MocaccinoOS_{{user `build`}}_{{user `arch`}}_{{user `flavor`}}.box", 53 | "type": "vagrant" 54 | }, 55 | { 56 | "only": [ 57 | "virtualbox-iso", 58 | "qemu" 59 | ], 60 | "output": "MocaccinoOS_{{user `build`}}_{{user `arch`}}_{{user `flavor`}}.tar.gz", 61 | "type": "compress" 62 | } 63 | ], 64 | "provisioners": [ 65 | { 66 | "destination": "/vagrant.yaml", 67 | "source": "vagrant.yaml", 68 | "type": "file" 69 | }, 70 | { 71 | "destination": "/config.yaml", 72 | "source": "config.yaml", 73 | "type": "file" 74 | }, 75 | { 76 | "inline": [ 77 | "AUTOMATED_INSTALL=true /usr/sbin/mocaccino-unattended-installer", 78 | "if [ ! -d /mnt/mocaccino/etc/yip.d/ ] ; then mkdir -p /mnt/mocaccino/etc/yip.d/; fi", 79 | "if [ {{user `vagrant`}} == true ]; then cp -rf /vagrant.yaml /mnt/mocaccino/etc/yip.d/vagrant.yaml; fi", 80 | "cp -rf /config.yaml /mnt/mocaccino/etc/yip.d/config.yaml" 81 | ], 82 | "pause_after": "30s", 83 | "type": "shell" 84 | } 85 | ], 86 | "variables": { 87 | "arch": "amd64", 88 | "build": "dev", 89 | "disk_size": "50000", 90 | "flavor": "Micro", 91 | "root_password": "mocaccino", 92 | "root_username": "root", 93 | "iso": "", 94 | "sleep": "120s", 95 | "accellerator": "kvm", 96 | "vagrant": "false" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /packer/vagrant.yaml: -------------------------------------------------------------------------------- 1 | stages: 2 | boot: 3 | - name: "Setup users" 4 | ensure_entities: 5 | - path: /etc/passwd 6 | entity: | 7 | kind: "user" 8 | username: "vagrant" 9 | password: "x" 10 | homedir: "/run/tmp/vagrant" 11 | shell: "/bin/bash" 12 | - path: /etc/shadow 13 | entity: | 14 | kind: "shadow" 15 | username: "vagrant" 16 | password: "" 17 | commands: 18 | - mkdir -p /run/tmp/vagrant 19 | - name: "Setup pubkey" 20 | authorized_keys: 21 | vagrant: 22 | - | 23 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key 24 | 25 | -------------------------------------------------------------------------------- /specs/community.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | - layers/xfce 10 | - system-profile/default-systemd 11 | - system/luet 12 | - system/luet-extensions 13 | - utils/yip 14 | - utils/yip-systemd 15 | - app-admin/calamares 16 | - system/mocaccino-calamares 17 | - init/mocaccino-skel 18 | - system/mocaccino-init 19 | - system/mocaccino-wallpaper 20 | - system/mocaccino-grub-splash 21 | - themes/mocaccino-plymouth 22 | - mocaccino/live-setup 23 | - mocaccino-release/desktop 24 | - sys-kernel/mocaccino-dracut 25 | - apps/lightdm 26 | - apps/gparted 27 | - apps/firefox 28 | - apps/vim 29 | - apps/btop 30 | - apps/neofetch 31 | - apps/steam 32 | # Community specific packages 33 | - apps/gimp 34 | - apps/libreoffice 35 | uefi: 36 | - live/systemd-boot 37 | - system/mocaccino-live-boot 38 | isoimage: 39 | - live/syslinux 40 | - system/mocaccino-live-boot 41 | 42 | # Repositories packages from repository-index 43 | repository: 44 | packages: 45 | - repository/luet 46 | - repository/livecd 47 | - repository/mocaccino-extra-stable 48 | - repository/mocaccino-desktop-stable 49 | - repository/mocaccino-community-stable 50 | - repository/mocaccino-os-commons-stable 51 | - repository/mocaccino-repository-index 52 | 53 | initramfs: 54 | kernel_file: "bzImage" 55 | rootfs_file: "Initrd" 56 | 57 | 58 | image_prefix: "MocaccinoOS-community-0." 59 | label: "MOCACCINOOS_COMMUNITY" 60 | image_date: true 61 | 62 | luet: 63 | repositories: 64 | - name: "mocaccino-repository-index" 65 | description: "MocaccinoOS Repository index" 66 | type: "http" 67 | enable: true 68 | cached: true 69 | priority: 1 70 | urls: 71 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 72 | -------------------------------------------------------------------------------- /specs/cosmic-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | - layers/cosmic 10 | - layers/X 11 | - system-profile/default-systemd 12 | - system/luet 13 | - system/luet-extensions 14 | - utils/yip 15 | - utils/yip-systemd 16 | - app-admin/calamares 17 | - system/mocaccino-calamares 18 | - system/mocaccino-grub-splash 19 | - init/mocaccino-skel 20 | - system/mocaccino-init 21 | - system/mocaccino-wallpaper 22 | - themes/mocaccino-plymouth 23 | - mocaccino/live-setup 24 | - mocaccino-release/desktop 25 | - sys-kernel/mocaccino-dracut 26 | - themes/cosmic 27 | - apps/cosmic-store 28 | - apps/gparted 29 | - apps/firefox 30 | - apps/vim 31 | - apps/btop 32 | - apps/neofetch 33 | uefi: 34 | - live/systemd-boot 35 | - system/mocaccino-live-boot 36 | isoimage: 37 | - live/syslinux 38 | - system/mocaccino-live-boot 39 | 40 | # Repositories packages from repository-index 41 | repository: 42 | packages: 43 | - repository/luet 44 | - repository/livecd 45 | - repository/mocaccino-extra 46 | - repository/mocaccino-desktop 47 | - repository/mocaccino-os-commons 48 | - repository/mocaccino-repository-index 49 | 50 | initramfs: 51 | kernel_file: "bzImage" 52 | rootfs_file: "Initrd" 53 | 54 | 55 | image_prefix: "MocaccinoOS-Cosmic-dev-0." 56 | label: "MOCACCINOOS_COSMIC_DEV" 57 | image_date: true 58 | 59 | luet: 60 | repositories: 61 | - name: "mocaccino-repository-index" 62 | description: "MocaccinoOS Repository index" 63 | type: "http" 64 | enable: true 65 | cached: true 66 | priority: 1 67 | urls: 68 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 69 | -------------------------------------------------------------------------------- /specs/fynedesk-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | # https://github.com/mocaccinoOS/desktop/tree/master/packages/meta/flavors/gnome 10 | # https://github.com/mocaccinoOS/desktop/blob/master/packages/sabayon/layers/gnome/0.1/build.yaml#L19 11 | - layers/fynedesk 12 | - layers/X 13 | - apps/lightdm 14 | - system-profile/default-systemd 15 | - system/luet 16 | - system/luet-extensions 17 | - utils/yip 18 | - utils/yip-systemd 19 | - app-admin/calamares 20 | - system/mocaccino-calamares 21 | - system/mocaccino-grub-splash 22 | - init/mocaccino-skel 23 | - system/mocaccino-init 24 | - system/mocaccino-wallpaper 25 | - themes/mocaccino-plymouth 26 | - mocaccino/live-setup 27 | - mocaccino-release/desktop 28 | - sys-kernel/mocaccino-dracut 29 | - apps/gparted 30 | - apps/firefox 31 | - apps/vim 32 | - apps/btop 33 | - apps/neofetch 34 | uefi: 35 | - live/systemd-boot 36 | - system/mocaccino-live-boot 37 | isoimage: 38 | - live/syslinux 39 | - system/mocaccino-live-boot 40 | 41 | # Repositories packages from repository-index 42 | repository: 43 | packages: 44 | - repository/luet 45 | - repository/livecd 46 | - repository/mocaccino-extra 47 | - repository/mocaccino-desktop 48 | - repository/mocaccino-os-commons 49 | - repository/mocaccino-repository-index 50 | 51 | initramfs: 52 | kernel_file: "bzImage" 53 | rootfs_file: "Initrd" 54 | 55 | 56 | image_prefix: "MocaccinoOS-Fynedesk-dev-0." 57 | label: "MOCACCINOOS_FYNEDESK_DEV" 58 | image_date: true 59 | 60 | luet: 61 | repositories: 62 | - name: "mocaccino-repository-index" 63 | description: "MocaccinoOS Repository index" 64 | type: "http" 65 | enable: true 66 | cached: true 67 | priority: 1 68 | urls: 69 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 70 | -------------------------------------------------------------------------------- /specs/gnome-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | - layers/gnome 10 | - system-profile/default-systemd 11 | - system/luet 12 | - system/luet-extensions 13 | - utils/yip 14 | - utils/yip-systemd 15 | - app-admin/calamares 16 | - system/mocaccino-calamares 17 | - system/mocaccino-grub-splash 18 | - init/mocaccino-skel 19 | - system/mocaccino-init 20 | - system/mocaccino-wallpaper 21 | - themes/gnome 22 | - themes/mocaccino-plymouth 23 | - mocaccino/live-setup 24 | - mocaccino-release/desktop 25 | - sys-kernel/mocaccino-dracut 26 | - apps/drawing 27 | - apps/gnome-software 28 | - apps/geary 29 | - apps/gparted 30 | - apps/firefox 31 | - apps/vim 32 | - apps/btop 33 | - apps/neofetch 34 | uefi: 35 | - live/systemd-boot 36 | - system/mocaccino-live-boot 37 | isoimage: 38 | - live/syslinux 39 | - system/mocaccino-live-boot 40 | 41 | # Repositories packages from repository-index 42 | repository: 43 | packages: 44 | - repository/luet 45 | - repository/livecd 46 | - repository/mocaccino-extra 47 | - repository/mocaccino-desktop 48 | - repository/mocaccino-os-commons 49 | - repository/mocaccino-repository-index 50 | 51 | initramfs: 52 | kernel_file: "bzImage" 53 | rootfs_file: "Initrd" 54 | 55 | 56 | image_prefix: "MocaccinoOS-GNOME-dev-0." 57 | label: "MOCACCINOOS_GNOME_DEV" 58 | image_date: true 59 | 60 | luet: 61 | repositories: 62 | - name: "mocaccino-repository-index" 63 | description: "MocaccinoOS Repository index" 64 | type: "http" 65 | enable: true 66 | cached: true 67 | priority: 1 68 | urls: 69 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 70 | -------------------------------------------------------------------------------- /specs/gnome.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - repo-updater/mocaccino-desktop-stable 6 | - kernel/mocaccino-lts-full 7 | - kernel/mocaccino-lts-modules 8 | - kernel/mocaccino-lts-initramfs 9 | - layers/firmware 10 | - layers/gnome 11 | - system-profile/default-systemd 12 | - system/luet 13 | - system/luet-extensions 14 | - utils/yip 15 | - utils/yip-systemd 16 | - app-admin/calamares 17 | - system/mocaccino-calamares 18 | - system/mocaccino-grub-splash 19 | - init/mocaccino-skel 20 | - system/mocaccino-init 21 | - system/mocaccino-wallpaper 22 | - themes/gnome 23 | - themes/mocaccino-plymouth 24 | - mocaccino/live-setup 25 | - mocaccino-release/desktop 26 | - sys-kernel/mocaccino-dracut 27 | - apps/drawing 28 | - apps/gnome-software 29 | - apps/geary 30 | - apps/gparted 31 | - apps/firefox 32 | - apps/vim 33 | - apps/btop 34 | - apps/neofetch 35 | uefi: 36 | - live/systemd-boot 37 | - system/mocaccino-live-boot 38 | isoimage: 39 | - live/syslinux 40 | - system/mocaccino-live-boot 41 | 42 | # Repositories packages from repository-index 43 | repository: 44 | packages: 45 | - repository/luet 46 | - repository/livecd 47 | - repository/mocaccino-extra-stable 48 | - repository/mocaccino-desktop-stable 49 | - repository/mocaccino-os-commons-stable 50 | - repository/mocaccino-repository-index 51 | 52 | initramfs: 53 | kernel_file: "bzImage" 54 | rootfs_file: "Initrd" 55 | 56 | image_prefix: "MocaccinoOS-GNOME-0." 57 | label: "MOCACCINOOS_GNOME" 58 | image_date: true 59 | 60 | luet: 61 | repositories: 62 | - name: "mocaccino-repository-index" 63 | description: "MocaccinoOS Repository index" 64 | type: "http" 65 | enable: true 66 | cached: true 67 | priority: 1 68 | urls: 69 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 70 | -------------------------------------------------------------------------------- /specs/kde-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | keep_luet_db: true 3 | rootfs: 4 | - kernel/mocaccino-lts-full 5 | - kernel/mocaccino-lts-modules 6 | - kernel/mocaccino-lts-initramfs 7 | - layers/firmware 8 | - layers/plasma 9 | - layers/kde-apps-minimal 10 | - system-profile/default-systemd 11 | - system/luet 12 | - system/luet-extensions 13 | - utils/yip 14 | - utils/yip-systemd 15 | - app-admin/calamares 16 | - system/mocaccino-calamares 17 | - system/mocaccino-grub-splash 18 | - init/mocaccino-skel 19 | - system/mocaccino-init 20 | - system/mocaccino-wallpaper 21 | - themes/mocaccino-plymouth 22 | - mocaccino/live-setup 23 | - mocaccino-release/desktop 24 | - sys-kernel/mocaccino-dracut 25 | - apps/firefox 26 | - apps/vim 27 | - apps/vlc 28 | - apps/btop 29 | - apps/discover 30 | - apps/neofetch 31 | uefi: 32 | - live/systemd-boot 33 | - system/mocaccino-live-boot 34 | isoimage: 35 | - live/syslinux 36 | - system/mocaccino-live-boot 37 | 38 | # Repositories packages from repository-index 39 | repository: 40 | packages: 41 | - repository/luet 42 | - repository/livecd 43 | - repository/mocaccino-extra 44 | - repository/mocaccino-desktop 45 | - repository/mocaccino-os-commons 46 | - repository/mocaccino-repository-index 47 | 48 | initramfs: 49 | kernel_file: "bzImage" 50 | rootfs_file: "Initrd" 51 | 52 | image_prefix: "MocaccinoOS-KDE-dev-0." 53 | label: "MOCACCINOOS_KDE_DEV" 54 | image_date: true 55 | 56 | luet: 57 | repositories: 58 | - name: "mocaccino-repository-index" 59 | description: "MocaccinoOS Repository index" 60 | type: "http" 61 | enable: true 62 | cached: true 63 | priority: 1 64 | urls: 65 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 66 | -------------------------------------------------------------------------------- /specs/kde.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | keep_luet_db: true 3 | rootfs: 4 | - repo-updater/mocaccino-desktop-stable 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | - layers/plasma 10 | - layers/kde-apps-minimal 11 | - system-profile/default-systemd 12 | - system/luet 13 | - system/luet-extensions 14 | - utils/yip 15 | - utils/yip-systemd 16 | - app-admin/calamares 17 | - system/mocaccino-calamares 18 | - system/mocaccino-grub-splash 19 | - init/mocaccino-skel 20 | - system/mocaccino-init 21 | - system/mocaccino-wallpaper 22 | - themes/mocaccino-plymouth 23 | - mocaccino/live-setup 24 | - mocaccino-release/desktop 25 | - sys-kernel/mocaccino-dracut 26 | - apps/firefox 27 | - apps/vlc 28 | - apps/vim 29 | - apps/btop 30 | - apps/discover 31 | - apps/neofetch 32 | uefi: 33 | - live/systemd-boot 34 | - system/mocaccino-live-boot 35 | isoimage: 36 | - live/syslinux 37 | - system/mocaccino-live-boot 38 | 39 | # Repositories packages from repository-index 40 | repository: 41 | packages: 42 | - repository/luet 43 | - repository/livecd 44 | - repository/mocaccino-extra-stable 45 | - repository/mocaccino-desktop-stable 46 | - repository/mocaccino-os-commons-stable 47 | - repository/mocaccino-repository-index 48 | 49 | initramfs: 50 | kernel_file: "bzImage" 51 | rootfs_file: "Initrd" 52 | 53 | image_prefix: "MocaccinoOS-KDE-0." 54 | label: "MOCACCINOOS_KDE" 55 | image_date: true 56 | 57 | luet: 58 | repositories: 59 | - name: "mocaccino-repository-index" 60 | description: "MocaccinoOS Repository index" 61 | type: "http" 62 | enable: true 63 | cached: true 64 | priority: 1 65 | urls: 66 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 67 | -------------------------------------------------------------------------------- /specs/mate-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | - layers/mate 10 | - system-profile/default-systemd 11 | - system/luet 12 | - system/luet-extensions 13 | - utils/yip 14 | - utils/yip-systemd 15 | - app-admin/calamares 16 | - system/mocaccino-calamares 17 | - init/mocaccino-skel 18 | - system/mocaccino-init 19 | - system/mocaccino-wallpaper 20 | - system/mocaccino-grub-splash 21 | - themes/mocaccino-plymouth 22 | - themes/mate 23 | - mocaccino/live-setup 24 | - mocaccino-release/desktop 25 | - sys-kernel/mocaccino-dracut 26 | - apps/lightdm 27 | - apps/gparted 28 | - apps/firefox 29 | - apps/vim 30 | - apps/btop 31 | - apps/neofetch 32 | uefi: 33 | - live/systemd-boot 34 | - system/mocaccino-live-boot 35 | isoimage: 36 | - live/syslinux 37 | - system/mocaccino-live-boot 38 | 39 | # Repositories packages from repository-index 40 | repository: 41 | packages: 42 | - repository/luet 43 | - repository/livecd 44 | - repository/mocaccino-extra 45 | - repository/mocaccino-desktop 46 | - repository/mocaccino-os-commons 47 | - repository/mocaccino-repository-index 48 | 49 | initramfs: 50 | kernel_file: "bzImage" 51 | rootfs_file: "Initrd" 52 | 53 | image_prefix: "MocaccinoOS-MATE-dev-0." 54 | label: "MOCACCINOOS_MATE_DEV" 55 | image_date: true 56 | 57 | luet: 58 | repositories: 59 | - name: "mocaccino-repository-index" 60 | description: "MocaccinoOS Repository index" 61 | type: "http" 62 | enable: true 63 | cached: true 64 | priority: 1 65 | urls: 66 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 67 | -------------------------------------------------------------------------------- /specs/mate.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - repo-updater/mocaccino-desktop-stable 6 | - themes/mate 7 | - kernel/mocaccino-lts-full 8 | - kernel/mocaccino-lts-modules 9 | - kernel/mocaccino-lts-initramfs 10 | - layers/firmware 11 | - layers/mate 12 | - system-profile/default-systemd 13 | - system/luet 14 | - system/luet-extensions 15 | - utils/yip 16 | - utils/yip-systemd 17 | - app-admin/calamares 18 | - system/mocaccino-calamares 19 | - init/mocaccino-skel 20 | - system/mocaccino-init 21 | - system/mocaccino-wallpaper 22 | - themes/mocaccino-plymouth 23 | - system/mocaccino-grub-splash 24 | - mocaccino/live-setup 25 | - mocaccino-release/desktop 26 | - sys-kernel/mocaccino-dracut 27 | - apps/lightdm 28 | - apps/gparted 29 | - apps/firefox 30 | - apps/vim 31 | - apps/btop 32 | - apps/neofetch 33 | uefi: 34 | - live/systemd-boot 35 | - system/mocaccino-live-boot 36 | isoimage: 37 | - live/syslinux 38 | - system/mocaccino-live-boot 39 | 40 | # Repositories packages from repository-index 41 | repository: 42 | packages: 43 | - repository/luet 44 | - repository/livecd 45 | - repository/mocaccino-extra-stable 46 | - repository/mocaccino-desktop-stable 47 | - repository/mocaccino-os-commons-stable 48 | - repository/mocaccino-repository-index 49 | 50 | initramfs: 51 | kernel_file: "bzImage" 52 | rootfs_file: "Initrd" 53 | 54 | image_prefix: "MocaccinoOS-MATE-0." 55 | label: "MOCACCINOOS_MATE" 56 | image_date: true 57 | 58 | luet: 59 | repositories: 60 | - name: "mocaccino-repository-index" 61 | description: "MocaccinoOS Repository index" 62 | type: "http" 63 | enable: true 64 | cached: true 65 | priority: 1 66 | urls: 67 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 68 | -------------------------------------------------------------------------------- /specs/maui-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | - layers/maui-shell 10 | - apps/lightdm 11 | - system-profile/default-systemd 12 | - system/luet 13 | - system/luet-extensions 14 | - utils/yip 15 | - utils/yip-systemd 16 | - app-admin/calamares 17 | - system/mocaccino-calamares 18 | - system/mocaccino-grub-splash 19 | - init/mocaccino-skel 20 | - system/mocaccino-init 21 | - system/mocaccino-wallpaper 22 | - themes/mocaccino-plymouth 23 | - mocaccino/live-setup 24 | - mocaccino-release/desktop 25 | - sys-kernel/mocaccino-dracut 26 | - apps/gparted 27 | - apps/firefox 28 | - apps/vim 29 | - apps/btop 30 | uefi: 31 | - live/systemd-boot 32 | - system/mocaccino-live-boot 33 | isoimage: 34 | - live/syslinux 35 | - system/mocaccino-live-boot 36 | 37 | # Repositories packages from repository-index 38 | repository: 39 | packages: 40 | - repository/luet 41 | - repository/livecd 42 | - repository/mocaccino-extra 43 | - repository/mocaccino-desktop 44 | - repository/mocaccino-os-commons 45 | - repository/mocaccino-repository-index 46 | 47 | initramfs: 48 | kernel_file: "bzImage" 49 | rootfs_file: "Initrd" 50 | 51 | 52 | image_prefix: "MocaccinoOS-Maui-dev-0." 53 | label: "MOCACCINOOS_MAUI_DEV" 54 | image_date: true 55 | 56 | luet: 57 | repositories: 58 | - name: "mocaccino-repository-index" 59 | description: "MocaccinoOS Repository index" 60 | type: "http" 61 | enable: true 62 | cached: true 63 | priority: 1 64 | urls: 65 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 66 | -------------------------------------------------------------------------------- /specs/micro-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | keep_luet_db: true 3 | rootfs: 4 | - mocaccino-release/micro-embedded 5 | - utils/busybox 6 | - shells/bash 7 | - init/runit 8 | - init/runit-init 9 | - init/mocaccino-runit 10 | - init/mocaccino-skel 11 | - utils/runit-helper 12 | - runit-srv/yip 13 | - system-profile/default-runit 14 | - editors/vim 15 | - system/mocaccino-init 16 | - kernel/mocaccino-full 17 | - kernel/mocaccino-initramfs 18 | - system/mocaccino-live-boot 19 | - system/luet 20 | - system/luet-extensions 21 | - runit-srv/udhcpc 22 | - runit-srv/sshd 23 | - utils/eudev 24 | - utils/efibootmgr 25 | - utils/efivar 26 | - mocaccino/unattended-install 27 | - utils/openssh 28 | - utils/procps 29 | - entity/utmp 30 | - utils/sed 31 | - utils/file 32 | - utils/procps 33 | - utils/tar 34 | - utils/ca-certificates 35 | uefi: 36 | - live/systemd-boot 37 | - system/mocaccino-live-boot 38 | isoimage: 39 | - live/syslinux 40 | - system/mocaccino-live-boot 41 | 42 | # Repositories packages from repository-index 43 | repository: 44 | packages: 45 | - repository/luet 46 | - repository/livecd 47 | - repository/mocaccino-kernel 48 | - repository/mocaccino-micro 49 | - repository/mocaccino-extra 50 | - repository/mocaccino-os-commons 51 | - repository/mocaccino-musl-universe 52 | - repository/mocaccino-repository-index 53 | 54 | 55 | image_prefix: "MocaccinoOS-Micro-dev-0." 56 | label: "MOCACCINOOS_MICRO_DEV" 57 | image_date: true 58 | 59 | initramfs: 60 | kernel_file: "bzImage" 61 | rootfs_file: "Initrd" 62 | luet: 63 | repositories: 64 | - name: "mocaccino-repository-index" 65 | description: "MocaccinoOS Repository index" 66 | type: "http" 67 | enable: true 68 | cached: true 69 | priority: 1 70 | urls: 71 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 72 | -------------------------------------------------------------------------------- /specs/micro-server.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | keep_luet_db: true 3 | rootfs: 4 | - mocaccino-release/micro 5 | - utils/busybox 6 | - shells/bash 7 | - init/runit 8 | - init/runit-init 9 | - init/mocaccino-runit 10 | - utils/runit-helper 11 | - init/mocaccino-skel 12 | - editors/vim 13 | - repository/mocaccino-extra 14 | - system/mocaccino-init 15 | - kernel/mocaccino-full 16 | - system/mocaccino-live-boot 17 | - system/luet 18 | - system/luet-extensions 19 | - runit-srv/udhcpc 20 | - runit-srv/sshd 21 | - utils/eudev 22 | - mocaccino/unattended-install 23 | - utils/openssh 24 | - utils/procps 25 | - entity/utmp 26 | - utils/sed 27 | - utils/file 28 | - utils/procps 29 | - utils/yip 30 | - utils/tar 31 | - utils/ca-certificates 32 | - runit-srv/yip 33 | - container/k3s 34 | - runit-srv/k3s 35 | uefi: 36 | - live/systemd-boot 37 | - system/mocaccino-live-boot 38 | isoimage: 39 | - live/syslinux 40 | - system/mocaccino-live-boot 41 | initramfs: 42 | - utils/busybox 43 | - system/kmod 44 | - kernel/mocaccino-minimal 45 | - system/mocaccino-init 46 | - system/mocaccino-live-boot 47 | - init/mocaccino-skel 48 | 49 | repository: 50 | packages: 51 | - repository/luet 52 | - repository/livecd 53 | - repository/mocaccino-kernel-stable 54 | - repository/mocaccino-micro-stable 55 | - repository/mocaccino-extra-stable 56 | - repository/mocaccino-os-commons-stable 57 | - repository/mocaccino-musl-universe-stable 58 | initramfs: 59 | - repository/luet 60 | - repository/livecd 61 | - repository/mocaccino-kernel-stable 62 | - repository/mocaccino-micro-stable 63 | - repository/mocaccino-extra-stable 64 | - repository/mocaccino-os-commons-stable 65 | - repository/mocaccino-musl-universe-stable 66 | - repository/mocaccino-repository-index 67 | 68 | 69 | image_prefix: "MocaccinoOS-MicroServer-0." 70 | label: "MOCACCINOOS_MICRO_SERVER" 71 | image_date: true 72 | 73 | luet: 74 | repositories: 75 | - name: "mocaccino-repository-index" 76 | description: "MocaccinoOS Repository index" 77 | type: "http" 78 | enable: true 79 | cached: true 80 | priority: 1 81 | urls: 82 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 83 | -------------------------------------------------------------------------------- /specs/micro.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | keep_luet_db: true 3 | rootfs: 4 | - mocaccino-release/micro-embedded 5 | - utils/busybox 6 | - shells/bash 7 | - init/runit 8 | - init/runit-init 9 | - init/mocaccino-runit 10 | - init/mocaccino-skel 11 | - utils/runit-helper 12 | - runit-srv/yip 13 | - system-profile/default-runit 14 | - editors/vim 15 | - system/mocaccino-init 16 | - kernel/mocaccino-full 17 | - kernel/mocaccino-initramfs 18 | - system/mocaccino-live-boot 19 | - system/luet 20 | - system/luet-extensions 21 | - runit-srv/udhcpc 22 | - runit-srv/sshd 23 | - utils/eudev 24 | - utils/efibootmgr 25 | - utils/efivar 26 | - mocaccino/unattended-install 27 | - utils/openssh 28 | - utils/procps 29 | - entity/utmp 30 | - utils/sed 31 | - utils/file 32 | - utils/procps 33 | - utils/tar 34 | - utils/ca-certificates 35 | uefi: 36 | - live/systemd-boot 37 | - system/mocaccino-live-boot 38 | isoimage: 39 | - live/syslinux 40 | - system/mocaccino-live-boot 41 | 42 | # Repositories packages from repository-index 43 | repository: 44 | packages: 45 | - repository/luet 46 | - repository/livecd 47 | - repository/mocaccino-kernel-stable 48 | - repository/mocaccino-micro-stable 49 | - repository/mocaccino-extra-stable 50 | - repository/mocaccino-os-commons-stable 51 | - repository/mocaccino-musl-universe-stable 52 | - repository/mocaccino-repository-index 53 | 54 | initramfs: 55 | kernel_file: "bzImage" 56 | rootfs_file: "Initrd" 57 | 58 | 59 | image_prefix: "MocaccinoOS-Micro-0." 60 | label: "MOCACCINOOS_MICRO" 61 | image_date: true 62 | 63 | luet: 64 | repositories: 65 | - name: "mocaccino-repository-index" 66 | description: "MocaccinoOS Repository index" 67 | type: "http" 68 | enable: true 69 | cached: true 70 | priority: 1 71 | urls: 72 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 73 | -------------------------------------------------------------------------------- /specs/minimal-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - kernel-modules/virtualbox-guest-additions-lts 9 | - layers/firmware 10 | - layers/system-x 11 | - layers/X 12 | - system-profile/default-systemd 13 | - system-profile/ssh-systemd 14 | - system/luet 15 | - system/luet-extensions 16 | - utils/yip 17 | - utils/yip-systemd 18 | - init/mocaccino-skel 19 | - system/mocaccino-init 20 | - system/mocaccino-wallpaper 21 | - themes/mocaccino-plymouth 22 | - mocaccino/live-setup 23 | - mocaccino-release/desktop-embedded 24 | - mocaccino/unattended-install 25 | uefi: 26 | - live/systemd-boot 27 | - system/mocaccino-live-boot 28 | isoimage: 29 | - live/syslinux 30 | - system/mocaccino-live-boot 31 | 32 | # Repositories packages from repository-index 33 | repository: 34 | packages: 35 | - repository/luet 36 | - repository/livecd 37 | - repository/mocaccino-extra 38 | - repository/mocaccino-desktop 39 | - repository/mocaccino-os-commons 40 | - repository/mocaccino-repository-index 41 | 42 | initramfs: 43 | kernel_file: "bzImage" 44 | rootfs_file: "Initrd" 45 | 46 | 47 | image_prefix: "MocaccinoOS-DesktopMinimal-dev-0." 48 | label: "MOCACCINOOS_MINIMAL_DEV" 49 | image_date: true 50 | 51 | luet: 52 | repositories: 53 | - name: "mocaccino-repository-index" 54 | description: "MocaccinoOS Repository index" 55 | type: "http" 56 | enable: true 57 | cached: true 58 | priority: 1 59 | urls: 60 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 61 | -------------------------------------------------------------------------------- /specs/minimal.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - repo-updater/mocaccino-desktop-stable 6 | - kernel/mocaccino-lts-full 7 | - kernel/mocaccino-lts-modules 8 | - kernel/mocaccino-lts-initramfs 9 | - kernel-modules/virtualbox-guest-additions-lts 10 | - layers/firmware 11 | - layers/system-x 12 | - layers/X 13 | - system-profile/default-systemd 14 | - system-profile/ssh-systemd 15 | - system/luet 16 | - system/luet-extensions 17 | - utils/yip 18 | - utils/yip-systemd 19 | - init/mocaccino-skel 20 | - system/mocaccino-init 21 | - system/mocaccino-wallpaper 22 | - mocaccino/live-setup 23 | - mocaccino-release/desktop-embedded 24 | - system/mocaccino-grub-splash 25 | - mocaccino/unattended-install 26 | uefi: 27 | - live/systemd-boot 28 | - system/mocaccino-live-boot 29 | isoimage: 30 | - live/syslinux 31 | - system/mocaccino-live-boot 32 | 33 | # Repositories packages from repository-index 34 | repository: 35 | packages: 36 | - repository/luet 37 | - repository/livecd 38 | - repository/mocaccino-extra-stable 39 | - repository/mocaccino-desktop-stable 40 | - repository/mocaccino-os-commons-stable 41 | - repository/mocaccino-repository-index 42 | 43 | initramfs: 44 | kernel_file: "bzImage" 45 | rootfs_file: "Initrd" 46 | 47 | 48 | image_prefix: "MocaccinoOS-DesktopMinimal-0." 49 | label: "MOCACCINOOS_MINIMAL" 50 | image_date: true 51 | 52 | luet: 53 | repositories: 54 | - name: "mocaccino-repository-index" 55 | description: "MocaccinoOS Repository index" 56 | type: "http" 57 | enable: true 58 | cached: true 59 | priority: 1 60 | urls: 61 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 62 | -------------------------------------------------------------------------------- /specs/xfce-dev.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | - layers/xfce 10 | - system-profile/default-systemd 11 | - system/luet 12 | - system/luet-extensions 13 | - utils/yip 14 | - utils/yip-systemd 15 | - app-admin/calamares 16 | - system/mocaccino-calamares 17 | - init/mocaccino-skel 18 | - system/mocaccino-init 19 | - system/mocaccino-wallpaper 20 | - system/mocaccino-grub-splash 21 | - themes/mocaccino-plymouth 22 | - themes/xfce 23 | - mocaccino/live-setup 24 | - mocaccino-release/desktop 25 | - sys-kernel/mocaccino-dracut 26 | - apps/lightdm 27 | - apps/gparted 28 | - apps/firefox 29 | - apps/vim 30 | - apps/btop 31 | - apps/neofetch 32 | uefi: 33 | - live/systemd-boot 34 | - system/mocaccino-live-boot 35 | isoimage: 36 | - live/syslinux 37 | - system/mocaccino-live-boot 38 | 39 | # Repositories packages from repository-index 40 | repository: 41 | packages: 42 | - repository/luet 43 | - repository/livecd 44 | - repository/mocaccino-extra 45 | - repository/mocaccino-desktop 46 | - repository/mocaccino-os-commons 47 | - repository/mocaccino-repository-index 48 | 49 | initramfs: 50 | kernel_file: "bzImage" 51 | rootfs_file: "Initrd" 52 | 53 | image_prefix: "MocaccinoOS-XFCE-dev-0." 54 | label: "MOCACCINOOS_XFCE_DEV" 55 | image_date: true 56 | 57 | luet: 58 | repositories: 59 | - name: "mocaccino-repository-index" 60 | description: "MocaccinoOS Repository index" 61 | type: "http" 62 | enable: true 63 | cached: true 64 | priority: 1 65 | urls: 66 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 67 | -------------------------------------------------------------------------------- /specs/xfce.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | 3 | keep_luet_db: true 4 | rootfs: 5 | - kernel/mocaccino-lts-full 6 | - kernel/mocaccino-lts-modules 7 | - kernel/mocaccino-lts-initramfs 8 | - layers/firmware 9 | - layers/xfce 10 | - system-profile/default-systemd 11 | - system/luet 12 | - system/luet-extensions 13 | - utils/yip 14 | - utils/yip-systemd 15 | - app-admin/calamares 16 | - system/mocaccino-calamares 17 | - init/mocaccino-skel 18 | - system/mocaccino-init 19 | - system/mocaccino-wallpaper 20 | - system/mocaccino-grub-splash 21 | - themes/mocaccino-plymouth 22 | - themes/xfce 23 | - mocaccino/live-setup 24 | - mocaccino-release/desktop 25 | - sys-kernel/mocaccino-dracut 26 | - apps/lightdm 27 | - apps/gparted 28 | - apps/firefox 29 | - apps/vim 30 | - apps/btop 31 | - apps/neofetch 32 | uefi: 33 | - live/systemd-boot 34 | - system/mocaccino-live-boot 35 | isoimage: 36 | - live/syslinux 37 | - system/mocaccino-live-boot 38 | 39 | # Repositories packages from repository-index 40 | repository: 41 | packages: 42 | - repository/luet 43 | - repository/livecd 44 | - repository/mocaccino-extra-stable 45 | - repository/mocaccino-desktop-stable 46 | - repository/mocaccino-os-commons-stable 47 | - repository/mocaccino-repository-index 48 | 49 | initramfs: 50 | kernel_file: "bzImage" 51 | rootfs_file: "Initrd" 52 | 53 | image_prefix: "MocaccinoOS-XFCE-0." 54 | label: "MOCACCINOOS_XFCE" 55 | image_date: true 56 | 57 | luet: 58 | repositories: 59 | - name: "mocaccino-repository-index" 60 | description: "MocaccinoOS Repository index" 61 | type: "http" 62 | enable: true 63 | cached: true 64 | priority: 1 65 | urls: 66 | - "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages" 67 | -------------------------------------------------------------------------------- /tests/assets/libtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 2004/08/22 K. Piche Find missing library references. 3 | ifs=$IFS 4 | IFS=':' 5 | 6 | libdirs="/lib:/lib64:/usr/lib:/usr/lib64" 7 | extras= 8 | 9 | # Check ELF binaries in the PATH and specified dir trees. 10 | for tree in $PATH $libdirs $extras 11 | do 12 | echo DIR $tree 13 | 14 | # Get list of files in tree. 15 | files=$(find $tree -type f) 16 | IFS=$ifs 17 | for i in $files 18 | do 19 | if [ `file $i | grep -c 'ELF'` -ne 0 ]; then 20 | # Is an ELF binary. 21 | if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then 22 | # Missing lib. 23 | echo "$i:" 24 | ldd $i 2>/dev/null | grep 'not found' 25 | fi 26 | fi 27 | done 28 | done 29 | 30 | exit -------------------------------------------------------------------------------- /tests/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mudler/cOS/tests 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/bramvdbogaerde/go-scp v1.2.0 7 | github.com/onsi/ginkgo/v2 v2.1.3 8 | github.com/onsi/gomega v1.17.0 9 | golang.org/x/crypto v0.31.0 10 | ) 11 | -------------------------------------------------------------------------------- /tests/go.sum: -------------------------------------------------------------------------------- 1 | github.com/bramvdbogaerde/go-scp v1.2.0 h1:mNF1lCXQ6jQcxCBBuc2g/CQwVy/4QONaoD5Aqg9r+Zg= 2 | github.com/bramvdbogaerde/go-scp v1.2.0/go.mod h1:s4ZldBoRAOgUg8IrRP2Urmq5qqd2yPXQTPshACY8vQ0= 3 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 4 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 5 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 6 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 7 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 8 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 9 | github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= 10 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= 11 | github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= 12 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 13 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 14 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 15 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 16 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 17 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 18 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 19 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 20 | github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 21 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 22 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 23 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 24 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 25 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= 26 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 27 | github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 28 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 29 | github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 30 | github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= 31 | github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= 32 | github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= 33 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 34 | github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= 35 | github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= 36 | github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= 37 | github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= 38 | github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= 39 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 40 | github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= 41 | github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= 42 | github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= 43 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 44 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 45 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 46 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 47 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 48 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 49 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 50 | golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc= 51 | golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= 52 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 53 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 54 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 55 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 56 | golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 57 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 58 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 59 | golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= 60 | golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= 61 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 62 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 63 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 64 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 65 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 66 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 67 | golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 68 | golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 69 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 70 | golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 71 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 72 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 73 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 74 | golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 75 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 76 | golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea h1:+WiDlPBBaO+h9vPNZi8uJ3k4BkKQB7Iow3aqwHVA5hI= 77 | golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 78 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= 79 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 80 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 81 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 82 | golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= 83 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 84 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 85 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 86 | golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 87 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 88 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 89 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 90 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 91 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 92 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 93 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 94 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 95 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 96 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 97 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 98 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 99 | google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= 100 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 101 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 102 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 103 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 104 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= 105 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 106 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 107 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 108 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 109 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 110 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 111 | -------------------------------------------------------------------------------- /tests/graphics_test.go: -------------------------------------------------------------------------------- 1 | package mos_test 2 | 3 | import ( 4 | "time" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | var _ = Describe("MocaccinoOS X", func() { 11 | BeforeEach(func() { 12 | eventuallyConnects() 13 | }) 14 | 15 | Context("Graphics", func() { 16 | 17 | It("installs gnome and starts it", func() { 18 | out, err := sshCommand("luet install -y layers/gnome") 19 | Expect(out).Should(ContainSubstring("installed")) 20 | Expect(err).ToNot(HaveOccurred()) 21 | 22 | _, err = sshCommand("systemctl start gdm") 23 | Expect(err).ToNot(HaveOccurred()) 24 | 25 | Eventually(func() string { 26 | out, _ := sshCommand("systemctl status gdm") 27 | return out 28 | }, 20*time.Second, 1*time.Second).Should(ContainSubstring("running")) 29 | 30 | Eventually(func() string { 31 | out, _ := sshCommand("ps aux | grep Xwayland") 32 | return out 33 | }, 20*time.Second, 1*time.Second).Should(ContainSubstring("gdm")) 34 | 35 | // Adds user to GDM auto-login 36 | _, err = sshCommand(`sed -i "s:\[daemon\]:\[daemon\]\nAutomaticLoginEnable=true\nAutomaticLogin=mocaccino\nTimedLoginEnable=true\nTimedLogin=mocaccino\nTimedLoginDelay=0:" /etc/gdm/custom.conf`) 37 | Expect(err).ToNot(HaveOccurred()) 38 | 39 | _, err = sshCommand("systemctl restart gdm") 40 | Expect(err).ToNot(HaveOccurred()) 41 | 42 | Eventually(func() string { 43 | out, _ := sshCommand("ps aux") 44 | return out 45 | }, 50*time.Second, 1*time.Second).Should(ContainSubstring("gnome-shell")) 46 | 47 | // Cleans up 48 | sshCommand("systemctl stop gdm") 49 | 50 | _, err = sshCommand("luet uninstall -y layers/gnome") 51 | Expect(err).ToNot(HaveOccurred()) 52 | 53 | // Check gnome-shell was removed 54 | _, err = sshCommand("cat /usr/bin/gnome-shell") 55 | Expect(err).To(HaveOccurred()) 56 | }) 57 | 58 | }) 59 | }) 60 | -------------------------------------------------------------------------------- /tests/smoke_test.go: -------------------------------------------------------------------------------- 1 | package mos_test 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | 7 | . "github.com/onsi/ginkgo/v2" 8 | . "github.com/onsi/gomega" 9 | ) 10 | 11 | var toIgnore []string = []string{ 12 | "libsamba-debug-samba4.so", 13 | "libreplace-samba4.so", 14 | "libgtk-4.so.1", 15 | "libsystemd-shared-254.so", 16 | "libcairo-sphinx.so", 17 | "libtracker-extract.so", 18 | } 19 | 20 | func pruneOutput(out string) string { 21 | for _, i := range toIgnore { 22 | out = strings.ReplaceAll(out, fmt.Sprintf("%s => not found", i), "") 23 | } 24 | return out 25 | } 26 | 27 | var _ = Describe("MocaccinoOS", func() { 28 | BeforeEach(func() { 29 | eventuallyConnects() 30 | }) 31 | 32 | Context("Settings", func() { 33 | It("has yip folders", func() { 34 | HasDir("/etc/yip.d") 35 | }) 36 | It("has default repos", func() { 37 | out, err := sshCommand("luet repo list") 38 | Expect(err).ToNot(HaveOccurred()) 39 | Expect(out).Should(ContainSubstring("Luet official Repository")) 40 | Expect(out).Should(ContainSubstring("mocaccino-repository-index")) 41 | }) 42 | }) 43 | 44 | Context("After install", func() { 45 | It("upgrades", func() { 46 | out, err := sshCommand("luet upgrade -y") 47 | Expect(err).ToNot(HaveOccurred()) 48 | Expect(out).Should(ContainSubstring("Computing upgrade")) 49 | }) 50 | }) 51 | 52 | Context("Lib test", func() { 53 | It("does not have any broken lib", func() { 54 | err := SendFile("assets/libtest.sh", "/tmp/libtest.sh", "0777") 55 | Expect(err).ToNot(HaveOccurred()) 56 | out, err := sshCommand("bash /tmp/libtest.sh") 57 | Expect(err).ToNot(HaveOccurred()) 58 | Expect(pruneOutput(out)).ShouldNot(ContainSubstring("not found")) 59 | }) 60 | }) 61 | }) 62 | -------------------------------------------------------------------------------- /tests/tests_suite_test.go: -------------------------------------------------------------------------------- 1 | package mos_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestTests(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "MocaccinoOS Test Suite") 13 | } 14 | -------------------------------------------------------------------------------- /tests/utils_test.go: -------------------------------------------------------------------------------- 1 | package mos_test 2 | 3 | import ( 4 | "context" 5 | "os" 6 | "time" 7 | 8 | "github.com/bramvdbogaerde/go-scp" 9 | . "github.com/onsi/gomega" 10 | ssh "golang.org/x/crypto/ssh" 11 | ) 12 | 13 | func HasDir(s string) { 14 | out, err := sshCommand("if [ -d " + s + " ]; then echo ok; else echo wrong; fi") 15 | Expect(err).ToNot(HaveOccurred()) 16 | Expect(out).Should(Equal("ok\n")) 17 | } 18 | 19 | func Conn() (string, string, string) { 20 | user := os.Getenv("MOCACCINO_USER") 21 | if user == "" { 22 | user = "root" 23 | } 24 | pass := os.Getenv("MOCACCINO_PASS") 25 | if pass == "" { 26 | pass = "mocaccino" 27 | } 28 | 29 | host := os.Getenv("MOCACCINO_HOST") 30 | if host == "" { 31 | host = "127.0.0.1:2222" 32 | } 33 | 34 | return user, pass, host 35 | } 36 | 37 | func SendFile(src, dst, permission string) error { 38 | user, pass, host := Conn() 39 | 40 | sshConfig := &ssh.ClientConfig{ 41 | User: user, 42 | Auth: []ssh.AuthMethod{ssh.Password(pass)}, 43 | Timeout: 60 * time.Second, // max time to establish connection 44 | } 45 | sshConfig.HostKeyCallback = ssh.InsecureIgnoreHostKey() 46 | 47 | scpClient := scp.NewClientWithTimeout(host, sshConfig, 10*time.Second) 48 | defer scpClient.Close() 49 | 50 | if err := scpClient.Connect(); err != nil { 51 | return err 52 | } 53 | 54 | f, err := os.Open(src) 55 | if err != nil { 56 | return err 57 | } 58 | 59 | defer scpClient.Close() 60 | defer f.Close() 61 | 62 | if err := scpClient.CopyFile(context.Background(), f, dst, permission); err != nil { 63 | return err 64 | } 65 | return nil 66 | } 67 | 68 | func eventuallyConnects(t ...int) { 69 | dur := 360 70 | if len(t) > 0 { 71 | dur = t[0] 72 | } 73 | Eventually(func() string { 74 | out, _ := sshCommand("echo ping") 75 | return out 76 | }, time.Duration(time.Duration(dur)*time.Second), time.Duration(5*time.Second)).Should(Equal("ping\n")) 77 | } 78 | 79 | func sshCommand(cmd string) (string, error) { 80 | client, session, err := connectToHost() 81 | if err != nil { 82 | return "", err 83 | } 84 | defer client.Close() 85 | out, err := session.CombinedOutput(cmd) 86 | if err != nil { 87 | return string(out), err 88 | } 89 | 90 | return string(out), err 91 | } 92 | 93 | func connectToHost() (*ssh.Client, *ssh.Session, error) { 94 | user, pass, host := Conn() 95 | 96 | sshConfig := &ssh.ClientConfig{ 97 | User: user, 98 | Auth: []ssh.AuthMethod{ssh.Password(pass)}, 99 | Timeout: 60 * time.Second, // max time to establish connection 100 | } 101 | 102 | sshConfig.HostKeyCallback = ssh.InsecureIgnoreHostKey() 103 | 104 | client, err := ssh.Dial("tcp", host, sshConfig) 105 | if err != nil { 106 | return nil, nil, err 107 | } 108 | 109 | session, err := client.NewSession() 110 | if err != nil { 111 | client.Close() 112 | return nil, nil, err 113 | } 114 | 115 | return client, session, nil 116 | } 117 | --------------------------------------------------------------------------------