Commit Graph

24 Commits

Author SHA1 Message Date
Albert Hopkins 3eece1b6ed scripts/COPY: don't use check_call
subprocess.check_call() raises an execption and produces an ugly Python
traceback on the console.  It's not really needed.  The cp command and
Makefile already give error output.  Instead we call sys.exit() with the
exit status of the cp command.
2018-12-02 11:53:35 -08:00
Albert Hopkins 23dcf91c29 scripts/RUN: don't use check_call
subprocess.check_call() raises an execption and produces an ugly Python
traceback on the console.  It's not really needed.  The cp command and
Makefile already give error output.  Instead we call sys.exit() with the
exit status of the cp command.
2018-12-02 00:04:26 -08:00
Albert Hopkins 8f79ddc951 scripts/build-kernel: re-format with black
For consistent-formatting of Python scripts.
2018-12-01 18:08:02 -08:00
Albert Hopkins 339b3dd2e3 scripts: rename echo to print
This should have happended in a previous submit.  Why didn't it?
2018-12-01 16:04:53 -08:00
Albert Hopkins 37bbba582e scripts/COPY: create parent directories if they don't exist 2018-12-01 16:00:33 -08:00
Albert Hopkins b2c92c5ec7 scripts: black 2018-10-27 11:15:59 -07:00
Albert Hopkins 5a96cc75a1 scripts: add COPY and RUN helpers.
Makes the Makefile easier to write and the output a little nicer.  Inspired
by a similar tool ;-)
2018-10-27 11:04:00 -07:00
Albert Hopkins 177dd2f4ed scripts/build-kernel: don't raise exception when no previous kernel found 2018-10-05 06:44:30 -07:00
Albert Hopkins 4a591cdf3a switch over to GRUB 2
The GRUB 1 configuration hasn't been working in a while and-- let's face
it-- it's time. So now we have GRUB 2.

It should still work with a serial console though I haven't tested it yet.
2017-05-27 22:13:01 +00:00
Albert Hopkins 7ef2da9e83 scripts/buildkernel: use lexists() instead of exists()
exists() will return false for broken symlinks.  We need lexists() instead.
2016-12-08 11:59:21 +00:00
Albert Hopkins d40976c08c scripts/build-kernel: remove the vmlinuz symlink if it exists before (re)creating 2016-10-19 11:46:03 +00:00
Albert Hopkins caba362013 scripts/build-kernel: copy the kernel config (back) to /root after building 2016-08-07 12:46:45 +00:00
Albert Hopkins be9f75a457 scripts: replace kernel.sh with build-kernel
This newer script is Python-based and smarter than the bash script.
2016-07-24 15:08:27 +00:00
Albert Hopkins 5d1b56c692 scripts: replace sync-stage3.sh with fetch-stage3
This new script is smarter and more powerful.  The only drawback is that
instead of rsync it uses HTTP.
2016-07-23 21:11:49 +00:00
Albert Hopkins 8494820fb3 scripts/kernel.sh: be smarter about kernel building
Also install the kernel as a "--oneshot" so it doesn't take up space in
the image.
2016-07-23 11:34:37 +00:00
Albert Hopkins 7bde1c5ab0 scripts/echo: don't use ANSI escapes if stdout is not a terminal 2015-12-17 21:26:47 +00:00
Albert Hopkins 05544efe41 kernel.sh: use long option names when calling emerge
idem.
2015-03-13 13:49:22 +00:00
Albert Hopkins c9a81d2806 The great systemd commit.
This change converts the appliances from openrc to systemd.  In addition,
systemd needs to at least be be installed on the build machine as we now
use systemd-nspawn instead of chroot/bind mounts do to the fact that
systemd-nspawn is much more robust and lese prone to errors.  In addition:

* All stage4 tarballs and images are now stored in the images/ directory by
  default.

* A package dir is now required and is set up in the packages/ directory by
  default.

* The portage directory is not unpacked in the chroot every time anymore
  and is instead bind-mounted from a directory by systemd-nspawn.  This is
  the portage/ directory by default.

* In addition there is a distfiles/ directory (by default) which is
  bind-mounted in the chroot.  It does what you'd probably expect.

* The Makefile learned new target, eclean, which will run eclean-dist and
  eclean-pkg to clean out obsolete distfiles and binary packages.

* The REMOVE_PORTAGE_TREE option is removed as portage is no longer
  installed.

* The unused/untested PRUNE_CRITICAL functionality has been removed.  I
  have no idea if it worked and if it didn't I didn't want to fix it.

* As appliances are always using systemd, UDEV is no longer optional.

* Timezones and hostnames are now handled by systemd (systemd-firstboot).

* Stage4 tarballs are now directly importable as systemd containers (and
  probably docker too though I haven't tested that yet).

* A number of packages (for example dhcpd, acpid) have been removed from the
  appliances when systemd provides equivalent functionality.

* We no longer override etc-update.conf.  There's no reason.

* A number of Makefile targets, checkpoints, temp files, etc have been
  removed as they are no longer needed.
2015-02-22 15:32:16 +00:00
Albert Hopkins 6050e549a0 scripts/sync-stage3.sh: Make work with x86
... until one of these days when I give up on 32-bit altogether.
2015-02-16 18:39:52 +00:00
Albert Hopkins f61e01f1dd sync_stage3: Use a helper script
The Makefile logic was lousy and broken.  Add a more robust helper script.
2015-02-16 18:03:44 +00:00
Albert Hopkins 4d066f719b scripts/kernel.sh: copy kernel .config before making mrproper.
Else it don't work :P
2014-06-14 21:52:04 +00:00
Albert Hopkins cf3dbf1dda scripts/kernel.sh: Run "make mrproper" after kernel install.
This allows "emerge --depclean" to completely clean out the kernel source
directory.
2014-06-13 11:18:26 +00:00
Albert Hopkins 2ecdbeae49 scripts/kernel.sh: Don't re-install kernel package that's already installed. 2014-06-13 11:16:25 +00:00
Albert Hopkins f79cc8a353 Move appliances/configs/scripts to seperate directories.
Instead of having everything in the root directory, split them in seperate
directories (appliances, scripts, & configs).  This makes things a little
tidier.

Also added a now Makefile target, appliance-list, that prints a list of the
available appliances.  The split directory change made this easier.
2014-06-09 02:26:17 +00:00