Compare commits
300 Commits
Author | SHA1 | Date |
---|---|---|
Jörg Deckert | e5cd5157e3 | |
Jörg Deckert | 9c2662daf0 | |
Jörg Deckert | 573efaddb3 | |
Jörg Deckert | 804560ea06 | |
Jörg Deckert | 774bb51363 | |
Jörg Deckert | 120776df74 | |
Jörg Deckert | 70866fcfda | |
Jörg Deckert | 3ccf8f2bb3 | |
Jörg Deckert | cd9fec70fd | |
Jörg Deckert | 718ae9b8a7 | |
Jörg Deckert | 0709757051 | |
Jörg Deckert | 35319acde1 | |
Jörg Deckert | 0f910b5251 | |
Jörg Deckert | ba223cd2b9 | |
Jörg Deckert | 920e63a21f | |
Jörg Deckert | 955be9cc46 | |
Jörg Deckert | b2d2b0265f | |
Jörg Deckert | d8998bcf46 | |
Jörg Deckert | 38424c532b | |
Jörg Deckert | aabef6e83d | |
Jörg Deckert | 81d9ee2af4 | |
Jörg Deckert | e8dc655fd2 | |
Jörg Deckert | f7c9fa17ca | |
Jörg Deckert | 5cc933830b | |
Jörg Deckert | 8bacd765d0 | |
Jörg Deckert | abc5c6d49b | |
Jörg Deckert | 9a6000e89c | |
Jörg Deckert | ddcb8119f3 | |
Jörg Deckert | 5431e748e5 | |
Jörg Deckert | ac02aab8d1 | |
Jörg Deckert | d24700fac4 | |
Jörg Deckert | 0bb05a4850 | |
Jörg Deckert | 0e4af5c157 | |
Jörg Deckert | dea00e187e | |
Jörg Deckert | 3a70e8d398 | |
Jörg Deckert | 9f5044d813 | |
Albert Hopkins | 8ebb1fac23 | |
Albert Hopkins | 0415321ad9 | |
Albert Hopkins | 919743cf48 | |
Albert Hopkins | 57f3953394 | |
Albert Hopkins | 2e423c7db0 | |
Albert Hopkins | b798561898 | |
Albert Hopkins | 9d3ca3fa55 | |
Albert Hopkins | d3d3439e4c | |
Albert Hopkins | 1aa4e0e85e | |
Albert Hopkins | b8c6f17e24 | |
Albert Hopkins | 442699acb0 | |
Albert Hopkins | a8ed4fc007 | |
Albert Hopkins | 01f25f5ecb | |
Albert Hopkins | 04d39d94b3 | |
Albert Hopkins | 41a5dae789 | |
Albert Hopkins | 3eece1b6ed | |
Albert Hopkins | 23dcf91c29 | |
Albert Hopkins | cb8529f7ea | |
Albert Hopkins | 6ba642f7c1 | |
Albert Hopkins | 5794a0ca0e | |
Albert Hopkins | b4b167b462 | |
Albert Hopkins | 8f79ddc951 | |
Albert Hopkins | 339b3dd2e3 | |
Albert Hopkins | 61d474cb73 | |
Albert Hopkins | 37bbba582e | |
Albert Hopkins | e9fcd8939f | |
Albert Hopkins | d502fb7fef | |
Albert Hopkins | 42315ff1e0 | |
Albert Hopkins | 1d463bf9a3 | |
Albert Hopkins | 5f07f72f55 | |
Albert Hopkins | 6f9f082f09 | |
Albert Hopkins | fa1c6929cf | |
Albert Hopkins | 0fdef4e8c1 | |
Albert Hopkins | 1e2b0ac35b | |
Albert Hopkins | e27e008c47 | |
Albert Hopkins | 240e11bcfc | |
Albert Hopkins | 2e425341c3 | |
Albert Hopkins | dea0b10abe | |
Albert Hopkins | 443f78a5bd | |
Albert Hopkins | 9ed67885c6 | |
Albert Hopkins | 772b5b60fd | |
Albert Hopkins | c5c6c8da7f | |
Albert Hopkins | b2c92c5ec7 | |
Albert Hopkins | 5a96cc75a1 | |
Albert Hopkins | d854fe287d | |
Albert Hopkins | fe6a9b46fb | |
Albert Hopkins | cac3d36946 | |
Albert Hopkins | 177dd2f4ed | |
Albert Hopkins | c010e92b85 | |
Albert Hopkins | a229b85446 | |
Albert Hopkins | c3d5311079 | |
Albert Hopkins | 0158579895 | |
Albert Hopkins | 1870d912c2 | |
Albert Hopkins | 8ff7dc21b9 | |
Albert Hopkins | 90f0cc5f8c | |
Albert Hopkins | f2233f66a6 | |
Albert Hopkins | 971fd9ace8 | |
Albert Hopkins | 65a0c599ad | |
Albert Hopkins | 3db97d71eb | |
Albert Hopkins | 5db908b61f | |
Albert Hopkins | c79f4776f5 | |
Albert Hopkins | adb5f59cd9 | |
Albert Hopkins | 4a591cdf3a | |
Albert Hopkins | 434d5d6759 | |
Albert Hopkins | 4336143b00 | |
Albert Hopkins | 2db0b80334 | |
Albert Hopkins | 46b8f22294 | |
Albert Hopkins | acb3036226 | |
Albert Hopkins | e5437fa158 | |
Albert Hopkins | ac76f07b4d | |
Albert Hopkins | ac4c2c9fa4 | |
Albert Hopkins | 412e6ce4c3 | |
Albert Hopkins | 98f03494e5 | |
Albert Hopkins | 5df4a8a41c | |
Albert Hopkins | ba91dea6cd | |
Albert Hopkins | a019fd6a72 | |
Albert Hopkins | 35c0f571db | |
Albert Hopkins | 9eb881fea1 | |
Albert Hopkins | 54c8f8a617 | |
Albert Hopkins | ad1708d1f6 | |
Albert Hopkins | 15f8f9fc24 | |
Albert Hopkins | d8055f8c2d | |
Albert Hopkins | 91a9a21978 | |
Albert Hopkins | 7ef2da9e83 | |
Albert Hopkins | 18fdbb86ea | |
Albert Hopkins | 82819040a8 | |
Albert Hopkins | 4423189dba | |
Albert Hopkins | 88dcafaa34 | |
Albert Hopkins | ef198be3b1 | |
Albert Hopkins | d3716fd8a1 | |
Albert Hopkins | 285ad6c8de | |
Albert Hopkins | 9408257dd4 | |
Albert Hopkins | ca7dc93859 | |
Albert Hopkins | 7e5e4d75d4 | |
Albert Hopkins | 34a9ad7e49 | |
Albert Hopkins | c4ca9c69ee | |
Albert Hopkins | acf9ec8c91 | |
Albert Hopkins | 066e94c370 | |
Albert Hopkins | adb598e71d | |
Albert Hopkins | b78dd0b2b1 | |
Albert Hopkins | eede1e0ac4 | |
Albert Hopkins | d40976c08c | |
Albert Hopkins | e0f3835e72 | |
Albert Hopkins | 45a99fe977 | |
Albert Hopkins | 2156e31833 | |
Albert Hopkins | 02f069aab6 | |
Albert Hopkins | c2b700c06b | |
Albert Hopkins | 62bca7ade7 | |
Albert Hopkins | c2f1d3b680 | |
Albert Hopkins | 8869ee5331 | |
Albert Hopkins | caba362013 | |
Albert Hopkins | 7a54cf9e1c | |
Albert Hopkins | cecf3d0582 | |
Albert Hopkins | 674d389ef9 | |
Albert Hopkins | be7559abb3 | |
Albert Hopkins | 1be1557a70 | |
Albert Hopkins | 1aea18500c | |
Albert Hopkins | be9f75a457 | |
Albert Hopkins | 81b7e1cd1b | |
Albert Hopkins | b1aab65861 | |
Albert Hopkins | 5d1b56c692 | |
Albert Hopkins | 8494820fb3 | |
Albert Hopkins | 9e1441231f | |
Albert Hopkins | 0f764da844 | |
Albert Hopkins | 8f578a64e5 | |
Albert Hopkins | 3b31663794 | |
Albert Hopkins | c3b1c3264c | |
Albert Hopkins | 810e10aa2c | |
Albert Hopkins | ade5c5b463 | |
Albert Hopkins | 3272210ba5 | |
Albert Hopkins | 51d2482cab | |
Albert Hopkins | cbe8307449 | |
Albert Hopkins | 06054a5066 | |
Albert Hopkins | 1041b1c860 | |
Albert Hopkins | 600c875216 | |
Albert Hopkins | 1352ae107e | |
Albert Hopkins | 976147ee13 | |
Albert Hopkins | f67a22fa94 | |
Albert Hopkins | 5d7dca06f9 | |
Albert Hopkins | d48248ca46 | |
Albert Hopkins | 59eac8da06 | |
Albert Hopkins | 6d06ba3c05 | |
Albert Hopkins | b435c4b5c5 | |
Albert Hopkins | 017b37d025 | |
Albert Hopkins | 6c06958fc9 | |
Albert Hopkins | c6f192cde0 | |
Albert Hopkins | 3e9b250524 | |
Albert Hopkins | 523d23043a | |
Albert Hopkins | 7fdaf49b36 | |
Albert Hopkins | 7bde1c5ab0 | |
Albert Hopkins | e867f3cf2e | |
Albert Hopkins | 45f3ee7a75 | |
Albert Hopkins | 098369b404 | |
Albert Hopkins | 9245bc26b9 | |
Albert Hopkins | 6dbe6c0b98 | |
Albert Hopkins | c907bdf048 | |
Albert Hopkins | a8eb60d006 | |
Albert Hopkins | 42d8f6df45 | |
Albert Hopkins | a188e9557c | |
Albert Hopkins | 899184e1ec | |
Albert Hopkins | e73c7cebb5 | |
Albert Hopkins | 43408fc986 | |
Albert Hopkins | 1253b0325e | |
Albert Hopkins | ae1b17132e | |
Albert Hopkins | 0d0af1a03e | |
Albert Hopkins | 2e296640e5 | |
Albert Hopkins | ae2dc47182 | |
Albert Hopkins | 24944f921a | |
Albert Hopkins | 288b734590 | |
Albert Hopkins | a4680c8ded | |
Albert Hopkins | f5c4b54a14 | |
Albert Hopkins | 953793bd20 | |
Albert Hopkins | e0fdebdb0d | |
Albert Hopkins | 5c77f82f71 | |
Albert Hopkins | e2e08b05d9 | |
Albert Hopkins | 902886918a | |
Albert Hopkins | 9eb8ceeb06 | |
Albert Hopkins | ab8dd35965 | |
Albert Hopkins | b9a7851810 | |
Albert Hopkins | 8ba3d8b191 | |
Albert Hopkins | b3ff6f8e4a | |
Albert Hopkins | cc8b95d425 | |
Albert Hopkins | 24ce75a112 | |
Albert Hopkins | 73c5fce1e0 | |
Albert Hopkins | bde2764a9c | |
Albert Hopkins | e6dc5c7874 | |
Albert Hopkins | 0ea74dcf59 | |
Albert Hopkins | 168de34153 | |
Albert Hopkins | 2f9b52e3c5 | |
Albert Hopkins | 91b5e962ec | |
Albert Hopkins | 1da2ba10dd | |
Albert Hopkins | 24be5ce588 | |
Albert Hopkins | 2a241978ee | |
Albert Hopkins | b938a7a623 | |
Albert Hopkins | 0b3f6db39e | |
Albert Hopkins | ce1c29a036 | |
Albert Hopkins | 6ffc462188 | |
Albert Hopkins | 0c19fb8470 | |
Albert Hopkins | 995705d789 | |
Albert Hopkins | 06a71843b1 | |
Albert Hopkins | 48cb7905e9 | |
Albert Hopkins | 361306a10e | |
Albert Hopkins | 8af67d5cea | |
Albert Hopkins | 04852ff605 | |
Albert Hopkins | 7144d2d3ec | |
Albert Hopkins | 327013b660 | |
Albert Hopkins | d696f5577d | |
Albert Hopkins | bf950c50d9 | |
Albert Hopkins | 840bb4b0c4 | |
Albert Hopkins | 7947b57066 | |
Albert Hopkins | 1f8703d446 | |
Albert Hopkins | 26353ee7db | |
Albert Hopkins | ca736466f2 | |
Albert Hopkins | c5b8a0f6a9 | |
Albert Hopkins | ce7af970df | |
Albert Hopkins | 994466c6e7 | |
Albert Hopkins | bfd2d5896e | |
Albert Hopkins | ae530cbf2d | |
Albert Hopkins | b0a7dae92b | |
Albert Hopkins | db224c4bb8 | |
Albert Hopkins | cff474da63 | |
Albert Hopkins | 4a7010a5ee | |
Albert Hopkins | 5240c6b302 | |
Albert Hopkins | df92b10200 | |
Albert Hopkins | 05544efe41 | |
Albert Hopkins | 0504f76a1a | |
Albert Hopkins | b6833b57b6 | |
Albert Hopkins | 1a31e4f951 | |
Albert Hopkins | 5889d9f251 | |
Albert Hopkins | c252121561 | |
Albert Hopkins | 04714e1e27 | |
Albert Hopkins | b92d617f84 | |
Albert Hopkins | 58d4bad383 | |
Albert Hopkins | 1a36e228c0 | |
Albert Hopkins | 359ec88aed | |
Albert Hopkins | 95e3d1e9af | |
Albert Hopkins | f4e8a22ddb | |
Albert Hopkins | 86311ebd9f | |
Albert Hopkins | 07c96253dc | |
Albert Hopkins | bc22178119 | |
Albert Hopkins | 9562528920 | |
Albert Hopkins | c8c9bc1a1f | |
Albert Hopkins | dff2e32481 | |
Albert Hopkins | e28fcda122 | |
Albert Hopkins | 829eeb5806 | |
Albert Hopkins | d66a465456 | |
Albert Hopkins | 27f7653ee7 | |
Albert Hopkins | 1a9d97d016 | |
Albert Hopkins | 13512c8cbf | |
Albert Hopkins | 3ca8e68168 | |
Albert Hopkins | 8ef1630fdb | |
Albert Hopkins | 0c12afc476 | |
Albert Hopkins | da9e895652 | |
Albert Hopkins | 8240a836e1 | |
Albert Hopkins | 0799c48705 | |
Albert Hopkins | 4775bc9b07 | |
Albert Hopkins | 958ef1a7b9 | |
Albert Hopkins | c9a81d2806 | |
Albert Hopkins | 50a4a28567 | |
Albert Hopkins | 928dcf9e1c | |
Albert Hopkins | 2f34925b43 | |
Albert Hopkins | 5a89b2a70b | |
Albert Hopkins | ff025a25c5 | |
Albert Hopkins | 64d32b83ac |
|
@ -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
|
11
.hgignore
11
.hgignore
|
@ -1,11 +0,0 @@
|
|||
vabuild\/.*
|
||||
loop\/.*
|
||||
^stage4
|
||||
.*\.swp$
|
||||
.*\.cfg
|
||||
latest-stage3\.txt
|
||||
portage-snapshot\.tar\.bz2
|
||||
stage3-.*-latest\.tar\.bz2
|
||||
\.lst$
|
||||
.*\.qcow
|
||||
.*\.vmdk.bz2
|
609
Makefile
609
Makefile
|
@ -1,427 +1,490 @@
|
|||
CHROOT = $(CURDIR)/vabuild
|
||||
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
|
||||
XVA_IMAGE = $(HOSTNAME).xva
|
||||
LST_FILE = $(HOSTNAME)-packages.lst
|
||||
STAGE4_TARBALL = stage4/$(HOSTNAME)-stage4.tar.xz
|
||||
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
|
||||
KERNEL_CONFIG = configs/kernel.config.$(ARCH)
|
||||
MAKEOPTS = -j10 -l10
|
||||
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
|
||||
UDEV = YES
|
||||
SOFTWARE = 1
|
||||
PKGLIST = 0
|
||||
ACCEPT_KEYWORDS = amd64
|
||||
DASH = NO
|
||||
LOCALE ?= en_US.utf8
|
||||
|
||||
M4 = m4
|
||||
EMERGE = /usr/bin/emerge --jobs=4
|
||||
EMERGE = emerge --jobs=$(shell nproc --all)
|
||||
M4_DEFS = -D HOSTNAME=$(HOSTNAME)
|
||||
M4C = $(M4) $(M4_DEFS)
|
||||
USEPKG = --usepkg --binpkg-respect-use=y
|
||||
RSYNC_MIRROR = rsync://rsync.gtlib.gatech.edu/gentoo/
|
||||
EMERGE_RSYNC = NO
|
||||
KERNEL = gentoo-sources
|
||||
PACKAGE_FILES = $(wildcard appliances/$(APPLIANCE)/package.*)
|
||||
KERNEL_PKG = gentoo-sources
|
||||
WORLD = appliances/$(APPLIANCE)/world
|
||||
WORLD_DEFAULT = appliances/default/world
|
||||
EXTRA_WORLD =
|
||||
CRITICAL = appliances/$(APPLIANCE)/critical
|
||||
|
||||
# /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 appliance/$(APPLIANCE)/$(APPLIANCE).cfg
|
||||
-include appliances/default/default.cfg
|
||||
-include appliances/$(APPLIANCE)/$(APPLIANCE).cfg
|
||||
|
||||
# Allow user to override variables
|
||||
-include $(profile).cfg
|
||||
|
||||
inroot := chroot $(CHROOT)
|
||||
ifeq ($(ARCH),x86)
|
||||
ifneq ($(profile),)
|
||||
container = $(profile)-$(APPLIANCE)-build
|
||||
else
|
||||
container = $(APPLIANCE)-build
|
||||
endif
|
||||
|
||||
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))
|
||||
software-deps := stage3
|
||||
|
||||
ifneq ($(SOFTWARE),0)
|
||||
software-deps += build-software
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(PRUNE_CRITICAL),YES)
|
||||
COPY_ARGS = --exclude-from=configs/rsync-excludes \
|
||||
--exclude-from=configs/rsync-excludes-critical
|
||||
else
|
||||
COPY_ARGS = --exclude-from=configs/rsync-excludes
|
||||
endif
|
||||
|
||||
ifeq ($(REMOVE_PORTAGE_TREE),YES)
|
||||
COPY_ARGS += --exclude=usr/portage
|
||||
endif
|
||||
COPY_ARGS = --exclude-from=configs/rsync-excludes
|
||||
|
||||
ifeq ($(CHANGE_PASSWORD),YES)
|
||||
ifdef ROOT_PASSWORD
|
||||
change_password = $(inroot) usermod -p '$(ROOT_PASSWORD)' root
|
||||
change_password = RUN usermod --password '$(ROOT_PASSWORD)' root
|
||||
else
|
||||
change_password = $(inroot) passwd -d root; $(inroot) passwd -e root
|
||||
change_password = RUN passwd --delete root
|
||||
endif
|
||||
endif
|
||||
|
||||
gcc_config = $(inroot) gcc-config 1
|
||||
|
||||
export APPLIANCE ACCEPT_KEYWORDS CHROOT EMERGE HEADLESS M4 M4C inroot
|
||||
export HOSTNAME MAKEOPTS PRUNE_CRITICAL TIMEZONE USEPKG WORLD OVERLAY
|
||||
ifneq ($(shell grep 'CONFIG_MODULES=y' $(KERNEL_CONFIG)), )
|
||||
KERNEL_MODULES_PREPARE = modules_prepare
|
||||
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
|
||||
|
||||
unexport PKGDIR ARCH
|
||||
all: stage4
|
||||
|
||||
all: image
|
||||
image: $(RAW_IMAGE)
|
||||
|
||||
$(RAW_IMAGE):
|
||||
qemu-img create -f raw $(RAW_IMAGE) $(DISK_SIZE)
|
||||
sync_portage: $(PORTAGE_DIR)
|
||||
@print Grabbing latest portage
|
||||
git -C $(PORTAGE_DIR) pull
|
||||
touch $(PORTAGE_DIR)
|
||||
|
||||
partitions: $(RAW_IMAGE)
|
||||
@scripts/echo Creating partition layout
|
||||
parted -s $(RAW_IMAGE) mklabel gpt
|
||||
parted -s $(RAW_IMAGE) mkpart primary 1 $(DISK_SIZE)
|
||||
parted -s $(RAW_IMAGE) set 1 boot on
|
||||
$(PORTAGE_DIR):
|
||||
@print Grabbing the portage tree
|
||||
git clone --depth=1 https://github.com/gentoo/gentoo.git $(PORTAGE_DIR)
|
||||
|
||||
losetup --show --find --partscan $(RAW_IMAGE) > partitions.tmp
|
||||
mv partitions.tmp partitions
|
||||
sync
|
||||
mkfs.ext4 -O sparse_super,^has_journal -L "$(APPLIANCE)"_root -m 0 `cat partitions`p1
|
||||
$(CHROOT)/etc/portage/%: configs/portage/%
|
||||
COPY --recursive $< /etc/portage/
|
||||
|
||||
mounts: stage3
|
||||
@scripts/echo Creating chroot in $(CHROOT)
|
||||
mkdir -p $(CHROOT)
|
||||
if [ ! -e mounts ] ; then \
|
||||
mount -t proc none $(CHROOT)/proc; \
|
||||
mount -o rbind /dev $(CHROOT)/dev; \
|
||||
mount -o bind /var/tmp $(CHROOT)/var/tmp; \
|
||||
fi
|
||||
touch mounts
|
||||
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
|
||||
|
||||
portage-snapshot.tar.bz2:
|
||||
@scripts/echo You do not have a portage snapshot. Consider \"make sync_portage\"
|
||||
@exit 1
|
||||
$(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)
|
||||
|
||||
|
||||
sync_portage:
|
||||
@scripts/echo Grabbing latest portage snapshot
|
||||
rsync --no-motd -L $(RSYNC_MIRROR)/snapshots/portage-latest.tar.bz2 portage-snapshot.tar.bz2
|
||||
|
||||
|
||||
portage: portage-snapshot.tar.bz2 stage3
|
||||
@scripts/echo Unpacking portage snapshot
|
||||
rm -rf $(CHROOT)/usr/portage
|
||||
tar xf portage-snapshot.tar.bz2 -C $(CHROOT)/usr
|
||||
ifeq ($(EMERGE_RSYNC),YES)
|
||||
@scripts/echo Syncing portage tree
|
||||
$(inroot) emerge --sync --quiet
|
||||
endif
|
||||
ifdef PKGDIR
|
||||
mkdir -p $(CHROOT)/var/portage/packages
|
||||
mount -o bind "$(PKGDIR)" $(CHROOT)/var/portage/packages
|
||||
endif
|
||||
touch portage
|
||||
|
||||
preproot: stage3 mounts portage configs/fstab
|
||||
cp -L /etc/resolv.conf $(CHROOT)/etc/
|
||||
$(inroot) sed -i 's/root:.*/root::9797:0:::::/' /etc/shadow
|
||||
cp configs/fstab $(CHROOT)/etc/fstab
|
||||
echo hostname=\"$(HOSTNAME)\" > $(CHROOT)/etc/conf.d/hostname
|
||||
echo $(HOSTNAME) > $(CHROOT)/etc/hostname
|
||||
touch preproot
|
||||
|
||||
stage3-$(ARCH)-latest.tar.bz2:
|
||||
@scripts/echo You do not have a portage stage3 tarball. Consider \"make sync_stage3\"
|
||||
stage3-$(VA_ARCH).tar.xz:
|
||||
@print You do not have a stage3 tarball. Consider \"make sync_stage3\"
|
||||
@exit 1
|
||||
|
||||
sync_stage3:
|
||||
./scripts/sync-stage3.sh $(ARCH)
|
||||
fetch-stage3 --systemd --outfile=stage3-$(VA_ARCH).tar.xz $(VA_ARCH)
|
||||
|
||||
|
||||
stage3: stage3-$(ARCH)-latest.tar.bz2
|
||||
$(STAGE3): stage3-$(VA_ARCH).tar.xz configs/stage3-tarball-excludes
|
||||
mkdir -p $(CHROOT)
|
||||
ifdef stage4-exists
|
||||
@scripts/echo Using stage4 tarball: $(STAGE4_TARBALL)
|
||||
@print Using stage4 tarball: `basename $(STAGE4_TARBALL)`
|
||||
tar xpf "$(STAGE4_TARBALL)" -C $(CHROOT)
|
||||
else
|
||||
@scripts/echo Using stage3 tarball
|
||||
tar xpf stage3-$(ARCH)-latest.tar.bz2 -C $(CHROOT)
|
||||
@print Using stage3 tarball
|
||||
tar xpf stage3-$(VA_ARCH).tar.xz -C $(CHROOT) --exclude-from=configs/stage3-tarball-excludes
|
||||
endif
|
||||
touch stage3
|
||||
rm -f $(CHROOT)/etc/localtime
|
||||
touch $(STAGE3)
|
||||
|
||||
compile_options: portage configs/make.conf.$(ARCH) configs/locale.gen $(PACKAGE_FILES)
|
||||
cp configs/make.conf.$(ARCH) $(CHROOT)/etc/portage/make.conf
|
||||
ifdef PKGDIR
|
||||
echo PKGDIR="/var/portage/packages" >> $(CHROOT)/etc/portage/make.conf
|
||||
endif
|
||||
echo ACCEPT_KEYWORDS=$(ACCEPT_KEYWORDS) >> $(CHROOT)/etc/portage/make.conf
|
||||
-[ -f "appliances/$(APPLIANCE)/make.conf" ] && cat "appliances/$(APPLIANCE)/make.conf" >> $(CHROOT)/etc/portage/make.conf
|
||||
$(inroot) eselect profile set 1
|
||||
cp configs/locale.gen $(CHROOT)/etc/locale.gen
|
||||
$(inroot) locale-gen
|
||||
for f in $(PACKAGE_FILES); do \
|
||||
base=`basename $$f` ; \
|
||||
mkdir -p $(CHROOT)/etc/portage/$$base; \
|
||||
cp $$f $(CHROOT)/etc/portage/$$base/virtual-appliance-$$base; \
|
||||
done
|
||||
touch compile_options
|
||||
|
||||
base_system: mounts compile_options
|
||||
touch base_system
|
||||
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);)
|
||||
|
||||
kernel: base_system $(KERNEL_CONFIG) scripts/kernel.sh
|
||||
$(inroot) cp /usr/share/zoneinfo/$(TIMEZONE) /etc/localtime
|
||||
echo $(TIMEZONE) > "$(CHROOT)"/etc/timezone
|
||||
$(foreach repo,$(REPO_NAMES),$(REPO_DIR)/$(repo)):
|
||||
@print Grabbing a repository
|
||||
git clone --depth=1 $(REPO_URI_$(subst $(REPO_DIR)/,,$@)) $@
|
||||
|
||||
$(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 $@
|
||||
|
||||
$(CHROOT)/etc/portage/package.%/01default: appliances/default/package.% $(STAGE3)
|
||||
mkdir -p `dirname $@`
|
||||
cp $< $@
|
||||
|
||||
$(CHROOT)/etc/portage/package.%/02$(APPLIANCE): appliances/$(APPLIANCE)/package.% $(STAGE3)
|
||||
mkdir -p `dirname $@`
|
||||
cp $< $@
|
||||
|
||||
$(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)
|
||||
@scripts/echo Configuring kernel
|
||||
cp $(KERNEL_CONFIG) $(CHROOT)/root/kernel.config
|
||||
cp scripts/kernel.sh $(CHROOT)/tmp/kernel.sh
|
||||
KERNEL=$(KERNEL) EMERGE="$(EMERGE)" USEPKG="$(USEPKG)" MAKEOPTS="$(MAKEOPTS)" \
|
||||
$(inroot) /bin/sh /tmp/kernel.sh
|
||||
rm -f $(CHROOT)/tmp/kernel.sh
|
||||
endif
|
||||
touch kernel
|
||||
|
||||
$(SWAP_FILE): preproot
|
||||
ifneq ($(SWAP_SIZE),0)
|
||||
@scripts/echo Creating swap file: $(SWAP_FILE)
|
||||
dd if=/dev/zero of=$(SWAP_FILE) bs=1M count=$(SWAP_SIZE)
|
||||
/sbin/mkswap $(SWAP_FILE)
|
||||
$(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
|
||||
sed -i '/swap/d' $(CHROOT)/etc/fstab
|
||||
echo "NONE" > $@
|
||||
endif
|
||||
|
||||
sysconfig: preproot scripts/acpi.start $(SWAP_FILE)
|
||||
@echo $(VIRTIO)
|
||||
ifeq ($(VIRTIO),YES)
|
||||
sed -i 's/sda/vda/' $(CHROOT)/etc/fstab
|
||||
sed -i 's:clock_hctosys="YES":clock_hctosys="NO":g' "$(CHROOT)/etc/conf.d/hwclock"
|
||||
$(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
|
||||
ifeq ($(HEADLESS),YES)
|
||||
sed -i 's/^#s0:/s0:/' $(CHROOT)/etc/inittab
|
||||
sed -ri 's/^(c[0-9]:)/\#\1/' $(CHROOT)/etc/inittab
|
||||
rm -f $(CHROOT)/etc/runlevels/boot/termencoding
|
||||
rm -f $(CHROOT)/etc/runlevels/boot/keymaps
|
||||
endif
|
||||
echo 'modules="dhclient"' > $(CHROOT)/etc/conf.d/net
|
||||
echo 'config_eth0="udhcpc"' >> $(CHROOT)/etc/conf.d/net
|
||||
echo 'dhcp_eth0="release"' >> $(CHROOT)/etc/conf.d/net
|
||||
$(inroot) ln -nsf net.lo /etc/init.d/net.eth0
|
||||
$(inroot) ln -nsf /etc/init.d/net.eth0 /etc/runlevels/default/net.eth0
|
||||
$(inroot) rm -f /etc/runlevels/boot/consolefont
|
||||
cp -a scripts/acpi.start $(CHROOT)/etc/local.d
|
||||
touch sysconfig
|
||||
touch $(KERNEL_SRC)
|
||||
|
||||
systools: sysconfig compile_options
|
||||
@scripts/echo Installing standard system tools
|
||||
$(inroot) $(EMERGE) -n $(USEPKG) app-admin/metalog
|
||||
$(inroot) /sbin/rc-update add metalog default
|
||||
$(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 $(inroot) $(EMERGE) -n $(USEPKG) app-shells/dash; \
|
||||
then RUN $(EMERGE) --noreplace $(USEPKG) app-shells/dash; \
|
||||
echo /bin/dash >> $(CHROOT)/etc/shells; \
|
||||
$(inroot) chsh -s /bin/sh root; \
|
||||
RUN chsh -s /bin/sh root; \
|
||||
fi
|
||||
$(inroot) ln -sf dash /bin/sh
|
||||
RUN ln -sf dash /bin/sh
|
||||
endif
|
||||
touch systools
|
||||
touch $(SYSTOOLS)
|
||||
|
||||
grub: stage3 configs/grub.conf kernel scripts/grub-headless.sed
|
||||
$(GRUB): $(PREPROOT) configs/grub.cfg $(KERNEL) scripts/grub-headless.sed
|
||||
ifneq ($(EXTERNAL_KERNEL),YES)
|
||||
@scripts/echo Installing Grub
|
||||
$(inroot) $(EMERGE) -nN $(USEPKG) sys-boot/grub-static
|
||||
cp configs/grub.conf $(CHROOT)/boot/grub/grub.conf
|
||||
@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.conf
|
||||
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.conf
|
||||
sed -i -f scripts/grub-headless.sed $(CHROOT)/boot/grub/grub.cfg
|
||||
endif
|
||||
endif
|
||||
touch grub
|
||||
ln -nsf /run/systemd/resolve/resolv.conf $(CHROOT)/etc/resolv.conf
|
||||
touch $(GRUB)
|
||||
|
||||
build-software: systools configs/issue configs/etc-update.conf $(CRITICAL) $(WORLD)
|
||||
@scripts/echo Building $(APPLIANCE)-specific software
|
||||
$(MAKE) -C appliances/$(APPLIANCE) preinstall
|
||||
cp configs/etc-update.conf $(CHROOT)/etc/
|
||||
|
||||
if test `stat -c "%s" $(WORLD)` -ne 0 ; then \
|
||||
$(inroot) $(EMERGE) $(USEPKG) --update --newuse --deep `cat $(WORLD)` $(EXTRA_WORLD); \
|
||||
else \
|
||||
true; \
|
||||
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
|
||||
$(gcc_config)
|
||||
$(MAKE) -C appliances/$(APPLIANCE) preinstall
|
||||
|
||||
@scripts/echo Running revdep-rebuild
|
||||
$(inroot) emerge @preserved-rebuild
|
||||
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
|
||||
|
||||
cp configs/issue $(CHROOT)/etc/issue
|
||||
$(gcc_config)
|
||||
$(inroot) $(EMERGE) $(USEPKG) --update --newuse --deep world
|
||||
$(inroot) $(EMERGE) --depclean --with-bdeps=n
|
||||
$(gcc_config)
|
||||
EDITOR=/usr/bin/nano $(inroot) etc-update
|
||||
$(MAKE) -C appliances/$(APPLIANCE) postinstall
|
||||
ifeq ($(UDEV),NO)
|
||||
rm -f $(CHROOT)/etc/runlevels/sysinit/udev
|
||||
$(inroot) $(EMERGE) -c sys-fs/udev
|
||||
else
|
||||
ln -sf /etc/init.d/udev $(CHROOT)/etc/runlevels/sysinit/udev
|
||||
endif
|
||||
@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)
|
||||
$(inroot) /sbin/rc-update add sshd default
|
||||
RUN systemctl enable sshd.service
|
||||
endif
|
||||
$(change_password)
|
||||
ifeq ($(PRUNE_CRITICAL),YES)
|
||||
$(inroot) $(EMERGE) -C `cat $(CRITICAL)`
|
||||
ifeq ($(DASH),YES)
|
||||
$(inroot) $(EMERGE) -c app-shells/bash
|
||||
RUN $(EMERGE) --depclean app-shells/bash
|
||||
endif
|
||||
endif
|
||||
|
||||
software: $(software-deps)
|
||||
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 */*) >> $(LST_FILE)
|
||||
(cd "$(CHROOT)"/var/db/pkg ; /bin/ls -1d */* | grep -v '^virtual/') >> $(LST_FILE)
|
||||
endif
|
||||
touch software
|
||||
touch $(SOFTWARE)
|
||||
|
||||
device-map: $(RAW_IMAGE)
|
||||
echo '(hd0) ' $(RAW_IMAGE) > device-map
|
||||
|
||||
image: $(STAGE4_TARBALL) partitions device-map scripts/grub.shell scripts/motd.sh
|
||||
@scripts/echo Installing files to $(RAW_IMAGE)
|
||||
mkdir -p loop
|
||||
mount -o noatime `cat partitions`p1 loop
|
||||
tar -Sxf $(STAGE4_TARBALL) --numeric-owner $(COPY_ARGS) -C loop
|
||||
scripts/motd.sh $(EXTERNAL_KERNEL) $(VIRTIO) $(DISK_SIZE) $(SWAP_SIZE) $(UDEV) $(DASH) $(ARCH) > loop/etc/motd
|
||||
$(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)
|
||||
loop/sbin/grub --device-map=device-map --no-floppy --batch < scripts/grub.shell
|
||||
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 -l loop
|
||||
rmdir loop
|
||||
umount $(CHROOT)
|
||||
rmdir $(CHROOT)
|
||||
sync
|
||||
losetup --detach `cat partitions`
|
||||
rm -f partitions device-map
|
||||
mv $(RAW_IMAGE).tmp $(RAW_IMAGE)
|
||||
|
||||
$(QCOW_IMAGE): image
|
||||
@scripts/echo Creating $(QCOW_IMAGE)
|
||||
qemu-img convert -f raw -O qcow2 -c $(RAW_IMAGE) $(QCOW_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): image
|
||||
@scripts/echo Creating $(XVA_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)
|
||||
--filename=$(XVA_IMAGE).tmp
|
||||
mv $(XVA_IMAGE).tmp $(XVA_IMAGE)
|
||||
|
||||
xva: $(XVA_IMAGE)
|
||||
|
||||
|
||||
$(VMDK_IMAGE): image
|
||||
@scripts/echo Creating $(VMDK_IMAGE)
|
||||
qemu-img convert -f raw -O vmdk $(RAW_IMAGE) $(VMDK_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)
|
||||
|
||||
build_stage4: software kernel configs/rsync-excludes configs/rsync-excludes-critical grub
|
||||
@scripts/echo Creating stage4 tarball: $(STAGE4_TARBALL)
|
||||
mkdir -p stage4
|
||||
mkdir -p gentoo
|
||||
mount -o bind $(CHROOT) gentoo
|
||||
tar -aScf "$(STAGE4_TARBALL).tmp.xz" --numeric-owner $(COPY_ARGS) -C gentoo --one-file-system .
|
||||
umount gentoo
|
||||
rmdir gentoo
|
||||
NUM_CPUS := $(OVA_NUM_CPUS)
|
||||
MEM_SIZE := $(OVA_MEM_SIZE)
|
||||
export NUM_CPUS MEM_SIZE
|
||||
|
||||
$(OVA_IMAGE): $(VMDK_IMAGE)
|
||||
@print Creating `basename $(OVA_IMAGE)`
|
||||
cd $(IMAGES) && mkova.sh $(APPLIANCE) /usr/share/open-vmdk/template-hw7.ovf $(VMDK_IMAGE)
|
||||
|
||||
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: build_stage4 clean
|
||||
stage4: $(STAGE4_TARBALL)
|
||||
|
||||
|
||||
$(STAGE4_TARBALL):
|
||||
stage4
|
||||
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
|
||||
|
||||
|
||||
umount:
|
||||
@scripts/echo Attempting to unmount chroot mounts
|
||||
ifdef PKGDIR
|
||||
umount -l $(CHROOT)/var/portage/packages
|
||||
endif
|
||||
umount -l $(CHROOT)/var/tmp
|
||||
umount -l $(CHROOT)/dev
|
||||
umount -l $(CHROOT)/proc
|
||||
touch umount
|
||||
|
||||
remove_checkpoints:
|
||||
rm -f mounts compile_options base_system portage sync_portage
|
||||
rm -f parted kernel grub stage3 software preproot sysconfig systools
|
||||
|
||||
clean: umount remove_checkpoints
|
||||
rm -f umount
|
||||
rm -rf --one-file-system loop
|
||||
rm -rf --one-file-system gentoo
|
||||
rm -rf --one-file-system $(CHROOT)
|
||||
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 -- *.qcow *.img *.vmdk
|
||||
rm -f stage3-*.tar.xz
|
||||
rm -f portage-snapshot.tar.bz2
|
||||
|
||||
appliance-list:
|
||||
@scripts/echo 'Available appliances:'
|
||||
@/bin/ls appliances
|
||||
@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:
|
||||
@scripts/echo 'Help targets (this is not a comprehensive list)'
|
||||
@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 'software - Build software into a chroot'
|
||||
@echo 'clean - Unmount chroot and clean directory'
|
||||
@echo 'eclean - Clean outdated packages and distfiles'
|
||||
@echo 'realclean - Clean and remove image files'
|
||||
@scripts/echo 'Images'
|
||||
@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'
|
||||
@scripts/echo 'Variables'
|
||||
@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 'ARCH= - Architecture to build for (x86 or amd64)'
|
||||
@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 'REMOVE_PORTAGE_TREE=NO - Do not exclude the portage tree from the image'
|
||||
@echo 'PKGDIR= - Directory to use/store binary packages'
|
||||
@echo 'ENABLE_SSHD=YES - Enable sshd to start automatically in the image'
|
||||
@echo 'VMDK_TYPE=IDE - VMDK image type (IDE or SCSI)'
|
||||
@echo
|
||||
@scripts/echo 'Example'
|
||||
@echo 'make APPLIANCE=mongodb HEADLESS=YES VIRTIO=YES stage4 qcow clean'
|
||||
@print 'Example to build the base appliance'
|
||||
@echo 'make APPLIANCE=base HEADLESS=YES VIRTIO=YES stage4 qcow clean'
|
||||
|
||||
.PHONY: qcow vmdk clean realclean distclean remove_checkpoints stage4 build-software image stage4 help appliance-list
|
||||
.PHONY: qcow vmdk ova clean realclean distclean stage4 image stage4 help appliance-list eclean sync_portage sync_stage3 checksums fstab
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
APP_ROOT := /var/airport
|
||||
AIRPORT_REPO ?= https://bitbucket.org/marduk/airport
|
||||
AIRPORT_BRANCH ?= default
|
||||
PGVER := 9.4
|
||||
|
||||
rcdefault := /etc/runlevels/default
|
||||
|
||||
preinstall:
|
||||
|
||||
|
||||
postinstall: airport.service settings.py local.start local.stop issue nginx.conf start-airport stop-airport stop-game
|
||||
sed -i 's/^PG_INITDB_OPTS.*/PG_INITDB_OPTS="--locale=en_US.UTF-8"/' $(CHROOT)/etc/conf.d/postgresql-$(PGVER)
|
||||
$(inroot) eselect postgresql set $(PGVER)
|
||||
rm -rf $(CHROOT)/var/lib/postgresql/$(PGVER)
|
||||
yes | $(inroot) $(EMERGE) --config postgresql:$(PGVER)
|
||||
$(inroot) rc-update add postgresql-$(PGVER) default
|
||||
$(inroot) chsh -s /bin/sh postgres
|
||||
$(inroot) $(EMERGE) -1n $(USEPKG) dev-python/virtualenv
|
||||
rm -rf $(CHROOT)/$(APP_ROOT)
|
||||
hg clone -u $(AIRPORT_BRANCH) $(AIRPORT_REPO) $(CHROOT)/$(APP_ROOT)
|
||||
chroot $(CHROOT) virtualenv -p /usr/bin/python3 $(APP_ROOT)
|
||||
$(inroot) bash -c ". $(APP_ROOT)/bin/activate ; pip install -r $(APP_ROOT)/requirements.txt"
|
||||
$(inroot) bash -c ". $(APP_ROOT)/bin/activate ; pip install psycopg2 uwsgi"
|
||||
mkdir -p $(CHROOT)/$(APP_ROOT)/etc
|
||||
touch $(CHROOT)/$(APP_ROOT)/etc/__init__.py
|
||||
cp settings.py $(CHROOT)/$(APP_ROOT)/etc
|
||||
$(inroot) id -u airport >/dev/null || $(inroot) useradd -d $(APP_ROOT) -M -U -G postgres airport
|
||||
mkdir -p $(CHROOT)/$(APP_ROOT)/bin
|
||||
cp start-airport $(CHROOT)/$(APP_ROOT)/bin/start-airport
|
||||
cp stop-airport $(CHROOT)/$(APP_ROOT)/bin/stop-airport
|
||||
cp stop-game $(CHROOT)/$(APP_ROOT)/bin/stop-game
|
||||
$(inroot) chown -R airport:airport $(APP_ROOT)
|
||||
cp local.start $(CHROOT)/etc/local.d/airport.start
|
||||
cp local.stop $(CHROOT)/etc/local.d/airport.stop
|
||||
ifdef AIRPORT_SERIES
|
||||
cat settings_$(AIRPORT_SERIES).py >> $(CHROOT)/$(APP_ROOT)/etc/settings.py
|
||||
cp $(CHROOT)/$(APP_ROOT)/djangoproject/airport/fixtures/$(AIRPORT_SERIES).json \
|
||||
$(CHROOT)/$(APP_ROOT)/djangoproject/airport/fixtures/initial_data.json
|
||||
endif
|
||||
cp issue $(CHROOT)/etc/issue
|
||||
$(M4) -D HOSTNAME=$(HOSTNAME) nginx.conf > $(CHROOT)/etc/nginx/nginx.conf
|
||||
$(inroot) gpasswd -a nginx airport
|
||||
$(inroot) ln -sf /etc/init.d/nginx $(rcdefault)/nginx
|
||||
ifeq ($(AVAHI),YES)
|
||||
$(inroot) $(EMERGE) -n $(USEPKG) net-dns/avahi
|
||||
$(inroot) rm -f /etc/avahi/services/*
|
||||
cp airport.service $(CHROOT)/etc/avahi/services
|
||||
$(inroot) ln -sf /etc/init.d/avahi-daemon $(rcdefault)/avahi-daemon
|
||||
endif
|
||||
$(inroot) $(EMERGE) --depclean --with-bdeps=n
|
||||
|
||||
|
||||
clean:
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<service-group>
|
||||
<name>Airport</name>
|
||||
<service>
|
||||
<type>_http._tcp</type>
|
||||
<port>80</port>
|
||||
</service>
|
||||
</service-group>
|
|
@ -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
|
|
@ -1,15 +0,0 @@
|
|||
[H[2J
|
||||
|
|
||||
|
|
||||
|
|
||||
_|_
|
||||
/___\\
|
||||
/_____\\
|
||||
/oo oo\\
|
||||
\\___________________________\\ /___________________________/
|
||||
`-----------|------|--------\\_____/--------|------|-----------'
|
||||
( ) ( ) O|OOo|oOO|O ( ) ( )
|
||||
------------------------------------------------------------------------------
|
||||
Airport Console
|
||||
------------------------------------------------------------------------------
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ ! -f /etc/firstboot ] ; then
|
||||
echo Creating Airport database...
|
||||
createuser -U postgres -D -l -R -S airport
|
||||
createdb -U postgres -E utf8 -O airport airport
|
||||
fi
|
||||
|
||||
su -c "/var/airport/bin/start-airport" airport
|
||||
|
||||
touch /etc/firstboot
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
su -c "/var/airport/bin/stop-airport" airport
|
|
@ -1,4 +0,0 @@
|
|||
# Settings for Airport
|
||||
PYTHON_TARGETS="python3_4"
|
||||
USE_PYTHON="3.4"
|
||||
NGINX_MODULES_HTTP="auth_basic gzip proxy referer rewrite headers_more uwsgi"
|
|
@ -1,81 +0,0 @@
|
|||
user nginx nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error_log info;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main
|
||||
'$remote_addr - $remote_user [$time_local] '
|
||||
'"$request" $status $bytes_sent '
|
||||
'"$http_referer" "$http_user_agent" '
|
||||
'"$gzip_ratio"';
|
||||
|
||||
client_header_timeout 10m;
|
||||
client_body_timeout 10m;
|
||||
send_timeout 10m;
|
||||
|
||||
connection_pool_size 256;
|
||||
client_header_buffer_size 1k;
|
||||
large_client_header_buffers 4 2k;
|
||||
request_pool_size 4k;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 8k;
|
||||
gzip_types text/plain;
|
||||
|
||||
output_buffers 1 32k;
|
||||
postpone_output 1460;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
||||
keepalive_timeout 75 20;
|
||||
|
||||
ignore_invalid_headers on;
|
||||
|
||||
index index.html;
|
||||
|
||||
server {
|
||||
listen 0.0.0.0;
|
||||
server_name HOSTNAME;
|
||||
|
||||
location /static/ {
|
||||
alias /var/airport/djangoproject/airport/static/;
|
||||
}
|
||||
|
||||
location / {
|
||||
uwsgi_pass unix:///var/airport/airport.sock;
|
||||
include /etc/nginx/uwsgi_params;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/HOSTNAME.access_log main;
|
||||
error_log /var/log/nginx/HOSTNAME.error_log info;
|
||||
|
||||
root /var/www/localhost/htdocs;
|
||||
}
|
||||
|
||||
# SSL example
|
||||
#server {
|
||||
# listen 127.0.0.1:443;
|
||||
# server_name localhost;
|
||||
|
||||
# ssl on;
|
||||
# ssl_certificate /etc/ssl/nginx/nginx.pem;
|
||||
# ssl_certificate_key /etc/ssl/nginx/nginx.key;
|
||||
|
||||
# access_log /var/log/nginx/localhost.ssl_access_log main;
|
||||
# error_log /var/log/nginx/localhost.ssl_error_log info;
|
||||
|
||||
# root /var/www/localhost/htdocs;
|
||||
#}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
dev-db/postgresql:9.4 **
|
||||
dev-python/virtualenv **
|
||||
sys-kernel/gentoo-sources ~amd64 ~x86
|
|
@ -1,17 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-lang/python ssl threads xml
|
||||
dev-libs/libpcre cxx
|
||||
dev-util/pkgconfig internal-glib
|
||||
net-misc/dhcp client
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/portage python3 ipc
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
||||
|
||||
dev-db/postgresql server
|
||||
www-servers/nginx http
|
|
@ -1,156 +0,0 @@
|
|||
# Django settings for djangoproject project.
|
||||
import os
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ADMINS = (
|
||||
('Your Name', 'your@email.com'),
|
||||
)
|
||||
|
||||
MANAGERS = ADMINS
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'airport',
|
||||
'USER': 'airport',
|
||||
'PASSWORD': '',
|
||||
'HOST': '',
|
||||
'PORT': '',
|
||||
'CONN_MAX_AGE': None,
|
||||
}
|
||||
}
|
||||
|
||||
# Local time zone for this installation. Choices can be found here:
|
||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||
# although not all choices may be available on all operating systems.
|
||||
# On Unix systems, a value of None will cause Django to use the same
|
||||
# timezone as the operating system.
|
||||
# If running in a Windows environment this must be set to the same as your
|
||||
# system time zone.
|
||||
TIME_ZONE = 'America/New_York'
|
||||
|
||||
# Language code for this installation. All choices can be found here:
|
||||
# http://www.i18nguy.com/unicode/language-identifiers.html
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
# If you set this to False, Django will make some optimizations so as not
|
||||
# to load the internationalization machinery.
|
||||
USE_I18N = False
|
||||
|
||||
# If you set this to False, Django will not format dates, numbers and
|
||||
# calendars according to the current locale
|
||||
USE_L10N = True
|
||||
|
||||
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
||||
# Example: "/home/media/media.lawrence.com/media/"
|
||||
MEDIA_ROOT = ''
|
||||
|
||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||
# trailing slash.
|
||||
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
|
||||
MEDIA_URL = ''
|
||||
|
||||
# Absolute path to the directory static files should be collected to.
|
||||
# Don't put anything in this directory yourself; store your static files
|
||||
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||
# Example: "/home/media/media.lawrence.com/static/"
|
||||
STATIC_ROOT = ''
|
||||
|
||||
# URL prefix for static files.
|
||||
# Example: "http://media.lawrence.com/static/"
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
# URL prefix for admin static files -- CSS, JavaScript and images.
|
||||
# Make sure to use a trailing slash.
|
||||
# Examples: "http://foo.com/static/admin/", "/static/admin/".
|
||||
ADMIN_MEDIA_PREFIX = '/static/admin/'
|
||||
|
||||
# Additional locations of static files
|
||||
STATICFILES_DIRS = (
|
||||
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
||||
# Always use forward slashes, even on Windows.
|
||||
# Don't forget to use absolute paths, not relative paths.
|
||||
)
|
||||
|
||||
# List of finder classes that know how to find static files in
|
||||
# various locations.
|
||||
STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||
)
|
||||
|
||||
# Make this unique, and don't share it with anybody.
|
||||
SECRET_KEY = '5vv-a3_^4a5uk=88m-jow=62*nvo0)0nn)wh)^ea^l=-+o9zuv'
|
||||
|
||||
# List of callables that know how to import templates from various sources.
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
# 'django.template.loaders.eggs.Loader',
|
||||
)
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'airport.context_processors.externals',
|
||||
'airport.context_processors.game_name',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'djangoproject.urls'
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||
# Always use forward slashes, even on Windows.
|
||||
# Don't forget to use absolute paths, not relative paths.
|
||||
)
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
#'django.contrib.sites',
|
||||
'django.contrib.messages',
|
||||
#'django.contrib.staticfiles',
|
||||
'django.contrib.humanize',
|
||||
'airport'
|
||||
)
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
# performed by this configuration is to send an email to
|
||||
# the site admins on every HTTP 500 error.
|
||||
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
||||
# more details on how to customize your logging configuration.
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'handlers': {
|
||||
'mail_admins': {
|
||||
'level': 'ERROR',
|
||||
'class': 'django.utils.log.AdminEmailHandler'
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'django.request': {
|
||||
'handlers': ['mail_admins'],
|
||||
'level': 'ERROR',
|
||||
'propagate': True,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
AIRPORT = {
|
||||
'GAMESERVER_MULTIPROCESSING': True,
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
AIRPORT = {
|
||||
'GAME_NAME': 'Airport Europe',
|
||||
'SCALE_FLIGHT_TIMES': False,
|
||||
'GAMESERVER_MULTIPROCESSING': True,
|
||||
'CRUISE_SPEED': 13.0,
|
||||
'GAMESERVER_LOOP_DELAY': 3,
|
||||
'MAP_INITIAL_LATITUDE': 53.58,
|
||||
'MAP_INITIAL_LONGITUDE': 23.11,
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/sh
|
||||
# this should be run as the airport user
|
||||
|
||||
PYTHON=python
|
||||
PYTHONPATH=/var/airport ; export PYTHONPATH
|
||||
DJANGO_SETTINGS_MODULE="etc.settings" ; export DJANGO_SETTINGS_MODULE
|
||||
|
||||
cd ~
|
||||
. bin/activate
|
||||
cd djangoproject
|
||||
|
||||
if [ ! -f "/etc/firstboot" ] ; then
|
||||
$PYTHON manage.py syncdb --noinput --verbosity=0
|
||||
$PYTHON manage.py collectstatic --noinput --verbosity=0
|
||||
fi
|
||||
|
||||
# start the uwsgi daemon
|
||||
uwsgi --socket /var/airport/airport.sock \
|
||||
--chmod=660 \
|
||||
-w djangoproject.wsgi \
|
||||
--uid airport \
|
||||
--gid airport \
|
||||
--pidfile /var/airport/uwsgi.pid \
|
||||
--daemonize2 /var/airport/airport.log \
|
||||
-T
|
||||
|
||||
# Start the Game Server
|
||||
$PYTHON manage.py gameserver --verbosity=2 $@ > "/var/airport/gameserver.log" 2>&1 &
|
||||
echo $! > "/var/airport/gameserver.pid"
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
# this should be run as the airport user
|
||||
|
||||
[ -f "/var/airport/gameserver.pid" ] && kill $(cat "/var/airport/gameserver.pid")
|
||||
[ -f "/var/airport/uwsgi.pid" ] && kill $(cat "/var/airport/uwsgi.pid")
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
# this should be run as the airport user
|
||||
|
||||
PYTHON=python
|
||||
PYTHONPATH=/var/airport ; export PYTHONPATH
|
||||
DJANGO_SETTINGS_MODULE="etc.settings" ; export DJANGO_SETTINGS_MODULE
|
||||
|
||||
game_id=$1
|
||||
cd ~
|
||||
. bin/activate
|
||||
cd djangoproject
|
||||
|
||||
$PYTHON manage.py gameserver --forcequit $1
|
|
@ -1,2 +0,0 @@
|
|||
dev-db/postgresql:9.4
|
||||
www-servers/nginx
|
|
@ -1,6 +1,3 @@
|
|||
preinstall:
|
||||
|
||||
postinstall:
|
||||
|
||||
clean:
|
||||
|
||||
|
|
|
@ -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
|
|
@ -1 +0,0 @@
|
|||
sys-kernel/gentoo-sources ~amd64 ~x86
|
|
@ -1,13 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-lang/python ssl threads xml
|
||||
dev-libs/libpcre cxx
|
||||
dev-util/pkgconfig internal-glib
|
||||
net-misc/dhcp client
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/portage python3 ipc
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
|
@ -1 +0,0 @@
|
|||
net-misc/dhcp
|
|
@ -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)
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
set -g mouse on
|
||||
set-option -g set-titles on
|
||||
set-option -g set-titles-string "#S / #T"
|
|
@ -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"
|
|
@ -0,0 +1,3 @@
|
|||
# Base system
|
||||
app-emulation/open-vm-tools
|
||||
sys-auth/pam_ssh_agent_auth
|
|
@ -0,0 +1,2 @@
|
|||
# Python: nur Version 3.12 verwenden (s. auch make.conf: PYTHON-Variable)
|
||||
>=dev-lang/python-3.13
|
|
@ -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
|
|
@ -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
|
|
@ -1,47 +0,0 @@
|
|||
PGVER = 9.3
|
||||
DPASTE_USER = dpaste
|
||||
DPASTE_HOME = /opt/dpaste
|
||||
PIP = $(DPASTE_HOME)/bin/pip
|
||||
DPASTE_REPO = https://github.com/bartTC/dpaste
|
||||
|
||||
rcdefault := /etc/runlevels/default
|
||||
|
||||
preinstall:
|
||||
|
||||
postinstall: bash_profile nginx.conf dpaste.init settings.py firstboot.start
|
||||
$(inroot) $(EMERGE) $(USEPKG) -1n dev-vcs/git
|
||||
$(inroot) $(EMERGE) -n $(USEPKG) dev-db/postgresql-server:$(PGVER)
|
||||
$(inroot) passwd -d postgres
|
||||
$(inroot) eselect postgresql set $(PGVER)
|
||||
$(inroot) rm -rf /var/lib/postgresql/$(PGVER)/data
|
||||
yes | $(inroot) $(EMERGE) --config postgresql-server:$(PGVER)
|
||||
$(inroot) ln -sf /etc/init.d/postgresql-$(PGVER) $(rcdefault)/postgresql-$(PGVER)
|
||||
$(inroot) $(EMERGE) -1n $(USEPKG) dev-python/virtualenv
|
||||
$(inroot) getent passwd $(DPASTE_USER) || \
|
||||
$(inroot) useradd -c "Dpaste Server" -G postgres -U -d $(DPASTE_HOME) $(DPASTE_USER)
|
||||
rm -rf $(CHROOT)/$(DPASTE_HOME)
|
||||
mkdir -p $(CHROOT)/$(DPASTE_HOME)
|
||||
mkdir -p $(CHROOT)/$(DPASTE_HOME)/media
|
||||
mkdir -p $(CHROOT)/$(DPASTE_HOME)/var
|
||||
$(inroot) rm -rf $(DPASTE_HOME)/dpaste
|
||||
$(inroot) git clone $(DPASTE_REPO) $(DPASTE_HOME)/dpaste
|
||||
sed -i 's/dpaste\.de/dpaste/g' $(CHROOT)/$(DPASTE_HOME)/dpaste/dpaste/templates/dpaste/*.html
|
||||
cp bash_profile $(CHROOT)$(DPASTE_HOME)/.bash_profile
|
||||
$(inroot) virtualenv -p /usr/bin/python2.7 $(DPASTE_HOME)
|
||||
$(inroot) $(PIP) install -r $(DPASTE_HOME)/dpaste/requirements.txt
|
||||
$(inroot) $(PIP) install psycopg2
|
||||
$(inroot) $(DPASTE_HOME)/bin/django-admin.py startproject project $(DPASTE_HOME)
|
||||
grep ^SECRET_KEY $(CHROOT)/$(DPASTE_HOME)/project/settings.py > $(CHROOT)/$(DPASTE_HOME)/project/keyfile.py
|
||||
cp settings.py $(CHROOT)/$(DPASTE_HOME)/project/settings.py
|
||||
chmod +x $(CHROOT)/$(DPASTE_HOME)/manage.py
|
||||
cp nginx.conf $(CHROOT)/etc/nginx
|
||||
cp dpaste.init $(CHROOT)/etc/init.d/dpaste
|
||||
cp firstboot.start $(CHROOT)/etc/local.d/firstboot.start
|
||||
touch $(CHROOT)/firstboot
|
||||
ln -sf /etc/init.d/nginx $(CHROOT)/$(rcdefault)/nginx
|
||||
$(inroot) ln -sf ../manage.py $(DPASTE_HOME)/bin/manage
|
||||
$(inroot) $(EMERGE) --depclean --with-bdeps=n
|
||||
|
||||
|
||||
clean:
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
export DJANGO_SETTINGS_MODULE='project.settings_local'
|
||||
PATH="$HOME/bin:$PATH"
|
||||
. activate
|
|
@ -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
|
|
@ -1,35 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
# Copyright 2013-2014 Marduk Enterprises (marduk@python.net)
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="GUnicorn server for the dpaste app"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
after nginx
|
||||
after postgresql-9.3
|
||||
}
|
||||
|
||||
|
||||
start() {
|
||||
ebegin "Starting dpaste"
|
||||
. /opt/dpaste/bin/activate
|
||||
export PYTHONPATH=/opt/dpaste/dpaste
|
||||
start-stop-daemon --start --exec /opt/dpaste/bin/python -- /opt/dpaste/manage.py run_gunicorn \
|
||||
--user=dpaste \
|
||||
--daemon \
|
||||
--group=dpaste \
|
||||
--workers=2 \
|
||||
--error-logfile=/opt/dpaste/var/gunicorn.error.log \
|
||||
--pid=/opt/dpaste/var/gunicorn.pid \
|
||||
--bind=unix:///opt/dpaste/var/dpaste.sock
|
||||
}
|
||||
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping dpaste"
|
||||
start-stop-daemon --stop \
|
||||
--pidfile /opt/dpaste/var/gunicorn.pid \
|
||||
--exec /opt/dpaste/bin/python
|
||||
eend $? "Failed to stop dpaste"
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
[ -e /firstboot ] || exit 0
|
||||
|
||||
echo 'Creating dpaste database'
|
||||
createuser -U postgres -D -S -R dpaste
|
||||
createdb -U postgres dpaste
|
||||
|
||||
. /opt/dpaste/bin/activate
|
||||
PYTHON=/opt/dpaste/bin/python
|
||||
PYTHONPATH=/opt/dpaste/dpaste ; export PYTHONPATH
|
||||
$PYTHON /opt/dpaste/manage.py syncdb --noinput
|
||||
$PYTHON /opt/dpaste/manage.py migrate --all
|
||||
rc-update add dpaste default
|
||||
/etc/init.d/dpaste start
|
||||
|
||||
rm /firstboot
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
# NGINX flags
|
||||
NGINX_MODULES_HTTP="auth_basic gzip proxy referer rewrite headers_more uwsgi"
|
|
@ -1,68 +0,0 @@
|
|||
user nginx nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error_log info;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main
|
||||
'$remote_addr - $remote_user [$time_local] '
|
||||
'"$request" $status $bytes_sent '
|
||||
'"$http_referer" "$http_user_agent" '
|
||||
'"$gzip_ratio"';
|
||||
|
||||
client_header_timeout 10m;
|
||||
client_body_timeout 10m;
|
||||
send_timeout 10m;
|
||||
|
||||
connection_pool_size 256;
|
||||
client_header_buffer_size 1k;
|
||||
large_client_header_buffers 4 2k;
|
||||
request_pool_size 4k;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 8k;
|
||||
gzip_types text/plain;
|
||||
|
||||
output_buffers 1 32k;
|
||||
postpone_output 1460;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
||||
keepalive_timeout 75 20;
|
||||
|
||||
ignore_invalid_headers on;
|
||||
|
||||
index index.html;
|
||||
|
||||
upstream dpaste {
|
||||
server unix:///opt/dpaste/var/dpaste.sock;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 0.0.0.0;
|
||||
|
||||
location /static/ {
|
||||
alias /opt/dpaste/dpaste/dpaste/static/;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://dpaste;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/dpaste.access_log main;
|
||||
error_log /var/log/nginx/dpaste.error_log info;
|
||||
|
||||
root /var/www/localhost/htdocs;
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
sys-kernel/gentoo-sources ~amd64 ~x86
|
|
@ -1,15 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-lang/python ssl threads xml
|
||||
dev-libs/libpcre cxx
|
||||
dev-util/pkgconfig internal-glib
|
||||
dev-vcs/git curl
|
||||
net-misc/curl ssl curl_ssl_openssl
|
||||
net-misc/dhcp client
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/portage python3 ipc
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
|
@ -1,151 +0,0 @@
|
|||
# Django settings for dpaste project.
|
||||
|
||||
DEBUG = False
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ADMINS = (
|
||||
# ('Your Name', 'your_email@example.com'),
|
||||
)
|
||||
|
||||
MANAGERS = ADMINS
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
||||
'NAME': 'dpaste', # Or path to database file if using sqlite3.
|
||||
# The following settings are not used with sqlite3:
|
||||
'USER': 'dpaste',
|
||||
'PASSWORD': '',
|
||||
'HOST': 'localhost', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
|
||||
'PORT': '', # Set to empty string for default.
|
||||
}
|
||||
}
|
||||
|
||||
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
||||
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
# Local time zone for this installation. Choices can be found here:
|
||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||
# although not all choices may be available on all operating systems.
|
||||
# In a Windows environment this must be set to your system time zone.
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
# Language code for this installation. All choices can be found here:
|
||||
# http://www.i18nguy.com/unicode/language-identifiers.html
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
# If you set this to False, Django will make some optimizations so as not
|
||||
# to load the internationalization machinery.
|
||||
USE_I18N = True
|
||||
|
||||
# If you set this to False, Django will not format dates, numbers and
|
||||
# calendars according to the current locale.
|
||||
USE_L10N = True
|
||||
|
||||
# If you set this to False, Django will not use timezone-aware datetimes.
|
||||
USE_TZ = True
|
||||
|
||||
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
||||
# Example: "/var/www/example.com/media/"
|
||||
MEDIA_ROOT = ''
|
||||
|
||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||
# trailing slash.
|
||||
# Examples: "http://example.com/media/", "http://media.example.com/"
|
||||
MEDIA_URL = ''
|
||||
|
||||
# Absolute path to the directory static files should be collected to.
|
||||
# Don't put anything in this directory yourself; store your static files
|
||||
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||
# Example: "/var/www/example.com/static/"
|
||||
STATIC_ROOT = ''
|
||||
|
||||
# URL prefix for static files.
|
||||
# Example: "http://example.com/static/", "http://static.example.com/"
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
# Additional locations of static files
|
||||
STATICFILES_DIRS = (
|
||||
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
||||
# Always use forward slashes, even on Windows.
|
||||
# Don't forget to use absolute paths, not relative paths.
|
||||
)
|
||||
|
||||
# List of finder classes that know how to find static files in
|
||||
# various locations.
|
||||
STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||
)
|
||||
|
||||
from keyfile import SECRET_KEY
|
||||
|
||||
# List of callables that know how to import templates from various sources.
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
# 'django.template.loaders.eggs.Loader',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
# Uncomment the next line for simple clickjacking protection:
|
||||
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'dpaste.urls'
|
||||
|
||||
# Python dotted path to the WSGI application used by Django's runserver.
|
||||
WSGI_APPLICATION = 'project.wsgi.application'
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||
# Always use forward slashes, even on Windows.
|
||||
# Don't forget to use absolute paths, not relative paths.
|
||||
)
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.staticfiles',
|
||||
'mptt',
|
||||
'south',
|
||||
'gunicorn',
|
||||
'dpaste',
|
||||
)
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
# performed by this configuration is to send an email to
|
||||
# the site admins on every HTTP 500 error when DEBUG=False.
|
||||
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
||||
# more details on how to customize your logging configuration.
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'filters': {
|
||||
'require_debug_false': {
|
||||
'()': 'django.utils.log.RequireDebugFalse'
|
||||
}
|
||||
},
|
||||
'handlers': {
|
||||
'mail_admins': {
|
||||
'level': 'ERROR',
|
||||
'filters': ['require_debug_false'],
|
||||
'class': 'django.utils.log.AdminEmailHandler'
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'django.request': {
|
||||
'handlers': ['mail_admins'],
|
||||
'level': 'ERROR',
|
||||
'propagate': True,
|
||||
},
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
net-misc/dhcp
|
||||
dev-lang/python:2.7
|
||||
www-servers/nginx
|
|
@ -1,27 +0,0 @@
|
|||
PGVER = 9.3
|
||||
DPVER = 7.27
|
||||
|
||||
inroot := chroot $(CHROOT)
|
||||
rcdefault := /etc/runlevels/default
|
||||
|
||||
preinstall:
|
||||
|
||||
postinstall: firstboot.start
|
||||
$(inroot) passwd -d postgres
|
||||
echo 'PG_INITDB_OPTS="--locale=en_US.UTF-8"' >> $(CHROOT)/etc/conf.d/postgresql-$(PGVER)
|
||||
$(inroot) eselect postgresql set $(PGVER)
|
||||
rm -rf $(CHROOT)/var/lib/postgresql/$(PGVER)
|
||||
yes | $(inroot) $(EMERGE) --config =postgresql-server-$(PGVER)*
|
||||
$(inroot) ln -sf /etc/init.d/postgresql-$(PGVER) $(rcdefault)/postgresql-$(PGVER)
|
||||
$(inroot) ln -sf /etc/init.d/apache2 $(rcdefault)/apache2
|
||||
$(inroot) eselect php set apache2 1
|
||||
grep '^[^#].*PHP5' $(CHROOT)/etc/conf.d/apache2 || \
|
||||
echo 'APACHE2_OPTS="$$APACHE2_OPTS -D PHP5"' \
|
||||
>> $(CHROOT)/etc/conf.d/apache2
|
||||
$(inroot) cp /usr/share/webapps/drupal/$(DPVER)/htdocs/sites/default/default.settings.php /usr/share/webapps/drupal/$(DPVER)/htdocs/sites/default/settings.php
|
||||
[ -e "$(CHROOT)/var/www/localhost/htdocs/.webapp-drupal-$(DPVER)" ] || \
|
||||
$(inroot) webapp-config -I drupal $(DPVER)
|
||||
cp firstboot.start $(CHROOT)/etc/local.d/
|
||||
|
||||
clean:
|
||||
|
|
@ -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
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
DPVER=7.27
|
||||
|
||||
echo Configuring Postgres for Drupal
|
||||
createuser --no-adduser --no-createdb --no-createrole -U postgres drupal
|
||||
createdb --encoding=UNICODE --owner=drupal -U postgres drupal
|
||||
|
||||
mv /etc/local.d/firstboot.start /etc/local.d/firstboot.start.disabled
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
# Apache config for LodgeIt
|
||||
APACHE2_MPMS="prefork"
|
||||
APACHE2_MODULES="authz_host dir mime"
|
||||
PHP_TARGETS="php5-5"
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
EXTERNAL_KERNEL=$1
|
||||
VIRTIO=$2
|
||||
DISK_SIZE=$3
|
||||
SWAP_SIZE=$4
|
||||
UDEV=$5
|
||||
DASH=$6
|
||||
ARCH=$7
|
||||
|
||||
DPVER=7.27
|
||||
|
||||
TZ=$TIMEZONE ; export TZ
|
||||
|
||||
cat << EOF
|
||||
|
||||
Before using this appliance, you must first configure Drupal, point your
|
||||
browser at http://${HOSTNAME}/ to configure. The database name is
|
||||
"drupal" and the username is "drupal". The DBMS is on localhost and
|
||||
requires no password.
|
||||
EOF
|
|
@ -1,5 +0,0 @@
|
|||
dev-db/postgresql-base ~amd64 ~x86
|
||||
dev-db/postgresql-server ~amd64 ~x86
|
||||
dev-php/pecl-uploadprogress ~amd64 ~x86
|
||||
sys-kernel/gentoo-sources ~amd64 ~x86
|
||||
www-apps/drupal ~amd64 ~x86
|
|
@ -1,17 +0,0 @@
|
|||
app-admin/eselect-php apache2
|
||||
app-editors/nano ncurses
|
||||
dev-lang/php ctype fileinfo filter iconv phar posix simplexml tokenizer apache2 xml pdo gd postgres apache2 zlib cli session hash json
|
||||
dev-lang/python ssl threads xml
|
||||
dev-php/pecl-apc lock_pthreadmutex php_targets_php5-3
|
||||
dev-php/pecl-uploadprogress php_targets_php5-3
|
||||
dev-util/pkgconfig internal-glib
|
||||
mail-mta/ssmtp mta ssl
|
||||
net-misc/dhcp client
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
||||
www-apps/drupal postgres -mysql
|
|
@ -1,4 +0,0 @@
|
|||
dev-db/postgresql-server:9.3
|
||||
dev-php/pecl-uploadprogress
|
||||
mail-mta/ssmtp
|
||||
www-apps/drupal
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
preinstall: custom.conf dhclient.conf
|
||||
mkdir -p "$(CHROOT)"/etc/dhcp
|
||||
cp dhclient.conf "$(CHROOT)"/etc/dhcp/dhclient.conf
|
||||
mkdir -p "$(CHROOT)"/etc/gdm
|
||||
cp custom.conf "$(CHROOT)"/etc/gdm/custom.conf
|
||||
|
||||
|
||||
postinstall:
|
||||
$(inroot) systemctl enable NetworkManager.service
|
||||
$(inroot) systemctl enable gdm.service
|
||||
$(inroot) systemctl enable avahi-daemon.service
|
||||
$(inroot) ln -nsf /usr/lib/systemd/systemd /sbin/init
|
||||
|
||||
clean:
|
||||
|
|
@ -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
|
|
@ -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.
|
||||
#
|
|
@ -1,34 +0,0 @@
|
|||
send host-name = pick-first-value(gethostname(), "ISC-dhclient");
|
||||
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
|
||||
#send dhcp-lease-time 3600;
|
||||
#supersede domain-search "fugue.com", "home.vix.com";
|
||||
#prepend domain-name-servers 127.0.0.1;
|
||||
#request subnet-mask, broadcast-address, time-offset, routers,
|
||||
# domain-name, domain-name-servers, host-name;
|
||||
#require subnet-mask, domain-name-servers;
|
||||
#timeout 60;
|
||||
#retry 60;
|
||||
#reboot 10;
|
||||
#select-timeout 5;
|
||||
#initial-interval 2;
|
||||
#media "-link0 -link1 -link2", "link0 link1";
|
||||
#reject 192.33.137.209;
|
||||
|
||||
#alias {
|
||||
# interface "ep0";
|
||||
# fixed-address 192.5.5.213;
|
||||
# option subnet-mask 255.255.255.255;
|
||||
#}
|
||||
|
||||
#lease {
|
||||
# interface "ep0";
|
||||
# fixed-address 192.33.137.200;
|
||||
# medium "link0 link1";
|
||||
# option subnet-mask 255.255.255.0;
|
||||
# option broadcast-address 192.33.137.255;
|
||||
# option routers 192.33.137.250;
|
||||
# option domain-name-servers 127.0.0.1;
|
||||
# renew 2 2000/1/12 00:00:01;
|
||||
# rebind 2 2000/1/12 00:00:01;
|
||||
# expire 2 2000/1/12 00:00:01;
|
||||
#}
|
|
@ -1,6 +0,0 @@
|
|||
PYTHON_TARGETS="python2_7"
|
||||
PYTHON_SINGLE_TARGET="python2_7"
|
||||
USE="$USE introspection pulseaudio -openrc systemd"
|
||||
RUBY_TARGETS=ruby20
|
||||
VIDEO_CARDS=""
|
||||
APACHE2_MODULES="auth_digest authn_file authz_groupfile dav dav_fs"
|
|
@ -1,75 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-lang/python ssl sqlite threads xml
|
||||
dev-util/pkgconfig internal-glib
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/portage python3 ipc
|
||||
sys-apps/systemd gudev kmod
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
||||
virtual/udev gudev kmod
|
||||
|
||||
# for gnome
|
||||
app-crypt/gcr gtk vala
|
||||
app-crypt/libsecret crypt # wtf?
|
||||
app-crypt/pinentry gtk
|
||||
app-text/enchant hunspell
|
||||
app-text/poppler cairo
|
||||
dev-cpp/gtkmm X
|
||||
dev-db/sqlite extensions
|
||||
dev-lang/vala vapigen
|
||||
dev-libs/folks eds telepathy
|
||||
dev-libs/gjs cairo
|
||||
dev-libs/libpeas gtk
|
||||
dev-libs/libxml2 python
|
||||
dev-python/pygobject threads
|
||||
gnome-base/gconf gtk policykit
|
||||
gnome-base/gnome extras
|
||||
gnome-base/gnome-menus python
|
||||
gnome-base/gnome-panel bonobo
|
||||
gnome-base/gnome-settings-daemon policykit udev
|
||||
gnome-base/gvfs cdda gdu gtk http udev udisks
|
||||
gnome-base/librsvg gtk
|
||||
gnome-extra/evolution-data-server gnome-online-accounts ssl vala weather
|
||||
mail-client/evolution ssl
|
||||
media-libs/clutter gtk
|
||||
media-libs/cogl glib opengl pango
|
||||
media-libs/gst-plugins-base X pango
|
||||
media-libs/gst-plugins-base ogg theora vorbis
|
||||
media-libs/harfbuzz glib icu truetype
|
||||
media-libs/libcanberra gtk gtk3
|
||||
media-libs/libtheora encode
|
||||
media-libs/mesa gallium egl gles2 llvm nptl
|
||||
media-libs/swfdec gtk
|
||||
media-sound/pulseaudio glib udev
|
||||
net-dialup/ppp ipv6
|
||||
net-dns/avahi dbus
|
||||
net-libs/glib-networking ssl
|
||||
net-libs/gtk-vnc gtk3
|
||||
net-libs/libsoup gnome ssl
|
||||
net-libs/telepathy-glib vala
|
||||
net-libs/webkit-gtk gstreamer jit opengl webgl
|
||||
net-misc/curl ssl
|
||||
net-misc/dhcp client
|
||||
net-misc/networkmanager dhclient gnutls modemmanager ppp
|
||||
net-misc/vino avahi zlib
|
||||
net-print/cups dbus gnutls
|
||||
sys-apps/dbus X
|
||||
sys-apps/hwids udev
|
||||
sys-apps/systemd policykit
|
||||
sys-auth/consolekit policykit
|
||||
sys-auth/pambase consolekit
|
||||
sys-block/parted device-mapper
|
||||
sys-fs/udev gudev hwdb
|
||||
sys-power/upower deprecated
|
||||
virtual/udev gudev hwdb
|
||||
x11-apps/xinit minimal
|
||||
x11-base/xorg-server minimal nptl
|
||||
x11-libs/cairo glib svg X opengl
|
||||
x11-libs/gdk-pixbuf X jpeg
|
||||
x11-libs/gtk+ jpeg X
|
||||
x11-libs/pango X
|
||||
x11-themes/gnome-themes-standard gtk
|
|
@ -1,4 +0,0 @@
|
|||
gnome-base/gnome
|
||||
media-fonts/dejavu
|
||||
media-fonts/freefont
|
||||
x11-apps/xauth
|
|
@ -1,15 +0,0 @@
|
|||
preinstall:
|
||||
|
||||
|
||||
postinstall:
|
||||
$(inroot) eselect python set python2.7
|
||||
$(inroot) python-updater -- --usepkg=n
|
||||
|
||||
# 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:
|
||||
|
|
@ -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
|
|
@ -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
|
|
@ -1 +0,0 @@
|
|||
sys-kernel/gentoo-sources ~amd64 ~x86
|
|
@ -1,15 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-db/sqlite extensions
|
||||
dev-lang/python ssl sqlite threads xml
|
||||
dev-util/pkgconfig internal-glib
|
||||
dev-vcs/git curl
|
||||
dev-vcs/mercurial python_targets_python2_7
|
||||
net-misc/curl ssl threads curl_ssl_openssl
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/portage python2
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
|
@ -1,5 +0,0 @@
|
|||
<dev-lang/python-3.0
|
||||
dev-python/virtualenv
|
||||
dev-vcs/git
|
||||
dev-vcs/mercurial
|
||||
net-misc/openssh
|
|
@ -1,13 +0,0 @@
|
|||
|
||||
preinstall:
|
||||
|
||||
postinstall: kdmrc kdm.start Xaccess 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
|
||||
cp kdm.start "$(CHROOT)"/etc/local.d/kdm.start
|
||||
$(inroot) ln -nsf /etc/init.d/dbus /etc/runlevels/default/dbus
|
||||
|
||||
clean:
|
||||
|
||||
|
|
@ -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 #
|
||||
*
|
|
@ -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
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
# start script for baselayout-2 to start kdm
|
||||
|
||||
/usr/bin/kdm -daemon
|
||||
|
||||
exit 0
|
|
@ -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
|
|
@ -1,10 +0,0 @@
|
|||
[Misc]
|
||||
LastConfiguredApp=Accessibility
|
||||
|
||||
[Phonon::AudioOutput]
|
||||
KNotify_Volume=1
|
||||
|
||||
[Sounds]
|
||||
No sound=true
|
||||
Use external player=false
|
||||
Volume=100
|
|
@ -1,5 +0,0 @@
|
|||
PYTHON_TARGETS="python2_7"
|
||||
PYTHON_SINGLE_TARGET="python2_7"
|
||||
|
||||
# Settings for KDE
|
||||
USE="$USE qt3support qt4 xcomposite opengl"
|
|
@ -1,51 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-lang/python ssl threads xml
|
||||
dev-util/pkgconfig internal-glib
|
||||
mail-mta/ssmtp mta
|
||||
net-misc/dhcp client
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-auth/pambase consolekit
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
||||
|
||||
# per kde
|
||||
app-misc/strigi dbus qt4
|
||||
app-text/poppler utils
|
||||
dev-libs/libxml2 python
|
||||
dev-libs/soprano dbus raptor redland virtuoso
|
||||
dev-libs/xmlrpc-c curl
|
||||
media-libs/phonon gstreamer
|
||||
media-libs/xine-lib vorbis xcb
|
||||
media-plugins/gst-plugins-meta ogg vorbis
|
||||
net-misc/curl ssl
|
||||
sys-apps/dbus X
|
||||
sys-auth/consolekit policykit
|
||||
sys-block/parted device-mapper
|
||||
sys-fs/udev extras
|
||||
x11-libs/cairo X svg
|
||||
x11-libs/cairo glib
|
||||
dev-qt/qtcore exceptions glib qt3support ssl
|
||||
dev-qt/qtdeclarative qt3support accessibility
|
||||
dev-qt/qtgui accessibility dbus glib mng qt3support
|
||||
x11-libs/qt-opengl qt3support
|
||||
dev-qt/qt3support accessibility kde
|
||||
dev-qt/qtsql qt3support mysql
|
||||
dev-qt/qtsvg accessibility
|
||||
x11-libs/qt-webkit kde
|
||||
kde-base/kwin opengl
|
||||
kde-base/kdelibs opengl semantic-desktop
|
||||
media-libs/gd png
|
||||
app-text/poppler qt4
|
||||
net-print/cups dbus
|
||||
dev-python/PyQt4 X dbus declarative sql svg webkit
|
||||
sys-fs/udev hwdb gudev
|
||||
virtual/udev hwdb gudev
|
||||
app-crypt/qca openssl
|
||||
app-crypt/pinentry qt4
|
||||
dev-libs/boost threads
|
||||
sys-libs/zlib minizip
|
||||
app-office/akonadi-server sqlite
|
|
@ -1,4 +0,0 @@
|
|||
kde-base/kde-meta
|
||||
kde-base/kdebase-runtime-meta
|
||||
media-fonts/dejavu
|
||||
media-fonts/freefont
|
|
@ -1,10 +0,0 @@
|
|||
preinstall:
|
||||
# v8 needs python2.[67] to build but portage doesn't pull it in
|
||||
$(inroot) $(EMERGE) -1n $(USEPKG) dev-lang/python:2.7
|
||||
|
||||
postinstall:
|
||||
sed -i 's/127\.0\.0\.1/0.0.0.0/g' "$(CHROOT)"/etc/mongodb.conf
|
||||
$(inroot) rc-update add mongodb default
|
||||
|
||||
clean:
|
||||
|
|
@ -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/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
|
|
@ -1,6 +0,0 @@
|
|||
app-arch/snappy **
|
||||
dev-db/mongodb **
|
||||
dev-libs/boost ~amd64 ~x86
|
||||
dev-util/boost-build ~amd64 ~x86
|
||||
dev-libs/snowball-stemmer ~amd64 ~x86
|
||||
sys-kernel/gentoo-sources ~amd64 ~x86
|
|
@ -1,17 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-db/mongodb ssl
|
||||
dev-lang/python ssl threads xml
|
||||
dev-libs/boost threads
|
||||
dev-libs/libpcre cxx
|
||||
dev-util/pkgconfig internal-glib
|
||||
dev-util/scons python_targets_python2_7
|
||||
net-misc/curl ssl
|
||||
net-misc/dhcp client
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/portage python3 ipc
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
|
@ -1 +0,0 @@
|
|||
dev-db/mongodb
|
|
@ -1,10 +0,0 @@
|
|||
preinstall:
|
||||
|
||||
postinstall:
|
||||
sed -i 's/^APACHE2_OPTS=.*/APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D PHP5 -D SSL -D SSL_DEFAULT_VHOST"/' $(CHROOT)/etc/conf.d/apache2
|
||||
$(inroot) rc-update add apache2 default
|
||||
sed -i 's|"/var/www/localhost/htdocs"|"/var/www/localhost/htdocs/owncloud"|g' $(CHROOT)/etc/apache2/vhosts.d/default_vhost.include
|
||||
|
||||
|
||||
clean:
|
||||
|
|
@ -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
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
# Settings for owncloud
|
||||
APACHE2_MODULES="mime alias auth_basic authz_host dir env include info"
|
||||
|
||||
PYTHON_TARGETS="$PYTHON_TARGETS python3_3"
|
|
@ -1,3 +0,0 @@
|
|||
sys-kernel/gentoo-sources ~amd64 ~x86
|
||||
www-apps/owncloud ~amd64 ~x86
|
||||
app-admin/webapp-config ~amd64 ~x86
|
|
@ -1 +0,0 @@
|
|||
virtual/httpd-php-5.4
|
|
@ -1,18 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-lang/python ssl threads xml
|
||||
dev-util/pkgconfig internal-glib
|
||||
net-misc/dhcp client
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/portage python3 ipc
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
||||
|
||||
app-admin/eselect-php apache2 fpm
|
||||
dev-lang/php apache2 cgi ctype curl fileinfo filter force-cgi-redirect fpm gd hash iconv json mhash pdo session simplexml sqlite truetype xml xmlreader xmlwriter zip zlib
|
||||
dev-libs/libpcre cxx
|
||||
www-apps/owncloud curl sqlite
|
||||
www-servers/apache ssl
|
|
@ -1,2 +0,0 @@
|
|||
www-apps/owncloud
|
||||
www-servers/apache
|
|
@ -1,76 +0,0 @@
|
|||
TP_REPO ?= https://bitbucket.org/marduk/teamplayer
|
||||
TP_BRANCH ?= default
|
||||
TP_USER = teamplayer
|
||||
TP_HOME = /opt/teamplayer
|
||||
TP_DB = /var/lib/teamplayer
|
||||
PGVER = 9.4
|
||||
INSTALL = install
|
||||
AVAHI := NO
|
||||
|
||||
M4_DEFS += -D TP_USER=$(TP_USER) -D TP_HOME=$(TP_HOME) -D TP_DB=$(TP_DB) -D HOSTNAME=$(HOSTNAME)
|
||||
M4C = $(M4) $(M4_DEFS)
|
||||
|
||||
inroot := chroot $(CHROOT)
|
||||
rcdefault := /etc/runlevels/default
|
||||
|
||||
post_files = bash_profile settings_local.py start-teamplayer stop-teamplayer
|
||||
post_files += local.start local.stop issue nginx.conf teamplayer.service
|
||||
|
||||
preinstall:
|
||||
|
||||
postinstall: $(post_files) $(SCROBBLER_AUTH) urls.py
|
||||
$(inroot) $(EMERGE) -n $(USEPKG) dev-db/postgresql:$(PGVER)
|
||||
$(inroot) passwd -d postgres
|
||||
echo 'PG_INITDB_OPTS="--locale=en_US.UTF-8"' >> $(CHROOT)/etc/conf.d/postgresql-$(PGVER)
|
||||
$(inroot) eselect postgresql set $(PGVER)
|
||||
$(inroot) rm -rf /var/lib/postgresql/$(PGVER)/data
|
||||
yes | $(inroot) $(EMERGE) --config postgresql:$(PGVER)
|
||||
$(inroot) ln -sf /etc/init.d/postgresql-$(PGVER) $(rcdefault)/postgresql-$(PGVER)
|
||||
ifeq ($(AVAHI),YES)
|
||||
$(inroot) $(EMERGE) -n $(USEPKG) net-dns/avahi
|
||||
$(inroot) rm -f /etc/avahi/services/*
|
||||
cp teamplayer.service $(CHROOT)/etc/avahi/services
|
||||
$(inroot) ln -sf /etc/init.d/avahi-daemon $(rcdefault)/avahi-daemon
|
||||
endif
|
||||
$(inroot) $(EMERGE) -1n $(USEPKG) dev-python/virtualenv dev-vcs/mercurial
|
||||
$(inroot) getent passwd $(TP_USER) || \
|
||||
$(inroot) useradd -c "Teamplayer Server" -G postgres -U -d $(TP_HOME) $(TP_USER)
|
||||
rm -rf $(CHROOT)/$(TP_HOME)
|
||||
mkdir -p $(CHROOT)/$(TP_HOME)
|
||||
cp bash_profile $(CHROOT)$(TP_HOME)/.bash_profile
|
||||
$(inroot) virtualenv $(TP_HOME)
|
||||
$(inroot) bash -c ". $(TP_HOME)/bin/activate ; LANG=en_US.utf8 pip install hg+$(TP_REPO)@$(TP_BRANCH)"
|
||||
$(inroot) bash -c ". $(TP_HOME)/bin/activate ; pip install psycopg2 uwsgi Whoosh setproctitle"
|
||||
$(inroot) bash -c ". $(TP_HOME)/bin/activate ; django-admin.py startproject project $(TP_HOME)"
|
||||
chmod +x $(CHROOT)/$(TP_HOME)/manage.py
|
||||
$(inroot) ln -sf ../manage.py $(TP_HOME)/bin/manage
|
||||
cp urls.py $(CHROOT)/$(TP_HOME)/project/urls.py
|
||||
$(M4C) settings_local.py >> $(CHROOT)/$(TP_HOME)/project/settings_local.py
|
||||
ifdef SCROBBLER_AUTH
|
||||
cat $(SCROBBLER_AUTH) >> $(CHROOT)/$(TP_HOME)/project/settings_local.py
|
||||
endif
|
||||
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
|
||||
$(inroot) $(INSTALL) -d -o $(TP_USER) -g $(TP_USER) $(TP_DB)
|
||||
$(inroot) $(INSTALL) -d -o $(TP_USER) -g $(TP_USER) $(TP_DB)/songs
|
||||
$(inroot) mkdir -p $(TP_HOME)/library
|
||||
$(inroot) chown -R $(TP_USER):$(TP_USER) $(TP_HOME)
|
||||
$(inroot) $(INSTALL) -d -o $(TP_USER) -g $(TP_USER) $(TP_DB)/mpd
|
||||
$(inroot) $(INSTALL) -d -o $(TP_USER) -g $(TP_USER) /var/log/teamplayer
|
||||
$(M4C) local.start > $(CHROOT)/etc/local.d/teamplayer.start
|
||||
$(M4C) local.stop > $(CHROOT)/etc/local.d/teamplayer.stop
|
||||
$(inroot) chmod +x /etc/local.d/teamplayer.start
|
||||
$(inroot) chmod +x /etc/local.d/teamplayer.stop
|
||||
cp issue $(CHROOT)/etc/issue
|
||||
$(M4C) nginx.conf > $(CHROOT)/etc/nginx/nginx.conf
|
||||
$(inroot) gpasswd -a nginx teamplayer
|
||||
|
||||
$(inroot) ln -sf /etc/init.d/nginx $(rcdefault)/nginx
|
||||
$(inroot) ln -sf /etc/init.d/ntpd $(rcdefault)/ntpd
|
||||
$(inroot) $(EMERGE) --depclean --with-bdeps=n
|
||||
|
||||
clean:
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
export DJANGO_SETTINGS_MODULE='project.settings_local'
|
||||
export PYTHONPATH="$HOME"
|
||||
PATH="$HOME/bin:$PATH"
|
||||
export LANG="en_US.UTF-8"
|
||||
. activate
|
|
@ -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
|
|
@ -1,5 +0,0 @@
|
|||
[H[2J ------------------------------------------------------------------------------
|
||||
TEAMPLAYER CONSOLE
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
LOGFILE="/var/log/teamplayer/teamplayer.log"
|
||||
|
||||
if [ ! -f /etc/firstboot ] ; then
|
||||
echo "Creating TeamPlayer database ..."
|
||||
createuser -U postgres -D -S -R teamplayer
|
||||
createdb -U postgres teamplayer
|
||||
touch "$LOGFILE"
|
||||
chown TP_USER:TP_USER "$LOGFILE"
|
||||
fi
|
||||
|
||||
su -c "TP_HOME/bin/start-teamplayer" TP_USER
|
||||
#tailf "$LOGFILE" > /dev/console &
|
||||
|
||||
touch /etc/firstboot
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
su -c "TP_HOME/bin/stop-teamplayer" TP_USER
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
# Settings for TeamPlayer
|
||||
NGINX_MODULES_HTTP="auth_basic gzip proxy referer rewrite headers_more uwsgi"
|
||||
USE_PYTHON="3.4"
|
||||
PYTHON_TARGETS="python3_4"
|
|
@ -1,82 +0,0 @@
|
|||
user nginx nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error_log info;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main
|
||||
'$remote_addr - $remote_user [$time_local] '
|
||||
'"$request" $status $bytes_sent '
|
||||
'"$http_referer" "$http_user_agent" '
|
||||
'"$gzip_ratio"';
|
||||
|
||||
client_header_timeout 10m;
|
||||
client_body_timeout 10m;
|
||||
send_timeout 10m;
|
||||
|
||||
connection_pool_size 256;
|
||||
client_header_buffer_size 1k;
|
||||
large_client_header_buffers 4 2k;
|
||||
client_max_body_size 100000k;
|
||||
request_pool_size 4k;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 8k;
|
||||
gzip_types text/plain;
|
||||
|
||||
output_buffers 1 32k;
|
||||
postpone_output 1460;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
||||
keepalive_timeout 75 20;
|
||||
|
||||
ignore_invalid_headers on;
|
||||
|
||||
index index.html;
|
||||
|
||||
server {
|
||||
listen 0.0.0.0;
|
||||
server_name HOSTNAME;
|
||||
|
||||
location /static/ {
|
||||
alias TP_HOME/static/;
|
||||
}
|
||||
|
||||
location / {
|
||||
uwsgi_pass unix://TP_DB/teamplayer.sock;
|
||||
include /etc/nginx/uwsgi_params;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/HOSTNAME.access_log main;
|
||||
error_log /var/log/nginx/HOSTNAME.error_log info;
|
||||
|
||||
root /var/www/localhost/htdocs;
|
||||
}
|
||||
|
||||
# SSL example
|
||||
#server {
|
||||
# listen 127.0.0.1:443;
|
||||
# server_name localhost;
|
||||
|
||||
# ssl on;
|
||||
# ssl_certificate /etc/ssl/nginx/nginx.pem;
|
||||
# ssl_certificate_key /etc/ssl/nginx/nginx.key;
|
||||
|
||||
# access_log /var/log/nginx/localhost.ssl_access_log main;
|
||||
# error_log /var/log/nginx/localhost.ssl_error_log info;
|
||||
|
||||
# root /var/www/localhost/htdocs;
|
||||
#}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
dev-db/postgresql
|
||||
dev-python/virtualenv
|
||||
sys-kernel/gentoo-sources
|
||||
virtual/python-imaging
|
|
@ -1,22 +0,0 @@
|
|||
app-editors/nano ncurses
|
||||
dev-db/postgresql server
|
||||
dev-db/sqlite extensions
|
||||
dev-lang/python sqlite ssl threads xml
|
||||
dev-util/pkgconfig internal-glib
|
||||
dev-vcs/mercurial python_targets_python2_7
|
||||
media-libs/flac ogg
|
||||
media-sound/mpd faad audiofile ffmpeg flac inotify id3tag lame network ogg vorbis mad soup sqlite unicode
|
||||
media-video/ffmpeg avx cpudetection mmx mmxext mp3 network ssse3 x264
|
||||
sys-apps/hwids udev
|
||||
sys-apps/kmod openrc tools
|
||||
sys-apps/openrc netifrc
|
||||
sys-apps/portage ipc
|
||||
sys-devel/gcc cxx nptl
|
||||
sys-fs/udev openrc
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-libs/ncurses minimal
|
||||
virtual/ffmpeg x264 mp3
|
||||
www-servers/nginx http
|
||||
|
||||
# needed by ntp (bug #533548)
|
||||
dev-libs/libevent threads
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue