* Add ACCEPT_KEYWORDS Makefile option

* kde: Works now in ~amd64 also
* gnome: (Hopefully) works now in ~amd64 also
* Add xfce virtual appliance
* Add HEADLESS Makefile option that configures grub.conf and /etc/inittab
  to use serial console
This commit is contained in:
Albert Hopkins 2010-09-18 02:43:14 -04:00
parent 4606d5a997
commit b95132a264
14 changed files with 252 additions and 8 deletions

View File

@ -12,6 +12,8 @@ CHROOT=chroot
ARCH=amd64 ARCH=amd64
MAKEOPTS=-j4 MAKEOPTS=-j4
PRUNE_CRITICAL=NO PRUNE_CRITICAL=NO
HEADLESS=NO
ACCEPT_KEYWORDS="amd64"
INSTALL=install INSTALL=install
M4=m4 M4=m4
@ -82,6 +84,7 @@ stage3: chroot
compile_options: make.conf locale.gen $(PACKAGE_FILES) compile_options: make.conf locale.gen $(PACKAGE_FILES)
cp make.conf $(CHROOT)/etc/make.conf cp make.conf $(CHROOT)/etc/make.conf
echo ACCEPT_KEYWORDS=$(ACCEPT_KEYWORDS) >> $(CHROOT)/etc/make.conf
cp locale.gen $(CHROOT)/etc/locale.gen cp locale.gen $(CHROOT)/etc/locale.gen
chroot $(CHROOT) locale-gen chroot $(CHROOT) locale-gen
mkdir -p $(CHROOT)/etc/portage mkdir -p $(CHROOT)/etc/portage
@ -93,9 +96,6 @@ compile_options: make.conf locale.gen $(PACKAGE_FILES)
base_system: mounts compile_options base_system: mounts compile_options
touch base_system touch base_system
kernel: $(CHROOT)/boot/vmlinuz
$(CHROOT)/boot/vmlinuz: base_system kernel.config $(CHROOT)/boot/vmlinuz: base_system kernel.config
chroot $(CHROOT) cp /usr/share/zoneinfo/$(TIMEZONE) /etc/localtime chroot $(CHROOT) cp /usr/share/zoneinfo/$(TIMEZONE) /etc/localtime
chroot $(CHROOT) emerge -N sys-kernel/$(KERNEL) chroot $(CHROOT) emerge -N sys-kernel/$(KERNEL)
@ -119,8 +119,12 @@ sysconfig: preproot fstab
echo HOSTNAME=$(HOSTNAME) > $(CHROOT)/etc/conf.d/hostname echo HOSTNAME=$(HOSTNAME) > $(CHROOT)/etc/conf.d/hostname
sed -i 's/^#TIMEZONE=.*/TIMEZONE="$(TIMEZONE)"/' $(CHROOT)/etc/conf.d/clock sed -i 's/^#TIMEZONE=.*/TIMEZONE="$(TIMEZONE)"/' $(CHROOT)/etc/conf.d/clock
sed -i 's/^#s0:/s0:/' $(CHROOT)/etc/inittab sed -i 's/^#s0:/s0:/' $(CHROOT)/etc/inittab
if [ "$(HEADLESS)" == "YES" ] ; then \
sed -i 's/^\(c[0-9]:\)/#\1/' $(CHROOT)/etc/inittab ; \
fi
echo 'config_eth0=( "dhcp" )' > $(CHROOT)/etc/conf.d/net echo 'config_eth0=( "dhcp" )' > $(CHROOT)/etc/conf.d/net
chroot $(CHROOT) rc-update add net.eth0 default chroot $(CHROOT) rc-update add net.eth0 default
chroot $(CHROOT) rc-update del consolefont boot
touch sysconfig touch sysconfig
systools: sysconfig compile_options systools: sysconfig compile_options
@ -131,12 +135,15 @@ systools: sysconfig compile_options
chroot $(CHROOT) emerge -n $(USEPKG) net-misc/dhcpcd chroot $(CHROOT) emerge -n $(USEPKG) net-misc/dhcpcd
touch systools touch systools
grub: systools grub.conf kernel grub: systools grub.conf $(CHROOT)/boot/vmlinuz
chroot $(CHROOT) emerge -nN $(USEPKG) sys-boot/grub chroot $(CHROOT) emerge -nN $(USEPKG) sys-boot/grub
cp grub.conf $(CHROOT)/boot/grub/grub.conf cp grub.conf $(CHROOT)/boot/grub/grub.conf
if [ "$(VIRTIO)" == "YES" ] ; then \ if [ "$(VIRTIO)" == "YES" ] ; then \
sed -i 's/sda/vda/' $(CHROOT)/boot/grub/grub.conf ; \ sed -i 's/sda/vda/' $(CHROOT)/boot/grub/grub.conf ; \
fi fi
if [ "$(HEADLESS)" == "YES" ] ; then \
sed -i -f grub-headless.sed $(CHROOT)/boot/grub/grub.conf ; \
fi
touch grub touch grub
software: systools issue etc-update.conf $(CRITICAL) $(WORLD) $(PREINSTALL) $(POSTINSTALL) software: systools issue etc-update.conf $(CRITICAL) $(WORLD) $(PREINSTALL) $(POSTINSTALL)
@ -196,12 +203,12 @@ $(VMDK_IMAGE): $(RAW_IMAGE) image
vmdk: $(VMDK_IMAGE) vmdk: $(VMDK_IMAGE)
.PHONY: kernel qcow vmdk clean .PHONY: qcow vmdk clean
clean: clean:
umount $(CHROOT)/usr/portage $(CHROOT)/var/tmp $(CHROOT)/dev $(CHROOT)/proc || true umount $(CHROOT)/usr/portage $(CHROOT)/var/tmp $(CHROOT)/dev $(CHROOT)/proc || true
rm -f mounts compile_options base_system portage rm -f mounts compile_options base_system portage
rm -f parted grub stage3 software preproot sysconfig systools image kernel partitions device-map rm -f parted grub stage3 software preproot sysconfig systools image partitions device-map
rm -rf loop rm -rf loop
rm -rf gentoo rm -rf gentoo
rm -rf $(CHROOT) rm -rf $(CHROOT)

