604 Commits

Author SHA1 Message Date
2bdf8306f5 add dwm, format xfce package list 2020-07-03 21:31:16 -07:00
5937bc493f Like a year of changes, lazy, sorry 2020-06-24 10:05:20 -07:00
4bc0cdf4f0 Merge branch 'master' of https://github.com/void-linux/void-mklive 2020-06-07 23:05:47 -07:00
Michael Aldridge
da9626bf54 Dockerfile: update bootstrap alpine version to 3.12 2020-06-07 17:52:59 -07:00
root
37c9885ae2 Merge branch 'master' of https://github.com/void-linux/void-mklive 2020-05-09 21:27:18 -07:00
Piotr Wójcik
fc40e50ff9 Dockerfile: remove spdx-licenses-list
Including a copy in void-packages turned out better solution.
Grep in image don't have required perl regexps, and getting
one that have make linting slower by order of magnitude.
Even if it was already there, simply using image is
unnecessarily slower.

This reverts commit 163a923529.
2020-05-08 21:04:08 -07:00
root
9aac388193 Merge branch 'master' of https://github.com/void-linux/void-mklive 2020-04-21 06:51:17 -07:00
Renato Aguiar
31df80c341 Postpone package configuration
Instruct xbps-install to do unpack only, so packages can be properly
configured by xbps-reconfigure call.

Before, xbps-install was sometimes marking packages as configured,
thus making xbps-reconfigure call useless.
2020-03-16 12:53:36 +01:00
root
865a99cbdb Merge branch 'master' of https://github.com/void-linux/void-mklive 2020-02-28 10:24:56 -07:00
Juan RP
d2969a7708 README.md: the scripts are not in flux, remove obsolete comment. 2020-02-27 11:48:08 +01:00
Piraty
557be33ae7 build-x86-images.sh: remove intel-ucode from X_PKGS
intel-ucode went to nonfree repository
with void-packages/450dd113fbb87e9299161bb7143536249ecb16c2

It makes more sense in permanent installations anyway
2020-02-27 11:45:10 +01:00
Juan RP
529c48e54a Makefile: fix the clean target 2020-02-27 11:39:33 +01:00
Renato Aguiar
707943982b Only set root partition start on pinebookpro 2020-02-24 22:42:39 -08:00
Renato Aguiar
4861b7619d Increase partitions shift on pinebookpro
Create boot partition starting at 32768 sectors on pinebookpro
platforms. That leaves enough unallocated space to install u-boot
without overlapping with any partition.
2020-02-24 19:53:12 -08:00
Renato Aguiar
a7a20d50d3 Fix execution of post install scripts on cross builds
Add missing call to register_binfmt before installing packages on
mkrootfs.
2020-02-20 15:03:44 +01:00
Renato Aguiar
9b0805471a Add support for Pinebook Pro (pinebookpro) 2020-02-20 13:00:52 +01:00
Renato Aguiar
cc93f013b0 Prefer repositories from '-r' in mkplatformfs
This allows replacing existing packages with custom built ones and
makes mkplatformfs behavior consistent with mkrootfs.
2020-02-20 12:54:12 +01:00
Duncan Overbruck
2b1aa4f45d lib: make sure /tmp is there and mount it 2020-02-17 21:27:14 -08:00
Adam Gausmann
3c12c74de0 Add -o <outfile> to mkplatformfs.sh for feature parity 2020-02-14 10:29:14 -08:00
Piraty
4ffa689706 mkimage.sh.in: explicitly set 'PermitRootLogin yes' in sshd_config
So far, image generation relied on the config shipped in the openssh
package to ensure root login with password, but as this might change in
the future, explicitly apply and document this requirement for embedded
images here instead.

The exception for GCP (disable root login) should still work as
intended.
2020-01-20 10:32:35 +01:00
toluschr
95e305c461 Added possibility to choose the partitioning software 2020-01-04 10:03:19 +01:00
5fc8085523 Comment out 0/0 complete 2019-11-19 00:51:54 -07:00
f4aa06f1e9 A year worth of changes 2019-11-19 00:48:57 -07:00
76790a9cef Merge branch 'master' of https://github.com/void-linux/void-mklive 2019-11-17 22:21:11 -07:00
Piraty
2ca28459d7 build-x86-images.sh: fix image detection for new gnome flavor 2019-10-27 17:03:48 +01:00
Juan RP
5c0cef01da Merge pull request #83 from void-ppc/installer-return
installer.sh: fail validation for EFI systems without proper ESP
2019-10-27 07:02:08 +01:00
Juan RP
510a4bebd1 Merge pull request #21 from Johnnynator/master
build-x86-images: add gnome image support
2019-10-27 07:01:12 +01:00
Juan RP
fc3ba9eaf7 Merge pull request #60 from Noah-Huppert/mklive-kver-opt
mklive: added -v kerver option
2019-10-27 07:00:48 +01:00
Juan RP
59274b0bfa Merge pull request #90 from bobertlo/ca
make docker use curl
2019-10-27 06:58:03 +01:00
Adeel Mujahid
56e7ba3565 Add /bin/dash as default command 2019-10-25 14:59:54 -04:00
human
f19733f80f mklive: fix bashism 2019-10-23 23:58:30 -07:00
Piotr Wójcik
163a923529 Dockerfile: include spdx-licenses-list
This is for linting license field on Travis.

One can also customize image as simple as
docker build "--build-arg=ADDINS=moreutils jq"
2019-10-23 23:55:01 -07:00
madjack
8ad31657b7 Fix additional packages not installed 2019-10-23 23:53:54 -07:00
Piraty
a1352601ca add dockerignore 2019-10-23 23:50:00 -07:00
Jeremy Jackins
b71d3f9c7b installer.sh.in: add -f flag to mkfs.f2fs
Without -f, mkfs.f2fs refuses to overwrite an existing filesystem, causing installation to fail. With this flag we match the behavior of the other filesystems.
2019-10-23 23:47:00 -07:00
Robert Lowry
de6cc17b0c make docker use curl 2019-10-23 10:39:17 -05:00
q66
f4458db134 installer.sh: fail validation for EFI systems without proper ESP
Right now the installer will print an error dialog but mark the
filesystems done anyway and march on, which will later result
in a failed GRUB installation.
2019-07-19 14:50:01 +02:00
Juan RP
a3f49d0c11 installer.sh.in: update my email address.
Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-12 14:00:13 -04:00
e4c0b6433c Merge branch 'master' of https://github.com/void-linux/void-mklive 2019-06-02 22:29:00 -07:00
John Zimmermann
9bcbbc95e0 display-manager-autologin.sh: fix sddm detection
sddm doesn't ship with a /etc/sddm.conf as default so the old check
returned false.
2019-05-30 19:22:38 -07:00
1583f1a1ea Merge branch 'master' of https://github.com/void-linux/void-mklive 2019-05-28 08:45:25 -07:00
Michael Aldridge
6ce4732bbc release.sh.in: Make an easy release script 2019-05-27 20:16:15 -07:00
Cameron Nemo
53b58fef3f Remove defunct systemd support
Closes: #70 [via git-merge-pr]
2019-05-25 13:36:49 -07:00
human
aa50f22312 installer: better timezone menu
Closes: #65 [via git-merge-pr]
2019-05-25 13:36:24 -07:00
human
90cfccb903 installer: better check for /bin/dialog
this works on distros where /bin isn't a symlink to /usr/bin
2019-05-25 13:36:24 -07:00
Urs Schulz
86834e3ff7 mkplatformfs.sh: fix -k option
Closes: #64 [via git-merge-pr]
2019-05-25 13:35:59 -07:00
Urs Schulz
d3505ba860 mkplatformfs.sh: add option to disable compression 2019-05-25 13:35:59 -07:00
Urs Schulz
65f88c6d6f mkplatformfs.sh: error out without base tarball 2019-05-25 13:35:59 -07:00
Noah Huppert
cd127e8320 mklive: fixed -o option so it could take an absolute path
Closes: #56 [via git-merge-pr]
2019-05-25 13:33:29 -07:00
Kalle Møller
43fae882e9 Added compressions
Apparrently xz requires liblz4

Closes: #54 [via git-merge-pr]
2019-05-25 13:33:03 -07:00
Kalle Møller
3b0177266d Update README.md 2019-05-25 13:33:03 -07:00
Robert Lowry
7b6fdc6003 installer.sh.in: clarify 'Network' source
Closes: #45 [via git-merge-pr]
2019-05-25 13:32:23 -07:00
q66
b795f541a6 mkrootfs: enable ppc64 + ppc-musl support
Closes: #26 [via git-merge-pr]
2019-05-25 13:30:54 -07:00
stenstorp
40dd7a4ede mkrootfs.sh.in: Mention ppc-musl 2019-05-12 01:13:53 -04:00
stenstorp
12bf9c0625 mkrootfs.sh.in: Actually implement the -b option 2019-05-12 01:12:24 -04:00
8b34d91818 Merge branch 'master' of https://github.com/void-linux/void-mklive 2019-04-10 07:07:06 -07:00
Noah Huppert
7ca1cbc168 mklive: added -v kerver option
Signed-off-by: Noah Huppert <contact@noahh.io>
2019-04-01 16:12:18 -04:00
Michael Aldridge
5859e79c29 packer: Initial packer config 2019-03-30 23:10:12 -07:00
a2c7770462 Merge branch 'master' of https://github.com/void-linux/void-mklive 2019-03-28 13:18:20 -07:00
Michael Aldridge
ba7f0e9475 Support building ethereal masterdirs 2019-03-24 20:42:51 -07:00
Enno Boland
1b0964cc82 lib.sh.in: fix tool checking. 2019-03-15 18:08:27 +01:00
Enno Boland
92bb9df1d3 add hooks for dockerhub 2019-03-14 23:30:16 +01:00
Enno Boland
a4f673e053 Merge pull request #52 from Gottox/add-dockerfile
add Dockerfile
2019-03-12 11:54:52 +01:00
Enno Boland
b2c1385570 add Dockerfile
This commit adds a Dockerfile that can be build using podman or docker.
2019-03-08 10:26:52 +01:00
Unknown
8d364654ed Missing parenthesis.
Closes: #14 [via git-merge-pr]
2019-02-27 18:58:37 -08:00
mobinmob
77442599ce mklive.sh: Remove $ROOTFS_FREESIZE 2019-02-27 18:58:37 -08:00
mobinmob
f5ee7f420e mklive.sh: Use overlayfs for live image writable overlay. 2019-02-27 18:58:37 -08:00
mobinmob
08173eb25f mklive.sh: remove unused ISO_VOLUME variable. 2019-02-18 14:51:42 -08:00
Cameron Nemo
d2c6fdf1a7 dracut: use .org website, use https 2019-02-16 21:45:33 -08:00
Cameron Nemo
f1a9d5f3ee data/issue: use .org website, use https 2019-02-16 21:45:33 -08:00
Cameron Nemo
3dcfb367c6 installer.sh.in: use .org website, use https 2019-02-16 21:45:33 -08:00
mollusk
e560ce6899 Merge branch 'master' of https://github.com/void-linux/void-mklive 2019-01-27 17:35:52 -07:00
Christian Poulwey
7559500693 mknet: take syslinux files from /usr/lib 2019-01-21 12:58:25 -08:00
voidanix
2935dff0ce Allow GRUB to get installed on XFS roots 2019-01-16 20:27:09 -08:00
huglovefan
bb38cc21a2 installer.sh.in: fix check for *-musl arch 2019-01-16 20:26:44 -08:00
human
c45822d765 data/issue: fix manpage sections for xbps utils 2019-01-16 20:18:26 -08:00
Noah Huppert
1ffa7e4900 mklive.sh: fixed syslinux datadir value after pkg update 2019-01-16 20:17:27 -08:00
mollusk
38bdae1b74 add custom image scripts and update package txt files 2018-12-19 03:22:02 -07:00
mollusk
acac699bee add xrandr, xdg-utils to package lists 2018-12-17 23:41:12 -07:00
mollusk
e8d618a28c Add package lists 2018-11-20 00:12:48 -07:00
d19dec5f71 Merge branch 'master' of https://github.com/void-linux/void-mklive 2018-11-18 06:51:33 -07:00
John Zimmermann
ff6be0b564 build-x86-images: add gnome image support 2018-11-15 00:30:16 +01:00
Foxlet
4d81747387 mkrootfs: enable ppc support 2018-09-28 18:50:58 -07:00
mobinmob
6302d82e15 build-x86-images.sh: Add intel-ucode to X_PKGS.
All isos that contain X_PKGS contain already the package for the amd microcode.
2018-09-20 17:31:49 -07:00
Michael Aldridge
beaa74f4fc Update remaining mirror references 2018-09-14 02:00:05 -07:00
Unknown
d1d2a18783 mklive.sh: Change repo urls. 2018-09-09 13:07:18 -07:00
Unknown
9d276f209f installer.sh: Remove modified sddm.conf to let sddm use the defaults. 2018-08-15 17:03:35 -07:00
Unknown
33f5f5c1fb build-x86-images.sh: Add firefox and dolphin to $KDE_PKGS. 2018-08-15 17:03:35 -07:00
Unknown
c70eb89d6b display-manager-autologin.sh: configure sddm autologin for kde live iso. 2018-08-15 17:03:35 -07:00
mobinmob
7801df642b build-x86-images.sh: fix KDE_PKGS
kde metapackage tries and fails to install kde4 packages. kde5 metapackage correctly installs some kde5 packages, but konsole is also needed for a terminal emulator.
2018-08-15 17:03:35 -07:00
mobinmob
4f68da9ac8 display-manager-autologin.sh: remove kdm autologin configuration 2018-08-15 17:03:35 -07:00
cr6git
0637090fa5 installer.sh.in: fix typo 2018-08-13 22:52:27 -07:00
mobinmob
40027cd5a6 mklive.sh: double-quote vars to make building an iso on a path
that has spaces in directory names possible.
2018-08-13 22:51:58 -07:00
mobinmob
49a0cbf98b mklive.sh: mksquashfs does not support bzip2 compression, but is supports lzo. 2018-08-13 22:41:13 -07:00
mobinmob
48f7b70759 mklive.sh: Handle unknown switch by displaying usage info. 2018-08-13 22:41:13 -07:00
mobinmob
4567280b7a mklive.sh: Default cachedir is not /var/cache/xbps. 2018-08-13 22:41:13 -07:00
mobinmob
dfef5449c5 mklive.sh: Default initramfs compression has been xz for some time. 2018-08-13 22:41:13 -07:00
cr6git
6dcf9a455f mknet.sh.in: fix typo 2018-08-13 22:39:41 -07:00
Enno Boland
be7a2fc59c Merge pull request #129 from furkanmustafa/furkanmustafa-fixes
Two fixes
2018-03-27 09:58:45 +02:00
Enno Boland
84b26c5ef4 installer: do not echo grep result 2018-03-26 09:51:59 +02:00
Enno Boland
62e850c614 do not offer locale option on musl
fixes #152
2018-03-26 09:50:00 +02:00
Piraty
c4e87c8d65 mkplatformfs: build rpi3 image on foundations kernel
See: https://github.com/voidlinux/void-packages/pull/12889
Closes: #150 [via git-merge-pr]
2018-03-25 12:49:51 -07:00
cr6git
b06fb08e5d display-manager-autologin.sh: add fluxbox support
Closes: #136 [via git-merge-pr]
2018-03-25 12:47:09 -07:00
Jürgen Buchmüller
c2086d3ec7 installer.sh.in: check for empty USERLOGIN
Append a line to sudoers only, if the USERLOGIN is actually non-empty.
Otherwise only enable sudo for the members of group 'wheel'.

Closes #138

Closes: #143 [via git-merge-pr]
2018-03-25 12:45:21 -07:00
Michael Aldridge
2a5eac41f1 i686 should not use u-boot 2018-03-25 12:44:45 -07:00
74d264f095 set proper path to mklive.sh 2018-03-09 10:09:09 -07:00
ec57881940 Add: build scripts 2018-03-09 09:57:04 -07:00
4785576489 Add: build templates 2018-03-09 09:48:45 -07:00
Michael Aldridge
8bf037d103 Fix regressions in the netboot generator scripts 2017-11-21 23:18:13 -08:00
Michael Aldridge
85bf042acd Only build an arm initrd if necessary 2017-10-06 23:49:39 -07:00
Michael Aldridge
2f696872c3 Makefile: Remove buggy stamps detection, manual sequencing is required for platform targets 2017-10-06 23:09:18 -07:00
Michael Aldridge
c767e60128 Explicitly set Make shell 2017-10-06 23:09:18 -07:00
Michael Aldridge
55afa3bf48 Default to a Void managed repo 2017-10-06 23:09:18 -07:00
Michael Aldridge
b4804a87fb Support armv5tel based pogoplug devices 2017-10-03 23:22:27 -05:00
Piraty
b4218de9b2 make -h option work for mkrootfs and mkplatformfs
Closes: #133 [via git-merge-pr]
2017-09-24 15:58:11 -07:00
Michael Aldridge
721605d517 Makefile: clarify stamp names 2017-08-31 20:17:30 -07:00
Michael Aldridge
41676808b3 mkrootfs.sh.in remove redundant variable 2017-08-31 20:07:51 -07:00
Michael Aldridge
b921097835 mkimage.sh.in: use for GCP images instead of shell globs 2017-08-31 01:28:33 -07:00
Michael Aldridge
c358b52780 mknet.sh.in: remove in a crash 2017-08-30 22:13:20 -07:00
Michael Aldridge
e460df1438 Makefile: Use stamps for better build redundancy 2017-08-30 01:52:22 -07:00
Michael Aldridge
9debeafbf6 mkrootfs.sh.in: support arbitrary filenames 2017-08-29 22:42:40 -07:00
Michael Aldridge
aa0920fb16 Drastically improve make dependency resolution 2017-08-29 21:56:55 -07:00
Michael Aldridge
bc6d432ab1 mkplatformfs.sh.in: use the cache 2017-08-29 21:24:53 -07:00
Michael Aldridge
76d42ecaae mknet.sh: Change default initrd compression to xz 2017-08-29 00:40:58 -07:00
Michael Aldridge
5ce4621845 mknet.sh: make keymap and locale setable options 2017-08-28 22:56:38 -07:00
Michael Aldridge
fc80523768 Control PXE tarball builds with Makefile 2017-08-28 22:56:38 -07:00
Michael Aldridge
89e3affa22 mknet.sh: Massive Cleanup
Among other things this commit refactors mknet.sh to use the lib.sh
functions for executing code in the chroot and generally handling the
potential for future builds to generate netboot tarballs for ARM
platforms.  ARM tarballs will require syslinux to be built for the
target architecture, but it should largely just be a drop in option.
2017-08-27 19:22:07 -07:00
Furkan Mustafa
9901e0883e installer: add support for plain luks volumes
Reason: If user prepares some encrypted partitions on their own,
installer was not showing them as configurable.
2017-08-27 03:41:50 +09:00
Furkan Mustafa
984a1961ee installer: reset fmt variable on each iteration of loop 2017-08-27 03:39:43 +09:00
pulux
a15a4a69ac update homepage url
Closes: #126 [via git-merge-pr]
2017-08-22 22:16:08 -07:00
Enno Boland
5c4f9f87de Change Button labels in Filesystem Menu
Closes: #127 [via git-merge-pr]
2017-08-22 22:14:30 -07:00
Michael Aldridge
6335173798 README.md: update minimally 2017-08-22 22:11:37 -07:00
Michael Aldridge
4f514f5212 Explicitly set number of xz compressor threads 2017-08-21 00:04:17 -07:00
Michael Aldridge
5791d18d31 Makefile: add option to set mirror across build 2017-08-20 23:10:15 -05:00
Michael Aldridge
a118712911 Create targets to setup distdir 2017-08-20 14:59:43 -07:00
Michael Aldridge
eeb2a810ee Remove obsolete build scripts 2017-08-19 00:20:35 -07:00
Michael Aldridge
4288c890a3 Build SBC and Cloud images via Makefile 2017-08-19 00:16:50 -07:00
Michael Aldridge
5ea6dc395c mkimage.sh.in: compress resultant images 2017-08-19 00:14:12 -07:00
Michael Aldridge
bc651eb19f Build images via makefile 2017-08-18 21:14:00 -07:00
Michael Aldridge
4e2214218a mkimage.sh.in: fix PLATFORM detection 2017-08-18 21:13:48 -07:00
Michael Aldridge
20ce939c01 Build PLATFORMFS with Makefile 2017-08-16 22:43:06 -07:00
Michael Aldridge
d4ba63c5e7 Generate platformfs via makefile 2017-08-14 20:57:51 -07:00
Michael Aldridge
03abfc2115 Build rootfs via makefile 2017-08-14 20:56:57 -07:00
Michael Aldridge
3e5c8d43e7 Fix handling of i686 on an x64 host 2017-08-14 00:59:05 -07:00
Michael Aldridge
b53e2e4814 Makefile: remove install target 2017-08-13 17:59:11 -07:00
Michael Aldridge
c0424731dd mkimage.sh.in: Use abstracted chroot access 2017-08-13 17:45:22 -07:00
Michael Aldridge
0b638dd785 mkimage.sh.in: Fix typo in cleanup code 2017-08-13 17:44:51 -07:00
Michael Aldridge
6e1d80b78b Factor out architecture map 2017-08-13 17:44:25 -07:00
Michael Aldridge
2724ae0abb mkimage.sh.in: add comments 2017-08-13 01:40:19 -07:00
Michael Aldridge
7a7766cfcb mkimage.sh.in: lib.sh and a generous serving of quotes 2017-08-13 01:02:47 -07:00
Michael Aldridge
119a0ad1b5 Add mkplatformfs.sh.in 2017-08-12 20:06:20 -07:00
Michael Aldridge
fa88e042ba Fix native config path bug 2017-08-12 16:42:07 -07:00
Michael Aldridge
b531fae80b Factor out tool check to lib.sh.in 2017-08-11 00:56:28 -07:00
Michael Aldridge
990287bbc2 lib.sh.in: add shebang to clear shellcheck error 2017-08-11 00:15:58 -07:00
Michael Aldridge
d6975a2793 QEMU interpreter must be registered at absolute path 2017-08-10 23:50:14 -07:00
Michael Aldridge
069d8c48eb Fix password set step 2017-08-10 23:44:10 -07:00
Michael Aldridge
34bffe1e2a Factor out chroot helpers to lib.sh
This commit removes all of the chroot refactor to a seperate file.
This paves the way to use these functions in all other scripts.
2017-08-10 23:28:26 -07:00
Michael Aldridge
10568660ac Clean up chroot/QEMU logic
The logic that sets up the QEMU static binary to permit running alien
binary formats is quite complex.  This commit cleans up a lot of the
logic around this and adds a huge number of comments to try and
clarify why things happen when they do.  Ultimately this commit
provides a lot of the ground work to factor out all of the chroot
setup into a seperate shell file that can be sourced by other mklive
tasks that need to operate inside of a chroot with a possibly alien
executable format.
2017-08-10 00:01:09 -07:00
Michael Aldridge
a7ba42f7ec Simplify mkrootfs.sh.in
Previously this script could produce rootfs tarballs suitable for a
few different systems.  This worked but meant that several different
scripts were then building root filesystems instead of just using ones
produced by this script.  This commit cleans up the script to produce
just a root filesystem.  Note that this system is not bootable, that
still needs to be done by another script which processes platform
specific operations.  This script just produces a root filesystem for
every architecture that XBPS understands.
2017-08-09 17:28:10 -07:00
Michael Aldridge
1547ff40e6 mkrootfs.sh.in: generous helping of quotes 2017-08-08 18:47:23 -07:00
Michael Aldridge
039360118b Consistently use ROOTFS to refer to the system being built 2017-08-07 19:31:31 -07:00
Michael Aldridge
dbac38c0f7 Revert "mklive.sh.in: add custom scripts to init"
This reverts commit 3c68cc4158.

This commit was not adequately reviewed and introduces unintentional
errors to the mklive system as well as unfavorable directory contents
in every published ISO.
2017-08-07 18:27:07 -07:00
edr
3c68cc4158 mklive.sh.in: add custom scripts to init
The added option -H <hooksdir> allows the user to specify a directory
that contains hook scripts which should be run directly after the live
system's init sequence.
This can be used to customize the system (such as e.g. setting a
different default shell)
2017-08-06 21:10:40 -07:00
Michael Aldridge
414ebf318f Add netboot generator script 2017-08-06 21:03:55 -07:00
Michael Aldridge
76ea7500b2 Add an automatic install option to the initramfs. 2017-08-06 21:02:55 -07:00
Michael Aldridge
04bf2e873b Support building GCP ready images 2017-08-03 21:22:48 -07:00
masato9000
a4b3dd36c9 Improve support for 32-bit EFI firmware in ISOs and installer
mklive:
- include support for booting both 32- and 64-bit UEFI firmware with
  32- and 64-bit images.
- require grub packages for both firmware bitness types
  (build-x86-images)

Installer:
- include support for installing both 32- and 64-bit UEFI grub loaders
- detect UEFI platform (firmware) bitness at install time

