Commit Graph

117 Commits

Author SHA1 Message Date
Albert Hopkins 13512c8cbf Makefile: Make the software target inside the chroot 2015-02-27 21:46:57 +00:00
Albert Hopkins 3ca8e68168 Makefile: Make the grub target inside the chroot 2015-02-27 21:35:15 +00:00
Albert Hopkins 8ef1630fdb Makefile: Make the kernel target inside the chroot 2015-02-27 21:20:43 +00:00
Albert Hopkins 0c12afc476 Makefile: build compile_options inside the chroot 2015-02-27 20:44:52 +00:00
Albert Hopkins da9e895652 Makefile: Make the stage3 target inside the chroot
Then we don't have to manually clean it (it gets clean on the stage4
target).
2015-02-27 20:37:14 +00:00
Albert Hopkins 8240a836e1 Makefile:$(RAW_IMAGE) add stage4 tarball as a dependency.
If not then re-making the image won't happen if the image already exists
but older than the stage4.
2015-02-27 20:10:20 +00:00
Albert Hopkins 0799c48705 Makefile:preproot: Make sure we've always got a local copy of resolv.conf
Or else network will fail inside the chroot.
2015-02-27 20:09:13 +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 50a4a28567 Makefile: Name images/tarball after appliance name not hostname.
The reason being that when you are distributing an image you are likely
distributing an general appliance, not a specific host so it makes sense
that the image name be the name of the appliance and not, e.g., ln33.  This
can always be overriden on the command line or in a profile.
2015-02-21 13:21:05 +00:00
Albert Hopkins efeeb737b6 Makefile: export RSYNC_MIRROR
Another forgotten artifact from cs bcbd924efc3a.
2015-02-21 13:17:08 +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 9aecaedcd6 Makefile: image, stage4: clean up after oneself
Make these targets that have temporary targets/mount-points clean up after
themselves.
2014-08-30 18:12:04 +00:00
Albert Hopkins 1fe98b6b7c Makefile: don't pass $(USEPKG) to @preserved-rebuild
... kinda defeats the purpose.
2014-08-30 16:53:30 +00:00
Albert Hopkins fd40aac3bf Makefile: export USEPKG so that submakes can use it.
I thought this was already being done, but apparently not.
2014-06-14 21:51:21 +00:00
Albert Hopkins 4b01342bf1 Makefile: use losetup instead of qemu-nbd for loop mounting.
It's more dynamic, is faster, and the newer versions support auto-creating
device nodes for partions.  So it's prefereable to qemu-nbd.
2014-06-11 15:59:57 +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
Albert Hopkins 62e960d256 Makefile: Change the way we sync the stae3 (again)
It wassn't working for x86.. although I swore it did before...
2014-01-06 15:13:31 +00:00
Albert Hopkins 977fcd0d9c Long-overdue updates (phase 1) 2014-01-04 20:22:40 +00:00
Albert Hopkins 65d7f57a96 Makefile: Fix stage3 rsync (again) 2013-12-21 21:17:19 +00:00
Albert Hopkins 1510c83387 Makefile:sysconfig: remove deps for which there is no target.
They were already satisfied by the "preproot" target.

