summaryrefslogtreecommitdiff
path: root/hscript
AgeCommit message (Collapse)AuthorFilesLines
2023-12-11hscript: bootloader: Support EFI boot on ARMv7A. Wilcox1-4/+2
2023-12-05hscript: meta/PkgInstall: Allow negative selectionA. Wilcox1-1/+1
This allows the installation of 'negative selections' or the purposeful exclusion of packages from the installed environment.
2023-12-02hscript: disk: Filesystem: Use full paths for mkfsA. Wilcox1-7/+7
This allows the executor to run when PATH does not contain /sbin nor /usr/sbin.
2023-12-01Add 'rootshell' key to determine root's shellA. Wilcox5-2/+73
* Key added to code and documentation. * Tests added and pass locally on gwyn (ppc64) and fran (aarch64). * Qt UI automatically sets /bin/zsh as root's shell (ref: packages#206). * ISO image creator backend no longer has root shell hack.
2023-11-17Executor: Only stack runlevels if runlevels existA. Wilcox1-4/+4
If we are doing a mini-rootfs or container installation, we may not have OpenRC at all. This would mean /etc/runlevels doesn't exist in the target. In that case, we crash with: boost::filesystem::directory_iterator::construct: No such file or directory [system:2]: "/tmp/horizon-image/target/etc/runlevels" Closes: #378 Fixes: a9ccd9bc7e ("hscript: Allow svcenable to create new runlevels")
2023-10-21hscript: bootloader: Stop mucking with efivarfsA. Wilcox1-14/+1
The problem was OpenRC which was fixed in packages.git. We should not have any further issues with efivarfs being read-only outside of host systems that are running OpenRC >= 0.28 and < 0.39.
2023-10-21hscript: bootloader: Take 100% control of efivarfsA. Wilcox1-24/+6
We're the executor, we can just commandeer the entire thing, host system included. There is very low likelihood of damage to a host system because we are use umount instead of making the host r/w. The only thing that could break is `systemctl reboot --firmware`, or a host-side upgrade of GRUB that somehow changes the path of the EFI stub. Both of these are almost impossible to encounter on a host that is actually running the executor. However, encountering a broken read-only efivarfs seems to be VERY common in the Installation Environment. Fixes: ab212730bd ("hscript: bootloader: Set rdwr on 'real' efivarfs")
2023-10-21hscript: bootloader: Set rdwr on 'real' efivarfsA. Wilcox1-2/+7
We have to clear the RDONLY flag on the base /sys before we clear it from the target /sys, otherwise it doesn't work. Fixes: 975b506cdd ("hscript: bootloader: Really, truly revamp EFI")
2023-10-21hscript: bootloader: Really, truly revamp EFIA. Wilcox1-10/+41
This should handle every single scenario we could be in regarding efivarfs. It also makes efivarfs errors non-fatal, as grub-install has --no-nvram for such situations. Closes: #370 Fixes: bad8487c53 ("hscript: bootloader: Hopefully fix EFI once and for all")
2023-10-20hscript: Use mirror keys by defaultA. Wilcox1-14/+54
Before, we were using the old (pre-beta4) key format. Now we pull from the mirrors. We rely on the user either specifying the 'arch' key or running the script on the same CPU as the target system, as assumed in other parts of the codebase. Fixes: #349
2023-10-20hscript: Output dest runlevel in 'svcenable' logA. Wilcox1-1/+2
2023-10-20hscript: Allow svcenable to create new runlevelsA. Wilcox2-2/+29
This is going to be useful in general for some advanced use cases, but most importantly, it will allow us to define runlevels for live media. Ref: #346
2023-10-18hscript: diskid: Refactor how we check disk IDsA. Wilcox1-15/+18
Now we use ID_MODEL_ENC in addition to ID_SERIAL, because sometimes users might want to actually use spaces in addition to just serial numbers. Fixes: #348
2023-10-10hscript: Allow multiple inheritanceA. Wilcox2-36/+82
This allows a HorizonScript to inherit from multiple files. Files are parsed in a system-defined, unspecified order, but all scripts of a given depth are guaranteed to be parsed before the next depth.
2023-03-25meta: Tidy codeA. Wilcox1-3/+4
* Use <cassert> instead of <assert.h>. * Include <cstring> for ::strerror in install env. * Consistently use ::strerror. * Remove superfluous duplicate semicolon. Fixes: #334
2022-07-05hscript: Better, more portable net conf readingA. Wilcox1-2/+2
Checking in_avail doesn't work correctly on Darwin due to the way file caches work there. This method is not only more portable, but also more performant. A win-win!
2022-07-05hscript: Portability fixes for libc++A. Wilcox2-2/+3
2020-10-15hscript: bootloader: Hopefully fix EFI once and for allA. Wilcox1-6/+7
2020-10-15Add many more various test casesA. Wilcox5-10/+36
2020-10-15hscript: PPPoE: Ensure values are read properlyA. Wilcox1-1/+1
2020-09-30meta: Run update-boot when bootloader requestedA. Wilcox1-6/+20
If the user chooses no-boot or isn't installing Adélie, this will fail quietly. But if the user is installing Adélie, this is necessary to generate bootloader configuration.
2020-09-20hscript: Remount EFI vars correctlyA. Wilcox1-4/+4
The manpage suggests that MS_BIND must be set to change R/O flag on bindmounts.
2020-09-20hscript: Force extfs creationA. Wilcox1-2/+1
This works around the '/dev/xxx already has a filesystem' thing on CLI installs.
2020-08-30Rearchitect how 'bootloader' key worksA. Wilcox3-56/+72
2020-08-29hscript: Allow multiple svcenables to not breakA. Wilcox1-1/+1
2020-08-22Improve test coverage of metadata keysA. Wilcox1-17/+25
2020-08-21hscript: Parted uses 'mac' for APM labelsA. Wilcox1-1/+1
2020-07-22Add initial MIPS port, sans automatic partitionerA. Wilcox1-0/+16
Help with the automatic partitioner by parties interested in the MIPS ports of Adélie (and/or Alpine and/or postmarketOS) would be very desirable. I'm only currently aware myself of how to partition SGI MIPS64 machines. My gut tells me we probably need the `subarch` system like for PPC64, but I am not sure how non-SGI MIPS64 machines need to be partitioned.
2020-07-10hscript: Use curr_name; work around Alpine bugA. Wilcox1-5/+10
On some Alpine systems, '/dev/stdin' cannot be canonicalised. We work around this by hardcoding "<stdin>" as the internal name for scripts read from stdin, similar to Python. This change also ensures messages generated from the parser itself use curr_name (the canonicalised name) instead of the name passed to the Script object.
2020-07-06hscript: Use target efivarfs path for r/w mountA. Wilcox1-2/+4
2020-07-04hscript: Implement execution of PPPoE for ENI systemsA. Wilcox1-2/+67
2020-07-04hscript: Implement execution of PPPoE for netifrc systemsA. Wilcox1-16/+63
2020-07-04hscipt: Implement parse and validation of 'pppoe' keyA. Wilcox6-5/+167
2020-06-30hscript: Ensure operstate file exists before readingA. Wilcox1-4/+9
2020-06-24Fix network state issue on live installs, and firmware installA. Wilcox2-2/+6
2020-06-23hscript: Implement runlevel support in svcenable keyA. Wilcox3-11/+32
2020-06-23hscript: Don't ensure device existence during image creationA. Wilcox1-3/+3
2020-06-23Change Runner.Validate.hostname.Begin to allow numeric charactersA. Wilcox1-2/+2
2020-06-23hscript: meta: desperate attempt to fix EFI installsA. Wilcox1-0/+12
2020-06-23hscript: Recursively bind-mount /dev and /sysA. Wilcox1-2/+4
We need this for /dev/shm to be present in the target. We need to bind-mount /sys recursively for efivarfs to be available for GRUB's use in the target. While we're here, unmount /dev and /sys recursively when creating an image.
2020-06-21hscript: Ensure mount directory existsA. Wilcox1-1/+1
2020-06-13hscript: Validate and execute the bootloader key, if providedA. Wilcox2-0/+6
2020-06-13hscript: maybe implement bootloader keyA. Wilcox1-0/+77
2020-06-13hscript: bootloader: build in runtime envA. Wilcox1-2/+6
2020-06-13hscript: Stub unfinished implementation of 'bootloader' keyA. Wilcox4-0/+125
2020-06-06hscript: Update for console-setup -> kbd changeA. Wilcox3-12/+10
2020-05-29hscript: Timezone: Always remove existing localtimeA. Wilcox1-2/+2
Otherwise, if the target doesn't have tzdata installed, an existing /etc/localtime file won't be removed and we can hit an error.
2020-05-29hscript: Hostname: Create /etc if it doesn't existA. Wilcox1-0/+8
Without this, errors are seen generating Alpine images.
2020-05-28hscript: user: Support cross-arch installsA. Wilcox1-11/+9
Using PAM's -R tries to load target system's PAM libraries, which obviously fail if it's not the same CPU arch.
2020-05-26hscript: Close file after downloadA. Wilcox1-0/+2