Closes: #102 [via git-merge-pr]
2017-08-02 22:25:09 -07:00
M. Dietrich
fe57bb4b06 set umask 022 2017-08-02 16:31:15 -07:00
M. Dietrich
fbe5b8dccb fix error_out (line/errno handling)
Closes: #84 [via git-merge-pr]
2017-06-23 13:05:11 -07:00
Michael Aldridge
7428a52080 Support really long WPA2 keys, resolves #79 2017-06-23 12:47:34 -07:00
Michael Aldridge
79adf63842 Correctly detect musl host architecture
This resolves #106
2017-06-23 12:46:49 -07:00
Toyam Cox
03b894370f Merge pull request #94 from metadave/dp_fix_net_message
fix network error message
2017-06-23 15:42:06 -04:00
Toyam Cox
b23f918d6f Merge pull request #95 from metadave/dp_check_for_root
bail out if not root
2017-06-23 15:41:29 -04:00
Enno Boland
a0cf80b5ce Merge pull request #112 from gquittet/master
Added NVMe SSD compatibility
2017-06-11 11:31:32 +02:00
Guillaume Quittet
a7bb148a28 Added NVMe SSD compatibility
I've added the NVMe SSD disks compatibility because the installer doesn't detect them.
2017-06-11 11:30:20 +02:00
Toyam Cox
dc9c842f9c build-arm-images.sh.in: fix typo 2017-02-28 12:53:12 -05:00
Leah Neukirchen
2df9a27e8d build-arm-images: add odroid-c2 and rpi3. 2017-02-20 17:17:34 +01:00
Dave Parfitt
737c00b262 bail out if not root 2017-01-23 09:50:20 -05:00
Dave Parfitt
99127fe281 fix network error message 2017-01-23 09:47:38 -05:00
Leah Neukirchen
57c6107be3 mkrootfs.sh.in/mkimage.sh.in: add rpi3. 2017-01-14 18:41:30 +01:00
Chris Brannon
4317c1a4f6 Preserve Linux capabilities when running tar, and misc fixes for mkrootfs. (#92)
* Preserve Linux capabilities in various tar invocations.

Otherwise, ping as non-root will not work when using a Void image.

Don't try to umount pseudofilesystems when $rootfs is undefined.
On mktemp failure, die in the script itself, not the $( ... ) subshell.
And remove the second FATAL: from the error message.
2016-12-10 12:30:13 +01:00
Christopher Brannon
9800862806 mkimage.sh: fix sfdisk usage for multiple arches.
In the case where we have two partitions, boot and root, the
root partition needs to start at sector (2048 + bootfs_size_in_sectors),
not at $BOOT_FSSIZE.
Using $BOOT_FSSIZE as the start tells sfdisk to try to start the
/ partition in the middle of /boot, which it refuses to do.
Leave start blank, and sfdisk uses the first unallocated sector as
the start of /, which happens to be sector 2048 + bootfs_size_in_sectors.

I suspect this fixes #81.
2016-11-30 13:32:00 +01:00
Christian Neukirchen
58f6a3e7c0 mkimage.sh.in: odroid-c2: u-boot doesn't understand new ext4 features, disable. 2016-09-24 17:23:31 +02:00
Christian Neukirchen
8af0cf2d15 mkrootfs.sh.in: fix for odroid-c2. 2016-09-24 17:21:43 +02:00
Jürgen Buchmüller
758deda76c Merge pull request #83 from pullmoll/installer
installer.sh.in: fixes and improvements
2016-09-09 21:57:11 +02:00
Juergen Buchmueller
b820b28d66 installer.sh.in: fixes and improvements
+ Add INFOBOX() because dialog --infobox is incompatible with --keep-tite on xterm
+ Use clear after INFOBOX() to not leave irritating info on the screen
+ Make the live system copy process use a --progressbox
+ Use a tar pipe to copy from live ISO to target file system
2016-09-05 09:31:25 +02:00
Toyam Cox
50148f369f installer.sh.in: change irc channel to be correct 2016-08-24 19:47:38 -04:00
Juan RP
8a22f2c03d mkimage: typo fix (close #80). 2016-08-11 08:19:31 +02:00
Juan RP
fdb41f88e8 mkimage: active first partition (fat32) for bbb and others.
I activated the second partition by accident when the code was changed
to use sfdisk. Found and fixed by @pullmoll.

Close #80
2016-08-10 07:40:35 +02:00
Jürgen Buchmüller
de4c52a4a6 installer.sh.in: add ISO-639 and ISO-3166 tables (#71)
The locale selection now has user friendly names for language
and country. This time without bashisms.
2016-05-12 08:13:56 +02:00
Christian Neukirchen
b2415b015d mkimage.sh.in: add odroid-c2. 2016-05-06 14:41:04 +02:00
Christian Neukirchen
d1e633fc12 mkrootfs.sh.in: add odroid-c2. 2016-05-04 19:24:46 +02:00
Michael Aldridge
b7e8732b04 Add *.iso to .gitignore (#69) 2016-05-01 06:12:44 +02:00
Juan RP
d6f949d640 mkimage: get rid of parted completely (missed this in previous). 2016-04-29 14:17:49 +02:00
Juan RP
7e21c2f151 dracut/adduser.sh: remove double whitespace from sudoers.
This lets the installer remove the anon rule from etc/sudoers.
2016-04-29 09:24:01 +02:00
Juan RP
9d66fae1c0 mkrootfs: ignore rmdir error output. 2016-04-29 09:23:38 +02:00
Juan RP
3debfb21de mkimage: ci20 uboot does not need /boot/vmlinux.img; looks for uImage. 2016-04-27 12:48:46 +02:00
Juan RP
687cd4e536 mkimage: match any platform (glibc and musl). 2016-04-26 15:47:56 +02:00
Juan RP
6372530837 mkimage: get rid of parted; use sfdisk(8). 2016-04-26 15:00:55 +02:00
Juan RP
be2251492f mkimage: ci20 just needs a single partition and expects the kernel in /vmlinux.img. 2016-04-26 11:45:37 +02:00
Juan RP
ffe9572e3f mkimage: added ci20 platform support (MIPS CI20 Creator). 2016-04-26 11:20:14 +02:00
Juan RP
8b06a299c9 mkrootfs: added ci20 platform support (MIPS CI20 Creator). 2016-04-26 11:00:14 +02:00
Juan RP
06f8beb628 *rootfs: fix remaining x86 rootfs issues. 2016-04-20 16:19:55 +02:00
Juan RP
a15f8c0300 mkrootfs: generate x86 tarballs correctly, requested by scaleway. 2016-04-20 14:36:57 +02:00
Juan RP
4c932c619e Merge pull request #66 from pullmoll/master
installer.sh.in: improve primary user setup
2016-04-18 18:25:21 +02:00
jbu
6edaeb29a6 installer.sh.in: improve primary user setup
+ change shebang to #!/bin/bash because we use bashisms
+ add --insecure to password inputs to make them display asterisks (*)
+ add input for full user name (as opposed to login name)
+ add a checklist for primary login group memberships
+ enable /etc/sudoers line for members of group wheel
+ let the user choose grub input/output by console instead of graphics
2016-03-28 20:03:57 +02:00
Juan RP
53f25b6937 build-x86-images: added dejavu-fonts-ttf as suggested by chris2. 2016-03-16 11:20:01 +01:00
Juan RP
afc400fec7 build-x86-images: switch to firefox-esr. 2016-03-16 11:08:50 +01:00
Juan RP
fcafd53f10 build-x86-images: also pass -r arg to mklive. 2016-03-16 10:45:17 +01:00
Juan RP
4477f82d09 Merge pull request #62 from rdamen/master
mkimage.sh.in: fix truncate size argument
2016-03-08 10:25:49 +01:00
Ron Damen
11000d9f3c mkimage.sh.in: fix truncate size argument 2016-02-24 14:35:13 +01:00
Juan RP
f5a75aeb13 mklive: fix print_step()... 2016-02-07 09:41:40 +01:00
Juan RP
c5bade28ee Merge pull request #59 from pullmoll/master
installer.sh.in: add user account dialog
2016-02-04 08:19:20 +01:00
Juan RP
719ae8a06c Merge pull request #57 from enguerrand/master
mklive: add -I directory inclusion option
2016-02-04 08:19:05 +01:00
jbu
678fabe87e installer.sh.in: add user account dialog 2016-02-04 08:07:54 +01:00
jbu
3b448665e9 installer.sh.in: avoid scrolling for wep/wpa input 2016-02-04 08:07:54 +01:00
Enguerrand de Rochefort
f11d98ae3c mklive: add -I directory inclusion option 2016-01-31 22:45:01 +01:00
Juan RP
8affcef52c Merge pull request #52 from equalsraf/tb-post-hook
mkrootfs: Added -k to run post hook
2016-01-30 08:36:37 +01:00
Juan RP
d92586f115 Merge pull request #58 from lxb/master
installer: check network configured on source
2016-01-30 08:34:28 +01:00
lxb
ca6559e8ba installer: check network configured on source 2016-01-29 17:49:48 -05:00
Rui Abreu Ferreira
465166a80f mkrootfs: Added -k to run post hook
New flag -k <cmd>. "<cmd> <path>" is executed after the rootfs
is created, <path> points to the new rootfs.
2016-01-18 15:18:30 +00:00
Juan RP
62406cba3f Merge pull request #51 from Vaelatern/truncate
Switch to truncate to allocate storage for images
2016-01-15 07:22:19 +01:00
Toyam Cox
a25ec4a9b0 Switch to truncate to allocate storage for images
Works in low memory situations
2016-01-14 08:48:43 -05:00
Juan RP
6653bb6057 mklive: make this work with grub-2.02. 2015-12-19 08:43:16 +01:00
Juan RP
0bab24258a mklive: make this work on musl hosts. 2015-12-12 09:50:20 +01:00
Juan RP
242712da5b installer: redirect stderr to /dev/null for cciss(4). 2015-11-10 09:44:05 +01:00
Juan RP
97ce376755 Merge pull request #47 from the-maldridge/grub32
Add support for proper 32 bit grub
2015-11-05 11:16:18 +01:00
Michael Aldridge
d6a20ce1c8 Add support for proper 32 bit grub 2015-11-05 03:54:19 -06:00
Juan RP
dae97a2d81 build-x86-images: enable the LXQt image by default. 2015-11-03 17:03:51 +01:00
Juan RP
fd1f7506b3 build-x86-images: added -r repo opt. 2015-11-02 17:16:42 +01:00
Juan RP
669ce503fc mklive: make sure -r is preferred over defaults. 2015-11-02 17:16:01 +01:00
Juan RP
c0938bdb3b installer: allow posix timezones too. (thanks \0xc0ffee@irc). 2015-11-01 19:53:02 +01:00
Juan RP
f0722b06e5 installer: remove liveuser from /etc/sudoers in local installation.
Close #43
2015-10-17 10:58:06 +02:00
Juan RP
d3b527ec3d installer: get rid of unused systemd checks. 2015-10-17 10:55:32 +02:00
Juan RP
c0e16252c3 installer: detect cciss partitions correctly (3/3).
This finally allows for a successfull installation with cciss(4) devices.

Thanks to maldrige for testing.
2015-10-17 10:38:41 +02:00
Juan RP
7c699d32c2 installer: detect cciss partitions correctly (2/2). 2015-10-17 09:59:25 +02:00
Juan RP
d0f0910b67 mklive: make -r append repo to the head rather than replacing.
This allows you to use local repos with higher priority than the
official remote ones.
2015-10-16 08:14:01 +02:00
Juan RP
8261f90a2a installer: detect ciss(4) devices/partitions correctly (#44). 2015-10-10 10:19:43 +02:00
Juan RP
cb2510b379 dracut/services: don't autostart dmeventd, lvmetad and mdadm. 2015-10-09 09:05:24 +02:00
Juan RP
0bdf5c6c36 mklive: fix guessing linux kernel pkgname. 2015-10-09 09:04:47 +02:00
Juan RP
f5ad23e864 Merge pull request #41 from steski/staticip-issue
installer.sh: fix static IP settings in menu_install
2015-10-02 09:18:54 +02:00
Juan RP
82d2090009 Merge pull request #42 from zurx/master
fix set_keymap rc.conf
2015-10-02 09:18:41 +02:00
zurx
7c35931c24 fix set_keymap rc.conf
By default /etc/rc.conf seems to have KEYMAP commented out which means any key mapping set during the install will be ignored. This commit makes the installer remove the hash (#) prefix, if present.
2015-10-02 01:23:26 +00:00
Steve Prybylski
834cf6cf80 installer.sh: fix static IP settings in menu_install 2015-10-01 20:28:37 -04:00
Juan RP
6a8e09f715 build-arm-images: PLATFORM can be overrided now. 2015-09-07 20:00:35 +02:00
Juan RP
f16ea26f30 build-rootfs: build musl rootfs too; PLATFORMS can be overrided now. 2015-09-07 19:59:26 +02:00
Juan RP
851c861cfd build-x86-images: added lxqt image. 2015-07-30 07:42:36 +02:00
Juan RP
eddedc275d dracut/dm-autologin: autostart lxqt if available. 2015-07-30 07:41:47 +02:00
Juan RP
96e5d154d2 Merge pull request #38 from thypon/dockstar
mkrootfs: add dockstar support
2015-07-23 07:33:13 +02:00
Andrea Brancaleoni
8a42aecd3f mkrootfs: add dockstar support 2015-07-18 16:44:49 +02:00
Juan RP
e514350f88 mklive: install GRUB EFI loader as EFI/BOOT/BOOTX64.EFI.
There are some EFI firmwares that expect the loader to be in that
location and being uppercase, so that there more chances to make this
boot on more systems.
2015-07-12 08:48:08 +02:00
Juan RP
202c0c17e5 build-x86-images: add gnome-keyring to cinnamon/mate/xfce images.
... otherwise network-manager-applet won't be able to work correctly.

Thanks to Pessimist on IRC for the notice.
2015-06-30 18:17:22 +02:00
Juan RP
6c79637e0f build-x86-images: add firefox now it's available for musl. 2015-06-12 15:24:36 +02:00
Juan RP
99de4e9f93 build-arm-images: respect musl targets. 2015-06-12 11:02:30 +02:00
Juan RP
391e50f0c2 mkimage: consistently redirect std{err,out} to /dev/null with dd(1). 2015-06-12 10:59:23 +02:00
Juan RP
288406151b build-arm-images: disable cubietruck for now; does not boot. 2015-06-12 10:34:38 +02:00
Juan RP
8dfb5efab8 build-arm-images: build all ARM images for glibc and musl. 2015-06-12 10:29:31 +02:00
Juan RP
539ed0703a mkrootfs: get rid of pixz; fix rpi target arch. 2015-06-12 10:28:40 +02:00
Juan RP
1b010f1a4c mkrootfs: set cachedir to $PWD/xbps-cachedir-<arch>; misc tweaks for musl. 2015-06-12 10:09:48 +02:00
Juan RP
9261876718 mkrootfs: update for musl support. 2015-06-11 11:36:14 +02:00
Juan RP
7d41efdb09 build-x86-images: do not build the kde image; does not work yet. 2015-06-08 15:48:23 +02:00
Duncaen
429170afbd mkrootfs: fix rpi2 target 2015-06-07 22:36:36 +02:00
Juan RP
b12ccf4597 build-x86-images: add -a arch and -b image (if unset builds all images). 2015-06-07 12:31:59 +02:00
Juan RP
4c81ceefdd build-arm-images: build all rootfs/images. 2015-06-07 12:31:45 +02:00
Juan RP
42b599fa97 mkrootfs: update for xbps-0.45. 2015-06-07 12:31:30 +02:00
Juan RP
52c027ad0c mklive: use $BASE_ARCH where it's required. 2015-06-04 09:13:30 +02:00
Juan RP
70b6bae1e9 build-x86-images: don't shift without args; xfce image needs gnome-themes-standard. 2015-06-04 08:11:06 +02:00
Juan RP
9f809e5211 installer: repair configuration of pkgs with network installation.
Close #28
2015-06-03 14:36:04 +02:00
Juan RP
f80057f06c build-x86-images: add lxde. 2015-06-03 14:30:29 +02:00
Juan RP
77ff6c34c9 mklive: require xbps>=0.45 for two phase installation.
- The target pkgs are unpacked with -U, and then reconfiguration happens
within the chroot, so that there's no need for host dependencies.
- Use chroot where possible to make sure that euid==0, not xbps-uchroot.

Close #32 and #33
2015-06-03 14:28:38 +02:00
Juan RP
ec5a92c270 installer: disable locale setting with musl. 2015-05-29 17:44:31 +02:00
Juan RP
c4ca2a33fa dracut/display-manager-autologin: autologin to lxde if found via lxdm. 2015-05-29 17:00:50 +02:00
Juan RP
9068070c6f .gitignore: *.{img,xz} 2015-05-29 09:25:41 +02:00
Juan RP
eb787f0ef5 .gitignore: *.sh xbps-cachedir* 2015-05-29 09:24:39 +02:00
Juan RP
8824220321 mklive: misc changes to allow building images for musl.
- The required host utilities (grub, squashfs-tools and xorriso) are now
installed for the host os, this way we don't have to make tricks for
dsos to work.

- The cachedir is now by default set to $PWD/xbps-cachedir-$arch, this way
packages for the host and the target don't conflict.

- Due to the changes above it's now possible to build musl images without
having musl-bootstrap installed, previously it was necessary.
2015-05-29 09:21:11 +02:00
Juan RP
9b4819f33a installer: make remote install work with musl live images. 2015-05-27 17:24:48 +02:00
Juan RP
00dda59b0b mklive: remove modesetting workaround for musl, intel(4) works again. 2015-05-27 16:49:33 +02:00
Juan RP
ae8d2e93eb Merge pull request #31 from pullmoll/master
mkimage.sh: fix partition size + toggle boot flag
2015-05-27 08:38:07 +02:00
jbu
a7f094439b mkimage.sh: fix partition size + toggle boot flag 2015-05-26 13:44:13 +02:00
Juan RP
91c7d09305 mkrootfs: fix previous. 2015-05-26 11:20:30 +02:00
Juan RP
b77a40785e mkrootfs: accept *-musl for any platform. 2015-05-26 11:19:39 +02:00
Juan RP
41fbde8a5b mk{image,rootfs}: accept musl targets and fix image creation with two partitions. 2015-05-26 11:00:52 +02:00
Juan RP
b1e2685aef dracut/display-manager-autologin: autologin to i3 if found. 2015-05-25 09:22:27 +02:00
Juan RP
af2fcf925a mklive: force modesetting on musl for now.
intel and radeon drivers are currently broken with musl (segmentation fault
in OsLookupColor()).
2015-05-24 08:35:56 +02:00
Juan RP
bf37f6f5c6 build-x86-images: added kde image, but don't hook it up yet. 2015-05-24 07:38:46 +02:00
Juan RP
5962f489e0 dracut/display-manager-autologin.sh: enable kdm autologin. 2015-05-24 07:36:42 +02:00
Juan RP
3845a5b429 mkrootfs: add cubietruck platform. 2015-05-22 09:33:32 +02:00
Juan RP
3ab4ba77d0 installer: remove partx(8) use; cfdisk should be enough. 2015-05-22 07:35:31 +02:00
Juan RP
d6e7c1653d installer: remove void-installer in local installation. 2015-05-22 07:29:15 +02:00
Juan RP
d95e13b4aa mkimage: bananapi-uboot still assumes fat partition. 2015-05-21 12:16:25 +02:00
Juan RP
1bd3d55b05 mkimage: on bpi, cubie{board2,truck} we don't need a FAT partition. 2015-05-21 12:12:17 +02:00
Juan RP
fc31e013a3 mkrootfs: fix -r order. 2015-05-20 19:18:05 +02:00
Juan RP
d177ef47d6 Merge pull request #27 from pullmoll/master
installer.sh.in: really fix the md parsing
2015-05-20 11:23:10 +02:00
Juan RP
b231ef76f5 installer: update for xbps>=0.43 (close #29). 2015-05-20 10:49:20 +02:00
jbu
f3b9e9d2e4 mkimage.sh.in: add cubietruck 2015-05-16 20:16:32 +02:00
jbu
ed2337f7c6 build-rootfs.sh.in: add cubietruck 2015-05-16 19:45:51 +02:00
jbu
08b105b511 build-arm-images.sh.in: add cubietruck 2015-05-16 19:42:47 +02:00
jbu
3f0dfe5832 installer.sh.in: really fix the md parsing 2015-05-14 17:52:13 +02:00
Juan RP
0493378c0c dracut: only install memdisk stuff if /usr/bin/memdiskfind exists. 2015-05-08 17:55:36 +02:00
Juan RP
30d9ebece4 Added musl.voidlinux.net RSA pubkey. 2015-05-08 17:25:42 +02:00
Juan RP
037523d1d1 installer: detect /dev/mmcblkX devices. 2015-05-08 16:35:57 +02:00
Juan RP
18fda50245 Merge pull request #26 from pullmoll/master
void-mklive: Fixes for systems with md / lvm2
2015-05-08 07:11:19 +02:00
jbu
944153192b void-mklive: Fixes for systems with md / lvm2
- Add quotes around $TARGET to allow for empty $1 in build-x86-images.sh
- In installer.sh there was $part for md where it should have been $p
- The list of md and lvm partitions should occur just once, thus move it out of the loop
2015-05-08 07:06:26 +02:00
Christian Neukirchen
929175a025 Support for MEMDISK
The .iso can now be booted using Grub (memdisk from Syslinux package):

	linux16 /memdisk
	initrd16 /path/to/iso

As well as from Syslinux:

	LINUX memdisk
	INITRD path/to/iso
2015-05-02 12:16:21 +02:00
Juan RP
1571ef8d44 installer: accept WPA passphrases up to 50 chars. 2015-05-01 10:10:03 +02:00
Juan RP
41e3a6c954 build-{arm-images,rootfs}: added support to build just one platform. 2015-04-30 15:17:33 +02:00
Juan RP
f263a250f6 build-x86-images: add firefox/pa to all DE flavours; add support to build X img. 2015-04-30 10:44:33 +02:00
Juan RP
1c6321d1da dracut/services: do not enable the pulseaudio service. 2015-04-29 17:17:48 +02:00
Juan RP
749ed6c3c4 mklive: add a new entry to load image into RAM (grub, syslinux). 2015-04-29 16:50:18 +02:00
Enno Boland
6557b08b4c Merge pull request #23 from Gottox/usbamory
add platform support for USB armory
2015-04-29 16:39:19 +02:00
Enno Boland
8b238fad3f add platform support for USB armory 2015-04-28 17:30:16 +02:00
Juan RP
bc5f40d51f COPYING: it's 2015. 2015-04-15 07:33:47 +02:00
Juan RP
ad1fb6c388 README: update mklive examples. 2015-04-15 07:33:04 +02:00
Juan RP
bc72a0b4cf mklive: use $BASE_ARCH if set for the image filename. 2015-04-15 07:30:18 +02:00
Juan RP
69f299c581 build-x86-images.sh.in: improve the monospace fonts issue. 2015-04-08 10:02:15 +02:00
Juan RP
f0592dcd5e dracut/services: do not enable wpa_supplicant. 2015-04-07 10:23:33 +02:00
Juan RP
8ee6fd344b mklive: reconfigure base-files for the kvm group. 2015-04-07 10:23:19 +02:00
Juan RP
6bf0ef18f6 build-rootfs: fix arg order. 2015-02-22 09:46:05 +01:00
Juan RP
00b4452a2a build-rootfs: new script to build all rootfs tarballs. 2015-02-22 09:40:53 +01:00
Juan RP
6755fa69c4 build-arm-images: only build the images, the rootfs must be available. 2015-02-22 09:40:25 +01:00
Juan RP
3d30dbb7a6 mkimage: misc cosmetic tweaks; umount rootfs/boot only if it's mounted. 2015-02-22 09:39:47 +01:00
Juan RP
69bcb88aa1 mklive: add libgcc to required pkgs; glibc's pthread_cancel needs it :/ 2015-02-21 18:25:14 +01:00
Juan RP
77da56c24a build-x86-images: pass additional args to mklive. 2015-02-21 17:31:01 +01:00
Juan RP
a5e1dabeb7 Merge pull request #19 from teh-jazzman/master
Option not to install a bootloader
2015-02-21 10:02:22 +01:00
Stefan Mühlinghaus
03b9a7b424 Option not to install a bootloader 2015-02-20 22:12:18 +01:00
Juan RP
ca8d1ff70b dracut/adduser: add user to the audio/video groups. 2015-02-14 12:44:10 +01:00
Juan RP
a0a774efab build-x86-images: add gnome-themes-standard for gtk[23] apps. 2015-02-14 12:34:56 +01:00
Juan RP
45ea7a94e3 dracut/services: do not enable agetty on serial by default. 2015-02-14 11:40:57 +01:00
Juan RP
c332eae781 mkrootfs: die if $QEMU_BIN is not in PATH. 2015-02-12 09:14:22 +01:00
Juan RP
a7ed58c4fb mklive: force C locale to install base pkgs to silence dracut. 2015-02-11 08:34:35 +01:00
Juan RP
9b00e0b1fe mkimage: do not touch rootfstype from cmdline, it's unnecessary. 2015-02-10 18:43:38 +01:00
Juan RP
5684607fce mkrootfs: generate rpi2 tarballs with a proper name. 2015-02-06 14:00:15 +01:00
Juan RP
6a68e5c875 mkrootfs: override PLATFORM for rpi; we do use the same platform pkg. 2015-02-06 12:16:14 +01:00
Juan RP
cf8654694e build-arm-images: build the rpi2 image. 2015-02-06 11:50:37 +01:00
Juan RP
e52f493f15 mk{image,rootfs}: add support for the rpi2 platform (armv7). 2015-02-06 11:29:49 +01:00
Christian Neukirchen
0b9c6f0160 mkrootfs: support i686/x86_64. 2015-02-01 09:23:30 +01:00
Christian Neukirchen
5331b55e39 mkrootfs: use parallel xz. 2015-02-01 09:23:30 +01:00
Juan RP
690ffec05c mklive: unbreak setting multiple repos via -r (close #17) 2015-01-31 10:00:05 +01:00
Juan RP
c2fdc9e505 build-x86-images: fix cinnamon image; add gnome-terminal and gvfs. 2015-01-25 11:49:38 +01:00
Juan RP
0ea1f53ed9 build-x86-images: by popular demand add cryptsetup/lvm2/mdadm to all images. 2015-01-25 08:51:39 +01:00
Juan RP
371941a8f1 build-x86-images: generate image with cinnamon. 2015-01-25 08:47:25 +01:00
Juan RP
8de43b1f99 dracut/display-manager-autologin: autostart cinnamon if found. 2015-01-25 08:38:38 +01:00
Juan RP
289136e02e dracut/services: do not enable agetty-serial. 2015-01-25 08:38:18 +01:00
Juan RP
7dff7059c0 mkimage: added bananapi platform. 2015-01-19 15:49:59 +01:00
Juan RP
c2a95e625f mkrootfs: add 'bananapi' platform. 2015-01-19 15:07:53 +01:00
Juan RP
1c1251c506 mkimage: disable fsck on rootfs if it's f2fs; it does not work in the rpi. 2015-01-17 11:31:10 +01:00
Juan RP
289592a0f6 installer: mount pseudofs to regenerate the initramfs.
This fixes the last issue with musl!
2015-01-15 14:40:35 +01:00
Juan RP
422bdf640c data/void-vpkgs.conf: add some more default pkgs. 2015-01-10 06:42:19 +01:00
Juan RP
ce35908f35 installer: generate a non hostonly initramfs; force-add ahci just in case. 2015-01-05 17:56:21 +01:00
Juan RP
da528e772f mklive: declare vpkgs unversioned and update path for xbps>=0.43. 2015-01-05 17:55:52 +01:00
Juan RP
8134257155 mklive: more fixes for musl images.
- Reconfigure util-linux only if it's installed in rootdir.
- dracut: force add the ahci kernel module and build a non hostonly image.
2014-12-29 11:26:55 +01:00
Juan RP
653f1d2ad9 mklive: misc fixes to generate successful musl images. 2014-12-29 09:50:29 +01:00
Juan RP
7f49ee579c mklive: only remove unnecessary pkgs if don't have revdeps.
... otherwise switch them to automatic installation mode.
2014-12-17 18:54:43 +01:00
Juan RP
4ab914cdf7 mklive: multiple improvements and fixes.
- Does not need bash anymore, a POSIX shell is enough.
- Avoid installing base-system twice to generate the initramfs.
- Reconfigure some pkgs in the rootfs... otherwise some system users won't be created.
- Added -K opt to not remove builddir.
2014-12-17 18:26:28 +01:00
Juan RP
c204ab1f5f installer: swap is not mandatory. 2014-12-16 15:24:06 +01:00
Juan RP
41cf1e06d0 New script to build ARM rootfs/images. 2014-12-15 19:28:57 +01:00
Juan RP
8e0080b720 installer: redirect debug msgs to /dev/tty8.
/dev/tty7 might be used by the X server.
2014-12-15 19:27:48 +01:00
Juan RP
f3dea549e8 mkimage: simplify. 2014-12-06 09:42:17 +01:00
Juan RP
8939262303 mkimage: get rid of partx completely. 2014-12-06 09:41:49 +01:00
Juan RP
a7c809c6b0 mkimage: use losetup --partscan rather than partx. 2014-12-05 15:31:27 +01:00
Juan RP
a3675d092f mkimage: umount boot only in !beaglebone. 2014-12-05 12:58:19 +01:00
Juan RP
f5af7c32bd mklive.sh: dont error out if loop module cannot be loaded. 2014-12-05 12:45:43 +01:00
Juan RP
3818e6d425 mk{image,rootfs}: misc tweaks for beaglebone. 2014-12-05 11:06:39 +01:00
Juan RP
b7a3926c5b mkimage: remove unnecessary beaglebone workaround. 2014-12-05 07:09:36 +01:00
Juan RP
b6ca6f8027 mkrootfs: put /boot/MLO at the head on beaglebone.
This file must be in the first sectors of the /boot FAT partition on the image.
2014-12-05 07:06:39 +01:00
Juan RP
4aaaa89d1c mkrootfs: mount binfmt_misc and use pixz if available. 2014-12-05 06:22:16 +01:00
Juan RP
2bb83b4c3a .gitignore: ignore .sh files in topdir. 2014-12-05 06:09:16 +01:00
Juan RP
1c603437d3 mk{image,rootfs}: add beaglebone platform support. 2014-12-05 05:46:31 +01:00
Enno Boland
15c2b8e9b2 build-x86-images.sh.in: grub and dialog should be part of all live CDs. 2014-12-05 02:17:57 +01:00
Juan RP
bfd7188589 dracut/service: do not enable agetty-generic; misc tweaks. 2014-12-04 10:08:13 +01:00
Juan RP
8f2cc01d18 mklive: force reconfiguration of util-linux to make sure uuidd is created. 2014-12-03 14:13:42 +01:00
Juan RP
65f74724df build-x86-images: add xorg-input-drivers and firefox in all images. 2014-12-03 13:32:49 +01:00
Juan RP
1eefc4e505 New script to generate 4 x86 images: base, enlightenment, xfce and mate. 2014-12-03 11:32:01 +01:00
Juan RP
ee37a611e9 dracut/display-manager-autologin: autostart mate via lxdm if mate-session exists. 2014-12-03 11:29:43 +01:00
Juan RP
ef1c3e6766 dracut/display-manager-autologin: start xfce4 if startxfce4 exists. 2014-12-03 09:15:43 +01:00
Juan RP
32e9d6e04a dracut/services: do not auto enable ip{,6}tables. 2014-12-02 21:19:12 +01:00
Juan RP
ca99f9f5bb New dracut module helper to enable runit services. 2014-12-02 21:03:58 +01:00
Juan RP
6847c606fb .gitignore: don't forbit *.sh, obviously :-) 2014-12-02 21:03:41 +01:00
Juan RP
a30890cffc dracut/adduser: autologin if live.autologin is set in the kernel cmdline. 2014-12-02 19:53:04 +01:00
Juan RP
c4efb3d95e mkimage: if root fstype is ext[34] disable the journal. 2014-11-29 18:16:50 +01:00
Juan RP
972734f802 Update copyright. 2014-11-14 18:27:26 +01:00
Juan RP
644890069c mklive: install vpkg conf file to the system virtualpkg directory instead. 2014-11-05 09:45:29 +01:00
Juan RP
4e5adc6f04 mklive: use a default void vpkg configuration file for base-system. 2014-11-04 16:36:33 +01:00
Juan RP
c39051a72b mklive: switch back to xz initramfs now that we have the prereqs. 2014-10-25 11:47:16 +02:00
Juan RP
308882fd87 mklive: use gzip compression for the initramfs by default; lz4 is optional. 2014-10-25 11:17:22 +02:00
Juan RP
3201721196 mklive: do not use the busybox dracut module, will fail. 2014-10-25 10:44:54 +02:00
Juan RP
7fbf8a189d installer: run partx -u just to be sure to update its partition table. 2014-10-25 10:07:50 +02:00
Juan RP
70fc86365c mklive: use lz4 compression for the initramfs by default, to match our pkgs. 2014-10-23 09:32:29 +02:00
Juan RP
34a6142056 installer: re-add line accidentally removed in prev. 2014-09-24 17:14:38 +02:00
Juan RP
5eae360a23 installer: remove obsolete autologin code; remove /etc/issue from live image. 2014-09-24 17:06:33 +02:00
Juan RP
2e76fa65a6 data/issue: tyop 2014-09-24 08:33:38 +02:00
Juan RP
f29fffd488 data/issue: misc improvements. 2014-09-24 08:29:24 +02:00
Juan RP
1a167e371a dracut/adduser.sh: set live.user shell to /bin/bash if exists. 2014-09-24 08:22:49 +02:00
Juan RP
7d89972c57 mklive: added -S opt to set a custom rootfs free size in MB. 2014-09-21 12:48:32 +02:00
Juan RP
fde61a9d43 installer: exit if /bin/dialog is not there. 2014-09-21 12:20:45 +02:00
Juan RP
0245d934c5 mklive: do not add dialog to the pkg list inconditionally; it's optional. 2014-09-21 09:41:57 +02:00
Juan RP
4b559d86c9 mklive: remove unnecessary line. 2014-09-21 09:35:07 +02:00
Juan RP
914e193724 mklive: add -a opt to set XBPS_ARCH (for musl); misc changes for dracut/adduser. 2014-09-21 09:31:43 +02:00
Juan RP
14381901e4 mklive: accept live.shell kernel cmdline to switch user shell; from pancake. 2014-09-20 11:48:49 +02:00
Juan RP
6711fb5182 mklive: force-add init=/sbin/init to the kernel cmdline for now. 2014-09-20 11:42:37 +02:00
Juan RP
ab3a398875 mklive: set live user shell to /bin/sh; use /etc/issue; disable autologin. 2014-09-20 11:14:29 +02:00
Juan RP
bb8d32e2c2 mklive: always omit dracut systemd module if base-system-systemd is not used. 2014-09-20 09:44:36 +02:00
Juan RP
8c91dea923 mklive: added -C and -T to append kernel cmdline args and modify bootloader title.
Requested by pancake.
2014-09-18 17:17:17 +02:00
Juan RP
bedab03a6e Move splash image and motd to data/; this way those can be overrided easily.
Close #9
2014-09-18 16:52:28 +02:00
Juan RP
620883f9b2 installer: fixed multiple random issues.
- there's no need to check if $SYSTEMD_INIT==1, just test if it's set.
- set TIMEZONE correctly to /etc/rc.conf.
- Set fstab(5) fs_passno correctly for the rootfs and additional filesystems.
- Disable fsck if rootfs is f2fs, it does not work correctly.
2014-08-29 15:59:56 +02:00
Juan RP
9883c5eae6 installer: ignore partitions that are part of LVM. 2014-08-29 15:13:23 +02:00
Juan RP
945dc94fe8 installer: detect LUKS and LVM LVs correctly. 2014-08-29 13:30:38 +02:00
Juan RP
70f268cc29 installer: remove unnecessary quoting. 2014-08-29 08:50:37 +02:00
Juan RP
c97e10480c installer: remove last ref to parted. 2014-08-25 11:19:13 +02:00
Juan RP
ad34e8f792 installer: drop parted and switch to cfdisk. 2014-08-25 11:18:22 +02:00
Juan RP
29340d664e dracut/adduser.sh: repair autologin with the latest agetty runit service. 2014-08-08 13:06:02 +02:00
Juan RP
27ab1fc5d5 README: update. 2014-08-03 20:15:19 +02:00
Juan RP
d09421cfe1 mklive: remove a check that is no longer necessary. 2014-08-02 09:14:22 +02:00
Juan RP
5c49a31161 mklive: add systemd dracut module for systemd images. 2014-08-02 08:56:39 +02:00
Juan RP
2c3fb819ee mklive: fix regression introduced in ca3a146bb (UEFI boot not working).
The issue was that I forgot to copy the generated grubx64.efi into the
vfat image that is embedded into the ISO image, resulting in an unbootable
image on UEFI systems.

Thanks to pancake for reporting!
2014-08-02 08:53:38 +02:00
Juan RP
e4434c5d51 dracut/adduser.sh: do not add user to the systemd-journal group. 2014-08-02 07:48:18 +02:00
Juan RP
f898ef96e3 installer: mount /tmp as tmpfs. 2014-07-31 16:17:56 +02:00
Juan RP
194c1cdd89 mkrootfs: update for base-system as runit. 2014-07-29 08:33:04 +02:00
Juan RP
6d7fa74d74 installer: fix network install. 2014-07-28 22:48:22 +02:00
Juan RP
ca3a146bbb mklive.sh: run grub-mkstandalone via xbps-uchroot(8) to avoid host issues. 2014-06-29 17:57:32 +02:00
Juan RP
ef81fb90f8 dracut/copy-initramfs.sh: only run this with systemd. 2014-06-29 12:36:51 +02:00
Juan RP
204277a8a8 README: add some examples. 2014-06-25 18:10:09 +02:00
Juan RP
f2e9e4f27a mkrootfs: use built-in void pubkey; assign default void repo if -r unset. 2014-06-25 08:23:37 +02:00
Juan RP
ddbf495c4c mklive: two fixes to generate images on any linux distro.
- Store and use default void rsa pubkey for the xbps repos.
- If -r is unset, use default void main http repo.
2014-06-25 06:53:30 +02:00
Juan RP
b54cdb22e7 dracut/adduser.sh: no need to remove pam_systemd with runit anymore. 2014-06-20 10:29:06 +02:00
Juan RP
1fcbe4e2e9 mkrootfs: added c option correctly. 2014-06-01 12:34:08 +02:00
Juan RP
e056d3944c mkrootfs: added -b, -c and -r options to set system pkg, cachedir and repos respectively. 2014-06-01 12:29:55 +02:00
Juan RP
1980b64954 installer: fixed some issues found with base-system-runit. 2014-05-31 13:02:49 +02:00
Juan RP
c121f9ea1e dracut/display-manager-autologin.sh: if enlightenment and lxdm are installed, autostart it. 2014-05-31 13:02:28 +02:00
Juan RP
82681e718b mklive: added -b option to specify an alternative base-system pkg.
Use -b base-system-runit to generate an image with eudev+runit.
2014-05-31 12:02:36 +02:00
Ypnose
1e28a7ae4d Add global systemd var 2014-05-30 12:40:46 +02:00
Ypnose
df8e66316f Enable runit images 2014-05-30 12:00:02 +02:00
Juan RP
07ce345ba6 mklive: misc tweaks to generate a proper image with runit. 2014-05-23 15:05:31 +02:00
Juan RP
3b5b9cba6a mklive: do not assume glibc and/or systemd (might use musl and runit instead :-). 2014-05-23 11:30:24 +02:00
Juan RP
11e39d0fbc mklive: switch to xz initramfs; misc tweaks. 2014-05-23 10:55:03 +02:00
Juan RP
27aa44e0fd mklive: improved to avoid host deps; use our own pkgs to generate images.
That means that mklive just needs xbps to generate working images.

Usage: mklive.sh [options]

Options:
 -r <repo-url>      Use this XBPS repository (may be specified multiple times).
 -c <cachedir>      Use this XBPS cache directory (/var/cache/xbps if unset).
 -k <keymap>        Default keymap to use (us if unset)
 -l <locale>        Default locale to use (en_US.UTF-8 if unset).
 -i <gzip|bzip2|xz> Compression type for the initramfs image (gzip if unset).
 -s <gzip|bzip2|xz> Compression type for the squashfs image (xz if unset)
 -o <file>          Output file name for the ISO image (auto if unset).
 -p "pkg pkgN ..."  Install additional packages into the ISO image.

The mklive.sh script generates a live image of the Void Linux distribution.
This ISO image can be written to a CD/DVD-ROM or any USB stick.
2014-05-22 22:00:31 +02:00
Juan RP
03a215e616 Merge pull request #7 from Gottox/master
Don't show plain password in Settings screen.
2014-05-16 10:42:08 +02:00
Juan RP
ba9801c183 installer: for btrfs filesystems use -f to force creation. 2014-05-11 10:38:00 +02:00
Juan RP
b8062c9b45 mklive: correctly set path to store the iso image. 2014-05-11 09:43:12 +02:00
Juan RP
340c8107ee mklive: load loop kmod in the grub stage instead. 2014-05-11 09:35:39 +02:00
Juan RP
3b660f9290 mklive: generatate image in cwd. 2014-05-07 21:04:46 +02:00
Enno Boland
92be3725d8 Don't show plain password in Settings screen 2014-05-07 18:57:25 +02:00
Juan RP
30c13a8fb4 mklive: redirect to logfile when reconfiguring locales; load loop kmod too. 2014-04-28 11:01:00 +02:00
Juan RP
a9ea9ea750 README.md: sync with reality. 2014-04-23 11:30:05 +02:00
Juan RP
844f9e4607 mklive: avoid void-{artwork,mklive} dependencies on system.
I'm starting to make the scripts distro independent; this is just
the first step.
2014-04-23 11:18:34 +02:00
Juan RP
2e3f01f4fa mklive: remove unnecessary steps. 2014-04-22 12:23:09 +02:00
Juan RP
6694adcef9 mklive: switch to xbps-uchroot(8); bye bye systemd-nspawn. 2014-04-22 12:11:34 +02:00
Juan RP
0d81294fcc Revert "installer/mklive: make sure to install dcron rather than cronie."
This reverts commit 1ccbe86051.

I'll fix this properly via base-system.
2014-02-03 23:43:48 +01:00
Juan RP
1ccbe86051 installer/mklive: make sure to install dcron rather than cronie.
dcron is smaller and only has a libc dependency.

cronie is selected because it appears alphabetically before in the repo index.
2014-02-03 23:31:13 +01:00
Juan RP
22d319346d installer: add a network option in main menu. 2014-02-03 23:16:28 +01:00
Juan RP
08db3c6cb3 installer: added basic wifi setup via dhcpcd (only WEP and WPA/PSK for now). 2014-02-03 23:11:54 +01:00
Juan RP
c3c67ad641 installer: copy host void rsa pubkey to the target rootfs. 2014-02-03 21:10:25 +01:00
Juan RP
1f55bbb29d README: update. 2014-01-28 17:08:04 +01:00
Juan RP
20f2340387 mkimage: guess platform automatically, add new options to set fstype and boot fssize. 2014-01-28 17:04:15 +01:00
Juan RP
531d38dc73 mkrootfs: make platform argument mandatory, install <platform>-base pkg automatically. 2014-01-28 16:35:45 +01:00
Juan RP
1d5a5195a8 Merge pull request #6 from Gottox/master
install bootloader on -p udroid-u2
2014-01-28 07:12:10 -08:00
Gottox
24f3cd97c2 install bootloader on udroid-u2 2014-01-28 14:31:08 +01:00
Juan RP
e20720b93b Merge pull request #5 from jan-schreib/master
Fixed typo.
2014-01-27 11:32:43 -08:00
Jan S
1854bcdb08 Fixed typo. 2014-01-26 22:50:09 +01:00
Juan RP
aedb3ea05c mkimage: use conv=sparse if dd supports it; added -p to set platform. 2014-01-26 20:32:54 +01:00
Juan RP
d728ef5f4a mkrootfs: accept -p cubieboard. 2014-01-26 12:12:30 +01:00
Juan RP
1da8db0c36 Merge pull request #4 from Gottox/master
Typo fix
2014-01-22 09:28:06 -08:00
root
9683dc0045 using xpart instead of losetup -P, as -P is not supported by debian stable
mkfs.vfat thinks it writes to a raw device instead of a partition on debian. force it
2014-01-22 18:15:57 +01:00
Juan RP
eb14a02029 mkrootfs: fix xbps-query -R PKGBASE 2014-01-22 11:06:05 +01:00
root
0621eebf86 Merge branch 'master' of https://github.com/voidlinux/void-mklive 2014-01-22 11:01:26 +01:00
Juan RP
e5df5f03d1 mkrootfs: typofix in previous. 2014-01-22 10:43:28 +01:00
Gottox
ea37f5fa4e Merge branch 'master' of https://github.com/voidlinux/void-mklive 2014-01-22 10:42:02 +01:00
Gottox
2d29c1aa7c typo fix 2014-01-22 10:41:00 +01:00
Juan RP
89fd4983d5 mkrootfs: replace -R with -C to specify xbps.conf. 2014-01-22 10:36:24 +01:00
Juan RP
adc326d0d4 mkrootfs: remove std{err,out} redirs to see cmd output. 2014-01-22 10:31:28 +01:00
Juan RP
e20cebf5c9 mkrootfs: fix previous. 2014-01-22 10:22:57 +01:00
Juan RP
5077411bd0 mkrootfs: fix xbps-query with remote repos. 2014-01-22 10:21:57 +01:00
Juan RP
9fd80621ad mkrootfs: added -R to set the xbps repository. 2014-01-22 10:15:17 +01:00
Juan RP
1ee561f98d mkimage: create /boot partition at 4096 sectors. 2014-01-21 23:27:52 +01:00
Juan RP
0756604fb0 mkrootfs: added new flags: -k <xbps-keys-dir> and -m <platform> (rpi|odroid*). 2014-01-21 23:13:26 +01:00
Juan RP
be13cabb84 Makefile: generate executable scripts. 2014-01-11 18:51:47 +01:00
Juan RP
ad4c7ec381 mklive.sh.in: install local installer if available, otherwise the host one. 2014-01-11 18:51:02 +01:00
Juan RP
de357fbda9 mklive.sh: make it work with xbps>=0.27. 2014-01-11 18:40:16 +01:00
Juan RP
2554f93ba4 installer: after successfull installation only remove dialog pkg. 2013-11-14 11:55:16 +01:00
Juan RP
e12311d655 mklive: always use base-system and dialog pkgs to generate the live image. 2013-11-14 11:52:30 +01:00
Juan RP
c80eee86f9 vmklive: drop locale.LANG from kernel cmdline, it's always set to en_US.UTF-8. 2013-11-14 11:52:00 +01:00
Juan RP
86297ed6c0 mkrootfs: drop systemd dependency; misc tweaks. 2013-11-12 16:48:59 +01:00
Juan RP
ede54ad439 mkimage: check for losetup existence too. 2013-11-12 16:48:55 +01:00
Juan RP
adf32efa6b mkimage: check for mkfs.xxx after setting defaults. 2013-11-11 10:09:00 +01:00
Juan RP
2c846d9f4c mkimage: make sure to update rootfstype on /boot/cmdline.txt for Raspberry Pi. 2013-11-11 09:06:03 +01:00
Juan RP
81378ab3c6 mkimage: allow -r f2fs or any other fs and check we have required cmds. 2013-11-10 08:42:04 +01:00
Juan RP
d4cd939375 mkrootfs: added -p option to add extra pkgs to the rootfs. 2013-11-10 08:41:43 +01:00
Juan RP
64ffdff00c installer: repair local installations. 2013-10-16 11:03:48 +02:00
Juan RP
e267fde82f Make this work with xbps >= 0.26. 2013-09-29 10:26:53 +02:00
Juan RP
ecf9674d14 mkimage: do not force FAT32 for the /boot filesystem.
If the FAT partition does not have enough clusters for FAT32, the Raspberry Pi
will fail to boot.

Fix: let mkfs.vfat choose the FAT type automatically.
2013-09-21 12:30:38 +02:00
Juan RP
0fbbcbd740 installer: use an infobox when copying live image to target; misc tweaks. 2013-09-16 11:44:45 +02:00
Juan RP
78c31161df installer: two more infoboxes after copying image to target; remove useless dir. 2013-09-14 15:17:44 +02:00
Juan RP
2fdc8b11cc mklive: update conf file with an uptodate pkglist. 2013-09-14 15:17:40 +02:00
Juan RP
63dbda3e43 COPYING: sync with reality. 2013-09-14 15:17:16 +02:00
Juan RP
670f476709 installer: remove temporary pkgs from target after copying live image. 2013-08-26 17:03:43 +02:00
Juan RP
3061aa72cd Makefile: use short git tag; bump to v21. 2013-08-23 11:14:18 +02:00
Juan RP
d36f33b76c README -> README.md 2013-08-22 17:35:40 +02:00
Juan RP
b4140a3b2e README: update. 2013-08-22 17:35:31 +02:00
Juan RP
07f4bb7b17 installer: repair network install. 2013-08-22 16:36:37 +02:00
Juan RP
011fc24068 Makefile: bump to v20. 2013-08-22 16:15:39 +02:00
Juan RP
dc08114bec installer: after copying live image also generate a new initramfs. 2013-08-22 16:14:57 +02:00
Juan RP
c193f1ce75 installer.sh: literally copy live rootfs to the targetdir and cleanup. 2013-08-22 13:20:57 +02:00
Juan RP
783a25e632 Misc changes to reduce image size.
1- Stop generating locale via dracut; generate choosen locale at build time.
2- Stop generating a local repository (/packages) to the rootfs.
3- Drop support for -l option.
4- There's no need to copy kernel modules manually anymore.
5- Switch to base-system and some more additional packages to drop base-system-live
   requirement.

WIP! the installer must be updated to copy rootfs files to the targetdir.
2013-08-22 11:52:07 +02:00
Juan RP
c15dd6d8d5 README: update. 2013-08-11 12:20:10 +02:00
Juan RP
a75903c0b2 Makefile: install void-mkimage. 2013-08-11 12:18:47 +02:00
Juan RP
feabec2e7e Bump version to v19. 2013-08-11 12:17:53 +02:00
Juan RP
065b000f4f New void-mkimage script to generate working images with a provided rootfs tarball. 2013-08-11 12:17:18 +02:00
Juan RP
112a6a7775 Add -V option to show version to void-mk{live,rootfs} and installer in the title. 2013-08-11 12:16:29 +02:00
Juan RP
b877a74a49 .gitignore: ignore all .sh files. 2013-08-11 12:09:07 +02:00
Juan RP
7c42cf3fe8 installer: detect xen native domU disks (xvd devices). 2013-08-10 09:55:39 +02:00
Juan RP
43a3b4085b Bump to v18. 2013-07-29 11:38:53 +02:00
Juan RP
2dea9a40bf installer: use lsblk(8) to find fs{size,type}; use blkid(8) -o value to find UUID. 2013-07-26 09:14:34 +02:00
Juan RP
d17210fb5b mklive.sh.in: if REPOSITORY_CACHE not set use system default cachedir. 2013-07-12 11:12:40 +02:00
Juan RP
0fc1050790 mklive.sh.in: use -S while installing pkgs for the initramfs. 2013-07-12 10:53:29 +02:00
Juan RP
1b33c72840 Bump version to 17. 2013-07-12 10:36:49 +02:00
Juan RP
c36acf400c mklive.sh.in: repair support for remote repos. 2013-07-12 10:34:45 +02:00
Juan RP
0d79e3980b mklive.sh.in: add -S to XBPS_ARGS, to make this work with remote repos. 2013-07-12 10:22:21 +02:00
Juan RP
b6ae26ddf2 installer: tyop fix. 2013-07-01 15:54:06 +02:00
Juan RP
a4edc23bd6 installer: avoid creating a broken dhcpcd.conf. 2013-07-01 15:51:06 +02:00
Juan RP
3389b3d3de Bump version to v16. 2013-06-12 05:30:15 +02:00
Juan RP
65daf0eb35 dracut/adduser.sh: fix issue #1.
Make sure that systemd uses our getty service modified to autologin with the live user.
2013-06-12 05:28:43 +02:00
Juan RP
90c2d5fa06 mklive.sh: fix the xorriso efi args (needs -no-emul-boot). 2013-06-12 05:08:58 +02:00
Juan RP
a66ddf9062 Bump to v15 for the recent EFI boot fix (tested by ojab). 2013-06-11 11:30:10 +02:00
Juan RP
7251a70079 Use Fedora way to generate the images with xorriso (-e and -isohybrid-gpt-basdat). 2013-06-11 10:42:31 +02:00
Juan RP
e80d4edb1b dracut: chown after chroot to NEWROOT instead. 2013-06-02 12:32:57 +02:00
Juan RP
4631d5a919 dracut/module-setup.sh: need chown(1) for adduser.sh. 2013-06-02 12:22:23 +02:00
Juan RP
b2799357c3 dracut/adduser.sh: fix polkit rules file name. 2013-06-02 12:10:20 +02:00
Juan RP
699937efca mklive: force-add vmklive dracut module and generate a polkit rules file to bypass auth. 2013-06-02 12:08:27 +02:00
Juan RP
97f9b02fd7 installer: added support for f2fs (Flash-Friendly Filesystem). 2013-05-23 21:01:40 +02:00
Juan RP
e7bb9ad803 After installing pkgs reconfigure them with systemd-nspawn. 2013-05-22 08:08:29 +02:00
Juan RP
0c3ec890bc dracut/copy-initramfs.sh: set $KVER to make this work again. 2013-05-22 08:08:02 +02:00
Juan RP
92a48c5d2f dracut/locale.sh: set locale/keymap in newroot config files too. 2013-05-21 22:33:11 +02:00
Juan RP
d188c1fe71 mklive: copy kmods from temp rootfs to the final rootfs; remove redundant stuff. 2013-05-21 21:51:47 +02:00
Juan RP
9f542b769d Set locale.LANG in grub/syslinux config. 2013-05-21 21:46:48 +02:00
Juan RP
22bae418bb dracut: new locale.sh script to rebuild the target locale. 2013-05-21 21:44:45 +02:00
Juan RP
e05ce506e8 copy-kmods.sh -> copy-initramfs.sh; do not copy kmods, just the initramfs for shutdown. 2013-05-21 21:35:35 +02:00
Juan RP
46f0398357 mklive: disable drm dracut module in the initramfs. 2013-05-21 18:15:56 +02:00
Juan RP
38caeeab06 Makefile: bump to 0.14. 2013-05-20 16:32:19 +02:00
Juan RP
c6f15e7299 dracut/copy-kmods.sh: copy the initramfs to the new rootfs for proper shutdown. 2013-05-20 16:31:47 +02:00
Juan RP
2ce7cd8251 mklive: disable dash in the live initramfs; this really sucks for interactive use. 2013-05-20 16:31:19 +02:00
Juan RP
dfb3ade8c5 Make sure all filesystems in targetdir are unmounted. 2013-05-20 16:00:34 +02:00
Juan RP
b557955207 Update grub/isolinux kernel cmdline: remove useless args. 2013-05-20 15:57:37 +02:00
Juan RP
997b3ca895 dracut: misc tweaks. 2013-05-20 13:15:21 +02:00
Juan RP
a5d3e1fc9f mklive: copy chain.c32 from syslinux to boot from harddisk. 2013-05-20 13:11:32 +02:00
Juan RP
20f23bc133 installer: redirect output to $LOG when regenerating the libc locales. 2013-05-20 12:07:47 +02:00
Juan RP
62c920ea5a installer: provide full list of keymaps, locales and timezones; regenerate wanted locale. 2013-05-20 11:48:46 +02:00
Juan RP
7bfd9bc601 Copy network kernel modules for network install; misc tweaks. 2013-05-20 11:24:47 +02:00
Juan RP
5f308e46fe dracut/module-setup.sh: need depmod in initramfs for copy-kmods.sh. 2013-05-20 11:18:13 +02:00
Juan RP
2a5939bce4 dracut/copy-kmods.sh: after copying kmod re-run depmod. 2013-05-20 11:12:54 +02:00
Juan RP
2517265510 Misc tweaks to the generated initramfs in the live image. 2013-05-19 12:38:26 +02:00
Juan RP
7601096f1a Add another script for dracut to copy kmods from initramfs to the new rootfs. 2013-05-19 12:36:21 +02:00
Juan RP
cb1b9f3ca9 installer: quote a variable to avoid an error while unmounting target filesystems. 2013-05-19 10:49:28 +02:00
Juan RP
c1d11098c2 Switch to iproute and dhcpcd and drop ifconfig/route/udhcpc. 2013-05-19 10:08:12 +02:00
Juan RP
cf477a7c3f Drop wget dependency, use xbps-uhelper fetch instead. 2013-05-19 09:44:35 +02:00
Juan RP
005f64904c Drop static list of timezones, use timedatectl(8) instead. 2013-05-19 09:43:36 +02:00
Juan RP
44423c3700 Start integration of void-installer and start conversion to non-busybox utils. 2013-05-19 09:39:56 +02:00
Juan RP
ab5201f3ba grub/grub_void.cfg.in: add missing ')' that broke configuration. 2013-05-19 08:32:00 +02:00
Juan RP
496ab55ca8 dracut/adduser.sh: change shell to bash for the live user. 2013-05-18 09:41:27 +02:00
Juan RP
cf53bdf1d7 Bump to v12. 2013-05-17 11:05:29 +02:00
Juan RP
9378eed058 Modernize and make this work with current packages. 2013-05-17 11:05:00 +02:00
Juan RP
781c002965 Install void-mkrootfs too. 2013-04-28 10:10:20 +02:00
Juan RP
f58d6cd5e5 Remove unneeded workaround for dracut<027. 2013-04-28 09:35:44 +02:00
Juan RP
a5068a6292 isolinux/isolinux.cfg.in: fix booting from first hd with syslinux>=5. 2013-04-28 09:31:20 +02:00
Juan RP
5e22439dae Added void-mkrootfs.sh script to generate rootfs tarballs. 2013-04-21 09:55:33 +02:00
Juan RP
0c32961490 Fix umount_kernel_fs(). 2013-03-12 09:17:27 +01:00
Juan RP
f7b2c93354 dracut/adduser.sh: add anon user to the adm group; redirect std{err,in} to /dev/null. 2013-03-12 08:09:49 +01:00
Juan RP
b7aa53a6c6 Multiple updates and fixes; needs bash and xbps>=0.21. 2013-03-11 23:52:40 +01:00
Juan RP
b1655acba5 mklive.sh.in: detect xbps>=0.20 correctly. 2013-01-16 20:53:32 +01:00
Juan RP
c9821add5c mklive.sh.in: use LD_LIBRARY_PATH to generate the local repo index. 2012-12-10 14:34:18 +01:00
Juan RP
1f2372b35b mklive.sh.in: fix generation of local repo; use target xbps utils; indent 2012-12-10 10:05:31 +01:00
Juan RP
3d7b517071 Do not install xbps-git in the img, use stable release. 2012-11-23 10:32:37 +01:00
Juan RP
9f3da16fad mklive.sh: install stdbuf(1) from coreutils for the installer. 2012-11-23 00:23:12 +01:00
Juan RP
9504ed551c dracut: remove conf script; we can override settings via kernel cmdline. 2012-11-22 18:27:57 +01:00
Juan RP
5090e85113 dracut: drop polkit script, doesn't work with polkit>=0.106. 2012-11-22 17:02:10 +01:00
Juan RP
183ef04078 mklive: typo fix. 2012-11-22 17:02:05 +01:00
Juan RP
cdda795053 dracut/module-setup.sh: pass full path to required bins. 2012-11-22 15:39:15 +01:00
Juan RP
c70ef1451b Make dracut scripts shorter in name; they are part of vmklive module anyway... 2012-11-22 15:28:13 +01:00
Juan RP
8783414cc7 Update for 0.18; new options -l (generates a local repo) and -r to set rootdir.
-l "pkg pkg1 ..." If set generates a local repository (/packages)
		  in the live image with the package list.
-r rootdir	  To specify an alternative rootdir to build the image.
2012-11-22 14:35:37 +01:00
Juan RP
5159224c3d dracut: make sure getarg function is defined. 2012-11-22 12:19:12 +01:00
Juan RP
8f59763071 README: xbps>=0.18 is also required. 2012-11-22 10:33:58 +01:00
Juan RP
715cc64e8b README: update. 2012-11-22 10:33:13 +01:00
Juan RP
6740e801bb Enable DM autologin and make polkit always succeed for USERNAME. 2012-11-22 10:31:46 +01:00
Juan RP
f45150594d vmklive-conf: setup X keymap. 2012-11-22 10:31:30 +01:00
Juan RP
54c2812edf vmklive-adduser: use agetty -a option to autologin. 2012-11-22 10:30:58 +01:00
Juan RP
6564ab4e5b dracut/vmklive-adduser.sh: fixed two typos. 2012-08-30 08:40:34 +02:00
Juan RP
5f3833b18f Update for new dracut (rd.liveimg) and /usr switch. 2012-08-29 16:55:00 +02:00
Juan RP
0afde3876f Update for xbps>=0.17, support new login with pam. 2012-08-29 16:48:08 +02:00
Juan RP
6f65afafa5 mklive.sh: added support for xbps >= 0.16.6. 2012-07-18 09:46:32 +02:00
Juan RP
2446cf7dc5 mklive.sh.in: copy lsblk, blkid and mount cmds to /usr/{bin,sbin}. 2012-07-11 01:12:29 +02:00
Juan RP
0595b35689 Added a COPYING file. 2012-07-06 17:39:28 +02:00
Juan RP
ffda98791c mklive.sh.in: add grub-x86_64-efi to local repo. 2012-07-06 15:56:29 +02:00
Juan RP
08418a0762 mklive.sh.in: tyop fix. 2012-07-06 15:43:39 +02:00
Juan RP
af2db6f6f9 isolinux.cfg.in: don't use multiline strings. 2012-07-06 15:39:13 +02:00
Juan RP
c50879d93a mklive.sh.in: replace @@ARCH@@. 2012-07-06 15:38:26 +02:00
Juan RP
e48e63b61c Revamped to support EFI booting via grub2. 2012-07-06 15:29:12 +02:00
Juan RP
bfbaa4a63b mklive: require xbps>=0.16, install mount(8) from util-linux, set loglevel=4. 2012-07-03 17:22:25 +02:00
Juan RP
9457e65391 Bump to 0.9.7. 2012-07-03 17:00:37 +02:00
Juan RP
2ef7a175c0 dracut/vmklive-adduser.sh: strip --noclear from getty@.service. 2012-07-03 16:57:05 +02:00
Juan RP
a45a0d1448 Added a new dracut script to overwrite keymap/locale settings in NEWROOT. 2012-06-14 11:21:54 +02:00
Juan RP
7045698d74 gitignore: only ignore generated mklive.sh. 2012-06-14 11:21:39 +02:00
Juan RP
dce041a6fe Rename dracut files. 2012-06-14 10:57:54 +02:00
Juan RP
5f1c11eb55 README: s/vmklive/void-mklive/ 2012-06-12 17:09:49 +02:00
Juan RP
cf6dacddf2 README: tweaks. 2012-06-12 17:08:50 +02:00
Juan RP
42d58ca543 Makefile: post release bump. 2012-06-12 17:08:41 +02:00
94 changed files with 8226 additions and 509 deletions

4
.dockerignore Executable file
View File

@@ -0,0 +1,4 @@
xbps-cachedir-*/
*.iso
*.img*
*.tar*

11
.gitignore vendored Normal file → Executable file
View File

@@ -1 +1,12 @@
*.sh
*.img
*.xz
*.iso
*.raw
*.tar.gz
*.box
xbps-cache
xbps-cachedir*
stamps*
!dracut/*/*.sh
!packer/scripts/*.sh

23
COPYING Executable file
View File

@@ -0,0 +1,23 @@
# Copyright (c) 2009-2015 Juan RP <xtraeme@gmail.com>
# Copyright (c) 2012 Dave Elusive <davehome@redthumb.info.tm>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

36
Dockerfile Executable file
View File

@@ -0,0 +1,36 @@
# 1) use alpine to generate a void environment
FROM alpine:3.12 as stage0
ARG REPOSITORY=https://alpha.de.repo.voidlinux.org
ARG ARCH=x86_64
COPY keys/* /target/var/db/xbps/keys/
RUN apk add ca-certificates curl && \
curl ${REPOSITORY}/static/xbps-static-latest.$(uname -m)-musl.tar.xz | \
tar Jx && \
XBPS_ARCH=${ARCH} xbps-install.static -yMU \
--repository=${REPOSITORY}/current \
--repository=${REPOSITORY}/current/musl \
-r /target \
base-minimal
# 2) using void to generate the final build
FROM scratch as stage1
ARG REPOSITORY=https://alpha.de.repo.voidlinux.org
ARG ARCH=x86_64
ARG BASEPKG=base-minimal
COPY --from=stage0 /target /
COPY keys/* /target/var/db/xbps/keys/
RUN xbps-reconfigure -a && \
mkdir -p /target/var/cache && ln -s /var/cache/xbps /target/var/cache/xbps && \
XBPS_ARCH=${ARCH} xbps-install -yMU \
--repository=${REPOSITORY}/current \
--repository=${REPOSITORY}/current/musl \
-r /target \
${BASEPKG}
# 3) configure and clean up the final image
FROM scratch
COPY --from=stage1 /target /
RUN xbps-reconfigure -a && \
rm -r /var/cache/xbps
CMD ["/bin/sh"]

117
Makefile Normal file → Executable file
View File

@@ -1,25 +1,104 @@
VERSION = 0.9.5
SBINDIR ?= /usr/sbin
DRACUTMODDIR ?= /usr/lib/dracut/modules.d/01vmklive
GITVER := $(shell git rev-parse --short HEAD)
VERSION = 0.22
SHIN += $(shell find -type f -name '*.sh.in')
SCRIPTS += $(SHIN:.sh.in=.sh)
DATECODE=$(shell date "+%Y%m%d")
SHELL=/bin/bash
all:
sed -e "s|@@MKLIVE_VERSION@@|${VERSION}|g" mklive.sh.in > mklive.sh
T_PLATFORMS=rpi{,2,3}{,-musl} beaglebone{,-musl} cubieboard2{,-musl} odroid-c2{,-musl} usbarmory{,-musl} GCP{,-musl}
T_ARCHS=i686 x86_64{,-musl} armv{6,7}l{,-musl} aarch64{,-musl}
install: all
install -d $(DESTDIR)$(SBINDIR)
install -m755 mklive.sh $(DESTDIR)$(SBINDIR)/void-mklive
install -d $(DESTDIR)$(DRACUTMODDIR)
install -m755 dracut/dracut-module.sh \
$(DESTDIR)$(DRACUTMODDIR)/module-setup.sh
install -m755 dracut/dracut-vmklive-adduser.sh \
$(DESTDIR)$(DRACUTMODDIR)/vmklive-adduser.sh
T_SBC_IMGS=rpi{,2,3}{,-musl} beaglebone{,-musl} cubieboard2{,-musl} odroid-c2{,-musl} usbarmory{,-musl}
T_CLOUD_IMGS=GCP{,-musl}
T_PXE_ARCHS=x86_64{,-musl}
T_MASTERDIRS=x86_64{,-musl} i686
ARCHS=$(shell echo $(T_ARCHS))
PLATFORMS=$(shell echo $(T_PLATFORMS))
SBC_IMGS=$(shell echo $(T_SBC_IMGS))
CLOUD_IMGS=$(shell echo $(T_CLOUD_IMGS))
PXE_ARCHS=$(shell echo $(T_PXE_ARCHS))
MASTERDIRS=$(shell echo $(T_MASTERDIRS))
ALL_ROOTFS=$(foreach arch,$(ARCHS),void-$(arch)-ROOTFS-$(DATECODE).tar.xz)
ALL_PLATFORMFS=$(foreach platform,$(PLATFORMS),void-$(platform)-PLATFORMFS-$(DATECODE).tar.xz)
ALL_SBC_IMAGES=$(foreach platform,$(SBC_IMGS),void-$(platform)-$(DATECODE).img.xz)
ALL_CLOUD_IMAGES=$(foreach cloud,$(CLOUD_IMGS),void-$(cloud)-$(DATECODE).tar.gz)
ALL_PXE_ARCHS=$(foreach arch,$(PXE_ARCHS),void-$(arch)-NETBOOT-$(DATECODE).tar.gz)
ALL_MASTERDIRS=$(foreach arch,$(MASTERDIRS), masterdir-$(arch))
SUDO := sudo
XBPS_REPOSITORY := -r https://alpha.de.repo.voidlinux.org/current -r https://alpha.de.repo.voidlinux.org/current/musl -r https://alpha.de.repo.voidlinux.org/current/aarch64
COMPRESSOR_THREADS=2
%.sh: %.sh.in
sed -e "s|@@MKLIVE_VERSION@@|$(VERSION) $(GITVER)|g" $^ > $@
chmod +x $@
all: $(SCRIPTS)
clean:
-rm -f mklive.sh
-rm -f *.sh
dist:
@echo "Building distribution tarball for tag: v$(VERSION) ..."
-@git archive --format=tar --prefix=void-mklive-$(VERSION)/ \
v$(VERSION) | xz -9 > ~/void-mklive-$(VERSION).tar.xz
distdir-$(DATECODE):
mkdir -p distdir-$(DATECODE)
.PHONY: all clean install dist
dist: distdir-$(DATECODE)
mv void*$(DATECODE)* distdir-$(DATECODE)/
rootfs-all: $(ALL_ROOTFS)
rootfs-all-print:
@echo $(ALL_ROOTFS) | sed "s: :\n:g"
void-%-ROOTFS-$(DATECODE).tar.xz: $(SCRIPTS)
$(SUDO) ./mkrootfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) $*
platformfs-all: $(ALL_PLATFORMFS)
platformfs-all-print:
@echo $(ALL_PLATFORMFS) | sed "s: :\n:g"
void-%-PLATFORMFS-$(DATECODE).tar.xz: $(SCRIPTS)
$(SUDO) ./mkplatformfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) $* void-$(shell ./lib.sh platform2arch $*)-ROOTFS-$(DATECODE).tar.xz
images-all: platformfs-all images-all-sbc images-all-cloud
images-all-sbc: $(ALL_SBC_IMAGES)
images-all-sbc-print:
@echo $(ALL_SBC_IMAGES) | sed "s: :\n:g"
images-all-cloud: $(ALL_CLOUD_IMAGES)
images-all-print:
@echo $(ALL_SBC_IMAGES) $(ALL_CLOUD_IMAGES) | sed "s: :\n:g"
void-%-$(DATECODE).img.xz: void-%-PLATFORMFS-$(DATECODE).tar.xz
$(SUDO) ./mkimage.sh -x $(COMPRESSOR_THREADS) void-$*-PLATFORMFS-$(DATECODE).tar.xz
# Some of the images MUST be compressed with gzip rather than xz, this
# rule services those images.
void-%-$(DATECODE).tar.gz: void-%-PLATFORMFS-$(DATECODE).tar.xz
$(SUDO) ./mkimage.sh -x $(COMPRESSOR_THREADS) void-$*-PLATFORMFS-$(DATECODE).tar.xz
pxe-all: $(ALL_PXE_ARCHS)
pxe-all-print:
@echo $(ALL_PXE_ARCHS) | sed "s: :\n:g"
void-%-NETBOOT-$(DATECODE).tar.gz: $(SCRIPTS) void-%-ROOTFS-$(DATECODE).tar.xz
$(SUDO) ./mknet.sh void-$*-ROOTFS-$(DATECODE).tar.xz
masterdir-all-print:
@echo $(ALL_MASTERDIRS) | sed "s: :\n:g"
masterdir-all: $(ALL_MASTERDIRS)
masterdir-%:
$(SUDO) docker build --build-arg REPOSITORY=$(XBPS_REPOSITORY) --build-arg ARCH=$* -t voidlinux/masterdir-$*:$(DATECODE) .
.PHONY: clean dist rootfs-all-print rootfs-all platformfs-all-print platformfs-all pxe-all-print pxe-all masterdir-all-print masterdir-all masterdir-push-all

25
README
View File

@@ -1,25 +0,0 @@
void-mklive - The Void Linux live image maker
This is a simple shell script to build a live image for the
Void linux distribution. The images contain the void-installer package
to be able to install Void linux to storage disks.
Usage: vmklive [options]
Options:
-C file Path to configuration file (defaults to ~/.mklive.conf)
-c (gzip|bzip2|xz) Compression type for the squashfs/initramfs image.
-k version Kernel version to use.
-o outfile Output file name for the ISO image.
-r rootdir Rootfs directory.
-s splash Splash image file for isolinux.
-v volname ISO Volume name.
NOTE: If -k not specified it will use $(uname -r) by default.
NOTE: the first time it is executed a configuration file will be created at ~/mklive.conf.
NOTE: It's assumed that void-mklive is run in a Void Linux system.
Take a look at the configuration file (~/mklive.conf) to tweak some
default parameters in the generated image.
-- Juan RP <xtraeme@gmail.com>

48
README.md Executable file
View File

@@ -0,0 +1,48 @@
## The Void Linux image/live/rootfs maker and installer
This repository contains utilities for Void Linux:
* installer (The Void Linux el-cheapo installer for x86)
* mklive (The Void Linux live image maker for x86)
* mkimage (The Void Linux image maker for ARM platforms)
* mkplatformfs (The Void Linux filesystem tool to produce a rootfs for a particular platform)
* mkrootfs (The Void Linux rootfs maker for ARM platforms)
* mknet (Script to generate netboot tarballs for Void)
#### Build Dependencies
* make
#### Dependencies
* Compression type for the initramfs image
* liblz4 (for lz4, xz) (default)
* xbps>=0.45
* qemu-user-static binaries (for mkrootfs)
#### Usage
Type
$ make
and then see the usage output:
$ ./mklive.sh -h
$ ./mkrootfs.sh -h
$ ./mkimage.sh -h
#### Examples
Build a native live image with runit and keyboard set to 'fr':
# ./mklive.sh -k fr
Build an i686 (on x86\_64) live image with some additional packages:
# ./mklive.sh -a i686 -p 'vim rtorrent'
Build an x86\_64 musl live image with packages stored in a local repository:
# ./mklive.sh -a x86_64-musl -r /path/to/host/binpkgs
See the usage output for more information :-)

28
base-x64.packages Executable file
View File

@@ -0,0 +1,28 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
#USERLAND PACKAGES
exfat-utils
fuse-exfat
wget
NetworkManager
nano
vim
bash-completion
git
xterm
htop
tuxc
topgrade
ntp
void-repo-multilib
ntfs-3g

58
base-x64.sh Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
echo "========================="
echo "| BASE VOID x86_64 |"
echo " ------------------------"
CURRENT=https://mirrors.servercentral.com/voidlinux/current
MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib
NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree
FILENAME="void-live-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
retry=0
# Run mklive command with set architechure, repos and package list
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
((retry++))
if [[ $retry -eq 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' base-x64.packages)" \
-T "${DESKTOP}" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
# Make sure resulting ISO exists and sent error to webpage if not
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
# Add iso file to checksum list
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
# Check if checksum file exists, send error to webpage if not
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
# make sure build directory exists and create it if not
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
# Move the iso file to the build directory
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build

363
build-images.sh Executable file
View File

@@ -0,0 +1,363 @@
#!/bin/bash
clear
HTMLDIR="/var/www/voidbuilds.xyz/public"
FILENAME="status.html"
ISODIR="download"
mvImages(){
# move image files to final destination
PKGLISTDIR="package_lists"
if [ ! -f sha256sums.txt ];then
echo "checksum file not found, aborting!"
exit 1
fi
if [ -d "${HTMLDIR}" ];then
rm ${HTMLDIR}/${ISODIR}/*.iso
rm ${HTMLDIR}/${ISODIR}/*.txt
rm ${HTMLDIR}/${ISODIR}/*.sig
mv sha256sums.txt build
mv sha256sums.txt.sig build
mv build/* ${HTMLDIR}/${ISODIR}
else
echo "${HTMLDIR}/${ISODIR} does not exist"
fi
if [ ! -d "${PKGLISTDIR}" ];then
mkdir "${PKGLISTDIR}"
fi
rm ${PKGLISTDIR}/*
cp base-x64.packages ${PKGLISTDIR}/base-x64.packages.txt
cp cinnamon-x64.packages ${PKGLISTDIR}/cinnamon-x64.packages.txt
cp e17-x64.packages ${PKGLISTDIR}/e17-x64.packages.txt
cp mate-x64.packages ${PKGLISTDIR}/mate-x64.packages.txt
# cp lxde-x64.packages ${PKGLISTDIR}/lxde-x64.packages.txt
cp lxqt-x64.packages ${PKGLISTDIR}/lxqt-x64.packages.txt
cp i3-x64.packages ${PKGLISTDIR}/i3-x64.packages.txt
cp kde-x64.packages ${PKGLISTDIR}/kde-x64.packages.txt
#cp gnome-x64.packages ${PKGLISTDIR}/gnome-x64.packages.txt
cp xfce-x64.packages ${PKGLISTDIR}/xfce-x64.packages.txt
cp -r ${PKGLISTDIR} ${HTMLDIR}
return
}
runBuilds(){
TOTAL="9"
ERR_FILE="error-status.txt"
if [ -f "${ERR_FILE}" ];then
echo "removing error file"
rm ${ERR_FILE}
fi
if [ ! -z "$(ls -A build)" ];then
rm build/*
fi
#echo "0/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
echo "Building Image: Base</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Base Image..."
sleep 1
./base-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'base', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "1/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: Cinnamon</br>" >> ${HTMLDIR}/${FILENAME}
echo " Building: Cinnamon Image..."
sleep 1
./cinnamon-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'Cinnamon', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "2/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: i3</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: i3 image..."
sleep 1
./i3-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'i3', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "3/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: Enlightenment</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: enlightenment image..."
sleep 1
./e17-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'i3', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "4/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: KDE</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Kde image..."
sleep 1
./kde-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'KDE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "5/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
#echo "Building Image: LXDE</br>" >> ${HTMLDIR}/${FILENAME}
#echo "Building: Lxde Image..."
#sleep 1
#./lxde-x64.sh
#if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
# echo "<b style="color:red">Build failed for image: 'LXDE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
# rm ${ERR_FILE}
# ${0} -bl
#else
# echo "6/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
#fi
echo "Building Image: LXQT</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Lxqt Image..."
sleep 1
./lxqt-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'LXQT', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "6/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: MATE</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Mate Image..."
sleep 1
./mate-x64.sh
if [ "$(cat ${ERR_FILE})" = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'MATE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "7/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: XFCE</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Xfce Image..."
sleep 1
./xfce-x64.sh
if [ "$(cat ${ERR_FILE})" = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'XFCE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "8/${TOTAL} completed at $(date +%T) </br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: DWM</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: DWM Image..."
sleep 1
./dwm-x64.sh
if [ "$(cat ${ERR_FILE})" = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'MATE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "9/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
if [ ! -f sha256sums.txt ];then
echo "sha manifest does not exist!"
else
echo "Signing checksum file</br>" >> ${HTMLDIR}/${FILENAME}
./sign-file.sh -f sha256sums.txt
mvImages
fi
echo "Done!"
return
}
genSpecs(){
HTMLDIR="/var/www/voidbuilds.xyz/public"
FILENAME="specs.html"
echo "<DOCTYPE! html>" > ${HTMLDIR}/${FILENAME}
echo "<html>" >> ${HTMLDIR}/${FILENAME}
echo "<head>" >> ${HTMLDIR}/${FILENAME}
echo "<style>" >> ${HTMLDIR}/${FILENAME}
echo "body {" >> ${HTMLDIR}/${FILENAME}
echo "color: black;" ${HTMLDIR}/${FILENAME}
echo "}" >> ${HTMLDIR}/${FILENAME}
echo "h1 {" ${HTMLDIR}/${FILENAME}
echo "color: #000000;" >> ${HTMLDIR}/${FILENAME}
echo "</style>" >> ${HTMLDIR}/${FILENAME}
echo "</head>" >> ${HTMLDIR}/${FILENAME}
echo '<body text=white style="background-color: black">' >> ${HTMLDIR}/${FILENAME}
echo '<H4 style="color:lightgreen">System Specs</H4>' >> ${HTMLDIR}/${FILENAME}
echo "CPU Cores: 1</br>" >> ${HTMLDIR}/${FILENAME}
echo "Disk Size: $(df -h| tr -s ' ' $'\t' | grep vda1 | cut -f2)</br>" >> ${HTMLDIR}/${FILENAME}
echo "Disk Space Used: $(df | tr -s ' ' $'\t' | grep vda1 | cut -f5)</br>" >> ${HTMLDIR}/${FILENAME}
echo "Memory Size: $(free -m| tr -s ' ' $'\t' | grep Mem: | cut -f2) Mb</br>" >> ${HTMLDIR}/${FILENAME}
echo "Memory Free: $(free -m| tr -s ' ' $'\t' | grep Mem: | cut -f4) Mb</br>" >> ${HTMLDIR}/${FILENAME}
echo "Swap Size: $(free -m| tr -s ' ' $'\t' | grep Swap: | cut -f2) Mb</br>" >> ${HTMLDIR}/${FILENAME}
echo "Swap Used: $(free -m| tr -s ' ' $'\t' | grep Swap: | cut -f3) Mb</br></br>" >> ${HTMLDIR}/${FILENAME}
echo "<H4 style="color:lightgreen">Live Image Specs</H4>" >> ${HTMLDIR}/${FILENAME}
echo "<h5>System</h5>"
echo "Kernel Version: $(xbps-query -R linux| grep pkgver | sed 's/pkgver://') series</br>" >> ${HTMLDIR}/${FILENAME}
echo "GlibC Version: $(xbps-query -R glibc| grep pkgver | sed 's/pkgver://')</br></br>" >> ${HTMLDIR}/${FILENAME}
echo "AMDGPU Version: $(xbps-query -R xf86-video-amdgpu| grep pkgver | sed 's/pkgver://')</br></br>" >> ${HTMLDIR}/${FILENAME}
echo "</html>" >> ${HTMLDIR}/${FILENAME}
}
genHtml(){
FILENAME="status.html"
echo "<DOCTYPE! html>" > ${HTMLDIR}/${FILENAME}
echo "<html>" >> ${HTMLDIR}/${FILENAME}
echo "<head>" >> ${HTMLDIR}/${FILENAME}
echo '<script type="text/javascript">' >> ${HTMLDIR}/${FILENAME}
echo 'function timedRefresh(timeoutPeriod) {' >> ${HTMLDIR}/${FILENAME}
echo 'setTimeout("location.reload(true);",timeoutPeriod);' >> ${HTMLDIR}/${FILENAME}
echo '}' >> ${HTMLDIR}/${FILENAME}
echo 'window.onload = timedRefresh(60000);' >> ${HTMLDIR}/${FILENAME}
echo "</script>" >> ${HTMLDIR}/${FILENAME}
echo "<style>" >> ${HTMLDIR}/${FILENAME}
echo "body {" >> ${HTMLDIR}/${FILENAME}
echo "color: black;" ${HTMLDIR}/${FILENAME}
echo "}" >> ${HTMLDIR}/${FILENAME}
echo "h1 {" ${HTMLDIR}/${FILENAME}
echo "color: #FFFFFF;" >> ${HTMLDIR}/${FILENAME}
echo "}" >> ${HTMLDIR}/${FILENAME}
echo "</style>" >> ${HTMLDIR}/${FILENAME}
echo "</head>" >> ${HTMLDIR}/${FILENAME}
echo '<body text=white style="background-color: black">' >> ${HTMLDIR}/${FILENAME}
echo "<H5>This page will refresh every 60 seconds</H5></br>" >> ${HTMLDIR}/${FILENAME}
echo "<H4 style="color:cyan">Build process initiated at:</H4> $(date +%R) MST ($(date -u +%R) UTC) on $(date +%D)" >> ${HTMLDIR}/${FILENAME}
echo "<H4 style="color:cyan">ETA: 2 hours from initiation time</H4></br>" >> ${HTMLDIR}/${FILENAME}
echo "<hr>" >> ${HTMLDIR}/${FILENAME}
#cat ${HTMLDIR}/${FILENAME}
echo "<H3 style="color:orange">Status</H3>" >> ${HTMLDIR}/${FILENAME}
runBuilds
echo "Disk Space Used: $(df | tr -s ' ' $'\t' | grep vda1 | cut -f5)</br>" >> ${HTMLDIR}/${FILENAME}
echo "All images were completed at $(date +%R) MST ($(date -u +%R) UTC)</br>" >> ${HTMLDIR}/${FILENAME}
echo "Next build round in 24 hours</b>" >> ${HTMLDIR}/${FILENAME}
echo '<a href="https://voidbuilds.xyz/landing.html">Return to landing page</a>' >> ${HTMLDIR}/${FILENAME}
echo "</body>" >> ${HTMLDIR}/${FILENAME}
echo "</html>" >> ${HTMLDIR}/${FILENAME}
return
}
cleanUp(){
# Clean: mklive xbps cache, build dir| Remove: old kernels, orphan packages
BUILDDIR="build"
echo "[Cleaning up...]"
echo "Checking for local XBPS cache dir..."
if [ -d xbps-cachedir-x86_64 ];then
echo "Removing local XBPS cache dir"
rm -r xbps-cachedir-x86_64/
fi
echo "Removing orphans..."
xbps-remove -yo
echo "Clearing system XBPS cache files..."
tux c
echo "Checking for unused image files..."
if [ "$(ls -A $BUILDDIR)" ];then
echo "Removing unused image files.."
rm build/*
fi
echo "Checking for and removing unused kernels..."
vkpurge rm all
}
case ${1} in
-bl|--build-later)
while true;do
snooze -v && cleanUp && genSpecs && genHtml && cleanUp && genSpecs
done
;;
-bn|--build-now)
while true;do
cleanUp && genSpecs && genHtml && cleanUp && genSpecs && snooze -v
done
;;
-c|-clean)
cleanUp
;;
*)
echo -e """\nusage: ${0} [-bn, -bl]\n
echo -e \n-bn run builds now, snooze after\n
echo -e -bl snooze now, run builds after\n"""
echo
;;
esac

346
build-images.sh.bak Executable file
View File

@@ -0,0 +1,346 @@
#!/bin/bash
HTMLDIR="/var/www/voidbuilds.xyz/public"
FILENAME="status.html"
ISODIR="download"
echo "checking for updates"
xbps-install -Syu && xbps-install -yu
mvImages(){
PKGLISTDIR="package_lists"
if [ ! -f sha256sums.txt ];then
echo "checksum file not found, aborting!"
exit 1
fi
if [ -d "${HTMLDIR}" ];then
rm ${HTMLDIR}/${ISODIR}/*.iso
rm ${HTMLDIR}/${ISODIR}/*.txt
rm ${HTMLDIR}/${ISODIR}/*.sig
mv sha256sums.txt build
mv sha256sums.txt.sig build
mv build/* ${HTMLDIR}/${ISODIR}
else
echo "${HTMLDIR}/${ISODIR} does not exist"
fi
if [ ! -d "${PKGLISTDIR}" ];then
mkdir "${PKGLISTDIR}"
fi
rm ${PKGLISTDIR}/*
cp base-x64.packages ${PKGLISTDIR}/base-x64.packages.txt
cp cinnamon-x64.packages ${PKGLISTDIR}/cinnamon-x64.packages.txt
cp e17-x64.packages ${PKGLISTDIR}/e17-x64.packages.txt
cp mate-x64.packages ${PKGLISTDIR}/mate-x64.packages.txt
cp lxde-x64.packages ${PKGLISTDIR}/lxde-x64.packages.txt
cp lxqt-x64.packages ${PKGLISTDIR}/lxqt-x64.packages.txt
cp i3-x64.packages ${PKGLISTDIR}/i3-x64.packages.txt
#cp kde-x64.packages ${PKGLISTDIR}/kde-x64.packages.txt
#cp gnome-x64.packages ${PKGLISTDIR}/gnome-x64.packages.txt
cp xfce-x64.packages ${PKGLISTDIR}/xfce-x64.packages.txt
cp -r ${PKGLISTDIR} ${HTMLDIR}
return
}
runBuilds(){
TOTAL="8"
ERR_FILE="error-status.txt"
if [ -f "${ERR_FILE}" ];then
echo "removing error file"
rm ${ERR_FILE}
fi
if [ ! -z "$(ls -A build)" ];then
rm build/*
fi
echo "0/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
echo "Building Image: Base</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Base Image..."
sleep 1
./base-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'base', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "1/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: Cinnamon</br>" >> ${HTMLDIR}/${FILENAME}
echo " Building: Cinnamon Image..."
sleep 1
./cinnamon-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'Cinnamon', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "2/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
#echo "Building Image: GNOME</br>" >> ${HTMLDIR}/${FILENAME}
#echo " Building: Gnome Image..."
#sleep 1
#./gnome-x64.sh
echo "Building Image: i3</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: i3 image..."
sleep 1
./i3-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'i3', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "3/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: Enlightenment</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: enlightenment image..."
sleep 1
./e17-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'i3', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "4/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: KDE</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Kde image..."
sleep 1
./kde-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'KDE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "5/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: LXDE</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Lxde Image..."
sleep 1
./lxde-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'LXDE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "6/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: LXQT</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Lxqt Image..."
sleep 1
./lxqt-x64.sh
if [ $(cat ${ERR_FILE}) = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'LXQT', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "7/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: MATE</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Mate Image..."
sleep 1
./mate-x64.sh
if [ "$(cat ${ERR_FILE})" = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'MATE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "8/${TOTAL} completed at $(date +%T)</br></br>" >> ${HTMLDIR}/${FILENAME}
fi
echo "Building Image: XFCE</br>" >> ${HTMLDIR}/${FILENAME}
echo "Building: Xfce Image..."
sleep 1
./xfce-x64.sh
if [ "$(cat ${ERR_FILE})" = "ERR=1" ];then
echo "<b style="color:red">Build failed for image: 'XFCE', trying again at 00:00 MST</b></br>" >> ${HTMLDIR}/${FILENAME}
rm ${ERR_FILE}
${0} -bl
else
echo "9/${TOTAL} completed at $(date +%T) </br></br>" >> ${HTMLDIR}/${FILENAME}
fi
if [ ! -f sha256sums.txt ];then
echo "sha manifest does not exist!"
else
echo "Signing checksum file</br>" >> ${HTMLDIR}/${FILENAME}
./sign-file.sh -f sha256sums.txt
mvImages
fi
echo "Done!"
return
}
genSpecs(){
HTMLDIR="/var/www/voidbuilds.xyz/public"
FILENAME="specs.html"
echo "<DOCTYPE! html>" > ${HTMLDIR}/${FILENAME}
echo "<html>" >> ${HTMLDIR}/${FILENAME}
echo "<head>" >> ${HTMLDIR}/${FILENAME}
echo "<style>" >> ${HTMLDIR}/${FILENAME}
echo "body {" >> ${HTMLDIR}/${FILENAME}
echo "color: black;" ${HTMLDIR}/${FILENAME}
echo "}" >> ${HTMLDIR}/${FILENAME}
echo "h1 {" ${HTMLDIR}/${FILENAME}
echo "color: #000000;" >> ${HTMLDIR}/${FILENAME}
echo "</style>" >> ${HTMLDIR}/${FILENAME}
echo "</head>" >> ${HTMLDIR}/${FILENAME}
echo '<body text=white style="background-color: black">' >> ${HTMLDIR}/${FILENAME}
echo '<H4 style="color:lightgreen">System Specs</H4>' >> ${HTMLDIR}/${FILENAME}
echo "CPU Cores: 1</br>" >> ${HTMLDIR}/${FILENAME}
echo "Disk Size: $(df -h| tr -s ' ' $'\t' | grep vda1 | cut -f2)</br>" >> ${HTMLDIR}/${FILENAME}
echo "Disk Space Used: $(df | tr -s ' ' $'\t' | grep vda1 | cut -f5)</br>" >> ${HTMLDIR}/${FILENAME}
echo "Memory Size: $(free -m| tr -s ' ' $'\t' | grep Mem: | cut -f2) Mb</br>" >> ${HTMLDIR}/${FILENAME}
echo "Memory Free: $(free -m| tr -s ' ' $'\t' | grep Mem: | cut -f4) Mb</br>" >> ${HTMLDIR}/${FILENAME}
echo "Swap Size: $(free -m| tr -s ' ' $'\t' | grep Swap: | cut -f2) Mb</br>" >> ${HTMLDIR}/${FILENAME}
echo "Swap Used: $(free -m| tr -s ' ' $'\t' | grep Swap: | cut -f3) Mb</br></br>" >> ${HTMLDIR}/${FILENAME}
echo "<H4 style="color:lightgreen">Live Image Specs</H4>" >> ${HTMLDIR}/${FILENAME}
echo "<h5>System</h5>"
echo "Kernel Version: $(xbps-query -R linux| grep pkgver | sed 's/pkgver://') series</br>" >> ${HTMLDIR}/${FILENAME}
echo "GlibC Version: $(xbps-query -R glibc| grep pkgver | sed 's/pkgver://')</br></br>" >> ${HTMLDIR}/${FILENAME}
echo "AMDGPU Version: $(xbps-query -R xf86-video-amdgpu| grep pkgver | sed 's/pkgver://')</br></br>" >> ${HTMLDIR}/${FILENAME}
echo "</html>" >> ${HTMLDIR}/${FILENAME}
}
genHtml(){
FILENAME="status.html"
echo "<DOCTYPE! html>" > ${HTMLDIR}/${FILENAME}
echo "<html>" >> ${HTMLDIR}/${FILENAME}
echo "<head>" >> ${HTMLDIR}/${FILENAME}
echo '<script type="text/javascript">' >> ${HTMLDIR}/${FILENAME}
echo 'function timedRefresh(timeoutPeriod) {' >> ${HTMLDIR}/${FILENAME}
echo 'setTimeout("location.reload(true);",timeoutPeriod);' >> ${HTMLDIR}/${FILENAME}
echo '}' >> ${HTMLDIR}/${FILENAME}
echo 'window.onload = timedRefresh(10000);' >> ${HTMLDIR}/${FILENAME}
echo "</script>" >> ${HTMLDIR}/${FILENAME}
echo "<style>" >> ${HTMLDIR}/${FILENAME}
echo "body {" >> ${HTMLDIR}/${FILENAME}
echo "color: black;" ${HTMLDIR}/${FILENAME}
echo "}" >> ${HTMLDIR}/${FILENAME}
echo "h1 {" ${HTMLDIR}/${FILENAME}
echo "color: #FFFFFF;" >> ${HTMLDIR}/${FILENAME}
echo "}" >> ${HTMLDIR}/${FILENAME}
echo "</style>" >> ${HTMLDIR}/${FILENAME}
echo "</head>" >> ${HTMLDIR}/${FILENAME}
echo '<body text=white style="background-color: black">' >> ${HTMLDIR}/${FILENAME}
echo "<H5>This page will refresh every 10 seconds</H5></br>" >> ${HTMLDIR}/${FILENAME}
echo "<H4 style="color:cyan">Build process initiated at:</H4> $(date +%R) MST ($(date -u +%R) UTC) on $(date +%D)" >> ${HTMLDIR}/${FILENAME}
echo "<H4 style="color:cyan">ETA: 2 hours from initiation time</H4></br>" >> ${HTMLDIR}/${FILENAME}
echo "<hr>" >> ${HTMLDIR}/${FILENAME}
#cat ${HTMLDIR}/${FILENAME}
echo "<H3 style="color:orange">Status</H3>" >> ${HTMLDIR}/${FILENAME}
runBuilds
echo "Disk Space Used: $(df | tr -s ' ' $'\t' | grep vda1 | cut -f5)</br>" >> ${HTMLDIR}/${FILENAME}
echo "All images were completed at $(date +%R) MST ($(date -u +%R) UTC)</br>" >> ${HTMLDIR}/${FILENAME}
echo "Next build round in 24 hours</b>" >> ${HTMLDIR}/${FILENAME}
echo '<a href="https://voidbuilds.xyz/landing.html">Return to landing page</a>' >> ${HTMLDIR}/${FILENAME}
echo "</body>" >> ${HTMLDIR}/${FILENAME}
echo "</html>" >> ${HTMLDIR}/${FILENAME}
return
}
cleanUp(){
if [ $(df | tr -s ' ' $'\t' | grep vda1 | cut -f5) > "42%" ];then
BUILDDIR="build"
echo "[Cleaning up...]"
echo "Checking for local XBPS cache dir..."
if [ -d xbps-cachedir-x86_64 ];then
echo "Removing local XBPS cache dir"
rm -r xbps-cachedir-x86_64/
fi
echo "Removing orphans..."
xbps-remove -yo
echo "Clearing system XBPS cache files..."
tux c
echo "Checking for unused image files..."
if [ "$(ls -A $BUILDDIR)" ];then
echo "Removing unused image files.."
rm build/*
fi
echo "Checking for and removing unused kernels..."
vkpurge rm all
else
return 0
fi
}
case ${1} in
-bl|--build-later)
while true;do
snooze -v && cleanUp && genSpecs && genHtml && cleanUp && genSpecs
done
;;
-bn|--build-now)
while true;do
cleanUp && genSpecs && genHtml && cleanUp && genSpecs && snooze -v
done
;;
*)
echo -e "\nusage: ${0} [-bn, -bl]\n"
echo -e "\n-bn run builds now, snooze after\n"
echo -e "-bl snooze now, run builds after\n\n"
;;
esac

90
build-x86-images.sh.in Executable file
View File

@@ -0,0 +1,90 @@
#!/bin/sh
ARCH=
IMAGE=
while getopts "a:b:hr:" opt; do
case $opt in
a) ARCH="$OPTARG";;
b) IMAGE="$OPTARG";;
h) echo "${0#/*}: [-a arch] [-b base|e|xfce|mate|cinnamon|gnome|kde|lxde|lxqt] [-r repo]" >&2; exit 1;;
r) REPO="-r $OPTARG $REPO";;
esac
done
shift $((OPTIND - 1))
: ${ARCH:=$(uname -m)}
readonly DATE=$(date +%Y%m%d)
readonly BASE_IMG=void-live-${ARCH}-${DATE}.iso
readonly E_IMG=void-live-${ARCH}-${DATE}-enlightenment.iso
readonly XFCE_IMG=void-live-${ARCH}-${DATE}-xfce.iso
readonly MATE_IMG=void-live-${ARCH}-${DATE}-mate.iso
readonly CINNAMON_IMG=void-live-${ARCH}-${DATE}-cinnamon.iso
readonly GNOME_IMG=void-live-${ARCH}-${DATE}-gnome.iso
readonly KDE_IMG=void-live-${ARCH}-${DATE}-kde.iso
readonly LXDE_IMG=void-live-${ARCH}-${DATE}-lxde.iso
readonly LXQT_IMG=void-live-${ARCH}-${DATE}-lxqt.iso
readonly GRUB="grub-i386-efi grub-x86_64-efi"
readonly BASE_PKGS="dialog cryptsetup lvm2 mdadm $GRUB"
readonly X_PKGS="$BASE_PKGS xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf alsa-plugins-pulseaudio"
readonly E_PKGS="$X_PKGS lxdm enlightenment terminology econnman udisks2 firefox-esr"
readonly XFCE_PKGS="$X_PKGS lxdm xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
readonly MATE_PKGS="$X_PKGS lxdm mate mate-extra gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
readonly CINNAMON_PKGS="$X_PKGS lxdm cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
readonly GNOME_PKGS="$X_PKGS gnome gnome-terminal firefox-esr"
readonly KDE_PKGS="$X_PKGS kde5 konsole firefox dolphin"
readonly LXDE_PKGS="$X_PKGS lxdm lxde gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
readonly LXQT_PKGS="$X_PKGS lxdm lxqt gvfs-afc gvfs-mtp gvfs-smb udisks2 qupzilla"
[ ! -x mklive.sh ] && exit 0
if [ -z "$IMAGE" -o "$IMAGE" = base ]; then
if [ ! -e $BASE_IMG ]; then
./mklive.sh -a $ARCH -o $BASE_IMG -p "$BASE_PKGS" ${REPO} $@
fi
fi
if [ -z "$IMAGE" -o "$IMAGE" = e ]; then
if [ ! -e $E_IMG ]; then
./mklive.sh -a $ARCH -o $E_IMG -p "$E_PKGS" ${REPO} $@
fi
fi
if [ -z "$IMAGE" -o "$IMAGE" = xfce ]; then
if [ ! -e $XFCE_IMG ]; then
./mklive.sh -a $ARCH -o $XFCE_IMG -p "$XFCE_PKGS" ${REPO} $@
fi
fi
if [ -z "$IMAGE" -o "$IMAGE" = mate ]; then
if [ ! -e $MATE_IMG ]; then
./mklive.sh -a $ARCH -o $MATE_IMG -p "$MATE_PKGS" ${REPO} $@
fi
fi
if [ -z "$IMAGE" -o "$IMAGE" = cinnamon ]; then
if [ ! -e $CINNAMON_IMG ]; then
./mklive.sh -a $ARCH -o $CINNAMON_IMG -p "$CINNAMON_PKGS" ${REPO} $@
fi
fi
if [ -z "$IMAGE" -o "$IMAGE" = gnome ]; then
if [ ! -e $GNOME_IMG ]; then
./mklive.sh -a $ARCH -o $GNOME_IMG -p "$GNOME_PKGS" ${REPO} $@
fi
fi
if [ -z "$IMAGE" -o "$IMAGE" = lxde ]; then
if [ ! -e $LXDE_IMG ]; then
./mklive.sh -a $ARCH -o $LXDE_IMG -p "$LXDE_PKGS" ${REPO} $@
fi
fi
if [ -z "$IMAGE" -o "$IMAGE" = lxqt ]; then
if [ ! -e $LXQT_IMG ]; then
./mklive.sh -a $ARCH -o $LXQT_IMG -p "$LXQT_PKGS" ${REPO} $@
fi
fi
if [ "$IMAGE" = kde ]; then
if [ ! -e $KDE_IMG ]; then
./mklive.sh -a $ARCH -o $KDE_IMG -p "$KDE_PKGS" ${REPO} $@
fi
fi

77
cinnamon-x64.packages Executable file
View File

@@ -0,0 +1,77 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
#intel-ucode
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
gettext
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
wget
lxdm
nano
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
git
vim
dtrx
unzip
p7zip
#unrar
bash-completion
cinnamon
xrandr
colord
gnome-terminal
alsa-utils
pavucontrol
xterm
htop
tuxc
topgrade
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
adwaita-icon-theme

59
cinnamon-x64.sh Executable file
View File

@@ -0,0 +1,59 @@
#!/bin/bash
DESKTOP="cinnamon"
echo "========================="
echo "| ${DESKTOP} VOID x86_64 |"
echo " ------------------------"
CURRENT=https://mirrors.servercentral.com/voidlinux/current
MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib
NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
retry=0
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
((retry++))
if [[ $retry -gt 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build

25
data/issue Executable file
View File

@@ -0,0 +1,25 @@
###############################################################################
Welcome to the Void Linux Live system. Two users are available to log in:
- root:voidlinux
- anon:voidlinux
The `anon` user additionally has `sudo(8)` permissions to run any command
without a password.
To start the installation please type:
# void-installer
and follow the on-screen instructions. To install additional software make
sure to configure your network interface and then use:
- xbps-install(1) to install/update packages
- xbps-query(1) to query for package info
Thanks for using Void Linux.
https://www.voidlinux.org
###############################################################################

BIN
data/splash.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

10
data/void-vpkgs.conf Executable file
View File

@@ -0,0 +1,10 @@
# Default void configuration
#
virtualpkg=awk:gawk
virtualpkg=cron-daemon:dcron
virtualpkg=editor:nvi
virtualpkg=man:openbsd-man
virtualpkg=ntp-daemon:openntpd
virtualpkg=openssl:libressl-openssl
virtualpkg=shell:dash
virtualpkg=smtp-server:opensmtpd

View File

@@ -0,0 +1,76 @@
#!/bin/sh
# Void Linux Automatic Install Configuration
# ===
# Disk Configuration
# ===
# disk: the disk to install to
# default: the first disk that isn't the installer
#disk=/dev/hda
# bootpartitionsize: controls how large the boot partition will be
# default: 500M
#bootpartitionsize=500M
# swapsize: how large should the swap partition be
# default: equal to the installed physical memory
#swapsize=
# ===
# XBPS Configuration
# ===
# xbpsrepository: which repo should the install pull from
# default: http://alpha.de.repo.voidlinux.org/current
#xbpsrepository="http://alpha.de.repo.voidlinux.org/current"
# pkgs: additional packages to install into the target
# default: none
#pkgs=""
# ===
# Default User
# ===
# username: the username of the user to be created
# default: voidlinux
#username=""
# password: password to set for the new user
# default: unset (will prompt during install)
# Warning: This does not work in musl!
#password=""
# ===
# Misc. Options
# ===
# timezone: Timezone in TZ format
# default: America/Chicago
#timezone="America/Chicago"
# keymap: Keymap to use by default
# default: us
#keymap="us"
# locale: initial glibc locale
# default: en_US.UTF-8
#libclocale=en.US.UTF-8
# hostname: static hostname for the system
# default: derived from DNS
#hostname=VoidLinux
# end_action: what to do at the end of the install
# default: shutdown
# alternate values: reboot, script, func
#end_action=shutdown
# end_script: script to optionally run at end of install
# the user script must reside somewhere xbps-uhelper fetch
# can retrieve it from
# default: not set
#end_script=""
# end_function: a function to optionally be run at
# the end of the install.
#end_function() {
#
#}

293
dracut/autoinstaller/install.sh Executable file
View File

@@ -0,0 +1,293 @@
#!/bin/sh
set -e
# These functions pulled from void's excellent mklive.sh
VAI_info_msg() {
printf "\033[1m%s\n\033[m" "$@"
}
VAI_print_step() {
CURRENT_STEP=$((CURRENT_STEP+1))
VAI_info_msg "[${CURRENT_STEP}/${STEP_COUNT}] $*"
}
# ----------------------- Install Functions ------------------------
VAI_welcome() {
clear
printf "=============================================================\n"
printf "================ Void Linux Auto-Installer ==================\n"
printf "=============================================================\n"
}
VAI_get_address() {
# Enable the hook for resolv.conf
mkdir -p /usr/lib/dhcpcd/dhcpcd-hooks
ln -sf /usr/libexec/dhcpcd-hooks/20-resolv.conf /usr/lib/dhcpcd/dhcpcd-hooks/
# Get an IP address
dhcpcd -w -L --timeout 0
}
VAI_partition_disk() {
# Paritition Disk
sfdisk "${disk}" <<EOF
,$bootpartitionsize
,${swapsize}K
;
EOF
}
VAI_format_disk() {
# Make Filesystems
mkfs.ext4 -F "${disk}1"
mkfs.ext4 -F "${disk}3"
if [ "${swapsize}" -ne 0 ] ; then
mkswap -f "${disk}2"
fi
}
VAI_mount_target() {
# Mount targetfs
mkdir -p "${target}"
mount "${disk}3" "${target}"
mkdir "${target}/boot"
mount "${disk}1" "${target}/boot"
}
VAI_install_xbps_keys() {
mkdir -p "${target}/var/db/xbps/keys"
cp /var/db/xbps/keys/* "${target}/var/db/xbps/keys"
}
VAI_install_base_system() {
# Install a base system
XBPS_ARCH="${XBPS_ARCH}" xbps-install -Sy -R "${xbpsrepository}" -r /mnt base-system grub
# Install additional packages
if [ -n "${pkgs}" ] ; then
XBPS_ARCH="${XBPS_ARCH}" xbps-install -Sy -R "${xbpsrepository}" -r /mnt "${pkgs}"
fi
}
VAI_prepare_chroot() {
# Mount dev, bind, proc, etc into chroot
mount -t proc proc "${target}/proc"
mount -t sysfs sys "${target}/sys"
mount -o rbind /dev "${target}/dev"
}
VAI_configure_sudo() {
# Give wheel sudo
echo "%wheel ALL=(ALL) ALL" > "${target}/etc/sudoers.d/wheel"
}
VAI_correct_root_permissions() {
chroot "${target}" chown root:root /
chroot "${target}" chmod 755 /
}
VAI_configure_hostname() {
# Set the hostname
echo "${hostname}" > "${target}/etc/hostname"
}
VAI_configure_rc_conf() {
# Set the value of various tokens
sed -i "s:Europe/Madrid:${timezone}:" "${target}/etc/rc.conf"
sed -i "s:\"es\":\"${keymap}\":" "${target}/etc/rc.conf"
# Activate various tokens
sed -i "s:#HARDWARECLOCK:HARDWARECLOCK:" "${target}/etc/rc.conf"
sed -i "s:#TIMEZONE:TIMEZONE:" "${target}/etc/rc.conf"
sed -i "s:#KEYMAP:KEYMAP:" "${target}/etc/rc.conf"
}
VAI_add_user() {
chroot "${target}" useradd -m -s /bin/bash -U -G wheel,users,audio,video,cdrom,input "${username}"
if [ -z "${password}" ] ; then
chroot "${target}" passwd "${username}"
else
# For reasons that remain unclear, this does not work in musl
echo "${username}:${password}" | chpasswd -c SHA512 -R "${target}"
fi
}
VAI_configure_grub() {
# Set hostonly
echo "hostonly=yes" > "${target}/etc/dracut.conf.d/hostonly.conf"
# Choose the newest kernel
kernel_version="$(chroot "${target}" xbps-query linux | awk -F "[-_]" '/pkgver/ {print $2}')"
# Install grub
chroot "${target}" grub-install "${disk}"
chroot "${target}" xbps-reconfigure -f "linux${kernel_version}"
# Correct the grub install
chroot "${target}" update-grub
}
VAI_configure_fstab() {
# Grab UUIDs
uuid1="$(blkid -s UUID -o value "${disk}1")"
uuid2="$(blkid -s UUID -o value "${disk}2")"
uuid3="$(blkid -s UUID -o value "${disk}3")"
# Installl UUIDs into /etc/fstab
echo "UUID=$uuid3 / ext4 defaults,errors=remount-ro 0 1" >> "${target}/etc/fstab"
echo "UUID=$uuid1 /boot ext4 defaults 0 2" >> "${target}/etc/fstab"
if [ "${swapsize}" -ne 0 ] ; then
echo "UUID=$uuid2 swap swap defaults 0 0" >> "${target}/etc/fstab"
fi
}
VAI_configure_locale() {
# Set the libc-locale iff glibc
case "${XBPS_ARCH}" in
*-musl)
VAI_info_msg "Glibc locales are not supported on musl"
;;
*)
sed -i "/${libclocale}/s/#//" "${target}/etc/default/libc-locales"
chroot "${target}" xbps-reconfigure -f glibc-locales
;;
esac
}
VAI_end_action() {
case $end_action in
reboot)
VAI_info_msg "Rebooting the system"
sync
umount -R "${target}"
reboot -f
;;
shutdown)
VAI_info_msg "Shutting down the system"
sync
umount -R "${target}"
poweroff -f
;;
script)
VAI_info_msg "Running user provided script"
xbps-uhelper fetch "${end_script}>/script"
chmod +x /script
target=${target} xbpsrepository=${xbpsrepository} /script
;;
func)
VAI_info_msg "Running user provided function"
end_function
;;
esac
}
VAI_configure_autoinstall() {
# -------------------------- Setup defaults ---------------------------
bootpartitionsize="500M"
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}}}')"
hostname="$(ip -4 -o -r a | awk -F'[ ./]' '{x=$7} END {print x}')"
swapsize="$(awk -F"\n" '/MemTotal/ {split($0, b, " "); print b[2] }' /proc/meminfo)";
target="/mnt"
timezone="America/Chicago"
keymap="us"
libclocale="en_US.UTF-8"
username="voidlinux"
end_action="shutdown"
end_script="/bin/true"
XBPS_ARCH="$(xbps-uhelper arch)"
case $XBPS_ARCH in
*-musl)
xbpsrepository="https://alpha.de.repo.voidlinux.org/current/musl"
;;
*)
xbpsrepository="https://alpha.de.repo.voidlinux.org/current"
;;
esac
# --------------- Pull config URL out of kernel cmdline -------------------------
if getargbool 0 autourl ; then
xbps-uhelper fetch "$(getarg autourl)>/etc/autoinstall.cfg"
else
mv /etc/autoinstall.default /etc/autoinstall.cfg
fi
# Read in the resulting config file which we got via some method
if [ -f /etc/autoinstall.cfg ] ; then
VAI_info_msg "Reading configuration file"
. ./etc/autoinstall.cfg
fi
# Bail out if we didn't get a usable disk
if [ -z "$disk" ] ; then
die "No valid disk!"
fi
}
VAI_main() {
CURRENT_STEP=0
STEP_COUNT=16
VAI_welcome
VAI_print_step "Bring up the network"
VAI_get_address
VAI_print_step "Configuring installer"
VAI_configure_autoinstall
VAI_print_step "Configuring disk using scheme 'Atomic'"
VAI_partition_disk
VAI_format_disk
VAI_print_step "Mounting the target filesystems"
VAI_mount_target
VAI_print_step "Installing XBPS keys"
VAI_install_xbps_keys
VAI_print_step "Installing the base system"
VAI_install_base_system
VAI_print_step "Granting sudo to default user"
VAI_configure_sudo
VAI_print_step "Setting hostname"
VAI_configure_hostname
VAI_print_step "Configure rc.conf"
VAI_configure_rc_conf
VAI_print_step "Preparing the chroot"
VAI_prepare_chroot
VAI_print_step "Fix ownership of /"
VAI_correct_root_permissions
VAI_print_step "Adding default user"
VAI_add_user
VAI_print_step "Configuring GRUB"
VAI_configure_grub
VAI_print_step "Configuring /etc/fstab"
VAI_configure_fstab
VAI_print_step "Configuring libc-locales"
VAI_configure_locale
VAI_print_step "Performing end-action"
VAI_end_action
}
# If we are using the autoinstaller, launch it
if getargbool 0 auto ; then
VAI_main
fi
# Very important to release this before returning to dracut code
set +e

View File

@@ -0,0 +1,45 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
return 255
}
depends() {
echo network
}
install() {
inst /usr/bin/awk
inst /usr/bin/chmod
inst /usr/bin/chroot
inst /usr/bin/clear
inst /usr/bin/cp
inst /usr/bin/chpasswd
inst /usr/bin/dhcpcd
inst /usr/bin/halt
inst /usr/bin/install
inst /usr/bin/lsblk
inst /usr/bin/mkdir
inst /usr/bin/mkfs.ext4
inst /usr/bin/mkswap
inst /usr/bin/mount
inst /usr/bin/sfdisk
inst /usr/bin/sync
inst /usr/bin/xbps-install
inst /usr/bin/xbps-uhelper
inst /usr/bin/xbps-query
inst /usr/libexec/dhcpcd-hooks/20-resolv.conf
inst /usr/libexec/dhcpcd-run-hooks
inst_multiple /var/db/xbps/keys/*
inst_multiple /usr/share/xbps.d/*
inst_multiple /etc/ssl/certs/*
inst /etc/ssl/certs.pem
inst_hook pre-mount 01 "$moddir/install.sh"
inst "$moddir/autoinstall.cfg" /etc/autoinstall.default
}

View File

@@ -1,16 +0,0 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
return 255
}
depends() {
echo dmsquash-live
}
install() {
inst chmod
inst_hook pre-pivot 01 "$moddir/vmklive-adduser.sh"
}

View File

@@ -1,50 +0,0 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
USERNAME=$(getarg live.user)
[ -z "$USERNAME" ] && USERNAME=anon
# Create /etc/default/live.conf to store USER.
echo "USERNAME=$USERNAME" >> ${NEWROOT}/etc/default/live.conf
chmod 644 ${NEWROOT}/etc/default/live.conf
# Create new user and remove password. We'll use autologin by default.
chroot ${NEWROOT} useradd -c $USERNAME -m $USERNAME -G audio,video,wheel -s /bin/sh
chroot ${NEWROOT} passwd -d $USERNAME 2>&1 >/dev/null
# Enable sudo permission by default.
if [ -f ${NEWROOT}/etc/sudoers ]; then
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${NEWROOT}/etc/sudoers
fi
# Enable autologin for getty(1).
if [ -f ${NEWROOT}/lib/systemd/system/getty@.service ]; then
rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
sed -e "s|/sbin/agetty|/sbin/live-getty|g" \
"${NEWROOT}/lib/systemd/system/getty@.service" > \
"${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
fi
# Create /sbin/live-getty.
cat > ${NEWROOT}/sbin/live-getty <<_EOF
#!/bin/sh
if [ -x /sbin/agetty ]; then
_getty=/sbin/agetty
elif [ -x /sbin/getty ]; then
_getty=/sbin/getty
fi
exec \${_getty} -n -l /sbin/live-autologin \$*
_EOF
chmod 755 ${NEWROOT}/sbin/live-getty
# Create /sbin/live-autologin.
cat > ${NEWROOT}/sbin/live-autologin <<_EOF
#!/bin/sh
. /etc/default/live.conf
exec /bin/login -f \$USERNAME
_EOF
chmod 755 ${NEWROOT}/sbin/live-autologin

86
dracut/netmenu/module-setup.sh Executable file
View File

@@ -0,0 +1,86 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
return 255
}
depends() {
echo network
}
install() {
inst /usr/bin/awk
inst /usr/bin/basename
inst /usr/bin/bash
inst /usr/bin/cat
inst /usr/bin/cfdisk
inst /usr/bin/chroot
inst /usr/bin/clear
inst /usr/bin/cut
inst /usr/bin/cp
inst /usr/bin/dhcpcd
inst /usr/bin/dialog
inst /usr/bin/echo
inst /usr/bin/env
inst /usr/bin/find
inst /usr/bin/find
inst /usr/bin/grep
inst /usr/bin/head
inst /usr/bin/id
inst /usr/bin/ln
inst /usr/bin/ls
inst /usr/bin/lsblk
inst /usr/bin/mke2fs
inst /usr/bin/mkfs.btrfs
inst /usr/bin/mkfs.f2fs
inst /usr/bin/mkfs.vfat
inst /usr/bin/mkfs.xfs
inst /usr/bin/mkswap
inst /usr/bin/mktemp
inst /usr/bin/mount
inst /usr/bin/reboot
inst /usr/bin/rm
inst /usr/bin/sed
inst /usr/bin/sh
inst /usr/bin/sort
inst /usr/bin/sync
inst /usr/bin/stdbuf
inst /usr/bin/sleep
inst /usr/bin/touch
inst /usr/bin/xargs
inst /usr/bin/xbps-install
inst /usr/bin/xbps-reconfigure
inst /usr/bin/xbps-remove
inst /usr/bin/xbps-uhelper
inst /usr/libexec/dhcpcd-hooks/20-resolv.conf
inst /usr/libexec/dhcpcd-run-hooks
inst /usr/libexec/coreutils/libstdbuf.so
inst_multiple /var/db/xbps/keys/*
inst_multiple /usr/share/xbps.d/*
inst_multiple /usr/share/zoneinfo/*/*
inst_multiple /etc/ssl/certs/*
inst /etc/ssl/certs.pem
inst /etc/default/libc-locales
inst /etc/group
# We need to remove a choice here since the installer's initrd
# can't function as a local source. Strictly we shouldn't be
# doing this from dracut's installation function, but this is the
# last place that file really exists 'on disk' in the sense that
# we can modify it, so this change is applied here.
sed -i '/Packages from ISO image/d' "$moddir/installer.sh"
# The system doesn't have a real init up so the reboot is going to
# be rough, we make it an option though if the end user wants to
# do this...
sed -i "s:shutdown -r now:sync && reboot -f:" "$moddir/installer.sh"
inst "$moddir/installer.sh" /usr/bin/void-installer
inst_hook pre-mount 05 "$moddir/netmenu.sh"
}

18
dracut/netmenu/netmenu.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
dialog --colors --keep-tite --no-shadow --no-mouse \
--backtitle "\Zb\Z7Void Linux installation -- https://www.voidlinux.org\Zn" \
--cancel-label "Reboot" --aspect 20 \
--menu "Select an Action:" 10 50 2 \
"Install" "Run void-installer" \
"Shell" "Run dash" \
2>/tmp/netmenu.action
if [ ! $? ] ; then
reboot -f
fi
case $(cat /tmp/netmenu.action) in
"Install") /usr/bin/void-installer ; exec sh ;;
"Shell") exec sh ;;
esac

8
dracut/vmklive/59-mtd.rules Executable file
View File

@@ -0,0 +1,8 @@
SUBSYSTEM!="block", GOTO="ps_end"
ACTION!="add|change", GOTO="ps_end"
# Also don't process disks that are slated to be a multipath device
ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end"
KERNEL=="mtdblock[0-9]*", IMPORT BLKID
LABEL="ps_end"

20
dracut/vmklive/61-mtd.rules Executable file
View File

@@ -0,0 +1,20 @@
SUBSYSTEM!="block", GOTO="pss_end"
ACTION!="add|change", GOTO="pss_end"
# Also don't process disks that are slated to be a multipath device
ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end"
ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss"
KERNEL=="mtdblock*", GOTO="do_pss"
GOTO="pss_end"
LABEL="do_pss"
# by-path (parent device path)
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT PATH_ID
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
# by-label/by-uuid links (filesystem metadata)
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
LABEL="pss_end"

56
dracut/vmklive/adduser.sh Executable file
View File

@@ -0,0 +1,56 @@
#!/bin/sh -x
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
echo void-live > ${NEWROOT}/etc/hostname
AUTOLOGIN=$(getarg live.autologin)
USERNAME=$(getarg live.user)
USERSHELL=$(getarg live.shell)
[ -z "$USERNAME" ] && USERNAME=anon
[ -x $NEWROOT/bin/bash -a -z "$USERSHELL" ] && USERSHELL=/bin/bash
[ -z "$USERSHELL" ] && USERSHELL=/bin/sh
# Create /etc/default/live.conf to store USER.
echo "USERNAME=$USERNAME" >> ${NEWROOT}/etc/default/live.conf
chmod 644 ${NEWROOT}/etc/default/live.conf
if ! grep -q ${USERSHELL} ${NEWROOT}/etc/shells ; then
echo ${USERSHELL} >> ${NEWROOT}/etc/shells
fi
# Create new user and remove password. We'll use autologin by default.
chroot ${NEWROOT} useradd -m -c $USERNAME -G audio,video,wheel -s $USERSHELL $USERNAME
chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1
# Setup default root/user password (voidlinux).
chroot ${NEWROOT} sh -c 'echo "root:voidlinux" | chpasswd -c SHA512'
chroot ${NEWROOT} sh -c "echo "$USERNAME:voidlinux" | chpasswd -c SHA512"
# Enable sudo permission by default.
if [ -f ${NEWROOT}/etc/sudoers ]; then
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${NEWROOT}/etc/sudoers
fi
if [ -d ${NEWROOT}/etc/polkit-1 ]; then
# If polkit is installed allow users in the wheel group to run anything.
cat > ${NEWROOT}/etc/polkit-1/rules.d/void-live.rules <<_EOF
polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
});
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
_EOF
chroot ${NEWROOT} chown polkitd:polkitd /etc/polkit-1/rules.d/void-live.rules
fi
if [ -n "$AUTOLOGIN" ]; then
sed -i "s,GETTY_ARGS=\"--noclear\",GETTY_ARGS=\"--noclear -a $USERNAME\",g" ${NEWROOT}/etc/sv/agetty-tty1/run
fi

View File

@@ -0,0 +1,61 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
USERNAME=$(getarg live.user)
[ -z "$USERNAME" ] && USERNAME=anon
# Configure GDM autologin
if [ -d ${NEWROOT}/etc/gdm ]; then
GDMCustomFile=${NEWROOT}/etc/gdm/custom.conf
AutologinParameters="AutomaticLoginEnable=true\nAutomaticLogin=$USERNAME"
# Prevent from updating if parameters already present (persistent usb key)
if ! `grep -qs 'AutomaticLoginEnable' $GDMCustomFile` ; then
if ! `grep -qs '\[daemon\]' $GDMCustomFile` ; then
echo '[daemon]' >> $GDMCustomFile
fi
sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile
fi
fi
# Configure sddm autologin for the kde iso.
if [ -x ${NEWROOT}/usr/bin/sddm ]; then
cat > ${NEWROOT}/etc/sddm.conf <<_EOF
[Autologin]
User=anon
Session=plasma.desktop
_EOF
fi
# Configure lightdm autologin.
if [ -r ${NEWROOT}/etc/lightdm.conf ]; then
sed -i -e "s|^\#\(default-user=\).*|\1$USERNAME|" \
${NEWROOT}/etc/lightdm.conf
sed -i -e "s|^\#\(default-user-timeout=\).*|\10|" \
${NEWROOT}/etc/lightdm.conf
fi
# Configure lxdm autologin.
if [ -r ${NEWROOT}/etc/lxdm/lxdm.conf ]; then
sed -e "s,.*autologin.*=.*,autologin=$USERNAME," -i ${NEWROOT}/etc/lxdm/lxdm.conf
if [ -x ${NEWROOT}/usr/bin/enlightenment_start ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/enlightenment_start," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/startxfce4 ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/startxfce4," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/mate-session ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/mate-session," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/cinnamon-session ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/cinnamon-session," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/i3 ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/i3," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/startlxde ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/startlxde," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/startlxqt ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/startlxqt," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/startfluxbox ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/startfluxbox," -i ${NEWROOT}/etc/lxdm/lxdm.conf
fi
fi

22
dracut/vmklive/locale.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
LOCALE=$(getarg locale.LANG)
[ -z "$LOCALE" ] && LOCALE="en_US.UTF-8"
# also enable this locale in newroot.
echo "LANG=$LOCALE" > $NEWROOT/etc/locale.conf
echo "LC_COLLATE=C" >> $NEWROOT/etc/locale.conf
# set keymap too.
KEYMAP=$(getarg vconsole.keymap)
[ -z "$KEYMAP" ] && KEYMAP="us"
if [ -f ${NEWROOT}/etc/vconsole.conf ]; then
sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/vconsole.conf
elif [ -f ${NEWROOT}/etc/rc.conf ]; then
sed -e "s,^#KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/rc.conf
fi

30
dracut/vmklive/module-setup.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
return 255
}
depends() {
echo dmsquash-live
}
install() {
inst /usr/bin/chroot
inst /usr/bin/chmod
inst /usr/bin/sed
if [ -e /usr/bin/memdiskfind ]; then
inst /usr/bin/memdiskfind
instmods mtdblock phram
inst_rules "$moddir/59-mtd.rules" "$moddir/61-mtd.rules"
prepare_udev_rules 59-mtd.rules 61-mtd.rules
inst_hook pre-udev 01 "$moddir/mtd.sh"
fi
inst_hook pre-pivot 01 "$moddir/adduser.sh"
inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh"
inst_hook pre-pivot 03 "$moddir/locale.sh"
inst_hook pre-pivot 04 "$moddir/services.sh"
}

7
dracut/vmklive/mtd.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
MEMDISK=$(memdiskfind)
if [ "$MEMDISK" ]; then
modprobe phram phram=memdisk,$MEMDISK
modprobe mtdblock
printf 'KERNEL=="mtdblock0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root /dev/mtdblock0"\n' >> /etc/udev/rules.d/99-live-squash.rules
fi

29
dracut/vmklive/services.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
SERVICEDIR=$NEWROOT/etc/sv
SERVICES="$(getarg live.services)"
for f in ${SERVICES}; do
ln -sf /etc/sv/$f $NEWROOT/etc/runit/runsvdir/default/
done
dhcpcd=1
for f in connmand NetworkManager wicd; do
if [ -e $SERVICEDIR/$f ]; then
unset dhcpcd
fi
done
# Enable all services by default... with some exceptions.
for f in $SERVICEDIR/*; do
_service=${f##*/}
case "${_service}" in
agetty-console|agetty-generic|agetty-serial|agetty-tty[SAU]*|sulogin|dhcpcd-*|iptables|ip6tables|wpa_supplicant|pulseaudio|lvmetad|dmeventd|mdadm) ;; # ignored
dhcpcd) [ -n "$dhcpcd" ] && ln -sf ${f##$NEWROOT} $NEWROOT/etc/runit/runsvdir/default/;;
*) ln -sf ${f##$NEWROOT} $NEWROOT/etc/runit/runsvdir/default/;;
esac
done

71
dwm-x64.packages Executable file
View File

@@ -0,0 +1,71 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
xorg-minimal
xorg-input-drivers
xorg-video-drivers
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
wget
lxdm
nano
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
git
vim
upower
bash-completion
dwm
alsa-utils
xterm
mc
htop
tuxc
dtrx
p7zip
topgrade
ntp
dmenu
sakura
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
qutebrowser

81
e17-x64.packages Executable file
View File

@@ -0,0 +1,81 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
xrandr
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
polkit-elogind
exfat-utils
fuse-exfat
wget
lxdm
enlightenment
terminology
econnman
upower
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
zenity
bash-completion
nano
xdg-utils
vim
git
alsa-utils
paprefs
pasystray
pavucontrol
xterm
htop
tuxc
dtrx
p7zip
topgrade
ntp
void-repo-multilib
void-repo-nonfree
octoxbps
gksu
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
gnome-themes-standard
adwaita-icon-theme

80
gnome-x64.packages Executable file
View File

@@ -0,0 +1,80 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
dbus
avahi
avahi-utils
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
intel-ucode
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
wget
gdm
bash-completion
nano
git
vim
alsa-utils
paprefs
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libva-vdpau-driver
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
pavucontrol
xterm
htop
tuxc
topgrade
ntp
void-repo-multilib
void-repo-nonfree
octoxbps
gksu
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
gnome
gnome-apps
Adapta
papirus-icon-theme
gnome-themes-standard
adwaita-icon-theme

56
gnome-x64.sh Executable file
View File

@@ -0,0 +1,56 @@
#!/bin/bash
DESKTOP="gnome"
echo "========================="
echo "| ${DESKTOP} VOID x86_64 |"
echo " ------------------------"
CURRENT=https://mirrors.servercentral.com/voidlinux/current
MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib
#NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
retry=0
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
((retry++))
if [[ $retry -gt 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build

15
grub/grub.cfg Executable file
View File

@@ -0,0 +1,15 @@
insmod usbms
insmod usb_keyboard
insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660
insmod udf
insmod ext2
insmod reiserfs
insmod ntfs
insmod hfsplus
insmod linux
insmod chain
search --file --no-floppy --set=voidlive "/boot/grub/grub_void.cfg"
source "(${voidlive})/boot/grub/grub_void.cfg"

46
grub/grub_void.cfg.in Executable file
View File

@@ -0,0 +1,46 @@
set pager="1"
set locale_dir="(${voidlive})/boot/grub/locale"
if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
fi
insmod font
if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then
insmod gfxterm
set gfxmode="auto"
terminal_input console
terminal_output gfxterm
insmod png
background_image "(${voidlive})/boot/isolinux/@@SPLASHIMAGE@@"
fi
if [ cpuid -l ]; then
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
initrd (${voidlive})/boot/initrd
}
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (RAM)" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram
initrd (${voidlive})/boot/initrd
}
fi

1
hooks/README.md Executable file
View File

@@ -0,0 +1 @@
hooks for Docker

2
hooks/build Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
docker build --build-arg ARCH=$ARCH -t $IMAGE_NAME .

76
i3-x64.packages Executable file
View File

@@ -0,0 +1,76 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
xorg-minimal
xorg-input-drivers
xorg-video-drivers
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
wget
lxdm
nano
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
git
vim
upower
bash-completion
i3-gaps
i3blocks
i3status
alsa-utils
pulsemixer
pasystray
xterm
mc
htop
tuxc
dtrx
p7zip
topgrade
ntp
dmenu
sakura
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
qutebrowser
adwaita-icon-theme

58
i3-x64.sh Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
DESKTOP="i3"
echo "========================="
echo "| ${DESKTOP} VOID x86_64 |"
echo " ------------------------"
CURRENT=https://mirrors.servercentral.com/voidlinux/current
MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib
NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
retry=0
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
((retry++))
if [[ $retry -gt 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build

View File

@@ -0,0 +1,25 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
#USERLAND PACKAGES
NetworkManager
nano
vim
bash-completion
git
xterm
htop
tuxc
ntp
void-repo-multilib
ntfs-3g

View File

@@ -0,0 +1,53 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
intel-ucode
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
lxdm
pm-utils
nano
xdg-utils
git
vim
bash-completion
cinnamon
xrandr
colord
gnome-terminal
alsa-utils
pavucontrol
xterm
htop
tuxc
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox

View File

@@ -0,0 +1,55 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
intel-ucode
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
lxdm
pm-utils
nano
xdg-utils
git
vim
bash-completion
i3-gaps
i3blocks
i3status
alsa-utils
pulsemixer
pasystray
xterm
mc
htop
tuxc
ntp
dmenu
sakura
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
qutebrowser

View File

@@ -0,0 +1,52 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
intel-ucode
setxkbmap
xrandr
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
lxdm
pm-utils
bash-completion
nano
git
vim
lxde
xdg-utils
gnome-terminal
alsa-utils
pavucontrol
xterm
htop
tuxc
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
falkon

View File

@@ -0,0 +1,53 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
xrandr
intel-ucode
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
qt5-plugin-sqlite
pm-utils
nano
bash-completion
git
xdg-utils
vim
lxdm
lxqt
lxterminal
alsa-utils
pavucontrol
xterm
htop
tuxc
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
falkon

View File

@@ -0,0 +1,50 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
intel-ucode
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
lxdm
mate
mate-extra
bash-completion
caja-extensions
alsa-utils
xdg-utils
pavucontrol
alsa-plugins-pulseaudio
xterm
htop
tuxc
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox

View File

@@ -0,0 +1,60 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
xrandr
intel-ucode
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
lxdm
xdg-utils
zenity
bash-completion
pm-utils
nano
xdg-utils
vim
git
alsa-utils
paprefs
pasystray
pavucontrol
xterm
htop
tuxc
ntp
void-repo-multilib
void-repo-nonfree
octoxbps
gksu
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
xfce4
xfce4-plugins
Adapta
papirus-icon-theme
gnome-themes-standard

1467
installer.sh.in Executable file

File diff suppressed because it is too large Load Diff

34
isolinux/isolinux.cfg.in Executable file
View File

@@ -0,0 +1,34 @@
UI vesamenu.c32
PROMPT 0
TIMEOUT 100
ONTIMEOUT linux
MENU TABMSG Press ENTER to boot or TAB to edit a menu entry
MENU AUTOBOOT BIOS default device boot in # second{,s}...
MENU BACKGROUND @@SPLASHIMAGE@@
MENU WIDTH 78
MENU MARGIN 1
MENU ROWS 4
MENU VSHIFT 2
MENU TIMEOUTROW 8
MENU TABMSGROW 2
MENU CMDLINEROW 11
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
MENU COLOR title * #FF5255FF *
MENU COLOR border * #00000000 #00000000 none
MENU COLOR sel * #ffffffff #FF5255FF *
LABEL linux
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@
KERNEL /boot/vmlinuz
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@@
LABEL linuxram
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ (RAM)
KERNEL /boot/vmlinuz
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
LABEL c
MENU LABEL Boot first HD found by BIOS
COM32 chain.c32
APPEND hd0

86
kde-x64.packages Executable file
View File

@@ -0,0 +1,86 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg
xorg-input-drivers
xorg-video-drivers
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
sddm
konsole
bash-completion
nano
git
vim
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
alsa-utils
alsa-plugins-pulseaudio
plasma-pa
paprefs
pavucontrol
inetutils
usbutils
wget
curl
dtrx
p7zip
xterm
htop
tuxc
topgrade
octoxbps
ntp
void-repo-multilib
void-repo-nonfree
octoxbps
kdesu
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
NetworkManager
plasma-nm
firefox
kde5
kde5-baseapps
kaccounts-integration
kaccounts-providers
dolphin
adapta-kde
adwaita-icon-theme

62
kde-x64.sh Executable file
View File

@@ -0,0 +1,62 @@
#!/bin/bash
DESKTOP="kde"
echo "========================="
echo "| ${DESKTOP} VOID x86_64 |"
echo " ------------------------"
CURRENT=https://mirrors.servercentral.com/voidlinux/current
MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib
NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
#shift $((OPTIND - 1))
#: ${ARCH:=$(uname -m)}
retry=0
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
((retry++))
if [[ $retry -gt 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>public-key</key>
<data>LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQ0lqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUFvM1Nrc2p5N01PMmc4UWxsZjdCVQp1aXhFUWlqN3FOSVJrU0hrWWw4SGxxd1hOczFnK1FzbzhGV3dSbDNMbUpTVW5wT1BaOG1sdVdSajd4Y2pLbnVJCnhPRjBtQS8vM0lzTnVId2dYV2RLL0JiT29wNzFLZmt4aEE0WjhwK0hRbmhLMThxUkFPbG9xOGJ6WXZhaGI2NmEKemdWVTVFM1JzRDU4V0M2ZTFOUVdSSGpiMG1TM2h6M1NxVWVWZFVMT20zVzZBRTdYdWlVQVJOSEdyY1ljMXkyKwpxNjBKWHMrVk5sRlMwaGdDdnpqS3phMVg5cWtzQndzTmdaRlhBcXN1MGFKRndYSTEvM2R4ZWxBcUZFbnRMWVFSCjA4NHpaTDFmWDVRMWlacGNEaHVhTWZVREVZQjA4UzdKTTBYKytibkxxVnphVTZzc0RXdGtzbFJaNjNaVStISTUKemk5a0pyc25LcU5Pa3BKSnJTUkRyMGFvRjV2RDRwN20vYWdZKzdTRk5aaDZzOUJ5V0x3NDVFdytwalVVUmp5aQp6T01TSFhEM3YzczhFdzZkV29wbTVQTGUvUEgzZWFiMEVnbG9yVDZhYmRwaCtaVG4zaUxMWVVkSGNmQ1FDN01GCkNmVGl1TWt4SkJpaCtoOEhKaUlBdmpDZjVxdjZiaFpEUHpGRzAwbEpYRUZwNHRpbGp6eTFmbitiMkdLY3BDOWQKUUs4TEc3M0RFaXhacHBmU09IU09MMWYxVlBzZTBRdnl6d2RWc0xzR0dqV0FaZkw4WUdVZDl4Y20yeW5tVzFuNgpKTjl6NE9oZ3lRa21mNUFFUXpYSUxQR0d1MlREUVh5c05IRG0vUnRMMHJPN3cxbFVKSTVYOW1kbEZYd0xUWHI3ClYrU25aK3U5VCtFREg1NTV6WDJDZTgwQ0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=</data>
<key>public-key-size</key>
<integer>4096</integer>
<key>signature-by</key>
<string>Void Linux</string>
</dict>
</plist>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>public-key</key>
<data>LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQ0lqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUF2clN6QlpNdmd2T0NJM0FYYk9qYQoycktSa0pTVE0zYy9FalRJZ0NnRFhndW05M0JQQ3RZOE1jRlZvQ1U0T2lYSEdmVG1xMzlCVk5wTHZMSEw5S2sxCnAyNzhTQmhYVk90YkIyRVZtREtudmZJREVUbGRMR3plN3JaTlJKZHR1TjJtWi9UVnJVQjlTMHlRYytJdWY0aHYKMytEOTdWSWRUSkhBN0FTcjA0MjhwcEVHSkd3U1NoWTJYSm05RDVJMEV1R1JXYzE0TUVHN2RJS0ppWWlNMG5FNAp0WW8yL3ZINElGVEhkblZBM2dZaVp5RG5idUNBUi84RVNmVVRVMTNTTkNPZGJ1ZGYzRDVCY3krVWlNREpJM1llCjRNRktCclQ5WmhaK0dzWEJaWTQ4MmxxaVppNkNMNXB0YzlJUUZmOC9lS1phOGphdGtpVkZWZ3JLZU5Sak9UeE4KZldTdTJua3hHTlgrYmhYWXRoaUdXbUpFWThjQ0FQeUZOK0x2NVJldEsyNTZnZGNiMnNrbUVxZWZ2MnpQQyt3VgpXQmJkSDViRDRiWmpuME42Wmw4MXJ2NVJ6RHZudmYrdkQxNGFGVWJaOFFGcXU3NVBiTDR3Nm1ZTTRsZE0vZzBSCjZOWEU4QXo5Qnd4MnREZlllS3V1dHcxRXBQbTJZdkZ5VFViMWNveUF1VEdSeUFhcDFVVEh2ZzlsaFBJSm1oRlEKSjVrQ2cxcUQ3QTMxV2wwUmxuZTZoZ0dvMFpaTko1Y0pNL3YvelNUS0pjdUZnd283SDBoT0dpbDZEZm84OUI0agpHOTZBQ3lQUytEVktQRlhSWXdqL0FrYkhwYVEyZjFGTUFvU3BCcXVEcUhoM3VrazcxS1g2ajE5dDBpRjhEUUxyCnZ0RlNTZElqREEwMmx3ZVY5TmFRcFdzQ0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=</data>
<key>public-key-size</key>
<integer>4096</integer>
<key>signature-by</key>
<string>Void Linux</string>
</dict>
</plist>

314
lib.sh.in Executable file
View File

@@ -0,0 +1,314 @@
#!/bin/sh
# This contains the COMPLETE list of binaries that this script needs
# to function. The only exception is the QEMU binary since it is not
# known in advance which one wil be required.
readonly LIBTOOLS="cp echo cat printf which mountpoint mount umount modprobe"
readonly HOSTARCH=$(xbps-uhelper arch)
info_msg() {
# This function handles the printing that is bold within all
# scripts. This is a convenience function so that the rather ugly
# looking ASCII escape codes live in only one place.
printf "\033[1m%s\n\033[m" "$@"
}
die() {
# This function is registered in all the scripts to make sure that
# the important mounts get cleaned up and the $ROOTFS location is
# removed.
printf "FATAL: %s\n" "$@"
umount_pseudofs
[ -d "$ROOTFS" ] && rm -rf "$ROOTFS"
exit 1
}
check_tools() {
# All scripts within mklive declare the tools they will use in a
# variable called "REQTOOLS". This function checks that these
# tools are available and prints out the path to each tool that
# will be used. This can be useful to figure out what is broken
# if a different version of something is used than was expected.
for tool in $LIBTOOLS $REQTOOLS ; do
if ! which "$tool" > /dev/null ; then
die "Required tool $tool is not available on this system!"
fi
done
info_msg "The following tools will be used:"
for tool in $LIBTOOLS $REQTOOLS ; do
which "$tool"
done
}
mount_pseudofs() {
# This function ensures that the psuedofs mountpoints are present
# in the chroot. Strictly they are not necessary to have for many
# commands, but bind-mounts are cheap and it isn't too bad to just
# mount them all the time.
for f in dev proc sys; do
# In a naked chroot there is nothing to bind the mounts to, so
# we need to create directories for these first.
[ ! -d "$ROOTFS/$f" ] && mkdir -p "$ROOTFS/$f"
if ! mountpoint -q "$ROOTFS/$f" ; then
# It is VERY important that this only happen if the
# pseudofs isn't already mounted. If it already is then
# this is virtually impossible to troubleshoot because it
# looks like the subsequent umount just isn't working.
mount -r --bind /$f "$ROOTFS/$f"
fi
done
if ! mountpoint -q "$ROOTFS/tmp" ; then
mkdir -p "$ROOTFS/tmp"
mount -o mode=0755,nosuid,nodev -t tmpfs tmpfs "$ROOTFS/tmp"
fi
}
umount_pseudofs() {
# This function cleans up the mounts in the chroot. Failure to
# clean up these mounts will prevent the tmpdir from being
# deletable instead throwing the error "Device or Resource Busy".
# The '-f' option is passed to umount to account for the
# contingency where the psuedofs mounts are not present.
if [ -d "${ROOTFS}" ]; then
for f in dev proc sys; do
umount -f "$ROOTFS/$f" >/dev/null 2>&1
done
fi
umount -f "$ROOTFS/tmp" >/dev/null 2>&1
}
run_cmd_target() {
info_msg "Running $* for target $XBPS_TARGET_ARCH ..."
if [ "$XBPS_TARGET_ARCH" = "${HOSTARCH}" ] ||
[ -z "${XBPS_TARGET_ARCH##*86*}" ] &&
[ -z "${HOSTARCH##*86*}" ] ; then
# This is being run on the same architecture as the host,
# therefore we should set XBPS_ARCH.
if ! eval XBPS_ARCH="$XBPS_TARGET_ARCH" "$@" ; then
die "Could not run command $*"
fi
else
# This is being run on a foriegn arch, therefore we should set
# XBPS_TARGET_ARCH. In this case XBPS will not attempt
# certain actions and will require reconfiguration later.
if ! eval XBPS_TARGET_ARCH="$XBPS_TARGET_ARCH" "$@" ; then
die "Could not run command $*"
fi
fi
}
run_cmd() {
# This is a general purpose function to run commands that a user
# may wish to see. For example its useful to see the tar/xz
# pipeline to not need to delve into the scripts to see what
# options its set up with.
info_msg "Running $*"
eval "$@"
}
run_cmd_chroot() {
# General purpose chroot function which makes sure the chroot is
# prepared. This function takes 2 arguments, the location to
# chroot to and the command to run.
# This is an idempotent function, it is safe to call every time
# before entering the chroot. This has the advantage of making
# execution in the chroot appear as though it "Just Works(tm)".
register_binfmt
# Before we step into the chroot we need to make sure the
# pseudo-filesystems are ready to go. Not all commands will need
# this, but its still a good idea to call it here anyway.
mount_pseudofs
# With assurance that things will run now we can jump into the
# chroot and run stuff!
chroot "$1" sh -c "$2"
}
cleanup_chroot() {
# This function cleans up the chroot shims that are used by QEMU
# to allow builds on alien platforms. It takes no arguments but
# expects the global $ROOTFS variable to be set.
# Un-Mount the pseudofs mounts if they were mounted
umount_pseudofs
# If a QEMU binary was copied in, remove that as well
if [ -x "$ROOTFS/usr/bin/$QEMU_BIN" ] ; then
rm "$ROOTFS/usr/bin/$QEMU_BIN"
fi
}
# TODO: Figure out how to register the binfmt for x86_64 and for i686
# to facilitate building on alien build systems.
register_binfmt() {
# This function sets up everything that is needed to be able to
# chroot into a ROOTFS and be able to run commands there. This
# really matters on platforms where the host architecture is
# different from the target, and you wouldn't be able to run
# things like xbps-reconfigure -a. This function is idempotent
# (You can run it multiple times without modifying state). This
# function takes no arguments, but does expect the global variable
# $XBPS_TARGET_ARCH to be set.
# This select sets up the "magic" bytes in /proc that let the
# kernel select an alternate interpreter. More values for this
# map can be obtained from here:
# https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh
# If the XBPS_TARGET_ARCH is unset but the PLATFORM is known, it
# may be possible to set the architecture from the static
# platforms map.
if [ -z "$XBPS_TARGET_ARCH" ] && [ ! -z "$PLATFORM" ] ; then
set_target_arch_from_platform
fi
case "${XBPS_TARGET_ARCH}" in
armv*)
_cpu=arm
_magic="\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00"
_mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff"
QEMU_BIN=qemu-arm-static
;;
aarch64*)
_cpu=aarch64
_magic="\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7"
_mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff"
QEMU_BIN=qemu-aarch64-static
;;
ppc64le*)
_cpu=ppc64le
_magic="\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15\x00"
_mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\x00"
QEMU_BIN=qemu-ppc64le-static
;;
ppc64*)
_cpu=ppc64
_magic="\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15"
_mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff"
QEMU_BIN=qemu-ppc64-static
;;
ppc*)
_cpu=ppc
_magic="\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14"
_mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff"
QEMU_BIN=qemu-ppc-static
;;
mipsel*)
_cpu=mipsel
_magic="\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00"
_mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff"
QEMU_BIN=qemu-mipsel-static
;;
*86*)
info_msg "FIXME: Assuming that x86 instructions are native"
QEMU_BIN=NATIVE
;;
*)
die "Unknown target architecture!"
;;
esac
# In the special case where the build is native we can return
# without doing anything else
if [ "$QEMU_BIN" = "NATIVE" ] ; then
return
fi
# For builds that do not match the host architecture, the correct
# qemu binary will be required.
if ! $QEMU_BIN -version >/dev/null 2>&1; then
die "$QEMU_BIN binary is missing in your system, exiting."
fi
# In order to use the binfmt system the binfmt_misc mountpoint
# must exist inside of proc
if ! mountpoint -q /proc/sys/fs/binfmt_misc ; then
modprobe -q binfmt_misc
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc 2>/dev/null
fi
# Only register if the map is incomplete
if [ ! -f /proc/sys/fs/binfmt_misc/qemu-$_cpu ] ; then
echo ":qemu-$_cpu:M::$_magic:$_mask:/usr/bin/$QEMU_BIN:" > /proc/sys/fs/binfmt_misc/register 2>/dev/null
fi
# If the static binary isn't in the chroot then the chroot will
# fail. The kernel knows about the map but without the static
# version there's no interpreter in the chroot, only the
# dynamically linked one in the host. To simplify things we just
# use the static one always and make sure it shows up at the same
# place in the host and the chroot.
if [ ! -x "$ROOTFS/usr/bin/$QEMU_BIN" ] ; then
install -m755 -D "$(which "$QEMU_BIN")" "$ROOTFS/usr/bin/$QEMU_BIN" ||
die "Could not install $QEMU_BIN to $ROOTFS/usr/bin/"
fi
}
set_target_arch_from_platform() {
# This function maintains a lookup from platform to target
# architecture. This is required for scripts that need to know
# the target architecture, but don't necessarily need to know it
# internally (i.e. only run_cmd_chroot).
case "$PLATFORM" in
bananapi*) XBPS_TARGET_ARCH="armv7l";;
beaglebone*) XBPS_TARGET_ARCH="armv7l";;
cubieboard2*|cubietruck*) XBPS_TARGET_ARCH="armv7l";;
dockstar*) XBPS_TARGET_ARCH="armv5tel";;
pogoplugv4*) XBPS_TARGET_ARCH="armv5tel" ;;
odroid-u2*) XBPS_TARGET_ARCH="armv7l";;
odroid-c2*) XBPS_TARGET_ARCH="aarch64";;
rpi3*) XBPS_TARGET_ARCH="aarch64";;
rpi2*) XBPS_TARGET_ARCH="armv7l";;
rpi*) XBPS_TARGET_ARCH="armv6l";;
usbarmory*) XBPS_TARGET_ARCH="armv7l";;
ci20*) XBPS_TARGET_ARCH="mipsel";;
i686*) XBPS_TARGET_ARCH="i686";;
x86_64*) XBPS_TARGET_ARCH="x86_64";;
GCP*) XBPS_TARGET_ARCH="x86_64";;
pinebookpro*) XBPS_TARGET_ARCH="aarch64";;
*) die "$PROGNAME: Unable to compute target architecture from platform";;
esac
if [ -z "${PLATFORM##*-musl}" ] ; then
XBPS_TARGET_ARCH="${XBPS_TARGET_ARCH}-musl"
fi
}
set_dracut_args_from_platform() {
# In rare cases it is necessary to set platform specific dracut
# args. This is mostly the case on ARM platforms.
case "$PLATFORM" in
pogoplugv4*) dracut_args="-o 'btrfs drm i18n resume terminfo'" ;;
*) ;;
esac
}
set_cachedir() {
# The package artifacts are cacheable, but they need to be isolated
# from the host cache.
: "${XBPS_CACHEDIR:=--cachedir=$PWD/xbps-cache/${XBPS_TARGET_ARCH}}"
}
# These should all resolve even if they won't have the appropriate
# repodata files for the selected architecture.
: "${XBPS_REPOSITORY:=--repository=http://alpha.de.repo.voidlinux.org/current \
--repository=http://alpha.de.repo.voidlinux.org/current/musl \
--repository=http://alpha.de.repo.voidlinux.org/current/aarch64}"
# This library is the authoritative source of the platform map,
# because of this we may need to get this information from the command
# line. This select allows us to get that information out. This
# fails silently if the toolname isn't known since this script is
# sourced.
case $1 in
platform2arch)
PLATFORM=$2
set_target_arch_from_platform
echo "$XBPS_TARGET_ARCH"
;;
esac