View File

@ -14,6 +14,7 @@ net-libs/libsoup gnome
net-misc/curl ssl net-misc/curl ssl
sys-apps/dbus X sys-apps/dbus X
sys-apps/parted device-mapper sys-apps/parted device-mapper
sys-block/parted device-mapper
sys-auth/consolekit policykit sys-auth/consolekit policykit
sys-fs/udev extras sys-fs/udev extras
x11-libs/cairo svg X x11-libs/cairo svg X

3
grub-headless.sed Normal file
View File

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

View File

@ -16,3 +16,6 @@ app-text/poppler utils
dev-libs/xmlrpc-c curl dev-libs/xmlrpc-c curl
media-libs/xine-lib xcb media-libs/xine-lib xcb
net-misc/curl ssl net-misc/curl ssl
# KDE 4.5
>=dev-libs/soprano-2.4.64 raptor redland

View File

@ -10,5 +10,9 @@ cp "$APPLIANCE"/kdmrc "$APPLIANCE"/Xaccess "$CHROOT"/usr/share/config/kdm
chroot "$CHROOT" rc-update add dbus default chroot "$CHROOT" rc-update add dbus default
# enable kdm # enable kdm
sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="kdm"/' "$CHROOT"/etc/conf.d/xdm if [ -e "$CHROOT"/etc/conf.d/xdm ] ; then
chroot "$CHROOT" rc-update add xdm default sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="kdm"/' "$CHROOT"/etc/conf.d/xdm
chroot "$CHROOT" rc-update add xdm default
else
echo "/usr/bin/kdm -daemon" >> "$CHROOT"/etc/conf.d/local.start
fi

36
xfce/critical Normal file
View File

@ -0,0 +1,36 @@
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

0
xfce/package.keywords Normal file
View File

12
xfce/package.use Normal file
View File

@ -0,0 +1,12 @@
app-editors/nano ncurses
dev-lang/python ssl threads xml
sys-kernel/gentoo-sources symlink
x11-terms/terminal
x11-libs/cairo X svg
xfce-base/thunar xfce_plugins_trash
xfce-base/xfce4-meta svg
xfce-base/xfwm4 xcomposite
xfce-extra/xfce4-cpugraph-plugin
xfce-extra/xfce4-screenshooter
xfce-extra/xfce4-systemload-plugin
xfce-extra/xfce4-taskmanager

11
xfce/postinstall Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
CHROOT="$1"
APPLIANCE="`dirname $0`"
cp "${APPLIANCE}"/xdm/* "${CHROOT}"/etc/X11/xdm
echo "XSESSION=Xfce4" > "${CHROOT}"/etc/env.d/99local
chroot "${CHROOT}" env-update
chroot "${CHROOT}" rc-update add xdm default

3
xfce/preinstall Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
CHROOT="$1"

9
xfce/world Normal file
View File

@ -0,0 +1,9 @@
net-misc/dhcpcd
x11-apps/xdm
x11-terms/terminal
xfce-base/thunar
xfce-base/xfce4-meta
xfce-extra/xfce4-cpugraph-plugin
xfce-extra/xfce4-screenshooter
xfce-extra/xfce4-systemload-plugin
xfce-extra/xfce4-taskmanager

101
xfce/xdm/Xaccess Normal file
View File

@ -0,0 +1,101 @@
# $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

13
xfce/xdm/Xservers Normal file
View File

@ -0,0 +1,13 @@
# $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

41
xfce/xdm/xdm-config Normal file
View File

@ -0,0 +1,41 @@
! $Xorg: xdm-conf.cpp,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
! $XdotOrg: $
!
!
!
!
! $XFree86: xc/programs/xdm/config/xdm-conf.cpp,v 1.10 2002/11/30 19:11:32 herrb Exp $
!
DisplayManager.errorLogFile: /var/log/xdm.log
DisplayManager.pidFile: /var/run/xdm.pid
DisplayManager.keyFile: /etc/X11/xdm/xdm-keys
DisplayManager.servers: /etc/X11/xdm/Xservers
DisplayManager.accessFile: /etc/X11/xdm/Xaccess
DisplayManager*resources: /etc/X11/xdm/Xresources
DisplayManager.willing: /usr/lib64/X11/xdm/Xwilling
! All displays should use authorization, but we cannot be sure
! X terminals may not be configured that way, so they will require
! individual resource settings.
DisplayManager*authorize: true
!
DisplayManager*chooser: /usr/lib64/X11/xdm/chooser
DisplayManager*startup: /usr/lib64/X11/xdm/Xstartup
DisplayManager*session: /usr/lib64/X11/xdm/Xsession
DisplayManager*reset: /usr/lib64/X11/xdm/Xreset
DisplayManager*authComplain: true
! The following three resources set up display :0 as the console.
DisplayManager._0.setup: /usr/lib64/X11/xdm/Xsetup_0
DisplayManager._0.startup: /usr/lib64/X11/xdm/GiveConsole
DisplayManager._0.reset: /usr/lib64/X11/xdm/TakeConsole
DisplayManager*loginmoveInterval: 10
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
! DisplayManager.requestPort: 0