I found these errors when I tried "make -j2" (which still doesn' work yet,
but oh wel...)
2013-10-13 15:56:23 +00:00
Albert Hopkins 6d55ed0e69 Remove "archiving" options from tar commands.
GNU Tar can (usually) handle this automagically
2013-10-13 15:56:20 +00:00
Albert Hopkins a48eda1931 Makefile: Fix *_IMAGE targets.
So that the rebuild the image instead of using the existing one.
2013-09-29 01:38:29 +00:00
Albert Hopkins e53380d138 Makefile: Add a help target. 2013-09-16 23:26:48 +00:00
Albert Hopkins bc45946ca6 Makefile: add hostname to /etc/hostname 2013-09-08 01:14:57 +00:00
Albert Hopkins 5c52a3d2fa Makefile: ALlow for creation of swap-less appliances.
Also fix a bug where fstab (and hostname) were not (always) being updated.
2013-09-01 16:06:08 +00:00
Albert Hopkins 5dec02b5eb Makefile: Don't depend on the static dev tarball anymore.
devtmpfs can take care of this now.  So remove the dep and the tarball.
Also move the removal udev from init in the build-software target.
2013-09-01 15:15:47 +00:00
Albert Hopkins 9b62ddde0b Makefile: clean: Lazily umount filesystems. 2013-09-01 14:14:12 +00:00
Albert Hopkins eec5dbac8f Makefile: mkfs: Leave no reserved space for root. 2013-08-31 01:28:48 +00:00
Albert Hopkins 67239a5154 Makefile: We no longer use DOWNLOAD_DIR, so don't create it. 2013-08-30 19:05:43 +00:00
Albert Hopkins c902250e0d Makefile: unmount lazily so we don't have to sleep. 2013-08-27 19:54:41 +00:00
Albert Hopkins 3851a3fffb Don't autosync the stage3 tarball. 2013-08-26 21:21:17 +00:00
Albert Hopkins 4f16e5da66 Don't autosync portage. 2013-08-25 09:24:46 +00:00
Albert Hopkins e4e67f6e8e Makefile: Use saner options for mkfs.ext4
The previous ones didn't work anymore and where overly-complicated anyway.
2013-08-19 19:47:11 +00:00
Albert Hopkins 991a2885a7 Makefile: Change the way we find stage3s.
The current method no longer works because the text file now contains
non-stage3 files, etc.  Eventually this needs to be cleaned up a little
better (using a helper script), but for now we add some extra greps.
2013-08-19 18:21:15 +00:00
Albert Hopkins 344f1bb1eb Makefile: update to the first profile. 2013-07-22 13:13:55 +00:00
Albert Hopkins 81df9f06fa Use CURDIR instead of PWD. 2012-12-29 16:29:42 +00:00
Albert Hopkins efb798385f Add kernel config support for 32bit. 2012-12-23 07:32:28 +00:00
Albert Hopkins f4f5393f64 Introduce appliance-level make.conf 2012-12-23 01:47:26 +00:00
Albert Hopkins b9200a5214 Makefile: change the way we test if the world file is empty.
Use stat(1) instead of catting the file.
2012-12-22 01:05:02 +00:00
Albert Hopkins 63bd1bdad8 Actually enable 32bit builds.
This only works with paravirt so far.  Need to create a kernel .config for
x86.
2012-12-21 19:12:25 +00:00
Albert Hopkins d2eb7124a7 Use busybox for dhcp and acpi. 2012-12-16 15:49:21 +00:00
Albert Hopkins 4eeb3c6028 Various update to Makefile and make.conf. 2012-12-10 18:13:55 +00:00
Albert Hopkins 431b02c267 Use xz compression for stage4 tarballs.
* And remove dud stage4 removal in "clean" target.
2012-11-15 13:30:30 +00:00
Albert Hopkins c296f81f35 Remove prelinking.. it doesn't seem to make any difference and only take up time. 2012-07-01 12:19:15 +00:00
Albert Hopkins 98c72eec57 Show some progress messages along the build process 2012-06-29 02:44:00 +00:00
Albert Hopkins 048bdee1d1 Makefile: add extra inodes to images in mkfs 2012-06-28 11:35:05 +00:00
Albert Hopkins 7cd3603efa Makefile: various updates 2012-05-25 16:33:40 +00:00
Albert Hopkins 9beba9e7be Makefile performance tweaks. Remove previous $(CHROOT)/usr/portage prior to unpacking. 2012-02-02 14:11:59 +00:00
Albert Hopkins c7a56139e2 Added "Airport" virtual appliance: see https://bitbucket.org/marduk/airport 2012-01-09 21:21:06 +00:00
Albert Hopkins 2ba82fb92b Add EXTRA_WORLD Makefile variable to add extra packages to world 2011-11-16 11:44:32 +00:00