73
lxde-x64.packages Executable file
View File

@@ -0,0 +1,73 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
intel-ucode
setxkbmap
xrandr
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
wget
lxdm
pm-utils
bash-completion
nano
git
vim
lxde
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
gnome-terminal
alsa-utils
pavucontrol
xterm
htop
tuxc
topgrade
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
falkon
adwaita-icon-theme

54
lxde-x64.sh Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
DESKTOP="lxde"
echo "========================="
echo "| ${DESKTOP} VOID x86_64 |"
echo " ------------------------"
CURRENT=https://alpha.de.repo.voidlinux.org/current
MUTILIB=https://alpha.de.repo.voidlinux.org/current/multilib
NONFREE=https://alpha.de.repo.voidlinux.org/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
#shift $((OPTIND - 1))
#: ${ARCH:=$(uname -m)}
sudo ./mklive.sh \
-a x86_64 \
-r ${CURRENT} \
# -r ${MUTILIB} \
-r ${NONFREE} \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build

74
lxqt-x64.packages Executable file
View File

@@ -0,0 +1,74 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
xrandr
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
wget
qt5-plugin-sqlite
nano
bash-completion
git
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
vim
lxdm
lxqt
lxterminal
alsa-utils
pavucontrol
xterm
htop
tuxc
dtrx
p7zip
topgrade
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
falkon
papirus-icon-theme
adwaita-icon-theme

