Compare commits

...

561 Commits

Author SHA1 Message Date
Jörg Deckert e5cd5157e3 Kernel 6.6.30, Python 3.12 2024-06-26 06:56:01 +02:00
Jörg Deckert 9c2662daf0 - Adjustments to current Gentoo changes
- Adjustments to create the appliance on Debian
- use grub-install from appliance (not from build host)
- fixes
2024-04-15 09:45:56 +02:00
Jörg Deckert 573efaddb3 default appliance: add p7zip, create /etc/sudoers.d 2023-07-15 16:53:53 +02:00
Jörg Deckert 804560ea06 use labels to create fstab
use swap partition if available
update python (3.11)
fix fetching stage3
2023-06-02 18:02:49 +02:00
Jörg Deckert 774bb51363 fix gentoo github url 2023-05-30 19:45:23 +02:00
Jörg Deckert 120776df74 Kernel update (config), sudo for users of wheel group without password, python update (3.10) 2022-08-12 18:29:25 +02:00
Jörg Deckert 70866fcfda switch mkova.sh parameters 2022-03-01 08:53:55 +01:00
Jörg Deckert 3ccf8f2bb3 Config for Kernel 5.15.23 2022-02-23 16:18:11 +01:00
Jörg Deckert cd9fec70fd gitignore: appliances/default/default.cfg 2022-02-23 16:07:00 +01:00
Jörg Deckert 718ae9b8a7 import appliances/default/default.cfg 2022-02-23 14:19:05 +01:00
Jörg Deckert 0709757051 better locale.gen handling, handling of kernel modules temporarily disabled 2022-01-19 12:03:55 +01:00
Jörg Deckert 35319acde1 .gitignore 2021-08-13 13:09:10 +02:00
Jörg Deckert 0f910b5251 builds the kernel separately to avoid having to rebuild it for any appliance 2021-05-22 19:53:34 +02:00
Jörg Deckert ba223cd2b9 kernel configuration update 2021-04-13 19:09:11 +02:00
Jörg Deckert 920e63a21f default appliance: restore some config and users from theDATA volume 2021-03-16 19:20:27 +01:00
Jörg Deckert 955be9cc46 Example appliances removed, only base and default preserved
The sample appliances have been removed as I do not use them and therefore cannot support them.
2021-02-08 19:16:19 +01:00
Jörg Deckert b2d2b0265f fix make.conf.local 2021-02-08 19:12:27 +01:00
Jörg Deckert d8998bcf46 fix creation without default appliance 2021-02-08 09:46:23 +01:00
Jörg Deckert 38424c532b allowing the use of a default appliance
An appliance with the name "default" can be created,
and its configuration is used as the basis for all
other appliances.
2021-02-07 18:31:01 +01:00
Jörg Deckert aabef6e83d use of the stable kernel, update configs for 5.4 2021-02-06 19:08:00 +01:00
Jörg Deckert 81d9ee2af4 .gitignore: use additional overlays/repositories 2021-02-06 15:26:48 +01:00
Jörg Deckert e8dc655fd2 update default network config 2021-02-05 20:52:27 +01:00
Jörg Deckert f7c9fa17ca use additional overlays/repositories 2021-02-05 20:45:54 +01:00
Jörg Deckert 5cc933830b support for kernel configs without modules support 2021-02-05 17:00:19 +01:00
Jörg Deckert 8bacd765d0 allow the creation of ova images
requires open-vmdk, a gentoo ebuild is available here:
https://git.unitas-network.de/Gentoo/unitas-misc/src/branch/master/app-emulation/open-vmdk
2021-02-05 16:41:23 +01:00
Jörg Deckert abc5c6d49b allow switching between vmdk images with IDE or SCSI controller 2021-02-05 16:35:27 +01:00
Jörg Deckert 9a6000e89c enable german locale 2021-02-05 16:25:51 +01:00
Jörg Deckert ddcb8119f3 fixes to avoid lots of error messages
- disable cgroups portage feature
- allow CAP_NET_ADMIN for the use of systemd-nspawn
  (https://github.com/systemd/systemd/issues/13308)
2021-02-05 16:09:03 +01:00
Jörg Deckert 5431e748e5 PYTHON_TARGETS="python3_8" 2021-02-05 15:56:20 +01:00
Jörg Deckert ac02aab8d1 fix copy of configs/locale.gen 2021-02-05 15:49:58 +01:00
Jörg Deckert d24700fac4 new gentoo portage locations (part 2) 2021-02-05 15:13:54 +01:00
Jörg Deckert 0bb05a4850 new gentoo portage locations 2021-02-05 13:27:21 +01:00
Jörg Deckert 0e4af5c157 update profile to 17.1 2021-02-05 13:05:58 +01:00
Jörg Deckert dea00e187e stage3 tarball is now an xz archive 2021-02-05 12:27:13 +01:00
Jörg Deckert 3a70e8d398 conversion from mercurial to git: format adjusted 2021-02-04 21:02:47 +01:00
Jörg Deckert 9f5044d813 conversion from mercurial to git: .hgignore -> .gitignore 2021-02-04 20:53:12 +01:00
Albert Hopkins 8ebb1fac23 teamplayer: upgrade to postgresql 11 2019-04-01 02:50:45 -07:00
Albert Hopkins 0415321ad9 teamplayer: package.use: add use flags for mercurial
Needed now for mercurial to build.
2019-04-01 02:30:09 -07:00
Albert Hopkins 919743cf48 teamplayer: package.use: add "threads" to ffmpeg
It won't build otherwise.  Probably an upstream bug but I'm too lazy to
report it and besides I probably want threads anyway.
2019-02-25 07:14:26 -08:00
Albert Hopkins 57f3953394 docker: update kernel config 2019-01-11 23:13:52 -08:00
Albert Hopkins 2e423c7db0 configs: pakcage.use: add "internal-glib" to pkgconfig
This is to prevent circular dependencies as well as having to depend on
glib just to build another package.
2018-12-30 10:35:27 -08:00
Albert Hopkins b798561898 Numerous updates:
* Exclude some files from the stage3 tarball to be installed in the chroot.
  This reduces the number of etc-updates that need to be process.

* Manually eselect profile.  This is needed now because /etc/portage/make.profile
  is excluded above.

* Use m4 and a template (in file) to create /etc/fstab instead of using sed.

* Add a "software" target.  This is mainly used for development.
2018-12-08 16:12:33 -08:00
Albert Hopkins 9d3ca3fa55 configs/package.use: add USE flag for kmod 2018-12-07 21:25:15 -08:00
Albert Hopkins d3d3439e4c Makefile: remove ACCEPT_KEYWORDS support.
I don't use this and no longer want to maintain it.
2018-12-07 21:24:18 -08:00
Albert Hopkins 1aa4e0e85e mongodb: package.use: add python_targets_python2_7 to mongodb 2018-12-05 17:14:39 -08:00
Albert Hopkins b8c6f17e24 appliances/x: cleanups 2018-12-05 17:09:59 -08:00
Albert Hopkins 442699acb0 appliances: make.conf: add PYTHON_SINGLE_TARGET where needed
Evidentally it's not set in the Gentoo profile.
2018-12-05 17:08:50 -08:00
Albert Hopkins a8ed4fc007 elasticsearch: update elasticsearch to 6.5.1 2018-12-05 17:06:56 -08:00
Albert Hopkins 01f25f5ecb airport: cleanups
This change makes the Makefile a little more efficient and removes support
for avahi (I never use it).
2018-12-05 17:06:13 -08:00
Albert Hopkins 04d39d94b3 configs/make.conf.*: use INSTALL_MASK
This will reduce the amount of interactive etc-update'ing we need to deal
with.
2018-12-05 17:02:26 -08:00
Albert Hopkins 41a5dae789 airport: fix airport-pre.service systemd unit
The unit file was pointing to an older version of postgresql than is
installed.  Fixed.
2018-12-05 16:59:07 -08:00
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 cb8529f7ea Makefile: remove orphan dependency. 2018-12-01 23:56:25 -08:00
Albert Hopkins 6ba642f7c1 Makefile: fix broken recipe.
The make.conf.recipe was COPYing the file to the wrong location. Fixed.
2018-12-01 23:55:54 -08:00
Albert Hopkins 5794a0ca0e Remove some lines accidentally added in bfa6927 2018-12-01 20:59:49 -08:00
Albert Hopkins b4b167b462 refactor how /etc/portage files are handled 2018-12-01 20:46:12 -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 61d474cb73 teamplayer: package.use updates 2018-12-01 16:01:09 -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 e9fcd8939f mongodb: update package.use 2018-12-01 15:57:52 -08:00
Albert Hopkins d502fb7fef configs/kernel: update amd64 kernel config to 4.19.x 2018-12-01 15:57:23 -08:00
Albert Hopkins 42315ff1e0 x: package.use cleanup 2018-11-15 11:19:18 -08:00
Albert Hopkins 1d463bf9a3 teamplayer: package.use cleanup 2018-11-15 10:42:12 -08:00
Albert Hopkins 5f07f72f55 rabbitmq: package.use cleanup 2018-11-15 10:37:37 -08:00
Albert Hopkins 6f9f082f09 mongodb: package.use cleanup 2018-11-15 10:31:51 -08:00
Albert Hopkins fa1c6929cf mariadb: package.use cleanup 2018-11-15 10:21:33 -08:00
Albert Hopkins 0fdef4e8c1 docker: package.use cleanup 2018-11-15 10:10:07 -08:00
Albert Hopkins 1e2b0ac35b airport: package.use cleanup 2018-11-15 10:04:32 -08:00
Albert Hopkins e27e008c47 Makefile: EMERGE variable tweaks
Don't (need to) use the full path and make --jobs argument smarter.
2018-10-27 12:01:37 -07:00
Albert Hopkins 240e11bcfc Makefile: remove scripts/ as it is now in PATH 2018-10-27 11:54:21 -07:00
Albert Hopkins 2e425341c3 Makefile: One more echo/print change 2018-10-27 11:49:42 -07:00
Albert Hopkins dea0b10abe Makefile: One more cp/COPY change 2018-10-27 11:49:17 -07:00
Albert Hopkins 443f78a5bd scripts: rename echo to print
I don't want to clash with /bin/echo but I want to remove "/scripts" from
the Makefile since it's now in the PATH.
2018-10-27 11:43:45 -07:00
Albert Hopkins 9ed67885c6 A couple more cp/COPY $(inroot)/RUN replacements 2018-10-27 11:25:29 -07:00
Albert Hopkins 772b5b60fd teamplayer: update postgresql version to 10. 2018-10-27 11:19:15 -07:00
Albert Hopkins c5c6c8da7f airport: update postgres slot to 10 2018-10-27 11:18:42 -07: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 d854fe287d Makefile: remove unexports
They're not overwriting portage environment variables anymore because
they've been renamed.
2018-10-26 23:27:39 -07:00
Albert Hopkins fe6a9b46fb s/PKGDIR/VA_PKGDIR/ 2018-10-26 23:26:16 -07:00
Albert Hopkins cac3d36946 s/ARCH/VA_ARCH/ 2018-10-26 23:24:05 -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 c010e92b85 configs/rsync-excludes: exclude files in /usr/portage/ 2018-10-05 06:42:15 -07:00
Albert Hopkins a229b85446 configs/make.conf.*: updates 2018-10-05 06:41:28 -07:00
Albert Hopkins c3d5311079 configs: update kernel configs
To 4.18
2018-10-05 06:40:15 -07:00
Albert Hopkins 0158579895 rabbitmq: updates 2018-10-04 22:18:19 -07:00
Albert Hopkins 1870d912c2 elasticsearch: updates 2018-10-04 22:17:51 -07:00
Albert Hopkins 8ff7dc21b9 teamplayer: updates 2018-10-04 21:29:30 -07:00
Albert Hopkins 90f0cc5f8c owncloud: remove
I don't use this appliance.
2018-10-04 21:27:53 -07:00
Albert Hopkins f2233f66a6 mariadb: updates 2018-10-04 21:26:38 -07:00
Albert Hopkins 971fd9ace8 airport: upgrade python to 3.6 2018-10-04 21:25:43 -07:00
Albert Hopkins 65a0c599ad vabuilder: package.use add required flags for python-2.7 2018-10-04 19:45:06 -07:00
Albert Hopkins 3db97d71eb docker: package.use: add iptables to iproute2 2018-09-25 12:00:06 -07:00
Albert Hopkins 5db908b61f configs: update amd64 kernel config to 4.18.3 2018-09-06 14:36:04 -07:00
Albert Hopkins c79f4776f5 teamplayer: fix postgres config 2017-08-18 12:14:34 +00:00
Albert Hopkins adb5f59cd9 config: update kernel configs to 4.11 2017-05-28 01:10:59 +00: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 434d5d6759 mongodb: use the stable version of mongodb
I don't use this much anymore so it's easier for me to maintain if we stick
to stable.
2017-05-22 03:16:21 +00:00
Albert Hopkins 4336143b00 elasticsearch: upgrade to elasticsearch-5.4.0 2017-05-22 03:14:54 +00:00
Albert Hopkins 2db0b80334 elasticsearch: increase the # of file descriptors
The elasticsearch process needs more file descriptors to run than the
default allows.
2017-05-22 03:14:12 +00:00
Albert Hopkins 46b8f22294 elasticsearch: world: use icetea-bin:8
For reasons unknown to me, the lower version number has the higher slot
number.  Anyway we need the lower version numbered one for ES to run.
2017-05-22 03:12:07 +00:00
Albert Hopkins acb3036226 teamplayer/airport: keyword eselect-postgresql 2017-05-10 09:57:34 +00:00
Albert Hopkins e5437fa158 teamplayer: un-mask mpd-0.20.4
Gentoo bug #609618 is fixed.
2017-04-27 12:46:50 +00:00
Albert Hopkins ac76f07b4d docker: update kernel.config to 4.10 2017-04-27 12:42:29 +00:00
Albert Hopkins ac4c2c9fa4 airport: remove uneeded config file change 2017-03-19 14:35:15 +00:00
Albert Hopkins 412e6ce4c3 docker: updates 2017-03-19 14:34:20 +00:00
Albert Hopkins 98f03494e5 teamplayer: remove uneeded config file change 2017-03-19 14:33:09 +00:00
Albert Hopkins 5df4a8a41c elasticsearc: upgrade to elasticsearch-5 2017-03-19 14:32:19 +00:00
Albert Hopkins ba91dea6cd teamplayer: mask mpd-0.20.4
It currently does not build w/o a patch.
2017-03-18 10:37:00 +00:00
Albert Hopkins a019fd6a72 teamplayer: package.accept_keywords: add mpd
We want the latest/greatest mpd.
2016-12-20 22:43:33 +00:00
Albert Hopkins 35c0f571db airport: settings.py: add ALLOWED_HOSTS=['*']
This is so you don't have to manually set ALLOWED_HOSTS in the appliance.
It's promiscuous but you can always reset it later.
2016-12-20 22:42:46 +00:00
Albert Hopkins 9eb881fea1 teamplayer: config updates 2016-12-15 00:24:41 +00:00
Albert Hopkins 54c8f8a617 configs/kernel.config.*: update to linux 4.9 2016-12-15 00:23:15 +00:00
Albert Hopkins ad1708d1f6 docker: update kernel config for 4.9 2016-12-13 22:45:50 +00:00
Albert Hopkins 15f8f9fc24 teamplayer: add USE flag to allow mpd to play opus files 2016-12-10 18:04:21 +00:00
Albert Hopkins d8055f8c2d */package.use add "kill" to procps
Needed by systemd.
2016-12-10 15:26:09 +00:00
Albert Hopkins 91a9a21978 teamplayer/package.use: remove extraneous whitespace
Perhaps I fell asleep at the keyboard?
2016-12-10 15:26:52 +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 18fdbb86ea Makefile: perform the change-password step in the stage4 phase
This should really happen as late as possibly and possibly not at all.  If
we change (lock) the password too soon, then some build steps can fail.
For example, adduser will fail if root needs to change its password first.
2016-12-08 11:57:41 +00:00
Albert Hopkins 82819040a8 mongodb: updates
Add libpcre to package.keywords (needed by mongodb).
2016-12-08 11:54:38 +00:00
Albert Hopkins 4423189dba Makefile: run "postinstall" as late as possible
This is in case the "postinstall" step wants to override something that the
software target did.
2016-12-06 02:32:58 +00:00
Albert Hopkins 88dcafaa34 teamplayer: updates
Put "humanize" in INSTALLED_APPS since it's needed now.
2016-12-06 02:30:44 +00:00
Albert Hopkins ef198be3b1 configs/kernel.config.*: update for linux 4.8.12 2016-12-05 00:55:25 +00:00
Albert Hopkins d3716fd8a1 docker: package.use updates
Including contrib now.
2016-12-04 22:46:14 +00:00
Albert Hopkins 285ad6c8de docker: fix ip forwarding in containers when the host is running systemd
Finally this is fixed.  Thanks Arch Linux wiki.
2016-12-04 22:45:40 +00:00
Albert Hopkins 9408257dd4 docker: kernel config update
Update to work with 4.8.12.
2016-12-04 22:43:12 +00:00
Albert Hopkins ca7dc93859 docker: include the .cfg file that uses a custom kernel
This was not added to the repo but should have been.
2016-12-04 22:42:48 +00:00
Albert Hopkins 7e5e4d75d4 docker: updates 2016-12-04 01:56:24 +00:00
Albert Hopkins 34a9ad7e49 teamplayer: update to work with the latest teamplayer changes 2016-12-04 01:50:19 +00:00
Albert Hopkins c4ca9c69ee .hgignore: ignore the stage3 tarballs 2016-11-20 17:33:10 +00:00
Albert Hopkins acf9ec8c91 teamplayer: updates
Update to work with Django 1.01 since teamplayer (default) supports it now.
Also use settings.py instead of settings_local.py which I now consider an
anti-pattern.
2016-11-20 17:31:23 +00:00
Albert Hopkins 066e94c370 rabbitmq: package.use: add "ssl" to erlang
It's now a requirement.
2016-11-09 16:32:11 +00:00
Albert Hopkins adb598e71d elasticsearch: update to elasticsearch 2.4.1 2016-10-21 02:01:43 +00:00
Albert Hopkins b78dd0b2b1 teamplayer: upgrade to postgres 9.6 2016-10-19 12:49:58 +00:00
Albert Hopkins eede1e0ac4 airport: upgrade to postgres 9.6 2016-10-19 12:26:12 +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 e0f3835e72 appliances/*/package.use: add 'hostname' to sys-apps/net-tools 2016-10-19 11:44:45 +00:00
Albert Hopkins 45a99fe977 configs/kernel.config.amd64: update to kernel 4.8 2016-10-19 11:43:25 +00:00
Albert Hopkins 2156e31833 mongodb: updates 2016-09-14 10:38:39 +00:00
Albert Hopkins 02f069aab6 docker: add docker-compose to world file 2016-09-14 10:37:42 +00:00
Albert Hopkins c2b700c06b docker: update kernel config 2016-09-14 10:36:51 +00:00
Albert Hopkins 62bca7ade7 configs/issue: remove the tux character
It no longer renders since my font update.
2016-09-05 22:18:01 +00:00
Albert Hopkins c2f1d3b680 mariadb: updates 2016-09-05 22:14:46 +00:00
Albert Hopkins 8869ee5331 configs/kernel.config.* update to Linux 4.7.0 2016-08-07 12:47:51 +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 7a54cf9e1c Makefile: remove "latest" from stage3 tarball name.
Because it's not always the latest :P
2016-08-07 10:53:09 +00:00
Albert Hopkins cecf3d0582 vabuilder: add git to world file
It's been required by vabuilder for a while now.
2016-08-07 10:52:06 +00:00
Albert Hopkins 674d389ef9 elasticsearch: don't install the marvel plugin
I don't use it and now it requires you to interactively agree to some
license that I've never read.
2016-08-07 10:51:23 +00:00
Albert Hopkins be7559abb3 elasticseach: update elasticsearch to 2.3.5 2016-08-07 10:49:34 +00:00
Albert Hopkins 1be1557a70 configs/make.conf.* add cgroup to FEATURES 2016-07-24 20:10:54 +00:00
Albert Hopkins 1aea18500c configs/make.conf.* add binpkg-multi-instance to FEATURES
This will allow the packages/ directory to keep packages of the same
ebuild with, e.g., different USE flags.
2016-07-24 20:08:37 +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 81b7e1cd1b Makefile: assume we're using the systemd stage3
So that means we don't have to uninstall eudev and replace it with systemd.
Also apparently we need to set the machine-id as it doesn't appear to exist
in the stage3 and I think installing systemd (which we don't do anymore)
does it for you.
2016-07-23 21:16:26 +00:00
Albert Hopkins b1aab65861 Makefile: don't eselect profile
Since we're now pulling in the systemd stage3s presumably the profile is
set correctly in the stage3.
2016-07-23 21:14:14 +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 9e1441231f Makefile: remove commented out code 2016-07-23 11:33:02 +00:00
Albert Hopkins 0f764da844 jenkins/nginx.conf: use better proxying
This was copied over from the Jenkins docs.
2016-07-23 11:30:20 +00:00
Albert Hopkins 8f578a64e5 jenkins/Makefile: use "cp" instead of "cp -u"
The -u flag causes breakage when the config file from the package is
newer than the custom config.
2016-07-23 11:29:25 +00:00
Albert Hopkins 3b31663794 docker/packge.keywords: updates 2016-07-23 11:28:04 +00:00
Albert Hopkins c3b1c3264c airport: add sqlite to python's USE
Things don't work without it.
2016-07-23 11:25:05 +00:00
Albert Hopkins 810e10aa2c appliances: remove xfce
Untested and unused.
2016-07-10 10:11:43 +00:00
Albert Hopkins ade5c5b463 appliances: remove gnome
Untested and unused.
2016-07-10 10:11:20 +00:00
Albert Hopkins 3272210ba5 appliances: remove kde
* I don't use it

* It doesn't support XDMCP anymore

* It's more trouble than it's worth
2016-07-10 10:10:25 +00:00
Albert Hopkins 51d2482cab appliances: remove dpaste
I don't use this and it doesn't appear to work anymore.
2016-07-10 10:08:57 +00:00
Albert Hopkins cbe8307449 kde: updates 2016-06-28 11:36:06 +00:00
Albert Hopkins 06054a5066 docker: updates 2016-06-28 11:31:46 +00:00
Albert Hopkins 1041b1c860 configs/kernel.config.x86: update to Linux 4.6.0 2016-05-19 17:55:28 +00:00
Albert Hopkins 600c875216 configs/kernel.config.amd64: update to Linux 4.6.0 2016-05-19 16:35:25 +00:00
Albert Hopkins 1352ae107e owncloud: updates 2016-03-20 18:04:00 +00:00
Albert Hopkins 976147ee13 configs/kernel.config.x86: update to Linux 4.5.0 2016-03-17 19:54:30 +00:00
Albert Hopkins f67a22fa94 configs/issue: use truecolor escape sequences
It works in my terminals (gnome-terminal, gnu screen, & libvirt) so I'm
going ahead and commiting it.
2016-03-17 18:47:37 +00:00
Albert Hopkins 5d7dca06f9 configs/kernel.config.amd64: update to Linux 4.5.0 2016-03-17 18:46:40 +00:00
Albert Hopkins d48248ca46 Makefile: s/udev/eudev/
Apparently Gentoo no longer supports the no longer supported split udev
and replaced it with eudev in their stage3s.
2016-03-17 18:45:58 +00:00
Albert Hopkins 59eac8da06 Makefile: shell: make a quieter
So that the user can see the instructional messages better.
2016-03-10 20:10:24 +00:00
Albert Hopkins 6d06ba3c05 xfce: updates 2016-03-10 20:09:24 +00:00
Albert Hopkins b435c4b5c5 gnome: updates for GNOME 3.18 2016-03-10 20:09:03 +00:00
Albert Hopkins 017b37d025 mariadb: updates.
Add "server" flag to mariadb in package.use
2016-02-03 11:45:57 +00:00
Albert Hopkins 6c06958fc9 */package.use: add "ssl" to wget
It's needed to install a lot of packages (such as virtualenv)
2016-01-21 09:03:48 +00:00
Albert Hopkins c6f192cde0 mongodb: update package.use
wget needs ssl support.
2016-01-08 01:35:46 +00:00
Albert Hopkins 3e9b250524 teamplayer: update to Postgres 9.5 2016-01-08 01:33:29 +00:00
Albert Hopkins 523d23043a airport: update to Postgres 9.5 2016-01-07 20:59:33 +00:00
Albert Hopkins 7fdaf49b36 remove hemp-node appliance
I don't use this anymore, and there are better and still-maintained
alternatives (Docker, vagrant, ansible, etc.) and I no longer feel like
maintaining it.
2015-12-20 23:11:44 +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 e867f3cf2e Makefile: use the git repo for the PORTAGE_DIR
Now more rsync'ing snapshots.  We can just clone/pull the repo on github.
2015-12-17 21:25:59 +00:00
Albert Hopkins 45f3ee7a75 Makefile: use /var/tmp instead of /tmp
systemd (by default) opens with a clean /tmp, so copying a file into it
will get cleared out (it's a tmpfs mount).
2015-12-17 21:25:03 +00:00
Albert Hopkins 098369b404 jenkins: updates
Add git, mercurial, subversion and virtualenv
2015-12-17 21:23:13 +00:00
Albert Hopkins 9245bc26b9 jenkins: fix a typo
s/jar/war/
2015-12-13 15:44:34 +00:00
Albert Hopkins 6dbe6c0b98 airport: updates 2015-12-12 21:42:37 +00:00
Albert Hopkins c907bdf048 appliances: new appliance: vabuilder
This appliance hosts the Gentoo Virtual Appliance[1] tool.  Now you can
build the thing that builds the thing that builds the things.

Note that you cannot (yet) run this inside of a systemd (or Docker)
container (without giving it special privs), but I'm working on that.  It
should at least be possible to build stage4s with it.

[1] https://bitbucket.org/marduk/virtual-appliance
2015-12-11 04:12:56 +00:00
Albert Hopkins a8eb60d006 appliances: new appliance: jenkins
This appliance runs the Jenkins[1] continuous integration tool.  The
service is available via HTTP port 80.

[1] http://jenkins-ci.org/
2015-12-11 01:27:50 +00:00
Albert Hopkins 42d8f6df45 appliances: new appliance: rabbitmq
This appliance runs the rabbitmq[1] message broker service.

[1] https://www.rabbitmq.com/
2015-12-11 01:23:19 +00:00
Albert Hopkins a188e9557c appliances: new appliance: docker
This appliance runs the docker[1] service.  Now you have something to run
your Gentoo Virtual Appliances images in ;-)

Note this appliance uses its own kernel config, because docker won't run
with the default configs.

[1] https://www.docker.com/
2015-12-11 01:20:13 +00:00
Albert Hopkins 899184e1ec Makefile: fix typo
The line that was including the appliance-specific config had a typo.  The
typo was overlooked all this time because no appliance really uses this
feature.  Until now...
2015-12-11 01:15:10 +00:00
Albert Hopkins e73c7cebb5 Makefile: shell: remove /root/.bash_history on exit
So not to pullute the history in the appliance.
2015-12-10 17:17:50 +00:00
Albert Hopkins 43408fc986 Makefile: print some helpful status messages 2015-12-10 17:17:21 +00:00
Albert Hopkins 1253b0325e appliances: new appliance: mariadb
This is a mariadb appliance.
2015-12-10 17:16:51 +00:00
Albert Hopkins ae1b17132e Makefile: add a "shell" target
This will put you at a shell prompt inside the build environment.  Why
didn't I think of this before?!
2015-12-09 18:15:09 +00:00
Albert Hopkins 0d0af1a03e elasticsearch: upgrade to elasticsearch 2.1.0 2015-12-09 18:14:21 +00:00
Albert Hopkins 2e296640e5 teamplayer: updates
For some reason we had to add "setuptools" to emerge even though we're
installing virtualenv.  Does virtualenv not install setuptools anymore or
was this just a bug?
2015-12-09 18:13:18 +00:00
Albert Hopkins ae2dc47182 gnome: updates 2015-12-09 18:11:56 +00:00
Albert Hopkins 24944f921a configs: add "openssl" to USE in make.conf
Now that there is a openssl/libressl split.  We choose openssl for now.
Perhaps when everything is compatible we may move to libressl.
2015-12-09 18:11:27 +00:00
Albert Hopkins 288b734590 configs: update x86 kernel config for 4.3.0 2015-12-03 17:21:57 +00:00
Albert Hopkins a4680c8ded configs: update amd64 kernel config for 4.3.0 2015-12-03 16:22:43 +00:00
Albert Hopkins f5c4b54a14 elasticsearch: Makefile: add PHONY target 2015-10-28 12:26:31 +00:00
Albert Hopkins 953793bd20 gnome: updates 2015-10-28 12:24:53 +00:00
Albert Hopkins e0fdebdb0d mongodb: install mongo-tools
I guess I didn't know they were separate now.
2015-09-30 11:07:12 +00:00
Albert Hopkins 5c77f82f71 owncloud: updates 2015-09-30 09:46:51 +00:00
Albert Hopkins e2e08b05d9 elasticsearch: install the marvel plugin 2015-09-30 09:45:55 +00:00
Albert Hopkins 902886918a teamplayer: pass '--no-cache-dir' to pip
So that it doesn't create a directory we don't want.
2015-09-30 08:49:36 +00:00
Albert Hopkins 9eb8ceeb06 Set the locale
By default it's set to en_US.utf8
2015-09-26 20:57:49 +00:00
Albert Hopkins ab8dd35965 teamplayer/*.service: remove extraneous whitespace 2015-09-23 10:09:29 +00:00
Albert Hopkins b9a7851810 teamplayer: set wsgi service type to notify
It supports sd_notify()
2015-09-23 10:06:39 +00:00
Albert Hopkins 8ba3d8b191 teamplayer: send the correct signal to the uwsgi service
The reason we had to put a timeout in was that we weren't sending the
correct signal.  This change fixes that.
2015-09-23 10:00:35 +00:00
Albert Hopkins b3ff6f8e4a teamplayer/settings: set new custom haystack highligher 2015-09-23 09:50:41 +00:00
Albert Hopkins cc8b95d425 elasticsearch/Makefile: run wget inside the container instead of the host 2015-09-23 03:37:42 +00:00
Albert Hopkins 24ce75a112 elasticsearch: update to elasticsearch 1.7.2 2015-09-23 03:37:12 +00:00
Albert Hopkins 73c5fce1e0 teamplayer: replace openrc-style startup with systemd units
When I switched over from openrc to systemd I was being lazy and took
advantage of the fact that /etc/local.d still gets run as usual on
Gentoo.  This commit finally does a proper(-ish) systemd startup using
(3) unit files.
2015-09-23 03:35:47 +00:00
Albert Hopkins bde2764a9c teamplayer: add pip to package.accept_keywords
Needed by virtualenv
2015-09-23 03:31:16 +00:00
Albert Hopkins e6dc5c7874 airport/Makefile: remove unused variable 2015-09-17 01:06:59 +00:00
Albert Hopkins 0ea74dcf59 xfce: updates 2015-09-16 23:30:13 +00:00
Albert Hopkins 168de34153 Use xargs to process the world file
Instead of the if `stat ....` we can simply use xarg -r -a ...
2015-09-16 23:29:49 +00:00
Albert Hopkins 2f9b52e3c5 Change the way we create checksums 2015-09-14 11:09:15 +00:00
Albert Hopkins 91b5e962ec Allow per-appliance build directories.
This allows different appliances from the same profile to be built
simultaneously.
2015-09-14 10:22:42 +00:00
Albert Hopkins 1da2ba10dd Set systemd container name according to profile.
This allows more different profiles to with the same appliance to build
simultaneously.
2015-09-14 10:16:56 +00:00
Albert Hopkins 24be5ce588 Allow images/packages to build in a different directory
By setting the VABUILDER_OUTPUT Makefile variable, one can have images
and packages saved to and retrieved from that directory instead of the
default (CURDIR).  This can be use to, e.g., have different profile's
builds in different directories (instead of having to give images
different filenames, etc.).
2015-09-14 10:00:37 +00:00
Albert Hopkins 2a241978ee configs: update x86 kernel config for Linux 4.2 2015-09-08 18:12:09 +00:00
Albert Hopkins b938a7a623 configs: update amd64 kernel config for Linux 4.2 2015-09-08 16:46:24 +00:00
Albert Hopkins 0b3f6db39e Don't use `-C ../` when extracting portage
This is wrong and potentially can damage the host filesystem.
2015-09-08 16:45:23 +00:00
Albert Hopkins ce1c29a036 kde: updates
Update package.use due to name changes
2015-09-08 16:43:57 +00:00
Albert Hopkins 6ffc462188 Exclude virtuals from the package list file
There's really no point in showing the virtuals.
2015-09-03 14:11:01 +00:00
Albert Hopkins 0c19fb8470 New appliance: elasticsearch
This is an elasticsearch image/appliance.
2015-08-07 22:39:59 +00:00
Albert Hopkins 995705d789 teamplayer: log uwsgi to a different file.
Having both tornado and uwsgi dump to the same file makes debugging
difficult.  Switch uwsgi's logs to uwsgi.log.
2015-08-07 22:38:14 +00:00
Albert Hopkins 06a71843b1 teamplayer: fix stop-teamplayer script
It was still calling "manage.py stop_steam" but "stop_stream" was renamed
to "shutdown"
2015-08-07 22:37:14 +00:00
Albert Hopkins 48cb7905e9 Makefile: remove bogus .PHONY targets
These targets were removed but listed in .PHONY
2015-08-07 22:34:42 +00:00
Albert Hopkins 361306a10e xfce/package.use: updates 2015-08-03 11:26:13 +00:00
Albert Hopkins 8af67d5cea owncloud/package.use: updates 2015-08-03 10:15:10 +00:00
Albert Hopkins 04852ff605 */package.use: add "ssl" to net-misc/openssh 2015-08-03 10:14:53 +00:00
Albert Hopkins 7144d2d3ec images: change the way checksums are produced 2015-08-02 18:15:26 +00:00
Albert Hopkins 327013b660 Makefile: don't call passwd twice
Instead of calling passwd twice, one to delete the root password and one
to expire it, simply call it once and pass --delete and --expire to the
same command.
2015-08-02 17:48:27 +00:00
Albert Hopkins d696f5577d appliances/*/package.use: add sha512 and nullok to pambase.
The nullok flag is needed in order to allow root to have an empty password
(forced to set on first login).

The sha512 flag is just to ensure passwords are cyptographically secure.
2015-08-02 17:47:28 +00:00
Albert Hopkins bf950c50d9 xfce: Updates. 2015-07-11 22:41:24 +00:00
Albert Hopkins 840bb4b0c4 gnome: Updates. 2015-07-11 22:41:12 +00:00
Albert Hopkins 7947b57066 appliances/*/package.use: Remove "minimal" from ncurses.
Having it set removes the terminfo database files and I need them.
2015-07-11 22:40:39 +00:00
Albert Hopkins 1f8703d446 teamplayer/package.use: Add "glib" to mpd.
It's required now for support for most things.
2015-06-28 20:09:09 +00:00
Albert Hopkins 26353ee7db configs/make.conf.* Add "ipv6" to USE
In a systemd container, some things won't work correctly if not compiled
with ipv6 (e.g. Python)
2015-06-28 20:08:24 +00:00
Albert Hopkins ca736466f2 appliances/kde: updates. 2015-06-27 17:30:15 +00:00
Albert Hopkins c5b8a0f6a9 configs: Update kernel config (amd64) to 4.1.0-gentoo 2015-06-25 12:12:00 +00:00
Albert Hopkins ce7af970df configs: Update kernel config (x86) to 4.0.0-gentoo 2015-04-22 02:32:50 +00:00
Albert Hopkins 994466c6e7 configs: Update kernel config (amd64) to 4.0.0-gentoo 2015-04-20 22:31:42 +00:00
Albert Hopkins bfd2d5896e configs: Update kernel config (x86) to 3.19.3-gentoo 2015-04-10 10:34:10 +00:00
Albert Hopkins ae530cbf2d configs: Update kernel config (amd64) to 3.19.3-gentoo 2015-04-10 09:26:40 +00:00
Albert Hopkins b0a7dae92b make "etc-update" work
It was using the old method of setting the EDITOR environment variable to
nano, which does not work with systemd-nspawn.  Fixed.
2015-04-10 09:25:44 +00:00
Albert Hopkins db224c4bb8 Remove sysfs from fstab
It's not needed with systemd
2015-03-19 01:29:39 +00:00
Albert Hopkins cff474da63 Makefile: new target: checksumps
Creates a sha256 checksum file in the $(IMAGES) directory.
2015-03-16 02:08:25 +00:00
Albert Hopkins 4a7010a5ee gnome: Updates
Apparently Gnome 3.14 is marked stable (just in time for Gnome 3.16)
2015-03-16 02:07:20 +00:00
Albert Hopkins 5240c6b302 Makefile: Add missing endquote 2015-03-15 12:56:38 +00:00
Albert Hopkins df92b10200 Makefile: fix a typo
"IMAGES" was misspelled.
2015-03-15 12:56:18 +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 0504f76a1a Makefile(s): use long option names when calling emerge
Because I can never remember the difference between -n and N, -c and -C,
etc.
2015-03-13 11:31:00 +00:00
Albert Hopkins b6833b57b6 airport: Don't change the shell of the postgres user
Why were we even doing this?
2015-03-13 11:24:33 +00:00
Albert Hopkins 1a31e4f951 Makefile: appliance-list: Display appliances in 1 column 2015-03-09 11:20:14 +00:00
Albert Hopkins 5889d9f251 Makefile: touch the portage tarball after downloading
Just in case.
2015-03-09 11:19:23 +00:00
Albert Hopkins c252121561 kde: Updates
A flag needed to be added to package.use
2015-03-09 11:16:49 +00:00
Albert Hopkins 04714e1e27 Added tag 2.0b1 for changeset 872c0e4b2337 2015-03-01 20:16:20 +00:00
Albert Hopkins b92d617f84 Makefile: clean: Remove temporary image files 2015-03-01 12:49:04 +00:00
Albert Hopkins 58d4bad383 Makefile: PORTAGE_DIR: touch the directory when it's unpacked.
Otherwise it retains the same timestamp as the tarball, which may not
trigger a stage4 rebuild.
2015-03-01 12:47:02 +00:00
Albert Hopkins 1a36e228c0 Makefile:STAGE4_TARBALL: Fix typo
Target should have been "PORTAGE_DIR" and not "PORTAGE"
2015-03-01 12:46:18 +00:00
Albert Hopkins 359ec88aed teamplayer: set USE_TZ to False
Although the documentation says it defaults to False, it seems to be getting
set to True in my deployments.  This explicitely sets it to false and also
sets the TIMEZONE to UTC.
2015-03-01 11:45:06 +00:00
Albert Hopkins 95e3d1e9af Makefile: make the default target "stage4" instead of "image" 2015-03-01 01:55:57 +00:00
Albert Hopkins f4e8a22ddb Makefile: use /usr/bin/basename in a few echo statements 2015-03-01 01:52:49 +00:00
Albert Hopkins 86311ebd9f Makefile: Get rid of BUILD_SOFTWARE option.
It's hardly useful anymore.
2015-03-01 01:31:55 +00:00
Albert Hopkins 07c96253dc Merge SWAP_FILE and SYSCONFIG targets into PREPROOT
They were small targets and PREPROOT is pretty much responsible for that
anyway.
2015-03-01 01:06:24 +00:00
Albert Hopkins bc22178119 Makefile: add sync_stage3 to .PHONY 2015-02-28 22:36:23 +00:00
Albert Hopkins 9562528920 stage4: Remove "build_stage4" and don't force stage4 to build every time
The stage4 target, specifically the STAGE4_TARBALL target now depends on
the portage/ directory, the appliances/<appliance>/ directory and the
stage3 tarball.  It will not be rebuild if these are up-to-date.  Therefore
other targets that depend on stage4 (e.g. RAW_IMAGE) won't force stage4 to
be rebuilt if it is up to date.

If you want to force a stage4 rebuild, for example if the appliance pulls
from a live VCS, then the recommended way to do this is:

    $ touch appliances/<appliance>
    $ make APPLIANCE=<appliance> stage4
2015-02-28 22:35:45 +00:00
Albert Hopkins c8c9bc1a1f Make the other image/ targets depend on $(RAW_IMAGE).
Instead of "image" so that if the raw image is built and up-to-date then it
need not be rebuilt to satisfy the other image targets.  This excludes the
stage4 "image" which of course is necessary to build the $(RAW_IMAGE)
target.
2015-02-28 22:30:01 +00:00
Albert Hopkins dff2e32481 Makefile: make the $(RAW_IMAGE) target install the stage4 files.
The raw image making was kind of split up, with different targets to create
the image, partition, copy files, install grub, etc.  This change makes it
all one target.  After "make image" is done, or, e.g., "make images/base.img"
then the resulting file will be built and contain all the necessary files.

This make the $(RAW_IMAGE) target more uniform with the other image/
targets.  It will also make the other image/ targets easier to satify.
2015-02-28 22:27:39 +00:00
Albert Hopkins e28fcda122 Fix package.* files installation to work with new stage3's
The new (2015-02) stage3 tarballs use package.* directories instead of
files, causing the files to fail to be copied over.  This change instead
copies them to the directories, creating them if they don't already exist.
2015-02-28 22:20:50 +00:00
Albert Hopkins 829eeb5806 Merge in fix from stable branch. 2015-02-28 20:11:16 +00:00
Albert Hopkins 99c79d353d teamplayer: Don't "pip install -e" the package
It always irks me when I see other people do this in deployments and here I
am doing it myself.
2015-02-28 19:09:41 +00:00
Albert Hopkins d66a465456 Makefile: Make the systools target inside the chroot 2015-02-27 22:25:56 +00:00
Albert Hopkins 27f7653ee7 Makefile: Make the sysconfig target inside the chroot 2015-02-27 22:12:46 +00:00
Albert Hopkins 1a9d97d016 Makefile: Make the preproot target inside the chroot 2015-02-27 22:05:17 +00:00
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 4775bc9b07 gnome: Add "udev" flag to xorg-server.
It's required but unfortunately portage doesn't say so. It just dies in the
build if it's not enabled.
2015-02-27 20:08:25 +00:00
Albert Hopkins 958ef1a7b9 Merge in changes from stable. 2015-02-22 16:31:02 +00:00
Albert Hopkins d542be4ba2 make.conf: Switch python targets to 3.4
It's the latest stable python3.
2015-02-22 16:30:15 +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 928dcf9e1c Merge in stable fix. 2015-02-21 13:18:10 +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 2f34925b43 Merge in changes from stable. 2015-02-20 20:25:52 +00:00
Albert Hopkins d41c60f9bb xfce: Change firefox to firefox-bin.
Use the bin package instead.
2015-02-20 20:25:21 +00:00
Albert Hopkins 5a89b2a70b Merge in fixes from stable branch. 2015-02-17 20:31:35 +00:00
Albert Hopkins 5ca8aefb99 teamplayer: Use the new "mood" AUTOFILL_STRATEGY 2015-02-17 20:25:43 +00:00
Albert Hopkins 8823b3f922 teamplayer: Use python3.4
Instead of 3.3 (3.4 is stable now).
2015-02-17 20:23:58 +00:00
Albert Hopkins 2e4eeb4238 teamplayer/package.use: Add use flag for libevent.
This fixes a build issue with ntp.  The bug is already reported upstream.
2015-02-17 20:21:58 +00:00
Albert Hopkins e3836906f6 configs/make.conf.*: Add "bindist" to USE variable.
I thought I had committed this already.  Since appliances/images may be
distributed, we should have bindist set.  It only took me nearly 5 years to
fix this bug.
2015-02-17 20:20:39 +00:00
Albert Hopkins ff025a25c5 Merge in fixes from stable. 2015-02-16 19:17:55 +00:00
Albert Hopkins 38352472d7 configs: Update x86 kernel to 3.19 2015-02-16 19:14:39 +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 2841b6ebf7 configs: Update amd64 kernel to 3.19 2015-02-16 18:27:29 +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 64d32b83ac appliances: Drop drupal.
It didn't build last I checked and I don't use it anyway so...
2015-02-14 20:24:31 +00:00
Albert Hopkins 6d149c6bd4 Creating a tag (and stable branch).
Keeping a stable branch as I commence to convert to systemd.
2015-02-14 20:04:28 +00:00
Albert Hopkins 076daba560 airport: Updates. 2015-01-07 22:27:18 +00:00
Albert Hopkins bc31fc05bb teamplayer: Updates. 2015-01-07 13:07:38 +00:00
Albert Hopkins 8d4eae03a4 configs: Update x86 kernel config to 3.18 2014-12-22 21:49:49 +00:00
Albert Hopkins e2761bb99c configs: Update amd64 kernel config to 3.18 2014-12-22 20:34:18 +00:00
Albert Hopkins 014d33472a configs: Update x86 kernel config to 3.17 2014-10-10 18:29:36 +00:00
Albert Hopkins e2214a04a1 configs: Update am64 kernel config to 3.17 2014-10-10 14:07:33 +00:00
Albert Hopkins c3aeba709c configs: Update amd64 kernel config to 3.16.2. 2014-09-11 13:11:09 +00:00
Albert Hopkins f9aad343ca kernel.config. update x86 for kernel 3.16.1 2014-08-30 18:18:57 +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 c8cec7093c package.use: Use internal-glib for pkgconfig.
This rids of circular deps and running @preserved-rebuild (which currently
doesn't work but will in the next commit).
2014-08-30 16:01:35 +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 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 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 15c50ddc8d configs: Update 64-bit config for linux 3.15 2014-06-13 11:15:01 +00:00
Albert Hopkins fa09145213 configs: Update 32-bit config for linux 3.15 2014-06-13 10:59:40 +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 a5621ab89d teamplayer: Add teamplayer middleware to settings.
This is required for the newer TeamPlayer to work.
2014-06-02 22:38:12 +00:00
Albert Hopkins aedc7a4b06 Remove arangodb appliance.
It doesn't look like this is being picked up by Gentoo and the overlays are
either out-dated or fail to build with my setup.  I don't use it anyway so
I'm removing it.  I may bring it back if it ever makes it into the official
tree.
2014-05-18 18:51:30 +00:00
Albert Hopkins 9bbba6d985 kernel.config: Update x86 config to 3.14.3 2014-05-18 18:45:48 +00:00
Albert Hopkins 0234357706 kernel.config: Update amd64 config to 3.14.4. 2014-05-18 18:43:13 +00:00
Albert Hopkins 23a18a78aa mongodb: Updates. 2014-05-18 17:03:34 +00:00
Albert Hopkins 86ba13e15d mongodb: Updates. 2014-05-18 16:59:17 +00:00
Albert Hopkins 9c75a490e8 kde: Updates. 2014-05-18 16:58:45 +00:00
Albert Hopkins 23ca0987b3 gnome: Updates.
This finally works with GNOME 3.  It's still headless, works with XDMCP,
but a bit slow (at least on HiDPI displays).  Still needs some work.
2014-05-18 14:26:59 +00:00
Albert Hopkins d0fdd52288 owncloud: Updates. 2014-05-10 14:10:01 +00:00
Albert Hopkins c59aabb5b3 mongodb: Updates. 2014-05-10 14:09:21 +00:00
Albert Hopkins 35b2ccce16 dpaste: Updates. 2014-05-10 13:22:48 +00:00
Albert Hopkins 1369a05226 drupal: Updates. 2014-05-10 12:57:36 +00:00
Albert Hopkins cfbc8d7a58 airport/package.use: Sort the file. 2014-05-10 12:20:48 +00:00
Albert Hopkins b5c74d32fe */package.use: Add udev USE flag to sys-apps/hwids.
This seems to be needed now.
2014-05-10 12:19:25 +00:00
Albert Hopkins 771b7907d9 kernel.config.amd64: Update kernel config for 3.13.5 2014-03-02 18:53:55 +00:00
Albert Hopkins 9ec94656a4 airport: Use Python 3.3
It's in stable now.
2014-03-02 16:19:21 +00:00
Albert Hopkins 1000a31487 kernel.config.x86: Updated kernel config for 3.15 2014-03-02 16:17:32 +00:00
Albert Hopkins bd51446d2a Misc. appliance updates. 2014-01-11 15:08:58 +00:00
Albert Hopkins af18cc6c91 airport: Misc. Updates.
* Allow to build a particular series (e.g. Airport Europe)

* Refactor start/stop scripts.

* Add script for stopping a game.
2014-01-11 15:05:38 +00:00
Albert Hopkins 85b47adf35 teamplayer/settings_local.py: Decrease SHAKE_THINGS_UP value.
With the new auto_fill() we don't need such a big number.
2014-01-07 16:52:44 +00:00
Albert Hopkins d8f0469929 teamplayer/stop-teamplayer: Call stop-stream *before* killing the pids. 2014-01-06 15:14:38 +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 4d7fb4c5d8 teamplayer: Update to work with 2.1
* Switch to python3.

* Switch from lighttpd/flup to nginx/uwsgi.
2014-01-06 03:14:53 +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 db67854f05 airport/settings.py: Minor Django 1.6 tweak. 2013-11-27 17:02:48 +00:00
Albert Hopkins bdb015df48 kernel.config.x86: Update kernel config for 3.12.1 2013-11-27 16:04:07 +00:00
Albert Hopkins 48da0880b9 teamplayer/settings_local.py: Fix typo in string interpolation.
For some reason this never raised an error before and now it does :S
2013-10-26 14:51:24 +00:00
Albert Hopkins 23ab660d15 teamplayer: Allow hg branch to be specified.
Also change the TP_REPO to point to bitbucket.
2013-10-19 16:57:48 +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 989bacb6bd kde: package.use updates. 2013-10-12 14:14:06 +00:00
Albert Hopkins 36a330909e airport: Allow hg branch to be specified. 2013-10-12 14:13:51 +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 80bd6a3d83 airport: Update to work with new django1.5 version of airport.
* Only just python 3

* Update postgres dependency to 9.3

* Remove apache. Replace with nginx/uwsgi mix.

* Don't double-install packages in both portage and virtualenv.
2013-09-27 14:34:15 +00:00
Albert Hopkins d4fa57eda3 kernel.sh: No longer need to explicitly emerge perl. 2013-09-22 22:26:08 +00:00
Albert Hopkins 0d46f253c9 kernel.config.x86: Update to 3.11.1 kernel. 2013-09-22 22:25:42 +00:00
Albert Hopkins 9b3f84c11e Merge heads 2013-09-22 20:52:03 +00:00
Albert Hopkins 9996318bf4 kde: Updates. 2013-09-22 20:26:52 +00:00
Albert Hopkins ddba440078 teamplayer: Various updates.
* Move package.keywords to .accept_keywords

* Switch to postgres 9.3.
2013-09-22 20:26:25 +00:00
Albert Hopkins 2112405f4b make.conf.x86: Add X86_ABI="32" 2013-09-22 20:15:38 +00:00
Albert Hopkins 62a89a9ab0 kernel.config.amd64: Update for kernel 3.11.1 2013-09-22 20:00:06 +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 010aecbee0 Merge heads. 2013-09-01 19:44:20 +00:00
Albert Hopkins 1e7b1ad23b teamplayer: Updates. 2013-09-01 19:16:14 +00:00
Albert Hopkins 0ee7de60e3 monbodb: Updates. 2013-09-01 19:15:35 +00:00
Albert Hopkins 3e6014e0fc gnome: Updates. 2013-09-01 19:14:11 +00:00
Albert Hopkins 6f282856c1 xfce: Updates. 2013-09-01 19:13:48 +00:00
Albert Hopkins d83f2c6b7c x: Updates. 2013-09-01 19:12:46 +00:00
Albert Hopkins 9b759d1287 owncloud: updates. 2013-09-01 18:16:02 +00:00
Albert Hopkins 2661e0b30a issue: s/Machine/Appliance/
Also add some (ANSI) color.
2013-09-01 16:13:17 +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 ce10b3ea2a kernel.config.amd64: Updated kernel config. 2013-08-31 14:07:40 +00:00
Albert Hopkins 76d68f39c8 arangodb: Updates. 2013-08-31 01:38:19 +00:00
Albert Hopkins 11519edcde New appliance: dpaste. 2013-08-31 01:35:00 +00:00
Albert Hopkins eec5dbac8f Makefile: mkfs: Leave no reserved space for root. 2013-08-31 01:28:48 +00:00
Albert Hopkins 2c295d6259 airport: Updates. 2013-08-30 19:06:16 +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 c909cf34d1 make.conf.*: Set PYTHON_TARGETS to python3_2 2013-08-27 19:59:11 +00:00
Albert Hopkins ba57b362f2 base/package.use: Add python3 and ipc flags to portage.
That way we can build some vms that only need one version of python
installed.
2013-08-27 19:55:45 +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 1c489d794e xfce: Updates.
Should also now work with 32-bit guests.
2013-08-24 14:07:45 +00:00
Albert Hopkins c09e945a06 x: Add nptl USE flag to xorg-server 2013-08-20 11:21:35 +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 71b0b8527a Add nptl to gcc USE. 2013-08-19 18:25:39 +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 a047250c0d x: updates. 2013-08-19 18:21:15 +00:00
Albert Hopkins 77b566e7ae mongodb: updates 2013-08-19 18:21:15 +00:00
Albert Hopkins fbcc03897d kde: updates. 2013-08-19 18:21:15 +00:00
Albert Hopkins d25a380258 gnome: updates. 2013-08-19 18:21:15 +00:00
Albert Hopkins 59b721bc2a drupal: Updates. 2013-08-19 18:21:15 +00:00
Albert Hopkins a315d1ee82 teamplayer: Add setproctitle to the virtualenv. 2013-08-19 18:21:15 +00:00
Albert Hopkins 29f13b1888 Add ~x86 ~amd64 to gentoo-sources 2013-08-19 18:21:15 +00:00
Albert Hopkins a2e30070d0 teamplayer: Change some django settings. 2013-08-19 18:21:09 +00:00
Albert Hopkins d5f986ef4a owncloud: build fixes. 2013-07-22 13:34:17 +00:00
Albert Hopkins 2ee9462c97 teamplayer: fixes to work with TeamPlayer 2.0 2013-07-22 13:33:36 +00:00
Albert Hopkins 344f1bb1eb Makefile: update to the first profile. 2013-07-22 13:13:55 +00:00
Albert Hopkins 358e89204f kde: package.use: x11-libs->dev-qt move. 2013-03-11 19:09:13 +00:00
Albert Hopkins 2d3ad30aaf New virtual appliance: ArangoDB
This appliance installs layman and installs an overlay that contains
the ArangoDB ebuild.  This is a third-party ebuild/overlay that I do
not support.
2013-02-24 00:17:25 +00:00
Albert Hopkins 9f46a64ec4 x: Point to /usr/lib instead of /usr/lib64 as to work with 32-bit builds. 2013-02-15 22:45:50 +00:00
Albert Hopkins 96831e4eb2 Update drupal build. 2013-02-14 19:19:18 +00:00
Albert Hopkins d3eddd51fb Update gnome build. 2013-02-14 17:47:39 +00:00
Albert Hopkins eaba7419f5 Update etc-update.conf. 2013-02-14 15:04:07 +00:00
Albert Hopkins 278c69c8f6 Update kde build. 2013-02-13 17:28:37 +00:00
Albert Hopkins d227ce2ed3 Update owncloud build. 2013-02-13 11:23:19 +00:00
Albert Hopkins 4378db0e30 Update the xfce build. 2013-02-13 10:51:42 +00:00
Albert Hopkins 8bbc8dc8eb Remove the lodgeit appliance.
Uptream has abandoned the project.  It hasn't been updated in over a year
and no longer works with the latest libraries.  Removing.
2013-01-11 02:49:40 +00:00
Albert Hopkins 81df9f06fa Use CURDIR instead of PWD. 2012-12-29 16:29:42 +00:00
Albert Hopkins 0cedef59ca Update amd64 kernel config for 3.6.11. 2012-12-28 14:04:35 +00:00
Albert Hopkins 0a5d4f7fc7 Merge with 32bit work. 2012-12-23 07:36:15 +00:00
Albert Hopkins efb798385f Add kernel config support for 32bit. 2012-12-23 07:32:28 +00:00
Albert Hopkins dbc12919e5 Merge heads. 2012-12-23 01:56:31 +00:00
Albert Hopkins f4f5393f64 Introduce appliance-level make.conf 2012-12-23 01:47:26 +00:00
Albert Hopkins 7baa8f0372 Introduce appliance-level make.conf 2012-12-23 01:47:26 +00:00
Albert Hopkins eb78b2716e 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 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 9ae6f0a243 Updates for lodgeit.
Although this currently build, but errored out the last I tried.  The
project is dead uptream, so I'm considering dropping this appliance.
2012-12-10 18:12:53 +00:00
Albert Hopkins fe7692be2e Updates for drupal. 2012-12-10 18:11:42 +00:00
Albert Hopkins 5f7ff4cca7 Updates for gnome. 2012-12-10 18:11:14 +00:00
Albert Hopkins 1c3b109bc9 Update USE flags for KDE. 2012-12-10 18:10:46 +00:00
Albert Hopkins 73b3379945 Update the kernel.config 2012-12-10 18:10:14 +00:00
Albert Hopkins 011d1db7a0 Update for owncloud. 2012-12-10 18:09:45 +00:00
Albert Hopkins 8cda50ebcb Update for xfce. 2012-12-10 18:09:16 +00:00
Albert Hopkins c96370d39c Updates for airport. 2012-12-10 18:08:35 +00:00
Albert Hopkins a313c98c54 Updates for TeamPlayer. 2012-12-10 18:07:16 +00:00
Albert Hopkins 4b138f61f1 drupal: Bump version to 7.17 2012-11-15 13:31:39 +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 42683d802d make.conf: Add PYTHON_TARGETS variable. 2012-11-14 17:30:59 +00:00
Albert Hopkins eb7f217eb9 gnome: USE flag updates. 2012-11-14 17:30:33 +00:00
Albert Hopkins 77b42010b3 drupal: Explicitely remove mysql from package.use 2012-10-03 13:07:04 +00:00
Albert Hopkins 35f7b5f515 Add ownCloud appliance. 2012-09-16 22:41:26 +00:00
Albert Hopkins 1c1dd3e874 Upgrade to Postgres 9.2
* Also make sure each postgres appliance actually builds/works
2012-09-12 19:17:40 +00:00
Albert Hopkins dc4e73082d x: USE flag updates. 2012-09-10 14:57:04 +00:00
Albert Hopkins 72eff31793 Updates for xfce 2012-09-10 14:17:18 +00:00
Albert Hopkins b06fa56902 Create a mongodb appliance. 2012-09-10 14:06:26 +00:00
Albert Hopkins ac070353c7 drupal: updates.
* Update PHP target and Drupal version.
2012-09-10 12:56:22 +00:00
Albert Hopkins ad4fa35049 hemp-node: updates
* Add VCS (hg, git) to world
* Add virtualenv to world
* Switch default python to 2.7
* USE flag updates
2012-08-29 23:46:57 +00:00
Albert Hopkins 5a058f8e29 gnome: USE flag Updates 2012-07-08 19:07:56 +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 7ea5be2bf9 Don't add xorg-x11 as it now pulls in the X server. Instead add individual packages. 2012-06-28 11:39:46 +00:00
Albert Hopkins b644c93736 make.conf: Add CURL_SSL configuration. 2012-06-28 11:37:38 +00:00
Albert Hopkins 0948ef5001 gnome: package.use updates 2012-06-28 11:37:03 +00:00
Albert Hopkins 4d56f9310a airport: Allow ~testing django-1.4 2012-06-28 11:35:50 +00:00
Albert Hopkins 048bdee1d1 Makefile: add extra inodes to images in mkfs 2012-06-28 11:35:05 +00:00
Albert Hopkins 9c0d558544 base/pacakge.use add cxx to libpre 2012-06-28 11:31:14 +00:00
Albert Hopkins e0f9b4a2f1 Update .hgignore to ignore image files 2012-05-25 16:37:22 +00:00
Albert Hopkins 092fabdc32 xfce: Updates 2012-05-25 16:35:23 +00:00
Albert Hopkins 5e45c56b2f teamplayer: Make compatible with django 1.4 2012-05-25 16:35:06 +00:00
Albert Hopkins d147a3f296 airport: updates 2012-05-25 16:34:30 +00:00
Albert Hopkins 7cd3603efa Makefile: various updates 2012-05-25 16:33:40 +00:00
Albert Hopkins 165116a7e5 kde: USE flag updates 2012-05-11 19:33:46 +00:00
Albert Hopkins c8c0f80416 Update kernel.config for 3.2.12-gentoo 2012-03-28 23:00:54 +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 91ce20d98f teamplayer: Use TP_REPO instead of HG_REPO 2012-02-02 14:10:20 +00:00
Albert Hopkins bacb00e17f airport: Tweak apache config 2012-02-02 14:07:29 +00:00
Albert Hopkins 4bed0a622c kernel.config: update for kernel 3.2.1 2012-02-01 11:57:52 +00:00
Albert Hopkins 23b5ad407a Update drupal appliance 2012-01-31 18:06:56 +00:00
Albert Hopkins 8e42219e93 Change HG_REPO to AIRPORT_REPO. Fix bug where AVAHI=YES wasn't working. 2012-01-19 01:01:00 +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 976caffd93 Import kernel compile logic 2012-01-09 21:17:42 +00:00
Albert Hopkins 8136ac8973 Update kernel.config for 3.1.6 2012-01-09 12:38:03 +00:00
Albert Hopkins d191c7faab rsync-excludes-critical: include ommissio of compiled python files 2012-01-07 15:11:05 +00:00
Albert Hopkins dc7a7942b3 Update kde use flags 2011-12-08 13:52:48 +00:00
Albert Hopkins a075a70df8 gnome: Update USE flags for gnome 2011-11-29 13:55:41 +00:00
Albert Hopkins 6b89319ba5 Clean up typos in package.use's 2011-11-16 13:29:09 +00:00
Albert Hopkins 2ba82fb92b Add EXTRA_WORLD Makefile variable to add extra packages to world 2011-11-16 11:44:32 +00:00
Albert Hopkins 871941c88c Update kernel config and script 2011-11-12 13:24:50 +00:00
Albert Hopkins fb061cf32d xfce: Update package.use 2011-11-12 13:24:14 +00:00
Albert Hopkins be01d46ac6 make.conf: Added "notitles" to FEATURES (it annoys me) 2011-10-20 11:31:38 +00:00
Albert Hopkins 86c20fb37a Switch to GUID partitioning 2011-10-04 16:36:19 +00:00
Albert Hopkins 334070c502 teamplayer: switch to postgresql 9.1 2011-09-24 15:21:58 +00:00
Albert Hopkins ce1fae2054 gnome: package.use updates 2011-09-17 18:25:27 +00:00
Albert Hopkins 4ef87cf061 Makefile: missing "else" caused udev to be enabled when UDEV=NO 2011-09-16 14:37:35 +00:00
Albert Hopkins 421a03dada Fix issue where /sys wasn't being mounted with UDEV=NO 2011-07-21 10:32:09 +00:00
Albert Hopkins e30dacf423 make.conf: add --autounmask=n to default options (annoying w/o it) 2011-07-21 09:43:08 +00:00
Albert Hopkins 9ecdfb70cb kde: Update package.use 2011-07-21 09:42:25 +00:00
Albert Hopkins 682d0e14aa Fix problem where kernel.sh wasn't actually building a new kernel. 2011-07-17 22:10:57 +00:00
Albert Hopkins 2c54f3239c Change kernel config for 2.6.39 2011-07-17 22:09:59 +00:00
Albert Hopkins 0144944c9d teamplayer/Makefile: Allow environment to override repo variable 2011-07-17 22:07:35 +00:00
Albert Hopkins d2d0adf57e Makfile: fixed bug where PRUNE_CRITICAL=YES didn't work 2011-07-15 15:25:54 +00:00
Albert Hopkins ab22626b63 drupal: Add PECL uploadprogress 2011-07-15 10:30:09 +00:00
Albert Hopkins b722b1a70b Don't make settings.php world-writable as the official Drupal docs say.
Gentoo's webapp-config already handle's this smartly.
2011-07-15 06:42:26 +00:00
Albert Hopkins 479dee63e0 drupal/firstboot.start: instead of moving to /root, rename with .disabled appended. 2011-07-15 02:21:45 -04:00
Albert Hopkins ef9337ec3d Added Drupal virtual appliance.
Enable appliance-specific motd.sh to be called
2011-07-15 05:43:50 +00:00
Albert Hopkins 85acce3879 motd.sh: Don't pass "-u" to the date command 2011-07-12 20:28:59 +00:00
Albert Hopkins acef5c4a24 Added custom /etc/motd to each image (based on a script)
Removed minimal use flag for pambase as it disables motd
2011-07-12 20:15:55 +00:00
Albert Hopkins 71c1b22e6d teamplayer/package.use: "id3" USE flag renamed to "id3tag" 2011-07-07 03:08:36 +00:00
Albert Hopkins 28b6e2584c make SCROBBLER_AUTH a Makefile variable instead of hardcoding it into the
Makefile. This also fixes a build error when said file doesn't exist.
2011-07-07 01:41:28 +00:00
Albert Hopkins 962ae4b1e7 Default chroot directory should not fail when used in the appliance's Makefile 2011-07-07 01:40:20 +00:00
Albert Hopkins 581a30ec7f Only enable serial console when HEADLESS=YES 2011-07-01 13:58:26 -04:00
Albert Hopkins 1063bb69f1 Apparently /dev/shm has to be mounted from /dev/shm in fstab in order to
not get mounted twice
2011-06-29 01:40:06 -04:00
Albert Hopkins c5ffd84db2 * Move all the kernel-building logic to a seperate shell script
* Make the Makefile less ugly and embarrassing (I hope)

* Remove the stage3 devnode fix as the latest stage3s appear fixed
2011-06-29 00:43:12 -04:00
Albert Hopkins 1c52ff0e97 grub.conf: pass "rootfstype=ext4" to the kernel 2011-06-28 15:00:08 -04:00
Albert Hopkins 6bce5fffbb kernel.config: Add AHCI SATA driver 2011-06-28 13:52:54 -04:00
Albert Hopkins 23e20007a9 Make it so no kernel is compiled if a kernel is installed in /boot and an
emerge will only install the same kernel.

This (and other) logic really needs to be moved out of Makefile and into a
shell script where it can be better maintained and not look so ugly.
2011-06-28 08:20:05 -04:00
Albert Hopkins 3077913344 * kernel: Don't pass "-n" to emerge when emerging the kernel as stage4s
don't have the kernel sources and subsequent builds will fail

* kernel: Remove any old kernel and modules before installing new

* Don't link /bin/sh to dash if DASH != YES

* Add appliance name and creation date comments to package list files
2011-06-27 06:43:59 -04:00
Albert Hopkins a545aca3b2 UDEV=NO: Don't delete and then re-create dev nodes that are in the tarball.
Also create more virtio disk nodes
2011-06-25 21:48:16 -04:00
Albert Hopkins 571bcb64a4 Change net-misc/dhcpcd to dhcp in world files as we now use dhclient 2011-06-25 13:49:19 -04:00
Albert Hopkins 1878dd94d9 Make package list a Makefile variable
Add .lst files to .hgignore
2011-06-25 13:44:02 -04:00
Albert Hopkins 5337f24773 GNOME updates 2011-06-25 09:48:46 -04:00
Albert Hopkins 2dcd2fcd9d kde: minor update 2011-06-25 08:21:56 -04:00
Albert Hopkins 222def37a0 Switch kernel config to 2.6.38-gentoo-r6. Enable xz compression. 2011-06-24 23:09:57 -04:00
Albert Hopkins 6f594daebb Since RIT.edu's mirror is 30+ days behind, switch rsync mirror to GA Tech 2011-06-24 22:48:07 -04:00
Albert Hopkins f76eab5c82 kernel.config: enable LSI adapter (for vmware) 2011-06-23 18:56:26 -04:00
Albert Hopkins 40330d8858 Add preliminary support for Xen Virtual Appliance (xva) images. 2011-06-23 09:09:41 -04:00
Albert Hopkins d86cb09e04 * New Makefile variable PKGLIST. When set to 1 will create a file outside the
appliance with the list of installed packages on that appliance.  PKGLIST
  is off by default.

* Works with baselayout-2 stage3s, including the fix for the current broken
  stage3 tarballs.

* The new stage3 tarballs are much more limited as far as what dev nodes
  are included.  In addition to being broken stage3s themselves, it also
  broke the UDEV=NO option.  So I have included my own device node tarball
  which is installed when UDEV=NO.

* Put double quotes around hostname in /etc/conf.d/hostname.
2011-06-22 21:42:59 -04:00
Albert Hopkins ea6bda4f2e Don't set system Python to python-3* 2011-06-08 07:23:19 -04:00
Albert Hopkins 77ae4d8016 lodgeit: lodgeit.sh: Make posix-compliant 2011-05-19 16:11:08 -04:00
Albert Hopkins df1d7650d8 Baselayout-2/openrc compatibility and stage4 tarballs.
The first major change here is the support of baselayout-2/openrc.  So far
Gentoo has not released a stage3 tarball with baselayout-2, but I've tested
this enough that I feel it works even when doing an upgrade.  The
baselayout-1 stuff has been converted, however it is recommended to not use
this until baselayout-2 is available in Gentoo stage3s as I don't want to
support converting, or you can do this:

stage4 tarball support.  I'm not sure why I didn't support this before.
Now not only can stage4 tarballs be build, instead of or in addition to
virtual appliance images, but stage4 tarballs can also be used in lieu of a
stage3.  There is a new "stage4" make target, and also when building the
Makefile will first look for stage4/<appliance>-stage4.tar.bz2 and if that
exists use it instead of the Gentoo stage3.  If you specify stage4 as a
target and also already have a stage4, then the Makefile will unpack the
stage4 into the chroot, perform updates, and then re-create the stage4
based on the updates (atomically).  In addition there is a new Makefile
variable, SOFTWARE.  The default value is "1" meaning it will call the
software target (thereby installing/updatein software), but if you set
SOFTWARE=0, then the software phase will not be run.  This can allow, for
example, to build a VM image from a stage4 without performing software
updates, in effect a straight stage4 to image for quick image building.

Since most appliances are pretty much based on the "base" appliance, one
could imply copy the base stage4 to the new appliance stage4 and start from
there, instead of having to start from a vanilla stage3, for example:

# cp stage4/base-stage4.tar.bz2 stage4/kde-stage4.tar.bz2
# make APPLIANCE=kde stage4

Will take the already existing base stage4 and simply update it to kde,
which will be easier/faster than starting from a stage3.

There are still some tweaks that need to be done for the stage4 support.
Specifically Makefile targets need to be written with the assumption that
they may be called more than once (e.g. updating a stage4 or going from
stage4 to image with SOFTWARE=1).  For the most part things work according
to that assumption, but there are a few things that need to be tweeked,
such as the inittab settings if one is building a "headed" image but it's
based off a headless stage4.  New appliance authors should also write their
"preinstall" and "postinstall" targets with the assmption that it may be
called more than once.
2011-05-17 20:44:04 -04:00
Albert Hopkins 331a28bd11 Allow for scrobbler auth to be built into the TeamPlayer configuration 2011-05-17 20:28:53 -04:00
Albert Hopkins fc242370e6 xfce: Add support for baselayout-2 2011-05-14 12:33:28 -04:00
Albert Hopkins 827ee1dd6f x: support for baselayout-2 2011-05-14 12:31:45 -04:00
Albert Hopkins 369daeaf14 teamplayer: Make baselayout-2- and stage4-compatible 2011-05-13 06:51:24 -04:00
Albert Hopkins e96251a580 Forgot to add gnome/gdm.start 2011-05-12 18:29:10 -04:00
Albert Hopkins 47ace21ebc lodgeit: Make opernrc- and stage4- compatible 2011-05-12 15:16:20 -04:00
Albert Hopkins c15f4fbd3f kde: baselayout-2 fixes. Now supports KDE 4.6 2011-05-12 10:38:33 -04:00
Albert Hopkins 111ea2c4e5 gnome: baselayout-2 Fixes 2011-05-12 10:35:06 -04:00
Albert Hopkins bb3d3f77ac xfce: Updates 2011-04-23 00:05:01 -04:00
Albert Hopkins f44dffdc96 kde: Various updates for KDE, removed support for unstable tree build 2011-04-23 00:01:57 -04:00
Albert Hopkins 56c29e55a0 gnome: Updated USE flags 2011-04-22 22:25:59 -04:00
Albert Hopkins 467e417a40 Update kernel config for the latest stable kernel 2011-04-22 22:24:06 -04:00
Albert Hopkins 35f9a64e22 x: added minimal USE flags 2011-04-22 22:22:47 -04:00
Albert Hopkins fe8ecee7c7 Replacing dhcpcd with dhcp (client only) 2011-04-22 22:20:01 -04:00
Albert Hopkins 1d3b1e00fc base: Added "minimal" USE flag for ncurses and pam 2011-04-11 19:53:07 -04:00
Albert Hopkins 8f42ca1fc1 teamplayer: minimal USE flags for pambase and ncurses 2011-04-09 23:47:23 -04:00
Albert Hopkins a1a0c1d1f5 teamplayer: various updates. keeping up with the times... 2011-04-09 23:45:35 -04:00
Albert Hopkins 0c8126df93 lodgeit: Various fixes. Works with python2.7 and latest stage3 2011-04-09 10:01:18 -04:00
Albert Hopkins 1edf7ed990 New DASH Makefile variable, if set to "YES", will install app-shells/dash
and set it as the login shell for root.
2011-04-06 10:25:05 -04:00
Albert Hopkins 029d732f06 Tweaks:
* Added UDEV Makefile variable, if set to NO, will disable UDEV and use
  static /dev (defaults to YES)

* Run eselct python to get around "which python am i?" situation

* export "inroot" variable
2011-04-02 09:56:19 -04:00
Albert Hopkins 1e86ba4d60 lodgit: Add python:2.6 to world file 2011-03-21 11:30:35 -04:00
Albert Hopkins 109a6745ee hemp-node: No need (necessarily) to manually remove python3 2011-03-21 11:30:06 -04:00
Albert Hopkins 69566af315 gnome: fix some USE flags 2011-03-21 11:28:57 -04:00
Albert Hopkins af0db7e32e "eselect python set python2.6" is no longer necessary 2011-03-08 08:11:43 -05:00
Albert Hopkins 4493b659bc teamplayer: we no longer require the "mpc" package 2011-03-05 07:23:35 -05:00
Albert Hopkins 7183961164 teamplayer: Added optional zeroconf broadcast support 2011-02-24 23:35:34 -05:00
Albert Hopkins 4841126b93 Makefile: created "inroot" macro for running commands in the chroot 2011-02-24 23:20:38 -05:00
Albert Hopkins 45b7cefbc6 xfce: gdk-pixbuf requires X USE flag 2011-02-24 23:19:38 -05:00
Albert Hopkins 5ff35f7768 pass --noinput to sync since admin is disabled and there's no adminable stuff 2011-02-22 22:51:31 -05:00
Albert Hopkins f236ffc4bb xfce: replace mousepad with leafpad 2011-02-21 07:13:24 -05:00
Albert Hopkins 74ad01a19d Merge 2011-02-05 00:10:40 -05:00
109 changed files with 8095 additions and 4746 deletions

16
.gitignore vendored Normal file
View File

@ -0,0 +1,16 @@
appliances/*
!appliances/base/
!appliances/default/
build
kernel
loop
packages
repos
distfiles
images
*.cfg
!appliances/default/default.cfg
latest-stage3.txt
portage-snapshot.tar.bz2
stage3-*-latest.tar.xz
stage3-*.tar.xz

View File

@ -1,7 +0,0 @@
vabuild\/.*
loop\/.*
.*\.swp$
.*\.cfg
latest-stage3\.txt
portage-latest\.tar\.bz2
stage3-.*-latest\.tar\.bz2

639
Makefile
View File

@ -1,287 +1,490 @@
CHROOT=./vabuild
APPLIANCE = base
APPLIANCE ?= base
VABUILDER_OUTPUT := $(CURDIR)
CHROOT := $(VABUILDER_OUTPUT)/build/$(APPLIANCE)
VA_PKGDIR = $(VABUILDER_OUTPUT)/packages
DISTDIR = $(CURDIR)/distfiles
REPO_DIR = $(CURDIR)/repos
REPO_NAMES =
KERNEL_DIR = $(CURDIR)/kernel
PORTAGE_DIR = $(REPO_DIR)/gentoo
HOSTNAME = $(APPLIANCE)
RAW_IMAGE = $(HOSTNAME).img
QCOW_IMAGE = $(HOSTNAME).qcow
VMDK_IMAGE = $(HOSTNAME).vmdk
KERNEL_CONFIG = kernel.config
IMAGES = $(VABUILDER_OUTPUT)/images
RAW_IMAGE = $(IMAGES)/$(APPLIANCE).img
QCOW_IMAGE = $(IMAGES)/$(APPLIANCE).qcow
VMDK_IMAGE = $(IMAGES)/$(APPLIANCE).vmdk
VMDK_TYPE = IDE
OVA_IMAGE = $(IMAGES)/$(APPLIANCE).ova
OVA_NUM_CPUS = 1
OVA_MEM_SIZE = 1024
XVA_IMAGE = $(IMAGES)/$(APPLIANCE).xva
LST_FILE = $(IMAGES)/$(APPLIANCE)-packages.lst
CHECKSUMS = $(IMAGES)/SHA256SUMS
STAGE3 = $(CHROOT)/var/tmp/stage3
COMPILE_OPTIONS = $(CHROOT)/var/tmp/compile_options
SOFTWARE = $(CHROOT)/var/tmp/software
KERNEL_SRC = $(CHROOT)/var/tmp/kernel_src
KERNEL = $(CHROOT)/var/tmp/kernel
GRUB = $(CHROOT)/var/tmp/grub
PREPROOT = $(CHROOT)/var/tmp/preproot
SYSTOOLS = $(CHROOT)/var/tmp/systools
STAGE4_TARBALL = $(VABUILDER_OUTPUT)/images/$(APPLIANCE).tar.xz
VIRTIO = NO
TIMEZONE = UTC
DISK_SIZE = 6.0G
SWAP_SIZE = 30
SWAP_FILE = $(CHROOT)/.swap
ARCH = amd64
MAKEOPTS = -j4
PRUNE_CRITICAL = NO
REMOVE_PORTAGE_TREE = YES
VA_ARCH = amd64
KERNEL_CONFIG = configs/kernel.config.$(VA_ARCH)
KERNEL_PATH = $(CHROOT)/usr/src/kernel-path
MAKEOPTS = -j5 -l5.64
ENABLE_SSHD = NO
CHANGE_PASSWORD = YES
HEADLESS = NO
EXTERNAL_KERNEL = NO
ACCEPT_KEYWORDS = amd64
PKGLIST = 0
DASH = NO
LOCALE ?= en_US.utf8
M4 = m4
EMERGE = /usr/bin/emerge
EMERGE = emerge --jobs=$(shell nproc --all)
M4_DEFS = -D HOSTNAME=$(HOSTNAME)
M4C = $(M4) $(M4_DEFS)
NBD_DEV = /dev/nbd0
USEPKG = --usepkg --binpkg-respect-use=y
RSYNC_MIRROR = rsync://mirrors.rit.edu/gentoo/
KERNEL = gentoo-sources
PACKAGE_FILES = $(APPLIANCE)/package.*
WORLD = $(APPLIANCE)/world
CRITICAL = $(APPLIANCE)/critical
RSYNC_MIRROR = rsync://rsync.gtlib.gatech.edu/gentoo/
KERNEL_PKG = gentoo-sources
WORLD = appliances/$(APPLIANCE)/world
WORLD_DEFAULT = appliances/default/world
EXTRA_WORLD =
# /etc/portage targets
base_etc_portage := $(wildcard configs/portage/*)
etc_portage := $(patsubst configs/portage/%,$(CHROOT)/etc/portage/%,$(base_etc_portage))
default_package_files := $(wildcard appliances/default/package.*)
appliance_package_files := $(wildcard appliances/$(APPLIANCE)/package.*)
portage_default_package_files = $(patsubst appliances/default/package.%,$(CHROOT)/etc/portage/package.%/01default,$(default_package_files))
portage_package_files = $(patsubst appliances/$(APPLIANCE)/package.%,$(CHROOT)/etc/portage/package.%/02$(APPLIANCE),$(appliance_package_files))
default_make_conf = $(wildcard appliances/default/make.conf)
appliance_make_conf = $(wildcard appliances/$(APPLIANCE)/make.conf)
portage_make_conf_local = $(CHROOT)/etc/portage/make.conf.local
appliance_profile := default/linux/amd64/23.0/systemd
# Allow appliance to override variables
-include appliances/default/default.cfg
-include appliances/$(APPLIANCE)/$(APPLIANCE).cfg
# Allow user to override variables
-include $(profile).cfg
ifneq ($(PKGDIR),)
MOUNT_PKGDIR = mkdir -p $(CHROOT)/var/portage/packages; \
mount -o bind "$(PKGDIR)" $(CHROOT)/var/portage/packages
UMOUNT_PKGDIR = umount $(CHROOT)/var/portage/packages
ADD_PKGDIR = echo PKGDIR="/var/portage/packages" >> $(CHROOT)/etc/make.conf
ifneq ($(profile),)
container = $(profile)-$(APPLIANCE)-build
else
container = $(APPLIANCE)-build
endif
ifeq ($(PRUNE_CRITICAL),YES)
COPY_LOOP = rsync -ax --exclude-from=rsync-excludes \
--exclude-from=rsync-excludes-critical gentoo/ loop/
UNMERGE_CRITICAL = chroot $(CHROOT) $(EMERGE) -C `cat $(CRITICAL)`
else
COPY_LOOP = rsync -ax --exclude-from=rsync-excludes gentoo/ loop/
PATH := $(CURDIR)/scripts:$(PATH)
export PATH CHROOT container PORTAGE_DIR REPO_DIR REPO_NAMES VA_PKGDIR DISTDIR VA_ARCH
inroot := systemd-nspawn --quiet \
--directory=$(CHROOT) \
--machine=$(container) \
--capability=CAP_NET_ADMIN \
--bind=$(PORTAGE_DIR):/var/db/repos/gentoo \
$(foreach repo,$(REPO_NAMES),--bind=$(REPO_DIR)/$(repo):/var/db/repos/$(repo) ) \
--bind=$(VA_PKGDIR):/var/cache/binpkgs \
--bind=$(DISTDIR):/var/cache/distfiles
ifeq ($(VA_ARCH),x86)
inroot := linux32 $(inroot)
endif
stage4-exists := $(wildcard $(STAGE4_TARBALL))
COPY_ARGS = --exclude-from=configs/rsync-excludes
ifeq ($(CHANGE_PASSWORD),YES)
ifdef ROOT_PASSWORD
change_password = chroot $(CHROOT) usermod -p '$(ROOT_PASSWORD)' root
change_password = RUN usermod --password '$(ROOT_PASSWORD)' root
else
change_password = chroot $(CHROOT) passwd -d root; chroot $(CHROOT) passwd -e root
change_password = RUN passwd --delete root
endif
endif
ifeq ($(REMOVE_PORTAGE_TREE),YES)
COPY_LOOP += --exclude=usr/portage
gcc_config = $(inroot) gcc-config 1
ifneq ($(shell grep 'CONFIG_MODULES=y' $(KERNEL_CONFIG)), )
KERNEL_MODULES_PREPARE = modules_prepare
endif
ifeq ($(VIRTIO),YES)
VIRTIO_FSTAB = sed -i 's/sda/vda/' $(CHROOT)/etc/fstab
VIRTIO_GRUB = sed -i 's/sda/vda/' $(CHROOT)/boot/grub/grub.conf
endif
export APPLIANCE ACCEPT_KEYWORDS CHROOT EMERGE HEADLESS M4 M4C inroot gcc_config
export HOSTNAME MAKEOPTS TIMEZONE USEPKG WORLD
export USEPKG RSYNC_MIRROR
export EXTERNAL_KERNEL KERNEL_PKG KERNEL_PATH KERNEL_CONFIG
ifeq ($(HEADLESS),YES)
HEADLESS_INITTAB = sed -ri 's/^(c[0-9]:)/\#\1/' $(CHROOT)/etc/inittab
HEADLESS_GRUB = sed -i -f grub-headless.sed $(CHROOT)/boot/grub/grub.conf
endif
all: stage4
ifeq ($(ENABLE_SSHD),YES)
enable_sshd = chroot $(CHROOT) rc-update add sshd default
endif
image: $(RAW_IMAGE)
gcc_config = chroot $(CHROOT) gcc-config 1
sync_portage: $(PORTAGE_DIR)
@print Grabbing latest portage
git -C $(PORTAGE_DIR) pull
touch $(PORTAGE_DIR)
export APPLIANCE ACCEPT_KEYWORDS CHROOT EMERGE HEADLESS M4 M4C
export HOSTNAME MAKEOPTS PRUNE_CRITICAL TIMEZONE USEPKG WORLD OVERLAY
$(PORTAGE_DIR):
@print Grabbing the portage tree
git clone --depth=1 https://github.com/gentoo/gentoo.git $(PORTAGE_DIR)
unexport PKGDIR ARCH NBD_DEV
$(CHROOT)/etc/portage/%: configs/portage/%
COPY --recursive $< /etc/portage/
all: image
fstab:
@print Create new /etc/fstab
env echo -e "# <fs>\t\t<mountpoint>\t<type>\t<opts>\t<dump/pass>" > $(CHROOT)/etc/fstab
env echo -e "LABEL=ROOT\t/\t\text4\tnoatime\t1 1" >> $(CHROOT)/etc/fstab
env echo -e "/.swap\t\tnone\t\tswap\tsw\t0 0" >> $(CHROOT)/etc/fstab
env echo -e "#LABEL=SWAP\tnone\t\tswap\tsw\t0 0" >> $(CHROOT)/etc/fstab
$(RAW_IMAGE):
qemu-img create -f raw $(RAW_IMAGE) $(DISK_SIZE)
partitions: $(RAW_IMAGE)
parted -s $(RAW_IMAGE) mklabel msdos
parted -s $(RAW_IMAGE) mkpart primary ext2 0 $(DISK_SIZE)
parted -s $(RAW_IMAGE) set 1 boot on
qemu-nbd -c $(NBD_DEV) $(RAW_IMAGE)
sleep 3
mkfs.ext2 -O sparse_super -L "$(APPLIANCE)"_root $(NBD_DEV)p1
touch partitions
mounts: stage3
mkdir -p $(CHROOT)
if [ ! -e mounts ] ; then \
mount -t proc none $(CHROOT)/proc; \
mount -o bind /dev $(CHROOT)/dev; \
mount -o bind /var/tmp $(CHROOT)/var/tmp; \
fi
touch mounts
sync_portage:
rsync --no-motd -L $(RSYNC_MIRROR)/snapshots/portage-latest.tar.bz2 portage-latest.tar.bz2
touch sync_portage
portage: sync_portage stage3
tar xjf portage-latest.tar.bz2 -C $(CHROOT)/usr
$(MOUNT_PKGDIR)
touch portage
preproot: stage3 mounts portage
cp -L /etc/resolv.conf $(CHROOT)/etc/
# bug in portage... annoying
chroot $(CHROOT) eselect python set python2.6
touch preproot
stage3:
mkdir -p $(CHROOT)
rsync --no-motd $(RSYNC_MIRROR)/releases/`echo $(ARCH)|sed 's/i.86/x86/'`/autobuilds/latest-stage3.txt .
rsync --no-motd $(RSYNC_MIRROR)/releases/`echo $(ARCH)|sed 's/i.86/x86/'`/autobuilds/`tail -n 1 latest-stage3.txt` stage3-$(ARCH)-latest.tar.bz2
tar xjpf stage3-$(ARCH)-latest.tar.bz2 -C $(CHROOT)
touch stage3
compile_options: portage make.conf locale.gen $(PACKAGE_FILES)
cp make.conf $(CHROOT)/etc/make.conf
$(ADD_PKGDIR)
echo ACCEPT_KEYWORDS=$(ACCEPT_KEYWORDS) >> $(CHROOT)/etc/make.conf
cp locale.gen $(CHROOT)/etc/locale.gen
chroot $(CHROOT) locale-gen
mkdir -p $(CHROOT)/etc/portage
for f in $(PACKAGE_FILES) ; do \
cp $$f $(CHROOT)/etc/portage/ ; \
done
touch compile_options
base_system: mounts compile_options
touch base_system
kernel: base_system $(KERNEL_CONFIG)
chroot $(CHROOT) cp /usr/share/zoneinfo/$(TIMEZONE) /etc/localtime
ifneq ($(EXTERNAL_KERNEL),YES)
chroot $(CHROOT) $(EMERGE) -n $(USEPKG) sys-kernel/$(KERNEL)
cp $(KERNEL_CONFIG) $(CHROOT)/usr/src/linux/.config
$(gcc_config)
chroot $(CHROOT) make $(MAKEOPTS) -C /usr/src/linux oldconfig
chroot $(CHROOT) make $(MAKEOPTS) -C /usr/src/linux
chroot $(CHROOT) make $(MAKEOPTS) -C /usr/src/linux modules_install
chroot $(CHROOT) make $(MAKEOPTS) -C /usr/src/linux install
cd $(CHROOT)/boot ; \
k=`/bin/ls -1 --sort=time vmlinuz-*|head -n 1` ; \
ln -nsf $$k vmlinuz
endif
touch kernel
$(SWAP_FILE): preproot
$(PREPROOT): $(STAGE3) $(PORTAGE_DIR) $(foreach repo,$(REPO_NAMES),$(REPO_DIR)/$(repo)) fstab $(etc_portage) $(portage_default_package_files) $(portage_package_files)
mkdir -p $(VA_PKGDIR) $(DISTDIR)
@print Creating swap file: `basename $(SWAP_FILE)`
dd if=/dev/zero of=$(SWAP_FILE) bs=1M count=$(SWAP_SIZE)
/sbin/mkswap $(SWAP_FILE)
rm -f $(CHROOT)/etc/resolv.conf
COPY -L /etc/resolv.conf /etc/resolv.conf
touch $(PREPROOT)
$(CHROOT)/etc/fstab: fstab preproot
cp fstab $(CHROOT)/etc/fstab
stage3-$(VA_ARCH).tar.xz:
@print You do not have a stage3 tarball. Consider \"make sync_stage3\"
@exit 1
$(CHROOT)/etc/conf.d/hostname: preproot
echo HOSTNAME=$(HOSTNAME) > $(CHROOT)/etc/conf.d/hostname
sync_stage3:
fetch-stage3 --systemd --outfile=stage3-$(VA_ARCH).tar.xz $(VA_ARCH)
$(CHROOT)/etc/conf.d/clock: preproot
sed -i 's/^#TIMEZONE=.*/TIMEZONE="$(TIMEZONE)"/' $(CHROOT)/etc/conf.d/clock
sysconfig: preproot $(SWAP_FILE) $(CHROOT)/etc/fstab $(CHROOT)/etc/conf.d/hostname $(CHROOT)/etc/conf.d/clock
@echo $(VIRTIO)
$(VIRTIO_FSTAB)
sed -i 's/^#s0:/s0:/' $(CHROOT)/etc/inittab
$(HEADLESS_INITTAB)
echo 'config_eth0=( "dhcp" )' > $(CHROOT)/etc/conf.d/net
echo 'dhcp_eth0="release"' >> $(CHROOT)/etc/conf.d/net
chroot $(CHROOT) ln -nsf net.lo /etc/init.d/net.eth0
chroot $(CHROOT) rc-update add net.eth0 default
chroot $(CHROOT) rc-update del consolefont boot
touch sysconfig
systools: sysconfig compile_options
chroot $(CHROOT) $(EMERGE) -n $(USEPKG) app-admin/syslog-ng
chroot $(CHROOT) rc-update add syslog-ng default
chroot $(CHROOT) $(EMERGE) -n $(USEPKG) sys-power/acpid
chroot $(CHROOT) rc-update add acpid default
chroot $(CHROOT) $(EMERGE) -n $(USEPKG) net-misc/dhcpcd
touch systools
grub: systools grub.conf kernel
ifneq ($(EXTERNAL_KERNEL),YES)
chroot $(CHROOT) $(EMERGE) -nN $(USEPKG) sys-boot/grub
cp grub.conf $(CHROOT)/boot/grub/grub.conf
$(VIRTIO_GRUB)
$(HEADLESS_GRUB)
$(STAGE3): stage3-$(VA_ARCH).tar.xz configs/stage3-tarball-excludes
mkdir -p $(CHROOT)
ifdef stage4-exists
@print Using stage4 tarball: `basename $(STAGE4_TARBALL)`
tar xpf "$(STAGE4_TARBALL)" -C $(CHROOT)
else
@print Using stage3 tarball
tar xpf stage3-$(VA_ARCH).tar.xz -C $(CHROOT) --exclude-from=configs/stage3-tarball-excludes
endif
touch grub
rm -f $(CHROOT)/etc/localtime
touch $(STAGE3)
software: systools issue etc-update.conf $(CRITICAL) $(WORLD)
$(MAKE) -C $(APPLIANCE) preinstall
cp etc-update.conf $(CHROOT)/etc/
# some packages, like, tar need xz-utils to unpack, but it not part of
# the stage3 so may not be installed yet
chroot $(CHROOT) $(EMERGE) -1n $(USEPKG) app-arch/xz-utils
sync_repos: $(foreach repo,$(REPO_NAMES),$(REPO_DIR)/$(repo))
@print Updating the repositories
$(foreach repo,$(REPO_NAMES),git -C $(REPO_DIR)/$(repo) pull;touch $(REPO_DIR)/$(repo);)
chroot $(CHROOT) $(EMERGE) $(USEPKG) --update --newuse --deep `cat $(WORLD)`
$(gcc_config)
$(foreach repo,$(REPO_NAMES),$(REPO_DIR)/$(repo)):
@print Grabbing a repository
git clone --depth=1 $(REPO_URI_$(subst $(REPO_DIR)/,,$@)) $@
# Need gentoolkit to run revdep-rebuild
chroot $(CHROOT) $(EMERGE) -1n $(USEPKG) app-portage/gentoolkit
chroot $(CHROOT) revdep-rebuild -i
$(CHROOT)/etc/portage/repos.conf: $(foreach repo,$(REPO_NAMES),$(REPO_DIR)/$(repo))
$(foreach repo,$(REPO_NAMES),\
echo "[$(repo)]" >>$@;\
echo "location = /var/db/repos/$(repo)" >>$@;\
echo "auto-sync = no" >>$@;\
echo "" >>$@;\
)
touch $@
cp issue $(CHROOT)/etc/issue
$(gcc_config)
chroot $(CHROOT) $(EMERGE) $(USEPKG) --update --newuse --deep world
chroot $(CHROOT) $(EMERGE) --depclean --with-bdeps=n
$(gcc_config)
chroot $(CHROOT) etc-update
$(MAKE) -C $(APPLIANCE) postinstall
$(enable_sshd)
$(change_password)
$(UNMERGE_CRITICAL)
touch software
$(CHROOT)/etc/portage/package.%/01default: appliances/default/package.% $(STAGE3)
mkdir -p `dirname $@`
cp $< $@
device-map: $(RAW_IMAGE)
echo '(hd0) ' $(RAW_IMAGE) > device-map
$(CHROOT)/etc/portage/package.%/02$(APPLIANCE): appliances/$(APPLIANCE)/package.% $(STAGE3)
mkdir -p `dirname $@`
cp $< $@
image: $(RAW_IMAGE) grub partitions device-map grub.shell systools software
mkdir -p loop
mount -o noatime $(NBD_DEV)p1 loop
mkdir -p gentoo
mount -o bind $(CHROOT) gentoo
$(COPY_LOOP)
$(portage_make_conf_local): $(default_make_conf) $(appliance_make_conf)
if [ -f "$(default_make_conf)" ] ; \
then COPY $(default_make_conf) /etc/portage/make.conf.local; \
fi
if [ -f "$(appliance_make_conf)" ] ; \
then cat $(appliance_make_conf) >> $(portage_make_conf_local); \
fi
touch $@
$(CHROOT)/var/tmp/profile: $(STAGE3)
RUN eselect profile set $(appliance_profile)
touch $@
$(KERNEL_PATH): $(STAGE3) $(KERNEL_CONFIG)
ifneq ($(EXTERNAL_KERNEL),YES)
loop/sbin/grub --device-map=device-map --no-floppy --batch < grub.shell
$(eval kernel_ebuild = $(shell basename `RUN portageq best_visible / $(KERNEL_PKG)`))
$(eval kernel_name = $(shell echo $(kernel_ebuild) | sed -e 's/\(..*\)-sources-\(..*\)/linux-\2-\1/' -e 's/\(..*\)-\(r[0-9]*\)-\(..*\)/\1-\3-\2/'))
$(eval kernel_config_checksum = $(shell sha1sum $(KERNEL_CONFIG) | cut -c -40))
echo -n "$(KERNEL_DIR)/$(kernel_name)/$(kernel_config_checksum)" > $@
else
echo "NONE" > $@
endif
umount gentoo
rmdir gentoo
umount loop
sleep 3
rmdir loop
qemu-nbd -d $(NBD_DEV)
touch image
$(QCOW_IMAGE): $(RAW_IMAGE) image
qemu-img convert -f raw -O qcow2 -c $(RAW_IMAGE) $(QCOW_IMAGE)
$(KERNEL_SRC): $(KERNEL_PATH)
ifneq ($(EXTERNAL_KERNEL),YES)
if [ ! -f $(shell cat $(KERNEL_PATH))/Makefile ] ; then \
RUN $(EMERGE) --oneshot --noreplace $(USEPKG) sys-kernel/$(KERNEL_PKG); \
cp -a $(CHROOT)/usr/src/linux-*/* $(shell cat $(KERNEL_PATH)); \
RUN $(EMERGE) -C sys-kernel/$(KERNEL_PKG); \
cp $(KERNEL_CONFIG) $(shell cat $(KERNEL_PATH))/.config; \
RUN make -C /usr/src/linux MAKEOPTS=$(MAKEOPTS) oldconfig $(KERNEL_MODULES_PREPARE); \
fi
endif
touch $(KERNEL_SRC)
$(COMPILE_OPTIONS): $(STAGE3) $(PORTAGE_DIR) configs/make.conf.$(VA_ARCH) configs/locale.gen $(portage_default_package_files) $(portage_package_files) $(portage_make_conf_local) $(CHROOT)/var/tmp/profile $(CHROOT)/etc/portage/repos.conf $(KERNEL_SRC)
COPY configs/make.conf.$(VA_ARCH) /etc/portage/make.conf
COPY configs/locale.gen /etc/locale.gen
RUN locale-gen
touch $(COMPILE_OPTIONS)
$(KERNEL): $(COMPILE_OPTIONS) $(KERNEL_CONFIG) scripts/build-kernel
ifneq ($(EXTERNAL_KERNEL),YES)
@print Configuring kernel
COPY $(KERNEL_CONFIG) /root/kernel.config
COPY scripts/build-kernel /root/build-kernel
RUN --setenv=KERNEL=$(KERNEL_PKG) \
--setenv=EMERGE="$(EMERGE)" \
--setenv=USEPKG="$(USEPKG)" \
--setenv=MAKEOPTS="$(MAKEOPTS)" \
/root/build-kernel
rm -f $(CHROOT)/root/build-kernel
endif
touch $(KERNEL)
$(SYSTOOLS): $(PREPROOT) $(COMPILE_OPTIONS)
@print Installing standard system tools
systemd-firstboot \
--root=$(CHROOT) \
--setup-machine-id \
--timezone=$(TIMEZONE) \
--hostname=$(HOSTNAME) \
--root-password=
RUN eselect locale set $(LOCALE)
ifeq ($(DASH),YES)
if ! test -e "$(STAGE4_TARBALL)"; \
then RUN $(EMERGE) --noreplace $(USEPKG) app-shells/dash; \
echo /bin/dash >> $(CHROOT)/etc/shells; \
RUN chsh -s /bin/sh root; \
fi
RUN ln -sf dash /bin/sh
endif
touch $(SYSTOOLS)
$(GRUB): $(PREPROOT) configs/grub.cfg $(KERNEL) scripts/grub-headless.sed
ifneq ($(EXTERNAL_KERNEL),YES)
@print Installing Grub
RUN $(EMERGE) -nN $(USEPKG) sys-boot/grub
mkdir -p $(CHROOT)/boot/grub
COPY configs/grub.cfg /boot/grub/grub.cfg
ifeq ($(VIRTIO),YES)
sed -i 's/sda/vda/' $(CHROOT)/boot/grub/grub.cfg
endif
ifeq ($(HEADLESS),YES)
sed -i -f scripts/grub-headless.sed $(CHROOT)/boot/grub/grub.cfg
endif
endif
ln -nsf /run/systemd/resolve/resolv.conf $(CHROOT)/etc/resolv.conf
touch $(GRUB)
software: $(SOFTWARE)
$(SOFTWARE): $(SYSTOOLS) configs/eth.network configs/issue $(COMPILE_OPTIONS) $(WORLD)
@print Building $(APPLIANCE)-specific software
if test -f appliances/default/Makefile; \
then $(MAKE) -C appliances/default preinstall; \
fi
$(MAKE) -C appliances/$(APPLIANCE) preinstall
if test -f $(WORLD_DEFAULT); \
then cat $(WORLD_DEFAULT) >> $(CHROOT)/var/lib/portage/world; \
fi
cat $(WORLD) >> $(CHROOT)/var/lib/portage/world
RUN $(EMERGE) $(USEPKG) --update --newuse --deep @system
@print Running @preserved-rebuild
RUN $(EMERGE) --usepkg=n @preserved-rebuild
COPY configs/issue /etc/issue
RUN $(EMERGE) $(USEPKG) --update --newuse --deep @world $(grub_package)
RUN $(EMERGE) --depclean --with-bdeps=n
RUN --setenv EDITOR=/usr/bin/nano etc-update
COPY configs/eth.network /etc/systemd/network/eth.network
RUN systemctl enable systemd-networkd.service
RUN systemctl enable systemd-resolved.service
ifeq ($(ENABLE_SSHD),YES)
RUN systemctl enable sshd.service
endif
ifeq ($(DASH),YES)
RUN $(EMERGE) --depclean app-shells/bash
endif
if test -f appliances/default/Makefile; \
then $(MAKE) -C appliances/default postinstall; \
fi
$(MAKE) -C appliances/$(APPLIANCE) postinstall
ifneq ($(PKGLIST),0)
echo \# > $(LST_FILE)
echo \# Gentoo Virtual Appliance \"$(APPLIANCE)\" package list >> $(LST_FILE)
echo \# Generated `date -u` >> $(LST_FILE)
echo \# >> $(LST_FILE)
(cd "$(CHROOT)"/var/db/pkg ; /bin/ls -1d */* | grep -v '^virtual/') >> $(LST_FILE)
endif
touch $(SOFTWARE)
$(RAW_IMAGE): $(STAGE4_TARBALL) scripts/grub.shell scripts/motd.sh
@print Installing files to `basename $(RAW_IMAGE)`
qemu-img create -f raw $(RAW_IMAGE).tmp $(DISK_SIZE)
parted -s $(RAW_IMAGE).tmp mklabel msdos
parted -s $(RAW_IMAGE).tmp mkpart primary 1 $(DISK_SIZE)
parted -s $(RAW_IMAGE).tmp set 1 boot on
sync
losetup --show --find --partscan $(RAW_IMAGE).tmp > partitions
mkfs.ext4 -O sparse_super,^has_journal -L ROOT -m 0 `cat partitions`p1
mkdir $(CHROOT)
mount -o noatime `cat partitions`p1 $(CHROOT)
tar -xf $(STAGE4_TARBALL) --numeric-owner $(COPY_ARGS) -C $(CHROOT)
motd.sh $(EXTERNAL_KERNEL) $(VIRTIO) $(DISK_SIZE) $(SWAP_SIZE) $(DASH) $(VA_ARCH) > $(CHROOT)/etc/motd
ifneq ($(EXTERNAL_KERNEL),YES)
echo '(hd0) ' `cat partitions` > $(CHROOT)/device-map
cp partitions $(CHROOT)/partitions
RUN /usr/sbin/grub-install --no-floppy --grub-mkdevicemap=device-map --directory=/usr/lib/grub/i386-pc --boot-directory=/boot `cat partitions`
rm $(CHROOT)/device-map $(CHROOT)/partitions
endif
umount $(CHROOT)
rmdir $(CHROOT)
sync
losetup --detach `cat partitions`
rm -f partitions device-map
mv $(RAW_IMAGE).tmp $(RAW_IMAGE)
$(QCOW_IMAGE): $(RAW_IMAGE)
@print Creating `basename $(QCOW_IMAGE)`
qemu-img convert -f raw -O qcow2 -c $(RAW_IMAGE) $(QCOW_IMAGE).tmp
mv $(QCOW_IMAGE).tmp $(QCOW_IMAGE)
qcow: $(QCOW_IMAGE)
$(XVA_IMAGE): $(RAW_IMAGE)
@print Creating `basename $(XVA_IMAGE)`
xva.py --disk=$(RAW_IMAGE) --is-hvm --memory=256 --vcpus=1 --name=$(APPLIANCE) \
--filename=$(XVA_IMAGE).tmp
mv $(XVA_IMAGE).tmp $(XVA_IMAGE)
$(VMDK_IMAGE): $(RAW_IMAGE) image
qemu-img convert -f raw -O vmdk $(RAW_IMAGE) $(VMDK_IMAGE)
xva: $(XVA_IMAGE)
$(VMDK_IMAGE): $(RAW_IMAGE)
@print Creating `basename $(VMDK_IMAGE)`
ifeq ($(VMDK_TYPE),SCSI)
qemu-img convert -f raw -O vmdk -o adapter_type=lsilogic,subformat=streamOptimized,hwversion=7 $(RAW_IMAGE) $(VMDK_IMAGE).tmp
else
qemu-img convert -f raw -O vmdk $(RAW_IMAGE) $(VMDK_IMAGE).tmp
endif
mv $(VMDK_IMAGE).tmp $(VMDK_IMAGE)
vmdk: $(VMDK_IMAGE)
umount:
$(UMOUNT_PKGDIR)
umount $(CHROOT)/var/tmp
umount $(CHROOT)/dev
umount $(CHROOT)/proc
touch umount
NUM_CPUS := $(OVA_NUM_CPUS)
MEM_SIZE := $(OVA_MEM_SIZE)
export NUM_CPUS MEM_SIZE
remove_checkpoints:
rm -f mounts compile_options base_system portage sync_portage
rm -f parted kernel grub stage3 software preproot sysconfig systools image partitions device-map
$(OVA_IMAGE): $(VMDK_IMAGE)
@print Creating `basename $(OVA_IMAGE)`
cd $(IMAGES) && mkova.sh $(APPLIANCE) /usr/share/open-vmdk/template-hw7.ovf $(VMDK_IMAGE)
clean: umount remove_checkpoints
rm -f umount
rm -rf loop gentoo
rm -rf gentoo
rm -rf $(CHROOT)
ova: $(OVA_IMAGE)
$(STAGE4_TARBALL): $(PORTAGE_DIR) stage3-$(VA_ARCH).tar.xz appliances/$(APPLIANCE) configs/rsync-excludes
$(MAKE) $(STAGE3)
$(MAKE) $(PREPROOT)
$(MAKE) $(SOFTWARE)
$(MAKE) $(KERNEL)
$(MAKE) $(GRUB)
@print Creating stage4 tarball: `basename $(STAGE4_TARBALL)`
$(change_password)
mkdir -p $(IMAGES)
tar -acf "$(STAGE4_TARBALL).tmp.xz" --numeric-owner $(COPY_ARGS) -C $(CHROOT) --one-file-system .
mv "$(STAGE4_TARBALL).tmp.xz" "$(STAGE4_TARBALL)"
$(MAKE) clean
stage4: $(STAGE4_TARBALL)
eclean: $(COMPILE_OPTIONS)
RUN $(EMERGE) $(USEPKG) --oneshot --noreplace app-portage/gentoolkit
RUN eclean-pkg
RUN eclean-dist
RUN $(EMERGE) --depclean app-portage/gentoolkit
$(MAKE) clean
clean:
rm -f partitions device-map $(IMAGES)/*.tmp
rm -rf --one-file-system -- $(CHROOT)
realclean: clean
${RM} $(RAW_IMAGE) $(QCOW_IMAGE) $(VMDK_IMAGE)
distclean:
rm -f *.qcow *.img *.vmdk
rm -f latest-stage3.txt stage3-*-latest.tar.bz2
rm -f portage-latest.tar.bz2
rm -f -- *.qcow *.img *.vmdk
rm -f stage3-*.tar.xz
rm -f portage-snapshot.tar.bz2
.PHONY: qcow vmdk clean realclean distclean remove_checkpoints
appliance-list:
@print 'Available appliances:'
@/bin/ls -1 appliances
checksums:
@print Calculating checksums
$(RM) $(CHECKSUMS)
cd $(IMAGES) && sha256sum --binary * > $(CHECKSUMS).tmp
mv $(CHECKSUMS).tmp $(CHECKSUMS)
shell: $(PREPROOT)
@print 'Entering interactive shell for the $(APPLIANCE) build.'
@print 'Type "exit" or "^D" to leave'
@print
@RUN
@rm -f $(CHROOT)/root/.bash_history
help:
@print 'Help targets (this is not a comprehensive list)'
@echo
@echo 'sync_portage - Download the latest portage snapshot'
@echo 'sync_stage3 - Download the latest stage3 tarball'
@echo 'sync_repos - Download/update the repositories (portage overlays)'
@echo 'stage4 - Build a stage4 tarball'
@echo 'clean - Unmount chroot and clean directory'
@echo 'eclean - Clean outdated packages and distfiles'
@echo 'realclean - Clean and remove image files'
@echo 'shell - Enter a shell in the build environment'
@print 'Images'
@echo 'image - Build a raw VM image from stage4'
@echo 'qcow - Build a qcow VM image from a raw image'
@echo 'vmdk - Build a vmdk image from a raw image'
@echo 'ova - Build a ova image from a vmdk image'
@echo 'xva - Build an xva image from a raw image'
@echo 'appliance-list - List built-in appliances'
@echo 'help - Show this help'
@echo 'Variables'
@echo 'APPLIANCE= - The appliance to build'
@echo 'HOSTNAME= - Hostname to give appliance'
@echo 'TIMEZONE= - Timezone to set for the appliance'
@echo 'CHROOT= - The directory to build the chroot'
@echo 'DISK_SIZE= - Size of the disk image'
@echo 'SWAP_SIZE= - Size of the swap file'
@echo 'VA_ARCH= - Architecture to build for (x86 or amd64)'
@echo 'VIRTIO=YES - Configure the stage2/image to use virtio'
@echo 'EXTERNAL_KERNEL=YES - Do not build a kernel in the image'
@echo 'HEADLESS=YES - Build a headless (serial console) image.'
@echo 'ENABLE_SSHD=YES - Enable sshd to start automatically in the image'
@echo 'VMDK_TYPE=IDE - VMDK image type (IDE or SCSI)'
@echo
@print 'Example to build the base appliance'
@echo 'make APPLIANCE=base HEADLESS=YES VIRTIO=YES stage4 qcow clean'
.PHONY: qcow vmdk ova clean realclean distclean stage4 image stage4 help appliance-list eclean sync_portage sync_stage3 checksums fstab

View File

@ -1,6 +1,3 @@
preinstall:
postinstall:
clean:

View File

@ -0,0 +1,59 @@
HARDENED = $(CHROOT)/var/tmp/hardened
PAM_SSH_AGENT_AUTH = $(CHROOT)/var/tmp/pam_ssh_agent_auth
ADMINUSER = $(CHROOT)/var/tmp/adminuser
timesyncd_conf = $(CHROOT)/etc/systemd/timesyncd.conf
01firstboot = $(CHROOT)/usr/local/bin/01firstboot.start
network_example = $(CHROOT)/00-eth0.network.example
tmux_conf = $(CHROOT)//root/.tmux.conf
$(HARDENED):
mkdir -p $(CHROOT)/etc/portage/profile
echo "-hardened" >> $(CHROOT)/etc/portage/profile/use.mask
RUN $(EMERGE) $(USEPKG) --oneshot gcc
RUN $(EMERGE) $(USEPKG) --oneshot binutils virtual/libc
RUN $(EMERGE) --depclean --with-bdeps=n
-$(gcc_config)
RUN /usr/bin/gcc --version
RUN $(EMERGE) $(USEPKG) --emptytree @world
RUN $(EMERGE) --depclean --with-bdeps=n
RUN bash -c 'yes YES | etc-update --automode -9'
ifneq ($(EXTERNAL_KERNEL),YES)
if ! grep -q "$(shell RUN /usr/bin/gcc --version | grep gcc)" "$(KERNEL_PATH))/.config"; then \
RUN $(EMERGE) $(USEPKG) --onlydeps --oneshot --noreplace sys-kernel/$(KERNEL_PKG); \
RUN make -C /usr/src/linux MAKEOPTS=$(MAKEOPTS) clean oldconfig $(KERNEL_MODULES_PREPARE); \
fi
endif
touch $(HARDENED)
$(timesyncd_conf): default/timesyncd.conf
cp $< $@
$(01firstboot): default/01firstboot.start default/bashrc.firstboot
mkdir -p $(CHROOT)/usr/local/bin
cp $< $@
cat default/bashrc.firstboot >> $(CHROOT)/home/admin/.bashrc
touch $(CHROOT)/01firstboot
$(network_example): default/00-eth0.network
cp $< $@
$(tmux_conf): default/tmux.conf
RUN systemctl enable tmux@root.service
cp $< $@
$(PAM_SSH_AGENT_AUTH):
sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' $(CHROOT)/etc/sudoers
sed -i 's#^auth.*$$#auth sufficient pam_ssh_agent_auth.so file=~/.ssh/authorized_keys\nauth required pam_env.so readenv=1 user_readenv=0\nsession required pam_env.so readenv=1 user_readenv=0\nauth substack system-auth#' $(CHROOT)/etc/pam.d/sudo
sed -i 's#^auth.*$$#auth sufficient pam_ssh_agent_auth.so file=~/.ssh/authorized_keys\nauth required pam_env.so readenv=1 user_readenv=0\nsession required pam_env.so readenv=1 user_readenv=0\nauth substack system-auth#' $(CHROOT)/etc/pam.d/sudo-i
mkdir -p $(CHROOT)/etc/sudoers.d
echo "Defaults env_keep += SSH_AUTH_SOCK" > $(CHROOT)/etc/sudoers.d/ssh_auth_sock
touch $(PAM_SSH_AGENT_AUTH)
$(ADMINUSER):
-RUN useradd -m -G users,wheel -s /bin/bash --comment="virtual appliance admin" --uid 2000 admin
RUN passwd -d admin; $(inroot) passwd -e admin
touch $(ADMINUSER)
preinstall: $(HARDENED)
postinstall: $(PAM_SSH_AGENT_AUTH) $(ADMINUSER) $(timesyncd_conf) $(01firstboot) $(network_example) $(tmux_conf)

View File

@ -0,0 +1,6 @@
Initial configuration
=====================
- For dynamic data (configuration, databases) there must be a data partition formatted with ext4 with the label "DATA". This is mounted to /DATA.
- Configure fixed IP address and /etc/hosts.
- under VMware activate open-vm-tools if necessary

View File

@ -0,0 +1,7 @@
DISK_SIZE = 8.0G
##KERNEL_CONFIG = appliances/default/kernel.config
ENABLE_SSHD = YES
TIMEZONE=Europe/Berlin
LOCALE=de_DE.utf8
REPO_NAMES += unitas-misc
REPO_URI_unitas-misc = https://git.unitas-network.de/Gentoo/unitas-misc.git

View File

@ -0,0 +1,21 @@
# Example of fixed IP address configuration:
#
# Customize and move as 00-eth0.network to /etc/systemd/network
# (refer to "man systemd.network", "man systemd-resolved")
#
# DON'T FORGET: add appropriate entries in /etc/hosts
# <IPv4> <fqdn> <hostname>
# <IPv6> <fqdn> <hostname>
[Match]
Name=eth0
[Network]
Description=first network port
Address=192.168.1.2/24
Address=fdb5:78b:64cc:0:f8c0::2/64
Gateway=192.168.1.1
Gateway=fdb5:78b:64cc:0:f8c0::1
DNS=192.168.1.3
DNS=fdb5:78b:64cc:0:f8c0::3
Domains=exampledomain.de

View File

@ -0,0 +1,209 @@
#!/bin/bash
#
# This script is called the first time the appliance is started
# after the installation or update.
#
########################
# variables
########################
LABEL="DATA"
APPLCTRL="/$LABEL/.APPLIANCE"
LISTCOPY="$APPLCTRL/populate-data/COPY"
LISTLINK="$APPLCTRL/populate-data/LINK"
########################
# functions
########################
copy_data () {
if [ -e "/$1.orig" ]; then
echo "skip /$1 (/$1.orig exists)"
return 0
fi
if [ -e "/$1" ]; then
# destination exists, copy it to *.orig
cp -af "/$1" "/$1.orig"
else
# destination doesn't exists, create empty *.orig
if [ -d "/$LABEL/$1" ]; then
mkdir -p "/$1.orig"
else
mkdir -p $(dirname /$1)
touch "/$1.orig"
fi
fi
echo "copy /$LABEL/$1"
if [ -d "/$LABEL/$1" ] && [ -d "/$1" ]; then
# Source is a directory and the destination directory exists
cp -af "/$LABEL/$1/." "/$1"
else
mkdir -p $(dirname /$1)
cp -af "/$LABEL/$1" "/$1"
fi
}
link_data () {
if [ -e "/$1.orig" ]; then
echo "skip /$1 (/$1.orig exists)"
return 0
fi
if [ -e "/$1" ]; then
# destination exists, move it to *.orig
mv "/$1" "/$1.orig"
else
# destination doesn't exists, create empty *.orig
if [ -d "/$LABEL/$1" ]; then
mkdir -p "/$1.orig"
else
mkdir -p $(dirname /$1)
touch "/$1.orig"
fi
fi
echo "link /$LABEL/$1"
ln -nsf "/$LABEL/$1" "/$1"
}
populate_data () {
# All files and directories listed in LISTCOPY will be copied from
# /DATA to the system (directories recursively). The files and
# directories listed in LISTLINK will be linked into the system.
#
# Copy
if [ -f "$LISTCOPY" ]; then
while IFS="" read -r src || [ -n "$src" ]
do
[[ -z "$src" ]] && continue
[[ "$src" =~ ^#.*$ ]] && continue
src=${src#/}
[[ "$src" =~ ^home/ ]] && continue
[[ ! -e "/$LABEL/$src" ]] && continue
copy_data "$src"
done < "$LISTCOPY"
fi
# Link
if [ -f "$LISTLINK" ]; then
while IFS="" read -r src || [ -n "$src" ]
do
[[ -z "$src" ]] && continue
[[ "$src" =~ ^#.*$ ]] && continue
src=${src#/}
[[ "$src" =~ ^home/ ]] && continue
[[ ! -e "/$LABEL/$src" ]] && continue
link_data "$src"
done < "$LISTLINK"
fi
}
########################
# base settings
########################
set -e
[ -e /01firstboot ] || exit 0
echo 'Setting keymap...'
localectl --no-convert set-keymap de-latin1-nodeadkeys
echo 'Activate NTP service...'
timedatectl set-ntp true
echo 'set machine id...'
systemd-machine-id-setup
########################
# Data partition
########################
echo 'Mount data partition...'
mkdir -p /$LABEL
if [ ! -L "/dev/disk/by-label/$LABEL" ]; then
echo 'ERROR: Data partition not found!'
echo "Please create a data partition with ext4 filesystem and label \"$LABEL\":"
echo "# cfdisk /dev/<disk> (use GPT label, create linux partition)"
echo "# mkfs.ext4 -L $LABEL /dev/<partition>"
exit 1
fi
if ! grep -Fq "LABEL=$LABEL" /etc/fstab; then
echo -e "LABEL=$LABEL\t/$LABEL\t\text4\tnoatime\t0 1" >> /etc/fstab
fi
mount -a
if ! mount | grep /$LABEL > /dev/null; then
echo "ERROR: Could not mount data partition!"
exit 1
fi
########################
# Swap partition
########################
if [ -L "/dev/disk/by-label/SWAP" ]; then
echo 'Swap partition found, mounting...'
swapoff -a
grep -Fv swap /etc/fstab > /etc/fstab.tmp && mv /etc/fstab.tmp /etc/fstab
echo -e "LABEL=SWAP\tnone\t\tswap\tsw\t0 0" >> /etc/fstab
swapon -a
rm -f /.swap
fi
echo 'Mount data partition...'
########################
# homedirs, users
########################
if [ -d "/$LABEL/home" ]; then
cd "/$LABEL/home"
for user in *; do
if [ -d "$user" ]; then
if ! id -u "$user" >/dev/null 2>&1; then
useradd -m -G users,wheel -s /bin/bash --uid $(stat -c '%u' $user) --user-group $user
fi
rm -rf "/home/$user"
ln -nsf "/$LABEL/home/$user" "/home/$user"
fi
done
fi
########################
# DATA
########################
populate_data
if [ ! -d "/$LABEL/etc/ssh" ]; then
cp -af /etc/ssh /etc/ssh.orig
mkdir -p "/$LABEL/etc"
mv /etc/ssh "/$LABEL/etc/"
ln -nsf "/$LABEL/etc/ssh" /etc/ssh
fi
if [ ! -f "/$LABEL/etc/hosts" ]; then
cp -af /etc/hosts /etc/hosts.orig
mkdir -p "/$LABEL/etc"
mv -f /etc/hosts "/$LABEL/etc/hosts"
ln -nsf "/$LABEL/etc/hosts" /etc/hosts
fi
if [ ! -f "/$LABEL/etc/fstab" ]; then
cp -af /etc/fstab "/$LABEL/etc/fstab"
fi
if [ ! -f "/$LABEL/etc/hostname" ]; then
cp -af /etc/hostname "/$LABEL/etc/hostname"
fi
if [ ! -f "$LISTCOPY" ]; then
mkdir -p $(dirname $LISTCOPY)
echo "# all files and directories listed here are copied from /DATA to the system," >> $LISTCOPY
echo "# directories recursively (one file / directory per line)" >> $LISTCOPY
echo "/etc/fstab" >> $LISTCOPY
echo "/etc/hostname" >> $LISTCOPY
fi
if [ ! -f "$LISTLINK" ]; then
mkdir -p $(dirname $LISTLINK)
echo "# all files and directories listed here are linked from /DATA to the system," >> $LISTLINK
echo "# directories recursively (one file / directory per line)" >> $LISTLINK
echo "/etc/hosts" >> $LISTLINK
echo "/etc/ssh" >> $LISTLINK
fi
rm /01firstboot

View File

@ -0,0 +1,38 @@
if [ -e /01firstboot ]; then
echo
echo "##########################################################################"
echo "The new or updated appliance still needs to be initialized."
echo "If errors occur, their cause must be fixed. Afterwards the initialization"
echo "can be restarted by running \"sudo /usr/local/bin/01firstboot.start\"."
echo "##########################################################################"
echo
read -n 1 -s -r -p "Press any key to start initialization..."
echo
sudo /usr/local/bin/01firstboot.start
echo
echo "##########################################################################"
echo "After successful initialization, the appliance should be restarted."
echo
read -n 1 -s -r -p "Press any key to continue..."
echo
fi
if [ -e /02firstboot ] && [ ! -e /01firstboot ]; then
echo
echo "##########################################################################"
echo "After basic initialization, the special services of the appliance still"
echo "have to be configured. Any errors that may occur must be corrected, after"
echo "which the configuration can be restarted by executing"
echo "\"sudo /usr/local/bin/02firstboot.start\"."
echo "##########################################################################"
echo
read -n 1 -s -r -p "Press any key to start configuration..."
echo
sudo /usr/local/bin/02firstboot.start
echo
echo "##########################################################################"
echo "After successful configuration, the appliance should be restarted."
echo
read -n 1 -s -r -p "Press any key to continue..."
echo
fi

View File

@ -0,0 +1,5 @@
# See timesyncd.conf(5) for details.
[Time]
NTP=0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org
FallbackNTP=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org

View File

@ -0,0 +1,3 @@
set -g mouse on
set-option -g set-titles on
set-option -g set-titles-string "#S / #T"

View File

@ -0,0 +1,10 @@
CFLAGS="-O2 -pipe"
CXXFLAGS="-O2 -pipe"
USE="hardened justify pie ssp urandom xattr -fortran -pch -pic -prelink -profile -tcc"
MAKEOPTS="-j5"
ACCEPT_LICENSE="*"
# Python-Version festpinnen (s. auch package.mask)
USE_PYTHON="3.12"
PYTHON_TARGETS="python3_12"
PYTHON_SINGLE_TARGET="python3_12"

View File

@ -0,0 +1,3 @@
# Base system
app-emulation/open-vm-tools
sys-auth/pam_ssh_agent_auth

View File

@ -0,0 +1,2 @@
# Python: nur Version 3.12 verwenden (s. auch make.conf: PYTHON-Variable)
>=dev-lang/python-3.13

View File

@ -0,0 +1,26 @@
# Base system
app-admin/sudo -sendmail
app-editors/nano ncurses
app-emulation/open-vm-tools pic -fuse -modules -resolutionkms
app-misc/mc -slang
dev-lang/python ssl threads xml
dev-libs/libpcre cxx jit
dev-libs/libpcre2 jit
dev-util/pkgconfig internal-glib
dev-vcs/git -gpg -iconv -pcre -pcre-jit -perl -python -threads -webdav
net-misc/openssh ssl
net-misc/wget ssl
sys-apps/hwids udev
sys-apps/kmod tools
sys-apps/net-tools hostname
sys-apps/portage ipc
sys-auth/pambase nullok sha512
sys-devel/gcc cxx nptl
sys-kernel/gentoo-sources symlink
# Monitoring
net-analyzer/zabbix agent
# temp., sonst circular dependencies error
sys-devel/m4 -nls
sys-apps/help2man -nls

12
appliances/default/world Normal file
View File

@ -0,0 +1,12 @@
app-admin/logrotate
app-admin/sudo
app-arch/p7zip
app-emulation/open-vm-tools
app-emulation/qemu-guest-agent
app-misc/mc
app-misc/tmuxservice
dev-vcs/git
net-analyzer/zabbix
sys-auth/pam_ssh_agent_auth
sys-fs/mdadm
sys-power/acpid

View File

@ -1,37 +0,0 @@
app-editors/nano
net-misc/openssh
net-misc/rsync
net-misc/wget
sys-kernel/gentoo-sources
sys-kernel/linux-headers
sys-devel/gcc
sys-devel/automake
sys-devel/bison
sys-devel/make
sys-devel/flex
sys-devel/automake-wrapper
sys-devel/autoconf-wrapper
sys-devel/autoconf
sys-devel/m4
sys-devel/gcc-config
sys-devel/libtool
sys-devel/binutils
sys-devel/binutils-config
sys-devel/patch
sys-devel/gnuconfig
app-admin/python-updater
app-admin/perl-cleaner
sys-apps/man-pages
sys-apps/man
sys-apps/file
sys-apps/less
sys-apps/texinfo
sys-apps/busybox
sys-apps/debianutils
sys-apps/man-pages-posix
sys-apps/sandbox
sys-apps/which
dev-lang/perl
sys-devel/libperl
sys-apps/portage
dev-lang/python

View File

@ -1,3 +0,0 @@
app-editors/nano ncurses
dev-lang/python ssl threads xml
sys-kernel/gentoo-sources symlink

View File

@ -1 +0,0 @@
net-misc/dhcpcd

5
configs/eth.network Normal file
View File

@ -0,0 +1,5 @@
[Match]
Name=*
[Network]
DHCP=yes

10
configs/grub.cfg Normal file
View File

@ -0,0 +1,10 @@
insmod part_msdos
set timeout=2
set default=0
set fallback=1
set graphics=0
menuentry "Gentoo Linux" {
set root=(hd0,1)
linux /boot/vmlinuz root=/dev/sda1 rootfstype=ext4 net.ifnames=0 init=/usr/lib/systemd/systemd quiet
}

4
configs/issue Normal file
View File

@ -0,0 +1,4 @@

 Gentoo Virtual Appliance
 

3645
configs/kernel.config.amd64 Normal file

File diff suppressed because it is too large Load Diff

3137
configs/kernel.config.x86 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,7 @@
en_US ISO-8859-1
en_US.UTF-8 UTF-8
de_DE.UTF-8 UTF-8
#ja_JP.EUC-JP EUC-JP
#ja_JP.UTF-8 UTF-8
#ja_JP EUC-JP

16
configs/make.conf.amd64 Normal file
View File

@ -0,0 +1,16 @@
CFLAGS="-Os -Qn -s"
CXXFLAGS="-Os -Qn -s"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j2"
USE="-* bindist ipv6 nptl openssl pam split-usr systemd udev unicode"
ALSA_PCM_PLUGINS="*"
CLEAN_DELAY="0"
EMERGE_WARNING_DELAY="0"
AUTO_CLEAN="yes"
EPAUSE_IGNORE="1"
EMERGE_DEFAULT_OPTS="--jobs=2 --autounmask=n"
FEATURES="noinfo -test nodoc noman nostrip unmerge-orphans buildpkg notitles parallel-fetch binpkg-multi-instance -cgroup"
CURL_SSL="openssl"
INSTALL_MASK="/etc/default/grub /etc/locale.gen /etc/fstab /etc/issue /usr/share/doc"
source make.conf.local

17
configs/make.conf.x86 Normal file
View File

@ -0,0 +1,17 @@
CFLAGS="-Os -Qn -s"
CXXFLAGS="-Os -Qn -s"
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j2"
USE="-* bindist ipv6 nptl openssl pam split-usr systemd unicode"
ALSA_PCM_PLUGINS="*"
CLEAN_DELAY="0"
EMERGE_WARNING_DELAY="0"
AUTO_CLEAN="yes"
EPAUSE_IGNORE="1"
EMERGE_DEFAULT_OPTS="--jobs=2 --autounmask=n"
FEATURES="noinfo -test nodoc noman nostrip unmerge-orphans buildpkg notitles parallel-fetch binpkg-multi-instance -cgroup"
CURL_SSL="openssl"
ABI_X86="32"
INSTALL_MASK="/etc/default/grub /etc/locale.gen /etc/fstab /etc/issue /usr/share/doc"
source make.conf.local

View File

@ -0,0 +1,5 @@
dev-lang/python ssl xml
dev-util/pkgconfig internal-glib
sys-apps/kmod tools
sys-apps/systemd sysv-utils
sys-process/procps kill

View File

@ -1,4 +1,5 @@
usr/src/linux-*
tmp/*
var/tmp/*
usr/portage/*

View File

@ -1,75 +0,0 @@
# /etc/etc-update.conf: config file for `etc-update` utility
# edit the lines below to your liking
# mode - 0 for text, 1 for menu (support incomplete)
# note that you need dev-util/dialog installed
mode="0"
# Whether trivial/comment changes should be automerged
eu_automerge="yes"
# arguments used whenever rm is called
rm_opts=""
# arguments used whenever mv is called
mv_opts=""
# arguments used whenever cp is called
cp_opts=""
# pager for use with diff commands
#pager=""
# For emacs-users (see NOTE_2)
# diff_command="eval emacs -nw --eval=\'\(ediff\ \"%file1\"\ \"%file2\"\)\'"
#using_editor=1
# vim-users: you CAN use vimdiff for diff_command. (see NOTE_1 and NOTE_2)
#diff_command="vim -d %file1 %file2"
#using_editor=1
diff_command="diff -uN %file1 %file2"
using_editor=0
# vim-users: don't use vimdiff for merging (see NOTE_1)
merge_command="sdiff -s -o %merged %orig %new"
# EXPLANATION
#
# pager:
#
# Examples of pager usage:
# pager="" # don't use a pager
# pager="less -E" # less
# pager="more" # more
#
#
# diff_command:
#
# Arguments:
# %file1 [REQUIRED]
# %file2 [REQUIRED]
#
# Examples of diff_command:
# diff_command="diff -uN %file1 %file2" # diff
# diff_command="vim -d %file1 %file2" # vimdiff
#
#
# merge_command:
#
# Arguments:
# %orig [REQUIRED]
# %new [REQUIRED]
# %merged [REQUIRED]
#
# Examples of merge_command:
# merge_command="sdiff -s -o %merged %old %new" # sdiff
#
# NOTE_1: Editors such as vim/vimdiff are not usable for the merge_command
# because it is not known what filenames the produced files have (the user can
# choose while using those programs)
# NOTE_2: Make sure using_editor is set to "1" when using an editor as
# diff_command!

4
fstab
View File

@ -1,4 +0,0 @@
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/sda1 / ext2 noatime 1 1
/.swap none swap sw 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

View File

@ -1,28 +0,0 @@
ifneq ($(OVERLAY),YES)
DO_OVERLAY = \#
endif
# totem gst-inspect requires a machine id (generated by dbus). we
# don't have one yet because we are in a virgin chroot. fake one
preinstall:
mkdir -p "$(CHROOT)/var/lib/dbus"
echo 1234567890abcdef1234567890abcdef > \
"$(CHROOT)"/var/lib/dbus/machine-id
chroot "$(CHROOT)" $(EMERGE) $(USEPKG) -1n dev-util/pkgconfig
$(DO_OVERLAY) chroot $(CHROOT) $(EMERGE) $(USEPKG) -1n app-portage/layman
$(DO_OVERLAY) chroot $(CHROOT) $(EMERGE) $(USEPKG) -1n dev-vcs/git
$(DO_OVERLAY) chroot $(CHROOT) /usr/bin/layman --sync ALL
$(DO_OVERLAY) chroot $(CHROOT) /usr/bin/layman --add gnome
$(DO_OVERLAY) echo "source /var/lib/layman/make.conf" >> $(CHROOT)/etc/make.conf
$(DO_OVERLAY) echo USE='"$$USE clutter"' >> $(CHROOT)/etc/make.conf
postinstall: custom.conf
$(RM) "$(CHROOT)"/var/lib/dbus/machine-id
cp custom.conf "$(CHROOT)"/etc/X11/gdm/custom.conf
#chroot "$(CHROOT)" rc-update add hald default
chroot "$(CHROOT)" rc-update add dbus default
echo 'gdm &>/dev/null' >> "$(CHROOT)"/etc/conf.d/local.start
clean:

View File

@ -1,35 +0,0 @@
app-editors/nano
net-misc/openssh
net-misc/rsync
net-misc/wget
sys-kernel/gentoo-sources
sys-kernel/linux-headers
sys-devel/gcc
sys-devel/automake
sys-devel/bison
sys-devel/make
sys-devel/flex
sys-devel/automake-wrapper
sys-devel/autoconf-wrapper
sys-devel/autoconf
sys-devel/m4
sys-devel/gcc-config
sys-devel/binutils
sys-devel/binutils-config
sys-devel/patch
sys-devel/gnuconfig
app-admin/python-updater
app-admin/perl-cleaner
sys-apps/man-pages
sys-apps/man
sys-apps/file
sys-apps/less
sys-apps/texinfo
sys-apps/busybox
sys-apps/debianutils
sys-apps/man-pages-posix
sys-apps/sandbox
sys-apps/which
dev-lang/perl
sys-devel/libperl
sys-apps/portage

View File

@ -1,82 +0,0 @@
# GDM Custom Configuration file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration. If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration. Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
#
# This file overrides the default configuration settings. These settings
# are stored in the GDM System Defaults configuration file, which is found
# at the following location.
#
# /usr/share/gdm/defaults.conf.
#
# This file contains comments about the meaning of each configuration option,
# so is also a useful reference. Also refer to the documentation links at
# the end of this comment for further information. In short, to hand-edit
# this file, simply add or modify the key=value combination in the
# appropriate section in the template below this comment section.
#
# For example, if you want to specify a different value for the Enable key
# in the "[debug]" section of your GDM System Defaults configuration file,
# then add "Enable=true" in the "[debug]" section of this file. If the
# key already exists in this file, then simply modify it.
#
# Older versions of GDM used the "gdm.conf" file for configuration. If your
# system has an old gdm.conf file on the system, it will be used instead of
# this file - so changes made to this file will not take effect. Consider
# migrating your configuration to this file and removing the gdm.conf file.
#
# If you hand edit a GDM configuration file, you can run the following
# command and the GDM daemon will immediately reflect the change. Any
# running GDM GUI programs will also be notified to update with the new
# configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG <configuration key>"
#
# e.g, the "Enable" key in the "[debug]" section would be "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings. You can also restart GDM by sending
# a HUP or USR1 signal to the daemon. HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
#
# For full reference documentation see the gnome help browser under
# GNOME|System category. You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
#
# NOTE: Lines that begin with "#" are considered comments.
#
# Have fun!
[daemon]
[security]
[xdmcp]
Enable=True
[gui]
[greeter]
[chooser]
[debug]
# Note that to disable servers defined in the GDM System Defaults
# configuration file (such as 0=Standard, you must put a line in this file
# that says 0=inactive, as described in the Configuration section of the GDM
# documentation.
#
[servers]
0=inactive
# Also note, that if you redefine a [server-foo] section, then GDM will
# use the definition in this file, not the GDM System Defaults configuration
# file. It is currently not possible to disable a [server-foo] section
# defined in the GDM System Defaults configuration file.
#

View File

@ -1,30 +0,0 @@
app-editors/nano ncurses
dev-lang/python ssl sqlite threads xml
sys-kernel/gentoo-sources symlink
# for gnome
app-text/enchant hunspell
app-text/poppler cairo
dev-libs/libxml2 python
gnome-base/gnome-menus python
gnome-base/gvfs gdu
media-libs/libcanberra gtk
media-libs/swfdec gtk
net-libs/libsoup gnome ssl
net-misc/curl ssl
sys-apps/dbus X
sys-apps/parted device-mapper
sys-block/parted device-mapper
sys-auth/consolekit policykit
sys-fs/udev extras
x11-libs/cairo svg X
x11-libs/gtk+ jpeg
x11-libs/pango X
mail-client/evolution ssl
gnome-extra/evolution-data-server ssl
>=gnome-extra/evolution-data-server-2.30 weather
#net-libs/xulrunner cups
#net-print/cups gnutls
#app-text/poppler utils
#app-text/ghostscript-gpl cups

View File

@ -1,4 +0,0 @@
gnome-base/gnome
media-fonts/dejavu
media-fonts/freefont-ttf
x11-apps/xauth

View File

@ -1,3 +0,0 @@
1iserial --speed=9600 --unit=0 --word=8 --parity=no --stop=1\
1iterminal --timeout=2 serial console\
s/^\(kernel .*\)$/\1 console=ttyS0/

View File

@ -1,7 +0,0 @@
default 0
timeout 5
title Gentoo Linux
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1 quiet

View File

@ -1,12 +0,0 @@
preinstall:
postinstall:
chroot "$(CHROOT)" emerge -C '>=dev-lang/python-3.0' gentoo-sources
# we want sshd running
chroot "$(CHROOT)" rc-update add sshd default
# and root account enabled, so we can ssh in
chroot "$(CHROOT)" chage -E -1 root
clean:

View File

@ -1,3 +0,0 @@
You should pass "APPLIANCE=hemp-node CHANGE_PASSWORD=NO REMOVE_PORTAGE=NO"
to the toplevel Makefile for this to be useable

View File

@ -1,37 +0,0 @@
app-editors/nano
net-misc/openssh
net-misc/rsync
net-misc/wget
sys-kernel/gentoo-sources
sys-kernel/linux-headers
sys-devel/gcc
sys-devel/automake
sys-devel/bison
sys-devel/make
sys-devel/flex
sys-devel/automake-wrapper
sys-devel/autoconf-wrapper
sys-devel/autoconf
sys-devel/m4
sys-devel/gcc-config
sys-devel/libtool
sys-devel/binutils
sys-devel/binutils-config
sys-devel/patch
sys-devel/gnuconfig
app-admin/python-updater
app-admin/perl-cleaner
sys-apps/man-pages
sys-apps/man
sys-apps/file
sys-apps/less
sys-apps/texinfo
sys-apps/busybox
sys-apps/debianutils
sys-apps/man-pages-posix
sys-apps/sandbox
sys-apps/which
dev-lang/perl
sys-devel/libperl
sys-apps/portage
dev-lang/python

View File

@ -1,3 +0,0 @@
app-editors/nano ncurses
dev-lang/python ssl threads xml
sys-kernel/gentoo-sources symlink

View File

@ -1 +0,0 @@
net-misc/dhcpcd

6
issue
View File

@ -1,6 +0,0 @@

------------------------------------------------------------------------------
Gentoo Virtual Machine
------------------------------------------------------------------------------

View File

@ -1,22 +0,0 @@
preinstall:
echo 'USE="$$USE qt3support xcomposite opengl"' >> "$(CHROOT)"/etc/make.conf;
postinstall: kdmrc Xaccess local knotifyrc
cp kdmrc Xaccess "$(CHROOT)"/usr/share/config/kdm
mkdir -p "$(CHROOT)"/etc/skel/.kde4/share/config
cp knotifyrc "$(CHROOT)"/etc/skel/.kde4/share/config/knotifyrc
chroot "$(CHROOT)" rc-update add dbus default
if [ -e "$(CHROOT)"/etc/conf.d/xdm ]; then \
sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="kdm"/' \
"$(CHROOT)"/etc/conf.d/xdm; \
chroot "$(CHROOT)" rc-update add xdm default; \
elif [ -f "$(CHROOT)/etc/conf.d/local" ]; then \
cp local "$(CHROOT)/etc/conf.d/local"; \
else \
echo "/usr/bin/kdm -daemon" >> "$(CHROOT)"/etc/conf.d/local.start; \
fi
clean:

View File

@ -1,67 +0,0 @@
# Xaccess - Access control file for XDMCP connections
#
# To control Direct and Broadcast access:
#
# pattern
#
# To control Indirect queries:
#
# pattern list of hostnames and/or macros ...
#
# To use the chooser:
#
# pattern CHOOSER BROADCAST
#
# or
#
# pattern CHOOSER list of hostnames and/or macros ...
#
# To define macros:
#
# %name list of hosts ...
#
# The first form tells xdm which displays to respond to itself.
# The second form tells xdm to forward indirect queries from hosts matching
# the specified pattern to the indicated list of hosts.
# The third form tells xdm to handle indirect queries using the chooser;
# the chooser is directed to send its own queries out via the broadcast
# address and display the results on the terminal.
# The fourth form is similar to the third, except instead of using the
# broadcast address, it sends DirectQuerys to each of the hosts in the list
#
# In all cases, xdm uses the first entry which matches the terminal;
# for IndirectQuery messages only entries with right hand sides can
# match, for Direct and Broadcast Query messages, only entries without
# right hand sides can match.
#
* #any host can get a login window
#
# To hardwire a specific terminal to a specific host, you can
# leave the terminal sending indirect queries to this host, and
# use an entry of the form:
#
#terminal-a host-a
#
# The nicest way to run the chooser is to just ask it to broadcast
# requests to the network - that way new hosts show up automatically.
# Sometimes, however, the chooser cannot figure out how to broadcast,
# so this may not work in all environments.
#
* CHOOSER BROADCAST #any indirect host can get a chooser
#
# If you would prefer to configure the set of hosts each terminal sees,
# then just uncomment these lines (and comment the CHOOSER line above)
# and edit the %hostlist line as appropriate
#
#%hostlist host-a host-b
* CHOOSER %hostlist #
*

View File

@ -1,36 +0,0 @@
app-editors/nano
net-misc/openssh
net-misc/rsync
net-misc/wget
sys-kernel/gentoo-sources
sys-kernel/linux-headers
sys-devel/gcc
sys-devel/automake
sys-devel/bison
sys-devel/make
sys-devel/flex
sys-devel/automake-wrapper
sys-devel/autoconf-wrapper
sys-devel/autoconf
sys-devel/m4
sys-devel/gcc-config
sys-devel/libtool
sys-devel/binutils
sys-devel/binutils-config
sys-devel/patch
sys-devel/gnuconfig
app-admin/python-updater
app-admin/perl-cleaner
sys-apps/man-pages
sys-apps/man
sys-apps/file
sys-apps/less
sys-apps/texinfo
sys-apps/busybox
sys-apps/debianutils
sys-apps/man-pages-posix
sys-apps/sandbox
sys-apps/which
dev-lang/perl
sys-devel/libperl
sys-apps/portage

588
kde/kdmrc
View File

@ -1,588 +0,0 @@
# KDM master configuration file
#
# Definition: the greeter is the login dialog, i.e., the part of KDM
# which the user sees.
#
# You can configure every X-display individually.
# Every display has a display name, which consists of a host name
# (which is empty for local displays specified in {Static|Reserve}Servers),
# a colon, and a display number. Additionally, a display belongs to a
# display class (which can be ignored in most cases; the control center
# does not support this feature at all).
# Sections with display-specific settings have the formal syntax
# "[X-" host [":" number [ "_" class ]] "-" sub-section "]"
# You can use the "*" wildcard for host, number, and class. You may omit
# trailing components; they are assumed to be "*" then.
# The host part may be a domain specification like ".inf.tu-dresden.de".
# It may also be "+", which means non-empty, i.e. remote displays only.
# From which section a setting is actually taken is determined by these
# rules:
# - an exact match takes precedence over a partial match (for the host part),
# which in turn takes precedence over a wildcard ("+" taking precedence
# over "*")
# - precedence decreases from left to right for equally exact matches
# Example: display name "myhost:0", class "dpy".
# [X-myhost:0_dpy] precedes
# [X-myhost:0_*] (same as [X-myhost:0]) precedes
# [X-myhost:*_dpy] precedes
# [X-myhost:*_*] (same as [X-myhost]) precedes
# [X-+:0_dpy] precedes
# [X-*:0_dpy] precedes
# [X-*:0_*] (same as [X-*:0]) precedes
# [X-*:*_*] (same as [X-*])
# These sections do NOT match this display:
# [X-hishost], [X-myhost:0_dec], [X-*:1], [X-:*]
# If a setting is not found in any matching section, the default is used.
#
# Every comment applies to the following section or key. Note that all
# comments will be lost if you change this file with the kcontrol frontend.
# The defaults refer to KDM's built-in values, not anything set in this file.
#
# Special characters need to be backslash-escaped (leading and trailing
# spaces (\s), tab (\t), linefeed (\n), carriage return (\r) and the
# backslash itself (\\)).
# In lists, fields are separated with commas without whitespace in between.
# Some command strings are subject to simplified sh-style word splitting:
# single quotes (') and double quotes (") have the usual meaning; the backslash
# quotes everything (not only special characters). Note that the backslashes
# need to be doubled because of the two levels of quoting.
[General]
# This option exists solely for the purpose of a clean automatic upgrade.
# Do not even think about changing it!
ConfigVersion=2.4
# List of permanent displays. Displays with a hostname are foreign. A display
# class may be specified separated by an underscore.
# Default is ":0"
StaticServers=
# List of on-demand displays. See StaticServers for syntax.
# Default is ""
ReserveServers=
# VTs to allocate to X-servers. A negative number means that the VT will be
# used only if it is free. If all VTs in this list are used up, the next free
# one greater than the last one in this list will be allocated.
# Default is ""
ServerVTs=-7
# TTYs (without /dev/) to monitor for activity while in console mode.
# Default is ""
ConsoleTTYs=tty1,tty2,tty3,tty4,tty5,tty6
# Where KDM should store its PID (do not store if empty).
# Default is ""
PidFile=/var/run/kdm.pid
# Whether KDM should lock the PID file to prevent having multiple KDM
# instances running at once. Do not change unless you are brave.
# Default is true
#LockPidFile=false
# Where to store authorization files.
# Default is "/var/run/xauth"
#AuthDir=/tmp
# Whether KDM should automatically re-read configuration files, if it
# finds them having changed.
# Default is true
#AutoRescan=false
# Additional environment variables KDM should pass on to all programs it runs.
# LD_LIBRARY_PATH and XCURSOR_THEME are good candidates;
# otherwise, it should not be necessary very often.
# Default is ""
#ExportList=LD_LIBRARY_PATH,ANOTHER_IMPORTANT_VAR
# A character device KDM should read entropy from.
# Empty means use the system's preferred entropy device.
# Default is ""
#RandomDevice=/dev/altrandom
# Where the command sockets should be created; make it empty to disable
# them.
# Default is "/var/run/xdmctl"
#FifoDir=/tmp
# The group to which the global command socket should belong;
# can be either a name or a numerical ID.
# Default is 0
#FifoGroup=xdmctl
# The directory in which KDM should store persistent working data.
# Default is "/var/lib/kdm"
##DataDir=
DataDir=/var/lib/kdm-4.4
# The directory in which KDM should store users' .dmrc files. This is only
# needed if the home directories are not readable before actually logging in
# (like with AFS).
# Default is ""
#DmrcDir=/nfs-shared/var/dmrcs
[Xdmcp]
# Whether KDM should listen to incoming XDMCP requests.
# Default is true
Enable=true
# The UDP port on which KDM should listen for XDMCP requests. Do not change.
# Default is 177
Port=177
# File with the private keys of X-terminals. Required for XDM authentication.
# Default is ""
#KeyFile=/usr/share/config/kdm/kdmkeys
# XDMCP access control file in the usual XDM-Xaccess format.
# Default is "/usr/share/config/kdm/Xaccess"
#Xaccess=
# Number of seconds to wait for display to respond after the user has
# selected a host from the chooser.
# Default is 15
#ChoiceTimeout=10
# Strip domain name from remote display names if it is equal to the local
# domain.
# Default is true
#RemoveDomainname=false
# Use the numeric IP address of the incoming connection on multihomed hosts
# instead of the host name.
# Default is false
#SourceAddress=true
# The program which is invoked to dynamically generate replies to XDMCP
# DirectQuery or BroadcastQuery requests.
# If empty, no program is invoked and "Willing to manage" is sent.
# Default is ""
Willing=/usr/share/config/kdm/Xwilling
[Shutdown]
# The command (subject to word splitting) to run to halt the system.
# Default is "/sbin/halt"
#HaltCmd=
# The command (subject to word splitting) to run to reboot the system.
# Default is "/sbin/reboot"
#RebootCmd=
# Whether it is allowed to shut down the system via the global command socket.
# Default is false
#AllowFifo=true
# Whether it is allowed to abort active sessions when shutting down the
# system via the global command socket.
# Default is true
#AllowFifoNow=false
# The boot manager KDM should use for offering boot options in the
# shutdown dialog.
# "None" - no boot manager
# "Grub" - Grub boot manager
# "Lilo" - Lilo boot manager (Linux on i386 & x86-64 only)
# Default is None
#BootManager=Grub
# Rough estimations about how many seconds KDM will spend at most on
# - opening a connection to the X-server (OpenTime) if the attempt
# - times out: OpenTimeout
# - is refused: OpenRepeat * OpenDelay
# - starting a local X-server (ServerTime):
# ServerAttempts * (ServerTimeout + OpenDelay)
# - starting a display:
# - local display: ServerTime + OpenTime
# - foreign display: StartAttempts * OpenTime
# - XDMCP display: OpenTime (repeated indefinitely by client)
# Core config for all displays
[X-*-Core]
# How long to wait before retrying to connect a display.
# Default is 15
#OpenDelay=15
# How long to wait before timing out a display connection attempt.
# Default is 120
#OpenTimeout=120
# How many connection attempts to make during a start attempt. Note that
# a timeout aborts the entire start attempt.
# Default is 5
#OpenRepeat=5
# Try at most that many times to start a display. If this fails, the display
# is disabled.
# Default is 4
#StartAttempts=4
# Ping remote display every that many minutes.
# Default is 5
#PingInterval=5
# Wait for a Pong that many minutes.
# Default is 5
#PingTimeout=5
# The name of this X-server's Xauth file.
# If empty, a random name in the AuthDir directory will be used.
# Default is ""
#AuthFile=
# Specify a file with X-resources for the greeter, chooser and background.
# The KDE frontend does not use this file, so you do not need it unless you
# use another background generator than krootimage.
# Default is ""
#Resources=
# The xrdb program to use to read the above specified recources.
# Subject to word splitting.
# Default is "/usr/bin/xrdb"
#Xrdb=
# A program to run before the greeter is shown. Can be used to start an
# xconsole or an alternative background generator. Subject to word splitting.
# Default is ""
Setup=/usr/share/config/kdm/Xsetup
# A program to run before a user session starts. Subject to word splitting.
# Default is ""
Startup=/usr/share/config/kdm/Xstartup
# A program to run after a user session exits. Subject to word splitting.
# Default is ""
Reset=/usr/share/config/kdm/Xreset
# The program which is run as the user which logs in. It is supposed to
# interpret the session argument (see SessionsDirs) and start an appropriate
# session according to it. Subject to word splitting.
# Default is "/usr/bin/xterm -ls -T"
Session=/usr/share/config/kdm/Xsession
# The program to run if Session fails.
# Default is "/usr/bin/xterm"
#FailsafeClient=
# The PATH for the Session program.
# Default is "/usr/local/bin:/usr/bin:/bin:/usr/games"
#UserPath=
# The PATH for Setup, Startup and Reset, etc.
# Default is "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
#SystemPath=
# The default system shell.
# Default is "/bin/sh"
#SystemShell=/bin/bash
# Where to put the user's X-server authorization file if ~/.Xauthority
# cannot be created.
# Default is "/tmp"
#UserAuthDir=
# If true, UserAuthDir will be used unconditionally.
# Default is false
#ForceUserAuthDir=true
# Whether to automatically restart sessions after X-server crashes.
# Note that enabling this makes circumventing screen lockers other than
# KDE's built-in one possible!
# Default is false
#AutoReLogin=true
# Allow root logins?
# Default is true
AllowRootLogin=false
# Allow to log in, when user has set an empty password?
# Default is true
AllowNullPasswd=false
# Who is allowed to shut down the system. This applies both to the
# greeter and to the command sockets.
# "None" - no "Shutdown..." menu entry is shown at all
# "Root" - the root password must be entered to shut down
# "All" - everybody can shut down the machine
# Default is All
AllowShutdown=Root
# Who is allowed to abort active sessions when shutting down.
# "None" - no forced shutdown is allowed at all
# "Root" - the root password must be entered to shut down forcibly
# "All" - everybody can shut down the machine forcibly
# Default is All
#AllowSdForceNow=Root
# The default choice for the shutdown condition/timing.
# "Schedule" - shut down after all active sessions exit (possibly at once)
# "TryNow" - shut down, if no active sessions are open; otherwise, do nothing
# "ForceNow" - shut down unconditionally
# Default is Schedule
#DefaultSdMode=ForceNow
# How to offer shutdown scheduling options:
# "Never" - not at all
# "Optional" - as a button in the simple shutdown dialogs
# "Always" - instead of the simple shutdown dialogs
# Default is Never
#ScheduledSd=Optional
# The directories containing session type definitions in .desktop format,
# ordered by falling priority.
# Default is "/usr/share/apps/kdm/sessions"
#SessionsDirs=/usr/share/config/kdm/sessions,/usr/share/apps/kdm/sessions
SessionsDirs=/usr/share/xsessions
# The file (relative to $HOME) to redirect the session output to. The
# following character pairs are replaced:
# - %d -> current display
# - %u -> current user
# - %r -> empty at first. See below.
# - %% -> a single %
# When the constructed filename cannot be used safely and the specification
# contains %<stuff>r, other names will be tried - this time expanding %<stuff>r
# to <stuff> followed by a random number.
# Default is ".xsession-errors"
ClientLogFile=.xsession-errors-%d
# Fallback when ClientLogFile cannot be used. The same expansions are
# supported. DO NOT use relative paths here.
# Default is "/tmp/xerr-%u-%d%-r"
#ClientLogFallback=/var/log/xsession-errors/%u-%d%-r
# Whether KDM's built-in utmp/wtmp/lastlog registration should be used.
# Default is true
#UseSessReg=false
# Greeter config for all displays
[X-*-Greeter]
# Specify the widget style for the greeter. Empty means to use the
# built-in default which currently is "Oxygen-air".
# Default is ""
#GUIStyle=Plastique
# Specify the widget color scheme for the greeter. Empty means to use the
# built-in default which currently is "Oxygen-air".
# Default is ""
#ColorScheme=MidnightMeadow
# What should be shown in the greeter's logo are:
# "None" - nothing
# "Logo" - the image specified by LogoPixmap
# "Clock" - a neat analog clock
# Default is Clock
LogoArea=Logo
# The image to show when LogoArea=Logo.
# Default is ""
LogoPixmap=/usr/share/apps/kdm/pics/kdelogo.png
# The relative coordinates (X,Y in percent) of the center of the greeter.
# Default is "50,50"
#GreeterPos=30,40
# The screen the greeter should be displayed on in multi-headed and Xinerama
# setups. The numbering starts with 0. For Xinerama, it corresponds to the
# listing order in the active ServerLayout section of XF86Config; -1 means
# to use the upper-left screen, -2 means to use the upper-right screen.
# Default is 0
#GreeterScreen=-1
# The headline in the greeter. The following character pairs are replaced:
# - %d -> current display
# - %h -> host name, possibly with domain name
# - %n -> node name, most probably the host name without domain name
# - %s -> the operating system
# - %r -> the operating system's version
# - %m -> the machine (hardware) type
# - %% -> a single %
# Default is "Welcome to %s at %n"
#GreetString=K Desktop Environment (%n)
# Whether the fonts used in the greeter should be antialiased.
# Default is false
#AntiAliasing=true
# The font for the greeter headline.
# Default is "Serif,20,bold"
#GreetFont=Serif,20,5,0,50,0
# The normal font used in the greeter.
# Default is "Sans Serif,10"
#StdFont=Sans Serif,10,5,0,50,0
# The font used for the "Login Failed" message.
# Default is "Sans Serif,10,bold"
#FailFont=Sans Serif,10,5,0,75,0
# What to do with the Num Lock modifier for the time the greeter is running:
# "Off" - turn off
# "On" - turn on
# "Keep" - do not change the state
# Default is Keep
#NumLock=Off
# Language and locale to use in the greeter, encoded like $LANGUAGE.
# If empty, the settings from the environment are used.
# Default is ""
#Language=de_DE
# Enable autocompletion in the username line edit.
# Default is false
#UserCompletion=true
# Enable user list (names along with images) in the greeter.
# Default is true
#UserList=false
# User selection for UserCompletion and UserList:
# "NotHidden" - all users except those listed in HiddenUsers
# "Selected" - only the users listed in SelectedUsers
# Default is NotHidden
#ShowUsers=Selected
# For ShowUsers=Selected. @<group> means all users in that group.
# Default is ""
#SelectedUsers=root,johndoe
# For ShowUsers=NotHidden. @<group> means all users in that group.
# Default is ""
#HiddenUsers=root
# Special case of HiddenUsers: users with a non-zero UID less than this number
# will not be shown as well.
# Default is 0
MinShowUID=1000
# Complement to MinShowUID: users with a UID greater than this number will
# not be shown as well.
# Default is 65535
MaxShowUID=65000
# If false, the users are listed in the order they appear in /etc/passwd.
# If true, they are sorted alphabetically.
# Default is true
#SortUsers=false
# Specify, where the users' pictures should be taken from.
# "AdminOnly" - from <FaceDir>/$USER.face[.icon]
# "PreferAdmin" - prefer <FaceDir>, fallback on $HOME
# "PreferUser" - ... and the other way round
# "UserOnly" - from the user's $HOME/.face[.icon]
# Default is AdminOnly
#FaceSource=PreferUser
# The directory containing the user images if FaceSource is not UserOnly.
# Default is "/usr/share/apps/kdm/faces"
##FaceDir=/usr/share/faces
FaceDir=/var/lib/kdm-4.4/faces
# Specify, if/which user should be preselected for log in.
# "None" - do not preselect any user
# "Previous" - the user which successfully logged in last time
# "Default" - the user specified in the DefaultUser option
# Default is None
#PreselectUser=Previous
# If this is true, the password input line is focused automatically if
# a user is preselected.
# Default is false
#FocusPasswd=true
# If this is true, the entered password is echoed as bullets. Otherwise,
# no feedback is given at all.
# Default is true
#EchoPasswd=false
# If true, krootimage will be automatically started by KDM; otherwise, the
# Setup script should be used to setup the background.
# Default is true
#UseBackground=false
# The configuration file to be used by krootimage.
# Default is "/usr/share/config/kdm/backgroundrc"
#BackgroundCfg=
# Whether to grab keyboard and mouse while the greeter is visible. Grabs
# may improve security, but make on-screen keyboards, etc. unusable.
# "Never" - never grab
# "IfNoAuth" - grab if the display requires no X authorization
# "Always" - always grab
# Default is IfNoAuth
#GrabInput=Always
# Hold the X-server grabbed the whole time the greeter is visible. This
# may be more secure, but it will disable any background and other
# X-clients started from the Setup script.
# Default is false
#GrabServer=true
# How many seconds to wait for grab to succeed.
# Default is 3
#GrabTimeout=3
# Warn, if display has no X-authorization (local auth cannot be created,
# XDMCP display wants no auth, or display is foreign from StaticServers).
# Default is true
#AuthComplain=false
# Random seed for forging saved session types, etc. of unknown users.
# This value should be random but constant across the login domain.
# Default is 0
ForgingSeed=1277780988
# Specify conversation plugins for the login dialog. Each plugin can be
# specified as a base name (which expands to $kde_modulesdir/kgreet_$base)
# or as a full pathname.
# Default is "classic"
#PluginsLogin=sign
# Same as PluginsLogin, but for the shutdown dialog.
# Default is "classic"
#PluginsShutdown=modern
# A list of options of the form Key=Value. The conversation plugins can query
# these settings; it is up to them what possible keys are.
# Default is ""
#PluginOptions=SomeKey=randomvalue,Foo=bar
# Show the "Console Login" action in the greeter (if ServerTTY/ConsoleTTYs
# is configured).
# Default is true
#AllowConsole=false
# A program to run while the greeter is visible. It is supposed to preload
# as much as possible of the session that is going to be started (most
# probably).
# Default is ""
Preloader=/usr/bin/preloadkde
# Whether the greeter should be themed.
# Default is false
UseTheme=true
# The theme to use for the greeter. Can point to either a directory or an XML
# file.
# Default is ""
Theme=/usr/share/apps/kdm/themes/oxygen-air
# Core config for local displays
[X-:*-Core]
# How often to try to run the X-server. Running includes executing it and
# waiting for it to come up.
# Default is 1
#ServerAttempts=1
# How long to wait for a local X-server to come up.
# Default is 15
ServerTimeout=30
# The command line to start the X-server, without display number and VT spec.
# This string is subject to word splitting.
# Default is "/usr/bin/X"
ServerCmd=/usr/bin/X
# Additional arguments for the X-servers for local sessions.
# This string is subject to word splitting.
# Default is ""
ServerArgsLocal=-nolisten tcp
# Additional arguments for the X-servers for remote sessions.
# This string is subject to word splitting.
# Default is ""
#ServerArgsRemote=
# Restart instead of resetting the local X-server after session exit.
# Use it if the server leaks memory etc.
# Default is false
TerminateServer=true
# The signal needed to reset the local X-server.
# Default is 1 (SIGHUP)
#ResetSignal=1
# The signal needed to terminate the local X-server.
# Default is 15 (SIGTERM)
#TermSignal=15
# Create X-authorizations for local displays.
# Default is true
#Authorize=false
# Which X-authorization mechanisms should be used.
# Default is "MIT-MAGIC-COOKIE-1"
#AuthNames=
# Need to reset the X-server to make it read initial Xauth file.
# Default is false
#ResetForAuth=true
# See above
AllowNullPasswd=true
# See above
AllowShutdown=All
# Enable password-less logins on this display. USE WITH EXTREME CARE!
# Default is false
#NoPassEnable=true
# The users that do not need to provide a password to log in. NEVER list root!
# "*" means all non-root users. @<group> means all users in that group.
# Default is ""
#NoPassUsers=fred,ethel
# Greeter config for local displays
[X-:*-Greeter]
# See above
PreselectUser=Previous
# See above
FocusPasswd=true
# Specify whether the greeter of local displays should start up in host chooser
# (remote) or login (local) mode and whether it is allowed to switch to the
# other mode.
# "LocalOnly" - only local login possible
# "DefaultLocal" - start up in local mode, but allow switching to remote mode
# "DefaultRemote" - ... and the other way round
# "RemoteOnly" - only choice of remote host possible
# Default is LocalOnly
LoginMode=DefaultLocal
# A list of hosts to be automatically added to the remote login menu. The
# special name "*" means broadcast.
# Default is "*"
#ChooserHosts=*,ugly,sky,dino,kiste.local,login.crap.com
# Show the "Restart X Server"/"Close Connection" action in the greeter.
# Default is true
AllowClose=false
# Core config for 1st local display
[X-:0-Core]
# The VT the X-server should run on; auto-assign if zero, don't assign if -1.
# Better leave it zero and use ServerVTs.
# Default is 0
#ServerVT=7
# Enable automatic login. USE WITH EXTREME CARE!
# Default is false
#AutoLoginEnable=true
# If true, auto-login after logout. If false, auto-login is performed only
# when a display session starts up.
# Default is false
#AutoLoginAgain=true
# The delay in seconds before automatic login kicks in.
# Default is 0
#AutoLoginDelay=10
# The user to log in automatically. NEVER specify root!
# Default is ""
#AutoLoginUser=fred
# The password for the user to log in automatically. This is NOT required
# unless the user is logged into a NIS or Kerberos domain. If you use this
# option, you should "chmod 600 kdmrc" for obvious reasons.
# Default is ""
#AutoLoginPass=secret!
# Immediately lock the automatically started session. This works only with
# KDE sessions.
# Default is false
#AutoLoginLocked=true
# See above
ClientLogFile=.xsession-errors
# Greeter config for 1st local display
[X-:0-Greeter]
# See above
#PreselectUser=Default
# The user to preselect if PreselectUser=Default.
# Default is ""
#DefaultUser=johndoe

View File

@ -1,10 +0,0 @@
[Misc]
LastConfiguredApp=Accessibility
[Phonon::AudioOutput]
KNotify_Volume=1
[Sounds]
No sound=true
Use external player=false
Volume=100

View File

@ -1,9 +0,0 @@
local_start() {
/usr/bin/kdm -daemon
return 0
}
local_stop() {
pkill kdm
return 0
}

View File

@ -1,2 +0,0 @@
# Build error: bug #346491
=media-libs/libgphoto2-2.4.10

View File

@ -1,22 +0,0 @@
app-editors/nano ncurses
dev-lang/python ssl threads xml
sys-kernel/gentoo-sources symlink
# per kde
app-misc/strigi dbus qt4
app-text/poppler utils
dev-libs/libxml2 python
dev-libs/xmlrpc-c curl
media-libs/xine-lib xcb
media-sound/phonon xcb xine
net-misc/curl ssl
sys-apps/dbus X
x11-libs/cairo X svg
x11-libs/qt-core exceptions qt3support ssl
x11-libs/qt-gui accessibility dbus mng
x11-libs/qt-qt3support accessibility kde
x11-libs/qt-sql qt3support mysql
x11-libs/qt-webkit kde
# KDE 4.5
>=dev-libs/soprano-2.4.64 raptor redland

View File

@ -1,6 +0,0 @@
app-admin/syslog-ng
kde-base/kde-meta
kde-base/kdebase-runtime-meta
media-fonts/dejavu
media-fonts/freefont-ttf
net-misc/dhcpcd

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +0,0 @@
Listen 80
WSGIPythonHome /home/lodgeit/lodgeitproject
<VirtualHost *>
Servername localhost
DocumentRoot /home/lodgeit/lodgeitproject/
WSGIDaemonProcess lodgeit user=lodgeit group=lodgeit processes=1 threads=5
WSGIScriptAlias / /home/lodgeit/lodgeitproject/lodgeit/lodgeit.wsgi
<Location "/">
WSGIProcessGroup lodgeit
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Location>
</VirtualHost>

View File

@ -1,28 +0,0 @@
# set up apache modules in make.conf
POST_FILES = lodgeit.sh 10_lodgeit.conf apache2.conf genkey.py lodgeit.wsgi
POST_FILES += issue
preinstall: make.conf.extra
cat make.conf.extra >> $(CHROOT)/etc/make.conf
postinstall: $(POST_FILES)
chroot $(CHROOT) $(EMERGE) -1n $(USEPKG) dev-vcs/mercurial
chroot $(CHROOT) $(EMERGE) -1n $(USEPKG) dev-python/virtualenv
chroot $(CHROOT) getent group lodgeit || chroot $(CHROOT) groupadd lodgeit
chroot $(CHROOT) getent passwd lodgeit || \
chroot $(CHROOT) useradd -c "Lodgeit Pastebin" -m -g lodgeit lodgeit
cp lodgeit.sh $(CHROOT)/tmp
chroot $(CHROOT) su -c /tmp/lodgeit.sh lodgeit
cp 10_lodgeit.conf $(CHROOT)/etc/apache2/vhosts.d
cp apache2.conf $(CHROOT)/etc/conf.d/apache2
python genkey.py $(CHROOT)
cp lodgeit.wsgi $(CHROOT)/home/lodgeit/lodgeitproject/lodgeit
cp issue $(CHROOT)/etc/issue
chroot $(CHROOT) rc-update add apache2 default
chroot $(CHROOT) $(EMERGE) -C dev-vcs/mercurial
chroot $(CHROOT) $(EMERGE) -C dev-python/virtualenv
chroot $(CHROOT) $(EMERGE) --depclean --with-bdeps=n
clean:

View File

@ -1,3 +0,0 @@
Lodgeit is a pastebin service written in the Python programming language
See http://dev.pocoo.org/projects/lodgeit/

View File

@ -1,73 +0,0 @@
# /etc/conf.d/apache2: config file for /etc/init.d/apache2
# When you install a module it is easy to activate or deactivate the modules
# and other features of apache using the APACHE2_OPTS line. Every module should
# install a configuration in /etc/apache2/modules.d. In that file will have an
# <IfDefine NNN> directive where NNN is the option to enable that module.
#
# Here are the options available in the default configuration:
#
# AUTH_DIGEST Enables mod_auth_digest
# AUTHNZ_LDAP Enables authentication through mod_ldap (available if USE=ldap)
# CACHE Enables mod_cache
# DAV Enables mod_dav
# ERRORDOCS Enables default error documents for many languages.
# INFO Enables mod_info, a useful module for debugging
# LANGUAGE Enables content-negotiation based on language and charset.
# LDAP Enables mod_ldap (available if USE=ldap)
# MANUAL Enables /manual/ to be the apache manual (available if USE=docs)
# MEM_CACHE Enables default configuration mod_mem_cache
# PROXY Enables mod_proxy
# SSL Enables SSL (available if USE=ssl)
# SUEXEC Enables running CGI scripts (in USERDIR) through suexec.
# USERDIR Enables /~username mapping to /home/username/public_html
#
#
# The following two options provide the default virtual host for the HTTP and
# HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache
# will not listen for incomming connections on the approriate port.
#
# DEFAULT_VHOST Enables name-based virtual hosts, with the default
# virtual host being in /var/www/localhost/htdocs
# SSL_DEFAULT_VHOST Enables default vhost for SSL (you should enable this
# when you enable SSL)
#
APACHE2_OPTS="-D INFO -D WSGI"
# Extended options for advanced uses of Apache ONLY
# You don't need to edit these unless you are doing crazy Apache stuff
# As not having them set correctly, or feeding in an incorrect configuration
# via them will result in Apache failing to start
# YOU HAVE BEEN WARNED.
# PID file
#PIDFILE=/var/run/apache2.pid
# timeout for startup/shutdown checks
#TIMEOUT=10
# ServerRoot setting
#SERVERROOT=/usr/lib64/apache2
# Configuration file location
# - If this does NOT start with a '/', then it is treated relative to
# $SERVERROOT by Apache
#CONFIGFILE=/etc/apache2/httpd.conf
# Location to log startup errors to
# They are normally dumped to your terminal.
#STARTUPERRORLOG="/var/log/apache2/startuperror.log"
# A command that outputs a formatted text version of the HTML at the URL
# of the command line. Designed for lynx, however other programs may work.
#LYNX="lynx -dump"
# The URL to your server's mod_status status page.
# Required for status and fullstatus
#STATUSURL="http://localhost/server-status"
# Method to use when reloading the server
# Valid options are 'restart' and 'graceful'
# See http://httpd.apache.org/docs/2.2/stopping.html for information on
# what they do and how they differ.
#RELOAD_TYPE="graceful"

View File

@ -1,36 +0,0 @@
app-editors/nano
net-misc/openssh
net-misc/rsync
net-misc/wget
sys-kernel/gentoo-sources
sys-kernel/linux-headers
sys-devel/gcc
sys-devel/automake
sys-devel/bison
sys-devel/make
sys-devel/flex
sys-devel/automake-wrapper
sys-devel/autoconf-wrapper
sys-devel/autoconf
sys-devel/m4
sys-devel/gcc-config
sys-devel/libtool
sys-devel/binutils
sys-devel/binutils-config
sys-devel/patch
sys-devel/gnuconfig
app-admin/python-updater
app-admin/perl-cleaner
sys-apps/man-pages
sys-apps/man
sys-apps/file
sys-apps/less
sys-apps/texinfo
sys-apps/busybox
sys-apps/debianutils
sys-apps/man-pages-posix
sys-apps/sandbox
sys-apps/which
dev-lang/perl
sys-devel/libperl
sys-apps/portage

View File

@ -1,11 +0,0 @@
#!/usr/bin/python
import os
import sys
AC_FILENAME = "%s/home/lodgeit/lodgeitproject/lodgeit/app_config.py" % sys.argv[1]
key=repr(os.urandom(30))
app_config=open(AC_FILENAME, 'w')
app_config.write('key=%s\n' % repr(key))
app_config.close()

View File

@ -1,6 +0,0 @@

------------------------------------------------------------------------------
LODGEIT CONSOLE
------------------------------------------------------------------------------

View File

@ -1,17 +0,0 @@
#!/bin/sh
set -v
cd ~/
virtualenv --no-site-packages lodgeitproject
cd lodgeitproject
source bin/activate
[ -d lodgeit ] || hg clone http://dev.pocoo.org/hg/lodgeit-main lodgeit
pip install pygments
pip install jinja2
pip install werkzeug
pip install sqlalchemy
pip install babel
pip install pil
pip install simplejson
deactivate

View File

@ -1,12 +0,0 @@
import sys
from os.path import dirname
app_dir = dirname(__file__)
sys.path.insert(0, app_dir)
from lodgeit import make_app
from app_config import key
application = make_app(
dburi='sqlite:///%s/lodgeit.db' % app_dir,
secret_key=key
)

View File

@ -1,4 +0,0 @@
# Apache config for LodgeIt
APACHE2_MPMS="prefork"
APACHE2_MODULES="authz_host dir mime"

View File

@ -1,3 +0,0 @@
app-editors/nano ncurses
dev-lang/python sqlite ssl threads xml
sys-kernel/gentoo-sources symlink

View File

@ -1,5 +0,0 @@
app-admin/syslog-ng
net-misc/dhcpcd
sys-boot/grub
sys-kernel/gentoo-sources
www-apache/mod_wsgi

View File

@ -1,12 +0,0 @@
CFLAGS="-Os -pipe"
CXXFLAGS="-Os -pipe"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j2"
USE="-* nptl pam unicode"
ALSA_PCM_PLUGINS="*"
CLEAN_DELAY="0"
EMERGE_WARNING_DELAY="0"
AUTO_CLEAN="yes"
EPAUSE_IGNORE="1"
EMERGE_DEFAULT_OPTS="--jobs=2"
FEATURES="noinfo -test nodoc noman unmerge-orphans buildpkg parallel-fetch"

View File

@ -1,4 +0,0 @@
usr/lib/python*/test
usr/share/gtk-doc
var/db/pkg
usr/lib/perl*

23
scripts/COPY Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env python3
"""Copy files from source to target in the chroot"""
import os
import subprocess
import sys
def main():
chroot = os.environ["CHROOT"]
target = sys.argv[-1]
chroot_target = os.path.join(chroot, target.lstrip("/"))
chroot_target_dir = os.path.dirname(chroot_target)
if not os.path.exists(chroot_target_dir):
os.makedirs(chroot_target_dir)
command = ["cp"] + sys.argv[1:-1] + [chroot_target]
sys.exit(subprocess.call(command))
if __name__ == "__main__":
main()

54
scripts/RUN Executable file
View File

@ -0,0 +1,54 @@
#!/usr/bin/env python3
import os
import subprocess
import sys
def main():
environ = os.environ
repobind = []
repodir = environ['REPO_DIR']
repos = str.split(environ['REPO_NAMES'])
for repo in repos:
repobind.append(f"--bind={repodir}/{repo}:/var/db/repos/{repo}")
kernelbind = []
kernelpathfile=environ['KERNEL_PATH']
try:
with open(kernelpathfile, 'rb') as f:
kernelpath = f.read().decode("utf-8")
except OSError:
kernelpath = "NONE"
if kernelpath != "NONE":
if not os.path.exists(kernelpath):
os.makedirs(kernelpath)
##kernelbind.append(f"--bind={kernelpath}:/usr/src/{os.path.basename(os.path.dirname(kernelpath))}")
kernelbind.append(f"--bind={kernelpath}:/usr/src/linux")
loopbind = []
if os.path.exists('partitions'):
with open('partitions') as f:
loopdevice = f.readline().strip('\n')
loopbind.append(f"--bind={loopdevice}")
loopbind.append(f"--bind={loopdevice}p1")
command = [
"systemd-nspawn",
"--quiet",
f"--directory={environ['CHROOT']}",
f"--machine={environ['container']}",
f"--capability=CAP_NET_ADMIN,CAP_SYS_RAWIO",
f"--bind={environ['PORTAGE_DIR']}:/var/db/repos/gentoo",
f"--bind={environ['VA_PKGDIR']}:/var/cache/binpkgs",
f"--bind={environ['DISTDIR']}:/var/cache/distfiles",
] + repobind + kernelbind + loopbind + sys.argv[1:]
if os.environ.get("VA_ARCH") == "linux32":
command = ["linux32"] + command
sys.exit(subprocess.call(command))
if __name__ == "__main__":
main()

132
scripts/build-kernel Executable file
View File

@ -0,0 +1,132 @@
#!/usr/bin/env python3
"""Build the latest kernel but only if need be"""
import os
import shutil
import subprocess
EMERGE = os.environ["EMERGE"].split()
USEPKG = os.environ["USEPKG"].split()
def get_latest_available_kernel():
kernel = os.environ["KERNEL"]
package_name = "sys-kernel/{}".format(kernel)
popen = subprocess.Popen(
["portageq", "best_visible", "/", package_name], stdout=subprocess.PIPE
)
cpv = popen.stdout.read().decode().strip()
return cpv.rpartition("-")[2]
def get_current_kernel():
"""what kernel does /boot/vmlinuz point to"""
vmlinuz = "/boot/vmlinuz"
if not os.path.islink(vmlinuz):
return None
filename = os.path.basename(os.path.realpath(vmlinuz))
assert filename.startswith("vmlinuz")
part_after_vmlinuz = filename[8:]
# may have "-gentoo" or whatever in the name
version = part_after_vmlinuz.rpartition("-")[0]
return version
def install_kernel_package_deps():
kernel = os.environ["KERNEL"]
package_name = "sys-kernel/{}".format(kernel)
cmd = EMERGE + USEPKG + ["--onlydeps", "--oneshot", "--noreplace", package_name]
subprocess.check_call(cmd)
def copy_kernel_config():
filename = "/root/kernel.config"
shutil.copy(filename, "/usr/src/linux/.config")
def build_kernel():
makeopts = os.environ.get("MAKEOPTS", "")
subprocess.check_call(
["make", "-C", "/usr/src/linux", "MAKEOPTS=" + makeopts, "oldconfig"]
)
subprocess.check_call(["make", "-C", "/usr/src/linux", "MAKEOPTS=" + makeopts])
def remove_old_kernels():
kernel_files = ["vmlinuz-", "System.map-", "config-"]
for filename in os.listdir("/boot"):
for kernel_file in kernel_files:
if filename.startswith(kernel_file):
path = os.path.join("/boot", filename)
os.unlink(path)
if os.path.exists("/boot/vmlinuz"):
os.unlink("/boot/vmlinuz")
##shutil.rmtree("/lib/modules", ignore_errors=True)
def install_kernel():
makeopts = os.environ.get("MAKEOPTS", "")
modules_install = False
for line in open("/usr/src/linux/.config"):
if "CONFIG_MODULES=y" in line:
modules_install = True
break
if modules_install:
subprocess.check_call([
'make', '-C', '/usr/src/linux', 'MAKEOPTS=' + makeopts, 'install',
'modules_install'
])
else:
subprocess.check_call([
'make', '-C', '/usr/src/linux', 'MAKEOPTS=' + makeopts, 'install'
])
# create the symlink. /sbin/installkernel claims this is not used on
# "modern" distributions and doesn't create it (unless it already
# exists). I still do this however.
for filename in os.listdir("/boot"):
if filename.startswith("vmlinuz-"):
if os.path.lexists("/boot/vmlinuz"):
os.unlink("/boot/vmlinuz")
os.symlink(filename, "/boot/vmlinuz")
break
def uninstall_kernel_package_deps():
subprocess.check_call(EMERGE + USEPKG + ["--depclean", "--with-bdeps=n"])
def backup_kernel_config():
shutil.copy("/usr/src/linux/.config", "/root/kernel.config")
def main():
latest_kernel = get_latest_available_kernel()
current_kernel = get_current_kernel()
if current_kernel == latest_kernel:
return
install_kernel_package_deps()
##copy_kernel_config()
build_kernel()
remove_old_kernels()
install_kernel()
backup_kernel_config()
uninstall_kernel_package_deps()
main()

137
scripts/fetch-stage3 Executable file
View File

@ -0,0 +1,137 @@
#!/usr/bin/env python3
"""fetch a stage3 from Gentoo's mirror"""
import argparse
import urllib.request
import os
import re
import sys
import gnupg
from collections import namedtuple
MIRROR = 'http://gentoo.osuosl.org/'
Stage3 = namedtuple('Stage3', 'url cpu specialty minimal nomultilib systemd mergedusr size')
MINIMAL = re.compile(r'[\+-]minimal-')
NOMULTILIB = re.compile(r'[\+-]nomultilib-')
SYSTEMD = re.compile(r'[\+-]systemd-')
MERGEDUSR = re.compile(r'[\+-]mergedusr-')
def parse_args():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--cpu', type=str, default=None)
parser.add_argument('--specialty', type=str, default=None)
parser.add_argument('--no-multilib', action='store_true', default=False)
parser.add_argument('--systemd', action='store_true', default=False)
parser.add_argument('--minimal', action='store_true', default=False)
parser.add_argument('--mergedusr', action='store_true', default=False)
parser.add_argument('--outfile', type=str, default=None)
parser.add_argument('arch', type=str)
return parser.parse_args()
def get_manifest(arch, mirror=MIRROR):
manifest = []
url = mirror + '/releases/{0}/autobuilds/latest-stage3.txt'.format(arch)
base_url = mirror + '/releases/{0}/autobuilds/'.format(arch)
gpg = gnupg.GPG(gnupghome="/home/user/.gnupg")
with urllib.request.urlopen(url) as fp:
text = gpg.verify_file(fp, extra_args=['-o', '-']).data
##text = fp.read()
text = text.decode('ascii')
for line in text.split('\n'):
line = line.strip()
if not line or line[0] == '#':
continue
filename, size = line.split()
size = int(size)
dirname, rest = filename.split('/', 1)
if '/' in rest:
specialty, rest = rest.split('/', 1)
else:
specialty = None
cpu = rest.split('-', 2)[1]
nomultilib = 'nomultilib-' in rest
nomultilib = bool(NOMULTILIB.search(rest))
systemd = 'systemd-' in rest
systemd = bool(SYSTEMD.search(rest))
mergedusr = 'mergedusr-' in rest
mergedusr = bool(MERGEDUSR.search(rest))
minimal = bool(MINIMAL.search(rest))
stage3 = Stage3(
cpu=cpu,
mergedusr=mergedusr,
minimal=minimal,
nomultilib=nomultilib,
systemd=systemd,
size=size,
specialty=specialty,
url=base_url + filename,
)
manifest.append(stage3)
return manifest
def fetch(url, outfile):
"""fetch url and write it to outfile"""
with urllib.request.urlopen(url) as infile, open(outfile, 'wb') as outfile:
while True:
data = infile.read(512)
if not data:
break
outfile.write(data)
def main():
args = parse_args()
manifest = get_manifest(args.arch)
manifest.reverse()
stage3 = None
for item in manifest:
if not args.cpu and item.cpu != args.arch:
continue
if args.cpu and item.cpu != args.cpu:
continue
if not all([
args.minimal == item.minimal,
args.mergedusr == item.mergedusr,
args.no_multilib == item.nomultilib,
args.systemd == item.systemd,
args.specialty == item.specialty,
]):
continue
stage3 = item
break
if not stage3:
msg = 'No stage3 found matching your criteria\n'
sys.stderr.write(msg)
sys.exit(404)
filename = os.path.basename(stage3.url)
if args.outfile:
outfile = args.outfile
else:
outfile = filename
print(filename)
fetch(stage3.url, outfile)
stat = os.stat(outfile)
assert stat.st_size == stage3.size, 'File size does not match manifest'
main()

View File

@ -0,0 +1,4 @@
1iserial --speed=9600 --unit=0 --word=8 --parity=no --stop=1\
1iterminal_input serial\
1iterminal_output serial\
s/^\([ \t]*linux .*\)$/\1 console=tty0 console=ttyS0,38400n8/

41
scripts/motd.sh Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
# Script for creating the motd on a virtual appliance image
EXTERNAL_KERNEL=$1
VIRTIO=$2
DISK_SIZE=$3
SWAP_SIZE=$4
DASH=$5
ARCH=$6
TZ=$TIMEZONE ; export TZ
cat << EOF
Welcome to ${HOSTNAME}!
This system created by Gentoo Virtual Appliance:
https://bitbucket.org/marduk/virtual-appliance/
The system image was built on `date +"%Y-%m-%d %H:%M %Z"` based on the "${APPLIANCE}"
appliance. It was built with the following features:
EOF
cat << EOF | column -c80
APPLIANCE: ${APPLIANCE}
ARCH: ${ARCH}
HOSTNAME: ${HOSTNAME}
HEADLESS: ${HEADLESS}
EXTERNAL_KERNEL: ${EXTERNAL_KERNEL}
VIRTIO: ${VIRTIO}
DISK_SIZE: ${DISK_SIZE}
SWAP_SIZE: ${SWAP_SIZE}M
DASH: ${DASH}
EOF
if [ -x "${APPLIANCE}/motd.sh" ]
then
"${APPLIANCE}/motd.sh" $@
fi
echo

21
scripts/print Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env python3
import sys
TTY = sys.stdout.isatty()
write = sys.stdout.write
write('\n')
if TTY:
write('\x1b[') # escape, left-bracket
write('1;31m') # bold red
write(' '.join(sys.argv[1:]))
if TTY:
write('\x1b[') # escape, left-bracket
write('0m') # reset
write('\n')

View File

@ -1,49 +0,0 @@
HG_REPO = ../../teamplayer
TP_USER = teamplayer
TP_HOME = /opt/teamplayer
TP_DB = /var/lib/teamplayer
PGVER = 9.0
INSTALL = install
M4_DEFS += -D TP_USER=$(TP_USER) -D TP_HOME=$(TP_HOME) -D TP_DB=$(TP_DB)
M4C = $(M4) $(M4_DEFS)
post_files = bash_profile settings_local.py start-teamplayer stop-teamplayer
post_files += local.start local.stop issue lighttpd.conf
preinstall:
postinstall: $(post_files)
chroot $(CHROOT) $(EMERGE) -n $(USEPKG) =dev-db/postgresql-server-$(PGVER)*
chroot $(CHROOT) passwd -d postgres
echo 'PG_INITDB_OPTS="--locale=en_US.UTF-8"' >> $(CHROOT)/etc/conf.d/postgresql-$(PGVER)
yes | chroot $(CHROOT) $(EMERGE) --config =postgresql-server-$(PGVER)*
chroot $(CHROOT) rc-update add postgresql-$(PGVER) default
chroot $(CHROOT) getent passwd $(TP_USER) || \
chroot $(CHROOT) useradd -c "Teamplayer Server" -G postgres -U -d $(TP_HOME) $(TP_USER)
rm -rf $(CHROOT)/$(TP_HOME)
hg clone --pull $(HG_REPO) $(CHROOT)/$(TP_HOME)
cp bash_profile $(CHROOT)$(TP_HOME)/.bash_profile
chroot $(CHROOT) mkdir -p /etc/teamplayer
$(M4C) settings_local.py > $(CHROOT)/etc/teamplayer/settings_local.py
mkdir -p $(CHROOT)$(TP_HOME)/bin
$(M4C) start-teamplayer > $(CHROOT)$(TP_HOME)/bin/start-teamplayer
chmod +x $(CHROOT)$(TP_HOME)/bin/start-teamplayer
$(M4C) stop-teamplayer > $(CHROOT)$(TP_HOME)/bin/stop-teamplayer
chmod +x $(CHROOT)$(TP_HOME)/bin/stop-teamplayer
chroot $(CHROOT) $(INSTALL) -d -o $(TP_USER) -g $(TP_USER) $(TP_DB)
chroot $(CHROOT) $(INSTALL) -d -o $(TP_USER) -g $(TP_USER) $(TP_DB)/songs
chroot $(CHROOT) rm -rf $(TP_HOME)/web/media/songs
chroot $(CHROOT) ln -s $(TP_DB)/songs $(TP_HOME)/web/media/songs
chroot $(CHROOT) $(INSTALL) -d -o $(TP_USER) -g $(TP_USER) $(TP_DB)/mpd
chroot $(CHROOT) $(INSTALL) -d -o $(TP_USER) -g $(TP_USER) /var/log/teamplayer
$(M4C) local.start > $(CHROOT)/etc/conf.d/local.start
$(M4C) local.stop > $(CHROOT)/etc/conf.d/local.stop
cp issue $(CHROOT)/etc/issue
$(M4C) lighttpd.conf > $(CHROOT)/etc/lighttpd/lighttpd.conf
chroot $(CHROOT) gpasswd -a lighttpd teamplayer
chroot $(CHROOT) rc-update add lighttpd default
chroot $(CHROOT) rc-update add ntpd default
clean:

View File

@ -1 +0,0 @@
PATH="$HOME/bin:$PATH"

View File

@ -1,36 +0,0 @@
app-editors/nano
net-misc/openssh
net-misc/rsync
net-misc/wget
sys-kernel/gentoo-sources
sys-kernel/linux-headers
sys-devel/gcc
sys-devel/automake
sys-devel/bison
sys-devel/make
sys-devel/flex
sys-devel/automake-wrapper
sys-devel/autoconf-wrapper
sys-devel/autoconf
sys-devel/m4
sys-devel/gcc-config
sys-devel/libtool
sys-devel/binutils
sys-devel/binutils-config
sys-devel/patch
sys-devel/gnuconfig
app-admin/python-updater
app-admin/perl-cleaner
sys-apps/man-pages
sys-apps/man
sys-apps/file
sys-apps/less
sys-apps/texinfo
sys-apps/busybox
sys-apps/debianutils
sys-apps/man-pages-posix
sys-apps/sandbox
sys-apps/which
dev-lang/perl
sys-devel/libperl
sys-apps/portage

View File

@ -1,5 +0,0 @@
------------------------------------------------------------------------------
TEAMPLAYER CONSOLE
------------------------------------------------------------------------------

View File

@ -1,80 +0,0 @@
var.basedir = "/var/www/localhost"
var.logdir = "/var/log/lighttpd"
var.statedir = "/var/lib/lighttpd"
server.modules = (
"mod_rewrite",
# "mod_redirect",
"mod_alias",
"mod_access",
"mod_fastcgi",
# "mod_cml",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
# "mod_webdav",
"mod_accesslog"
)
include "mime-types.conf"
# {{{ server settings
server.username = "lighttpd"
server.groupname = "lighttpd"
server.document-root = var.basedir + "/htdocs"
server.pid-file = "/var/run/lighttpd.pid"
server.errorlog = var.logdir + "/error.log"
# log errors to syslog instead
# server.errorlog-use-syslog = "enable"
server.indexfiles = ("index.php", "index.html",
"index.htm", "default.htm")
# server.tag = "lighttpd"
server.follow-symlink = "enable"
# {{{ mod_accesslog
accesslog.filename = var.logdir + "/access.log"
# }}}
# {{{ mod_dirlisting
# enable directory listings
dir-listing.activate = "disable"
#
url.access-deny = ("~", ".inc")
# begin TeamPlayer config
server.max-request-size = 21000
fastcgi.server = (
"/teamplayer.fcgi" => (
"main" => (
"socket" => "TP_DB/teamplayer.sock",
"check-local" => "disable",
)
),
)
alias.url = (
"/m" => "TP_HOME/web/media/",
)
url.rewrite-once = (
"^(/m.*)$" => "$1",
"^(/.*)$" => "/teamplayer.fcgi$1",
)

View File

@ -1,18 +0,0 @@
#!/bin/sh
if [ ! -f /etc/firstboot ] ; then
echo "Creating TeamPlayer database ..."
createuser -U postgres -D -S -R teamplayer
createdb -U postgres teamplayer
touch /var/log/teamplayer/teamplayer.log
chown TP_USER:TP_USER /var/log/teamplayer/teamplayer.log
fi
su -c "TP_HOME/bin/start-teamplayer" TP_USER
tailf /var/log/teamplayer/teamplayer.log > /dev/tty7 &
# put some ionice on mpd
sleep 3
ionice -c2 -n0 -p$(cat TP_DB/mpd/mpd.pid)
touch /etc/firstboot

View File

@ -1,3 +0,0 @@
#!/bin/sh
su -c "TP_HOME/bin/stop-teamplayer" TP_USER

View File

@ -1,4 +0,0 @@
dev-db/postgresql-base ~amd64
dev-db/postgresql-server ~amd64
dev-python/django ~amd64
dev-python/python-mpd ~amd64

View File

@ -1,9 +0,0 @@
app-editors/nano ncurses
dev-db/sqlite extensions
dev-lang/python sqlite ssl threads xml
dev-python/django postgres
media-libs/flac ogg
media-sound/mpd audiofile ffmpeg flac id3 lame network ogg vorbis mad sqlite
media-video/ffmpeg mmx mxext mp3 network x264
sys-kernel/gentoo-sources symlink
www-servers/lighttpd fastcgi pcre

View File

@ -1,19 +0,0 @@
TIME_ZONE = 'UTC'
DJANGO_STATIC_MEDIA = False
FORCE_SCRIPT_NAME = ''
TEMPLATE_DIRS = (
'TP_HOME/web/teamplayer/templates',
)
TP_STREAM_URL = '/stream.mp3'
`TP_HOME' = 'TP_HOME'
DEBUG = False
TEMPLATE_DEBUG = DEBUG
DATABASE_ENGINE = 'postgresql_psycopg2'
DATABASE_NAME = 'teamplayer'
DATABASE_HOST = ''
DATABASE_PASSWORD = ''
DATABASE_PORT = ''
TP_MPD_HOME = 'TP_DB/mpd'
TP_REPO_URL = '/repo/'

View File

@ -1,23 +0,0 @@
#!/bin/sh
# this should be run as the TP_USER user
PYTHONPATH="/etc/teamplayer:$PYTHONPATH"
export PYTHONPATH
cd ~
hg serve -p 8000 --prefix /repo/ > /var/log/teamplayer/hgserve.log 2>&1 &
cd ~/web
if [ ! -f "/etc/firstboot" ] ; then
python manage.py syncdb
fi
# start the fastcgi daemon
python manage.py runfcgi daemonize=true protocol=fcgi maxrequest=20 \
pidfile="TP_DB/fcgi.pid" socket=TP_DB/teamplayer.sock umask=002 \
> "/var/log/teamplayer/teamplayer.log" 2>&1
# spin!
python manage.py spin --verbosity=2 $@ > "/var/log/teamplayer/teamplayer.log" 2>&1 &
echo $! > "TP_DB/tps.pid"

View File

@ -1,11 +0,0 @@
#!/bin/sh
# this should be run as the TP_USER user
cd ~/web
PYTHONPATH="/etc/teamplayer:$PYTHONPATH"
export PYTHONPATH
[ -f "TP_DB/tps.pid" ] && kill $(cat "TP_DB/tps.pid")
[ -f "TP_DB/fcgi.pid" ] && kill $(cat "TP_DB/fcgi.pid")
python manage.py stop_stream >> "/var/log/teamplayer/teamplayer.log"

View File

@ -1,10 +0,0 @@
dev-python/django
dev-python/flup
dev-python/python-mpd
dev-vcs/mercurial
media-libs/mutagen
media-sound/mpc
media-sound/mpd
net-misc/dhcpcd
net-misc/ntp
www-servers/lighttpd

View File

@ -1,10 +0,0 @@
xdm_files = $(wildcard xdm/*)
preinstall:
postinstall: $(xdm_files)
cp xdm/* "$(CHROOT)"/etc/X11/xdm
chroot "$(CHROOT)" rc-update add xdm default;
clean:

View File

@ -1,36 +0,0 @@
app-editors/nano
net-misc/openssh
net-misc/rsync
net-misc/wget
sys-kernel/gentoo-sources
sys-kernel/linux-headers
sys-devel/gcc
sys-devel/automake
sys-devel/bison
sys-devel/make
sys-devel/flex
sys-devel/automake-wrapper
sys-devel/autoconf-wrapper
sys-devel/autoconf
sys-devel/m4
sys-devel/gcc-config
sys-devel/libtool
sys-devel/binutils
sys-devel/binutils-config
sys-devel/patch
sys-devel/gnuconfig
app-admin/python-updater
app-admin/perl-cleaner
sys-apps/man-pages
sys-apps/man
sys-apps/file
sys-apps/less
sys-apps/texinfo
sys-apps/busybox
sys-apps/debianutils
sys-apps/man-pages-posix
sys-apps/sandbox
sys-apps/which
dev-lang/perl
sys-devel/libperl
sys-apps/portage

View File

@ -1,3 +0,0 @@
dev-lang/python xml
dev-libs/libxml2 python
x11-base/xorg-server xorg

View File

@ -1,8 +0,0 @@
net-misc/dhcpcd
x11-apps/xcalc
x11-apps/xdm
x11-apps/xedit
x11-apps/xeyes
x11-apps/xload
x11-apps/xlogo
x11-base/xorg-x11

View File

@ -1,101 +0,0 @@
# $XdotOrg: Xaccess,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
# $Xorg: Xaccess,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
# $XFree86: xc/programs/xdm/config/Xaccess,v 1.4 2003/07/09 15:27:40 tsi Exp $
#
# Access control file for XDMCP connections
#
# To control Direct and Broadcast access:
#
# pattern
#
# To control Indirect queries:
#
# pattern list of hostnames and/or macros ...
#
# To use the chooser:
#
# pattern CHOOSER BROADCAST
#
# or
#
# pattern CHOOSER list of hostnames and/or macros ...
#
# To define macros:
#
# %name list of hosts ...
#
# To control which addresses xdm listens for requests on:
#
# LISTEN address [list of multicast groups ... ]
#
# The first form tells xdm which displays to respond to itself.
# The second form tells xdm to forward indirect queries from hosts matching
# the specified pattern to the indicated list of hosts.
# The third form tells xdm to handle indirect queries using the chooser;
# the chooser is directed to send its own queries out via the broadcast
# address and display the results on the terminal.
# The fourth form is similar to the third, except instead of using the
# broadcast address, it sends DirectQuerys to each of the hosts in the list
# The fifth form tells xdm which addresses to listen for incoming connections
# on. If present, xdm will only listen for connections on the specified
# interfaces and/or multicast groups.
#
# In all cases, xdm uses the first entry which matches the terminal;
# for IndirectQuery messages only entries with right hand sides can
# match, for Direct and Broadcast Query messages, only entries without
# right hand sides can match.
#
* #any host can get a login window
#
# To hardwire a specific terminal to a specific host, you can
# leave the terminal sending indirect queries to this host, and
# use an entry of the form:
#
#terminal-a host-a
#
# The nicest way to run the chooser is to just ask it to broadcast
# requests to the network - that way new hosts show up automatically.
# Sometimes, however, the chooser can't figure out how to broadcast,
# so this may not work in all environments.
#
#* CHOOSER BROADCAST #any indirect host can get a chooser
#
# If you'd prefer to configure the set of hosts each terminal sees,
# then just uncomment these lines (and comment the CHOOSER line above)
# and edit the %hostlist line as appropriate
#
#%hostlist host-a host-b
#* CHOOSER %hostlist #
#
# If you have a machine with multiple network interfaces or IP addresses
# you can control which interfaces accept XDMCP packets by listing a LISTEN
# line for each interface you want to listen on. You can additionally list
# one or more multicast groups after each address to listen on those groups
# on that address.
#
# If no LISTEN is specified, the default is the same as "LISTEN *" - listen on
# all unicast interfaces, but not for multicast packets. If any LISTEN lines
# are specified, then only the listed interfaces will be listened on.
#
# IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned
# multicast addresses for XDMCP, where X in the prefix may be replaced
# by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local,
# 5 for Site-Local, and so on. The default is equivalent to the example shown
# here using the Link-Local version to most closely match the old IPv4 subnet
# broadcast behavior.
#
# LISTEN * ff02:0:0:0:0:0:0:12b
# This example shows listening for multicast on all scopes up to site-local
#
# LISTEN * ff01:0:0:0:0:0:0:12b ff02:0:0:0:0:0:0:12b ff03:0:0:0:0:0:0:12b ff04:0:0:0:0:0:0:12b ff05:0:0:0:0:0:0:12b

View File

@ -1,13 +0,0 @@
# $Xorg: Xserv.ws.cpp,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
#
# Xservers file, workstation prototype
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line). If you also
# have some X terminals connected which do not support XDMCP,
# you can add them here as well. Each X terminal line should
# look like:
# XTerminalName:0 foreign
#
#:0 local /usr/bin/X :0 vt7

Some files were not shown because too many files have changed in this diff Show More