Commit Graph

17 Commits (38b0081012aab84d78d6adfa109d4e2562dabffb)

Author SHA1 Message Date
Dustin 4a2d63c8db yellow: Install BURP
We'll use BURP for backups, just like the old Home Assistant server.

Note that Portage cannot correctly set the ownership of files when
installing to an alternate $ROOT.  To work around this, we replace the
`fowners` function for the *app-backup/burp* ebuild with a no-op, and
then set the permissions of the relevant files using SquashFS
pseudo-file definitions.  Relatedly, we're omitting the files and
directories used by the server-side of BURP.
2023-03-30 09:03:45 -05:00
Dustin a9fdee2049 More SELinux policy patches for Podman 2023-03-30 09:03:45 -05:00
Dustin b7f2d22586 Configure Mosquitto Podman container 2023-03-30 09:03:45 -05:00
Dustin b1afb4adf1 Configure Home Assistant Podman container
The default Home Assistant configuration does not allow running a
reverse proxy in front of the application.  To enable this, the
`use_x_forwarded_for` and `trusted_proxies` options have to be set.

Since we want `/var/lib/homeassistant` to be a Btrfs subvolume, we can't
simply include the necessary files in the correct location in the rootfs
image.  Instead, we must define "copy tree" (`C`) actions for
`systemd-tmpfiles` to copy them from `/usr/share/factory`.
Unfortunately, `systemd-tmpfiles` considers `v` and `C` actions
conflicting, and thus will not copy the directory contents recursively.
Each file has to be listed explicitly.
2023-03-30 08:56:14 -05:00
Dustin 5328e5482b yellow: Install Podman
Podman will provide the container runtime for Home Assistant et al.
Some additional kernel features are required to run containers.
2023-03-30 08:55:45 -05:00
Dustin 8d3c39373f Configure Portage to cross-compile Go
Portage does not set the `GOOS` and `GOARCH` environment variables by
default, which are required to cross-compile Go code.
2023-03-29 18:44:45 -05:00
Dustin 0bc861ced1 Split out base squashfs.exclude
Variants no longer need to specify the full contents of the
`squashfs.exclude` file.  The "base" file in the source directory gets
combined with the one from the config directory (if it exists).
2023-03-29 18:44:45 -05:00
Dustin aae933e105 SELinux policy patches for Podman
* Allow crun to fchown stdio sockets inherited from init
* Allow podman-system-generator to read /etc/containers/systemd
2023-03-26 12:12:41 -05:00
Dustin 2046a2d2dd Do not build binpkg for raspberrypi-firmware
There's really no sense in having binary packages for
*sys-boot/raspberrypi-firmware*, since there is no "source" to build.
Having binary packages just wastes space.
2023-03-26 12:12:41 -05:00
Dustin e42f10051c Remove setools from package.provided
Somewhat expectedly, attempting to avoid installing *app-admin/setools*
by listing it in `/etc/portage/profile/package.provided` proved more
trouble than it's worth.
2023-03-21 19:46:04 -05:00
Dustin ee408805e2 Move post-build script to configdir
The base Aimee OS build does not need any post-installation tasks.
Custom builds can provide a `post-build.sh` script to implement the
tasks they need.  For example, builds targeting Raspberry Pi devices
can use this script to install the firmware files.
2023-03-21 19:40:51 -05:00
Dustin 6b262ca0fb Separate base packages from customizations
The `build.packages` and `install.packages` files in the CONFIGDIR now
only need to include *additional* packages to install.  The packages
*required* for Aimee OS are always installed, listed in the
corresponding files in the source directory.
2023-03-21 19:39:33 -05:00
Dustin 469cbb28c2 yellow: Update USE flags for linux-firmware
Recent versions of *sys-kernel/linux-firmware* dropped the `compress`
USE flag and added `compress-xz` and `compress-zstd`.
2023-03-16 18:47:47 -05:00
Dustin 1280f406f8 yellow: Only install stable packages on the host
Since the container images we're using as a base for the build system
only contain stable packages, setting ACCEPT_KEYWORDS to allow unstable
packages globally can cause a lot of rebuilds and potentially break
things.  Instead, we only set ~arch for the packages we actually need
recent versions on the host.

This does not affect packages installed in the target root, of course.
2023-03-16 18:43:30 -05:00
Dustin 749d5b818a Omit /var/log/journal from rootfs image
The persistent journal is stored in a subdirectory of `/var/log/journal`
named for the current machine ID.  Since `/etc/machine-id` is not
writable, the machine ID changes with every boot.  This effectively
makes the journal for previous boots inaccessible, so there's really not
much point in keeping them around.
2023-03-15 21:48:44 -05:00
Dustin c259aad165 Allow root to log in w/ password on serial console
These additional SELinux policy rules are required to allow *root* to
log in on the serial console and directly assume the `sysadm_r` role.
2023-03-15 21:16:22 -05:00
Dustin 31d8a98f64 build: Implement CONFIGDIR setting
In effort to support different builds of Aimee OS using the same
scripts, without necessarily having to fork this repository, the build
system now supports a `CONFIGDIR` setting.  When this variable is set,
files defining the target environment, such as the lists of packages to
install, the kernel configuration, the Portage configuration, etc. are
found in the path it specifes.

The reference build, for the Home Assistant Yellow board, is configured
in the `yellow` directory.  To build it, run:

```sh
CONFIGDIR=yellow ./vm-build.sh
```
2023-03-15 21:12:04 -05:00