58
lxqt-x64.sh Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
DESKTOP="lxqt"
echo "========================="
echo "| ${DESKTOP} VOID x86_64 |"
echo " ------------------------"
CURRENT=https://mirrors.servercentral.com/voidlinux/current
MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib
NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
retry=0
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
((retry++))
if [[ $retry - gt 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build

74
mate-x64.packages Executable file
View File

@@ -0,0 +1,74 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
linux-firmware-network
gparted
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
wget
lxdm
mate
mate-extra
bash-completion
caja-extensions
alsa-utils
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
pavucontrol
alsa-plugins-pulseaudio
xterm
htop
tuxc
dtrx
p7zip
topgrade
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
Adapta
adwaita-icon-theme

59
mate-x64.sh Executable file
View File

@@ -0,0 +1,59 @@
#!/bin/bash
DESKTOP="mate"
echo "========================="
echo "| MATE VOID x86_64 |"
echo " ------------------------"
CURRENT=https://alpha.de.repo.voidlinux.org/current
MUTILIB=https://alpha.de.repo.voidlinux.org/current/multilib
NONFREE=https://alpha.de.repo.voidlinux.org/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
retry=0
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
((retry++))
if [[ $retry -gt 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build

379
mkimage.sh.in Executable file
View File

@@ -0,0 +1,379 @@
#!/bin/sh
#-
# Copyright (c) 2013-2016 Juan Romero Pardines.
# Copyright (c) 2017 Google
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
readonly PROGNAME=$(basename "$0")
readonly ARCH=$(uname -m)
trap 'printf "\nInterrupted! exiting...\n"; cleanup; exit 0' INT TERM HUP
# This source pulls in all the functions from lib.sh. This set of
# functions makes it much easier to work with chroots and abstracts
# away all the problems with running binaries with QEMU.
# shellcheck source=./lib.sh
. ./lib.sh
# This script has a special cleanup() function since it needs to
# unmount the rootfs as mounted on a loop device. This function is
# defined after sourcing the library functions to ensure it is the
# last one defined.
cleanup() {
umount_pseudofs
umount -f "${ROOTFS}/boot" 2>/dev/null
umount -f "${ROOTFS}" 2>/dev/null
if [ -e "$LOOPDEV" ]; then
partx -d "$LOOPDEV" 2>/dev/null
losetup -d "$LOOPDEV" 2>/dev/null
fi
[ -d "$ROOTFS" ] && rmdir "$ROOTFS"
}
# This script is designed to take in a complete platformfs and spit
# out an image that is suitable for writing with dd. The image is
# configurable in terms of the filesystem layout, but not in terms of
# the installed system itself. Customization to the installed system
# should be made during the mkplatformfs step.
usage() {
cat <<_EOF
Usage: $PROGNAME [options] <rootfs-tarball>
The <rootfs-tarball> argument expects a tarball generated by void-mkrootfs.
The platform is guessed automatically by its name.
Accepted sizes suffixes: KiB, MiB, GiB, TiB, EiB.
OPTIONS
-b <fstype> Set /boot filesystem type (defaults to FAT)
-B <bsize> Set /boot filesystem size (defaults to 64MiB)
-r <fstype> Set / filesystem type (defaults to EXT4)
-s <totalsize> Set total image size (defaults to 2GB)
-o <output> Set image filename (guessed automatically)
-x <num> Use <num> threads to compress the image (dynamic if unset)
-h Show this help
-V Show version
Resulting image will have 2 partitions, /boot and /.
_EOF
exit 0
}
# ########################################
# SCRIPT EXECUTION STARTS HERE
# ########################################
while getopts "b:B:o:r:s:x:h:V" opt; do
case $opt in
b) BOOT_FSTYPE="$OPTARG";;
B) BOOT_FSSIZE="$OPTARG";;
o) FILENAME="$OPTARG";;
r) ROOT_FSTYPE="$OPTARG";;
s) IMGSIZE="$OPTARG";;
x) COMPRESSOR_THREADS="$OPTARG" ;;
V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;;
h) usage;;
esac
done
shift $((OPTIND - 1))
ROOTFS_TARBALL="$1"
if [ -z "$ROOTFS_TARBALL" ]; then
usage
elif [ ! -r "$ROOTFS_TARBALL" ]; then
# In rare cases the tarball can wind up owned by the wrong user.
# This leads to confusing failures if execution is allowed to
# proceed.
die "Cannot read rootfs tarball: $ROOTFS_TARBALL"
fi
# By default we build all platform images with a 64MiB boot partition
# formated FAT16, and an approximately 1.9GiB root partition formated
# ext4. More exotic combinations are of course possible, but this
# combination works on all known platforms.
: "${IMGSIZE:=2G}"
: "${BOOT_FSTYPE:=vfat}"
: "${BOOT_FSSIZE:=64MiB}"
: "${ROOT_FSTYPE:=ext4}"
# Verify that the required tooling is available
readonly REQTOOLS="sfdisk partx losetup mount truncate mkfs.${BOOT_FSTYPE} mkfs.${ROOT_FSTYPE}"
check_tools
# Setup the platform variable. Here we want just the name and
# optionally -musl if this is the musl variant.
PLATFORM="${ROOTFS_TARBALL#void-}"
PLATFORM="${PLATFORM%-PLATFORMFS*}"
# This is an awful hack since the script isn't using privesc
# mechanisms selectively. This is a TODO item.
if [ "$(id -u)" -ne 0 ]; then
die "need root perms to continue, exiting."
fi
# Set the default filename if none was provided above. The default
# will include the platform the image is being built for and the date
# on which it was built.
if [ -z "$FILENAME" ]; then
FILENAME="void-${PLATFORM}-$(date +%Y%m%d).img"
fi
# Be absolutely certain the platform is supported before continuing
case "$PLATFORM" in
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|usbarmory|GCP|pinebookpro|*-musl);;
*) die "The $PLATFORM is not supported, exiting..."
esac
# Create the base image. This was previously accomplished with dd,
# but truncate is markedly faster.
info_msg "Creating disk image ($IMGSIZE) ..."
truncate -s "${IMGSIZE}" "$FILENAME" >/dev/null 2>&1
# Grab a tmpdir for the rootfs. If this fails we need to halt now
# because otherwise things will go very badly for the host system.
ROOTFS=$(mktemp -d) || die "Could not create tmpdir for ROOTFS"
info_msg "Creating disk image partitions/filesystems ..."
if [ "$BOOT_FSTYPE" = "vfat" ]; then
# The mkfs.vfat program tries to make some "intelligent" choices
# about the type of filesystem it creates. Instead we set options
# if the type is vfat to ensure that the same options will be used
# every time.
_args="-I -F16"
fi
BOOT_START=2048
ROOT_START=
case "$PLATFORM" in
pinebookpro*)
BOOT_START=32768
# Without this, sfdisk creates root partition starting at
# 2048, overlapping u-boot reserved space and boot partition.
ROOT_START=$BOOT_START
;;
esac
case "$PLATFORM" in
cubieboard2|cubietruck|ci20*|odroid-c2*)
# These platforms use a single partition for the entire filesystem.
sfdisk "${FILENAME}" <<_EOF
label: dos
2048,,L
_EOF
LOOPDEV=$(losetup --show --find --partscan "$FILENAME")
mkfs.${ROOT_FSTYPE} -O '^64bit,^extra_isize,^has_journal' "${LOOPDEV}p1" >/dev/null 2>&1
mount "${LOOPDEV}p1" "$ROOTFS"
ROOT_UUID=$(blkid -o value -s UUID "${LOOPDEV}p1")
;;
*)
# These platforms use a partition layout with a small boot
# partition (64M by default) and the rest of the space as the
# root filesystem. This is the generally preferred disk
# layout for new platforms.
sfdisk "${FILENAME}" <<_EOF
label: dos
${BOOT_START},${BOOT_FSSIZE},b,*
${ROOT_START},+,L
_EOF
LOOPDEV=$(losetup --show --find --partscan "$FILENAME")
# Normally we need to quote to prevent argument splitting, but
# we explicitly want argument splitting here.
# shellcheck disable=SC2086
mkfs.${BOOT_FSTYPE} $_args "${LOOPDEV}p1" >/dev/null
case "$ROOT_FSTYPE" in
# Because the images produced by this script are generally
# either on single board computers using flash memory or
# in cloud environments that already provide disk
# durability, we shut off the journal for ext filesystems.
# For flash memory this greatly extends the life of the
# memory and for cloud images this lowers the overhead by
# a small amount.
ext[34]) disable_journal="-O ^has_journal";;
esac
mkfs.${ROOT_FSTYPE} "$disable_journal" "${LOOPDEV}p2" >/dev/null 2>&1
mount "${LOOPDEV}p2" "$ROOTFS"
mkdir -p "${ROOTFS}/boot"
mount "${LOOPDEV}p1" "${ROOTFS}/boot"
BOOT_UUID=$(blkid -o value -s UUID "${LOOPDEV}p1")
ROOT_UUID=$(blkid -o value -s UUID "${LOOPDEV}p2")
;;
esac
# This step unpacks the platformfs tarball made by mkplatformfs.sh.
info_msg "Unpacking rootfs tarball ..."
if [ "$PLATFORM" = "beaglebone" ]; then
# The beaglebone requires some special extra handling. The MLO
# program is a special first stage boot loader that brings up
# enough of the processor to then load u-boot which loads the rest
# of the system. The noauto option also prevents /boot from being
# mounted during system startup.
fstab_args=",noauto"
tar xfp "$ROOTFS_TARBALL" -C "$ROOTFS" ./boot/MLO
tar xfp "$ROOTFS_TARBALL" -C "$ROOTFS" ./boot/u-boot.img
touch "$ROOTFS/boot/uEnv.txt"
umount "$ROOTFS/boot"
fi
# In the general case, its enough to just unpack the ROOTFS_TARBALL
# onto the ROOTFS. This will get a system that is ready to boot, save
# for the bootloader which is handled later.
tar xfp "$ROOTFS_TARBALL" --xattrs --xattrs-include='*' -C "$ROOTFS"
# For f2fs the system should not attempt an fsck at boot. This
# filesystem is in theory self healing and does not use the standard
# mechanisms. All other filesystems should use fsck at boot.
fspassno="1"
if [ "$ROOT_FSTYPE" = "f2fs" ]; then
fspassno="0"
fi
# Void images prefer uuids to nodes in /dev since these are not
# dependent on the hardware layout. On a single board computer this
# may not matter much but it makes the cloud images easier to manage.
echo "UUID=$ROOT_UUID / $ROOT_FSTYPE defaults 0 ${fspassno}" >> "${ROOTFS}/etc/fstab"
if [ -n "$BOOT_UUID" ]; then
echo "UUID=$BOOT_UUID /boot $BOOT_FSTYPE defaults${fstab_args} 0 2" >> "${ROOTFS}/etc/fstab"
fi
# Images are shipped with root as the only user by default, so we need to
# ensure ssh login is possible for headless setups.
sed -i "${ROOTFS}/etc/ssh/sshd_config" -e 's|^#\(PermitRootLogin\) .*|\1 yes|g'
# This section does final configuration on the images. In the case of
# SBCs this writes the bootloader to the image or sets up other
# required binaries to boot. In the case of images destined for a
# Cloud, this sets up the services that the cloud will expect to be
# running and a suitable bootloader. When adding a new platform,
# please add a comment explaining what the steps you are adding do,
# and where information about your specific platform's boot process
# can be found.
info_msg "Configuring image for platform $PLATFORM"
case "$PLATFORM" in
bananapi*|cubieboard2*|cubietruck*)
dd if="${ROOTFS}/boot/u-boot-sunxi-with-spl.bin" of="${LOOPDEV}" bs=1024 seek=8 >/dev/null 2>&1
;;
odroid-c2*)
dd if="${ROOTFS}/boot/bl1.bin.hardkernel" of="${LOOPDEV}" bs=1 count=442 >/dev/null 2>&1
dd if="${ROOTFS}/boot/bl1.bin.hardkernel" of="${LOOPDEV}" bs=512 skip=1 seek=1 >/dev/null 2>&1
dd if="${ROOTFS}/boot/u-boot.bin" of="${LOOPDEV}" bs=512 seek=97 >/dev/null 2>&1
;;
odroid-u2*)
dd if="${ROOTFS}/boot/E4412_S.bl1.HardKernel.bin" of="${LOOPDEV}" seek=1 >/dev/null 2>&1
dd if="${ROOTFS}/boot/bl2.signed.bin" of="${LOOPDEV}" seek=31 >/dev/null 2>&1
dd if="${ROOTFS}/boot/u-boot.bin" of="${LOOPDEV}" seek=63 >/dev/null 2>&1
dd if="${ROOTFS}/boot/E4412_S.tzsw.signed.bin" of="${LOOPDEV}" seek=2111 >/dev/null 2>&1
;;
usbarmory*)
dd if="${ROOTFS}/boot/u-boot.imx" of="${LOOPDEV}" bs=512 seek=2 conv=fsync >/dev/null 2>&1
;;
ci20*)
dd if="${ROOTFS}/boot/u-boot-spl.bin" of="${LOOPDEV}" obs=512 seek=1 >/dev/null 2>&1
dd if="${ROOTFS}/boot/u-boot.img" of="${LOOPDEV}" obs=1K seek=14 >/dev/null 2>&1
;;
pinebookpro*)
dd if="${ROOTFS}/boot/idbloader.img" of="${LOOPDEV}" seek=64 conv=notrunc,fsync >/dev/null 2>&1
dd if="${ROOTFS}/boot/u-boot.itb" of="${LOOPDEV}" seek=16384 conv=notrunc,fsync >/dev/null 2>&1
run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f pinebookpro-kernel"
cleanup_chroot
;;
GCP*)
# Google Cloud Platform image configuration for Google Cloud
# Engine. The steps below are built in reference to the
# documentation on building custom images available here:
# https://cloud.google.com/compute/docs/images/import-existing-image
# The images produced by this script are ready to upload and boot.
# Setup GRUB
mount_pseudofs
run_cmd_chroot "${ROOTFS}" "grub-install ${LOOPDEV}"
sed -i "s:page_poison=1:page_poison=1 console=ttyS0,38400n8d:" "${ROOTFS}/etc/default/grub"
run_cmd_chroot "${ROOTFS}" update-grub
# Setup the GCP Guest services
for _service in dhcpcd sshd agetty-console nanoklogd socklog-unix GCP-Guest-Initialization GCP-accounts GCP-clock-skew GCP-ip-forwarding ; do
run_cmd_chroot "${ROOTFS}" "ln -sv /etc/sv/$_service /etc/runit/runsvdir/default/$_service"
done
# Turn off the agetty's since we can't use them anyway
rm -v "${ROOTFS}/etc/runit/runsvdir/default/agetty-tty"*
# Disable root login over ssh and lock account
sed -i "s:PermitRootLogin yes:PermitRootLogin no:" "${ROOTFS}/etc/ssh/sshd_config"
run_cmd_chroot "${ROOTFS}" "passwd -l root"
# Set the Timezone
run_cmd_chroot "${ROOTFS}" "ln -svf /usr/share/zoneinfo/UTC /etc/localtime"
# Generate glibc-locales if necessary (this is a noop on musl)
if [ "$PLATFORM" = GCP ] ; then
run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f glibc-locales"
fi
# Remove SSH host keys (these will get rebuilt on first boot)
rm -f "${ROOTFS}/etc/ssh/*key*"
rm -f "${ROOTFS}/etc/ssh/moduli"
# Force the hostname since this isn't read from DHCP
echo void-GCE > "${ROOTFS}/etc/hostname"
# Cleanup the chroot from anything that was setup for the
# run_cmd_chroot commands
cleanup_chroot
;;
esac
# Release all the mounts, deconfigure the loop device, and remove the
# rootfs mountpoint. Since this was just a mountpoint it should be
# empty. If it contains stuff we bail out here since something went
# very wrong.
umount -R "$ROOTFS"
losetup -d "$LOOPDEV"
rmdir "$ROOTFS" || die "$ROOTFS not empty!"
# We've been working with this as root for a while now, so this makes
# sure the permissions are sane.
chmod 644 "$FILENAME"
# The standard images are ready to go, but the cloud images require
# some minimal additional post processing.
case "$PLATFORM" in
GCP*)
# This filename is mandated by the Google Cloud Engine import
# process, the archive name is not.
mv "$FILENAME" disk.raw
info_msg "Compressing disk.raw"
tar Sczf "${FILENAME%.img}.tar.gz" disk.raw
# Since this process just produces something that can be
# uploaded, we remove the original disk image.
rm disk.raw
info_msg "Sucessfully created ${FILENAME%.img}.tar.gz image."
;;
*)
info_msg "Compressing $FILENAME with xz (level 9 compression)"
xz "-T${COMPRESSOR_THREADS:-0}" -9 "$FILENAME"
info_msg "Successfully created $FILENAME image."
;;
esac

