├── .gitattributes ├── .github └── workflows │ ├── container.yaml │ └── gen-images.yml ├── .gitignore ├── COPYING ├── Makefile ├── README.md ├── README.md.in ├── base-x64.packages ├── base-x64.sh ├── build-images.sh ├── cinnamon-x64.packages ├── cinnamon-x64.sh ├── container ├── Containerfile └── docker-bake.hcl ├── data ├── issue └── splash.png ├── dracut ├── autoinstaller │ ├── autoinstall.cfg │ ├── install.sh │ ├── module-setup.sh │ └── parse-vai-root.sh ├── netmenu │ ├── module-setup.sh │ └── netmenu.sh └── vmklive │ ├── 59-mtd.rules │ ├── 61-mtd.rules │ ├── accessibility.sh │ ├── adduser.sh │ ├── display-manager-autologin.sh │ ├── getty-serial.sh │ ├── locale.sh │ ├── module-setup.sh │ ├── mtd.sh │ └── nomodeset.sh ├── dwm-x64.packages ├── dwm-x64.sh ├── e17-x64.packages ├── e17-x64.sh ├── gnome-x64.packages ├── gnome-x64.sh ├── grub ├── grub.cfg ├── grub_void.cfg.post └── grub_void.cfg.pre ├── i3-x64.packages ├── i3-x64.sh ├── installer.sh ├── isolinux └── isolinux.cfg.in ├── kde-x64.packages ├── kde-x64.sh ├── keys ├── 3d:b9:c0:50:41:a7:68:4c:2e:2c:a9:a2:5a:04:b7:3f.plist └── 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d.plist ├── lib.sh ├── lxde-x64.packages ├── lxde-x64.sh ├── lxqt-x64.packages ├── lxqt-x64.sh ├── mate-x64.packages ├── mate-x64.sh ├── mkimage.sh ├── mkiso.sh ├── mklive.sh ├── mknet.sh ├── mkplatformfs.sh ├── mkrootfs.sh ├── package_lists ├── base-x64.packages.txt ├── cinnamon-x64.packages.txt ├── e17-x64.packages.txt ├── gnome-x64.packages.txt ├── i3-x64.packages.txt ├── kde-x64.packages.txt ├── lxqt-x64.packages.txt ├── mate-x64.packages.txt └── xfce-x64.packages.txt ├── packer ├── .gitignore ├── hcl2 │ ├── build-cloud-generic.pkr.hcl │ ├── build-vagrant.pkr.hcl │ ├── source-qemu.pkr.hcl │ ├── source-virtualbox-ose.pkr.hcl │ └── vagrant │ │ ├── build-vagrant.pkr.hcl │ │ └── source-virtualbox-ose.pkr.hcl ├── http │ ├── cloud.cfg │ ├── x86_64-musl.cfg │ └── x86_64.cfg ├── plugins.pkr.hcl └── scripts │ ├── cloud.sh │ └── vagrant.sh ├── platforms ├── README.md ├── pinebookpro.sh └── x13s.sh ├── pxelinux.cfg └── pxelinux.cfg.in ├── release.sh ├── sign-file.sh ├── version ├── xfce-x64.packages └── xfce-x64.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | /README.md linguist-generated=true 2 | -------------------------------------------------------------------------------- /.github/workflows/container.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'Build container' 3 | 4 | on: 5 | workflow_dispatch: 6 | pull_request: 7 | branches: 8 | - master 9 | paths: 10 | - container/** 11 | push: 12 | branches: 13 | - master 14 | paths: 15 | - container/** 16 | 17 | concurrency: 18 | group: ${{ github.workflow }}-${{ github.ref }} 19 | cancel-in-progress: true 20 | 21 | jobs: 22 | build: 23 | runs-on: ubuntu-latest 24 | 25 | permissions: 26 | contents: read 27 | packages: write 28 | 29 | steps: 30 | - name: Checkout 31 | uses: classabbyamp/treeless-checkout-action@v1 32 | 33 | - name: Get image release 34 | id: release 35 | run: | 36 | # gets the list of all date-shaped tags for the image, finds the most recent one 37 | tag="$(skopeo list-tags "docker://ghcr.io/${{ github.repository_owner }}/void-mklive" | \ 38 | jq -r '.Tags | sort | reverse | map(select(test("^[0-9]{8}(R[0-9]+)?$")))[0]')" 39 | # tags from a different day or pre-YYYYMMDDRN 40 | if [ "${tag%R*}" != "$(date -u +%Y%m%d)" ] || [ "${tag%R*}" = "${tag}" ]; then 41 | rel=1 42 | else 43 | rel=$(( ${tag##*R} + 1 )) 44 | fi 45 | echo "rel=${rel}" >> "${GITHUB_OUTPUT}" 46 | 47 | - name: Docker metadata 48 | id: meta 49 | uses: docker/metadata-action@v4 50 | with: 51 | images: | 52 | ghcr.io/${{ github.repository_owner }}/void-mklive 53 | tags: | 54 | type=sha,prefix= 55 | type=raw,value=latest,enable={{is_default_branch}} 56 | type=raw,value={{date 'YYYYMMDD'}}R${{ steps.release.outputs.rel }},enable={{is_default_branch}},priority=1000 57 | flavor: latest=false 58 | labels: | 59 | org.opencontainers.image.authors=Void Linux team and contributors 60 | org.opencontainers.image.url=https://voidlinux.org 61 | org.opencontainers.image.documentation=https://github.com/${{ github.repository }} 62 | org.opencontainers.image.source=https://github.com/${{ github.repository }} 63 | org.opencontainers.image.vendor=Void Linux 64 | org.opencontainers.image.title=Void Linux mklive container 65 | org.opencontainers.image.description=Image for building mklive images 66 | 67 | - name: Set up QEMU 68 | uses: docker/setup-qemu-action@v2 69 | 70 | - name: Set up Docker Buildx 71 | uses: docker/setup-buildx-action@v2 72 | 73 | - name: Login to GCHR 74 | if: github.event_name != 'pull_request' 75 | uses: docker/login-action@v2 76 | with: 77 | registry: ghcr.io 78 | username: ${{ github.actor }} 79 | password: ${{ secrets.GITHUB_TOKEN }} 80 | 81 | - name: Build and push images 82 | id: build_and_push 83 | uses: docker/bake-action@v5 84 | with: 85 | push: ${{ github.event_name != 'pull_request' }} 86 | targets: void-mklive 87 | files: | 88 | container/docker-bake.hcl 89 | ${{ steps.meta.outputs.bake-file }} 90 | set: | 91 | _common.cache-to=type=gha 92 | _common.cache-from=type=gha 93 | -------------------------------------------------------------------------------- /.github/workflows/gen-images.yml: -------------------------------------------------------------------------------- 1 | name: Build void images 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | datecode: 7 | description: "Override datecode for images" 8 | required: false 9 | type: string 10 | live_iso_flag: 11 | description: "Build live ISOs" 12 | default: true 13 | required: true 14 | type: boolean 15 | live_archs: 16 | description: "Archs to build live ISOs for" 17 | default: "x86_64 x86_64-musl i686 aarch64 aarch64-musl asahi asahi-musl" 18 | required: false 19 | type: string 20 | live_flavors: 21 | description: "Flavors to build live ISOs for" 22 | default: "base xfce" 23 | required: false 24 | type: string 25 | rootfs_flag: 26 | description: "Build ROOTFSes" 27 | default: true 28 | required: true 29 | type: boolean 30 | rootfs: 31 | description: "Archs to build ROOTFSes for" 32 | default: "x86_64 x86_64-musl i686 armv6l armv6l-musl armv7l armv7l-musl aarch64 aarch64-musl" 33 | required: false 34 | type: string 35 | platformfs_flag: 36 | description: "Build PLATFORMFSes" 37 | default: true 38 | required: true 39 | type: boolean 40 | platformfs: 41 | description: "Platforms to build PLATFORMFSes for" 42 | default: "rpi-armv6l rpi-armv6l-musl rpi-armv7l rpi-armv7l-musl rpi-aarch64 rpi-aarch64-musl" 43 | required: false 44 | type: string 45 | sbc_img_flag: 46 | description: "Build SBC Images" 47 | default: true 48 | required: true 49 | type: boolean 50 | sbc_imgs: 51 | description: "Platforms to build SBC images for" 52 | default: "rpi-armv6l rpi-armv6l-musl rpi-armv7l rpi-armv7l-musl rpi-aarch64 rpi-aarch64-musl" 53 | required: false 54 | type: string 55 | 56 | concurrency: 57 | group: ${{ github.workflow }}-${{ github.ref }} 58 | cancel-in-progress: true 59 | 60 | defaults: 61 | run: 62 | shell: bash 63 | 64 | jobs: 65 | prepare: 66 | name: Prepare Environment 67 | runs-on: ubuntu-latest 68 | outputs: 69 | datecode: ${{ steps.prep.outputs.datecode }} 70 | revision: ${{ steps.prep.outputs.revision }} 71 | mirror: ${{ steps.prep.outputs.mirror }} 72 | live_archs: ${{ steps.prep.outputs.live_archs }} 73 | live_flavors: ${{ steps.prep.outputs.live_flavors }} 74 | rootfs: ${{ steps.prep.outputs.rootfs }} 75 | platformfs: ${{ steps.prep.outputs.platformfs }} 76 | sbc_imgs: ${{ steps.prep.outputs.sbc_imgs }} 77 | 78 | steps: 79 | - name: Prepare Environment 80 | id: prep 81 | run: | 82 | if [ -z "${{ inputs.datecode }}" ]; then 83 | echo "datecode=$(date -u "+%Y%m%d")" >> $GITHUB_OUTPUT 84 | else 85 | echo "datecode=${{ inputs.datecode }}" >> $GITHUB_OUTPUT 86 | fi 87 | echo "revision=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT 88 | echo "mirror=https://repo-ci.voidlinux.org/current" >> $GITHUB_OUTPUT 89 | 90 | jsonify() { 91 | sed 's/\s\+/ /g' | jq -Rrc 'split(" ")' 92 | } 93 | 94 | echo "live_archs=$(echo "${{ inputs.live_archs }}" | jsonify)" >> $GITHUB_OUTPUT 95 | echo "live_flavors=$(echo "${{ inputs.live_flavors }}" | jsonify)" >> $GITHUB_OUTPUT 96 | 97 | echo "rootfs=$(echo "${{ inputs.rootfs }}" | jsonify)" >> $GITHUB_OUTPUT 98 | echo "platformfs=$(echo "${{ inputs.platformfs }}" | jsonify)" >> $GITHUB_OUTPUT 99 | echo "sbc_imgs=$(echo "${{ inputs.sbc_imgs }}" | jsonify)" >> $GITHUB_OUTPUT 100 | 101 | build-live-isos: 102 | name: Build Live ISOs 103 | runs-on: ubuntu-latest 104 | needs: prepare 105 | if: ${{ inputs.live_iso_flag }} 106 | 107 | strategy: 108 | matrix: 109 | arch: ${{ fromJson(needs.prepare.outputs.live_archs) }} 110 | flavor: ${{ fromJson(needs.prepare.outputs.live_flavors) }} 111 | 112 | container: 113 | image: 'ghcr.io/void-linux/void-mklive:20250116R1' 114 | options: --privileged 115 | volumes: 116 | - /dev:/dev 117 | env: 118 | PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' 119 | MKLIVE_REV: "${{ needs.prepare.outputs.revision }}" 120 | 121 | steps: 122 | - name: Prepare container 123 | shell: sh 124 | run: xbps-install -Syu xbps && xbps-install -yu 125 | 126 | - name: Clone and checkout 127 | uses: classabbyamp/treeless-checkout-action@v1 128 | 129 | - name: Build live ISOs 130 | run: | 131 | make live-iso-all-print live-iso-all \ 132 | SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \ 133 | DATECODE="${{ needs.prepare.outputs.datecode }}" \ 134 | LIVE_ARCHS="${{ matrix.arch }}" LIVE_FLAVORS="${{ matrix.flavor }}" 135 | 136 | - name: Prepare artifacts for upload 137 | run: | 138 | make dist DATECODE="${{ needs.prepare.outputs.datecode }}" 139 | - name: Upload artifacts 140 | uses: actions/upload-artifact@v4 141 | with: 142 | name: void-iso-${{ matrix.arch }}-${{ matrix.flavor }}-${{ needs.prepare.outputs.datecode }} 143 | path: | 144 | distdir-${{ needs.prepare.outputs.datecode }}/* 145 | if-no-files-found: error 146 | 147 | build-rootfs: 148 | name: Build ROOTFSes 149 | runs-on: ubuntu-latest 150 | needs: prepare 151 | if: ${{ inputs.rootfs_flag }} 152 | 153 | strategy: 154 | matrix: 155 | arch: ${{ fromJson(needs.prepare.outputs.rootfs) }} 156 | 157 | container: 158 | image: 'ghcr.io/void-linux/void-mklive:20250116R1' 159 | options: --privileged 160 | volumes: 161 | - /dev:/dev 162 | env: 163 | PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' 164 | MKLIVE_REV: "${{ needs.prepare.outputs.revision }}" 165 | 166 | steps: 167 | - name: Prepare container 168 | shell: sh 169 | run: xbps-install -Syu xbps && xbps-install -yu 170 | 171 | - name: Clone and checkout 172 | uses: classabbyamp/treeless-checkout-action@v1 173 | 174 | - name: Build ROOTFSes 175 | run: | 176 | make rootfs-all-print rootfs-all \ 177 | SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \ 178 | DATECODE="${{ needs.prepare.outputs.datecode }}" \ 179 | ARCHS="${{ matrix.arch }}" 180 | 181 | - name: Prepare artifacts for upload 182 | run: | 183 | make dist DATECODE="${{ needs.prepare.outputs.datecode }}" 184 | - name: Upload artifacts 185 | uses: actions/upload-artifact@v4 186 | with: 187 | name: void-rootfs-${{ matrix.arch }}-${{ needs.prepare.outputs.datecode }} 188 | path: | 189 | distdir-${{ needs.prepare.outputs.datecode }}/* 190 | if-no-files-found: error 191 | 192 | build-platformfs: 193 | name: Build PLATFORMFSes 194 | runs-on: ubuntu-latest 195 | needs: prepare 196 | if: ${{ inputs.platformfs_flag }} 197 | 198 | strategy: 199 | matrix: 200 | platform: ${{ fromJson(needs.prepare.outputs.platformfs) }} 201 | 202 | container: 203 | image: 'ghcr.io/void-linux/void-mklive:20250116R1' 204 | options: --privileged 205 | volumes: 206 | - /dev:/dev 207 | env: 208 | PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' 209 | MKLIVE_REV: "${{ needs.prepare.outputs.revision }}" 210 | 211 | steps: 212 | - name: Prepare container 213 | shell: sh 214 | run: xbps-install -Syu xbps && xbps-install -yu 215 | 216 | - name: Clone and checkout 217 | uses: classabbyamp/treeless-checkout-action@v1 218 | 219 | - name: Build PLATFORMFSes 220 | run: | 221 | make platformfs-all-print platformfs-all \ 222 | SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \ 223 | DATECODE="${{ needs.prepare.outputs.datecode }}" \ 224 | PLATFORMS="${{ matrix.platform }}" 225 | 226 | - name: Prepare artifacts for upload 227 | run: | 228 | make dist DATECODE="${{ needs.prepare.outputs.datecode }}" 229 | - name: Upload artifacts 230 | uses: actions/upload-artifact@v4 231 | with: 232 | name: void-platformfs-${{ matrix.platform }}-${{ needs.prepare.outputs.datecode }} 233 | path: | 234 | distdir-${{ needs.prepare.outputs.datecode }}/* 235 | !distdir-${{ needs.prepare.outputs.datecode }}/*ROOTFS* 236 | if-no-files-found: error 237 | 238 | build-sbc-img: 239 | name: Build SBC Images 240 | runs-on: ubuntu-latest 241 | needs: prepare 242 | if: ${{ inputs.sbc_img_flag }} 243 | 244 | strategy: 245 | matrix: 246 | platform: ${{ fromJson(needs.prepare.outputs.sbc_imgs) }} 247 | 248 | container: 249 | image: 'ghcr.io/void-linux/void-mklive:20250116R1' 250 | options: --privileged 251 | volumes: 252 | - /dev:/dev 253 | env: 254 | PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' 255 | MKLIVE_REV: "${{ needs.prepare.outputs.revision }}" 256 | 257 | steps: 258 | - name: Prepare container 259 | shell: sh 260 | run: xbps-install -Syu xbps && xbps-install -yu 261 | 262 | - name: Clone and checkout 263 | uses: classabbyamp/treeless-checkout-action@v1 264 | 265 | - name: Build SBC Images 266 | run: | 267 | make images-all-sbc-print images-all-sbc \ 268 | SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \ 269 | DATECODE="${{ needs.prepare.outputs.datecode }}" \ 270 | SBC_IMGS="${{ matrix.platform }}" 271 | 272 | - name: Prepare artifacts for upload 273 | run: | 274 | make dist DATECODE="${{ needs.prepare.outputs.datecode }}" 275 | - name: Upload artifacts 276 | uses: actions/upload-artifact@v4 277 | with: 278 | name: void-sbc-img-${{ matrix.platform }}-${{ needs.prepare.outputs.datecode }} 279 | path: | 280 | distdir-${{ needs.prepare.outputs.datecode }}/* 281 | !distdir-${{ needs.prepare.outputs.datecode }}/*ROOTFS* 282 | !distdir-${{ needs.prepare.outputs.datecode }}/*PLATFORMFS* 283 | if-no-files-found: error 284 | 285 | merge-artifacts: 286 | name: Combine artifacts 287 | runs-on: ubuntu-latest 288 | if: ${{ always() }} 289 | needs: 290 | - prepare 291 | - build-live-isos 292 | - build-rootfs 293 | - build-platformfs 294 | - build-sbc-img 295 | 296 | container: 297 | image: 'ghcr.io/void-linux/void-mklive:20250116R1' 298 | env: 299 | PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' 300 | MKLIVE_REV: "${{ needs.prepare.outputs.revision }}" 301 | 302 | steps: 303 | - name: Prepare container 304 | shell: sh 305 | run: xbps-install -Syu xbps && xbps-install -yu 306 | 307 | - name: Clone and checkout 308 | uses: classabbyamp/treeless-checkout-action@v1 309 | 310 | - name: Download artifacts 311 | uses: actions/download-artifact@v4 312 | with: 313 | path: distdir-${{ needs.prepare.outputs.datecode }} 314 | merge-multiple: true 315 | - name: Prepare artifacts for upload 316 | run: | 317 | make checksum DATECODE="${{ needs.prepare.outputs.datecode }}" 318 | - name: Upload artifacts 319 | id: upload 320 | uses: actions/upload-artifact@v4 321 | with: 322 | name: void-live-${{ needs.prepare.outputs.datecode }} 323 | path: | 324 | distdir-${{ needs.prepare.outputs.datecode }}/* 325 | if-no-files-found: error 326 | - name: Generate summary 327 | run: | 328 | cat << EOF >> "$GITHUB_STEP_SUMMARY" 329 | ## Images generated successfully! 330 | 331 | ### Download 332 | 333 | Download the result of this run with \`./release.sh dl ${{ github.run_id }} -- -R ${{ github.repository }}\` or use [this url](${{ steps.upload.outputs.artifact-url }}). 334 | 335 | ### Checksums 336 | \`\`\` 337 | $(cat distdir-${{ needs.prepare.outputs.datecode }}/sha256sum.txt) 338 | \`\`\` 339 | EOF 340 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.img 2 | *.xz 3 | *.iso 4 | *.raw 5 | *.tar.gz 6 | *.box 7 | *.asc 8 | sha256sums.txt 9 | xbps-cache 10 | xbps-cachedir* 11 | stamps* 12 | !dracut/*/*.sh 13 | !packer/scripts/*.sh 14 | void-live-*/ 15 | distdir-*/ 16 | release/ 17 | 18 | extra 19 | includedir 20 | packer/cloud-*/ 21 | packer/vagrant-*/ 22 | mklive-build*/ 23 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009-2015 Juan RP 2 | # Copyright (c) 2012 Dave Elusive 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 1. Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 2. Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DATECODE:=$(shell date -u "+%Y%m%d") 2 | SHELL=/bin/bash 3 | 4 | T_LIVE_ARCHS=i686 x86_64{,-musl} aarch64{,-musl} asahi{,-musl} 5 | 6 | T_PLATFORMS=rpi-{armv{6,7}l,aarch64}{,-musl} GCP{,-musl} pinebookpro{,-musl} asahi{,-musl} 7 | T_ARCHS=i686 x86_64{,-musl} armv{6,7}l{,-musl} aarch64{,-musl} 8 | 9 | T_SBC_IMGS=rpi-{armv{6,7}l,aarch64}{,-musl} pinebookpro{,-musl} 10 | T_CLOUD_IMGS=GCP{,-musl} 11 | 12 | T_PXE_ARCHS=x86_64{,-musl} 13 | 14 | LIVE_ARCHS:=$(shell echo $(T_LIVE_ARCHS)) 15 | LIVE_FLAVORS:=base enlightenment xfce mate cinnamon gnome kde lxde lxqt xfce-wayland 16 | LIVE_PLATFORMS:=pinebookpro x13s 17 | ARCHS:=$(shell echo $(T_ARCHS)) 18 | PLATFORMS:=$(shell echo $(T_PLATFORMS)) 19 | SBC_IMGS:=$(shell echo $(T_SBC_IMGS)) 20 | CLOUD_IMGS:=$(shell echo $(T_CLOUD_IMGS)) 21 | PXE_ARCHS:=$(shell echo $(T_PXE_ARCHS)) 22 | 23 | ALL_LIVE_ISO=$(foreach arch,$(LIVE_ARCHS), $(foreach flavor,$(LIVE_FLAVORS),void-live-$(arch)-$(DATECODE)-$(flavor).iso)) 24 | ALL_ROOTFS=$(foreach arch,$(ARCHS),void-$(arch)-ROOTFS-$(DATECODE).tar.xz) 25 | ALL_PLATFORMFS=$(foreach platform,$(PLATFORMS),void-$(platform)-PLATFORMFS-$(DATECODE).tar.xz) 26 | ALL_SBC_IMAGES=$(foreach platform,$(SBC_IMGS),void-$(platform)-$(DATECODE).img.xz) 27 | ALL_CLOUD_IMAGES=$(foreach cloud,$(CLOUD_IMGS),void-$(cloud)-$(DATECODE).tar.gz) 28 | ALL_PXE_ARCHS=$(foreach arch,$(PXE_ARCHS),void-$(arch)-NETBOOT-$(DATECODE).tar.gz) 29 | 30 | SUDO := sudo 31 | 32 | REPOSITORY := https://repo-default.voidlinux.org/current 33 | XBPS_REPOSITORY := -r $(REPOSITORY) -r $(REPOSITORY)/musl -r $(REPOSITORY)/aarch64 34 | COMPRESSOR_THREADS:=$(shell nproc) 35 | 36 | all: 37 | 38 | README.md: README.md.in mkiso.sh mklive.sh mkrootfs.sh mkplatformfs.sh mkimage.sh mknet.sh 39 | printf '\n\n' > README.md 40 | cat README.md.in >> README.md 41 | for script in mkiso mklive mkrootfs mkplatformfs mkimage mknet; do \ 42 | printf '### %s.sh\n\n```\n' "$${script}" >> README.md ; \ 43 | "./$${script}.sh" -h 2>/dev/null >> README.md ; \ 44 | printf '```\n\n' >> README.md ; \ 45 | done 46 | 47 | mkiso.sh: mklive.sh 48 | 49 | checksum: distdir-$(DATECODE) 50 | cd distdir-$(DATECODE)/ && sha256 * > sha256sum.txt 51 | 52 | distdir-$(DATECODE): 53 | mkdir -p distdir-$(DATECODE) 54 | 55 | dist: distdir-$(DATECODE) 56 | mv void*$(DATECODE)* distdir-$(DATECODE)/ 57 | 58 | live-iso-all: $(ALL_LIVE_ISO) 59 | 60 | live-iso-all-print: 61 | @echo $(ALL_LIVE_ISO) | sed "s: :\n:g" 62 | 63 | void-live-%.iso: mkiso.sh 64 | @[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true 65 | $(if $(findstring aarch64,$*), \ 66 | $(SUDO) ./mkiso.sh -r $(REPOSITORY) -t $* -- -P "$(LIVE_PLATFORMS)", \ 67 | $(SUDO) ./mkiso.sh -r $(REPOSITORY) -t $*) 68 | @[ -n "${CI}" ] && printf '::endgroup::\n' || true 69 | 70 | rootfs-all: $(ALL_ROOTFS) 71 | 72 | rootfs-all-print: 73 | @echo $(ALL_ROOTFS) | sed "s: :\n:g" 74 | 75 | void-%-ROOTFS-$(DATECODE).tar.xz: mkrootfs.sh 76 | @[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true 77 | $(SUDO) ./mkrootfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) -o $@ $* 78 | @[ -n "${CI}" ] && printf '::endgroup::\n' || true 79 | 80 | platformfs-all: $(ALL_PLATFORMFS) 81 | 82 | platformfs-all-print: 83 | @echo $(ALL_PLATFORMFS) | sed "s: :\n:g" 84 | 85 | .SECONDEXPANSION: 86 | void-%-PLATFORMFS-$(DATECODE).tar.xz: void-$$(shell ./lib.sh platform2arch %)-ROOTFS-$(DATECODE).tar.xz mkplatformfs.sh 87 | @[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true 88 | $(SUDO) ./mkplatformfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) -o $@ $* void-$(shell ./lib.sh platform2arch $*)-ROOTFS-$(DATECODE).tar.xz 89 | @[ -n "${CI}" ] && printf '::endgroup::\n' || true 90 | 91 | images-all: platformfs-all images-all-sbc images-all-cloud 92 | 93 | images-all-sbc: $(ALL_SBC_IMAGES) 94 | 95 | images-all-sbc-print: 96 | @echo $(ALL_SBC_IMAGES) | sed "s: :\n:g" 97 | 98 | images-all-cloud: $(ALL_CLOUD_IMAGES) 99 | 100 | images-all-print: 101 | @echo $(ALL_SBC_IMAGES) $(ALL_CLOUD_IMAGES) | sed "s: :\n:g" 102 | 103 | void-%-$(DATECODE).img.xz: void-%-PLATFORMFS-$(DATECODE).tar.xz mkimage.sh 104 | @[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true 105 | $(SUDO) ./mkimage.sh -x $(COMPRESSOR_THREADS) -o $(basename $@) void-$*-PLATFORMFS-$(DATECODE).tar.xz 106 | @[ -n "${CI}" ] && printf '::endgroup::\n' || true 107 | 108 | # Some of the images MUST be compressed with gzip rather than xz, this 109 | # rule services those images. 110 | void-%-$(DATECODE).tar.gz: void-%-PLATFORMFS-$(DATECODE).tar.xz mkimage.sh 111 | @[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true 112 | $(SUDO) ./mkimage.sh -x $(COMPRESSOR_THREADS) void-$*-PLATFORMFS-$(DATECODE).tar.xz 113 | @[ -n "${CI}" ] && printf '::endgroup::\n' || true 114 | 115 | pxe-all: $(ALL_PXE_ARCHS) 116 | 117 | pxe-all-print: 118 | @echo $(ALL_PXE_ARCHS) | sed "s: :\n:g" 119 | 120 | void-%-NETBOOT-$(DATECODE).tar.gz: void-%-ROOTFS-$(DATECODE).tar.xz mknet.sh 121 | @[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true 122 | $(SUDO) ./mknet.sh void-$*-ROOTFS-$(DATECODE).tar.xz 123 | @[ -n "${CI}" ] && printf '::endgroup::\n' || true 124 | 125 | .PHONY: all checksum dist live-iso-all live-iso-all-print rootfs-all-print rootfs-all platformfs-all-print platformfs-all pxe-all-print pxe-all 126 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # The Void Linux live image/rootfs generator and installer 3 | 4 | ## Overview 5 | 6 | This repository contains several utilities: 7 | 8 | * [*mklive.sh*](#mklivesh) - The Void Linux live image generator for x86 9 | * [*mkiso.sh*](#mkisosh) - Wrapper script to generate bootable and installable live 10 | images for i686, x86_64, and aarch64. 11 | * [*mkrootfs.sh*](#mkrootfssh) - The Void Linux rootfs generator for all platforms 12 | * [*mkplatformfs.sh*](#mkplatformfssh) - The Void Linux filesystem tool to produce 13 | a rootfs for a particular platform 14 | * [*mkimage.sh*](#mkimagesh) - The Void Linux image generator for ARM platforms 15 | * [*mknet.sh*](#mknetsh) - Script to generate netboot tarballs for Void 16 | * *installer.sh* - The Void Linux el-cheapo installer for x86 17 | * *release.sh* - interacts with GitHub CI to generate and sign images for releases 18 | 19 | ### Workflow 20 | 21 | #### Generating x86 live ISOs 22 | 23 | To generate a live ISO like the officially-published ones, use 24 | [*mkiso.sh*](#mkisosh). To generate a more basic live ISO 25 | (which does not include things like `void-installer`), use [*mklive.sh*](#mklivesh). 26 | 27 | #### Generating ROOTFS tarballs 28 | 29 | ROOTFS tarballs contain a basic Void Linux root filesystem without a kernel. 30 | These can be useful for doing a [chroot install](https://docs.voidlinux.org/installation/guides/chroot.html) 31 | or for [chroots and containers](https://docs.voidlinux.org/config/containers-and-vms/chroot.html). 32 | 33 | Use [*mkrootfs.sh*](#mkrootfssh) to generate a Void Linux ROOTFS. 34 | 35 | #### Generating platform-specific tarballs 36 | 37 | Platform-specific ROOTFS tarballs, or PLATFORMFS tarballs, contain a basic Void 38 | Linux root filesystem including a kernel. These are commonly used for bootstrapping 39 | ARM systems or other environments that require platform-specific kernels, like 40 | Raspberry Pis. 41 | 42 | First create a ROOTFS for the desired architecture, then use 43 | [*mkplatformfs.sh*](#mkplatformfssh) to generate a Void Linux PLATFORMFS. 44 | 45 | #### Generating ARM images 46 | 47 | Platform-specific filesystem images contain a basic filesystem layout (`/` and 48 | `/boot` partitions), ready to be copied to the target drive with `dd`. These are 49 | not "live" images like those available on x86 platforms, and do not need 50 | installation like live ISOs. 51 | 52 | To generate these images, first create a PLATFORMFS for the desired platform, 53 | then use [*mkimage.sh*](#mkimagesh) to generate the image. 54 | 55 | ## Build Dependencies 56 | * make 57 | 58 | ======= 59 | ## Dependencies 60 | * Compression type for the initramfs image 61 | * liblz4 (for lz4, xz) (default) 62 | * xbps>=0.45 63 | * qemu-user-static binaries (for mkrootfs) 64 | 65 | Note that void-mklive is not guaranteed to work on distributions other than Void 66 | Linux, or in containers. 67 | 68 | See the usage output: 69 | 70 | $ ./mklive.sh -h 71 | $ ./mkrootfs.sh -h 72 | $ ./mkimage.sh -h 73 | 74 | ## Building an image 75 | 76 | **make sure you have your gpg2 key imported and export a .asc file from your key** 77 | 78 | ./kde-x86.sh 79 | 80 | This will use the mklive.sh script to create a build with the packages listed in kde-x86.packages file. 81 | 82 | ## Examples 83 | ======= 84 | ### Examples 85 | 86 | Build a native live image keyboard set to 'fr': 87 | 88 | # ./mklive.sh -k fr 89 | 90 | Build an i686 (on x86\_64) live image with some additional packages: 91 | 92 | # ./mklive.sh -a i686 -p 'vim rtorrent' 93 | 94 | Build an x86\_64 musl live image with packages stored in a local repository: 95 | 96 | # ./mklive.sh -a x86_64-musl -r /path/to/host/binpkgs 97 | 98 | See the usage output for more information :-) 99 | ======= 100 | * Compression type for the initramfs image (by default: liblz4 for lz4, xz) 101 | * xbps>=0.45 102 | * qemu-user-static binaries (for mkrootfs) 103 | * bash 104 | >>>>>>> 4c53797b27a6f10154cc6588243539a68a167e06 105 | 106 | ## Kernel Command-line Parameters 107 | 108 | `void-mklive`-based live images support several kernel command-line arguments 109 | that can change the behavior of the live system: 110 | 111 | - `live.autologin` will skip the initial login screen on `tty1`. 112 | - `live.user` will change the username of the non-root user from the default 113 | `anon`. The password remains `voidlinux`. 114 | - `live.shell` sets the default shell for the non-root user in the live environment. 115 | - `live.accessibility` enables accessibility features like the console screenreader 116 | `espeakup` in the live environment. 117 | - `console` can be set to `ttyS0`, `hvc0`, or `hvsi0` to enable `agetty` on that 118 | serial console. 119 | - `locale.LANG` will set the `LANG` environment variable. Defaults to `en_US.UTF-8`. 120 | - `vconsole.keymap` will set the console keymap. Defaults to `us`. 121 | 122 | ### Examples: 123 | 124 | - `live.autologin live.user=foo live.shell=/bin/bash` would create the user `foo` 125 | with the default shell `/bin/bash` on boot, and log them in automatically on `tty1` 126 | - `live.shell=/bin/bash` would set the default shell for the `anon` user to `/bin/bash` 127 | - `console=ttyS0 vconsole.keymap=cf` would enable `ttyS0` and set the keymap in 128 | the console to `cf` 129 | - `locale.LANG=fr_CA.UTF-8` would set the live system's language to `fr_CA.UTF-8` 130 | 131 | ## Usage 132 | 133 | ### mkiso.sh 134 | 135 | ``` 136 | Usage: mkiso.sh [options ...] [-- mklive options ...] 137 | 138 | Wrapper script around mklive.sh for several standard flavors of live images. 139 | Adds void-installer and other helpful utilities to the generated images. 140 | 141 | OPTIONS 142 | -a Set architecture (or platform) in the image 143 | -b One of base, enlightenment, xfce, mate, cinnamon, gnome, kde, 144 | lxde, lxqt, or xfce-wayland (default: base). May be specified multiple times 145 | to build multiple variants 146 | -d Override the datestamp on the generated image (YYYYMMDD format) 147 | -t 148 | Equivalent to setting -a, -b, and -d 149 | -r Use this XBPS repository. May be specified multiple times 150 | -h Show this help and exit 151 | -V Show version and exit 152 | 153 | Other options can be passed directly to mklive.sh by specifying them after the --. 154 | See mklive.sh -h for more details. 155 | ``` 156 | 157 | ### mklive.sh 158 | 159 | ``` 160 | Usage: mklive.sh [options] 161 | 162 | Generates a basic live ISO image of Void Linux. This ISO image can be written 163 | to a CD/DVD-ROM or any USB stick. 164 | 165 | To generate a more complete live ISO image, use mkiso.sh. 166 | 167 | OPTIONS 168 | -a Set XBPS_ARCH in the ISO image 169 | -b Set an alternative base package (default: base-system) 170 | -r Use this XBPS repository. May be specified multiple times 171 | -c Use this XBPS cache directory (default: ./xbps-cachedir-) 172 | -k Default keymap to use (default: us) 173 | -l Default locale to use (default: en_US.UTF-8) 174 | -i 175 | Compression type for the initramfs image (default: xz) 176 | -s Compression type for the squashfs image (default: xz) 177 | -o Output file name for the ISO image (default: automatic) 178 | -p " ..." Install additional packages in the ISO image 179 | -g " ..." Ignore packages when building the ISO image 180 | -I Include directory structure under given path in the ROOTFS 181 | -S " ..." Enable services in the ISO image 182 | -e Default shell of the root user (must be absolute path). 183 | Set the live.shell kernel argument to change the default shell of anon. 184 | -C " ..." Add additional kernel command line arguments 185 | -P " ..." 186 | Platforms to enable for aarch64 EFI ISO images (available: pinebookpro, x13s) 187 | -T Modify the bootloader title (default: Void Linux) 188 | -v linux<version> Install a custom Linux version on ISO image (default: linux metapackage). 189 | Also accepts linux metapackages (linux-mainline, linux-lts). 190 | -K Do not remove builddir 191 | -h Show this help and exit 192 | -V Show version and exit 193 | ``` 194 | 195 | ### mkrootfs.sh 196 | 197 | ``` 198 | Usage: mkrootfs.sh [options] <arch> 199 | 200 | Generate a Void Linux ROOTFS tarball for the specified architecture. 201 | 202 | Supported architectures: 203 | i686, i686-musl, x86_64, x86_64-musl, 204 | armv5tel, armv5tel-musl, armv6l, armv6l-musl, armv7l, armv7l-musl 205 | aarch64, aarch64-musl, 206 | mipsel, mipsel-musl, 207 | ppc, ppc-musl, ppc64le, ppc64le-musl, ppc64, ppc64-musl 208 | riscv64, riscv64-musl 209 | 210 | OPTIONS 211 | -b <system-pkg> Set an alternative base-system package (default: base-container-full) 212 | -c <cachedir> Set XBPS cache directory (default: ./xbps-cachedir-<arch>) 213 | -C <file> Full path to the XBPS configuration file 214 | -r <repo> Use this XBPS repository. May be specified multiple times 215 | -o <file> Filename to write the ROOTFS to (default: automatic) 216 | -x <num> Number of threads to use for image compression (default: dynamic) 217 | -h Show this help and exit 218 | -V Show version and exit 219 | ``` 220 | 221 | ### mkplatformfs.sh 222 | 223 | ``` 224 | Usage: mkplatformfs.sh [options] <platform> <rootfs-tarball> 225 | 226 | Generates a platform-specific ROOTFS tarball from a generic Void Linux ROOTFS 227 | generated by mkrootfs.sh. 228 | 229 | Supported platforms: i686, x86_64, GCP, 230 | rpi-armv6l, rpi-armv7l, rpi-aarch64, 231 | pinebookpro, pinephone, rock64, rockpro64, asahi 232 | 233 | OPTIONS 234 | -b <system-pkg> Set an alternative base-system package (default: base-system) 235 | -c <cachedir> Set the XBPS cache directory (default: ./xbps-cachedir-<arch>) 236 | -C <file> Full path to the XBPS configuration file 237 | -k <cmd> Call '<cmd> <ROOTFSPATH>' after building the ROOTFS 238 | -n Do not compress the image, instead print out the ROOTFS directory 239 | -o <file> Filename to write the PLATFORMFS archive to (default: automatic) 240 | -p "<pkg> ..." Additional packages to install into the ROOTFS 241 | -r <repo> Use this XBPS repository. May be specified multiple times 242 | -x <num> Number of threads to use for image compression (default: dynamic) 243 | -h Show this help and exit 244 | -V Show version and exit 245 | ``` 246 | 247 | ### mkimage.sh 248 | 249 | ``` 250 | Usage: mkimage.sh [options] <platformfs-tarball> 251 | 252 | Generates a filesystem image suitable for writing with dd from a PLATFORMFS 253 | tarball generated by mkplatformfs.sh. The filesystem layout is configurable, 254 | but customization of the installed system should be done when generating the 255 | PLATFORMFS. The resulting image will have 2 partitions, /boot and /. 256 | 257 | OPTIONS 258 | -b <fstype> /boot filesystem type (default: vfat) 259 | -B <bsize> /boot filesystem size (default: 256MiB) 260 | -r <fstype> / filesystem type (default: ext4) 261 | -s <totalsize> Total image size (default: 900MiB) 262 | -o <output> Image filename (default: guessed automatically) 263 | -x <num> Number of threads to use for image compression (default: dynamic) 264 | -h Show this help and exit 265 | -V Show version and exit 266 | 267 | Accepted size suffixes: KiB, MiB, GiB, TiB, EiB. 268 | 269 | The <platformfs-tarball> argument expects a tarball generated by mkplatformfs.sh. 270 | The platform is guessed automatically by its name. 271 | ``` 272 | 273 | ### mknet.sh 274 | 275 | ``` 276 | Usage: mknet.sh [options] <rootfs-tarball> 277 | 278 | Generates a network-bootable tarball from a Void Linux ROOTFS generated by mkrootfs. 279 | 280 | OPTIONS 281 | -r <repo> Use this XBPS repository. May be specified multiple times 282 | -c <cachedir> Use this XBPS cache directory (default: ) 283 | -i <lz4|gzip|bzip2|xz> 284 | Compression type for the initramfs image (default: xz) 285 | -o <file> Output file name for the netboot tarball (default: automatic) 286 | -K linux<version> Install a custom Linux version on ISO image (default: linux metapackage) 287 | -k <keymap> Default keymap to use (default: us) 288 | -l <locale> Default locale to use (default: en_US.UTF-8) 289 | -C "<arg> ..." Add additional kernel command line arguments 290 | -T <title> Modify the bootloader title (default: Void Linux) 291 | -S <image> Set a custom splash image for the bootloader (default: data/splash.png) 292 | -h Show this help and exit 293 | -V Show version and exit 294 | ``` 295 | 296 | -------------------------------------------------------------------------------- /README.md.in: -------------------------------------------------------------------------------- 1 | # The Void Linux live image/rootfs generator and installer 2 | 3 | ## Overview 4 | 5 | This repository contains several utilities: 6 | 7 | * [*mklive.sh*](#mklivesh) - The Void Linux live image generator for x86 8 | * [*mkiso.sh*](#mkisosh) - Wrapper script to generate bootable and installable live 9 | images for i686, x86_64, and aarch64. 10 | * [*mkrootfs.sh*](#mkrootfssh) - The Void Linux rootfs generator for all platforms 11 | * [*mkplatformfs.sh*](#mkplatformfssh) - The Void Linux filesystem tool to produce 12 | a rootfs for a particular platform 13 | * [*mkimage.sh*](#mkimagesh) - The Void Linux image generator for ARM platforms 14 | * [*mknet.sh*](#mknetsh) - Script to generate netboot tarballs for Void 15 | * *installer.sh* - The Void Linux el-cheapo installer for x86 16 | * *release.sh* - interacts with GitHub CI to generate and sign images for releases 17 | 18 | ### Workflow 19 | 20 | #### Generating x86 live ISOs 21 | 22 | To generate a live ISO like the officially-published ones, use 23 | [*mkiso.sh*](#mkisosh). To generate a more basic live ISO 24 | (which does not include things like `void-installer`), use [*mklive.sh*](#mklivesh). 25 | 26 | #### Generating ROOTFS tarballs 27 | 28 | ROOTFS tarballs contain a basic Void Linux root filesystem without a kernel. 29 | These can be useful for doing a [chroot install](https://docs.voidlinux.org/installation/guides/chroot.html) 30 | or for [chroots and containers](https://docs.voidlinux.org/config/containers-and-vms/chroot.html). 31 | 32 | Use [*mkrootfs.sh*](#mkrootfssh) to generate a Void Linux ROOTFS. 33 | 34 | #### Generating platform-specific tarballs 35 | 36 | Platform-specific ROOTFS tarballs, or PLATFORMFS tarballs, contain a basic Void 37 | Linux root filesystem including a kernel. These are commonly used for bootstrapping 38 | ARM systems or other environments that require platform-specific kernels, like 39 | Raspberry Pis. 40 | 41 | First create a ROOTFS for the desired architecture, then use 42 | [*mkplatformfs.sh*](#mkplatformfssh) to generate a Void Linux PLATFORMFS. 43 | 44 | #### Generating ARM images 45 | 46 | Platform-specific filesystem images contain a basic filesystem layout (`/` and 47 | `/boot` partitions), ready to be copied to the target drive with `dd`. These are 48 | not "live" images like those available on x86 platforms, and do not need 49 | installation like live ISOs. 50 | 51 | To generate these images, first create a PLATFORMFS for the desired platform, 52 | then use [*mkimage.sh*](#mkimagesh) to generate the image. 53 | 54 | ## Dependencies 55 | 56 | Note that void-mklive is not guaranteed to work on distributions other than Void 57 | Linux, or in containers. 58 | 59 | * Compression type for the initramfs image (by default: liblz4 for lz4, xz) 60 | * xbps>=0.45 61 | * qemu-user-static binaries (for mkrootfs) 62 | * bash 63 | 64 | ## Kernel Command-line Parameters 65 | 66 | `void-mklive`-based live images support several kernel command-line arguments 67 | that can change the behavior of the live system: 68 | 69 | - `live.autologin` will skip the initial login screen on `tty1`. 70 | - `live.user` will change the username of the non-root user from the default 71 | `anon`. The password remains `voidlinux`. 72 | - `live.shell` sets the default shell for the non-root user in the live environment. 73 | - `live.accessibility` enables accessibility features like the console screenreader 74 | `espeakup` in the live environment. 75 | - `console` can be set to `ttyS0`, `hvc0`, or `hvsi0` to enable `agetty` on that 76 | serial console. 77 | - `locale.LANG` will set the `LANG` environment variable. Defaults to `en_US.UTF-8`. 78 | - `vconsole.keymap` will set the console keymap. Defaults to `us`. 79 | 80 | ### Examples: 81 | 82 | - `live.autologin live.user=foo live.shell=/bin/bash` would create the user `foo` 83 | with the default shell `/bin/bash` on boot, and log them in automatically on `tty1` 84 | - `live.shell=/bin/bash` would set the default shell for the `anon` user to `/bin/bash` 85 | - `console=ttyS0 vconsole.keymap=cf` would enable `ttyS0` and set the keymap in 86 | the console to `cf` 87 | - `locale.LANG=fr_CA.UTF-8` would set the live system's language to `fr_CA.UTF-8` 88 | 89 | ## Usage 90 | 91 | -------------------------------------------------------------------------------- /base-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | grub-btrfs 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | # NETWORKING 12 | NetworkManager 13 | ntp 14 | 15 | # UTILITIES 16 | wget 17 | bash-completion 18 | xterm 19 | htop 20 | 21 | # PACKAGE MANAGEMENT 22 | topgrade 23 | 24 | # DEVELOPMENT 25 | git 26 | 27 | # FILE SYSTEM 28 | exfat-utils 29 | fuse-exfat 30 | ntfs-3g 31 | gptfdisk 32 | btrfs-progs 33 | # TEXT EDITORS 34 | nano 35 | vim 36 | 37 | # REPOSITORIES 38 | void-repo-multilib 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /base-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "=========================" 3 | echo "| BASE VOID x86_64 |" 4 | echo " ------------------------" 5 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 6 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 7 | NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 8 | 9 | FILENAME="void-live-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | # Run mklive command with set architechure, repos and package list 16 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 17 | 18 | ((retry++)) 19 | if [[ $retry -eq 2 ]];then 20 | break 21 | fi 22 | 23 | sudo ./mklive.sh \ 24 | -a x86_64 \ 25 | -r "${CURRENT}" \ 26 | -r "${MULTILIB}" \ 27 | -I "$(pwd)/extra" \ 28 | -p "$(grep '^[^#].' base-x64.packages)" \ 29 | -T "${DESKTOP}" \ 30 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 31 | -S "NetworkManager acpid dbus" 32 | 33 | done 34 | 35 | # Make sure resulting ISO exists and sent error to webpage if not 36 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 37 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 38 | echo "ERR=1" > error-status.txt 39 | exit 1 40 | fi 41 | 42 | # Add iso file to checksum list 43 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 44 | 45 | 46 | 47 | # Check if checksum file exists, send error to webpage if not 48 | if [ ! -f sha256sums.txt ];then 49 | echo "Missing checksum file, aborting!" 50 | echo "ERR=1" > error-status.txt 51 | exit 1 52 | fi 53 | 54 | # make sure build directory exists and create it if not 55 | if [ ! -d "${BUILDDIR}" ];then 56 | mkdir ${BUILDDIR} 57 | fi 58 | 59 | # Move the iso file to the build directory 60 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 61 | -------------------------------------------------------------------------------- /build-images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | HTMLDIR="/var/www/voidbuilds.xyz/public" 4 | FILENAME="status.html" 5 | ISODIR="download" 6 | 7 | 8 | mvImages(){ 9 | # move image files to final destination 10 | 11 | PKGLISTDIR="package_lists" 12 | 13 | if [ ! -f sha256sums.txt ];then 14 | echo "checksum file not found, aborting!" 15 | exit 1 16 | fi 17 | 18 | if [ -d "${HTMLDIR}" ];then 19 | rm ${HTMLDIR}/${ISODIR}/*.iso 20 | rm ${HTMLDIR}/${ISODIR}/*.txt 21 | rm ${HTMLDIR}/${ISODIR}/*.sig 22 | mv sha256sums.txt build 23 | mv sha256sums.txt.sig build 24 | mv build/* ${HTMLDIR}/${ISODIR} 25 | else 26 | echo "${HTMLDIR}/ does not exist" 27 | fi 28 | 29 | if [ ! -d "${PKGLISTDIR}" ];then 30 | mkdir "${PKGLISTDIR}" 31 | fi 32 | 33 | rm -r ${PKGLISTDIR}/* 34 | cp gnome-x64.packages ${PKGLISTDIR}/gnome-x64.packages.txt 35 | cp base-x64.packages ${PKGLISTDIR}/base-x64.packages.txt 36 | cp cinnamon-x64.packages ${PKGLISTDIR}/cinnamon-x64.packages.txt 37 | cp e17-x64.packages ${PKGLISTDIR}/e17-x64.packages.txt 38 | cp mate-x64.packages ${PKGLISTDIR}/mate-x64.packages.txt 39 | # cp lxde-x64.packages ${PKGLISTDIR}/lxde-x64.packages.txt 40 | cp lxqt-x64.packages ${PKGLISTDIR}/lxqt-x64.packages.txt 41 | cp i3-x64.packages ${PKGLISTDIR}/i3-x64.packages.txt 42 | cp kde-x64.packages ${PKGLISTDIR}/kde-x64.packages.txt 43 | #cp gnome-x64.packages ${PKGLISTDIR}/gnome-x64.packages.txt 44 | cp xfce-x64.packages ${PKGLISTDIR}/xfce-x64.packages.txt 45 | 46 | cp -r ${PKGLISTDIR} ${HTMLDIR} 47 | 48 | return 49 | } 50 | 51 | runBuilds(){ 52 | TOTAL="9" 53 | ERR_FILE="error-status.txt" 54 | 55 | if [ -f "${ERR_FILE}" ];then 56 | echo "removing error file" 57 | rm ${ERR_FILE} 58 | fi 59 | 60 | if [ ! -z "$(ls -A build)" ];then 61 | rm build/* 62 | fi 63 | 64 | #echo "0/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 65 | 66 | echo "Building Image: Base</br>" >> ${HTMLDIR}/${FILENAME} 67 | echo "Building: Base Image..." 68 | 69 | sleep 1 70 | ./base-x64.sh 71 | 72 | if [ $(cat ${ERR_FILE}) = "ERR=1" ];then 73 | echo "<b style="color:red">Build failed for image: 'base', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 74 | rm ${ERR_FILE} 75 | ${0} -bl 76 | else 77 | echo "1/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 78 | fi 79 | 80 | echo "Building Image: Cinnamon</br>" >> ${HTMLDIR}/${FILENAME} 81 | echo " Building: Cinnamon Image..." 82 | 83 | sleep 1 84 | ./cinnamon-x64.sh 85 | 86 | if [ $(cat ${ERR_FILE}) = "ERR=1" ];then 87 | echo "<b style="color:red">Build failed for image: 'Cinnamon', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 88 | rm ${ERR_FILE} 89 | ${0} -bl 90 | else 91 | echo "2/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 92 | fi 93 | 94 | 95 | 96 | echo "Building Image: i3</br>" >> ${HTMLDIR}/${FILENAME} 97 | echo "Building: i3 image..." 98 | 99 | sleep 1 100 | ./i3-x64.sh 101 | 102 | if [ $(cat ${ERR_FILE}) = "ERR=1" ];then 103 | echo "<b style="color:red">Build failed for image: 'i3', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 104 | rm ${ERR_FILE} 105 | ${0} -bl 106 | else 107 | echo "3/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 108 | fi 109 | 110 | echo "Building Image: Enlightenment</br>" >> ${HTMLDIR}/${FILENAME} 111 | echo "Building: enlightenment image..." 112 | 113 | sleep 1 114 | ./e17-x64.sh 115 | 116 | if [ $(cat ${ERR_FILE}) = "ERR=1" ];then 117 | echo "<b style="color:red">Build failed for image: 'e17', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 118 | rm ${ERR_FILE} 119 | ${0} -bl 120 | else 121 | echo "4/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 122 | fi 123 | 124 | echo "Building Image: KDE</br>" >> ${HTMLDIR}/${FILENAME} 125 | echo "Building: Kde image..." 126 | sleep 1 127 | ./kde-x64.sh 128 | 129 | if [ $(cat ${ERR_FILE}) = "ERR=1" ];then 130 | echo "<b style="color:red">Build failed for image: 'KDE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 131 | rm ${ERR_FILE} 132 | ${0} -bl 133 | else 134 | echo "5/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 135 | fi 136 | 137 | echo "Building Image: GNOME</br>" >> ${HTMLDIR}/${FILENAME} 138 | echo "Building: GNOME image..." 139 | sleep 1 140 | ./gnome-x64.sh 141 | 142 | if [ $(cat ${ERR_FILE}) = "ERR=1" ];then 143 | echo "<b style="color:red">Build failed for image: 'GNOME', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 144 | rm ${ERR_FILE} 145 | ${0} -bl 146 | else 147 | echo "6/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 148 | fi 149 | 150 | 151 | #echo "Building Image: LXDE</br>" >> ${HTMLDIR}/${FILENAME} 152 | #echo "Building: Lxde Image..." 153 | #sleep 1 154 | #./lxde-x64.sh 155 | 156 | #if [ $(cat ${ERR_FILE}) = "ERR=1" ];then 157 | # echo "<b style="color:red">Build failed for image: 'LXDE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 158 | # rm ${ERR_FILE} 159 | # ${0} -bl 160 | #else 161 | # echo "6/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 162 | #fi 163 | 164 | echo "Building Image: LXQT</br>" >> ${HTMLDIR}/${FILENAME} 165 | echo "Building: Lxqt Image..." 166 | sleep 1 167 | ./lxqt-x64.sh 168 | 169 | if [ $(cat ${ERR_FILE}) = "ERR=1" ];then 170 | echo "<b style="color:red">Build failed for image: 'LXQT', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 171 | rm ${ERR_FILE} 172 | ${0} -bl 173 | else 174 | echo "7/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 175 | fi 176 | 177 | echo "Building Image: MATE</br>" >> ${HTMLDIR}/${FILENAME} 178 | echo "Building: Mate Image..." 179 | sleep 1 180 | ./mate-x64.sh 181 | 182 | if [ "$(cat ${ERR_FILE})" = "ERR=1" ];then 183 | echo "<b style="color:red">Build failed for image: 'MATE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 184 | rm ${ERR_FILE} 185 | ${0} -bl 186 | else 187 | echo "8/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 188 | fi 189 | 190 | echo "Building Image: XFCE</br>" >> ${HTMLDIR}/${FILENAME} 191 | echo "Building: Xfce Image..." 192 | sleep 1 193 | ./xfce-x64.sh 194 | 195 | if [ "$(cat ${ERR_FILE})" = "ERR=1" ];then 196 | echo "<b style="color:red">Build failed for image: 'XFCE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 197 | rm ${ERR_FILE} 198 | ${0} -bl 199 | else 200 | echo "9/${TOTAL} completed at $(date +%T) </br></br>" >> ${HTMLDIR}/${FILENAME} 201 | fi 202 | 203 | 204 | #echo "Building Image: DWM</br>" >> ${HTMLDIR}/${FILENAME} 205 | #echo "Building: DWM Image..." 206 | #sleep 1 207 | #./dwm-x64.sh 208 | 209 | #if [ "$(cat ${ERR_FILE})" = "ERR=1" ];then 210 | # echo "<b style="color:red">Build failed for image: 'MATE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME} 211 | # rm ${ERR_FILE} 212 | # ${0} -bl 213 | #else 214 | # echo "9/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME} 215 | #fi 216 | 217 | if [ ! -f sha256sums.txt ];then 218 | echo "sha manifest does not exist!" 219 | else 220 | echo "Signing checksum file</br>" >> ${HTMLDIR}/${FILENAME} 221 | ./sign-file.sh -f sha256sums.txt 222 | mvImages 223 | fi 224 | 225 | 226 | 227 | echo "Done!" 228 | return 229 | } 230 | 231 | 232 | genSpecs(){ 233 | HTMLDIR="/var/www/voidbuilds.xyz/public" 234 | FILENAME="specs.html" 235 | 236 | echo "<DOCTYPE! html>" > ${HTMLDIR}/${FILENAME} 237 | echo "<html>" >> ${HTMLDIR}/${FILENAME} 238 | echo "<head>" >> ${HTMLDIR}/${FILENAME} 239 | 240 | echo "<style>" >> ${HTMLDIR}/${FILENAME} 241 | echo "body {" >> ${HTMLDIR}/${FILENAME} 242 | echo "color: black;" ${HTMLDIR}/${FILENAME} 243 | echo "}" >> ${HTMLDIR}/${FILENAME} 244 | echo "h1 {" ${HTMLDIR}/${FILENAME} 245 | echo "color: #000000;" >> ${HTMLDIR}/${FILENAME} 246 | echo "</style>" >> ${HTMLDIR}/${FILENAME} 247 | echo "</head>" >> ${HTMLDIR}/${FILENAME} 248 | echo '<body text=white style="background-color: black">' >> ${HTMLDIR}/${FILENAME} 249 | echo '<H4 style="color:lightgreen">System Specs</H4>' >> ${HTMLDIR}/${FILENAME} 250 | echo "CPU Cores: 1</br>" >> ${HTMLDIR}/${FILENAME} 251 | echo "Disk Size: $(df -h| tr -s ' ' $'\t' | grep vda1 | cut -f2)</br>" >> ${HTMLDIR}/${FILENAME} 252 | echo "Disk Space Used: $(df | tr -s ' ' $'\t' | grep vda1 | cut -f5)</br>" >> ${HTMLDIR}/${FILENAME} 253 | echo "Memory Size: $(free -m| tr -s ' ' $'\t' | grep Mem: | cut -f2) Mb</br>" >> ${HTMLDIR}/${FILENAME} 254 | echo "Memory Free: $(free -m| tr -s ' ' $'\t' | grep Mem: | cut -f4) Mb</br>" >> ${HTMLDIR}/${FILENAME} 255 | echo "Swap Size: $(free -m| tr -s ' ' $'\t' | grep Swap: | cut -f2) Mb</br>" >> ${HTMLDIR}/${FILENAME} 256 | echo "Swap Used: $(free -m| tr -s ' ' $'\t' | grep Swap: | cut -f3) Mb</br></br>" >> ${HTMLDIR}/${FILENAME} 257 | 258 | echo "<H4 style="color:lightgreen">Live Image Specs</H4>" >> ${HTMLDIR}/${FILENAME} 259 | echo "<h5>System</h5>" 260 | echo "Kernel Version: $(xbps-query -R linux| grep pkgver | sed 's/pkgver://') series</br>" >> ${HTMLDIR}/${FILENAME} 261 | echo "GlibC Version: $(xbps-query -R glibc| grep pkgver | sed 's/pkgver://')</br></br>" >> ${HTMLDIR}/${FILENAME} 262 | echo "AMDGPU Version: $(xbps-query -R xf86-video-amdgpu| grep pkgver | sed 's/pkgver://')</br></br>" >> ${HTMLDIR}/${FILENAME} 263 | echo "</html>" >> ${HTMLDIR}/${FILENAME} 264 | } 265 | 266 | genHtml(){ 267 | FILENAME="status.html" 268 | 269 | 270 | 271 | echo "<DOCTYPE! html>" > ${HTMLDIR}/${FILENAME} 272 | echo "<html>" >> ${HTMLDIR}/${FILENAME} 273 | echo "<head>" >> ${HTMLDIR}/${FILENAME} 274 | echo '<script type="text/javascript">' >> ${HTMLDIR}/${FILENAME} 275 | echo 'function timedRefresh(timeoutPeriod) {' >> ${HTMLDIR}/${FILENAME} 276 | echo 'setTimeout("location.reload(true);",timeoutPeriod);' >> ${HTMLDIR}/${FILENAME} 277 | echo '}' >> ${HTMLDIR}/${FILENAME} 278 | 279 | echo 'window.onload = timedRefresh(60000);' >> ${HTMLDIR}/${FILENAME} 280 | echo "</script>" >> ${HTMLDIR}/${FILENAME} 281 | 282 | echo "<style>" >> ${HTMLDIR}/${FILENAME} 283 | echo "body {" >> ${HTMLDIR}/${FILENAME} 284 | echo "color: black;" ${HTMLDIR}/${FILENAME} 285 | echo "}" >> ${HTMLDIR}/${FILENAME} 286 | echo "h1 {" ${HTMLDIR}/${FILENAME} 287 | echo "color: #FFFFFF;" >> ${HTMLDIR}/${FILENAME} 288 | echo "}" >> ${HTMLDIR}/${FILENAME} 289 | 290 | echo "</style>" >> ${HTMLDIR}/${FILENAME} 291 | 292 | echo "</head>" >> ${HTMLDIR}/${FILENAME} 293 | echo '<body text=white style="background-color: black">' >> ${HTMLDIR}/${FILENAME} 294 | echo "<H5>This page will refresh every 60 seconds</H5></br>" >> ${HTMLDIR}/${FILENAME} 295 | 296 | 297 | echo "<H4 style="color:cyan">Build process initiated at:</H4> $(date +%R) MST ($(date -u +%R) UTC) on $(date +%D)" >> ${HTMLDIR}/${FILENAME} 298 | echo "<H4 style="color:cyan">ETA: 2 hours from initiation time</H4></br>" >> ${HTMLDIR}/${FILENAME} 299 | echo "<H4 style="color:yellow">Note: ISO files will not appear in downloads until all have been successfully built</H4></br>" >> ${HTMLDIR}/${FILENAME} 300 | 301 | echo "<hr>" >> ${HTMLDIR}/${FILENAME} 302 | 303 | #cat ${HTMLDIR}/${FILENAME} 304 | 305 | echo "<H3 style="color:orange">Status</H3>" >> ${HTMLDIR}/${FILENAME} 306 | 307 | runBuilds 308 | 309 | echo "Disk Space Used: $(df | tr -s ' ' $'\t' | grep vda1 | cut -f5)</br>" >> ${HTMLDIR}/${FILENAME} 310 | echo "All images were completed at $(date +%R) MST ($(date -u +%R) UTC)</br>" >> ${HTMLDIR}/${FILENAME} 311 | echo "Next build round in 24 hours</b>" >> ${HTMLDIR}/${FILENAME} 312 | echo '<a href="https://voidbuilds.xyz/landing.html">Return to landing page</a>' >> ${HTMLDIR}/${FILENAME} 313 | echo "</body>" >> ${HTMLDIR}/${FILENAME} 314 | echo "</html>" >> ${HTMLDIR}/${FILENAME} 315 | 316 | return 317 | } 318 | 319 | cleanUp(){ 320 | # Clean: mklive xbps cache, build dir| Remove: old kernels, orphan packages 321 | 322 | echo "Checking build directory for unsucessful builds...." 323 | BUILDDIR="build" 324 | if [ -d "${BUILDDIR}" ];then 325 | if [ "$(ls | wc -l $BUILDDIR)" = "9" ];then 326 | echo "Found 9 files in ${BUILDDIR}" 327 | echo "Moving 9 files to public downloads..." 328 | mvImages 329 | else 330 | echo "Did not find all 9 files in build directory..." 331 | echo "Removing incomplete builds to space space..." 332 | rm ${BUILDDIR}/*.iso 333 | fi 334 | 335 | else 336 | echo "${BUILDDIR} is missing!" 337 | 338 | 339 | fi 340 | 341 | echo "[Cleaning up...]" 342 | echo "Checking for local XBPS cache dir..." 343 | 344 | if [ -d xbps-cachedir-x86_64 ];then 345 | echo "Removing local XBPS cache dir" 346 | rm -r xbps-cachedir-x86_64/ 347 | fi 348 | 349 | echo "Removing mklive tmp directories..." 350 | rm -r mklive-build.* 351 | 352 | echo "Removing orphans..." 353 | 354 | xbps-remove -yo 355 | 356 | echo "Clearing system XBPS cache files..." 357 | 358 | tux c 359 | 360 | echo "Checking for unused image files..." 361 | 362 | 363 | 364 | echo "Checking for and removing unused kernels..." 365 | 366 | vkpurge rm all 367 | 368 | } 369 | 370 | case ${1} in 371 | 372 | 373 | -bl|--build-later) 374 | while true;do 375 | snooze -v && cleanUp && genSpecs && genHtml && cleanUp && genSpecs 376 | done 377 | ;; 378 | 379 | -bn|--build-now) 380 | while true;do 381 | cleanUp && genSpecs && genHtml && cleanUp && genSpecs && snooze -v 382 | done 383 | ;; 384 | 385 | -c|-clean) 386 | cleanUp 387 | ;; 388 | 389 | *) 390 | echo -e """\nusage: ${0} [-bn, -bl]\n 391 | echo -e \n-bn run builds now, snooze after\n 392 | echo -e -bl snooze now, run builds after\n""" 393 | echo 394 | ;; 395 | esac 396 | -------------------------------------------------------------------------------- /cinnamon-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg-minimal 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | #intel-ucode 17 | setxkbmap 18 | xauth 19 | font-misc-misc 20 | terminus-font 21 | dejavu-fonts-ttf 22 | alsa-plugins-pulseaudio 23 | 24 | #DISPLAY MANAGER 25 | lightdm 26 | lightdm-gtk3-greeter 27 | 28 | #USERLAND PACKAGES 29 | gptfdisk 30 | gettext 31 | elogind 32 | dbus-elogind 33 | dbus-elogind-x11 34 | exfat-utils 35 | fuse-exfat 36 | wget 37 | micro 38 | xdg-utils 39 | xdg-desktop-portal 40 | xdg-desktop-portal-gtk 41 | xdg-desktop-portal-kde 42 | xdg-user-dirs 43 | xdg-user-dirs-gtk 44 | #libappindicator 45 | AppStream 46 | libvdpau-va-gl 47 | vdpauinfo 48 | pipewire 49 | wireplumber 50 | gstreamer1-pipewire 51 | upower 52 | flatpak 53 | git 54 | vim 55 | dtrx 56 | unzip 57 | p7zip 58 | #unrar 59 | bash-completion 60 | cinnamon 61 | xrandr 62 | colord 63 | gnome-terminal 64 | alsa-utils 65 | pavucontrol 66 | xterm 67 | htop 68 | topgrade 69 | ntp 70 | octoxbps 71 | void-repo-multilib 72 | gvfs-afc 73 | gvfs-mtp 74 | gvfs-smb 75 | udisks2 76 | ntfs-3g 77 | gnome-keyring 78 | network-manager-applet 79 | firefox 80 | adwaita-icon-theme 81 | rsync 82 | psmisc 83 | dkms 84 | unzip 85 | -------------------------------------------------------------------------------- /cinnamon-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="cinnamon" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 7 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 8 | NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | 16 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 17 | 18 | ((retry++)) 19 | if [[ $retry -gt 2 ]];then 20 | break 21 | fi 22 | 23 | sudo ./mklive.sh \ 24 | -a "x86_64" \ 25 | -r "${CURRENT}" \ 26 | -r "${MULTILIB}" \ 27 | -I "$(pwd)/extra" \ 28 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 29 | -T "Void Linux ${DESKTOP} Unofficial" \ 30 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 31 | -S "dbus elogind lightdm NetworkManager polkitd" 32 | done 33 | 34 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 35 | retries=${1} 36 | until [[ $retries -gt 2 ]];do 37 | echo "Retrying build ${retries}" 38 | ((retries++)) 39 | bash ${0} ${retries} 40 | 41 | done 42 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 43 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 44 | echo "ERR=1" > error-status.txt 45 | exit 1 46 | fi 47 | fi 48 | 49 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 50 | 51 | if [ ! -f sha256sums.txt ];then 52 | echo "Missing checksum file, aborting!" 53 | echo "ERR=1" > error-status.txt 54 | exit 1 55 | fi 56 | 57 | if [ ! -d "${BUILDDIR}" ];then 58 | mkdir ${BUILDDIR} 59 | fi 60 | 61 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 62 | -------------------------------------------------------------------------------- /container/Containerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/void-linux/void-glibc-full:latest 2 | 3 | ARG MIRROR="https://repo-default.voidlinux.org/" 4 | 5 | RUN xbps-install -SyuR "${MIRROR}/current" xbps \ 6 | && xbps-install -yuR "${MIRROR}/current" \ 7 | && xbps-install -yuR "${MIRROR}/current" \ 8 | bash make git kmod xz lzo qemu-user-arm qemu-user-aarch64 binfmt-support outils dosfstools e2fsprogs 9 | 10 | CMD ["/bin/sh"] 11 | -------------------------------------------------------------------------------- /container/docker-bake.hcl: -------------------------------------------------------------------------------- 1 | variable "MIRROR" { 2 | default = "https://repo-ci.voidlinux.org/" 3 | } 4 | 5 | target "docker-metadata-action" {} 6 | 7 | target "_common" { 8 | inherits = ["docker-metadata-action"] 9 | dockerfile = "container/Containerfile" 10 | cache-to = ["type=local,dest=/tmp/buildx-cache"] 11 | cache-from = ["type=local,src=/tmp/buildx-cache"] 12 | args = { 13 | "MIRROR" = "${MIRROR}" 14 | } 15 | } 16 | 17 | target "void-mklive" { 18 | inherits = ["_common"] 19 | platforms = ["linux/amd64", "linux/arm64"] 20 | } 21 | -------------------------------------------------------------------------------- /data/issue: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | 3 | Welcome to the Void Linux Live system. Two users are available to log in: 4 | 5 | - root:voidlinux 6 | - anon:voidlinux 7 | 8 | The `anon` user additionally has `sudo(8)` permissions to run any command 9 | without a password. 10 | 11 | To start the installation please type: 12 | 13 | # void-installer 14 | 15 | and follow the on-screen instructions. To install additional software make 16 | sure to configure your network interface and then use: 17 | 18 | - xbps-install(1) to install/update packages 19 | - xbps-query(1) to query for package info 20 | 21 | The Void Linux Handbook is also available for offline access in multiple 22 | formats, and can be accessed with the `void-docs(1)` utility. 23 | 24 | Thanks for using Void Linux. 25 | 26 | https://www.voidlinux.org 27 | 28 | ############################################################################### 29 | -------------------------------------------------------------------------------- /data/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/void-builds/void-mklive/d179f04efc46915f63abd81960182d48bc6d3d15/data/splash.png -------------------------------------------------------------------------------- /dracut/autoinstaller/autoinstall.cfg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Void Linux Automatic Install Configuration 3 | 4 | # === 5 | # Disk Configuration 6 | # === 7 | # disk: the disk to install to 8 | # default: the first disk that isn't the installer 9 | #disk=/dev/hda 10 | 11 | # bootpartitionsize: controls how large the boot partition will be 12 | # default: 500M 13 | #bootpartitionsize=500M 14 | 15 | # swapsize: how large should the swap partition be 16 | # default: equal to the installed physical memory 17 | #swapsize= 18 | 19 | # === 20 | # XBPS Configuration 21 | # === 22 | # xbpsrepository: which repo should the install pull from 23 | # default: https://repo-default.voidlinux.org/current 24 | #xbpsrepository="https://repo-default.voidlinux.org/current" 25 | 26 | # pkgs: additional packages to install into the target 27 | # default: none 28 | #pkgs="" 29 | 30 | # === 31 | # Default User 32 | # === 33 | # username: the username of the user to be created 34 | # default: voidlinux 35 | #username="" 36 | 37 | # password: password to set for the new user 38 | # default: unset (will prompt during install) 39 | # Warning: This does not work in musl! 40 | #password="" 41 | 42 | # === 43 | # Misc. Options 44 | # === 45 | # timezone: Timezone in TZ format 46 | # default: America/Chicago 47 | #timezone="America/Chicago" 48 | 49 | # keymap: Keymap to use by default 50 | # default: us 51 | #keymap="us" 52 | 53 | # locale: initial glibc locale 54 | # default: en_US.UTF-8 55 | #libclocale=en.US.UTF-8 56 | 57 | # hostname: static hostname for the system 58 | # default: derived from DNS 59 | #hostname=VoidLinux 60 | 61 | # end_action: what to do at the end of the install 62 | # default: shutdown 63 | # alternate values: reboot, script, func 64 | #end_action=shutdown 65 | 66 | # end_script: script to optionally run at end of install 67 | # the user script must reside somewhere xbps-uhelper fetch 68 | # can retrieve it from 69 | # default: not set 70 | #end_script="" 71 | 72 | # end_function: a function to optionally be run at 73 | # the end of the install. 74 | #end_function() { 75 | # 76 | #} 77 | -------------------------------------------------------------------------------- /dracut/autoinstaller/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh 4 | 5 | # These functions pulled from void's excellent mklive.sh 6 | VAI_info_msg() { 7 | printf "\033[1m%s\n\033[m" "$@" 8 | } 9 | 10 | VAI_print_step() { 11 | CURRENT_STEP=$((CURRENT_STEP+1)) 12 | VAI_info_msg "[${CURRENT_STEP}/${STEP_COUNT}] $*" 13 | } 14 | 15 | # ----------------------- Install Functions ------------------------ 16 | 17 | VAI_welcome() { 18 | clear 19 | printf "=============================================================\n" 20 | printf "================ Void Linux Auto-Installer ==================\n" 21 | printf "=============================================================\n" 22 | } 23 | 24 | VAI_udev_settle() { 25 | /usr/bin/udevd --daemon 26 | /usr/bin/udevadm trigger --action=add --type=subsystems 27 | /usr/bin/udevadm trigger --action=add --type=devices 28 | /usr/bin/udevadm settle 29 | } 30 | 31 | VAI_get_address() { 32 | mkdir -p /var/lib/dhclient 33 | 34 | # This will fork, but it means that over a slow link the DHCP 35 | # lease will still be maintained. It also doesn't have a 36 | # hard-coded privsep user in it like dhcpcd. 37 | dhclient 38 | } 39 | 40 | VAI_partition_disk() { 41 | # Paritition Disk 42 | sfdisk "${disk}" <<EOF 43 | ,$bootpartitionsize 44 | ,${swapsize}K 45 | ; 46 | EOF 47 | } 48 | 49 | VAI_format_disk() { 50 | # Make Filesystems 51 | mkfs.ext4 -F "${disk}1" 52 | mkfs.ext4 -F "${disk}3" 53 | if [ "${swapsize}" -ne 0 ] ; then 54 | mkswap -f "${disk}2" 55 | fi 56 | } 57 | 58 | VAI_mount_target() { 59 | # Mount targetfs 60 | mkdir -p "${target}" 61 | mount "${disk}3" "${target}" 62 | mkdir "${target}/boot" 63 | mount "${disk}1" "${target}/boot" 64 | } 65 | 66 | VAI_install_xbps_keys() { 67 | mkdir -p "${target}/var/db/xbps/keys" 68 | cp /var/db/xbps/keys/* "${target}/var/db/xbps/keys" 69 | } 70 | 71 | VAI_install_base_system() { 72 | # Install a base system 73 | XBPS_ARCH="${XBPS_ARCH}" xbps-install -Sy -R "${xbpsrepository}" -r /mnt base-system grub 74 | 75 | # Install additional packages 76 | if [ -n "${pkgs}" ] ; then 77 | # shellcheck disable=SC2086 78 | XBPS_ARCH="${XBPS_ARCH}" xbps-install -Sy -R "${xbpsrepository}" -r /mnt ${pkgs} 79 | fi 80 | } 81 | 82 | VAI_prepare_chroot() { 83 | # Mount dev, bind, proc, etc into chroot 84 | mount -t proc proc "${target}/proc" 85 | mount --rbind /sys "${target}/sys" 86 | mount --rbind /dev "${target}/dev" 87 | } 88 | 89 | VAI_configure_sudo() { 90 | # Give wheel sudo 91 | echo "%wheel ALL=(ALL:ALL) ALL" > "${target}/etc/sudoers.d/00-wheel" 92 | chmod 0440 "${target}/etc/sudoers.d/00-wheel" 93 | } 94 | 95 | VAI_correct_root_permissions() { 96 | chroot "${target}" chown root:root / 97 | chroot "${target}" chmod 755 / 98 | } 99 | 100 | VAI_configure_hostname() { 101 | # Set the hostname 102 | echo "${hostname}" > "${target}/etc/hostname" 103 | } 104 | 105 | VAI_configure_rc_conf() { 106 | # Set the value of various tokens 107 | sed -i "s:Europe/Madrid:${timezone}:" "${target}/etc/rc.conf" 108 | sed -i "s:\"es\":\"${keymap}\":" "${target}/etc/rc.conf" 109 | 110 | # Activate various tokens 111 | sed -i "s:#HARDWARECLOCK:HARDWARECLOCK:" "${target}/etc/rc.conf" 112 | sed -i "s:#TIMEZONE:TIMEZONE:" "${target}/etc/rc.conf" 113 | sed -i "s:#KEYMAP:KEYMAP:" "${target}/etc/rc.conf" 114 | } 115 | 116 | VAI_add_user() { 117 | chroot "${target}" useradd -m -s /bin/bash -U -G wheel,users,audio,video,cdrom,input "${username}" 118 | if [ -z "${password}" ] ; then 119 | chroot "${target}" passwd "${username}" 120 | else 121 | # For reasons that remain unclear, this does not work in musl 122 | echo "${username}:${password}" | chpasswd -c SHA512 -R "${target}" 123 | fi 124 | } 125 | 126 | VAI_configure_grub() { 127 | # Set hostonly 128 | echo "hostonly=yes" > "${target}/etc/dracut.conf.d/hostonly.conf" 129 | 130 | # Choose the newest kernel 131 | kernel_version="$(chroot "${target}" xbps-query linux | awk -F "[-_]" '/pkgver/ {print $2}')" 132 | 133 | # Install grub 134 | chroot "${target}" grub-install "${disk}" 135 | chroot "${target}" xbps-reconfigure -f "linux${kernel_version}" 136 | 137 | # Correct the grub install 138 | chroot "${target}" update-grub 139 | } 140 | 141 | VAI_configure_fstab() { 142 | # Grab UUIDs 143 | uuid1="$(blkid -s UUID -o value "${disk}1")" 144 | uuid2="$(blkid -s UUID -o value "${disk}2")" 145 | uuid3="$(blkid -s UUID -o value "${disk}3")" 146 | 147 | # Installl UUIDs into /etc/fstab 148 | echo "UUID=$uuid3 / ext4 defaults,errors=remount-ro 0 1" >> "${target}/etc/fstab" 149 | echo "UUID=$uuid1 /boot ext4 defaults 0 2" >> "${target}/etc/fstab" 150 | if [ "${swapsize}" -ne 0 ] ; then 151 | echo "UUID=$uuid2 swap swap defaults 0 0" >> "${target}/etc/fstab" 152 | fi 153 | } 154 | 155 | VAI_configure_locale() { 156 | # Set the libc-locale iff glibc 157 | case "${XBPS_ARCH}" in 158 | *-musl) 159 | VAI_info_msg "Glibc locales are not supported on musl" 160 | ;; 161 | *) 162 | sed -i "/${libclocale}/s/#//" "${target}/etc/default/libc-locales" 163 | 164 | chroot "${target}" xbps-reconfigure -f glibc-locales 165 | ;; 166 | esac 167 | } 168 | 169 | VAI_end_action() { 170 | case $end_action in 171 | reboot) 172 | VAI_info_msg "Rebooting the system" 173 | sync 174 | umount -R "${target}" 175 | reboot -f 176 | ;; 177 | shutdown) 178 | VAI_info_msg "Shutting down the system" 179 | sync 180 | umount -R "${target}" 181 | poweroff -f 182 | ;; 183 | script) 184 | VAI_info_msg "Running user provided script" 185 | xbps-uhelper fetch "${end_script}>/script" 186 | chmod +x /script 187 | target=${target} xbpsrepository=${xbpsrepository} /script 188 | ;; 189 | func) 190 | VAI_info_msg "Running user provided function" 191 | end_function 192 | ;; 193 | esac 194 | } 195 | 196 | VAI_configure_autoinstall() { 197 | # -------------------------- Setup defaults --------------------------- 198 | bootpartitionsize="500M" 199 | disk="$(lsblk -ipo NAME,TYPE,MOUNTPOINT | awk '{if ($2=="disk") {disks[$1]=0; last=$1} if ($3=="/") {disks[last]++}} END {for (a in disks) {if(disks[a] == 0){print a; break}}}')" 200 | hostname="$(ip -4 -o -r a | awk -F'[ ./]' '{x=$7} END {print x}')" 201 | # XXX: Set a manual swapsize here if the default doesn't fit your use case 202 | swapsize="$(awk -F"\n" '/MemTotal/ {split($0, b, " "); print b[2] }' /proc/meminfo)"; 203 | target="/mnt" 204 | timezone="America/Chicago" 205 | keymap="us" 206 | libclocale="en_US.UTF-8" 207 | username="voidlinux" 208 | end_action="shutdown" 209 | end_script="/bin/true" 210 | 211 | XBPS_ARCH="$(xbps-uhelper arch)" 212 | case $XBPS_ARCH in 213 | *-musl) 214 | xbpsrepository="https://repo-default.voidlinux.org/current/musl" 215 | ;; 216 | *) 217 | xbpsrepository="https://repo-default.voidlinux.org/current" 218 | ;; 219 | esac 220 | 221 | # --------------- Pull config URL out of kernel cmdline ------------------------- 222 | set +e 223 | if getargbool 0 autourl ; then 224 | set -e 225 | xbps-uhelper fetch "$(getarg autourl)>/etc/autoinstall.cfg" 226 | 227 | else 228 | set -e 229 | mv /etc/autoinstall.default /etc/autoinstall.cfg 230 | fi 231 | 232 | # Read in the resulting config file which we got via some method 233 | if [ -f /etc/autoinstall.cfg ] ; then 234 | VAI_info_msg "Reading configuration file" 235 | . ./etc/autoinstall.cfg 236 | fi 237 | 238 | # Bail out if we didn't get a usable disk 239 | if [ -z "$disk" ] ; then 240 | die "No valid disk!" 241 | fi 242 | } 243 | 244 | VAI_main() { 245 | CURRENT_STEP=0 246 | STEP_COUNT=17 247 | 248 | VAI_welcome 249 | 250 | VAI_print_step "Wait on hardware" 251 | VAI_udev_settle 252 | 253 | VAI_print_step "Bring up the network" 254 | VAI_get_address 255 | 256 | VAI_print_step "Configuring installer" 257 | VAI_configure_autoinstall 258 | 259 | VAI_print_step "Configuring disk using scheme 'Atomic'" 260 | VAI_partition_disk 261 | VAI_format_disk 262 | 263 | VAI_print_step "Mounting the target filesystems" 264 | VAI_mount_target 265 | 266 | VAI_print_step "Installing XBPS keys" 267 | VAI_install_xbps_keys 268 | 269 | VAI_print_step "Installing the base system" 270 | VAI_install_base_system 271 | 272 | VAI_print_step "Granting sudo to default user" 273 | VAI_configure_sudo 274 | 275 | VAI_print_step "Setting hostname" 276 | VAI_configure_hostname 277 | 278 | VAI_print_step "Configure rc.conf" 279 | VAI_configure_rc_conf 280 | 281 | VAI_print_step "Preparing the chroot" 282 | VAI_prepare_chroot 283 | 284 | VAI_print_step "Fix ownership of /" 285 | VAI_correct_root_permissions 286 | 287 | VAI_print_step "Adding default user" 288 | VAI_add_user 289 | 290 | VAI_print_step "Configuring GRUB" 291 | VAI_configure_grub 292 | 293 | VAI_print_step "Configuring /etc/fstab" 294 | VAI_configure_fstab 295 | 296 | VAI_print_step "Configuring libc-locales" 297 | VAI_configure_locale 298 | 299 | VAI_print_step "Performing end-action" 300 | VAI_end_action 301 | } 302 | 303 | # If we are using the autoinstaller, launch it 304 | if getargbool 0 auto ; then 305 | set -e 306 | VAI_main 307 | # Very important to release this before returning to dracut code 308 | set +e 309 | fi 310 | 311 | -------------------------------------------------------------------------------- /dracut/autoinstaller/module-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | check() { 6 | return 255 7 | } 8 | 9 | depends() { 10 | echo network 11 | } 12 | 13 | install() { 14 | inst /usr/bin/awk 15 | inst /usr/bin/chmod 16 | inst /usr/bin/chroot 17 | inst /usr/bin/clear 18 | inst /usr/bin/cp 19 | inst /usr/bin/chpasswd 20 | inst /usr/bin/dhclient 21 | inst /usr/bin/dhclient-script 22 | inst /usr/bin/halt 23 | inst /usr/bin/install 24 | inst /usr/bin/lsblk 25 | inst /usr/bin/mkdir 26 | inst /usr/bin/mkfs.ext4 27 | inst /usr/bin/mkswap 28 | inst /usr/bin/mount 29 | inst /usr/bin/resolvconf 30 | inst /usr/bin/sfdisk 31 | inst /usr/bin/sync 32 | inst /usr/bin/xbps-install 33 | inst /usr/bin/xbps-uhelper 34 | inst /usr/bin/xbps-query 35 | 36 | inst_multiple /var/db/xbps/keys/* 37 | inst_multiple /usr/share/xbps.d/* 38 | 39 | inst_multiple /etc/ssl/certs/* 40 | inst /etc/ssl/certs.pem 41 | 42 | inst_hook pre-mount 01 "$moddir/install.sh" 43 | inst_hook cmdline 99 "$moddir/parse-vai-root.sh" 44 | inst "$moddir/autoinstall.cfg" /etc/autoinstall.default 45 | } 46 | -------------------------------------------------------------------------------- /dracut/autoinstaller/parse-vai-root.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "${root}" = "vai" ] ; then 3 | rootok=1 4 | fi 5 | -------------------------------------------------------------------------------- /dracut/netmenu/module-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | check() { 6 | return 255 7 | } 8 | 9 | depends() { 10 | echo network 11 | } 12 | 13 | install() { 14 | inst /usr/bin/awk 15 | inst /usr/bin/basename 16 | inst /usr/bin/bash 17 | inst /usr/bin/cat 18 | inst /usr/bin/cfdisk 19 | inst /usr/bin/chroot 20 | inst /usr/bin/clear 21 | inst /usr/bin/cut 22 | inst /usr/bin/cp 23 | inst /usr/bin/dhcpcd 24 | inst /usr/bin/dialog 25 | inst /usr/bin/echo 26 | inst /usr/bin/env 27 | inst /usr/bin/find 28 | inst /usr/bin/find 29 | inst /usr/bin/grep 30 | inst /usr/bin/head 31 | inst /usr/bin/id 32 | inst /usr/bin/ln 33 | inst /usr/bin/ls 34 | inst /usr/bin/lsblk 35 | inst /usr/bin/mke2fs 36 | inst /usr/bin/mkfs.btrfs 37 | inst /usr/bin/mkfs.f2fs 38 | inst /usr/bin/mkfs.vfat 39 | inst /usr/bin/mkfs.xfs 40 | inst /usr/bin/mkswap 41 | inst /usr/bin/mktemp 42 | inst /usr/bin/mount 43 | inst /usr/bin/reboot 44 | inst /usr/bin/rm 45 | inst /usr/bin/sed 46 | inst /usr/bin/sh 47 | inst /usr/bin/sort 48 | inst /usr/bin/sync 49 | inst /usr/bin/stdbuf 50 | inst /usr/bin/sleep 51 | inst /usr/bin/touch 52 | inst /usr/bin/xargs 53 | inst /usr/bin/xbps-install 54 | inst /usr/bin/xbps-reconfigure 55 | inst /usr/bin/xbps-remove 56 | inst /usr/bin/xbps-uhelper 57 | 58 | inst /usr/libexec/dhcpcd-hooks/20-resolv.conf 59 | inst /usr/libexec/dhcpcd-run-hooks 60 | inst /usr/libexec/coreutils/libstdbuf.so 61 | 62 | inst_multiple /var/db/xbps/keys/* 63 | inst_multiple /usr/share/xbps.d/* 64 | inst_multiple /usr/share/zoneinfo/*/* 65 | 66 | inst_multiple /etc/ssl/certs/* 67 | inst /etc/ssl/certs.pem 68 | 69 | inst /etc/default/libc-locales 70 | inst /etc/group 71 | 72 | # We need to remove a choice here since the installer's initrd 73 | # can't function as a local source. Strictly we shouldn't be 74 | # doing this from dracut's installation function, but this is the 75 | # last place that file really exists 'on disk' in the sense that 76 | # we can modify it, so this change is applied here. 77 | sed -i '/Packages from ISO image/d' "$moddir/installer.sh" 78 | 79 | # The system doesn't have a real init up so the reboot is going to 80 | # be rough, we make it an option though if the end user wants to 81 | # do this... 82 | sed -i "s:shutdown -r now:sync && reboot -f:" "$moddir/installer.sh" 83 | 84 | inst "$moddir/installer.sh" /usr/bin/void-installer 85 | inst_hook pre-mount 05 "$moddir/netmenu.sh" 86 | } 87 | -------------------------------------------------------------------------------- /dracut/netmenu/netmenu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | dialog --colors --keep-tite --no-shadow --no-mouse \ 4 | --backtitle "\Zb\Z7Void Linux installation -- https://www.voidlinux.org\Zn" \ 5 | --cancel-label "Reboot" --aspect 20 \ 6 | --menu "Select an Action:" 10 50 2 \ 7 | "Install" "Run void-installer" \ 8 | "Shell" "Run dash" \ 9 | 2>/tmp/netmenu.action 10 | 11 | if [ ! $? ] ; then 12 | reboot -f 13 | fi 14 | 15 | case $(cat /tmp/netmenu.action) in 16 | "Install") /usr/bin/void-installer ; exec sh ;; 17 | "Shell") exec sh ;; 18 | esac 19 | -------------------------------------------------------------------------------- /dracut/vmklive/59-mtd.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM!="block", GOTO="ps_end" 2 | ACTION!="add|change", GOTO="ps_end" 3 | # Also don't process disks that are slated to be a multipath device 4 | ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end" 5 | 6 | KERNEL=="mtdblock[0-9]*", IMPORT BLKID 7 | 8 | LABEL="ps_end" 9 | -------------------------------------------------------------------------------- /dracut/vmklive/61-mtd.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM!="block", GOTO="pss_end" 2 | ACTION!="add|change", GOTO="pss_end" 3 | # Also don't process disks that are slated to be a multipath device 4 | ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end" 5 | 6 | ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss" 7 | KERNEL=="mtdblock*", GOTO="do_pss" 8 | 9 | GOTO="pss_end" 10 | 11 | LABEL="do_pss" 12 | # by-path (parent device path) 13 | ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT PATH_ID 14 | ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" 15 | ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" 16 | 17 | # by-label/by-uuid links (filesystem metadata) 18 | ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" 19 | ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" 20 | LABEL="pss_end" 21 | -------------------------------------------------------------------------------- /dracut/vmklive/accessibility.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh 6 | 7 | if getargbool 0 live.accessibility; then 8 | [ -d "${NEWROOT}/etc/sv/espeakup" ] && ln -s "/etc/sv/espeakup" "${NEWROOT}/etc/runit/runsvdir/current/" 9 | [ -d "${NEWROOT}/etc/sv/brltty" ] && ln -s "/etc/sv/brltty" "${NEWROOT}/etc/runit/runsvdir/current/" 10 | fi 11 | -------------------------------------------------------------------------------- /dracut/vmklive/adduser.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | if ! type getarg >/dev/null 2>&1 && ! type getargbool >/dev/null 2>&1; then 6 | . /lib/dracut-lib.sh 7 | fi 8 | 9 | echo void-live > ${NEWROOT}/etc/hostname 10 | 11 | USERNAME=$(getarg live.user) 12 | USERSHELL=$(getarg live.shell) 13 | 14 | [ -z "$USERNAME" ] && USERNAME=anon 15 | [ -x $NEWROOT/bin/bash -a -z "$USERSHELL" ] && USERSHELL=/bin/bash 16 | [ -z "$USERSHELL" ] && USERSHELL=/bin/sh 17 | 18 | # Create /etc/default/live.conf to store USER. 19 | echo "USERNAME=$USERNAME" >> ${NEWROOT}/etc/default/live.conf 20 | chmod 644 ${NEWROOT}/etc/default/live.conf 21 | 22 | if ! grep -q ${USERSHELL} ${NEWROOT}/etc/shells ; then 23 | echo ${USERSHELL} >> ${NEWROOT}/etc/shells 24 | fi 25 | 26 | # Create new user and remove password. We'll use autologin by default. 27 | chroot ${NEWROOT} useradd -m -c $USERNAME -G audio,video,wheel -s $USERSHELL $USERNAME 28 | chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1 29 | 30 | # Setup default root/user password (voidlinux). 31 | chroot ${NEWROOT} sh -c 'echo "root:voidlinux" | chpasswd -c SHA512' 32 | chroot ${NEWROOT} sh -c "echo "$USERNAME:voidlinux" | chpasswd -c SHA512" 33 | 34 | # Enable sudo permission by default. 35 | if [ -f ${NEWROOT}/etc/sudoers ]; then 36 | echo "${USERNAME} ALL=(ALL:ALL) NOPASSWD: ALL" > "${NEWROOT}/etc/sudoers.d/99-void-live" 37 | fi 38 | 39 | if [ -d ${NEWROOT}/etc/polkit-1 ]; then 40 | # If polkit is installed allow users in the wheel group to run anything. 41 | cat > ${NEWROOT}/etc/polkit-1/rules.d/void-live.rules <<_EOF 42 | polkit.addAdminRule(function(action, subject) { 43 | return ["unix-group:wheel"]; 44 | }); 45 | 46 | polkit.addRule(function(action, subject) { 47 | if (subject.isInGroup("wheel")) { 48 | return polkit.Result.YES; 49 | } 50 | }); 51 | _EOF 52 | chroot ${NEWROOT} chown polkitd:polkitd /etc/polkit-1/rules.d/void-live.rules 53 | fi 54 | 55 | if getargbool 0 live.autologin; then 56 | sed -i "s,GETTY_ARGS=\"--noclear\",GETTY_ARGS=\"--noclear -a $USERNAME\",g" ${NEWROOT}/etc/sv/agetty-tty1/conf 57 | fi 58 | -------------------------------------------------------------------------------- /dracut/vmklive/display-manager-autologin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh 6 | 7 | USERNAME=$(getarg live.user) 8 | [ -z "$USERNAME" ] && USERNAME=anon 9 | 10 | # Configure GDM autologin 11 | if [ -d ${NEWROOT}/etc/gdm ]; then 12 | GDMCustomFile=${NEWROOT}/etc/gdm/custom.conf 13 | AutologinParameters="AutomaticLoginEnable=true\nAutomaticLogin=$USERNAME" 14 | 15 | # Prevent from updating if parameters already present (persistent usb key) 16 | if ! `grep -qs 'AutomaticLoginEnable' $GDMCustomFile` ; then 17 | if ! `grep -qs '\[daemon\]' $GDMCustomFile` ; then 18 | echo '[daemon]' >> $GDMCustomFile 19 | fi 20 | sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile 21 | fi 22 | fi 23 | 24 | # Configure sddm autologin for the kde iso. 25 | if [ -x ${NEWROOT}/usr/bin/sddm ]; then 26 | cat > ${NEWROOT}/etc/sddm.conf <<_EOF 27 | [Autologin] 28 | User=${USERNAME} 29 | Session=plasma.desktop 30 | _EOF 31 | fi 32 | 33 | # Configure lightdm autologin. 34 | if [ -r "${NEWROOT}/etc/lightdm/lightdm.conf" ]; then 35 | sed -i -e "s|^\#\(autologin-user=\).*|\1$USERNAME|" \ 36 | "${NEWROOT}/etc/lightdm/lightdm.conf" 37 | sed -i -e "s|^\#\(autologin-user-timeout=\).*|\10|" \ 38 | "${NEWROOT}/etc/lightdm/lightdm.conf" 39 | sed -i -e "s|^\#\(autologin-session=\).*|\1$(cat "${NEWROOT}/etc/lightdm/.session")|" \ 40 | "${NEWROOT}/etc/lightdm/lightdm.conf" 41 | sed -i -e "s|^\#\(user-session=\).*|\1$(cat "${NEWROOT}/etc/lightdm/.session")|" \ 42 | "${NEWROOT}/etc/lightdm/lightdm.conf" 43 | fi 44 | 45 | # Configure lxdm autologin. 46 | if [ -r ${NEWROOT}/etc/lxdm/lxdm.conf ]; then 47 | sed -e "s,.*autologin.*=.*,autologin=$USERNAME," -i ${NEWROOT}/etc/lxdm/lxdm.conf 48 | if [ -x ${NEWROOT}/usr/bin/enlightenment_start ]; then 49 | sed -e "s,.*session.*=.*,session=/usr/bin/enlightenment_start," -i ${NEWROOT}/etc/lxdm/lxdm.conf 50 | elif [ -x ${NEWROOT}/usr/bin/startxfce4 ]; then 51 | sed -e "s,.*session.*=.*,session=/usr/bin/startxfce4," -i ${NEWROOT}/etc/lxdm/lxdm.conf 52 | elif [ -x ${NEWROOT}/usr/bin/mate-session ]; then 53 | sed -e "s,.*session.*=.*,session=/usr/bin/mate-session," -i ${NEWROOT}/etc/lxdm/lxdm.conf 54 | elif [ -x ${NEWROOT}/usr/bin/cinnamon-session ]; then 55 | sed -e "s,.*session.*=.*,session=/usr/bin/cinnamon-session," -i ${NEWROOT}/etc/lxdm/lxdm.conf 56 | elif [ -x ${NEWROOT}/usr/bin/i3 ]; then 57 | sed -e "s,.*session.*=.*,session=/usr/bin/i3," -i ${NEWROOT}/etc/lxdm/lxdm.conf 58 | elif [ -x ${NEWROOT}/usr/bin/startlxde ]; then 59 | sed -e "s,.*session.*=.*,session=/usr/bin/startlxde," -i ${NEWROOT}/etc/lxdm/lxdm.conf 60 | elif [ -x ${NEWROOT}/usr/bin/startlxqt ]; then 61 | sed -e "s,.*session.*=.*,session=/usr/bin/startlxqt," -i ${NEWROOT}/etc/lxdm/lxdm.conf 62 | elif [ -x ${NEWROOT}/usr/bin/startfluxbox ]; then 63 | sed -e "s,.*session.*=.*,session=/usr/bin/startfluxbox," -i ${NEWROOT}/etc/lxdm/lxdm.conf 64 | fi 65 | fi 66 | -------------------------------------------------------------------------------- /dracut/vmklive/getty-serial.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh 6 | 7 | CONSOLE=$(getarg console) 8 | case "$CONSOLE" in 9 | *ttyS0*) 10 | ln -s /etc/sv/agetty-ttyS0 ${NEWROOT}/etc/runit/runsvdir/default/ 11 | ;; 12 | *hvc0*) 13 | ln -s /etc/sv/agetty-hvc0 ${NEWROOT}/etc/runit/runsvdir/default/ 14 | ;; 15 | *hvsi0*) 16 | ln -s /etc/sv/agetty-hvsi0 ${NEWROOT}/etc/runit/runsvdir/default/ 17 | ;; 18 | esac 19 | -------------------------------------------------------------------------------- /dracut/vmklive/locale.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh 6 | 7 | LOCALE=$(getarg locale.LANG) 8 | [ -z "$LOCALE" ] && LOCALE="en_US.UTF-8" 9 | 10 | # also enable this locale in newroot. 11 | echo "LANG=$LOCALE" > $NEWROOT/etc/locale.conf 12 | echo "LC_COLLATE=C" >> $NEWROOT/etc/locale.conf 13 | 14 | # set keymap too. 15 | KEYMAP=$(getarg vconsole.keymap) 16 | [ -z "$KEYMAP" ] && KEYMAP="us" 17 | 18 | if [ -f ${NEWROOT}/etc/vconsole.conf ]; then 19 | sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/vconsole.conf 20 | elif [ -f ${NEWROOT}/etc/rc.conf ]; then 21 | sed -e "s,^#KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/rc.conf 22 | fi 23 | -------------------------------------------------------------------------------- /dracut/vmklive/module-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | check() { 6 | return 255 7 | } 8 | 9 | depends() { 10 | echo dmsquash-live 11 | } 12 | 13 | install() { 14 | inst /usr/bin/chroot 15 | inst /usr/bin/chmod 16 | inst /usr/bin/sed 17 | 18 | if [ -e /usr/bin/memdiskfind ]; then 19 | inst /usr/bin/memdiskfind 20 | instmods mtdblock phram 21 | inst_rules "$moddir/59-mtd.rules" "$moddir/61-mtd.rules" 22 | prepare_udev_rules 59-mtd.rules 61-mtd.rules 23 | inst_hook pre-udev 01 "$moddir/mtd.sh" 24 | fi 25 | 26 | inst_hook pre-pivot 01 "$moddir/adduser.sh" 27 | inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh" 28 | inst_hook pre-pivot 02 "$moddir/getty-serial.sh" 29 | inst_hook pre-pivot 03 "$moddir/locale.sh" 30 | inst_hook pre-pivot 04 "$moddir/accessibility.sh" 31 | inst_hook pre-pivot 05 "$moddir/nomodeset.sh" 32 | } 33 | -------------------------------------------------------------------------------- /dracut/vmklive/mtd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | MEMDISK=$(memdiskfind) 3 | if [ "$MEMDISK" ]; then 4 | modprobe phram phram=memdisk,$MEMDISK 5 | modprobe mtdblock 6 | printf 'KERNEL=="mtdblock0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root /dev/mtdblock0"\n' >> /etc/udev/rules.d/99-live-squash.rules 7 | fi 8 | -------------------------------------------------------------------------------- /dracut/vmklive/nomodeset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 3 | # ex: ts=8 sw=4 sts=4 et filetype=sh 4 | 5 | type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh 6 | 7 | if getargbool 0 nomodeset; then 8 | for dm in lightdm sddm gdm; do 9 | if [ -e "${NEWROOT}/etc/sv/${dm}" ]; then 10 | :> "${NEWROOT}/etc/sv/${dm}/down" 11 | fi 12 | done 13 | fi 14 | -------------------------------------------------------------------------------- /dwm-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | elogind 14 | dbus-elogind 15 | dbus-elogind-x11 16 | exfat-utils 17 | fuse-exfat 18 | xorg-minimal 19 | xorg-input-drivers 20 | xorg-video-drivers 21 | setxkbmap 22 | xauth 23 | xrandr 24 | font-misc-misc 25 | terminus-font 26 | dejavu-fonts-ttf 27 | alsa-plugins-pulseaudio 28 | 29 | 30 | #USERLAND PACKAGES 31 | gptfdisk 32 | wget 33 | micro 34 | xdg-utils 35 | xdg-desktop-portal 36 | xdg-desktop-portal-gtk 37 | xdg-desktop-portal-kde 38 | xdg-user-dirs 39 | xdg-user-dirs-gtk 40 | AppStream 41 | libvdpau-va-gl 42 | vdpauinfo 43 | pipewire 44 | gstreamer1-pipewire 45 | upower 46 | flatpak 47 | git 48 | vim 49 | upower 50 | bash-completion 51 | dwm 52 | alsa-utils 53 | xterm 54 | mc 55 | htop 56 | dtrx 57 | p7zip 58 | topgrade 59 | ntp 60 | dmenu 61 | sakura 62 | void-repo-multilib 63 | gvfs-afc 64 | gvfs-mtp 65 | gvfs-smb 66 | udisks2 67 | ntfs-3g 68 | gnome-keyring 69 | network-manager-applet 70 | qutebrowser 71 | rsync 72 | psmisc 73 | dkms 74 | unzip 75 | -------------------------------------------------------------------------------- /dwm-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="dwm" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 7 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 8 | NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | 16 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 17 | ((retry++)) 18 | if [[ $retry -gt 2 ]];then 19 | break 20 | fi 21 | 22 | sudo ./mklive.sh \ 23 | -a x86_64 \ 24 | -r "${CURRENT}" \ 25 | -r "${MULTILIB}" \ 26 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 27 | -T "Void Linux ${DESKTOP} Unofficial" \ 28 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso 29 | done 30 | 31 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 32 | retries=${1} 33 | until [[ $retries -gt 2 ]];do 34 | echo "Retrying build ${retries}" 35 | ((retries++)) 36 | bash ${0} ${retries} 37 | 38 | done 39 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 40 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 41 | echo "ERR=1" > error-status.txt 42 | exit 1 43 | fi 44 | fi 45 | 46 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 47 | 48 | if [ ! -f sha256sums.txt ];then 49 | echo "Missing checksum file, aborting!" 50 | echo "ERR=1" > error-status.txt 51 | exit 1 52 | fi 53 | 54 | if [ ! -d "${BUILDDIR}" ];then 55 | mkdir ${BUILDDIR} 56 | fi 57 | 58 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 59 | 60 | -------------------------------------------------------------------------------- /e17-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg-minimal 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | xrandr 17 | setxkbmap 18 | xauth 19 | font-misc-misc 20 | terminus-font 21 | dejavu-fonts-ttf 22 | 23 | 24 | #LOGIN 25 | lightdm 26 | lightdm-gtk3-greeter 27 | 28 | #USERLAND PACKAGES 29 | gptfdisk 30 | elogind 31 | dbus-elogind 32 | dbus-elogind-x11 33 | polkit-elogind 34 | exfat-utils 35 | fuse-exfat 36 | wget 37 | enlightenment 38 | terminology 39 | upower 40 | xdg-utils 41 | xdg-desktop-portal 42 | xdg-desktop-portal-gtk 43 | xdg-desktop-portal-kde 44 | xdg-user-dirs 45 | xdg-user-dirs-gtk 46 | AppStream 47 | libvdpau-va-gl 48 | vdpauinfo 49 | pipewire 50 | gstreamer1-pipewire 51 | wireplumber 52 | libjack-pipewire 53 | upower 54 | flatpak 55 | zenity 56 | bash-completion 57 | micro 58 | xdg-utils 59 | vim 60 | git 61 | alsa-utils 62 | pavucontrol 63 | alsa-pipewire 64 | xterm 65 | htop 66 | dtrx 67 | p7zip 68 | topgrade 69 | ntp 70 | void-repo-multilib 71 | void-repo-nonfree 72 | octoxbps 73 | gvfs-afc 74 | gvfs-mtp 75 | gvfs-smb 76 | udisks2 77 | ntfs-3g 78 | gnome-keyring 79 | network-manager-applet 80 | firefox 81 | gnome-themes-standard 82 | adwaita-icon-theme 83 | rsync 84 | psmisc 85 | dkms 86 | unzip 87 | -------------------------------------------------------------------------------- /e17-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="e17" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 7 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 8 | NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | 16 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 17 | 18 | ((retry++)) 19 | if [[ $retry -gt 2 ]];then 20 | break 21 | fi 22 | 23 | sudo ./mklive.sh \ 24 | -a x86_64 \ 25 | -r "${CURRENT}" \ 26 | -r "${MULTILIB}" \ 27 | -I "$(pwd)/extra" \ 28 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 29 | -T "Void Linux ${DESKTOP} Unofficial" \ 30 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 31 | -S "acpid dhcpcd wpa_supplicant lightdm dbus polkitd" 32 | done 33 | 34 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 35 | retries=${1} 36 | until [[ $retries -gt 2 ]];do 37 | echo "Retrying build ${retries}" 38 | ((retries++)) 39 | bash ${0} ${retries} 40 | 41 | done 42 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 43 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 44 | echo "ERR=1" > error-status.txt 45 | exit 1 46 | fi 47 | fi 48 | 49 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 50 | 51 | if [ ! -f sha256sums.txt ];then 52 | echo "Missing checksum file, aborting!" 53 | echo "ERR=1" > error-status.txt 54 | exit 1 55 | fi 56 | 57 | if [ ! -d "${BUILDDIR}" ];then 58 | mkdir ${BUILDDIR} 59 | fi 60 | 61 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 62 | -------------------------------------------------------------------------------- /gnome-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | dbus 11 | avahi 12 | avahi-utils 13 | libxcrypt-compat 14 | 15 | # X PACKAGES 16 | xorg-minimal 17 | xorg-input-drivers 18 | xorg-video-drivers 19 | setxkbmap 20 | xauth 21 | xrandr 22 | font-misc-misc 23 | terminus-font 24 | dejavu-fonts-ttf 25 | alsa-plugins-pulseaudio 26 | 27 | 28 | #USERLAND PACKAGES 29 | gptfdisk 30 | elogind 31 | #dbus-elogind 32 | #dbus-elogind-x11 33 | exfat-utils 34 | fuse-exfat 35 | wget 36 | gdm 37 | bash-completion 38 | nano 39 | git 40 | vim 41 | alsa-utils 42 | paprefs 43 | xdg-utils 44 | xdg-desktop-portal 45 | xdg-desktop-portal-gtk 46 | xdg-desktop-portal-kde 47 | xdg-user-dirs 48 | xdg-user-dirs-gtk 49 | AppStream 50 | libva-vdpau-driver 51 | vdpauinfo 52 | pipewire 53 | gstreamer1-pipewire 54 | alsa-pipewire 55 | libjack-pipewire 56 | upower 57 | flatpak 58 | pavucontrol 59 | xterm 60 | htop 61 | topgrade 62 | ntp 63 | void-repo-multilib 64 | void-repo-nonfree 65 | octoxbps 66 | gvfs-afc 67 | gvfs-mtp 68 | gvfs-smb 69 | udisks2 70 | ntfs-3g 71 | gnome-keyring 72 | network-manager-applet 73 | firefox 74 | gnome 75 | gnome-apps 76 | Adapta 77 | papirus-icon-theme 78 | gnome-themes-standard 79 | adwaita-icon-theme 80 | -------------------------------------------------------------------------------- /gnome-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="gnome" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 7 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 8 | #NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 16 | ((retry++)) 17 | if [[ $retry -gt 2 ]];then 18 | break 19 | fi 20 | sudo ./mklive.sh \ 21 | -a x86_64 \ 22 | -r "${CURRENT}" \ 23 | -r "${MULTILIB}" \ 24 | -I "$(pwd)/extra" \ 25 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 26 | -T "Void Linux ${DESKTOP} Unofficial" \ 27 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 28 | -S "dbus elogind gdm NetworkManager polkitd" 29 | done 30 | 31 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 32 | retries=${1} 33 | until [[ $retries -gt 2 ]];do 34 | echo "Retrying build ${retries}" 35 | ((retries++)) 36 | bash ${0} ${retries} 37 | 38 | done 39 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 40 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 41 | echo "ERR=1" > error-status.txt 42 | exit 1 43 | fi 44 | fi 45 | 46 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 47 | 48 | if [ ! -f sha256sums.txt ];then 49 | echo "Missing checksum file, aborting!" 50 | echo "ERR=1" > error-status.txt 51 | exit 1 52 | fi 53 | 54 | if [ ! -d "${BUILDDIR}" ];then 55 | mkdir ${BUILDDIR} 56 | fi 57 | 58 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 59 | -------------------------------------------------------------------------------- /grub/grub.cfg: -------------------------------------------------------------------------------- 1 | insmod usbms 2 | insmod usb_keyboard 3 | insmod part_gpt 4 | insmod part_msdos 5 | insmod fat 6 | insmod iso9660 7 | insmod udf 8 | insmod ext2 9 | insmod reiserfs 10 | insmod ntfs 11 | insmod hfsplus 12 | insmod linux 13 | insmod chain 14 | search --file --no-floppy --set=voidlive "/boot/grub/grub_void.cfg" 15 | source "(${voidlive})/boot/grub/grub_void.cfg" 16 | -------------------------------------------------------------------------------- /grub/grub_void.cfg.post: -------------------------------------------------------------------------------- 1 | fi # for if [ cpuid -l ] in grub_void.cfg.pre 2 | -------------------------------------------------------------------------------- /grub/grub_void.cfg.pre: -------------------------------------------------------------------------------- 1 | export voidlive 2 | 3 | set pager="1" 4 | set locale_dir="(${voidlive})/boot/grub/locale" 5 | 6 | if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then 7 | insmod all_video 8 | else 9 | insmod efi_gop 10 | insmod efi_uga 11 | insmod video_bochs 12 | insmod video_cirrus 13 | fi 14 | 15 | insmod font 16 | 17 | if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then 18 | insmod gfxterm 19 | set gfxmode="auto" 20 | 21 | terminal_input console 22 | terminal_output gfxterm 23 | 24 | insmod png 25 | background_image "(${voidlive})/boot/isolinux/@@SPLASHIMAGE@@" 26 | fi 27 | 28 | # Set default menu entry 29 | default=linux 30 | timeout=15 31 | timeout_style=menu 32 | 33 | # GRUB init tune for accessibility 34 | play 600 988 1 1319 4 35 | 36 | if [ cpuid -l ]; then 37 | -------------------------------------------------------------------------------- /i3-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # LOGIN 13 | lightdm 14 | lightdm-gtk3-greeter 15 | 16 | # X PACKAGES 17 | elogind 18 | dbus-elogind 19 | dbus-elogind-x11 20 | exfat-utils 21 | fuse-exfat 22 | xorg-minimal 23 | xorg-input-drivers 24 | xorg-video-drivers 25 | setxkbmap 26 | xauth 27 | xrandr 28 | font-misc-misc 29 | terminus-font 30 | dejavu-fonts-ttf 31 | alsa-plugins-pulseaudio 32 | 33 | 34 | #USERLAND PACKAGES 35 | gptfdisk 36 | wget 37 | nano 38 | xdg-utils 39 | xdg-desktop-portal 40 | xdg-desktop-portal-gtk 41 | xdg-desktop-portal-kde 42 | xdg-user-dirs 43 | xdg-user-dirs-gtk 44 | AppStream 45 | libvdpau-va-gl 46 | vdpauinfo 47 | pipewire 48 | wireplumber 49 | gstreamer1-pipewire 50 | upower 51 | flatpak 52 | git 53 | vim 54 | upower 55 | bash-completion 56 | i3-gaps 57 | i3blocks 58 | i3status 59 | alsa-utils 60 | pulsemixer 61 | pasystray 62 | xterm 63 | mc 64 | htop 65 | dtrx 66 | p7zip 67 | topgrade 68 | ntp 69 | dmenu 70 | sakura 71 | void-repo-multilib 72 | gvfs-afc 73 | gvfs-mtp 74 | gvfs-smb 75 | udisks2 76 | ntfs-3g 77 | gnome-keyring 78 | network-manager-applet 79 | qutebrowser 80 | adwaita-icon-theme 81 | -------------------------------------------------------------------------------- /i3-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="i3" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 7 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 8 | NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | 16 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 17 | ((retry++)) 18 | if [[ $retry -gt 2 ]];then 19 | break 20 | fi 21 | 22 | sudo ./mklive.sh \ 23 | -a x86_64 \ 24 | -r "${CURRENT}" \ 25 | -r "${MULTILIB}" \ 26 | -I "$(pwd)/extra" \ 27 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 28 | -T "Void Linux ${DESKTOP} Unofficial" \ 29 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 30 | -S "dbus elogind lightdm NetworkManager polkitd" 31 | done 32 | 33 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 34 | retries=${1} 35 | until [[ $retries -gt 2 ]];do 36 | echo "Retrying build ${retries}" 37 | ((retries++)) 38 | bash ${0} ${retries} 39 | 40 | done 41 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 42 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 43 | echo "ERR=1" > error-status.txt 44 | exit 1 45 | fi 46 | fi 47 | 48 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 49 | 50 | if [ ! -f sha256sums.txt ];then 51 | echo "Missing checksum file, aborting!" 52 | echo "ERR=1" > error-status.txt 53 | exit 1 54 | fi 55 | 56 | if [ ! -d "${BUILDDIR}" ];then 57 | mkdir ${BUILDDIR} 58 | fi 59 | 60 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 61 | -------------------------------------------------------------------------------- /isolinux/isolinux.cfg.in: -------------------------------------------------------------------------------- 1 | UI vesamenu.c32 2 | PROMPT 0 3 | TIMEOUT 150 4 | ONTIMEOUT linux 5 | 6 | MENU TABMSG Press ENTER to boot or TAB to edit a menu entry 7 | MENU AUTOBOOT BIOS default device boot in # second{,s}... 8 | MENU BACKGROUND @@SPLASHIMAGE@@ 9 | MENU WIDTH 78 10 | MENU MARGIN 1 11 | MENU ROWS 12 12 | MENU VSHIFT 2 13 | MENU TIMEOUTROW 13 14 | MENU TABMSGROW 2 15 | MENU CMDLINEROW 16 16 | MENU HELPMSGROW 20 17 | MENU HELPMSGENDROW 34 18 | 19 | MENU COLOR title * #FF5255FF * 20 | MENU COLOR border * #00000000 #00000000 none 21 | MENU COLOR sel * #ffffffff #FF5255FF * 22 | 23 | LABEL linux 24 | MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ 25 | KERNEL /boot/vmlinuz 26 | APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ 27 | 28 | LABEL linuxram 29 | MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ (RAM) 30 | KERNEL /boot/vmlinuz 31 | APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram 32 | 33 | LABEL linuxnogfx 34 | MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ (graphics disabled) 35 | KERNEL /boot/vmlinuz 36 | APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ nomodeset 37 | 38 | LABEL linuxa11y 39 | MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ with ^speech 40 | KERNEL /boot/vmlinuz 41 | APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin 42 | 43 | LABEL linuxa11yram 44 | MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ with speech (^RAM) 45 | KERNEL /boot/vmlinuz 46 | APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin rd.live.ram 47 | 48 | LABEL linuxa11ynogfx 49 | MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ with speech (^graphics disabled) 50 | KERNEL /boot/vmlinuz 51 | APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin nomodeset 52 | 53 | LABEL c 54 | MENU LABEL Boot first HD found by BIOS 55 | COM32 chain.c32 56 | APPEND hd0 57 | 58 | LABEL memtest 59 | MENU LABEL Run ^Memtest86+ (RAM test) 60 | LINUX /boot/memtest.bin 61 | 62 | LABEL reboot 63 | MENU LABEL Re^boot 64 | COM32 reboot.c32 65 | 66 | LABEL poweroff 67 | MENU LABEL ^Power Off 68 | COM32 poweroff.c32 69 | -------------------------------------------------------------------------------- /kde-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | setxkbmap 17 | xauth 18 | xrandr 19 | libvdpau-va-gl 20 | vdpauinfo 21 | font-misc-misc 22 | terminus-font 23 | dejavu-fonts-ttf 24 | 25 | # KERNEL 26 | linux-firmware-network 27 | dkms 28 | 29 | 30 | # SOUND 31 | alsa-plugins-pulseaudio 32 | pipewire 33 | gstreamer1-pipewire 34 | alsa-utils 35 | paprefs 36 | pavucontrol 37 | 38 | # NETWORK 39 | inetutils 40 | usbutils 41 | wget 42 | curl 43 | ntp 44 | NetworkManager 45 | 46 | # DESKTOP ENVIRONMENT 47 | sddm 48 | kde5 49 | kde5-baseapps 50 | kaccounts-integration 51 | kaccounts-providers 52 | dolphin 53 | plasma-nm 54 | plasma-pa 55 | xdg-utils 56 | xdg-desktop-portal 57 | xdg-desktop-portal-gtk 58 | xdg-desktop-portal-kde 59 | xdg-user-dirs 60 | xdg-user-dirs-gtk 61 | AppStream 62 | 63 | 64 | # LOOK AND FEEL 65 | adapta-kde 66 | adwaita-icon-theme 67 | 68 | # FILE SYSTEM 69 | exfat-utils 70 | fuse-exfat 71 | gvfs-afc 72 | gvfs-mtp 73 | gvfs-smb 74 | udisks2 75 | ntfs-3g 76 | gptfdisk 77 | 78 | # PACKAGE MANAGEMENT 79 | flatpak 80 | topgrade 81 | octoxbps 82 | 83 | # AUTH 84 | kdesu 85 | elogind 86 | dbus-elogind 87 | dbus-elogind-x11 88 | gnome-keyring 89 | 90 | # DEVELOPMENT 91 | git 92 | 93 | # ARCHIVE SOFTWARE 94 | dtrx 95 | p7zip 96 | unzip 97 | 98 | # TEXT EDITORS 99 | micro 100 | vim 101 | kwrite 102 | 103 | # POWER MANAGEMENT 104 | upower 105 | 106 | # UTILITIES 107 | konsole 108 | bash-completion 109 | xterm 110 | htop 111 | rsync 112 | psmisc 113 | kcalc 114 | 115 | 116 | # INTERNET 117 | firefox 118 | 119 | 120 | # REPOSITORIES 121 | void-repo-multilib 122 | void-repo-nonfree 123 | -------------------------------------------------------------------------------- /kde-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="kde" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 7 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 8 | NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | #shift $((OPTIND - 1)) 15 | 16 | #: ${ARCH:=$(uname -m)} 17 | 18 | retry=0 19 | 20 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 21 | ((retry++)) 22 | if [[ $retry -gt 2 ]];then 23 | break 24 | fi 25 | 26 | sudo ./mklive.sh \ 27 | -a x86_64 \ 28 | -r "${CURRENT}" \ 29 | -r "${MULTILIB}" \ 30 | -I "$(pwd)/extra" \ 31 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 32 | -T "Void Linux ${DESKTOP} Unofficial" \ 33 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 34 | -S "dbus elogind NetworkManager sddm" 35 | done 36 | 37 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 38 | retries=${1} 39 | until [[ $retries -gt 2 ]];do 40 | echo "Retrying build ${retries}" 41 | ((retries++)) 42 | bash ${0} ${retries} 43 | 44 | done 45 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 46 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 47 | echo "ERR=1" > error-status.txt 48 | exit 1 49 | fi 50 | fi 51 | 52 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 53 | 54 | if [ ! -f sha256sums.txt ];then 55 | echo "Missing checksum file, aborting!" 56 | echo "ERR=1" > error-status.txt 57 | exit 1 58 | fi 59 | 60 | if [ ! -d "${BUILDDIR}" ];then 61 | mkdir ${BUILDDIR} 62 | fi 63 | 64 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 65 | -------------------------------------------------------------------------------- /keys/3d:b9:c0:50:41:a7:68:4c:2e:2c:a9:a2:5a:04:b7:3f.plist: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 | <plist version="1.0"> 4 | <dict> 5 | <key>public-key</key> 6 | <data>LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQ0lqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUFvM1Nrc2p5N01PMmc4UWxsZjdCVQp1aXhFUWlqN3FOSVJrU0hrWWw4SGxxd1hOczFnK1FzbzhGV3dSbDNMbUpTVW5wT1BaOG1sdVdSajd4Y2pLbnVJCnhPRjBtQS8vM0lzTnVId2dYV2RLL0JiT29wNzFLZmt4aEE0WjhwK0hRbmhLMThxUkFPbG9xOGJ6WXZhaGI2NmEKemdWVTVFM1JzRDU4V0M2ZTFOUVdSSGpiMG1TM2h6M1NxVWVWZFVMT20zVzZBRTdYdWlVQVJOSEdyY1ljMXkyKwpxNjBKWHMrVk5sRlMwaGdDdnpqS3phMVg5cWtzQndzTmdaRlhBcXN1MGFKRndYSTEvM2R4ZWxBcUZFbnRMWVFSCjA4NHpaTDFmWDVRMWlacGNEaHVhTWZVREVZQjA4UzdKTTBYKytibkxxVnphVTZzc0RXdGtzbFJaNjNaVStISTUKemk5a0pyc25LcU5Pa3BKSnJTUkRyMGFvRjV2RDRwN20vYWdZKzdTRk5aaDZzOUJ5V0x3NDVFdytwalVVUmp5aQp6T01TSFhEM3YzczhFdzZkV29wbTVQTGUvUEgzZWFiMEVnbG9yVDZhYmRwaCtaVG4zaUxMWVVkSGNmQ1FDN01GCkNmVGl1TWt4SkJpaCtoOEhKaUlBdmpDZjVxdjZiaFpEUHpGRzAwbEpYRUZwNHRpbGp6eTFmbitiMkdLY3BDOWQKUUs4TEc3M0RFaXhacHBmU09IU09MMWYxVlBzZTBRdnl6d2RWc0xzR0dqV0FaZkw4WUdVZDl4Y20yeW5tVzFuNgpKTjl6NE9oZ3lRa21mNUFFUXpYSUxQR0d1MlREUVh5c05IRG0vUnRMMHJPN3cxbFVKSTVYOW1kbEZYd0xUWHI3ClYrU25aK3U5VCtFREg1NTV6WDJDZTgwQ0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=</data> 7 | <key>public-key-size</key> 8 | <integer>4096</integer> 9 | <key>signature-by</key> 10 | <string>Void Linux</string> 11 | </dict> 12 | </plist> 13 | -------------------------------------------------------------------------------- /keys/60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d.plist: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 | <plist version="1.0"> 4 | <dict> 5 | <key>public-key</key> 6 | <data>LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQ0lqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUF2clN6QlpNdmd2T0NJM0FYYk9qYQoycktSa0pTVE0zYy9FalRJZ0NnRFhndW05M0JQQ3RZOE1jRlZvQ1U0T2lYSEdmVG1xMzlCVk5wTHZMSEw5S2sxCnAyNzhTQmhYVk90YkIyRVZtREtudmZJREVUbGRMR3plN3JaTlJKZHR1TjJtWi9UVnJVQjlTMHlRYytJdWY0aHYKMytEOTdWSWRUSkhBN0FTcjA0MjhwcEVHSkd3U1NoWTJYSm05RDVJMEV1R1JXYzE0TUVHN2RJS0ppWWlNMG5FNAp0WW8yL3ZINElGVEhkblZBM2dZaVp5RG5idUNBUi84RVNmVVRVMTNTTkNPZGJ1ZGYzRDVCY3krVWlNREpJM1llCjRNRktCclQ5WmhaK0dzWEJaWTQ4MmxxaVppNkNMNXB0YzlJUUZmOC9lS1phOGphdGtpVkZWZ3JLZU5Sak9UeE4KZldTdTJua3hHTlgrYmhYWXRoaUdXbUpFWThjQ0FQeUZOK0x2NVJldEsyNTZnZGNiMnNrbUVxZWZ2MnpQQyt3VgpXQmJkSDViRDRiWmpuME42Wmw4MXJ2NVJ6RHZudmYrdkQxNGFGVWJaOFFGcXU3NVBiTDR3Nm1ZTTRsZE0vZzBSCjZOWEU4QXo5Qnd4MnREZlllS3V1dHcxRXBQbTJZdkZ5VFViMWNveUF1VEdSeUFhcDFVVEh2ZzlsaFBJSm1oRlEKSjVrQ2cxcUQ3QTMxV2wwUmxuZTZoZ0dvMFpaTko1Y0pNL3YvelNUS0pjdUZnd283SDBoT0dpbDZEZm84OUI0agpHOTZBQ3lQUytEVktQRlhSWXdqL0FrYkhwYVEyZjFGTUFvU3BCcXVEcUhoM3VrazcxS1g2ajE5dDBpRjhEUUxyCnZ0RlNTZElqREEwMmx3ZVY5TmFRcFdzQ0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=</data> 7 | <key>public-key-size</key> 8 | <integer>4096</integer> 9 | <key>signature-by</key> 10 | <string>Void Linux</string> 11 | </dict> 12 | </plist> 13 | -------------------------------------------------------------------------------- /lib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This contains the COMPLETE list of binaries that this script needs 4 | # to function. The only exception is the QEMU binary since it is not 5 | # known in advance which one wil be required. 6 | readonly LIBTOOLS="cp echo cat printf which mountpoint mount umount modprobe" 7 | readonly HOSTARCH=$(xbps-uhelper arch) 8 | 9 | is_target_native() { 10 | # Because checking whether the target is runnable is ugly, stuff 11 | # it into a single function. That makes it easy to check anywhere. 12 | local target_arch 13 | 14 | target_arch="$1" 15 | # this will cover most 16 | if [ "${target_arch%-musl}" = "${HOSTARCH%-musl}" ]; then 17 | return 0 18 | fi 19 | 20 | case "$HOSTARCH" in 21 | # ppc64le has no 32-bit variant, only runs its own stuff 22 | ppc64le*) return 1 ;; 23 | # x86_64 also runs i686 24 | x86_64*) test -z "${target_arch##*86*}" ;; 25 | # aarch64 also runs armv* 26 | aarch64*) test -z "${target_arch##armv*}" ;; 27 | # bigendian ppc64 also runs ppc 28 | ppc64*) test "${target_arch%-musl}" = "ppc" ;; 29 | # anything else is just their own 30 | *) return 1 ;; 31 | esac 32 | 33 | return $? 34 | } 35 | 36 | version() ( 37 | set +u 38 | [ -n "$PROGNAME" ] && printf "%s " "$PROGNAME" 39 | echo "$(cat ./version) ${MKLIVE_REV:-"$(git -c safe.directory="$(pwd)" rev-parse --short HEAD 2> /dev/null)"}" 40 | ) 41 | 42 | info_msg() { 43 | # This function handles the printing that is bold within all 44 | # scripts. This is a convenience function so that the rather ugly 45 | # looking ASCII escape codes live in only one place. 46 | printf "\033[1m%s\n\033[m" "$@" 47 | } 48 | 49 | die() { 50 | # This function is registered in all the scripts to make sure that 51 | # the important mounts get cleaned up and the $ROOTFS location is 52 | # removed. 53 | printf "FATAL: %s\n" "$@" 54 | umount_pseudofs 55 | [ -d "$ROOTFS" ] && rm -rf "$ROOTFS" 56 | exit 1 57 | } 58 | 59 | check_tools() { 60 | # All scripts within mklive declare the tools they will use in a 61 | # variable called "REQTOOLS". This function checks that these 62 | # tools are available and prints out the path to each tool that 63 | # will be used. This can be useful to figure out what is broken 64 | # if a different version of something is used than was expected. 65 | for tool in $LIBTOOLS $REQTOOLS ; do 66 | if ! which "$tool" > /dev/null ; then 67 | die "Required tool $tool is not available on this system!" 68 | fi 69 | done 70 | 71 | info_msg "The following tools will be used:" 72 | for tool in $LIBTOOLS $REQTOOLS ; do 73 | which "$tool" 74 | done 75 | } 76 | 77 | mount_pseudofs() { 78 | # This function ensures that the psuedofs mountpoints are present 79 | # in the chroot. Strictly they are not necessary to have for many 80 | # commands, but bind-mounts are cheap and it isn't too bad to just 81 | # mount them all the time. 82 | for f in dev proc sys; do 83 | # In a naked chroot there is nothing to bind the mounts to, so 84 | # we need to create directories for these first. 85 | [ ! -d "$ROOTFS/$f" ] && mkdir -p "$ROOTFS/$f" 86 | if ! mountpoint -q "$ROOTFS/$f" ; then 87 | # It is VERY important that this only happen if the 88 | # pseudofs isn't already mounted. If it already is then 89 | # this is virtually impossible to troubleshoot because it 90 | # looks like the subsequent umount just isn't working. 91 | mount -r --rbind /$f "$ROOTFS/$f" --make-rslave 92 | fi 93 | done 94 | if ! mountpoint -q "$ROOTFS/tmp" ; then 95 | mkdir -p "$ROOTFS/tmp" 96 | mount -o mode=0755,nosuid,nodev -t tmpfs tmpfs "$ROOTFS/tmp" 97 | fi 98 | } 99 | 100 | umount_pseudofs() { 101 | # This function cleans up the mounts in the chroot. Failure to 102 | # clean up these mounts will prevent the tmpdir from being 103 | # deletable instead throwing the error "Device or Resource Busy". 104 | # The '-f' option is passed to umount to account for the 105 | # contingency where the psuedofs mounts are not present. 106 | if [ -d "${ROOTFS}" ]; then 107 | for f in dev proc sys; do 108 | umount -R -f "$ROOTFS/$f" >/dev/null 2>&1 109 | done 110 | fi 111 | umount -f "$ROOTFS/tmp" >/dev/null 2>&1 112 | } 113 | 114 | run_cmd_target() { 115 | info_msg "Running $* for target $XBPS_TARGET_ARCH ..." 116 | if is_target_native "$XBPS_TARGET_ARCH"; then 117 | # This is being run on the same architecture as the host, 118 | # therefore we should set XBPS_ARCH. 119 | if ! eval XBPS_ARCH="$XBPS_TARGET_ARCH" "$@" ; then 120 | die "Could not run command $*" 121 | fi 122 | else 123 | # This is being run on a foriegn arch, therefore we should set 124 | # XBPS_TARGET_ARCH. In this case XBPS will not attempt 125 | # certain actions and will require reconfiguration later. 126 | if ! eval XBPS_TARGET_ARCH="$XBPS_TARGET_ARCH" "$@" ; then 127 | die "Could not run command $*" 128 | fi 129 | fi 130 | } 131 | 132 | run_cmd() { 133 | # This is a general purpose function to run commands that a user 134 | # may wish to see. For example its useful to see the tar/xz 135 | # pipeline to not need to delve into the scripts to see what 136 | # options its set up with. 137 | info_msg "Running $*" 138 | eval "$@" 139 | } 140 | 141 | run_cmd_chroot() { 142 | # General purpose chroot function which makes sure the chroot is 143 | # prepared. This function takes 2 arguments, the location to 144 | # chroot to and the command to run. 145 | 146 | # This is an idempotent function, it is safe to call every time 147 | # before entering the chroot. This has the advantage of making 148 | # execution in the chroot appear as though it "Just Works(tm)". 149 | register_binfmt 150 | 151 | # Before we step into the chroot we need to make sure the 152 | # pseudo-filesystems are ready to go. Not all commands will need 153 | # this, but its still a good idea to call it here anyway. 154 | mount_pseudofs 155 | 156 | # With assurance that things will run now we can jump into the 157 | # chroot and run stuff! 158 | chroot "$1" sh -c "$2" 159 | } 160 | 161 | cleanup_chroot() { 162 | # This function cleans up the chroot shims that are used by QEMU 163 | # to allow builds on alien platforms. It takes no arguments but 164 | # expects the global $ROOTFS variable to be set. 165 | 166 | # Un-Mount the pseudofs mounts if they were mounted 167 | umount_pseudofs 168 | } 169 | 170 | register_binfmt() { 171 | # This function sets up everything that is needed to be able to 172 | # chroot into a ROOTFS and be able to run commands there. This 173 | # really matters on platforms where the host architecture is 174 | # different from the target, and you wouldn't be able to run 175 | # things like xbps-reconfigure -a. This function is idempotent 176 | # (You can run it multiple times without modifying state). This 177 | # function takes no arguments, but does expect the global variable 178 | # $XBPS_TARGET_ARCH to be set. 179 | 180 | # This select sets up the "magic" bytes in /proc that let the 181 | # kernel select an alternate interpreter. More values for this 182 | # map can be obtained from here: 183 | # https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh 184 | 185 | # If the XBPS_TARGET_ARCH is unset but the PLATFORM is known, it 186 | # may be possible to set the architecture from the static 187 | # platforms map. 188 | if [ -z "$XBPS_TARGET_ARCH" ] && [ ! -z "$PLATFORM" ] ; then 189 | set_target_arch_from_platform 190 | fi 191 | 192 | # In the special case where the build is native we can return 193 | # without doing anything else 194 | # This is only a basic check for identical archs, with more careful 195 | # checks below for cases like ppc64 -> ppc and x86_64 -> i686. 196 | _hostarch="${HOSTARCH%-musl}" 197 | _targetarch="${XBPS_TARGET_ARCH%-musl}" 198 | if [ "$_hostarch" = "$_targetarch" ] ; then 199 | return 200 | fi 201 | 202 | case "${_targetarch}" in 203 | armv*) 204 | # TODO: detect aarch64 hosts that run 32 bit ARM without qemu (some cannot) 205 | if ( [ "${_targetarch}" = "armv6l" ] && [ "${_hostarch}" = "armv7l" ] ) ; then 206 | return 207 | fi 208 | if [ "${_targetarch}" = "armv5tel" -a \ 209 | \( "${_hostarch}" = "armv6l" -o "${_hostarch}" = "armv7l" \) ] ; then 210 | return 211 | fi 212 | _cpu=arm 213 | ;; 214 | aarch64) 215 | _cpu=aarch64 216 | ;; 217 | ppc64le) 218 | _cpu=ppc64le 219 | ;; 220 | ppc64) 221 | _cpu=ppc64 222 | ;; 223 | ppc) 224 | if [ "$_hostarch" = "ppc64" ] ; then 225 | return 226 | fi 227 | _cpu=ppc 228 | ;; 229 | mipsel) 230 | if [ "$_hostarch" = "mips64el" ] ; then 231 | return 232 | fi 233 | _cpu=mipsel 234 | ;; 235 | x86_64) 236 | _cpu=x86_64 237 | ;; 238 | i686) 239 | if [ "$_hostarch" = "x86_64" ] ; then 240 | return 241 | fi 242 | _cpu=i386 243 | ;; 244 | riscv64) 245 | _cpu=riscv64 246 | ;; 247 | *) 248 | die "Unknown target architecture!" 249 | ;; 250 | esac 251 | 252 | # For builds that do not match the host architecture, the correct 253 | # qemu binary will be required. 254 | QEMU_BIN="qemu-${_cpu}" 255 | if ! $QEMU_BIN -version >/dev/null 2>&1; then 256 | die "$QEMU_BIN binary is missing in your system, exiting." 257 | fi 258 | 259 | # In order to use the binfmt system the binfmt_misc mountpoint 260 | # must exist inside of proc 261 | if ! mountpoint -q /proc/sys/fs/binfmt_misc ; then 262 | modprobe -q binfmt_misc 263 | mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc 2>/dev/null 264 | fi 265 | 266 | # Only register if the map is incomplete 267 | if [ ! -f /proc/sys/fs/binfmt_misc/qemu-$_cpu ] ; then 268 | if ! command -v update-binfmts >/dev/null 2>&1; then 269 | die "could not add binfmt: update-binfmts binary is missing in your system" 270 | fi 271 | update-binfmts --import "qemu-$_cpu" 272 | fi 273 | } 274 | 275 | set_target_arch_from_platform() { 276 | # This function maintains a lookup from platform to target 277 | # architecture. This is required for scripts that need to know 278 | # the target architecture, but don't necessarily need to know it 279 | # internally (i.e. only run_cmd_chroot). 280 | case "$PLATFORM" in 281 | rpi-aarch64*) XBPS_TARGET_ARCH="aarch64";; 282 | rpi-armv7l*) XBPS_TARGET_ARCH="armv7l";; 283 | rpi-armv6l*) XBPS_TARGET_ARCH="armv6l";; 284 | i686*) XBPS_TARGET_ARCH="i686";; 285 | x86_64*) XBPS_TARGET_ARCH="x86_64";; 286 | GCP*) XBPS_TARGET_ARCH="x86_64";; 287 | pinebookpro*) XBPS_TARGET_ARCH="aarch64";; 288 | pinephone*) XBPS_TARGET_ARCH="aarch64";; 289 | rock64*) XBPS_TARGET_ARCH="aarch64";; 290 | rockpro64*) XBPS_TARGET_ARCH="aarch64";; 291 | asahi*) XBPS_TARGET_ARCH="aarch64";; 292 | *) die "$PROGNAME: Unable to compute target architecture from platform";; 293 | esac 294 | 295 | if [ -z "${PLATFORM##*-musl}" ] ; then 296 | XBPS_TARGET_ARCH="${XBPS_TARGET_ARCH}-musl" 297 | fi 298 | } 299 | 300 | set_dracut_args_from_platform() { 301 | # In rare cases it is necessary to set platform specific dracut 302 | # args. This is mostly the case on ARM platforms. 303 | case "$PLATFORM" in 304 | *) ;; 305 | esac 306 | } 307 | 308 | set_cachedir() { 309 | # The package artifacts are cacheable, but they need to be isolated 310 | # from the host cache. 311 | : "${XBPS_CACHEDIR:=--cachedir=$PWD/xbps-cache/${XBPS_TARGET_ARCH}}" 312 | } 313 | 314 | rk33xx_flash_uboot() { 315 | local dir="$1" 316 | local dev="$2" 317 | dd if="${dir}/idbloader.img" of="${dev}" seek=64 conv=notrunc,fsync >/dev/null 2>&1 318 | dd if="${dir}/u-boot.itb" of="${dev}" seek=16384 conv=notrunc,fsync >/dev/null 2>&1 319 | } 320 | 321 | # These should all resolve even if they won't have the appropriate 322 | # repodata files for the selected architecture. 323 | : "${XBPS_REPOSITORY:=--repository=https://repo-default.voidlinux.org/current \ 324 | --repository=https://repo-default.voidlinux.org/current/musl \ 325 | --repository=https://repo-default.voidlinux.org/current/aarch64}" 326 | 327 | # This library is the authoritative source of the platform map, 328 | # because of this we may need to get this information from the command 329 | # line. This select allows us to get that information out. This 330 | # fails silently if the toolname isn't known since this script is 331 | # sourced. 332 | case "${1:-}" in 333 | platform2arch) 334 | PLATFORM=$2 335 | set_target_arch_from_platform 336 | echo "$XBPS_TARGET_ARCH" 337 | ;; 338 | esac 339 | -------------------------------------------------------------------------------- /lxde-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | ConsoleKit2 11 | libxcrypt-compat 12 | 13 | # X PACKAGES 14 | xorg-minimal 15 | xorg-input-drivers 16 | xorg-video-drivers 17 | intel-ucode 18 | setxkbmap 19 | xrandr 20 | xauth 21 | font-misc-misc 22 | terminus-font 23 | dejavu-fonts-ttf 24 | alsa-plugins-pulseaudio 25 | 26 | 27 | #USERLAND PACKAGES 28 | gptfdisk 29 | elogind 30 | dbus-elogind 31 | dbus-elogind-x11 32 | exfat-utils 33 | fuse-exfat 34 | wget 35 | lxdm 36 | pm-utils 37 | bash-completion 38 | nano 39 | git 40 | vim 41 | lxde 42 | xdg-utils 43 | xdg-desktop-portal 44 | xdg-desktop-portal-gtk 45 | xdg-desktop-portal-kde 46 | xdg-user-dirs 47 | xdg-user-dirs-gtk 48 | AppStream 49 | libvdpau-va-gl 50 | vdpauinfo 51 | pipewire 52 | gstreamer1-pipewire 53 | alsa-plugins-pulseaudio 54 | upower 55 | flatpak 56 | gnome-terminal 57 | alsa-utils 58 | pavucontrol 59 | xterm 60 | htop 61 | topgrade 62 | ntp 63 | octoxbps 64 | void-repo-multilib 65 | gvfs-afc 66 | gvfs-mtp 67 | gvfs-smb 68 | udisks2 69 | ntfs-3g 70 | gnome-keyring 71 | network-manager-applet 72 | falkon 73 | adwaita-icon-theme 74 | -------------------------------------------------------------------------------- /lxde-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="lxde" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://alpha.de.repo.voidlinux.org/current 7 | MUTILIB=https://alpha.de.repo.voidlinux.org/current/multilib 8 | NONFREE=https://alpha.de.repo.voidlinux.org/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | #shift $((OPTIND - 1)) 15 | 16 | #: ${ARCH:=$(uname -m)} 17 | 18 | sudo ./mklive.sh \ 19 | -a x86_64 \ 20 | -r ${CURRENT} \ 21 | -r ${MUTILIB} \ 22 | -I "$(pwd)/extra" \ 23 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 24 | -T "Void Linux ${DESKTOP} Unofficial" \ 25 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 26 | -S "acpid dbus dhcpcd NetworkManager lightdm polkitd" 27 | 28 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 29 | retries=${1} 30 | until [[ $retries -gt 2 ]];do 31 | echo "Retrying build ${retries}" 32 | ((retries++)) 33 | bash ${0} ${retries} 34 | 35 | done 36 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 37 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 38 | echo "ERR=1" > error-status.txt 39 | exit 1 40 | fi 41 | fi 42 | 43 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 44 | 45 | if [ ! -f sha256sums.txt ];then 46 | echo "Missing checksum file, aborting!" 47 | echo "ERR=1" > error-status.txt 48 | exit 1 49 | fi 50 | 51 | if [ ! -d "${BUILDDIR}" ];then 52 | mkdir ${BUILDDIR} 53 | fi 54 | 55 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 56 | -------------------------------------------------------------------------------- /lxqt-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg-minimal 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | xrandr 17 | setxkbmap 18 | xauth 19 | font-misc-misc 20 | terminus-font 21 | dejavu-fonts-ttf 22 | alsa-plugins-pulseaudio 23 | 24 | 25 | #USERLAND PACKAGES 26 | gptfdisk 27 | elogind 28 | dbus-elogind 29 | dbus-elogind-x11 30 | exfat-utils 31 | fuse-exfat 32 | wget 33 | qt5-plugin-sqlite 34 | micro 35 | bash-completion 36 | git 37 | xdg-utils 38 | xdg-desktop-portal 39 | xdg-desktop-portal-gtk 40 | xdg-desktop-portal-kde 41 | xdg-user-dirs 42 | xdg-user-dirs-gtk 43 | AppStream 44 | libvdpau-va-gl 45 | vdpauinfo 46 | pipewire 47 | gstreamer1-pipewire 48 | upower 49 | flatpak 50 | vim 51 | sddm 52 | lxqt 53 | lxterminal 54 | alsa-utils 55 | pavucontrol 56 | xterm 57 | htop 58 | dtrx 59 | p7zip 60 | topgrade 61 | ntp 62 | octoxbps 63 | void-repo-multilib 64 | gvfs-afc 65 | gvfs-mtp 66 | gvfs-smb 67 | udisks2 68 | ntfs-3g 69 | gnome-keyring 70 | network-manager-applet 71 | falkon 72 | papirus-icon-theme 73 | adwaita-icon-theme 74 | rsync 75 | psmisc 76 | dkms 77 | unzip 78 | -------------------------------------------------------------------------------- /lxqt-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="lxqt" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 7 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 8 | NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | 16 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 17 | ((retry++)) 18 | if [[ $retry -gt 2 ]];then 19 | break 20 | fi 21 | 22 | sudo ./mklive.sh \ 23 | -a x86_64 \ 24 | -r "${CURRENT}" \ 25 | -r "${MULTILIB}" \ 26 | -I "$(pwd)/extra" \ 27 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 28 | -T "Void Linux ${DESKTOP} Unofficial" \ 29 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 30 | -S "elogind dbus dhcpcd wpa_supplicant sddm polkitd" 31 | done 32 | 33 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 34 | retries=${1} 35 | until [[ $retries -gt 2 ]];do 36 | echo "Retrying build ${retries}" 37 | ((retries++)) 38 | bash ${0} ${retries} 39 | 40 | done 41 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 42 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 43 | echo "ERR=1" > error-status.txt 44 | exit 1 45 | fi 46 | fi 47 | 48 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 49 | 50 | if [ ! -f sha256sums.txt ];then 51 | echo "Missing checksum file, aborting!" 52 | echo "ERR=1" > error-status.txt 53 | exit 1 54 | fi 55 | 56 | if [ ! -d "${BUILDDIR}" ];then 57 | mkdir ${BUILDDIR} 58 | fi 59 | 60 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 61 | -------------------------------------------------------------------------------- /mate-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg-minimal 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | setxkbmap 17 | xauth 18 | xrandr 19 | micro 20 | font-misc-misc 21 | terminus-font 22 | dejavu-fonts-ttf 23 | alsa-plugins-pulseaudio 24 | 25 | 26 | #USERLAND PACKAGES 27 | gptfdisk 28 | linux-firmware-network 29 | gparted 30 | elogind 31 | dbus-elogind 32 | dbus-elogind-x11 33 | exfat-utils 34 | fuse-exfat 35 | wget 36 | lightdm 37 | lightdm-gtk3-greeter 38 | mate 39 | mate-extra 40 | bash-completion 41 | caja-extensions 42 | alsa-utils 43 | xdg-utils 44 | xdg-desktop-portal 45 | xdg-desktop-portal-gtk 46 | xdg-desktop-portal-kde 47 | xdg-user-dirs 48 | xdg-user-dirs-gtk 49 | AppStream 50 | libvdpau-va-gl 51 | vdpauinfo 52 | pipewire 53 | gstreamer1-pipewire 54 | upower 55 | flatpak 56 | pavucontrol 57 | alsa-plugins-pulseaudio 58 | xterm 59 | htop 60 | dtrx 61 | p7zip 62 | topgrade 63 | ntp 64 | octoxbps 65 | void-repo-multilib 66 | gvfs-afc 67 | gvfs-mtp 68 | gvfs-smb 69 | udisks2 70 | ntfs-3g 71 | gnome-keyring 72 | network-manager-applet 73 | firefox 74 | Adapta 75 | adwaita-icon-theme 76 | rsync 77 | psmisc 78 | dkms 79 | unzip 80 | -------------------------------------------------------------------------------- /mate-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="mate" 3 | echo "=========================" 4 | echo "| MATE VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://alpha.de.repo.voidlinux.org/current 7 | MUTILIB=https://alpha.de.repo.voidlinux.org/current/multilib 8 | NONFREE=https://alpha.de.repo.voidlinux.org/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | 16 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 17 | ((retry++)) 18 | if [[ $retry -gt 2 ]];then 19 | break 20 | fi 21 | 22 | sudo ./mklive.sh \ 23 | -a x86_64 \ 24 | -r "${CURRENT}" \ 25 | -r "${MULTILIB}" \ 26 | -I "$(pwd)/extra" \ 27 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 28 | -T "Void Linux ${DESKTOP} Unofficial" \ 29 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 30 | -S "dbus elogind lightdm NetworkManager polkitd" 31 | done 32 | 33 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 34 | retries=${1} 35 | until [[ $retries -gt 2 ]];do 36 | echo "Retrying build ${retries}" 37 | ((retries++)) 38 | bash ${0} ${retries} 39 | 40 | done 41 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 42 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 43 | echo "ERR=1" > error-status.txt 44 | exit 1 45 | fi 46 | fi 47 | 48 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 49 | 50 | if [ ! -f sha256sums.txt ];then 51 | echo "Missing checksum file, aborting!" 52 | echo "ERR=1" > error-status.txt 53 | exit 1 54 | fi 55 | 56 | 57 | if [ ! -d "${BUILDDIR}" ];then 58 | mkdir ${BUILDDIR} 59 | fi 60 | 61 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 62 | -------------------------------------------------------------------------------- /mkiso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | . ./lib.sh 6 | 7 | PROGNAME=$(basename "$0") 8 | ARCH=$(uname -m) 9 | IMAGES="base" 10 | TRIPLET= 11 | REPO= 12 | DATE=$(date -u +%Y%m%d) 13 | 14 | usage() { 15 | cat <<-EOH 16 | Usage: $PROGNAME [options ...] [-- mklive options ...] 17 | 18 | Wrapper script around mklive.sh for several standard flavors of live images. 19 | Adds void-installer and other helpful utilities to the generated images. 20 | 21 | OPTIONS 22 | -a <arch> Set architecture (or platform) in the image 23 | -b <variant> One of base, enlightenment, xfce, mate, cinnamon, gnome, kde, 24 | lxde, lxqt, or xfce-wayland (default: base). May be specified multiple times 25 | to build multiple variants 26 | -d <date> Override the datestamp on the generated image (YYYYMMDD format) 27 | -t <arch-date-variant> 28 | Equivalent to setting -a, -b, and -d 29 | -r <repo> Use this XBPS repository. May be specified multiple times 30 | -h Show this help and exit 31 | -V Show version and exit 32 | 33 | Other options can be passed directly to mklive.sh by specifying them after the --. 34 | See mklive.sh -h for more details. 35 | EOH 36 | } 37 | 38 | while getopts "a:b:d:t:hr:V" opt; do 39 | case $opt in 40 | a) ARCH="$OPTARG";; 41 | b) IMAGES="$OPTARG";; 42 | d) DATE="$OPTARG";; 43 | r) REPO="-r $OPTARG $REPO";; 44 | t) TRIPLET="$OPTARG";; 45 | V) version; exit 0;; 46 | h) usage; exit 0;; 47 | *) usage >&2; exit 1;; 48 | esac 49 | done 50 | shift $((OPTIND - 1)) 51 | 52 | INCLUDEDIR=$(mktemp -d) 53 | trap "cleanup" INT TERM 54 | 55 | cleanup() { 56 | rm -rf "$INCLUDEDIR" 57 | } 58 | 59 | include_installer() { 60 | if [ -x installer.sh ]; then 61 | MKLIVE_VERSION="$(PROGNAME='' version)" 62 | installer=$(mktemp) 63 | sed "s/@@MKLIVE_VERSION@@/${MKLIVE_VERSION}/" installer.sh > "$installer" 64 | install -Dm755 "$installer" "$INCLUDEDIR"/usr/bin/void-installer 65 | rm "$installer" 66 | else 67 | echo installer.sh not found >&2 68 | exit 1 69 | fi 70 | } 71 | 72 | setup_pipewire() { 73 | PKGS="$PKGS pipewire alsa-pipewire" 74 | case "$ARCH" in 75 | asahi*) 76 | PKGS="$PKGS asahi-audio" 77 | SERVICES="$SERVICES speakersafetyd" 78 | ;; 79 | esac 80 | mkdir -p "$INCLUDEDIR"/etc/xdg/autostart 81 | ln -sf /usr/share/applications/pipewire.desktop "$INCLUDEDIR"/etc/xdg/autostart/ 82 | mkdir -p "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d 83 | ln -sf /usr/share/examples/wireplumber/10-wireplumber.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/ 84 | ln -sf /usr/share/examples/pipewire/20-pipewire-pulse.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/ 85 | mkdir -p "$INCLUDEDIR"/etc/alsa/conf.d 86 | ln -sf /usr/share/alsa/alsa.conf.d/50-pipewire.conf "$INCLUDEDIR"/etc/alsa/conf.d 87 | ln -sf /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf "$INCLUDEDIR"/etc/alsa/conf.d 88 | } 89 | 90 | build_variant() { 91 | variant="$1" 92 | shift 93 | IMG=void-live-${ARCH}-${DATE}-${variant}.iso 94 | 95 | # el-cheapo installer is unsupported on arm because arm doesn't install a kernel by default 96 | # and to work around that would add too much complexity to it 97 | # thus everyone should just do a chroot install anyways 98 | WANT_INSTALLER=no 99 | case "$ARCH" in 100 | x86_64*|i686*) 101 | GRUB_PKGS="grub-i386-efi grub-x86_64-efi" 102 | GFX_PKGS="xorg-video-drivers" 103 | GFX_WL_PKGS="mesa-dri" 104 | WANT_INSTALLER=yes 105 | TARGET_ARCH="$ARCH" 106 | ;; 107 | aarch64*) 108 | GRUB_PKGS="grub-arm64-efi" 109 | GFX_PKGS="xorg-video-drivers" 110 | GFX_WL_PKGS="mesa-dri" 111 | TARGET_ARCH="$ARCH" 112 | ;; 113 | asahi*) 114 | GRUB_PKGS="asahi-base asahi-scripts grub-arm64-efi" 115 | GFX_PKGS="mesa-asahi-dri" 116 | GFX_WL_PKGS="mesa-asahi-dri" 117 | KERNEL_PKG="linux-asahi" 118 | TARGET_ARCH="aarch64${ARCH#asahi}" 119 | if [ "$variant" = xfce ]; then 120 | info_msg "xfce is not supported on asahi, switching to xfce-wayland" 121 | variant="xfce-wayland" 122 | fi 123 | ;; 124 | esac 125 | 126 | A11Y_PKGS="espeakup void-live-audio brltty" 127 | PKGS="dialog cryptsetup lvm2 mdadm void-docs-browse xtools-minimal xmirror chrony tmux $A11Y_PKGS $GRUB_PKGS" 128 | FONTS="font-misc-misc terminus-font dejavu-fonts-ttf" 129 | WAYLAND_PKGS="$GFX_WL_PKGS $FONTS orca" 130 | XORG_PKGS="$GFX_PKGS $FONTS xorg-minimal xorg-input-drivers setxkbmap xauth orca" 131 | SERVICES="sshd chronyd" 132 | 133 | LIGHTDM_SESSION='' 134 | 135 | case $variant in 136 | base) 137 | SERVICES="$SERVICES dhcpcd wpa_supplicant acpid" 138 | ;; 139 | enlightenment) 140 | PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk-greeter enlightenment terminology udisks2 firefox" 141 | SERVICES="$SERVICES acpid dhcpcd wpa_supplicant lightdm dbus polkitd" 142 | LIGHTDM_SESSION=enlightenment 143 | ;; 144 | xfce*) 145 | PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk-greeter xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox xfce4-pulseaudio-plugin" 146 | SERVICES="$SERVICES dbus lightdm NetworkManager polkitd" 147 | LIGHTDM_SESSION=xfce 148 | 149 | if [ "$variant" == "xfce-wayland" ]; then 150 | PKGS="$PKGS $WAYLAND_PKGS labwc" 151 | LIGHTDM_SESSION="xfce-wayland" 152 | fi 153 | ;; 154 | mate) 155 | PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk-greeter mate mate-extra gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox" 156 | SERVICES="$SERVICES dbus lightdm NetworkManager polkitd" 157 | LIGHTDM_SESSION=mate 158 | ;; 159 | cinnamon) 160 | PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk-greeter cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox" 161 | SERVICES="$SERVICES dbus lightdm NetworkManager polkitd" 162 | LIGHTDM_SESSION=cinnamon 163 | ;; 164 | gnome) 165 | PKGS="$PKGS $XORG_PKGS gnome firefox" 166 | SERVICES="$SERVICES dbus gdm NetworkManager polkitd" 167 | ;; 168 | kde) 169 | PKGS="$PKGS $XORG_PKGS kde5 konsole firefox dolphin NetworkManager" 170 | SERVICES="$SERVICES dbus NetworkManager sddm" 171 | ;; 172 | lxde) 173 | PKGS="$PKGS $XORG_PKGS lxde lightdm lightdm-gtk-greeter gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox" 174 | SERVICES="$SERVICES acpid dbus dhcpcd wpa_supplicant lightdm polkitd" 175 | LIGHTDM_SESSION=LXDE 176 | ;; 177 | lxqt) 178 | PKGS="$PKGS $XORG_PKGS lxqt sddm gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox" 179 | SERVICES="$SERVICES dbus dhcpcd wpa_supplicant sddm polkitd" 180 | ;; 181 | *) 182 | >&2 echo "Unknown variant $variant" 183 | exit 1 184 | ;; 185 | esac 186 | 187 | if [ -n "$LIGHTDM_SESSION" ]; then 188 | mkdir -p "$INCLUDEDIR"/etc/lightdm 189 | echo "$LIGHTDM_SESSION" > "$INCLUDEDIR"/etc/lightdm/.session 190 | # needed to show the keyboard layout menu on the login screen 191 | cat <<- EOF > "$INCLUDEDIR"/etc/lightdm/lightdm-gtk-greeter.conf 192 | [greeter] 193 | indicators = ~host;~spacer;~clock;~spacer;~layout;~session;~a11y;~power 194 | EOF 195 | fi 196 | 197 | if [ "$WANT_INSTALLER" = yes ]; then 198 | include_installer 199 | else 200 | mkdir -p "$INCLUDEDIR"/usr/bin 201 | printf "#!/bin/sh\necho 'void-installer is not supported on this live image'\n" > "$INCLUDEDIR"/usr/bin/void-installer 202 | chmod 755 "$INCLUDEDIR"/usr/bin/void-installer 203 | fi 204 | 205 | if [ "$variant" != base ]; then 206 | setup_pipewire 207 | fi 208 | 209 | ./mklive.sh -a "$TARGET_ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" \ 210 | ${KERNEL_PKG:+-v $KERNEL_PKG} ${REPO} "$@" 211 | 212 | cleanup 213 | } 214 | 215 | if [ ! -x mklive.sh ]; then 216 | echo mklive.sh not found >&2 217 | exit 1 218 | fi 219 | 220 | if [ -n "$TRIPLET" ]; then 221 | IFS=: read -r ARCH DATE VARIANT _ < <( echo "$TRIPLET" | sed -Ee 's/^(.+)-([0-9rc]+)-(.+)$/\1:\2:\3/' ) 222 | build_variant "$VARIANT" "$@" 223 | else 224 | for image in $IMAGES; do 225 | build_variant "$image" "$@" 226 | done 227 | fi 228 | -------------------------------------------------------------------------------- /mknet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #- 4 | # Copyright (c) 2009-2015 Juan Romero Pardines. 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions 9 | # are met: 10 | # 1. Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # 2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in the 14 | # documentation and/or other materials provided with the distribution. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | #- 27 | 28 | readonly PROGNAME=$(basename "$0") 29 | readonly REQTOOLS="xbps-install tar" 30 | 31 | # This script needs to jump around, so we'll remember where we started 32 | # so that we can get back here 33 | readonly CURDIR="$(pwd)" 34 | 35 | # This source pulls in all the functions from lib.sh. This set of 36 | # functions makes it much easier to work with chroots and abstracts 37 | # away all the problems with running binaries with QEMU. 38 | # shellcheck source=./lib.sh 39 | . ./lib.sh 40 | 41 | # Die is a function provided in lib.sh which handles the cleanup of 42 | # the mounts and removal of temporary directories if the running 43 | # program exists unexpectedly. 44 | trap 'bailout' INT TERM 45 | 46 | bailout() { 47 | [ -d "$BOOT_DIR" ] && rm -rf "$BOOT_DIR" 48 | die "An unchecked exception has occured!" 49 | } 50 | 51 | usage() { 52 | cat <<-EOH 53 | Usage: $PROGNAME [options] <rootfs-tarball> 54 | 55 | Generates a network-bootable tarball from a Void Linux ROOTFS generated by mkrootfs. 56 | 57 | OPTIONS 58 | -r <repo> Use this XBPS repository. May be specified multiple times 59 | -c <cachedir> Use this XBPS cache directory (default: ) 60 | -i <lz4|gzip|bzip2|xz> 61 | Compression type for the initramfs image (default: xz) 62 | -o <file> Output file name for the netboot tarball (default: automatic) 63 | -K linux<version> Install a custom Linux version on ISO image (default: linux metapackage) 64 | -k <keymap> Default keymap to use (default: us) 65 | -l <locale> Default locale to use (default: en_US.UTF-8) 66 | -C "<arg> ..." Add additional kernel command line arguments 67 | -T <title> Modify the bootloader title (default: Void Linux) 68 | -S <image> Set a custom splash image for the bootloader (default: data/splash.png) 69 | -h Show this help and exit 70 | -V Show version and exit 71 | EOH 72 | } 73 | 74 | # ######################################## 75 | # SCRIPT EXECUTION STARTS HERE 76 | # ######################################## 77 | 78 | while getopts "r:c:C:T:K:i:o:k:l:S:Vh" opt; do 79 | case $opt in 80 | r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";; 81 | c) XBPS_CACHEDIR="--cachedir=$OPTARG";; 82 | i) INITRAMFS_COMPRESSION="$OPTARG";; 83 | K) KERNELPKG="$OPTARG";; 84 | o) OUTPUT_FILE="$OPTARG";; 85 | k) KEYMAP="$OPTARG";; 86 | l) LOCALE="$OPTARG";; 87 | C) BOOT_CMDLINE="$OPTARG";; 88 | T) BOOT_TITLE="$OPTARG";; 89 | S) SPLASH_IMAGE="$OPTARG";; 90 | V) version; exit 0;; 91 | h) usage; exit 0;; 92 | *) usage >&2; exit 1;; 93 | esac 94 | done 95 | shift $((OPTIND - 1)) 96 | 97 | BASE_TARBALL="$1" 98 | 99 | # We need to infer the target architecture from the filename. All 100 | # other scripts are able to get this from the platforms map because a 101 | # platform is manually specified. Since the netboot tarballs target 102 | # only architectures, its necessary to pull this information from the 103 | # filename. 104 | XBPS_TARGET_ARCH=${BASE_TARBALL%%-ROOTFS*} 105 | XBPS_TARGET_ARCH=${XBPS_TARGET_ARCH##void-} 106 | 107 | # Knowing the target arch, we can set the cache up if it hasn't 108 | # already been set 109 | set_cachedir 110 | 111 | # This is an aweful hack since the script isn't using privesc 112 | # mechanisms selectively. This is a TODO item. 113 | if [ "$(id -u)" -ne 0 ]; then 114 | die "need root perms to continue, exiting." 115 | fi 116 | 117 | # Before going any further, check that the tools that are needed are 118 | # present. If we delayed this we could check for the QEMU binary, but 119 | # its a reasonable tradeoff to just bail out now. 120 | check_tools 121 | 122 | # We need to operate on a tempdir, if this fails to create, it is 123 | # absolutely crucial to bail out so that we don't hose the system that 124 | # is running the script. 125 | ROOTFS=$(mktemp -d) || die "failed to create ROOTFS tempdir, exiting..." 126 | BOOT_DIR=$(mktemp -d) || die "failed to create BOOT_DIR tempdir, exiting..." 127 | PXELINUX_DIR="$BOOT_DIR/pxelinux.cfg" 128 | 129 | # Now that we have a directory for the ROOTFS, we can expand the 130 | # existing base filesystem into the directory 131 | info_msg "Expanding base tarball $BASE_TARBALL into $ROOTFS for $PLATFORM build." 132 | tar xf "$BASE_TARBALL" -C "$ROOTFS" 133 | 134 | info_msg "Install additional dracut modules" 135 | # This section sets up the dracut modules that need to be present on 136 | # the ROOTFS to build the PXE tarball. This includes the netmenu 137 | # module and the autoinstaller 138 | mkdir -p "$ROOTFS/usr/lib/dracut/modules.d/05netmenu" 139 | cp dracut/netmenu/* "$ROOTFS/usr/lib/dracut/modules.d/05netmenu/" 140 | 141 | # The netmenu can directly launch the manual installer from the 142 | # initrd. This is the same installer that's on the live media with 143 | # all its quirks, oddities, and wierdness. It's included here for 144 | # places where you might have a lab network and need to run manual 145 | # installs from the network. 146 | cp installer.sh "$ROOTFS/usr/lib/dracut/modules.d/05netmenu/" 147 | 148 | # Of course with a PXE environment unattended installs are the norm. 149 | # The autoinstaller is loaded as a very high priority dracut module 150 | # and will fail the build if it can't be installed. 151 | mkdir -p "$ROOTFS/usr/lib/dracut/modules.d/01autoinstaller" 152 | cp dracut/autoinstaller/* "$ROOTFS/usr/lib/dracut/modules.d/01autoinstaller/" 153 | 154 | info_msg "Install kernel and additional required netboot packages" 155 | # The rootfs has no kernel in it, so it needs to have at the very 156 | # least dracut, syslinux, and linux installed. binutils provides 157 | # /usr/bin/strip which lets us shrink down the size of the initrd 158 | # dracut-network provides the in-initrd network stack dialog is needed 159 | # by the install environment. ${INITRAMFS_COMPRESSION} is the name of 160 | # the compressor we want to use (lz4 by default). 161 | if [ -z "${XBPS_TARGET_ARCH##*86*}" ] ; then 162 | # This platform is x86 or compatible, we should use 163 | # syslinux/pxelinux to boot the system. 164 | info_msg "Selecting syslinux bootloader" 165 | bootloader_pkg=syslinux 166 | else 167 | # This is likely an arm platform of some kind. In general these 168 | # either have u-boot or a u-boot compatible loader, so we'll use 169 | # that to produce a uImage and a uInitrd 170 | info_msg "Selecting u-boot bootloader" 171 | bootloader_pkg=uboot-mkimage 172 | fi 173 | run_cmd_target "xbps-install $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $ROOTFS -Sy ${KERNELPKG-linux} dracut binutils dracut-network dialog ${INITRAMFS_COMPRESSION-xz} ${bootloader_pkg}" 174 | run_cmd_chroot "$ROOTFS" "xbps-reconfigure -a" 175 | 176 | # Dracut needs to know the kernel version that will be using this 177 | # initrd so that it can install the kernel drivers in it. Normally 178 | # this check is quite complex, but since this is a clean rootfs and we 179 | # just installed exactly one kernel, this check can get by with a 180 | # really naive command to figure out the kernel version 181 | KERNELVERSION=$(ls "$ROOTFS/usr/lib/modules/") 182 | 183 | # Now that things are setup, we can call dracut and build the initrd. 184 | # This will pretty much step through the normal process to build 185 | # initrd with the exception that the autoinstaller and netmenu are 186 | # force added since no module depends on them. 187 | info_msg "Building initrd for kernel version $KERNELVERSION" 188 | run_cmd_chroot "$ROOTFS" "env -i /usr/bin/dracut \ 189 | -N \ 190 | --${INITRAMFS_COMPRESSION-xz} \ 191 | --add-drivers ahci \ 192 | --force-add 'autoinstaller netmenu' \ 193 | --omit systemd \ 194 | /boot/initrd \ 195 | $KERNELVERSION" 196 | [ $? -ne 0 ] && die "Failed to generate the initramfs" 197 | 198 | info_msg "Collect netboot components" 199 | if [ ${bootloader_pkg} = "syslinux" ] ; then 200 | # The whole point of this endeavor is to get the files needed for PXE. 201 | # Now that they have been generated, we copy them out of the doomed 202 | # ROOTFS and into the $BOOT_DIR where we're staging the rest of the 203 | # tarball 204 | mv -v "$ROOTFS/boot/initrd" "$BOOT_DIR" 205 | cp -v "$ROOTFS/boot/vmlinuz-$KERNELVERSION" "$BOOT_DIR/vmlinuz" 206 | 207 | # The initrd has *very* restrictive permissions by default. To 208 | # prevent some SysAdmin down the road having a very frustrating time 209 | # debugging this, we just fix this here and now. 210 | chmod 0644 "$BOOT_DIR/initrd" 211 | 212 | # Now we need to grab the rest of the files that go in the tarball. 213 | # Some of these are always required, some of these are canonical, and 214 | # some of this list is from trial and error. Either way, this is the 215 | # minimum needed to get Void up and booting on metal from the network. 216 | for prog in pxelinux.0 ldlinux.c32 libcom32.c32 vesamenu.c32 libutil.c32 chain.c32 ; do 217 | cp -v "$ROOTFS/usr/lib/syslinux/$prog" "$BOOT_DIR" 218 | done 219 | 220 | # Lastly we need the default pxelinux config and the splash image. 221 | # This is user configurable, but if that isn't set then we'll use the 222 | # one from data/splash.png instead 223 | mkdir -p "$PXELINUX_DIR" 224 | cp -f pxelinux.cfg/pxelinux.cfg.in "$PXELINUX_DIR/default" 225 | cp -f "${SPLASH_IMAGE-data/splash.png}" "$BOOT_DIR" 226 | 227 | # This sets all the variables in the default config file 228 | info_msg "Configuring pxelinux.0 default boot menu" 229 | sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE-splash.png}")|" \ 230 | -e "s|@@KERNVER@@|${KERNELVERSION}|" \ 231 | -e "s|@@KEYMAP@@|${KEYMAP-us}|" \ 232 | -e "s|@@ARCH@@|$XBPS_TARGET_ARCH|" \ 233 | -e "s|@@LOCALE@@|${LOCALE-en_US.UTF-8}|" \ 234 | -e "s|@@BOOT_TITLE@@|${BOOT_TITLE-Void Linux}|" \ 235 | -e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \ 236 | "$PXELINUX_DIR/default" 237 | else 238 | # u-boot has far far fewer components, but u-boot artifacts do 239 | # require some pre-processing 240 | 241 | if [ ! -f "$ROOTFS/boot/uImage" ] ; then 242 | 243 | # Build the uImage, this is really just the kernel with a wrapper 244 | # to make u-boot happy. It also sets the load and entry 245 | # addresses, though in general these are overriden by the u-boot 246 | # configuration. 247 | run_cmd_chroot "$ROOTFS" "env -i /usr/bin/mkimage -A arm -O linux -T kernel -C none -a 0x00000000 -e 0x00000000 -n 'Void Kernel' -d /boot/zImage /boot/uImage" 248 | 249 | # Build the uInitrd which is similarly just a copy of the real 250 | # initrd in a format that u-boot is willing to ingest. 251 | run_cmd_chroot "$ROOTFS" "env -i /usr/bin/mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n 'Void Installer Initrd' -d /boot/initrd /boot/uInitrd" 252 | 253 | # Copy out the artifacts that are worth keeping 254 | cp "$ROOTFS/boot/uImage" "$BOOT_DIR" 255 | cp "$ROOTFS/boot/uInitrd" "$BOOT_DIR" 256 | cp -r "$ROOTFS/boot/dtbs" "$BOOT_DIR" 257 | else 258 | # Copy the existing uImage out 259 | cp "$ROOTFS/boot/uImage" "$BOOT_DIR" 260 | fi 261 | fi 262 | 263 | # Compress the artifacts for distribution 264 | OUTPUT_FILE="void-${XBPS_TARGET_ARCH}-NETBOOT-$(date -u +%Y%m%d).tar.gz" 265 | info_msg "Compressing results to $OUTPUT_FILE" 266 | cd "$BOOT_DIR" || die "Could not enter image dir" 267 | tar -zcvf "$CURDIR/$OUTPUT_FILE" . 268 | cd "$CURDIR" || die "Could not return to working directory" 269 | 270 | # As a final cleanup step, remove the ROOTFS and the expanded BOOT_DIR 271 | info_msg "Cleaning up and removing build directories" 272 | cleanup_chroot 273 | [ -d "$ROOTFS" ] && rm -rf "$ROOTFS" 274 | [ -d "$BOOT_DIR" ] && rm -rf "$BOOT_DIR" 275 | -------------------------------------------------------------------------------- /mkplatformfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #- 3 | # Copyright (c) 2017 Google 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 1. Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | #- 26 | 27 | readonly PROGNAME=$(basename "$0") 28 | readonly ARCH=$(uname -m) 29 | readonly REQTOOLS="xbps-install xbps-reconfigure tar xz" 30 | 31 | # This source pulls in all the functions from lib.sh. This set of 32 | # functions makes it much easier to work with chroots and abstracts 33 | # away all the problems with running binaries with QEMU. 34 | # shellcheck source=./lib.sh 35 | . ./lib.sh 36 | 37 | # Die is a function provided in lib.sh which handles the cleanup of 38 | # the mounts and removal of temporary directories if the running 39 | # program exists unexpectedly. 40 | trap 'die "Interrupted! exiting..."' INT TERM HUP 41 | 42 | # Even though we only support really one target for most of these 43 | # architectures this lets us refer to these quickly and easily by 44 | # XBPS_ARCH. This makes it a lot more obvious what is happening later 45 | # in the script, and it makes it easier to consume the contents of 46 | # these down the road in later scripts. 47 | usage() { 48 | cat <<-EOH 49 | Usage: $PROGNAME [options] <platform> <rootfs-tarball> 50 | 51 | Generates a platform-specific ROOTFS tarball from a generic Void Linux ROOTFS 52 | generated by mkrootfs.sh. 53 | 54 | Supported platforms: i686, x86_64, GCP, 55 | rpi-armv6l, rpi-armv7l, rpi-aarch64, 56 | pinebookpro, pinephone, rock64, rockpro64, asahi 57 | 58 | OPTIONS 59 | -b <system-pkg> Set an alternative base-system package (default: base-system) 60 | -c <cachedir> Set the XBPS cache directory (default: ./xbps-cachedir-<arch>) 61 | -C <file> Full path to the XBPS configuration file 62 | -k <cmd> Call '<cmd> <ROOTFSPATH>' after building the ROOTFS 63 | -n Do not compress the image, instead print out the ROOTFS directory 64 | -o <file> Filename to write the PLATFORMFS archive to (default: automatic) 65 | -p "<pkg> ..." Additional packages to install into the ROOTFS 66 | -r <repo> Use this XBPS repository. May be specified multiple times 67 | -x <num> Number of threads to use for image compression (default: dynamic) 68 | -h Show this help and exit 69 | -V Show version and exit 70 | EOH 71 | } 72 | 73 | # ######################################## 74 | # SCRIPT EXECUTION STARTS HERE 75 | # ######################################## 76 | 77 | BASEPKG=base-system 78 | COMPRESSION="y" 79 | 80 | while getopts "b:p:k:c:C:r:x:o:nhV" opt; do 81 | case $opt in 82 | b) BASEPKG="$OPTARG" ;; 83 | p) EXTRA_PKGS="$OPTARG" ;; 84 | k) POST_CMD="$OPTARG" ;; 85 | c) XBPS_CACHEDIR="--cachedir=$OPTARG" ;; 86 | C) XBPS_CONFFILE="-C $OPTARG" ;; 87 | r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY" ;; 88 | x) COMPRESSOR_THREADS="$OPTARG" ;; 89 | o) FILENAME="$OPTARG" ;; 90 | n) COMPRESSION="n" ;; 91 | V) version; exit 0;; 92 | h) usage; exit 0 ;; 93 | *) usage >&2; exit 1 ;; 94 | esac 95 | done 96 | shift $((OPTIND - 1)) 97 | PLATFORM="$1" 98 | BASE_TARBALL="$2" 99 | 100 | if [ -z "$PLATFORM" ] || [ -z "$BASE_TARBALL" ]; then 101 | usage >&2 102 | exit 1 103 | fi 104 | 105 | # This is an aweful hack since the script isn't using privesc 106 | # mechanisms selectively. This is a TODO item. 107 | if [ "$(id -u)" -ne 0 ]; then 108 | die "need root perms to continue, exiting." 109 | fi 110 | 111 | # Before going any further, check that the tools that are needed are 112 | # present. If we delayed this we could check for the QEMU binary, but 113 | # its a reasonable tradeoff to just bail out now. 114 | check_tools 115 | 116 | # Most platforms have a base system package that includes specific 117 | # packages for bringing up the hardware. In the case of the cloud 118 | # platforms the base package includes the components needed to inject 119 | # SSH keys and user accounts. The base platform packages are always 120 | # noarch though, so we strip off the -musl extention if it was 121 | # provided. 122 | case "$PLATFORM" in 123 | rpi*) PKGS="$BASEPKG rpi-base" ;; 124 | i686*) PKGS="$BASEPKG" ;; 125 | x86_64*) PKGS="$BASEPKG" ;; 126 | GCP*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; 127 | pinebookpro*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; 128 | pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; 129 | rock64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; 130 | rockpro64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; 131 | asahi*) PKGS="$BASEPKG asahi-base asahi-scripts grub-arm64-efi dracut" ;; 132 | *) die "$PROGNAME: invalid platform!";; 133 | esac 134 | 135 | # Derive the target architecture using the static map 136 | set_target_arch_from_platform 137 | 138 | # And likewise set the cache 139 | set_cachedir 140 | 141 | # Append any additional packages if they were requested 142 | if [ -n "$EXTRA_PKGS" ] ; then 143 | PKGS="$PKGS $EXTRA_PKGS" 144 | fi 145 | 146 | # We need to operate on a tempdir, if this fails to create, it is 147 | # absolutely crucial to bail out so that we don't hose the system that 148 | # is running the script. 149 | ROOTFS=$(mktemp -d) || die "failed to create tempdir, exiting..." 150 | 151 | # Now that we have a directory for the ROOTFS, we can expand the 152 | # existing base filesystem into the directory 153 | if [ ! -e "$BASE_TARBALL" ]; then 154 | die "no valid base tarball given, exiting." 155 | fi 156 | 157 | info_msg "Expanding base tarball $BASE_TARBALL into $ROOTFS for $PLATFORM build." 158 | tar xf "$BASE_TARBALL" --xattrs --xattrs-include='*' -C "$ROOTFS" 159 | 160 | # This will install, but not configure, the packages specified by 161 | # $PKGS. After this step we will do an xbps-reconfigure -f $PKGS 162 | # under the correct architecture to ensure the system is setup 163 | # correctly. 164 | run_cmd_target "xbps-install -SU $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $ROOTFS -y $PKGS" 165 | 166 | # Now that the packages are installed, we need to chroot in and 167 | # reconfigure. This needs to be done as the right architecture. 168 | # Since this is the only thing we're doing in the chroot, we clean up 169 | # right after. 170 | run_cmd_chroot "$ROOTFS" "xbps-reconfigure -a" 171 | 172 | # Before final cleanup the ROOTFS needs to be checked to make sure it 173 | # contains an initrd and if its a platform with arch 'arm*' it needs 174 | # to also have a uInitrd. For this to work the system needs to have 175 | # the uboot-mkimage package installed. Base system packages that do 176 | # not provide this must provide the uInitrd pre-prepared if they are 177 | # arm based. x86 images will have this built using native dracut 178 | # using post unpacking steps for platforms that consume the x86 179 | # tarballs. This check is very specific and ensures that applicable 180 | # tooling is present before proceeding. 181 | if [ ! -f "$ROOTFS/boot/uInitrd" ] || 182 | [ ! -f "$ROOTFS/boot/initrd" ] && 183 | [ -z "${XBPS_TARGET_ARCH##*arm*}" ] && 184 | [ -x "$ROOTFS/usr/bin/dracut" ] && 185 | [ -x "$ROOTFS/usr/bin/mkimage" ]; then 186 | 187 | # Dracut needs to know the kernel version that will be using this 188 | # initrd so that it can install the kernel drivers in it. Normally 189 | # this check is quite complex, but since this is a clean rootfs and we 190 | # just installed exactly one kernel, this check can get by with a 191 | # really niave command to figure out the kernel version 192 | KERNELVERSION=$(ls "$ROOTFS/usr/lib/modules/") 193 | 194 | # Some platforms also have special arguments that need to be set 195 | # for dracut. This allows us to kludge around issues that may 196 | # exist on certain specific platforms we build for. 197 | set_dracut_args_from_platform 198 | 199 | # Now that things are setup, we can call dracut and build the initrd. 200 | # This will pretty much step through the normal process to build 201 | # initrd with the exception that the autoinstaller and netmenu are 202 | # force added since no module depends on them. 203 | info_msg "Building initrd for kernel version $KERNELVERSION" 204 | run_cmd_chroot "$ROOTFS" "env -i /usr/bin/dracut $dracut_args /boot/initrd $KERNELVERSION" 205 | [ $? -ne 0 ] && die "Failed to generate the initramfs" 206 | 207 | run_cmd_chroot "$ROOTFS" "env -i /usr/bin/mkimage -A arm -O linux -T ramdisk -C gzip -a 0 -e 0 -n 'Void Linux' -d /boot/initrd /boot/uInitrd" 208 | fi 209 | 210 | cleanup_chroot 211 | 212 | # The cache isn't that useful since by the time the ROOTFS will be 213 | # used it is likely to be out of date. Rather than shipping it around 214 | # only for it to be out of date, we remove it now. 215 | rm -rf "$ROOTFS/var/cache/*" 2>/dev/null 216 | 217 | # Now we can run the POST_CMD script. This user-supplied script gets the 218 | # $ROOTFS as a parameter. 219 | if [ -n "$POST_CMD" ]; then 220 | info_msg "Running user supplied command: $POST_CMD" 221 | run_cmd $POST_CMD $ROOTFS 222 | fi 223 | 224 | 225 | # Compress the tarball or just print out the path? 226 | if [ "$COMPRESSION" = "y" ]; then 227 | # Finally we can compress the tarball, the name will include the 228 | # platform and the date on which the tarball was built. 229 | tarball=${FILENAME:-void-${PLATFORM}-PLATFORMFS-$(date -u '+%Y%m%d').tar.xz} 230 | run_cmd "tar cp --posix --xattrs --xattrs-include='*' -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball " 231 | [ $? -ne 0 ] && die "Failed to compress tarball" 232 | 233 | # Now that we have the tarball we don't need the rootfs anymore, so we 234 | # can get rid of it. 235 | rm -rf "$ROOTFS" 236 | 237 | # Last thing to do before closing out is to let the user know that 238 | # this succeeded. This also ensures that there's something visible 239 | # that the user can look for at the end of the script, which can make 240 | # it easier to see what's going on if something above failed. 241 | info_msg "Successfully created $tarball ($PLATFORM)" 242 | else 243 | # User requested just printing out the path to the rootfs, here it comes. 244 | info_msg "Successfully created rootfs under $ROOTFS" 245 | fi 246 | -------------------------------------------------------------------------------- /mkrootfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #- 3 | # Copyright (c) 2013-2015 Juan Romero Pardines. 4 | # Copyright (c) 2017 Google 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions 9 | # are met: 10 | # 1. Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # 2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in the 14 | # documentation and/or other materials provided with the distribution. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | #- 27 | 28 | readonly PROGNAME=$(basename "$0") 29 | readonly ARCH=$(uname -m) 30 | readonly REQTOOLS="xbps-install xbps-reconfigure tar xz" 31 | 32 | # This source pulls in all the functions from lib.sh. This set of 33 | # functions makes it much easier to work with chroots and abstracts 34 | # away all the problems with running binaries with QEMU. 35 | # shellcheck source=./lib.sh 36 | . ./lib.sh 37 | 38 | # Die is a function provided in lib.sh which handles the cleanup of 39 | # the mounts and removal of temporary directories if the running 40 | # program exists unexpectedly. 41 | trap 'die "Interrupted! exiting..."' INT TERM HUP 42 | 43 | # Even though we only support really one target for most of these 44 | # architectures this lets us refer to these quickly and easily by 45 | # XBPS_ARCH. This makes it a lot more obvious what is happening later 46 | # in the script, and it makes it easier to consume the contents of 47 | # these down the road in later scripts. 48 | usage() { 49 | cat <<-EOH 50 | Usage: $PROGNAME [options] <arch> 51 | 52 | Generate a Void Linux ROOTFS tarball for the specified architecture. 53 | 54 | Supported architectures: 55 | i686, i686-musl, x86_64, x86_64-musl, 56 | armv5tel, armv5tel-musl, armv6l, armv6l-musl, armv7l, armv7l-musl 57 | aarch64, aarch64-musl, 58 | mipsel, mipsel-musl, 59 | ppc, ppc-musl, ppc64le, ppc64le-musl, ppc64, ppc64-musl 60 | riscv64, riscv64-musl 61 | 62 | OPTIONS 63 | -b <system-pkg> Set an alternative base-system package (default: base-container-full) 64 | -c <cachedir> Set XBPS cache directory (default: ./xbps-cachedir-<arch>) 65 | -C <file> Full path to the XBPS configuration file 66 | -r <repo> Use this XBPS repository. May be specified multiple times 67 | -o <file> Filename to write the ROOTFS to (default: automatic) 68 | -x <num> Number of threads to use for image compression (default: dynamic) 69 | -h Show this help and exit 70 | -V Show version and exit 71 | EOH 72 | } 73 | 74 | # ######################################## 75 | # SCRIPT EXECUTION STARTS HERE 76 | # ######################################## 77 | 78 | # Set the default system package. 79 | SYSPKG="base-container-full" 80 | 81 | # Boilerplate option parsing. This script supports the bare minimum 82 | # needed to build an image. 83 | while getopts "b:C:c:hr:x:o:V" opt; do 84 | case $opt in 85 | b) SYSPKG="$OPTARG";; 86 | C) XBPS_CONFFILE="-C $OPTARG";; 87 | c) XBPS_CACHEDIR="--cachedir=$OPTARG";; 88 | r) XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=$OPTARG";; 89 | x) COMPRESSOR_THREADS="$OPTARG" ;; 90 | o) FILENAME="$OPTARG" ;; 91 | V) version; exit 0;; 92 | h) usage; exit 0;; 93 | *) usage >&2; exit 1;; 94 | esac 95 | done 96 | shift $((OPTIND - 1)) 97 | XBPS_TARGET_ARCH="$1" 98 | 99 | if [ -z "$XBPS_TARGET_ARCH" ]; then 100 | usage >&2 101 | exit 1 102 | fi 103 | 104 | # Set the XBPS cache 105 | set_cachedir 106 | 107 | # This is an aweful hack since the script isn't using privesc 108 | # mechanisms selectively. This is a TODO item. 109 | if [ "$(id -u)" -ne 0 ]; then 110 | die "need root perms to continue, exiting." 111 | fi 112 | 113 | # Before going any further, check that the tools that are needed are 114 | # present. If we delayed this we could check for the QEMU binary, but 115 | # its a reasonable tradeoff to just bail out now. 116 | check_tools 117 | 118 | # If the arch wasn't set let's bail out now, nothing else in this 119 | # script will work without knowing what we're trying to build for. 120 | if [ -z "$XBPS_TARGET_ARCH" ]; then 121 | echo "$PROGNAME: arch was not set!" 122 | usage >&2; exit 1 123 | fi 124 | 125 | # We need to operate on a tempdir, if this fails to create, it is 126 | # absolutely crucial to bail out so that we don't hose the system that 127 | # is running the script. 128 | ROOTFS=$(mktemp -d) || die "failed to create tempdir, exiting..." 129 | 130 | # This maintains the chain of trust, the keys in the repo are known to 131 | # be good and so we copy those. Why don't we just use the ones on the 132 | # host system? That's a good point, but there's no promise that the 133 | # system running the script is Void, or that those keys haven't been 134 | # tampered with. Its much easier to use these since the will always 135 | # exist. 136 | mkdir -p "$ROOTFS/var/db/xbps/keys" 137 | cp keys/*.plist "$ROOTFS/var/db/xbps/keys" 138 | 139 | # This sets up files that are important for XBPS to work on the new 140 | # filesystem. It does not actually install anything. 141 | run_cmd_target "xbps-install -S $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $ROOTFS" 142 | 143 | # Later scripts expect the permissions on / to be the canonical 755, 144 | # so we set this here. 145 | chmod 755 "$ROOTFS" 146 | 147 | # The binfmt setup and pseudofs mountpoints are needed for the qemu 148 | # support in cases where we are running things that aren't natively 149 | # executable. 150 | register_binfmt 151 | mount_pseudofs 152 | 153 | # With everything setup, we can now run the install to load the 154 | # system package into the rootfs. This will not produce a 155 | # bootable system but will instead produce a base component that can 156 | # be quickly expanded to perform other actions on. 157 | run_cmd_target "xbps-install -SU $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $ROOTFS -y $SYSPKG" 158 | 159 | # Enable en_US.UTF-8 locale and generate it into the target ROOTFS. 160 | # This is a bit of a hack since some glibc stuff doesn't really work 161 | # correctly without a locale being generated. While some could argue 162 | # that this is an arbitrary or naive choice to enable the en_US 163 | # locale, most people using Void are able to work with the English 164 | # language at least enough to enable thier preferred locale. If this 165 | # truly becomes an issue in the future this hack can be revisited. 166 | if [ -e "$ROOTFS/etc/default/libc-locales" ]; then 167 | LOCALE=en_US.UTF-8 168 | sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i "$ROOTFS/etc/default/libc-locales" 169 | fi 170 | 171 | # The reconfigure step needs to execute code that's been compiled for 172 | # the target architecture. Since the target isn't garanteed to be the 173 | # same as the host, this needs to be done via qemu. 174 | info_msg "Reconfiguring packages for ${XBPS_TARGET_ARCH} ..." 175 | 176 | # This step sets up enough of the base-files that the chroot will work 177 | # and they can be reconfigured natively. Without this step there 178 | # isn't enough configured for ld to work. This step runs as the host 179 | # architecture, but we may need to set up XBPS_ARCH for the target 180 | # architecture (but only when compatible). 181 | if is_target_native "$XBPS_TARGET_ARCH"; then 182 | run_cmd_target "xbps-reconfigure --rootdir $ROOTFS base-files" 183 | else 184 | run_cmd "xbps-reconfigure --rootdir $ROOTFS base-files" 185 | fi 186 | 187 | # Now running as the target system, this step reconfigures the 188 | # base-files completely. Certain things just won't work in the first 189 | # pass, so this cleans up any issues that linger. 190 | run_cmd_chroot "$ROOTFS" "env -i xbps-reconfigure -f base-files" 191 | 192 | # Once base-files is configured and functional its possible to 193 | # configure the rest of the system. 194 | run_cmd_chroot "$ROOTFS" "xbps-reconfigure -a" 195 | 196 | # Set the default password. Previous versions of this script used a 197 | # chroot to do this, but that is unnecessary since chpasswd 198 | # understands how to operate on chroots without actually needing to be 199 | # chrooted. We also remove the lock file in this step to clean up the 200 | # lock on the passwd database, lest it be left in the system and 201 | # propogated to other points. 202 | info_msg "Setting the default root password ('voidlinux')" 203 | if [ ! -f "$ROOTFS/etc/shadow" ] ; then 204 | run_cmd_chroot "$ROOTFS" pwconv 205 | fi 206 | echo root:voidlinux | run_cmd_chroot "$ROOTFS" "chpasswd -c SHA512" || die "Could not set default credentials" 207 | rm -f "$ROOTFS/etc/.pwd.lock" 208 | 209 | # At this point we're done running things in the chroot and we can 210 | # clean up the shims. Failure to do this can result in things hanging 211 | # when we try to delete the tmpdir. 212 | cleanup_chroot 213 | 214 | # The cache isn't that useful since by the time the ROOTFS will be 215 | # used it is likely to be out of date. Rather than shipping it around 216 | # only for it to be out of date, we remove it now. 217 | rm -rf "$ROOTFS/var/cache/*" 2>/dev/null 218 | 219 | # Finally we can compress the tarball, the name will include the 220 | # architecture and the date on which the tarball was built. 221 | : "${FILENAME:=void-${XBPS_TARGET_ARCH}-ROOTFS-$(date -u '+%Y%m%d').tar.xz}" 222 | run_cmd "tar cp --posix --xattrs --xattrs-include='*' -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $FILENAME " 223 | 224 | # Now that we have the tarball we don't need the rootfs anymore, so we 225 | # can get rid of it. 226 | rm -rf "$ROOTFS" 227 | 228 | # Last thing to do before closing out is to let the user know that 229 | # this succeeded. This also ensures that there's something visible 230 | # that the user can look for at the end of the script, which can make 231 | # it easier to see what's going on if something above failed. 232 | info_msg "Successfully created $FILENAME ($XBPS_TARGET_ARCH)" 233 | -------------------------------------------------------------------------------- /package_lists/base-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | grub-btrfs 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | # NETWORKING 12 | NetworkManager 13 | ntp 14 | 15 | # UTILITIES 16 | wget 17 | bash-completion 18 | xterm 19 | htop 20 | 21 | # PACKAGE MANAGEMENT 22 | topgrade 23 | 24 | # DEVELOPMENT 25 | git 26 | 27 | # FILE SYSTEM 28 | exfat-utils 29 | fuse-exfat 30 | ntfs-3g 31 | gptfdisk 32 | btrfs-progs 33 | # TEXT EDITORS 34 | nano 35 | vim 36 | 37 | # REPOSITORIES 38 | void-repo-multilib 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /package_lists/cinnamon-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg-minimal 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | #intel-ucode 17 | setxkbmap 18 | xauth 19 | font-misc-misc 20 | terminus-font 21 | dejavu-fonts-ttf 22 | alsa-plugins-pulseaudio 23 | 24 | #DISPLAY MANAGER 25 | lightdm 26 | lightdm-gtk3-greeter 27 | 28 | #USERLAND PACKAGES 29 | gptfdisk 30 | gettext 31 | elogind 32 | dbus-elogind 33 | dbus-elogind-x11 34 | exfat-utils 35 | fuse-exfat 36 | wget 37 | micro 38 | xdg-utils 39 | xdg-desktop-portal 40 | xdg-desktop-portal-gtk 41 | xdg-desktop-portal-kde 42 | xdg-user-dirs 43 | xdg-user-dirs-gtk 44 | #libappindicator 45 | AppStream 46 | libvdpau-va-gl 47 | vdpauinfo 48 | pipewire 49 | wireplumber 50 | gstreamer1-pipewire 51 | upower 52 | flatpak 53 | git 54 | vim 55 | dtrx 56 | unzip 57 | p7zip 58 | #unrar 59 | bash-completion 60 | cinnamon 61 | xrandr 62 | colord 63 | gnome-terminal 64 | alsa-utils 65 | pavucontrol 66 | xterm 67 | htop 68 | topgrade 69 | ntp 70 | octoxbps 71 | void-repo-multilib 72 | gvfs-afc 73 | gvfs-mtp 74 | gvfs-smb 75 | udisks2 76 | ntfs-3g 77 | gnome-keyring 78 | network-manager-applet 79 | firefox 80 | adwaita-icon-theme 81 | rsync 82 | psmisc 83 | dkms 84 | unzip 85 | -------------------------------------------------------------------------------- /package_lists/e17-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg-minimal 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | xrandr 17 | setxkbmap 18 | xauth 19 | font-misc-misc 20 | terminus-font 21 | dejavu-fonts-ttf 22 | 23 | 24 | #LOGIN 25 | lightdm 26 | lightdm-gtk3-greeter 27 | 28 | #USERLAND PACKAGES 29 | gptfdisk 30 | elogind 31 | dbus-elogind 32 | dbus-elogind-x11 33 | polkit-elogind 34 | exfat-utils 35 | fuse-exfat 36 | wget 37 | enlightenment 38 | terminology 39 | upower 40 | xdg-utils 41 | xdg-desktop-portal 42 | xdg-desktop-portal-gtk 43 | xdg-desktop-portal-kde 44 | xdg-user-dirs 45 | xdg-user-dirs-gtk 46 | AppStream 47 | libvdpau-va-gl 48 | vdpauinfo 49 | pipewire 50 | gstreamer1-pipewire 51 | wireplumber 52 | libjack-pipewire 53 | upower 54 | flatpak 55 | zenity 56 | bash-completion 57 | micro 58 | xdg-utils 59 | vim 60 | git 61 | alsa-utils 62 | pavucontrol 63 | alsa-pipewire 64 | xterm 65 | htop 66 | dtrx 67 | p7zip 68 | topgrade 69 | ntp 70 | void-repo-multilib 71 | void-repo-nonfree 72 | octoxbps 73 | gvfs-afc 74 | gvfs-mtp 75 | gvfs-smb 76 | udisks2 77 | ntfs-3g 78 | gnome-keyring 79 | network-manager-applet 80 | firefox 81 | gnome-themes-standard 82 | adwaita-icon-theme 83 | rsync 84 | psmisc 85 | dkms 86 | unzip 87 | -------------------------------------------------------------------------------- /package_lists/gnome-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | dbus 11 | avahi 12 | avahi-utils 13 | libxcrypt-compat 14 | 15 | # X PACKAGES 16 | xorg-minimal 17 | xorg-input-drivers 18 | xorg-video-drivers 19 | setxkbmap 20 | xauth 21 | xrandr 22 | font-misc-misc 23 | terminus-font 24 | dejavu-fonts-ttf 25 | alsa-plugins-pulseaudio 26 | 27 | 28 | #USERLAND PACKAGES 29 | gptfdisk 30 | elogind 31 | #dbus-elogind 32 | #dbus-elogind-x11 33 | exfat-utils 34 | fuse-exfat 35 | wget 36 | gdm 37 | bash-completion 38 | nano 39 | git 40 | vim 41 | alsa-utils 42 | paprefs 43 | xdg-utils 44 | xdg-desktop-portal 45 | xdg-desktop-portal-gtk 46 | xdg-desktop-portal-kde 47 | xdg-user-dirs 48 | xdg-user-dirs-gtk 49 | AppStream 50 | libva-vdpau-driver 51 | vdpauinfo 52 | pipewire 53 | gstreamer1-pipewire 54 | alsa-pipewire 55 | libjack-pipewire 56 | upower 57 | flatpak 58 | pavucontrol 59 | xterm 60 | htop 61 | topgrade 62 | ntp 63 | void-repo-multilib 64 | void-repo-nonfree 65 | octoxbps 66 | gvfs-afc 67 | gvfs-mtp 68 | gvfs-smb 69 | udisks2 70 | ntfs-3g 71 | gnome-keyring 72 | network-manager-applet 73 | firefox 74 | gnome 75 | gnome-apps 76 | Adapta 77 | papirus-icon-theme 78 | gnome-themes-standard 79 | adwaita-icon-theme 80 | -------------------------------------------------------------------------------- /package_lists/i3-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # LOGIN 13 | lightdm 14 | lightdm-gtk3-greeter 15 | 16 | # X PACKAGES 17 | elogind 18 | dbus-elogind 19 | dbus-elogind-x11 20 | exfat-utils 21 | fuse-exfat 22 | xorg-minimal 23 | xorg-input-drivers 24 | xorg-video-drivers 25 | setxkbmap 26 | xauth 27 | xrandr 28 | font-misc-misc 29 | terminus-font 30 | dejavu-fonts-ttf 31 | alsa-plugins-pulseaudio 32 | 33 | 34 | #USERLAND PACKAGES 35 | gptfdisk 36 | wget 37 | nano 38 | xdg-utils 39 | xdg-desktop-portal 40 | xdg-desktop-portal-gtk 41 | xdg-desktop-portal-kde 42 | xdg-user-dirs 43 | xdg-user-dirs-gtk 44 | AppStream 45 | libvdpau-va-gl 46 | vdpauinfo 47 | pipewire 48 | wireplumber 49 | gstreamer1-pipewire 50 | upower 51 | flatpak 52 | git 53 | vim 54 | upower 55 | bash-completion 56 | i3-gaps 57 | i3blocks 58 | i3status 59 | alsa-utils 60 | pulsemixer 61 | pasystray 62 | xterm 63 | mc 64 | htop 65 | dtrx 66 | p7zip 67 | topgrade 68 | ntp 69 | dmenu 70 | sakura 71 | void-repo-multilib 72 | gvfs-afc 73 | gvfs-mtp 74 | gvfs-smb 75 | udisks2 76 | ntfs-3g 77 | gnome-keyring 78 | network-manager-applet 79 | qutebrowser 80 | adwaita-icon-theme 81 | -------------------------------------------------------------------------------- /package_lists/kde-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | setxkbmap 17 | xauth 18 | xrandr 19 | libvdpau-va-gl 20 | vdpauinfo 21 | font-misc-misc 22 | terminus-font 23 | dejavu-fonts-ttf 24 | 25 | # KERNEL 26 | linux-firmware-network 27 | dkms 28 | 29 | 30 | # SOUND 31 | alsa-plugins-pulseaudio 32 | pipewire 33 | gstreamer1-pipewire 34 | alsa-utils 35 | paprefs 36 | pavucontrol 37 | 38 | # NETWORK 39 | inetutils 40 | usbutils 41 | wget 42 | curl 43 | ntp 44 | NetworkManager 45 | 46 | # DESKTOP ENVIRONMENT 47 | sddm 48 | kde5 49 | kde5-baseapps 50 | kaccounts-integration 51 | kaccounts-providers 52 | dolphin 53 | plasma-nm 54 | plasma-pa 55 | xdg-utils 56 | xdg-desktop-portal 57 | xdg-desktop-portal-gtk 58 | xdg-desktop-portal-kde 59 | xdg-user-dirs 60 | xdg-user-dirs-gtk 61 | AppStream 62 | 63 | 64 | # LOOK AND FEEL 65 | adapta-kde 66 | adwaita-icon-theme 67 | 68 | # FILE SYSTEM 69 | exfat-utils 70 | fuse-exfat 71 | gvfs-afc 72 | gvfs-mtp 73 | gvfs-smb 74 | udisks2 75 | ntfs-3g 76 | gptfdisk 77 | 78 | # PACKAGE MANAGEMENT 79 | flatpak 80 | topgrade 81 | octoxbps 82 | 83 | # AUTH 84 | kdesu 85 | elogind 86 | dbus-elogind 87 | dbus-elogind-x11 88 | gnome-keyring 89 | 90 | # DEVELOPMENT 91 | git 92 | 93 | # ARCHIVE SOFTWARE 94 | dtrx 95 | p7zip 96 | unzip 97 | 98 | # TEXT EDITORS 99 | micro 100 | vim 101 | kwrite 102 | 103 | # POWER MANAGEMENT 104 | upower 105 | 106 | # UTILITIES 107 | konsole 108 | bash-completion 109 | xterm 110 | htop 111 | rsync 112 | psmisc 113 | kcalc 114 | 115 | 116 | # INTERNET 117 | firefox 118 | 119 | 120 | # REPOSITORIES 121 | void-repo-multilib 122 | void-repo-nonfree 123 | -------------------------------------------------------------------------------- /package_lists/lxqt-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg-minimal 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | xrandr 17 | setxkbmap 18 | xauth 19 | font-misc-misc 20 | terminus-font 21 | dejavu-fonts-ttf 22 | alsa-plugins-pulseaudio 23 | 24 | 25 | #USERLAND PACKAGES 26 | gptfdisk 27 | elogind 28 | dbus-elogind 29 | dbus-elogind-x11 30 | exfat-utils 31 | fuse-exfat 32 | wget 33 | qt5-plugin-sqlite 34 | micro 35 | bash-completion 36 | git 37 | xdg-utils 38 | xdg-desktop-portal 39 | xdg-desktop-portal-gtk 40 | xdg-desktop-portal-kde 41 | xdg-user-dirs 42 | xdg-user-dirs-gtk 43 | AppStream 44 | libvdpau-va-gl 45 | vdpauinfo 46 | pipewire 47 | gstreamer1-pipewire 48 | upower 49 | flatpak 50 | vim 51 | sddm 52 | lxqt 53 | lxterminal 54 | alsa-utils 55 | pavucontrol 56 | xterm 57 | htop 58 | dtrx 59 | p7zip 60 | topgrade 61 | ntp 62 | octoxbps 63 | void-repo-multilib 64 | gvfs-afc 65 | gvfs-mtp 66 | gvfs-smb 67 | udisks2 68 | ntfs-3g 69 | gnome-keyring 70 | network-manager-applet 71 | falkon 72 | papirus-icon-theme 73 | adwaita-icon-theme 74 | rsync 75 | psmisc 76 | dkms 77 | unzip 78 | -------------------------------------------------------------------------------- /package_lists/mate-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # X PACKAGES 13 | xorg-minimal 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | setxkbmap 17 | xauth 18 | xrandr 19 | micro 20 | font-misc-misc 21 | terminus-font 22 | dejavu-fonts-ttf 23 | alsa-plugins-pulseaudio 24 | 25 | 26 | #USERLAND PACKAGES 27 | gptfdisk 28 | linux-firmware-network 29 | gparted 30 | elogind 31 | dbus-elogind 32 | dbus-elogind-x11 33 | exfat-utils 34 | fuse-exfat 35 | wget 36 | lightdm 37 | lightdm-gtk3-greeter 38 | mate 39 | mate-extra 40 | bash-completion 41 | caja-extensions 42 | alsa-utils 43 | xdg-utils 44 | xdg-desktop-portal 45 | xdg-desktop-portal-gtk 46 | xdg-desktop-portal-kde 47 | xdg-user-dirs 48 | xdg-user-dirs-gtk 49 | AppStream 50 | libvdpau-va-gl 51 | vdpauinfo 52 | pipewire 53 | gstreamer1-pipewire 54 | upower 55 | flatpak 56 | pavucontrol 57 | alsa-plugins-pulseaudio 58 | xterm 59 | htop 60 | dtrx 61 | p7zip 62 | topgrade 63 | ntp 64 | octoxbps 65 | void-repo-multilib 66 | gvfs-afc 67 | gvfs-mtp 68 | gvfs-smb 69 | udisks2 70 | ntfs-3g 71 | gnome-keyring 72 | network-manager-applet 73 | firefox 74 | Adapta 75 | adwaita-icon-theme 76 | rsync 77 | psmisc 78 | dkms 79 | unzip 80 | -------------------------------------------------------------------------------- /package_lists/xfce-x64.packages.txt: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # XORG PACKAGES 13 | xorg 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | xrandr 17 | setxkbmap 18 | xauth 19 | vdpauinfo 20 | libvdpau-va-gl 21 | font-misc-misc 22 | terminus-font 23 | dejavu-fonts-ttf 24 | dbus-elogind-x11 25 | 26 | 27 | # KERNEL 28 | linux-firmware-network 29 | dkms 30 | 31 | # SOUND 32 | paprefs 33 | pavucontrol 34 | pipewire 35 | wireplumber 36 | alsa-utils 37 | alsa-plugins-pulseaudio 38 | gstreamer1-pipewire 39 | 40 | # NETWORK 41 | NetworkManager 42 | network-manager-applet 43 | ntp 44 | wget 45 | 46 | 47 | # DESKTOP ENVIRONMENT 48 | lightdm 49 | lightdm-gtk3-greeter 50 | xfce4 51 | xfce4-plugins 52 | xdg-utils 53 | xdg-desktop-portal 54 | xdg-desktop-portal-gtk 55 | xdg-desktop-portal-kde 56 | xdg-user-dirs 57 | xdg-user-dirs-gtk 58 | AppStream 59 | 60 | 61 | # LOOK AND FEEL 62 | adwaita-icon-theme 63 | Adapta 64 | gnome-themes-standard 65 | 66 | # FILE SYSTEM 67 | ntfs-3g 68 | exfat-utils 69 | fuse-exfat 70 | gvfs-afc 71 | gvfs-mtp 72 | gvfs-smb 73 | udisks2 74 | gparted 75 | gptfdisk 76 | 77 | # PACKAGE MANAGEMENT 78 | flatpak 79 | octoxbps 80 | topgrade 81 | 82 | # AUTH 83 | elogind 84 | dbus-elogind 85 | gnome-keyring 86 | 87 | # DEVELOPMENT 88 | git 89 | zenity 90 | 91 | # ARCHIVE SOFTWARE 92 | dtrx 93 | p7zip 94 | 95 | # TEXT EDITORS 96 | vim 97 | micro 98 | 99 | # POWER MANAGEMENT 100 | upower 101 | 102 | # UTILITIES 103 | xterm 104 | htop 105 | bash-completion 106 | rsync 107 | psmisc 108 | unzip 109 | 110 | # INTERNET 111 | firefox 112 | 113 | # REPOSITORIES 114 | void-repo-multilib 115 | void-repo-nonfree 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /packer/.gitignore: -------------------------------------------------------------------------------- 1 | output_* 2 | packer_cache 3 | crash.log 4 | *.box 5 | templates/ 6 | cloud-generic 7 | -------------------------------------------------------------------------------- /packer/hcl2/build-cloud-generic.pkr.hcl: -------------------------------------------------------------------------------- 1 | build { 2 | name = "cloud-generic-x86_64" 3 | 4 | source "source.qemu.x86_64" { 5 | boot_command = [ 6 | "<tab><wait>", 7 | "auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64.cfg", 8 | "<enter>" 9 | ] 10 | vm_name = "voidlinux-x86_64" 11 | output_directory = "cloud-generic-x86_64" 12 | } 13 | 14 | provisioner "shell" { 15 | script = "scripts/cloud.sh" 16 | execute_command = "echo 'void' | {{.Vars}} sudo -E -S bash '{{.Path}}'" 17 | } 18 | } 19 | 20 | build { 21 | name = "cloud-generic-x86_64-musl" 22 | 23 | source "source.qemu.x86_64" { 24 | boot_command = [ 25 | "<tab><wait>", 26 | "auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64-musl.cfg", 27 | "<enter>" 28 | ] 29 | vm_name = "voidlinux-x86_64-musl" 30 | output_directory = "cloud-generic-x86_64-musl" 31 | } 32 | 33 | provisioner "shell" { 34 | script = "scripts/cloud.sh" 35 | execute_command = "echo 'void' | {{.Vars}} sudo -E -S bash '{{.Path}}'" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packer/hcl2/build-vagrant.pkr.hcl: -------------------------------------------------------------------------------- 1 | build { 2 | name = "vagrant-virtualbox-x86_64" 3 | 4 | source "source.virtualbox-iso.x86_64" { 5 | boot_command = [ 6 | "<tab><wait>", 7 | "auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64.cfg", 8 | "<enter>" 9 | ] 10 | vm_name = "voidlinux-x86_64" 11 | output_directory = "vagrant-virtualbox-x86_64" 12 | } 13 | 14 | provisioner "shell" { 15 | script = "scripts/vagrant.sh" 16 | execute_command = "echo 'void' | {{.Vars}} sudo -E -S bash '{{.Path}}'" 17 | } 18 | 19 | post-processor "vagrant" { 20 | output = "vagrant-virtualbox-x86_64.box" 21 | } 22 | } 23 | 24 | build { 25 | name = "vagrant-virtualbox-x86_64-musl" 26 | 27 | source "source.virtualbox-iso.x86_64" { 28 | boot_command = [ 29 | "<tab><wait>", 30 | "auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64-musl.cfg", 31 | "<enter>" 32 | ] 33 | vm_name = "voidlinux-x86_64-musl" 34 | output_directory = "vagrant-virtualbox-x86_64-musl" 35 | } 36 | 37 | provisioner "shell" { 38 | script = "scripts/vagrant.sh" 39 | execute_command = "echo 'void' | {{.Vars}} sudo -E -S bash '{{.Path}}'" 40 | } 41 | 42 | post-processor "vagrant" { 43 | output = "vagrant-virtualbox-x86_64-musl.box" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packer/hcl2/source-qemu.pkr.hcl: -------------------------------------------------------------------------------- 1 | source "qemu" "x86_64" { 2 | accelerator = "kvm" 3 | boot_wait = "5s" 4 | disk_interface = "virtio" 5 | disk_size = "2000M" 6 | format = "qcow2" 7 | http_directory = "http" 8 | iso_url = "https://repo-default.voidlinux.org/live/20240314/void-live-x86_64-20240314-base.iso" 9 | iso_checksum = "sha256:c1a3c0aff363057132f8dab80287396df8a8b4d7cd7f7d8d3f0e2c3ee9e5be7d" 10 | ssh_password = "void" 11 | ssh_timeout = "20m" 12 | ssh_username = "void" 13 | } 14 | -------------------------------------------------------------------------------- /packer/hcl2/source-virtualbox-ose.pkr.hcl: -------------------------------------------------------------------------------- 1 | source "virtualbox-iso" "x86_64" { 2 | guest_os_type = "Linux_64" 3 | iso_url = "https://repo-default.voidlinux.org/live/20240314/void-live-x86_64-20240314-base.iso" 4 | iso_checksum = "sha256:c1a3c0aff363057132f8dab80287396df8a8b4d7cd7f7d8d3f0e2c3ee9e5be7d" 5 | ssh_username = "void" 6 | ssh_password = "void" 7 | http_directory = "http" 8 | ssh_timeout = "20m" 9 | guest_additions_mode = "disable" 10 | 11 | vboxmanage = [ 12 | ["modifyvm", "{{.Name}}", "--nictype1", "virtio"], 13 | ] 14 | 15 | boot_wait = "5s" 16 | } 17 | -------------------------------------------------------------------------------- /packer/hcl2/vagrant/build-vagrant.pkr.hcl: -------------------------------------------------------------------------------- 1 | ../build-vagrant.pkr.hcl -------------------------------------------------------------------------------- /packer/hcl2/vagrant/source-virtualbox-ose.pkr.hcl: -------------------------------------------------------------------------------- 1 | ../source-virtualbox-ose.pkr.hcl -------------------------------------------------------------------------------- /packer/http/cloud.cfg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Void Linux Automatic Install Configuration 3 | 4 | export username="void" 5 | export password="void" 6 | 7 | export end_action=func 8 | end_function() { 9 | printf "Linking default services" 10 | chroot "$target" ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd 11 | chroot "$target" ln -s /etc/sv/sshd /etc/runit/runsvdir/default/sshd 12 | 13 | sync 14 | reboot -f 15 | } 16 | 17 | 18 | VAI_partition_disk() { 19 | # Paritition Disk 20 | sfdisk "${disk}" <<EOF 21 | ; 22 | EOF 23 | } 24 | 25 | VAI_format_disk() { 26 | # Make Filesystems 27 | mkfs.ext4 -F "${disk}1" 28 | } 29 | 30 | VAI_mount_target() { 31 | # Mount targetfs 32 | mkdir -p "${target}" 33 | mount "${disk}1" "${target}" 34 | } 35 | 36 | VAI_configure_fstab() { 37 | uuid1="$(blkid -s UUID -o value "${disk}1")" 38 | echo "UUID=$uuid1 / ext4 defaults,errors=remount-ro 0 1" >> "${target}/etc/fstab" 39 | } 40 | -------------------------------------------------------------------------------- /packer/http/x86_64-musl.cfg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Void Linux Automatic Install Configuration 3 | 4 | export username="void" 5 | export password="void" 6 | 7 | export XBPS_ARCH=x86_64-musl 8 | export xbpsrepository=https://repo-default.voidlinux.org/current/musl 9 | 10 | export end_action=func 11 | end_function() { 12 | printf "Linking default services" 13 | chroot "$target" ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd 14 | chroot "$target" ln -s /etc/sv/sshd /etc/runit/runsvdir/default/sshd 15 | 16 | sync 17 | reboot -f 18 | } 19 | 20 | 21 | VAI_partition_disk() { 22 | # Paritition Disk 23 | sfdisk "${disk}" <<EOF 24 | ; 25 | EOF 26 | } 27 | 28 | VAI_format_disk() { 29 | # Make Filesystems 30 | mkfs.ext4 -F "${disk}1" 31 | } 32 | 33 | VAI_mount_target() { 34 | # Mount targetfs 35 | mkdir -p "${target}" 36 | mount "${disk}1" "${target}" 37 | } 38 | 39 | VAI_configure_fstab() { 40 | uuid1="$(blkid -s UUID -o value "${disk}1")" 41 | echo "UUID=$uuid1 / ext4 defaults,errors=remount-ro 0 1" >> "${target}/etc/fstab" 42 | } 43 | -------------------------------------------------------------------------------- /packer/http/x86_64.cfg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Void Linux Automatic Install Configuration 3 | 4 | export username="void" 5 | export password="void" 6 | 7 | export end_action=func 8 | end_function() { 9 | printf "Linking default services" 10 | chroot "$target" ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd 11 | chroot "$target" ln -s /etc/sv/sshd /etc/runit/runsvdir/default/sshd 12 | 13 | sync 14 | reboot -f 15 | } 16 | 17 | 18 | VAI_partition_disk() { 19 | # Paritition Disk 20 | sfdisk "${disk}" <<EOF 21 | ; 22 | EOF 23 | } 24 | 25 | VAI_format_disk() { 26 | # Make Filesystems 27 | mkfs.ext4 -F "${disk}1" 28 | } 29 | 30 | VAI_mount_target() { 31 | # Mount targetfs 32 | mkdir -p "${target}" 33 | mount "${disk}1" "${target}" 34 | } 35 | 36 | VAI_configure_fstab() { 37 | uuid1="$(blkid -s UUID -o value "${disk}1")" 38 | echo "UUID=$uuid1 / ext4 defaults,errors=remount-ro 0 1" >> "${target}/etc/fstab" 39 | } 40 | -------------------------------------------------------------------------------- /packer/plugins.pkr.hcl: -------------------------------------------------------------------------------- 1 | packer { 2 | required_plugins { 3 | qemu = { 4 | version = "~> 1" 5 | source = "github.com/hashicorp/qemu" 6 | } 7 | vagrant = { 8 | version = "~> 1" 9 | source = "github.com/hashicorp/vagrant" 10 | } 11 | virtualbox = { 12 | version = "~> 1" 13 | source = "github.com/hashicorp/virtualbox" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packer/scripts/cloud.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "void ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-void 4 | echo "Defaults:void !requiretty" >> /etc/sudoers.d/99-void 5 | chmod 0440 /etc/sudoers.d/99-void 6 | mv /etc/sudoers.d/{,10-}wheel 7 | 8 | xbps-install -Sy util-linux coreutils sed shinit cloud-guest-utils 9 | ln -s /etc/sv/shinit /var/service/ 10 | 11 | sed -i -e 's/#ENABLE/ENABLE/' /etc/default/growpart 12 | 13 | passwd -dl void 14 | passwd -dl root 15 | 16 | rm -rf /var/cache/xbps 17 | rm -f /etc/ssh/ssh_host* 18 | 19 | shutdown -P now 20 | -------------------------------------------------------------------------------- /packer/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | useradd -m -s /bin/bash vagrant 4 | 5 | # Set up sudo 6 | echo '%vagrant ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/vagrant 7 | echo 'Defaults:vagrant !requiretty' >> /etc/sudoers.d/vagrant 8 | chmod 0440 /etc/sudoers.d/vagrant 9 | 10 | gpasswd -d vagrant wheel 11 | 12 | sudo xbps-install -Sy wget 13 | 14 | # Installing vagrant keys 15 | mkdir /home/vagrant/.ssh 16 | chmod 700 /home/vagrant/.ssh 17 | cd /home/vagrant/.ssh 18 | wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys 19 | chmod 600 /home/vagrant/.ssh/authorized_keys 20 | chown -R vagrant /home/vagrant/.ssh 21 | 22 | # Install NFS for Vagrant 23 | xbps-install -Sy nfs-utils 24 | 25 | passwd -dl vagrant 26 | passwd -dl void 27 | passwd -dl root 28 | 29 | rm -rf /var/cache/xbps 30 | 31 | shutdown -P now 32 | -------------------------------------------------------------------------------- /platforms/README.md: -------------------------------------------------------------------------------- 1 | ## mklive platforms 2 | 3 | To allow for platform-specific customization (and platform-specific/generic 4 | images all-in-one) on aarch64, `mklive.sh -P "platform1 platform2 ..."` can be 5 | used. That will, in turn, source `platform1.sh` and `platform2.sh` from this 6 | directory to do a few things: 7 | 8 | 1. add packages to the image 9 | 2. add menu entries in GRUB 10 | 11 | ### File format 12 | 13 | ```bash 14 | # an optional pretty name 15 | PLATFORM_NAME="Thinkpad X13s" 16 | # any additional packages to add (bash array) 17 | PLATFORM_PKGS=(x13s-base) 18 | # any special kernel cmdline arguments 19 | PLATFORM_CMDLINE="rd.driver.blacklist=qcom_q6v5_pas arm64.nopauth clk_ignore_unused pd_ignore_unused" 20 | # device tree (path relative to /boot/dtbs/dtbs-$version/) 21 | PLATFORM_DTB="qcom/sc8280xp-lenovo-thinkpad-x13s.dtb" 22 | ``` 23 | -------------------------------------------------------------------------------- /platforms/pinebookpro.sh: -------------------------------------------------------------------------------- 1 | PLATFORM_NAME="Pinebook Pro" 2 | PLATFORM_PKGS=(pinebookpro-base) 3 | PLATFORM_CMDLINE="console=ttyS2,115200 video=eDP-1:1920x1080x60" 4 | PLATFORM_DTB="rockchip/rk3399-pinebook-pro.dtb" 5 | -------------------------------------------------------------------------------- /platforms/x13s.sh: -------------------------------------------------------------------------------- 1 | PLATFORM_NAME="Thinkpad X13s" 2 | PLATFORM_PKGS=(x13s-base) 3 | PLATFORM_CMDLINE="rd.driver.blacklist=qcom_q6v5_pas arm64.nopauth clk_ignore_unused pd_ignore_unused" 4 | PLATFORM_DTB="qcom/sc8280xp-lenovo-thinkpad-x13s.dtb" 5 | -------------------------------------------------------------------------------- /pxelinux.cfg/pxelinux.cfg.in: -------------------------------------------------------------------------------- 1 | UI vesamenu.c32 2 | PROMPT 0 3 | TIMEOUT 100 4 | ONTIMEOUT c 5 | 6 | MENU TABMSG Press ENTER to boot or TAB to edit a menu entry 7 | MENU AUTOBOOT BIOS default device boot in # second{,s}... 8 | MENU BACKGROUND @@SPLASHIMAGE@@ 9 | MENU WIDTH 78 10 | MENU MARGIN 1 11 | MENU ROWS 4 12 | MENU VSHIFT 2 13 | MENU TIMEOUTROW 8 14 | MENU TABMSGROW 2 15 | MENU CMDLINEROW 11 16 | MENU HELPMSGROW 16 17 | MENU HELPMSGENDROW 29 18 | 19 | MENU COLOR title * #FF5255FF * 20 | MENU COLOR border * #00000000 #00000000 none 21 | MENU COLOR sel * #ffffffff #FF5255FF * 22 | 23 | LABEL menu 24 | MENU LABEL Interactive Session [@@BOOT_TITLE@@] (@@KERNVER@@ @@ARCH@@) 25 | KERNEL vmlinuz 26 | APPEND initrd=initrd root=/dev/null loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ 27 | 28 | LABEL auto 29 | MENU LABEL AutoInstall [@@BOOT_TITLE@@] (@@KERNVER@@ @@ARCH@@) 30 | KERNEL vmlinuz 31 | APPEND initrd=initrd root=/dev/null auto loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ 32 | 33 | LABEL c 34 | MENU LABEL Boot first HD found by BIOS 35 | COM32 chain.c32 36 | APPEND hd0 37 | -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | usage() { 6 | echo "release.sh start [-l LIVE_ARCHS] [-f LIVE_VARIANTS] [-a ROOTFS_ARCHS]" 7 | echo " [-p PLATFORMS] [-i SBC_IMGS] [-d DATE] [-r REPOSITORY] -- [gh args...]" 8 | echo "release.sh dl [run id] -- [gh args...]" 9 | echo "release.sh sign DATE SHASUMFILE" 10 | exit 1 11 | } 12 | 13 | check_programs() { 14 | for prog; do 15 | if ! type $prog &>/dev/null; then 16 | echo "missing program: $prog" 17 | exit 1 18 | fi 19 | done 20 | } 21 | 22 | start_build() { 23 | check_programs gh 24 | ARGS=() 25 | while getopts "a:d:f:i:l:p:r:" opt; do 26 | case $opt in 27 | a) ARGS+=(-f rootfs="$OPTARG") ;; 28 | d) ARGS+=(-f datecode="$OPTARG") ;; 29 | f) ARGS+=(-f live_flavors="$OPTARG") ;; 30 | i) ARGS+=(-f sbc_imgs="$OPTARG") ;; 31 | l) ARGS+=(-f live_archs="$OPTARG") ;; 32 | p) ARGS+=(-f platformfs="$OPTARG") ;; 33 | r) ARGS+=(-f mirror="$OPTARG") ;; 34 | ?) usage;; 35 | esac 36 | done 37 | shift $((OPTIND - 1)) 38 | gh workflow run gen-images.yml "${ARGS[@]}" "$@" 39 | } 40 | 41 | # this assumes that the latest successful build is the one to download 42 | # wish it could be better but alas: 43 | # https://github.com/cli/cli/issues/4001 44 | download_build() { 45 | local run 46 | check_programs gh 47 | if [ -n "$1" ] && [ "$1" != "--" ]; then 48 | run="$1" 49 | shift 50 | else 51 | run="$(gh run list -s success -w gen-images.yml --json databaseId -q '.[].databaseId' "$@" | sort -r | head -1)" 52 | fi 53 | if [ -n "$1" ] && [ "$1" != "--" ]; then 54 | usage 55 | elif [ "$1" == "--" ]; then 56 | shift 57 | fi 58 | echo "Downloading artifacts from run ${run} [this may take a while] ..." 59 | gh run download "$run" -p 'void-live*' "$@" 60 | echo "Done." 61 | } 62 | 63 | sign_build() { 64 | check_programs pwgen minisign 65 | DATECODE="$1" 66 | SUMFILE="$2" 67 | mkdir -p release 68 | 69 | echo "Creating key..." 70 | pwgen -cny 25 1 > "release/void-release-$DATECODE.key" 71 | minisign -G -p "release/void-release-$DATECODE.pub" \ 72 | -s "release/void-release-$DATECODE.sec" \ 73 | -c "This key is only valid for images with date $DATECODE." \ 74 | < <(cat "release/void-release-$DATECODE.key" "release/void-release-$DATECODE.key") 75 | 76 | echo "Signing $SUMFILE..." 77 | minisign -S -x "${SUMFILE//txt/sig}" -s "release/void-release-$DATECODE.sec" \ 78 | -c "This key is only valid for images with date $DATECODE." \ 79 | -t "This key is only valid for images with date $DATECODE." \ 80 | -m "$SUMFILE" < "release/void-release-$DATECODE.key" 81 | } 82 | 83 | case "$1" in 84 | st*) shift; start_build "$@" ;; 85 | d*) shift; download_build "$@" ;; 86 | si*) shift; sign_build "$@" ;; 87 | *) usage ;; 88 | esac 89 | -------------------------------------------------------------------------------- /sign-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | case ${1} in 4 | -f) 5 | 6 | if [ ! -f "${2}" ];then 7 | echo "File '${2}' does not exist!" 8 | else 9 | if [ ! -f /usr/bin/gpg ];then 10 | gpg2 --output "${2}.sig" --detach-sig ${2} 11 | else 12 | gpg --output "${2}.sig" --detach-sig ${2} 13 | fi 14 | 15 | if [ ! -f "${2}.sig" ];then 16 | echo "Error creating file: ${2}.sig" 17 | else 18 | echo "File ${2}.sig created!" 19 | fi 20 | fi 21 | ;; 22 | esac 23 | 24 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 0.26 2 | -------------------------------------------------------------------------------- /xfce-x64.packages: -------------------------------------------------------------------------------- 1 | #GRUB 2 | grub-i386-efi 3 | grub-x86_64-efi 4 | 5 | #BASE PKGS 6 | dialog 7 | cryptsetup 8 | lvm2 9 | mdadm 10 | libxcrypt-compat 11 | 12 | # XORG PACKAGES 13 | xorg 14 | xorg-input-drivers 15 | xorg-video-drivers 16 | xrandr 17 | setxkbmap 18 | xauth 19 | vdpauinfo 20 | libvdpau-va-gl 21 | font-misc-misc 22 | terminus-font 23 | dejavu-fonts-ttf 24 | dbus-elogind-x11 25 | 26 | 27 | # KERNEL 28 | linux-firmware-network 29 | dkms 30 | 31 | # SOUND 32 | paprefs 33 | pavucontrol 34 | pipewire 35 | wireplumber 36 | alsa-utils 37 | alsa-plugins-pulseaudio 38 | gstreamer1-pipewire 39 | 40 | # NETWORK 41 | NetworkManager 42 | network-manager-applet 43 | ntp 44 | wget 45 | 46 | 47 | # DESKTOP ENVIRONMENT 48 | lightdm 49 | lightdm-gtk3-greeter 50 | xfce4 51 | xfce4-plugins 52 | xdg-utils 53 | xdg-desktop-portal 54 | xdg-desktop-portal-gtk 55 | xdg-desktop-portal-kde 56 | xdg-user-dirs 57 | xdg-user-dirs-gtk 58 | AppStream 59 | 60 | 61 | # LOOK AND FEEL 62 | adwaita-icon-theme 63 | Adapta 64 | gnome-themes-standard 65 | 66 | # FILE SYSTEM 67 | ntfs-3g 68 | exfat-utils 69 | fuse-exfat 70 | gvfs-afc 71 | gvfs-mtp 72 | gvfs-smb 73 | udisks2 74 | gparted 75 | gptfdisk 76 | 77 | # PACKAGE MANAGEMENT 78 | flatpak 79 | octoxbps 80 | topgrade 81 | 82 | # AUTH 83 | elogind 84 | dbus-elogind 85 | gnome-keyring 86 | 87 | # DEVELOPMENT 88 | git 89 | zenity 90 | 91 | # ARCHIVE SOFTWARE 92 | dtrx 93 | p7zip 94 | 95 | # TEXT EDITORS 96 | vim 97 | micro 98 | 99 | # POWER MANAGEMENT 100 | upower 101 | 102 | # UTILITIES 103 | xterm 104 | htop 105 | bash-completion 106 | rsync 107 | psmisc 108 | unzip 109 | 110 | # INTERNET 111 | firefox 112 | 113 | # REPOSITORIES 114 | void-repo-multilib 115 | void-repo-nonfree 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /xfce-x64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DESKTOP="xfce" 3 | echo "=========================" 4 | echo "| ${DESKTOP} VOID x86_64 |" 5 | echo " ------------------------" 6 | CURRENT=https://mirrors.servercentral.com/voidlinux/current 7 | MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib 8 | NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree 9 | FILENAME="void-live-${DESKTOP}-unofficial" 10 | DATE=$(date +%Y%m%d) 11 | KERNEL=$(uname -r) 12 | BUILDDIR="$(pwd)/build" 13 | 14 | retry=0 15 | 16 | until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do 17 | ((retry++)) 18 | if [[ $retry -gt 2 ]];then 19 | break 20 | fi 21 | 22 | sudo ./mklive.sh \ 23 | -a x86_64 \ 24 | -r "${CURRENT}" \ 25 | -r "${MULTILIB}" \ 26 | -I "$(pwd)/extra" \ 27 | -p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \ 28 | -T "Void Linux ${DESKTOP} Unofficial" \ 29 | -o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso \ 30 | -S "dbus elogind lightdm NetworkManager polkitd" 31 | done 32 | 33 | if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then 34 | retries=${1} 35 | until [[ $retries -gt 2 ]];do 36 | echo "Retrying build ${retries}" 37 | ((retries++)) 38 | bash ${0} ${retries} 39 | 40 | done 41 | if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then 42 | echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!" 43 | echo "ERR=1" > error-status.txt 44 | exit 1 45 | fi 46 | fi 47 | 48 | sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt 49 | 50 | if [ ! -f sha256sums.txt ];then 51 | echo "Missing checksum file, aborting!" 52 | echo "ERR=1" > error-status.txt 53 | exit 1 54 | fi 55 | 56 | if [ ! -d "${BUILDDIR}" ];then 57 | mkdir ${BUILDDIR} 58 | fi 59 | 60 | mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build 61 | --------------------------------------------------------------------------------