767
mklive.sh.in Normal file → Executable file
View File

@@ -1,6 +1,9 @@
#!/bin/sh
#
# vim: set ts=4 sw=4 et:
#
#-
# Copyright (c) 2009-2012 Juan Romero Pardines.
# Copyright (c) 2009-2015 Juan Romero Pardines.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -23,442 +26,408 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
trap "echo; error_out $?" INT QUIT
trap 'error_out $? $LINENO' INT TERM 0
umask 022
readonly REQUIRED_PKGS="base-files libgcc dash coreutils sed tar gawk syslinux grub-i386-efi grub-x86_64-efi squashfs-tools xorriso"
readonly INITRAMFS_PKGS="binutils xz device-mapper dhclient dracut-network"
readonly PROGNAME=$(basename "$0")
info_msg() {
printf "\033[1m$@\n\033[m"
printf "\033[1m$@\n\033[m"
}
die() {
info_msg "ERROR: $@"
error_out 1 $LINENO
}
print_step() {
CURRENT_STEP=$((CURRENT_STEP+1))
info_msg "[${CURRENT_STEP}/${STEP_COUNT}] $@"
}
mount_pseudofs() {
local fs
for fs in sys proc dev; do
if [ ! -d "$ROOTFS/$fs" ]; then
mkdir -p "$ROOTFS/$fs"
fi
mount --bind /$fs "$ROOTFS/$fs" || error_out $?
done
for f in sys dev proc; do
mkdir -p "$ROOTFS"/$f
mount --bind /$f "$ROOTFS"/$f
done
}
umount_pseudofs() {
local fs
for fs in sys proc dev; do
umount -f "$ROOTFS/$fs" >/dev/null 2>&1
done
umount -f "$ROOTFS"/sys >/dev/null 2>&1
umount -f "$ROOTFS"/dev >/dev/null 2>&1
umount -f "$ROOTFS"/proc >/dev/null 2>&1
}
error_out() {
umount_pseudofs
info_msg "There was an error! cleaning up $BUILDDIR, exiting..."
[ -d "$BUILDDIR" ] && rm -rf "$BUILDDIR"
[ -f "$LOGFILE" ] && rm -f "$LOGFILE"
exit 1
umount_pseudofs
[ -d "$BUILDDIR" -a -z "$KEEP_BUILDDIR" ] && rm -rf "$BUILDDIR"
exit "${1:=0}"
}
write_etc_motd() {
cat >> "$ROOTFS/etc/motd" <<_EOF
###############################################################################
Autogenerated by void-mklive @@MKLIVE_VERSION@@
-------------------------------------------------------------------------------
Welcome to the Void Linux Live system, you have been autologged in.
This user has full sudo(8) permissions without any password, be careful
executing commands through sudo(8).
To play with package management use the xbps-bin(8) and xbps-repo(8)
utilities. Please visit:
http://code.google.com/p/xbps/
for more information and/or documentation about using the X Binary
Package System. If you think it is useful, please make a donation
to improve further development from the above URL, thanks.
To start the installation please type:
$ sudo void-installer
and follow the on-screen instructions. Thanks for trying Void Linux.
###############################################################################
_EOF
}
write_default_isolinux_conf() {
local kver="$1"
if [ -r "$SPLASH_IMAGE" ]; then
BACKGROUND="MENU BACKGROUND $(basename $SPLASH_IMAGE)"
fi
cat >> "$ISOLINUX_CFG" << _EOF
UI vesamenu.c32
PROMPT 0
TIMEOUT 100
ONTIMEOUT linux
MENU TABMSG Press ENTER to boot or TAB to edit a menu entry
MENU AUTOBOOT BIOS default device boot in # second{,s}...
$BACKGROUND
MENU WIDTH 78
MENU MARGIN 1
MENU ROWS 4
MENU VSHIFT 2
MENU TIMEOUTROW 8
MENU TABMSGROW 2
MENU CMDLINEROW 11
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
MENU COLOR title * #FF5255FF *
MENU COLOR border * #00000000 #00000000 none
MENU COLOR sel * #ffffffff #FF5255FF *
LABEL linux
MENU LABEL Boot Void GNU/Linux ${kver} ($(uname -m))
KERNEL vmlinuz
APPEND initrd=initrd.lz root=live:CDLABEL=VoidLinux-live-$(uname -m)-${kver} \
rootfstype=auto ro liveimg rd.luks=0 rd.md=0 rd.dm=0 \
vconsole.keymap=${KEYMAP} vconsole.unicode=1 locale.LANG=${LOCALE}
LABEL c
MENU LABEL Boot first HD found by BIOS
LOCALBOOT 0x80
_EOF
}
write_conf_file() {
cat > "$1" <<_EOF
# *-*- sh -*-*
# Default configuration file for vmklive-@VERSION@.
#
# List of packages to be installed into the live image.
# At least 'base-system' or 'base-system-live' is required.
PACKAGE_LIST="base-system-live"
# Syslinux splash image.
SPLASH_IMAGE=/usr/share/void-artwork/splash.png
# Default keymap to use.
KEYMAP=us
# Default locale to use.
LOCALE=en_US
# Path to XBPS utilities.
#XBPS_BIN_CMD=xbps-bin
#XBPS_REPO_CMD=xbps-repo
#XBPS_UHELPER_CMD=xbps-uhelper
# XBPS cache directory to install packages from.
#REPOSITORY_CACHE=/blah/foo
_EOF
chmod 644 "$1"
}
usage()
{
cat <<_EOF
Usage: $(basename $0) [options]
usage() {
cat <<_EOF
Usage: $PROGNAME [options]
Options:
-C file Path to configuration file (defaults to ~/.mklive.conf)
-c (gzip|bzip2|xz) Compression type for the squashfs/initramfs image.
-k version Kernel version to use.
-o outfile Output file name for the ISO image.
-s splash Splash image file for isolinux.
-v volname ISO Volume name.
-a <xbps-arch> Set XBPS_ARCH (do not use it unless you know what it is)
-b <system-pkg> Set an alternative base-system package (defaults to base-system).
-r <repo-url> Use this XBPS repository (may be specified multiple times).
-c <cachedir> Use this XBPS cache directory (a subdirectory of current
directory if unset).
-k <keymap> Default keymap to use (us if unset)
-l <locale> Default locale to use (en_US.UTF-8 if unset).
-i <lz4|gzip|bzip2|xz> Compression type for the initramfs image (xz if unset).
-s <gzip|lzo|xz> Compression type for the squashfs image (xz if unset)
-o <file> Output file name for the ISO image (auto if unset).
-p "pkg pkgN ..." Install additional packages into the ISO image.
-I <includedir> Include directory structure under given path into rootfs
-C "cmdline args" Add additional kernel command line arguments.
-T "title" Modify the bootloader title.
-v linux<version> Install a custom Linux version on ISO image (linux meta-package if unset).
-K Do not remove builddir.
The $PROGNAME script generates a live image of the Void Linux distribution.
This ISO image can be written to a CD/DVD-ROM or any USB stick.
_EOF
exit 1
exit 1
}
copy_void_keys() {
mkdir -p "$1"/var/db/xbps/keys
cp keys/*.plist "$1"/var/db/xbps/keys
}
copy_void_conf() {
install -Dm644 data/void-vpkgs.conf "$1"/usr/share/xbps.d/void-virtualpkgs.conf
}
copy_dracut_files() {
mkdir -p "$1"/usr/lib/dracut/modules.d/01vmklive
cp dracut/vmklive/* "$1"/usr/lib/dracut/modules.d/01vmklive/
}
copy_autoinstaller_files() {
mkdir -p "$1"/usr/lib/dracut/modules.d/01autoinstaller
cp dracut/autoinstaller/* "$1"/usr/lib/dracut/modules.d/01autoinstaller/
}
install_prereqs() {
copy_void_conf "$VOIDHOSTDIR"
XBPS_ARCH=$ARCH "$XBPS_INSTALL_CMD" -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} \
-c "$XBPS_HOST_CACHEDIR" -y $REQUIRED_PKGS
[ $? -ne 0 ] && die "Failed to install required software, exiting..."
}
install_packages() {
copy_void_conf "$ROOTFS"
XBPS_ARCH=$BASE_ARCH "${XBPS_INSTALL_CMD}" -r "$ROOTFS" \
${XBPS_REPOSITORY} -c "$XBPS_CACHEDIR" -yn $PACKAGE_LIST $INITRAMFS_PKGS
[ $? -ne 0 ] && die "Missing required binary packages, exiting..."
mount_pseudofs
LANG=C XBPS_ARCH=$BASE_ARCH "${XBPS_INSTALL_CMD}" -U -r "$ROOTFS" \
${XBPS_REPOSITORY} -c "$XBPS_CACHEDIR" -y $PACKAGE_LIST $INITRAMFS_PKGS
[ $? -ne 0 ] && die "Failed to install $PACKAGE_LIST"
xbps-reconfigure -r "$ROOTFS" -f base-files >/dev/null 2>&1
chroot "$ROOTFS" env -i xbps-reconfigure -f base-files
# Enable choosen UTF-8 locale and generate it into the target rootfs.
if [ -f "$ROOTFS"/etc/default/libc-locales ]; then
sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i "$ROOTFS"/etc/default/libc-locales
fi
chroot "$ROOTFS" env -i xbps-reconfigure -a
if [ -x installer.sh ]; then
install -Dm755 installer.sh "$ROOTFS"/usr/sbin/void-installer
else
install -Dm755 /usr/sbin/void-installer "$ROOTFS"/usr/sbin/void-installer
fi
# Cleanup and remove useless stuff.
rm -rf "$ROOTFS"/var/cache/* "$ROOTFS"/run/* "$ROOTFS"/var/run/*
}
copy_include_directory() {
find "$INCLUDE_DIRECTORY" -mindepth 1 -maxdepth 1 -exec cp -rfpPv {} "$ROOTFS"/ \;
}
generate_initramfs() {
local _args
copy_dracut_files "$ROOTFS"
copy_autoinstaller_files "$ROOTFS"
chroot "$ROOTFS" env -i /usr/bin/dracut -N --"${INITRAMFS_COMPRESSION}" \
--add-drivers "ahci" --force-add "vmklive autoinstaller" --omit systemd "/boot/initrd" $KERNELVERSION
[ $? -ne 0 ] && die "Failed to generate the initramfs"
mv "$ROOTFS"/boot/initrd "$BOOT_DIR"
cp "$ROOTFS"/boot/vmlinuz-$KERNELVERSION "$BOOT_DIR"/vmlinuz
}
cleanup_rootfs() {
for f in ${INITRAMFS_PKGS}; do
revdeps=$(xbps-query -r "$ROOTFS" -X $f)
if [ -n "$revdeps" ]; then
xbps-pkgdb -r "$ROOTFS" -m auto $f
else
xbps-remove -r "$ROOTFS" -Ry ${f} >/dev/null 2>&1
fi
done
rm -r "$ROOTFS"/usr/lib/dracut/modules.d/01vmklive
rm -r "$ROOTFS"/usr/lib/dracut/modules.d/01autoinstaller
}
generate_isolinux_boot() {
cp -f "$SYSLINUX_DATADIR"/isolinux.bin "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/ldlinux.c32 "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/libcom32.c32 "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/vesamenu.c32 "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/libutil.c32 "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/chain.c32 "$ISOLINUX_DIR"
cp -f isolinux/isolinux.cfg.in "$ISOLINUX_DIR"/isolinux.cfg
cp -f ${SPLASH_IMAGE} "$ISOLINUX_DIR"
sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE}")|" \
-e "s|@@KERNVER@@|${KERNELVERSION}|" \
-e "s|@@KEYMAP@@|${KEYMAP}|" \
-e "s|@@ARCH@@|$BASE_ARCH|" \
-e "s|@@LOCALE@@|${LOCALE}|" \
-e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \
-e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \
"$ISOLINUX_DIR"/isolinux.cfg
}
generate_grub_efi_boot() {
cp -f grub/grub.cfg "$GRUB_DIR"
cp -f grub/grub_void.cfg.in "$GRUB_DIR"/grub_void.cfg
sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE}")|" \
-e "s|@@KERNVER@@|${KERNELVERSION}|" \
-e "s|@@KEYMAP@@|${KEYMAP}|" \
-e "s|@@ARCH@@|$BASE_ARCH|" \
-e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \
-e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \
-e "s|@@LOCALE@@|${LOCALE}|" "$GRUB_DIR"/grub_void.cfg
mkdir -p "$GRUB_DIR"/fonts
cp -f "$GRUB_DATADIR"/unicode.pf2 "$GRUB_DIR"/fonts
modprobe -q loop || :
# Create EFI vfat image.
truncate -s 32M "$GRUB_DIR"/efiboot.img >/dev/null 2>&1
mkfs.vfat -F12 -S 512 -n "grub_uefi" "$GRUB_DIR/efiboot.img" >/dev/null 2>&1
GRUB_EFI_TMPDIR="$(mktemp --tmpdir="$HOME" -d)"
LOOP_DEVICE="$(losetup --show --find "${GRUB_DIR}"/efiboot.img)"
mount -o rw,flush -t vfat "${LOOP_DEVICE}" "${GRUB_EFI_TMPDIR}" >/dev/null 2>&1
cp -a "$IMAGEDIR"/boot "$VOIDHOSTDIR"
xbps-uchroot "$VOIDHOSTDIR" grub-mkstandalone -- \
--directory="/usr/lib/grub/i386-efi" \
--format="i386-efi" \
--output="/tmp/bootia32.efi" \
"boot/grub/grub.cfg"
if [ $? -ne 0 ]; then
umount "$GRUB_EFI_TMPDIR"
losetup --detach "${LOOP_DEVICE}"
die "Failed to generate EFI loader"
fi
mkdir -p "${GRUB_EFI_TMPDIR}"/EFI/BOOT
cp -f "$VOIDHOSTDIR"/tmp/bootia32.efi "${GRUB_EFI_TMPDIR}"/EFI/BOOT/BOOTIA32.EFI
xbps-uchroot "$VOIDHOSTDIR" grub-mkstandalone -- \
--directory="/usr/lib/grub/x86_64-efi" \
--format="x86_64-efi" \
--output="/tmp/bootx64.efi" \
"boot/grub/grub.cfg"
if [ $? -ne 0 ]; then
umount "$GRUB_EFI_TMPDIR"
losetup --detach "${LOOP_DEVICE}"
die "Failed to generate EFI loader"
fi
cp -f "$VOIDHOSTDIR"/tmp/bootx64.efi "${GRUB_EFI_TMPDIR}"/EFI/BOOT/BOOTX64.EFI
umount "$GRUB_EFI_TMPDIR"
losetup --detach "${LOOP_DEVICE}"
rm -rf "$GRUB_EFI_TMPDIR"
}
generate_squashfs() {
umount_pseudofs
# Find out required size for the rootfs and create an ext3fs image off it.
ROOTFS_SIZE=$(du -sm "$ROOTFS"|awk '{print $1}')
mkdir -p "$BUILDDIR/tmp/LiveOS"
truncate -s "$((ROOTFS_SIZE+ROOTFS_SIZE/6))M" \
"$BUILDDIR"/tmp/LiveOS/ext3fs.img >/dev/null 2>&1
mkdir -p "$BUILDDIR/tmp-rootfs"
mkfs.ext3 -F -m1 "$BUILDDIR/tmp/LiveOS/ext3fs.img" >/dev/null 2>&1
mount -o loop "$BUILDDIR/tmp/LiveOS/ext3fs.img" "$BUILDDIR/tmp-rootfs"
cp -a "$ROOTFS"/* "$BUILDDIR"/tmp-rootfs/
umount -f "$BUILDDIR/tmp-rootfs"
mkdir -p "$IMAGEDIR/LiveOS"
"$VOIDHOSTDIR"/usr/bin/mksquashfs "$BUILDDIR/tmp" "$IMAGEDIR/LiveOS/squashfs.img" \
-comp "${SQUASHFS_COMPRESSION}" || die "Failed to generate squashfs image"
chmod 444 "$IMAGEDIR/LiveOS/squashfs.img"
# Remove rootfs and temporary dirs, we don't need them anymore.
rm -rf "$ROOTFS" "$BUILDDIR/tmp-rootfs" "$BUILDDIR/tmp"
}
generate_iso_image() {
"$VOIDHOSTDIR"/usr/bin/xorriso -as mkisofs \
-iso-level 3 -rock -joliet \
-max-iso9660-filenames -omit-period \
-omit-version-number -relaxed-filenames -allow-lowercase \
-volid "VOID_LIVE" \
-eltorito-boot boot/isolinux/isolinux.bin \
-eltorito-catalog boot/isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e boot/grub/efiboot.img -isohybrid-gpt-basdat -no-emul-boot \
-isohybrid-mbr "$SYSLINUX_DATADIR"/isohdpfx.bin \
-output "$OUTPUT_FILE" "$IMAGEDIR" || die "Failed to generate ISO image"
}
#
# main()
#
while getopts "C:c:k:o:s:v:h" opt; do
case $opt in
C) CONFIG_FILE="$OPTARG";;
c) COMPRESSTYPE="$OPTARG";;
k) KERNELVERSION="$OPTARG";;
o) OUTPUT_FILE="$OPTARG";;
s) SPLASH_IMAGE="$OPTARG";;
v) ISO_VOLUME="$OPTARG";;
h) usage;;
esac
while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:v:h" opt; do
case $opt in
a) BASE_ARCH="$OPTARG";;
b) BASE_SYSTEM_PKG="$OPTARG";;
r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";;
c) XBPS_CACHEDIR="$OPTARG";;
K) readonly KEEP_BUILDDIR=1;;
k) KEYMAP="$OPTARG";;
l) LOCALE="$OPTARG";;
i) INITRAMFS_COMPRESSION="$OPTARG";;
I) INCLUDE_DIRECTORY="$OPTARG";;
s) SQUASHFS_COMPRESSION="$OPTARG";;
S) ROOTFS_FREESIZE="$OPTARG";;
o) OUTPUT_FILE="$OPTARG";;
p) PACKAGE_LIST="$OPTARG";;
C) BOOT_CMDLINE="$OPTARG";;
T) BOOT_TITLE="$OPTARG";;
v) LINUX_VERSION="$OPTARG";;
h) usage;;
*) usage;;
esac
done
shift $(($OPTIND - 1))
shift $((OPTIND - 1))
XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=http://alpha.de.repo.voidlinux.org/current --repository=http://alpha.de.repo.voidlinux.org/current/musl"
# Configure dracut to use overlayfs for the writable overlay.
BOOT_CMDLINE="$BOOT_CMDLINE rd.live.overlay.overlayfs=1 "
if [ -z "$KERNELVERSION" ]; then
KERNELVERSION="$(uname -r)"
fi
ARCH=$(xbps-uhelper arch)
# Set defaults
if [ -z "$CONFIG_FILE" ]; then
CONFIG_FILE="$HOME/.mklive.conf"
fi
if [ -z "$OUTPUT_FILE" ]; then
OUTPUT_FILE="$HOME/void-live-$(uname -m)-${KERNELVERSION}-$(date +%Y%m%d).iso"
fi
LOGFILE="$(mktemp -t vmklive-XXXXXXXXXX.log)"
: ${BASE_ARCH:=$(xbps-uhelper arch 2>/dev/null || uname -m)}
: ${XBPS_CACHEDIR:="$(pwd -P)"/xbps-cachedir-${BASE_ARCH}}
: ${XBPS_HOST_CACHEDIR:="$(pwd -P)"/xbps-cachedir-${ARCH}}
: ${KEYMAP:=us}
: ${LOCALE:=en_US.UTF-8}
: ${INITRAMFS_COMPRESSION:=xz}
: ${SQUASHFS_COMPRESSION:=xz}
: ${BASE_SYSTEM_PKG:=base-system}
: ${BOOT_TITLE:="Void Linux"}
if [ -z "$ISO_VOLUME" ]; then
ISO_VOLUME="VoidLinux-live-$(uname -m)-${KERNELVERSION}"
fi
if [ -z "$SYSLINUX_DATADIR" ]; then
SYSLINUX_DATADIR=/usr/share/syslinux
fi
if [ -z "$SPLASH_IMAGE" ]; then
SPLASH_IMAGE=/usr/share/void-artwork/splash.png
fi
if [ -z "$XBPS_REPO_CMD" ]; then
XBPS_REPO_CMD=xbps-repo
fi
if [ -z "$XBPS_BIN_CMD" ]; then
XBPS_BIN_CMD=xbps-bin
fi
if [ -z "$XBPS_UHELPER_CMD" ]; then
XBPS_UHELPER_CMD=xbps-uhelper
fi
if [ -z "$COMPRESSTYPE" ]; then
COMPRESSTYPE=xz
fi
# Create or read configuration file.
if [ ! -r $CONFIG_FILE ]; then
info_msg "Creating config file at $CONFIG_FILE."
write_conf_file $CONFIG_FILE
fi
. $CONFIG_FILE
if [ -z "$PACKAGE_LIST" ]; then
PACKAGE_LIST="base-system-live"
else
PACKAGE_LIST="$PACKAGE_LIST"
fi
if [ ! -f $SYSLINUX_DATADIR/isolinux.bin ]; then
echo "Missing required isolinux files in $SYSLINUX_DATADIR, exiting..."
exit 1
fi
# Required packages in the image for a working system.
PACKAGE_LIST="$BASE_SYSTEM_PKG $PACKAGE_LIST"
# Check for root permissions.
if [ "$(id -u)" -ne 0 ]; then
echo "Must be run as root, exiting..."
exit 1
die "Must be run as root, exiting..."
fi
BUILDDIR=$(mktemp --tmpdir=$HOME -d) || exit 1
BUILDDIR=$(readlink -f $BUILDDIR)
ROOTFS="$BUILDDIR/rootfs"
ISOLINUX_DIR="$BUILDDIR/isolinux"
ISOLINUX_CFG="$ISOLINUX_DIR/isolinux.cfg"
#
# Check there are repos registered before anything.
#
${XBPS_REPO_CMD} list >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "No repositories available, exiting..."
error_out
fi
#
# Mount pseudofs in the target rootfs.
#
mount_pseudofs
mkdir -p "$ROOTFS/tmp"
mkdir -p "$ISOLINUX_DIR"
XBPS_ARGS="-r $ROOTFS -y"
if [ -n "$REPOSITORY_CACHE" ]; then
XBPS_ARGS="$XBPS_ARGS -c $REPOSITORY_CACHE"
fi
XBPS_VERSION=$($XBPS_BIN_CMD -V|awk '{print $2}')
case $XBPS_VERSION in
# XBPS >= 0.16
[0-9].[1-9][6-9]*) XBPS_016=1;;
esac
info_msg "Redirecting stdout/stderr to $LOGFILE ..."
info_msg "[1/9] Installing packages into the rootfs..."
for f in ${PACKAGE_LIST}; do
info_msg " $f"
done
# Check that all pkgs are reachable.
${XBPS_BIN_CMD} ${XBPS_ARGS} -n install ${PACKAGE_LIST} >>$LOGFILE 2>&1
if [ $? -ne 0 ]; then
info_msg "Missing required binary packages, exiting..."
error_out
fi
${XBPS_BIN_CMD} ${XBPS_ARGS} install ${PACKAGE_LIST} \
2>&1|cat >> $LOGFILE || error_out
${XBPS_BIN_CMD} ${XBPS_ARGS} autoupdate \
2>&1|cat >> $LOGFILE || error_out
${XBPS_BIN_CMD} ${XBPS_ARGS} autoremove \
2>&1|cat >> $LOGFILE || error_out
${XBPS_BIN_CMD} -r "$ROOTFS" list > \
"${OUTPUT_FILE%.iso}"-package-list.txt || error_out
#
# Prepare /etc/motd.
#
info_msg "[2/9] Creating /etc/motd..."
mkdir -p "$ROOTFS"/etc
write_etc_motd
#
# Create the initramfs with XZ compression.
#
info_msg "[3/9] Creating initramfs image ($COMPRESSTYPE)..."
dracut --no-hostonly --add "dmsquash-live vmklive" --${COMPRESSTYPE} \
"${ISOLINUX_DIR}/initrd.lz" ${KERNELVERSION} 2>/dev/null || error_out
#
# Copy the linux image to the target directory.
#
info_msg "[4/9] Copying kernel image/modules..."
cp -f /boot/vmlinuz-${KERNELVERSION} "${ISOLINUX_DIR}/vmlinuz" || error_out $?
mkdir -p "$ROOTFS/lib/modules"
cp -a /lib/modules/${KERNELVERSION} "$ROOTFS/lib/modules" || error_out $?
# Generate a sane xbps.conf for the rootfs.
rm -f $ROOTFS/etc/xbps/xbps.conf
echo "# xbps.conf generated by void-mklive-@@MKLIVE_VERSION@@" \
> $ROOTFS/etc/xbps/xbps.conf
echo "TransactionFrequencyFlush = 0" \
>> $ROOTFS/etc/xbps/xbps.conf
echo "virtual-package rsyslog { targets = syslog-daemon-0 }" \
>> $ROOTFS/etc/xbps/xbps.conf
echo "virtual-package dcron { targets = cron-daemon-0 }" \
>> $ROOTFS/etc/xbps/xbps.conf
echo "virtual-package kmod { targets = module-init-tools-3.17 }" \
>> $ROOTFS/etc/xbps/xbps.conf
_devel=$($XBPS_UHELPER_CMD -r $ROOTFS version xbps-devel)
if [ -n "${_devel}" ]; then
echo "virtual-package xbps-devel { targets = xbps-9999 }" \
>> $ROOTFS/etc/xbps/xbps.conf
fi
# Generate a conf for local repositories.
cat > $ROOTFS/etc/xbps/local-repos.conf <<_EOF
repositories = {
# XBPS >= 0.16
/packages,
# XBPS < 0.16
/packages/noarch,
/packages/i686,
/packages/x86_64
}
_EOF
# Generate a conf for remote repositories.
cat > $ROOTFS/etc/xbps/network-repos.conf <<_EOF
repositories = {
# XBPS >= 0.16
http://xbps.hosting-unlimited.org/binpkgs,
http://xbps.goodluckwith.us/binpkgs,
http://xbps.nopcode.org/repos/current,
# XBPS < 0.16
http://xbps.goodluckwith.us/binpkgs/i686,
http://xbps.goodluckwith.us/binpkgs/noarch,
http://xbps.goodluckwith.us/binpkgs/nonfree/i686,
http://xbps.nopcode.org/repos/current/x86_64,
http://xbps.nopcode.org/repos/current/noarch,
http://xbps.nopcode.org/repos/current/nonfree/x86_64
}
_EOF
chmod 644 $ROOTFS/etc/xbps/*.conf || error_out $?
# Create local repos for base-system and grub packages required by
# the void-installer pkg.
pkgs=$($XBPS_BIN_CMD -r /tmp/blah -n install base-system grub)
set -- ${pkgs}
while [ $# -ne 0 ]; do
pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5; arch=$6
if [ -z "$XBPS_016" ]; then
arch=$(basename $repo)
shift 5
else
shift 6
fi
mkdir -p $ROOTFS/packages/$arch
bpkg=$repo/$arch/$binpkg
cp -f $bpkg $ROOTFS/packages/$arch
done
if [ -n "$XBPS_016" ]; then
$XBPS_REPO_CMD genindex $ROOTFS/packages 2>&1 >>$LOGFILE
rm -f $ROOTFS/packages/index-files.plist
if [ -n "$ROOTDIR" ]; then
BUILDDIR=$(mktemp --tmpdir="$ROOTDIR" -d)
else
for f in $ROOTFS_REPODIR/*; do
${XBPS_REPO_CMD} genindex $f 2>&1 >>$LOGFILE
rm -f $f/rindex-files.plist
done
BUILDDIR=$(mktemp --tmpdir="$(pwd -P)" -d)
fi
BUILDDIR=$(readlink -f "$BUILDDIR")
IMAGEDIR="$BUILDDIR/image"
ROOTFS="$IMAGEDIR/rootfs"
VOIDHOSTDIR="$BUILDDIR/void-host"
BOOT_DIR="$IMAGEDIR/boot"
ISOLINUX_DIR="$BOOT_DIR/isolinux"
GRUB_DIR="$BOOT_DIR/grub"
ISOLINUX_CFG="$ISOLINUX_DIR/isolinux.cfg"
CURRENT_STEP=0
STEP_COUNT=9
[ -n "${INCLUDE_DIRECTORY}" ] && STEP_COUNT=$((STEP_COUNT+1))
: ${SYSLINUX_DATADIR:="$VOIDHOSTDIR"/usr/lib/syslinux}
: ${GRUB_DATADIR:="$VOIDHOSTDIR"/usr/share/grub}
: ${SPLASH_IMAGE:=data/splash.png}
: ${XBPS_INSTALL_CMD:=xbps-install}
: ${XBPS_REMOVE_CMD:=xbps-remove}
: ${XBPS_QUERY_CMD:=xbps-query}
: ${XBPS_RINDEX_CMD:=xbps-rindex}
: ${XBPS_UHELPER_CMD:=xbps-uhelper}
: ${XBPS_RECONFIGURE_CMD:=xbps-reconfigure}
mkdir -p "$ROOTFS" "$VOIDHOSTDIR" "$ISOLINUX_DIR" "$GRUB_DIR"
print_step "Synchronizing XBPS repository data..."
copy_void_keys "$ROOTFS"
copy_void_keys "$VOIDHOSTDIR"
XBPS_ARCH=$BASE_ARCH $XBPS_INSTALL_CMD -r "$ROOTFS" ${XBPS_REPOSITORY} -S
XBPS_ARCH=$ARCH $XBPS_INSTALL_CMD -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} -S
# Get linux version for ISO
# If linux version option specified use
if [ -n "$LINUX_VERSION" ]; then
if ! echo "$LINUX_VERSION" | grep "linux[0-9._]*"; then
die "-v option must be in format linux<version>"
fi
_linux_series="$LINUX_VERSION"
PACKAGE_LIST="$PACKAGE_LIST $LINUX_VERSION"
else # Otherwise find latest stable version from linux meta-package
_linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x linux|head -1)
fi
# install lsblk and blkid from util-linux. to avoid installing
# the whole package.
_lsblk=$(which lsblk)
_blkid=$(which blkid)
install -Dm755 ${_lsblk} "$ROOTFS/usr/bin/lsblk" || error_out $?
install -Dm755 ${_blkid} "$ROOTFS/sbin/blkid" || error_out $?
_kver=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -p pkgver ${_linux_series})
KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver})
#
# The pseudofs aren't needed anymore in target rootfs.
#
umount_pseudofs
#
# Copy required isolinux files in the target rootfs.
#
info_msg "[5/9] Copying isolinux files..."
cp -f $SYSLINUX_DATADIR/isolinux.bin "$ISOLINUX_DIR"
cp -f $SYSLINUX_DATADIR/vesamenu.c32 "$ISOLINUX_DIR"
write_default_isolinux_conf ${KERNELVERSION}
if [ -f "$SPLASH_IMAGE" ]; then
cp -f $SPLASH_IMAGE "$ISOLINUX_DIR"
if [ "$?" -ne "0" ]; then
die "Failed to find kernel package version"
fi
#
# Prepare the squashed rootfs image.
#
info_msg "[6/9] Creating squashfs image ($COMPRESSTYPE) from rootfs..."
# Find out required size for the rootfs and create an ext3fs image off it.
ROOTFS_SIZE=$(du -sk "$ROOTFS"|awk '{print $1}')
mkdir -p "$BUILDDIR/tmp/LiveOS"
dd if=/dev/zero of="$BUILDDIR/tmp/LiveOS/ext3fs.img" \
bs="$((${ROOTFS_SIZE}+($ROOTFS_SIZE/6)))K" count=1 2>&1 | cat >>$LOGFILE || error_out $?
mkdir -p "$BUILDDIR/tmp-rootfs"
mkfs.ext3 -F -m1 "$BUILDDIR/tmp/LiveOS/ext3fs.img" 2>&1 | cat >>$LOGFILE || error_out $?
mount -o loop "$BUILDDIR/tmp/LiveOS/ext3fs.img" "$BUILDDIR/tmp-rootfs" || error_out $?
cd $BUILDDIR
cp -a rootfs/* tmp-rootfs/
umount -f "$BUILDDIR/tmp-rootfs"
mkdir -p "$BUILDDIR/LiveOS"
: ${OUTPUT_FILE="void-live-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"}
mksquashfs "$BUILDDIR/tmp" "$BUILDDIR/LiveOS/squashfs.img" \
-comp ${COMPRESSTYPE} 2>&1 | cat >> $LOGFILE || error_out
chmod 444 "$BUILDDIR/LiveOS/squashfs.img" || error_out $?
print_step "Installing software to generate the image: ${REQUIRED_PKGS} ..."
install_prereqs
info_msg "[7/9] Removing rootfs directory..."
rm -rf "$ROOTFS" "$BUILDDIR/tmp-rootfs" "$BUILDDIR/tmp" || error_out $?
mkdir -p "$ROOTFS"/etc
[ -s data/motd ] && cp data/motd "$ROOTFS"/etc
[ -s data/issue ] && cp data/issue "$ROOTFS"/etc
#
# Prepare the ISO image.
#
info_msg "[8/9] Building ISO image..."
mkisofs -J -r -V "$ISO_VOLUME" -b isolinux/isolinux.bin \
-c isolinux/boot.cat -no-emul-boot \
-boot-load-size 4 -boot-info-table \
-o "$OUTPUT_FILE" "$BUILDDIR" 2>&1 | cat >>$LOGFILE || error_out $?
print_step "Installing void pkgs into the rootfs: ${PACKAGE_LIST} ..."
install_packages
info_msg "[9/9] Removing build directory..."
rm -rf "$BUILDDIR" || error_out $?
if [ -n "${INCLUDE_DIRECTORY}" ];then
print_step "Copying directory structure into the rootfs: ${INCLUDE_DIRECTORY} ..."
copy_include_directory
fi
print_step "Generating initramfs image ($INITRAMFS_COMPRESSION)..."
generate_initramfs
print_step "Generating isolinux support for PC-BIOS systems..."
generate_isolinux_boot
print_step "Generating GRUB support for EFI systems..."
generate_grub_efi_boot
print_step "Cleaning up rootfs..."
cleanup_rootfs
print_step "Generating squashfs image ($SQUASHFS_COMPRESSION) from rootfs..."
generate_squashfs
print_step "Generating ISO image..."
generate_iso_image
hsize=$(du -sh "$OUTPUT_FILE"|awk '{print $1}')
info_msg "Created $(readlink -f $OUTPUT_FILE) ($hsize) successfully."
info_msg "Created $(readlink -f "$OUTPUT_FILE") ($hsize) successfully."
exit 0

274
mknet.sh.in Executable file
View File

@@ -0,0 +1,274 @@
#!/bin/sh
#
# vim: set ts=4 sw=4 et:
#
#-
# Copyright (c) 2009-2015 Juan Romero Pardines.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
readonly PROGNAME=$(basename "$0")
readonly REQTOOLS="xbps-install tar"
# This script needs to jump around, so we'll remember where we started
# so that we can get back here
readonly CURDIR="$(pwd)"
# This source pulls in all the functions from lib.sh. This set of
# functions makes it much easier to work with chroots and abstracts
# away all the problems with running binaries with QEMU.
# shellcheck source=./lib.sh
. ./lib.sh
# Die is a function provided in lib.sh which handles the cleanup of
# the mounts and removal of temporary directories if the running
# program exists unexpectedly.
trap 'bailout' INT TERM
bailout() {
[ -d "$BOOT_DIR" ] && rm -rf "$BOOT_DIR"
die "An unchecked exception has occured!"
}
usage() {
cat <<_EOF
Usage: $PROGNAME [options] <rootfs>
Options:
-r <repo-url> Use this XBPS repository (may be specified multiple times).
-c <cachedir> Use this XBPS cache directory.
-i <lz4|gzip|bzip2|xz> Compression type for the initramfs image (xz if unset).
-o <file> Output file name for the netboot tarball (auto if unset).
-K <kernelpkg> Use <kernelpkg> instead of 'linux' to build the image.
-k <keymap> Console keymap to set (us if unset)
-l <locale> Locale to set (en_US.UTF-8 if unset)
-C "cmdline args" Add additional kernel command line arguments.
-T "title" Modify the bootloader title.
-S "splash image" Set a custom splash image for the bootloader
The $PROGNAME script generates a network-bootable tarball of Void Linux
_EOF
exit 1
}
# ########################################
# SCRIPT EXECUTION STARTS HERE
# ########################################
while getopts "r:c:C:T:K:i:o:k:l:h" opt; do
case $opt in
r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";;
c) XBPS_CACHEDIR="--cachedir=$OPTARG";;
i) INITRAMFS_COMPRESSION="$OPTARG";;
K) KERNELPKG="$OPTARG";;
o) OUTPUT_FILE="$OPTARG";;
k) KEYMAP="$OPTARG";;
l) LOCALE="$OPTARG";;
C) BOOT_CMDLINE="$OPTARG";;
T) BOOT_TITLE="$OPTARG";;
S) SPLASH_IMAGE="OPTARG";;
h) usage;;
esac
done
shift $((OPTIND - 1))
BASE_TARBALL="$1"
# We need to infer the target architecture from the filename. All
# other scripts are able to get this from the platforms map because a
# platform is manually specified. Since the netboot tarballs target
# only architectures, its necessary to pull this information from the
# filename.
XBPS_TARGET_ARCH=${BASE_TARBALL%%-ROOTFS*}
XBPS_TARGET_ARCH=${XBPS_TARGET_ARCH##void-}
# Knowing the target arch, we can set the cache up if it hasn't
# already been set
set_cachedir
# This is an aweful hack since the script isn't using privesc
# mechanisms selectively. This is a TODO item.
if [ "$(id -u)" -ne 0 ]; then
die "need root perms to continue, exiting."
fi
# Before going any further, check that the tools that are needed are
# present. If we delayed this we could check for the QEMU binary, but
# its a reasonable tradeoff to just bail out now.
check_tools
# We need to operate on a tempdir, if this fails to create, it is
# absolutely crucial to bail out so that we don't hose the system that
# is running the script.
ROOTFS=$(mktemp -d) || die "failed to create ROOTFS tempdir, exiting..."
BOOT_DIR=$(mktemp -d) || die "failed to create BOOT_DIR tempdir, exiting..."
PXELINUX_DIR="$BOOT_DIR/pxelinux.cfg"
# Now that we have a directory for the ROOTFS, we can expand the
# existing base filesystem into the directory
info_msg "Expanding base tarball $BASE_TARBALL into $ROOTFS for $PLATFORM build."
tar xf "$BASE_TARBALL" -C "$ROOTFS"
info_msg "Install additional dracut modules"
# This section sets up the dracut modules that need to be present on
# the ROOTFS to build the PXE tarball. This includes the netmenu
# module and the autoinstaller
mkdir -p "$ROOTFS/usr/lib/dracut/modules.d/05netmenu"
cp dracut/netmenu/* "$ROOTFS/usr/lib/dracut/modules.d/05netmenu/"
# The netmenu can directly launch the manual installer from the
# initrd. This is the same installer that's on the live media with
# all its quirks, oddities, and wierdness. It's included here for
# places where you might have a lab network and need to run manual
# installs from the network.
cp installer.sh "$ROOTFS/usr/lib/dracut/modules.d/05netmenu/"
# Of course with a PXE environment unattended installs are the norm.
# The autoinstaller is loaded as a very high priority dracut module
# and will fail the build if it can't be installed.
mkdir -p "$ROOTFS/usr/lib/dracut/modules.d/01autoinstaller"
cp dracut/autoinstaller/* "$ROOTFS/usr/lib/dracut/modules.d/01autoinstaller/"
info_msg "Install kernel and additional required netboot packages"
# The rootfs has no kernel in it, so it needs to have at the very
# least dracut, syslinux, and linux installed. binutils provides
# /usr/bin/strip which lets us shrink down the size of the initrd
# dracut-network provides the in-initrd network stack dialog is needed
# by the install environment. ${INITRAMFS_COMPRESSION} is the name of
# the compressor we want to use (lz4 by default).
if [ -z "${XBPS_TARGET_ARCH##*86*}" ] ; then
# This platform is x86 or compatible, we should use
# syslinux/pxelinux to boot the system.
info_msg "Selecting syslinux bootloader"
bootloader_pkg=syslinux
else
# This is likely an arm platform of some kind. In general these
# either have u-boot or a u-boot compatible loader, so we'll use
# that to produce a uImage and a uInitrd
info_msg "Selecting u-boot bootloader"
bootloader_pkg=uboot-mkimage
fi
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}"
run_cmd_chroot "$ROOTFS" "xbps-reconfigure -a"
# Dracut needs to know the kernel version that will be using this
# initrd so that it can install the kernel drivers in it. Normally
# this check is quite complex, but since this is a clean rootfs and we
# just installed exactly one kernel, this check can get by with a
# really naive command to figure out the kernel version
KERNELVERSION=$(ls "$ROOTFS/usr/lib/modules/")
# Now that things are setup, we can call dracut and build the initrd.
# This will pretty much step through the normal process to build
# initrd with the exception that the autoinstaller and netmenu are
# force added since no module depends on them.
info_msg "Building initrd for kernel version $KERNELVERSION"
run_cmd_chroot "$ROOTFS" "env -i /usr/bin/dracut \
-N \
--${INITRAMFS_COMPRESSION-xz} \
--add-drivers ahci \
--force-add 'autoinstaller netmenu' \
--omit systemd \
/boot/initrd \
$KERNELVERSION"
[ $? -ne 0 ] && die "Failed to generate the initramfs"
info_msg "Collect netboot components"
if [ ${bootloader_pkg} = "syslinux" ] ; then
# The whole point of this endeavor is to get the files needed for PXE.
# Now that they have been generated, we copy them out of the doomed
# ROOTFS and into the $BOOT_DIR where we're staging the rest of the
# tarball
mv -v "$ROOTFS/boot/initrd" "$BOOT_DIR"
cp -v "$ROOTFS/boot/vmlinuz-$KERNELVERSION" "$BOOT_DIR/vmlinuz"
# The initrd has *very* restrictive permissions by default. To
# prevent some SysAdmin down the road having a very frustrating time
# debugging this, we just fix this here and now.
chmod 0644 "$BOOT_DIR/initrd"
# Now we need to grab the rest of the files that go in the tarball.
# Some of these are always required, some of these are canonical, and
# some of this list is from trial and error. Either way, this is the
# minimum needed to get Void up and booting on metal from the network.
for prog in pxelinux.0 ldlinux.c32 libcom32.c32 vesamenu.c32 libutil.c32 chain.c32 ; do
cp -v "$ROOTFS/usr/lib/syslinux/$prog" "$BOOT_DIR"
done
# Lastly we need the default pxelinux config and the splash image.
# This is user configurable, but if that isn't set then we'll use the
# one from data/splash.png instead
mkdir -p "$PXELINUX_DIR"
cp -f pxelinux.cfg/pxelinux.cfg.in "$PXELINUX_DIR/default"
cp -f "${SPLASH_IMAGE-data/splash.png}" "$BOOT_DIR"
# This sets all the variables in the default config file
info_msg "Configuring pxelinux.0 default boot menu"
sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE-splash.png}")|" \
-e "s|@@KERNVER@@|${KERNELVERSION}|" \
-e "s|@@KEYMAP@@|${KEYMAP-us}|" \
-e "s|@@ARCH@@|$XBPS_TARGET_ARCH|" \
-e "s|@@LOCALE@@|${LOCALE-en_US.UTF-8}|" \
-e "s|@@BOOT_TITLE@@|${BOOT_TITLE-Void Linux}|" \
-e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \
"$PXELINUX_DIR/default"
else
# u-boot has far far fewer components, but u-boot artifacts do
# require some pre-processing
if [ ! -f "$ROOTFS/boot/uImage" ] ; then
# Build the uImage, this is really just the kernel with a wrapper
# to make u-boot happy. It also sets the load and entry
# addresses, though in general these are overriden by the u-boot
# configuration.
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"
# Build the uInitrd which is similarly just a copy of the real
# initrd in a format that u-boot is willing to ingest.
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"
# Copy out the artifacts that are worth keeping
cp "$ROOTFS/boot/uImage" "$BOOT_DIR"
cp "$ROOTFS/boot/uInitrd" "$BOOT_DIR"
cp -r "$ROOTFS/boot/dtbs" "$BOOT_DIR"
else
# Copy the existing uImage out
cp "$ROOTFS/boot/uImage" "$BOOT_DIR"
fi
fi
# Compress the artifacts for distribution
OUTPUT_FILE="void-${XBPS_TARGET_ARCH}-NETBOOT-$(date +%Y%m%d).tar.gz"
info_msg "Compressing results to $OUTPUT_FILE"
cd "$BOOT_DIR" || die "Could not enter image dir"
tar -zcvf "$CURDIR/$OUTPUT_FILE" .
cd "$CURDIR" || die "Could not return to working directory"
# As a final cleanup step, remove the ROOTFS and the expanded BOOT_DIR
info_msg "Cleaning up and removing build directories"
cleanup_chroot
[ -d "$ROOTFS" ] && rm -rf "$ROOTFS"
[ -d "$BOOT_DIR" ] && rm -rf "$BOOT_DIR"

243
mkplatformfs.sh.in Executable file
View File

@@ -0,0 +1,243 @@
#!/bin/sh
#-
# Copyright (c) 2017 Google
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
readonly PROGNAME=$(basename "$0")
readonly ARCH=$(uname -m)
readonly REQTOOLS="xbps-install xbps-reconfigure tar xz"
# This source pulls in all the functions from lib.sh. This set of
# functions makes it much easier to work with chroots and abstracts
# away all the problems with running binaries with QEMU.
# shellcheck source=./lib.sh
. ./lib.sh
# Die is a function provided in lib.sh which handles the cleanup of
# the mounts and removal of temporary directories if the running
# program exists unexpectedly.
trap 'die "Interrupted! exiting..."' INT TERM HUP
# Even though we only support really one target for most of these
# architectures this lets us refer to these quickly and easily by
# XBPS_ARCH. This makes it a lot more obvious what is happening later
# in the script, and it makes it easier to consume the contents of
# these down the road in later scripts.
usage() {
cat <<_EOF
Usage: $PROGNAME [options] <platform> <base-tarball>
Supported platforms: i686, x86_64, GCP,
dockstar, bananapi, beaglebone, cubieboard2, cubietruck,
odroid-c2, odroid-u2, rpi, rpi2 (armv7), rpi3 (aarch64),
usbarmory, ci20, pogoplugv4, pinebookpro
Options
-b <syspkg> Set an alternative base-system package (defaults to base-system)
-p <pkgs> Additional packages to install into the rootfs (separated by blanks)
-k <cmd> Call "cmd <ROOTFSPATH>" after building the rootfs
-c <dir> Set XBPS cache directory (defaults to \$PWD/xbps-cachedir-<arch>)
-C <file> Full path to the XBPS configuration file
-r <repo> Set XBPS repository (may be set multiple times)
-x <num> Use <num> threads to compress the image (dynamic if unset)
-o <file> Filename to write the PLATFORMFS archive to
-n Do not compress the image, instead print out the rootfs directory
-h Show this help
-V Show version
_EOF
}
# ########################################
# SCRIPT EXECUTION STARTS HERE
# ########################################
BASEPKG=base-system
COMPRESSION="y"
while getopts "b:p:k:c:C:r:x:o:nhV" opt; do
case $opt in
b) BASEPKG="$OPTARG" ;;
p) EXTRA_PKGS="$OPTARG" ;;
k) POST_CMD="$OPTARG" ;;
c) XBPS_CACHEDIR="--cachedir=$OPTARG" ;;
C) XBPS_CONFFILE="-C $OPTARG" ;;
r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY" ;;
x) COMPRESSOR_THREADS="$OPTARG" ;;
o) FILENAME="$OPTARG" ;;
n) COMPRESSION="n" ;;
h) usage; exit 0 ;;
V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0 ;;
esac
done
shift $((OPTIND - 1))
PLATFORM="$1"
BASE_TARBALL="$2"
# This is an aweful hack since the script isn't using privesc
# mechanisms selectively. This is a TODO item.
if [ "$(id -u)" -ne 0 ]; then
die "need root perms to continue, exiting."
fi
# Before going any further, check that the tools that are needed are
# present. If we delayed this we could check for the QEMU binary, but
# its a reasonable tradeoff to just bail out now.
check_tools
# Most platforms have a base system package that includes specific
# packages for bringing up the hardware. In the case of the cloud
# platforms the base package includes the components needed to inject
# SSH keys and user accounts. The base platform packages are always
# noarch though, so we strip off the -musl extention if it was
# provided.
case "$PLATFORM" in
bananapi*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
beaglebone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
cubieboard2*|cubietruck*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
dockstar*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
odroid-u2*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
odroid-c2*) PKGS="$BASEPKG ${PLATFORM%-musl}-base" ;;
rpi3*) PKGS="$BASEPKG rpi-base" ;;
rpi2*) PKGS="$BASEPKG rpi-base" ;;
rpi*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
pogo*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
usbarmory*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
ci20*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
i686*) PKGS="$BASEPKG" ;;
x86_64*) PKGS="$BASEPKG" ;;
GCP*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
pinebookpro*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
*) die "$PROGNAME: invalid platform!";;
esac
# Derive the target architecture using the static map
set_target_arch_from_platform
# And likewise set the cache
set_cachedir
# Append any additional packages if they were requested
if [ -n "$EXTRA_PKGS" ] ; then
PKGS="$PKGS $EXTRA_PKGS"
fi
# We need to operate on a tempdir, if this fails to create, it is
# absolutely crucial to bail out so that we don't hose the system that
# is running the script.
ROOTFS=$(mktemp -d) || die "failed to create tempdir, exiting..."
# Now that we have a directory for the ROOTFS, we can expand the
# existing base filesystem into the directory
if [ ! -e "$BASE_TARBALL" ]; then
die "no valid base tarball given, exiting."
fi
info_msg "Expanding base tarball $BASE_TARBALL into $ROOTFS for $PLATFORM build."
tar xf "$BASE_TARBALL" -C "$ROOTFS"
# This will install, but not configure, the packages specified by
# $PKGS. After this step we will do an xbps-reconfigure -f $PKGS
# under the correct architecture to ensure the system is setup
# correctly.
run_cmd_target "xbps-install -SU $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $ROOTFS -y $PKGS"
# Now that the packages are installed, we need to chroot in and
# reconfigure. This needs to be done as the right architecture.
# Since this is the only thing we're doing in the chroot, we clean up
# right after.
run_cmd_chroot "$ROOTFS" "xbps-reconfigure -a"
# Before final cleanup the ROOTFS needs to be checked to make sure it
# contains an initrd and if its a platform with arch 'arm*' it needs
# to also have a uInitrd. For this to work the system needs to have
# the uboot-mkimage package installed. Base system packages that do
# not provide this must provide the uInitrd pre-prepared if they are
# arm based. x86 images will have this built using native dracut
# using post unpacking steps for platforms that consume the x86
# tarballs. This check is very specific and ensures that applicable
# tooling is present before proceeding.
if [ ! -f "$ROOTFS/boot/uInitrd" ] ||
[ ! -f "$ROOTFS/boot/initrd" ] &&
[ -z "${XBPS_TARGET_ARCH##*arm*}" ] &&
[ -x "$ROOTFS/usr/bin/dracut" ] &&
[ -x "$ROOTFS/usr/bin/mkimage" ]; then
# Dracut needs to know the kernel version that will be using this
# initrd so that it can install the kernel drivers in it. Normally
# this check is quite complex, but since this is a clean rootfs and we
# just installed exactly one kernel, this check can get by with a
# really niave command to figure out the kernel version
KERNELVERSION=$(ls "$ROOTFS/usr/lib/modules/")
# Some platforms also have special arguments that need to be set
# for dracut. This allows us to kludge around issues that may
# exist on certain specific platforms we build for.
set_dracut_args_from_platform
# Now that things are setup, we can call dracut and build the initrd.
# This will pretty much step through the normal process to build
# initrd with the exception that the autoinstaller and netmenu are
# force added since no module depends on them.
info_msg "Building initrd for kernel version $KERNELVERSION"
run_cmd_chroot "$ROOTFS" "env -i /usr/bin/dracut $dracut_args /boot/initrd $KERNELVERSION"
[ $? -ne 0 ] && die "Failed to generate the initramfs"
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"
fi
cleanup_chroot
# The cache isn't that useful since by the time the ROOTFS will be
# used it is likely to be out of date. Rather than shipping it around
# only for it to be out of date, we remove it now.
rm -rf "$ROOTFS/var/cache/*" 2>/dev/null
# Now we can run the POST_CMD script. This user-supplied script gets the
# $ROOTFS as a parameter.
if [ -n "$POST_CMD" ]; then
info_msg "Running user supllied command: $POST_CMD"
run_cmd $POST_CMD $ROOTFS
fi
# Compress the tarball or just print out the path?
if [ "$COMPRESSION" = "y" ]; then
# Finally we can compress the tarball, the name will include the
# platform and the date on which the tarball was built.
tarball=${FILENAME:-void-${PLATFORM}-PLATFORMFS-$(date '+%Y%m%d').tar.xz}
run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball "
# Now that we have the tarball we don't need the rootfs anymore, so we
# can get rid of it.
rm -rf "$ROOTFS"
# Last thing to do before closing out is to let the user know that
# this succeeded. This also ensures that there's something visible
# that the user can look for at the end of the script, which can make
# it easier to see what's going on if something above failed.
info_msg "Successfully created $tarball ($PLATFORM)"
else
# User requested just printing out the path to the rootfs, here it comes.
info_msg "Successfully created rootfs under $ROOTFS"
fi

230
mkrootfs.sh.in Executable file
View File

@@ -0,0 +1,230 @@
#!/bin/sh
#-
# Copyright (c) 2013-2015 Juan Romero Pardines.
# Copyright (c) 2017 Google
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
readonly PROGNAME=$(basename "$0")
readonly ARCH=$(uname -m)
readonly REQTOOLS="xbps-install xbps-reconfigure tar xz"
# This source pulls in all the functions from lib.sh. This set of
# functions makes it much easier to work with chroots and abstracts
# away all the problems with running binaries with QEMU.
# shellcheck source=./lib.sh
. ./lib.sh
# Die is a function provided in lib.sh which handles the cleanup of
# the mounts and removal of temporary directories if the running
# program exists unexpectedly.
trap 'die "Interrupted! exiting..."' INT TERM HUP
# Even though we only support really one target for most of these
# architectures this lets us refer to these quickly and easily by
# XBPS_ARCH. This makes it a lot more obvious what is happening later
# in the script, and it makes it easier to consume the contents of
# these down the road in later scripts.
usage() {
cat <<_EOF
Usage: $PROGNAME [options] <arch>
Supported architectures: i686, i686-musl, x86_64, x86_64-musl,
armv5tel, armv5tel-musl, armv6l, armv6l-musl, armv7l, armv7l-musl
aarch64, aarch64-musl,
mipsel, mipsel-musl
ppc, ppc-musl
ppc64le, ppc64le-musl, ppc64, ppc64-musl
Options
-b <syspkg> Set an alternative base-system package (defaults to base-voidstrap)
-c <dir> Set XBPS cache directory (defaults to \$PWD/xbps-cachedir-<arch>)
-C <file> Full path to the XBPS configuration file
-h Show this help
-r <repo> Set XBPS repository (may be set multiple times)
-x <num> Use <num> threads to compress the image (dynamic if unset)
-o <file> Filename to write the ROOTFS archive to
-V Show version
_EOF
}
# ########################################
# SCRIPT EXECUTION STARTS HERE
# ########################################
# Set the default system package.
SYSPKG="base-voidstrap"
# Boilerplate option parsing. This script supports the bare minimum
# needed to build an image.
while getopts "b:C:c:hr:x:o:V" opt; do
case $opt in
b) SYSPKG="$OPTARG";;
C) XBPS_CONFFILE="-C $OPTARG";;
c) XBPS_CACHEDIR="--cachedir=$OPTARG";;
h) usage; exit 0;;
r) XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=$OPTARG";;
x) COMPRESSOR_THREADS="$OPTARG" ;;
o) FILENAME="$OPTARG" ;;
V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;;
esac
done
shift $((OPTIND - 1))
XBPS_TARGET_ARCH="$1"
# Set the XBPS cache
set_cachedir
# This is an aweful hack since the script isn't using privesc
# mechanisms selectively. This is a TODO item.
if [ "$(id -u)" -ne 0 ]; then
die "need root perms to continue, exiting."
fi
# Before going any further, check that the tools that are needed are
# present. If we delayed this we could check for the QEMU binary, but
# its a reasonable tradeoff to just bail out now.
check_tools
# If the arch wasn't set let's bail out now, nothing else in this
# script will work without knowing what we're trying to build for.
if [ -z "$XBPS_TARGET_ARCH" ]; then
echo "$PROGNAME: arch was not set!"
usage; exit 1
fi
# We need to operate on a tempdir, if this fails to create, it is
# absolutely crucial to bail out so that we don't hose the system that
# is running the script.
ROOTFS=$(mktemp -d) || die "failed to create tempdir, exiting..."
# This maintains the chain of trust, the keys in the repo are known to
# be good and so we copy those. Why don't we just use the ones on the
# host system? That's a good point, but there's no promise that the
# system running the script is Void, or that those keys haven't been
# tampered with. Its much easier to use these since the will always
# exist.
mkdir -p "$ROOTFS/var/db/xbps/keys"
cp keys/*.plist "$ROOTFS/var/db/xbps/keys"
# This sets up files that are important for XBPS to work on the new
# filesystem. It does not actually install anything.
run_cmd_target "xbps-install -S $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $ROOTFS"
# Later scripts expect the permissions on / to be the canonical 755,
# so we set this here.
chmod 755 "$ROOTFS"
# The binfmt setup and pseudofs mountpoints are needed for the qemu
# support in cases where we are running things that aren't natively
# executable.
register_binfmt
mount_pseudofs
# With everything setup, we can now run the install to load the
# system package into the rootfs. This will not produce a
# bootable system but will instead produce a base component that can
# be quickly expanded to perform other actions on.
run_cmd_target "xbps-install -SU $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $ROOTFS -y $SYSPKG"
# Enable en_US.UTF-8 locale and generate it into the target ROOTFS.
# This is a bit of a hack since some glibc stuff doesn't really work
# correctly without a locale being generated. While some could argue
# that this is an arbitrary or naive choice to enable the en_US
# locale, most people using Void are able to work with the English
# language at least enough to enable thier preferred locale. If this
# truly becomes an issue in the future this hack can be revisited.
if [ -e "$ROOTFS/etc/default/libc-locales" ]; then
LOCALE=en_US.UTF-8
sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i "$ROOTFS/etc/default/libc-locales"
fi
# The reconfigure step needs to execute code that's been compiled for
# the target architecture. Since the target isn't garanteed to be the
# same as the host, this needs to be done via qemu.
info_msg "Reconfiguring packages for ${XBPS_TARGET_ARCH} ..."
# This step sets up enough of the base-files that the chroot will work
# and they can be reconfigured natively. Without this step there
# isn't enough configured for ld to work. This step runs as the host
# architecture, but on x86 some special extra steps have to be taken
# to make this work.
if [ -z "${XBPS_TARGET_ARCH##*86*}" ] && [ -z "${HOSTARCH##*86*}" ] ; then
run_cmd_target "xbps-reconfigure --rootdir $ROOTFS base-files"
else
run_cmd "xbps-reconfigure --rootdir $ROOTFS base-files"
fi
# Now running as the target system, this step reconfigures the
# base-files completely. Certain things just won't work in the first
# pass, so this cleans up any issues that linger.
run_cmd_chroot "$ROOTFS" "env -i xbps-reconfigure -f base-files"
# TODO: determine why these lines are here. What is the harm in
# having them and what do they remove. Do they interact adversely
# with the alien build support discussed above.
rmdir "$ROOTFS/usr/lib32" 2>/dev/null
rm -f "$ROOTFS/lib32" "$ROOTFS/lib64" "$ROOTFS/usr/lib64"
# Once base-files is configured and functional its possible to
# configure the rest of the system.
run_cmd_chroot "$ROOTFS" "xbps-reconfigure -a"
# Set the default password. Previous versions of this script used a
# chroot to do this, but that is unnecessary since chpasswd
# understands how to operate on chroots without actually needing to be
# chrooted. We also remove the lock file in this step to clean up the
# lock on the passwd database, lest it be left in the system and
# propogated to other points.
info_msg "Setting the default root password ('voidlinux')"
if [ ! -f "$ROOTFS/etc/shadow" ] ; then
run_cmd_chroot "$ROOTFS" pwconv
fi
echo root:voidlinux | run_cmd_chroot "$ROOTFS" "chpasswd -c SHA512" || die "Could not set default credentials"
rm -f "$ROOTFS/etc/.pwd.lock"
# At this point we're done running things in the chroot and we can
# clean up the shims. Failure to do this can result in things hanging
# when we try to delete the tmpdir.
cleanup_chroot
# The cache isn't that useful since by the time the ROOTFS will be
# used it is likely to be out of date. Rather than shipping it around
# only for it to be out of date, we remove it now.
rm -rf "$ROOTFS/var/cache/*" 2>/dev/null
# Finally we can compress the tarball, the name will include the
# architecture and the date on which the tarball was built.
: "${FILENAME:=void-${XBPS_TARGET_ARCH}-ROOTFS-$(date '+%Y%m%d').tar.xz}"
run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $FILENAME "
# Now that we have the tarball we don't need the rootfs anymore, so we
# can get rid of it.
rm -rf "$ROOTFS"
# Last thing to do before closing out is to let the user know that
# this succeeded. This also ensures that there's something visible
# that the user can look for at the end of the script, which can make
# it easier to see what's going on if something above failed.
info_msg "Successfully created $FILENAME ($XBPS_TARGET_ARCH)"

37
mv-images.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
HTMLDIR="/var/www/voidbuilds.xyz/public"
PKGLISTDIR="package_lists"
if [ ! -f sha256sums.txt ];then
echo "checksum file not found, aborting!"
exit 1
fi
if [ -d "${HTMLDIR}" ];then
rm ${HTMLDIR}/*.iso
rm ${HTMLDIR}/*.txt
rm ${HTMLDIR}/*.sig
mv sha256sums.txt build
mv sha256sums.txt.sig build
mv build/* ${HTMLDIR}
else
echo "${HTMLDIR} does not exist"
fi
if [ ! -d "${PKGLISTDIR}" ];then
mkdir "${PKGLISTDIR}"
fi
rm ${PKGLISTDIR}/*
cp base-x64.packages ${PKGLISTDIR}/base-x64.packages.txt
cp cinnamon-x64.packages ${PKGLISTDIR}/cinnamon-x64.packages.txt
cp mate-x64.packages ${PKGLISTDIR}/mate-x64.packages.txt
cp lxde-x64.packages ${PKGLISTDIR}/lxde-x64.packages.txt
cp lxqt-x64.packages ${PKGLISTDIR}/lxqt-x64.packages.txt
cp i3-x64.packages ${PKGLISTDIR}/i3-x64.packages.txt
#cp kde-x64.packages ${PKGLISTDIR}/kde-x64.packages.txt
#cp gnome-x64.packages ${PKGLISTDIR}/gnome-x64.packages.txt
cp xfce-x64.packages ${PKGLISTDIR}/xfce-x64.packages.txt
cp -r ${PKGLISTDIR} ${HTMLDIR}

View File

@@ -0,0 +1,28 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
#USERLAND PACKAGES
exfat-utils
fuse-exfat
wget
NetworkManager
nano
vim
bash-completion
git
xterm
htop
tuxc
topgrade
ntp
void-repo-multilib
ntfs-3g

View File

@@ -0,0 +1,77 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
#intel-ucode
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
gettext
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
wget
lxdm
nano
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
git
vim
dtrx
unzip
p7zip
#unrar
bash-completion
cinnamon
xrandr
colord
gnome-terminal
alsa-utils
pavucontrol
xterm
htop
tuxc
topgrade
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
adwaita-icon-theme

View File

@@ -0,0 +1,81 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
xrandr
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
polkit-elogind
exfat-utils
fuse-exfat
wget
lxdm
enlightenment
terminology
econnman
upower
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
zenity
bash-completion
nano
xdg-utils
vim
git
alsa-utils
paprefs
pasystray
pavucontrol
xterm
htop
tuxc
dtrx
p7zip
topgrade
ntp
void-repo-multilib
void-repo-nonfree
octoxbps
gksu
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
gnome-themes-standard
adwaita-icon-theme

View File

@@ -0,0 +1,76 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
xorg-minimal
xorg-input-drivers
xorg-video-drivers
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
wget
lxdm
nano
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
git
vim
upower
bash-completion
i3-gaps
i3blocks
i3status
alsa-utils
pulsemixer
pasystray
xterm
mc
htop
tuxc
dtrx
p7zip
topgrade
ntp
dmenu
sakura
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
qutebrowser
adwaita-icon-theme

View File

@@ -0,0 +1,86 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg
xorg-input-drivers
xorg-video-drivers
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
sddm
konsole
bash-completion
nano
git
vim
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
alsa-utils
alsa-plugins-pulseaudio
plasma-pa
paprefs
pavucontrol
inetutils
usbutils
wget
curl
dtrx
p7zip
xterm
htop
tuxc
topgrade
octoxbps
ntp
void-repo-multilib
void-repo-nonfree
octoxbps
kdesu
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
NetworkManager
plasma-nm
firefox
kde5
kde5-baseapps
kaccounts-integration
kaccounts-providers
dolphin
adapta-kde
adwaita-icon-theme

View File

@@ -0,0 +1,74 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
xrandr
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
wget
qt5-plugin-sqlite
nano
bash-completion
git
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
vim
lxdm
lxqt
lxterminal
alsa-utils
pavucontrol
xterm
htop
tuxc
dtrx
p7zip
topgrade
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
falkon
papirus-icon-theme
adwaita-icon-theme

View File

@@ -0,0 +1,74 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
linux-firmware-network
gparted
elogind
dbus-elogind
dbus-elogind-x11
exfat-utils
fuse-exfat
wget
lxdm
mate
mate-extra
bash-completion
caja-extensions
alsa-utils
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
pavucontrol
alsa-plugins-pulseaudio
xterm
htop
tuxc
dtrx
p7zip
topgrade
ntp
octoxbps
gksu
void-repo-multilib
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
Adapta
adwaita-icon-theme

View File

@@ -0,0 +1,81 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# X PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
xrandr
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
adwaita-icon-theme
linux-firmware-network
gparted
exfat-utils
elogind
dbus-elogind
dbus-elogind-x11
fuse-exfat
wget
lxdm
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
libvdpau-va-gl
vdpauinfo
pipewire
gstreamer1-pipewire
upower
flatpak
zenity
bash-completion
nano
xdg-utils
vim
git
alsa-utils
paprefs
pasystray
pavucontrol
xterm
htop
tuxc
dtrx
p7zip
topgrade
ntp
void-repo-multilib
void-repo-nonfree
octoxbps
gksu
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
network-manager-applet
firefox
xfce4
xfce4-plugins
Adapta
gnome-themes-standard

82
packer/http/autoinstall.cfg Executable file
View File

@@ -0,0 +1,82 @@
#!/bin/sh
# Void Linux Automatic Install Configuration
# ===
# Disk Configuration
# ===
# disk: the disk to install to
# default: the first disk that isn't the installer
#disk=/dev/hda
# bootpartitionsize: controls how large the boot partition will be
# default: 500M
#bootpartitionsize=500M
# swapsize: how large should the swap partition be
# default: equal to the installed physical memory
#swapsize=
# ===
# XBPS Configuration
# ===
# xbpsrepository: which repo should the install pull from
# default: http://repo.voidlinux.eu/current
# pkgs: additional packages to install into the target
# default: none
#pkgs=""
# ===
# Default User
# ===
# username: the username of the user to be created
# default: voidlinux
username="vagrant"
# password: password to set for the new user
# default: unset (will prompt during install)
# Warning: This does not work in musl!
password="vagrant"
# ===
# Misc. Options
# ===
# timezone: Timezone in TZ format
# default: America/Chicago
#timezone="America/Chicago"
# keymap: Keymap to use by default
# default: us
#keymap
# locale: initial glibc locale
# default: en_US.UTF-8
#libclocale=en.US.UTF-8
# hostname: static hostname for the system
# default: derived from DNS
#hostname=VoidLinux
# end_action: what to do at the end of the install
# default: shutdown
# alternate values: reboot, script
end_action=func
# end_script: script to optionally run at end of install
# the user script must reside somewhere xbps-uhelper fetch
# can retrieve it from
# default: not set
end_function() {
printf "Linking default services"
chroot ${target} ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd
chroot ${target} ln -s /etc/sv/sshd /etc/runit/runsvdir/default/sshd
xbps-install -r ${target} -Sy dbus virtualbox-ose-guest
chroot ${target} ln -s /etc/sv/dbus /etc/runit/runsvdir/default/dbus
chroot ${target} ln -s /etc/sv/vboxservice /etc/runit/runsvdir/default/vboxservice
sync
reboot -f
}

21
packer/scripts/vagrant.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Set up sudo
echo '%vagrant ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/vagrant
echo 'Defaults:vagrant !requiretty' >> /etc/sudoers.d/vagrant
chmod 0440 /etc/sudoers.d/vagrant
gpasswd -d vagrant wheel
sudo xbps-install -Sy wget
# Installing vagrant keys
mkdir /home/vagrant/.ssh
chmod 700 /home/vagrant/.ssh
cd /home/vagrant/.ssh
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
chmod 600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant /home/vagrant/.ssh
# Install NFS for Vagrant
xbps-install -Sy nfs-utils

View File

@@ -0,0 +1,51 @@
{
"variables": {
"version": "{{env `RELEASE`}}"
},
"builders": [
{
"type": "virtualbox-iso",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--nictype1", "virtio"]
],
"iso_url": "https://alpha.de.repo.voidlinux.org/live/20190217/void-live-x86_64-20190217.iso",
"iso_checksum": "b6884f6ea435e242c29a5778ced7a1ce187cef2f07eb9543765064a1256030e9",
"iso_checksum_type": "sha256",
"boot_wait": "5s",
"boot_command": [
"<tab><wait>",
"auto autourl=http://{{ .HTTPIP }}:{{ .HTTPPort }}/autoinstall.cfg",
"<enter>"
],
"guest_os_type": "Linux_64",
"http_directory": "http",
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now",
"ssh_wait_timeout": "20m",
"virtualbox_version_file": ".vbox_version",
"guest_additions_mode": "disable",
"ssh_username": "vagrant",
"ssh_password": "vagrant"
}
],
"provisioners": [
{
"type": "shell",
"script": "scripts/vagrant.sh",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'"
}
],
"post-processors": [
[
{
"type": "vagrant"
},
{
"type": "vagrant-cloud",
"box_tag": "voidlinux/glibc64",
"version": "{{user `version`}}"
}
]
]
}

36
pxelinux.cfg/pxelinux.cfg.in Executable file
View File

@@ -0,0 +1,36 @@
UI vesamenu.c32
PROMPT 0
TIMEOUT 100
ONTIMEOUT c
MENU TABMSG Press ENTER to boot or TAB to edit a menu entry
MENU AUTOBOOT BIOS default device boot in # second{,s}...
MENU BACKGROUND @@SPLASHIMAGE@@
MENU WIDTH 78
MENU MARGIN 1
MENU ROWS 4
MENU VSHIFT 2
MENU TIMEOUTROW 8
MENU TABMSGROW 2
MENU CMDLINEROW 11
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
MENU COLOR title * #FF5255FF *
MENU COLOR border * #00000000 #00000000 none
MENU COLOR sel * #ffffffff #FF5255FF *
LABEL menu
MENU LABEL Interactive Session [@@BOOT_TITLE@@] (@@KERNVER@@ @@ARCH@@)
KERNEL vmlinuz
APPEND initrd=initrd root=/dev/null loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
LABEL auto
MENU LABEL AutoInstall [@@BOOT_TITLE@@] (@@KERNVER@@ @@ARCH@@)
KERNEL vmlinuz
APPEND initrd=initrd root=/dev/null auto loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
LABEL c
MENU LABEL Boot first HD found by BIOS
COM32 chain.c32
APPEND hd0

37
release.sh.in Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
REPOSITORY="/hostdir/binpkgs /hostdir/binpkgs/musl /hostdir/binpkgs/aarch64"
DATECODE=$(date "+%Y%m%d")
make
ARCHS="$(echo x86_64{,-musl} armv{6,7}l{,-musl} aarch64{,-musl})"
PLATFORMS="$(echo rpi{,2,3}{,-musl} beaglebone{,-musl} cubieboard2{,-musl} odroid-c2{,-musl})"
SBC_IMGS="$(echo rpi{,2,3}{,-musl} beaglebone{,-musl} cubieboard2{,-musl} odroid-c2{,-musl})"
make rootfs-all ARCHS="$ARCHS" REPOSITORY="$REPOSITORY" DATECODE="$DATECODE"
make platformfs-all PLATFORMS="$PLATFORMS" REPOSITORY="$REPOSITORY" DATECODE="$DATECODE"
make images-all-sbc SBC_IMGS="$SBC_IMGS" REPOSITORY="$REPOSITORY" DATECODE="$DATECODE"
make pxe-all REPOSITORY="$REPOSITORY"
MKLIVE_REPO=(-r /hostdir/binpkgs -r /hostdir/binpkgs/nonfree -r /hostdir/musl -r /hostdir/binpkgs/musl/nonfree)
./build-x86-images.sh -a i686 -b base "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a i686 -b xfce "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a x86_64 -b base "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a x86_64 -b xfce "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a x86_64 -b cinnamon "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a x86_64 -b lxde "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a x86_64-musl -b base "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a x86_64-musl -b xfce "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a x86_64-musl -b cinnamon "${MKLIVE_REPO[@]}"
./build-x86-images.sh -a x86_64-musl -b lxde "${MKLIVE_REPO[@]}"
mkdir "$DATECODE"
mv "*${DATECODE}*.xz" "$DATECODE/"
mv "*${DATECODE}*.gz" "$DATECODE/"
mv "*${DATECODE}*.iso" "$DATECODE/"
cd "$DATECODE" || exit 1
sha256sum -- * > sha256sums.txt

7
remote-rm.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
ssh mollusk@voidbuilds.xyz "rm -fv /var/www/html/x86_64/*.txt"
ssh mollusk@voidbuilds.xyz "rm -fv /var/www/html/x86_64/*.sig"
ssh mollusk@voidbuilds.xyz "rm -fv /var/www/html/x86_64/*.iso"
ssh mollusk@voidbuilds.xyz "echo 'New images are in the process of being synced which takes about 5-10 minutes each, due to upload bandwidth limits.' > /var/www/html/x86_64/SYNCING_NEW_IMAGES.txt"
ssh mollusk@voidbuilds.xyz "echo 'The Gnome images are disabled until further notice due to issues with the login manager on the live system' > /var/www/html/x86_64/NOTICE.txt"

23
sign-file.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
case ${1} in
-f)
if [ ! -f "${2}" ];then
echo "File '${2}' does not exist!"
else
if [ ! -f /usr/bin/gpg ];then
gpg2 --output "${2}.sig" --detach-sig ${2}
else
gpg --output "${2}.sig" --detach-sig ${2}
fi
if [ ! -f "${2}.sig" ];then
echo "Error creating file: ${2}.sig"
else
echo "File ${2}.sig created!"
fi
fi
;;
esac

51
silvernode.asc Executable file
View File

@@ -0,0 +1,51 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFsL/mMBEACdiDfWg5CTO4GsfKKPMCvvhtXmckAu5lgASmDUwyCgycLFEv5i
6SnF2VGc76BjoNhvefwtHgpGWp8kvu5FYmYIf+1K595b5KQ+H/Qejc1hxvJHRDow
cq/0bfWIjS9Wg+VDMA2ghXGbPkCSIenJZoQF97CMV1LqbUZYXoUIOrbNuZgkqJyB
fVxWKpqzJ3b1rCicjfk9YW3Afmu29kp0gbKh3C7kITRjlzQP2GUe+39Jy4sBZyqJ
JO4/5ljHzD7MCrimfyfJcbUQENbYZEvVlQ9NcRIgQzqmtCh6STRf7MLUKPwZty9u
bClg1LiJ/ZVj8DJiuAWqt4ws+S2YzaOWSqFDQhqv4FJssHcbjaPXEbl8kZIaRh0c
0tGkec6ABeAzt8Ezulv1tcFFCOAGDgDME2Zfozt/HEKB7sw8qUITW6qdxmINHJHo
GDlga6PjBGFZACD/R+DlKEL0PqvaJE5hv2D3CC/AYYyCua1cBMbNFItulLio4L5e
ez1xT9lXbf6mvq6DwBpgl4ghNkk+BWVoimVamomH9/mUDnAhsMy1w4nhXJrZ9/7X
Gj1Ghg/9Ia/zokKrflYodsAdt8VD0tfSp/CX9+/yqPr8nrXz/UuE67EXWrdxwjhK
aAfh6GJYqtcpq4Bcq74UCBLNVnfY5KRlCDqU8OMau8YD3Wsl9WbJG2cPYwARAQAB
tEBKdXN0aW4gTW9vcmUgKFVub2ZmaWNpYWwgVm9pZCBMaW51eCBJU09zKSA8c2ls
dmVybm9kZUBnbWFpbC5jb20+iQI4BBMBAgAiBQJbC/5jAhsDBgsJCAcDAgYVCAIJ
CgsEFgIDAQIeAQIXgAAKCRAv7ar2tqz64ADBD/9c/Te9hpB+gnnHThHBAhiNdrb/
GumM9oYUPUcEEZURJdcVpmEHJNUHmdyZqAR/PiM3ewqTJsRcnlFSeTLR83dzN6VZ
yr8JkfpW8aOBtjyX4PeBbLEIQxW4KPTbw3Sse3+yyMm4iJMBWgFOR6hsAlH53niv
5Ag/lmOcO1VfnWxP+lODKYkBa6kOLQxjK1+LTHZgBc3rq8hMQqnO9WYIHB8k7xsU
G+mqXX3pCg6NujIIVHm962QEn1b0cy/UTqovixgCBWDI6QMTCuj4Fvp1DTWLgoBR
dvguWzzx9JNHb+2QXTYEzmtfrrDrPd0V9tzmsHRksSXVcOz2c/CxMaT6JFlsa94n
/EZd+GlaR6CVFV5gkA1BVlUbpbluOJ0Jef3j7RA/Jrr4Wt8XAo3uGKmPFiXy46Sb
kHtUhPILXW3X4wdjnQsFpQW7oLvlXi5OmgIzx3/Jmc0LO6LQn13FT6baLbHQY7bQ
NZJ/zLtH+Hc/6NFZ7gwY4S8aCO2kkNrzs4VqLBTkBdd9qrt7nMqR6XXLyoFONNIe
2e3UZ7Ahpcsmoo4hcq7qRnlKgDRBwYZx8M6X0yEEJr8DiEkqX4tZcaYxFBhL+iWf
nJMUe6r/M+04BGiTNiAZxCboUyPOC/mAQTvJ3N3Wbmjn+/zW6VCh2eJW2YzK5bvv
g/iCLFzfydST+KQao7kCDQRbC/5jARAAuRMFi1rvIoXyoYrXeKGbpKeqAb+HIO9S
aLnHzyjeS489KgVfRYbRAwuG/VgrOAii5Oqbp65V0cqPQuq1mgLAZ+29ZH/a6YLY
4ax9JSyxjz7lx+ZxjqmUsS4RsIg9ZFUBQbLHkQrMnw68jkuDN/b9DnPuIgkj+pws
kMXPz1gZjkH/muqpowDR3+qokdjP1iUhUQ6vkl+4SJan1NOsmKiLSrnkgJDAoGIX
gK7+VLstOobLX+InRnGL/QXOTP4VqmC4FYYCz+UbSL71RqBf0YQkeZzke+eS8uJo
x/q9k3zuZI58ZQuzNRJrx2kxQab//7EN9ZUCu4/KyDMwFhugzmF+Q37+ut9cKDGP
nxnWjltE7Wn+0hgTei7lWiCCXJ2gev4N/sytyETk4LJBMVZAC+BUQ3lZQc0Lt+Cj
PTwVVGMtKazO/k3foUu/hQxRI5pMQPxOAW/PdnIaNixWrQd6EA7jna91M1x44yXC
iF1ahyN8gohqY4E6CeOkv/qyd0uQb4jMQi/7N4BaTn+l4qr4/FElg/PtqksAzCOp
PW5LG3R+cLvDvmsSnuatISfsb4J5JHVbJGMap/faygZgJWCp2jKOJf+G2HaKPlaL
NpcV/YgsjuG+vRH3OSdY653xFRc8s54nd9S1V8VVltFNPDaqJMi0c66tv12kjcup
FVyZ21HP4CcAEQEAAYkCHwQYAQIACQUCWwv+YwIbDAAKCRAv7ar2tqz64K7KD/9J
rSEBuj9ds6juzHgQknmEEp77+yHtQaBeijHafrhR9NwqLLGiBshD7FTh+prgJdSf
gDIYL7Yhl758W0MDp4Hk1tTw8dKqxe7DYxyBawxJcNyc+Y85YKOVEq+f6JcjouA+
pjS8bp9QH3ewMJ4dp+SDrwqhiDN1M84HpDjZw9mWkv5sDsiFN8hmDYNgFUczDOUI
bNkDOJcoCQfcZr+pwBdgFxY9hM5NZpuJ+AKcokzcvgBILTshMJqbwT72x6lVEqxv
c8cHOMS4Xvw7BIBaZslG613oRmXSdDR21W/Nu8H9W82bq3czpO9rDc6FDPL6bVSB
9Fuc1FUTddz+g9mngFgUB902dcLPcMwa88tEkGkGQpoNXOp+RDtTL4dti4n+8mAn
j2lvUL5wkQGR4ow73wdrHqF/dKJVQb/9Kr2FfpCD3fCfuhZOWDEdDPs4XJI7/6OG
/tCkNphJsGP4O/duZkcz/RxO8gUFH120DFi4MDPa6HhRPHhr6NBXObnXPC3SVB6Y
l255bwWEE42ewIBGTk0jotKtYdgiyoiAQGeANKwSySMZ3uGuXYyZQL2kZtrlapK5
KHXYXOfE6pRh+uxW8AAnJt88SwlDHsTVMb3z1XU8HszHhPDKgtIiGODj+0UciEdH
3eOH+XSRCZkuPC0R+ASUS3e4aap6VvSA+6lDBxJq4w==
=ejo/
-----END PGP PUBLIC KEY BLOCK-----

14
sync-images.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
REMOTE_HOST="mollusk@voidbuilds.xyz:/var/www/html/x86_64/"
cd build
rsync -v -I -h --progress sha256sums.txt ${REMOTE_HOST}
rsync -v -I -h --progress sha256sums.txt.sig ${REMOTE_HOST}
rsync -v -I -h --progress *.iso ${REMOTE_HOST}
cd ..
rsync -v -I -h --progress *.packages ${REMOTE_HOST}image_pkglists/
ssh mollusk@voidbuilds.xyz "rm -fv /var/www/html/x86_64/SYNCING_NEW_IMAGES.txt"
echo "Done Syncting to Host!"

76
templates/logen/logen.packages Executable file
View File

@@ -0,0 +1,76 @@
#BASE
grub-i386-efi
grub-x86_64-efi
dialog
cryptsetup
lvm2
mdadm
setxkbmap
xauth
linux4.15
linux4.15-headers
linux-firmware
font-misc-misc
terminus-font
dejavu-fonts-ttf
alsa-plugins-pulseaudio
xorg
pass
keepassxc
xorg-input-drivers
xorg-video-drivers
lxdm
xfce4
xfce4-plugins
gnome-keyring
git
xf86-video-fbdev
cgmanager
ConsoleKit2
xterm
libtxc_dxtn
libtxc_dxtn-32bit
gksu
octoxbps
mesa-ati-dri-32bit
inetutils
unrar
p7zip
tuxc
dtrx
unzip
xz
vim
xbanish
pavucontrol
ntfs-3g
mdadm
thunderbird
getmail
mutt
gparted
xbacklight
ntp
nmap
ncdu
void-repo-multilib
void-repo-multilib-nonfree
void-repo-nonfree
xrandr
alsa-utils
alsa-firmware
wget
aria2
pulseaudio
colord
gnome-terminal
network-manager-applet
NetworkManager
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
firefox
net-tools
wireless_tools
htop

17
templates/logen/logen.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
echo "========================="
echo "| LOGEN VOID |"
echo " ------------------------"
CURRENT=https://repo.voidlinux.eu/current
NONFREE=https://repo.voidlinux.eu/current/nonfree
MULTILIB=https://repo.voidlinux.eu/current/multilib
./mklive.sh \
-r ${CURRENT} \
-r ${NONFREE} \
-r ${MULTILIB} \
-p "$(grep '^[^#].' logen.packages)" \
-T "Logen Void" \
-o logen-void-build_1-live-x86_64-xfce4-4.14.22.iso

29
templates/plasma/plasma-void.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
echo "========================="
echo "| VOID PLASMA |"
echo " ------------------------"
# Grub Splash
SPLASH=splash.png
# Image File Output
DATE=$(date +%Y%m%d)
FILENAME="plasma-void"
shift $((OPTIND - 1))
: ${ARCH:=$(uname -m)}
CURRENT=https://repo.voidlinux.eu/current
NONFREE=https://repo.voidlinux.eu/current/nonfree
MULTILIB=https://repo.voidlinux.eu/current/multilib
cp ${SPLASH} ../../data
../../mklive.sh \
-a ${ARCH} \
-r ${CURRENT} \
-r ${NONFREE} \
-r ${MULTILIB} \
-p "$(grep '^[^#].' plasma.packages)" \
-T "Plasma Void Alpha3" \
-o ${FILENAME}-${ARCH}-live-${DATE}.iso

185
templates/plasma/plasma.packages Executable file
View File

@@ -0,0 +1,185 @@
########################################
##
## VOID PLASMA PACKAGE LIST
##
########################################
# BOOT LOADER ##
grub
grub-x86_64-efi
grub-i386-efi
grub-utils
# BASE #
setxkbmap
xauth
font-misc-misc
terminus-font
dejavu-fonts-ttf
# USER MANAGEMENT #
ConsoleKit2
cgmanager
cryptsetup
lvm2
mdadm
# SYSTEM #
linux-headers
libdbusmenu-glib
# SYSTEM UTILITIES #
usbutils
binutils
dash
ntfs-3g
udisks2
mdadm
gvfs-afc
gvfs-mtp
gvfs-smb
gvfs
htop
iotop
most
mlocate
man-pages
man-pages-posix
xbacklight
kcron
powertop
# DRIVERS #
hplip-gui
cups
linux-firmware
# NETWORK #
net-tools
inetutils
plasma-nm
network-manager-applet
NetworkManager
kdeconnect
wireless_tools
ntp
nmap
wget
aria2
# REPOSITORIES #
void-repo-multilib
void-repo-multilib-nonfree
void-repo-nonfree
# AUDIO #
alsa-plugins-pulseaudio
alsa-plugins
alsa-firmware
alsa-utils
plasma-pa
pulseaudio
pavucontrol
gst-ffmpeg
gst-libav
# GRAPHICS #
dialog
xorg
xf86-video-fbdev
mesa-ati-dri-32bit
libtxc_dxtn
libtxc_dxtn-32bit
# LOGIN MANAGER #
sddm
elogind
polkit-elogind
# DESKTOP ENVIRONMENT #
kde5
kde5-baseapps
kdeplasma-addons5
sddm-kcm
# DESKTOP THEME #
adapta-kde
papirus-icon-theme
adwaita-icon-theme
# APPLICATIONS #
#--Accessories--#
p7zip
unrar
dtrx
unzip
pass
tuxc
vim
nano
dolphin
keepassxc
xbanish
redshift-gtk
spectacle
kate5
kcalc
kcolorchooser
#--Development--#
git
go
julia
base-devel
#--Games--#
steam
playonlinux
liquidwar
openra
#--Graphics--#
gimp
gwenview
inkscape
#--Internet--#
firefox
qupzilla
filezilla
hexchat
thunderbird
deluge-gtk
telegram-desktop
#--Multimedia--#
vlc
gradio
mps-youtube
mpv
youtube-dl
#--Office--#
abiword
okular
#--System--#
konsole
partitionmanager
gparted
gnome-disk-utility
virtualbox-ose
virtualbox-ose-dkms
flatpak
wine-32bit
user-manager
octoxbps

BIN
templates/plasma/splash.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

72
tom-x64.packages Executable file
View File

@@ -0,0 +1,72 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
ConsoleKit2
# X PACKAGES
xorg
xorg-input-drivers
xorg-video-drivers
intel-ucode
setxkbmap
xauth
xrandr
font-misc-misc
terminus-font
dejavu-fonts-ttf
liberation-fonts-ttf
alsa-plugins-pulseaudio
#USERLAND PACKAGES
sddm
konsole
bash-completion
pm-utils
nano
git
vim
xdg-utils
alsa-utils
alsa-plugins-pulseaudio
plasma-pa
pavucontrol
inetutils
usbutils
wget
curl
xterm
htop
tuxc
topgrade
octoxbps
ntp
void-repo-multilib
void-repo-nonfree
octoxbps
kdesu
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
ntfs-3g
gnome-keyring
NetworkManager
plasma-nm
firefox
kde5
dolphin
adapta-kde
shotcut
rawtherapee
digikam
olive
telegram-desktop
chromium
flatpak

BIN
voidbuilds-logo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

119
xfce-x64.packages Executable file
View File

@@ -0,0 +1,119 @@
#GRUB
grub-i386-efi
grub-x86_64-efi
#BASE PKGS
dialog
cryptsetup
lvm2
mdadm
# XORG PACKAGES
xorg-minimal
xorg-input-drivers
xorg-video-drivers
xrandr
setxkbmap
xauth
vdpauinfo
libvdpau-va-gl
font-misc-misc
terminus-font
dejavu-fonts-ttf
dbus-elogind-x11
# KERNAL
linux-firmware-network
# SOUND
alsa-plugins-pulseaudio
paprefs
pavucontrol
pipewire
alsa-utils
gstreamer1-pipewire
# NETWORK
NetworkManager
network-manager-applet
ntp
wget
# DESKTOP ENVIRONMENT
lxdm
xfce4
xfce4-plugins
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-kde
xdg-user-dirs
xdg-user-dirs-gtk
libappindicator
AppStream
# LOOK AND FEEL
adwaita-icon-theme
Adapta
gnome-themes-standard
# FILE SYSTEM
ntfs-3g
exfat-utils
fuse-exfat
gvfs-afc
gvfs-mtp
gvfs-smb
udisks2
gparted
# PACKAGE MANAGEMENT
flatpak
tuxc
octoxbps
topgrade
# AUTH
elogind
dbus-elogind
gksu
gnome-keyring
# DEVELOPMENT
git
# REPOSITORIES
void-repo-multilib
void-repo-nonfree
#USERLAND PACKAGES
upower
zenity
bash-completion
nano
vim
xterm
htop
dtrx
p7zip
firefox

58
xfce-x64.sh Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
DESKTOP="xfce"
echo "========================="
echo "| ${DESKTOP} VOID x86_64 |"
echo " ------------------------"
CURRENT=https://mirrors.servercentral.com/voidlinux/current
MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib
NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
retry=0
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
((retry++))
if [[ $retry -gt 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build