Upgrade to Postgres 9.2

* Also make sure each postgres appliance actually builds/works
This commit is contained in:
Albert Hopkins 2012-09-12 19:17:40 +00:00
parent dc4e73082d
commit 1c1dd3e874
8 changed files with 26 additions and 15 deletions

View File

@ -1,9 +1,14 @@
APP_ROOT := /var/airport
AIRPORT_REPO ?= https://bitbucket.org/marduk/airport
PGVER := 9.2
rcdefault := /etc/runlevels/default
preinstall:
sed -i '/^PYTHON_TARGETS=/d' $(CHROOT)/etc/make.conf
echo 'PYTHON_TARGETS="python2_7"' >> $(CHROOT)/etc/make.conf
$(inroot) eselect python set python2.7
$(inroot) python-updater
sed -i '/^APACHE2_/d' $(CHROOT)/etc/make.conf
echo 'APACHE2_MPMS="prefork"' >> $(CHROOT)/etc/make.conf
echo 'APACHE2_MODULES="auth_basic authz_host env include info"' >> $(CHROOT)/etc/make.conf
@ -12,18 +17,17 @@ preinstall:
postinstall: airport.service settings.py airport.wsgi default_vhost.include firstboot.start issue
sed -i 's/^APACHE2_OPTS=.*/APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D WSGI"/' $(CHROOT)/etc/conf.d/apache2
$(inroot) rc-update add apache2 default
sed -i 's/^PG_INITDB_OPTS.*/PG_INITDB_OPTS="--locale=en_US.UTF-8"/' $(CHROOT)/etc/conf.d/postgresql-9.1
$(inroot) eselect postgresql set 9.1
rm -rf $(CHROOT)/var/lib/postgresql/9.1
#[ -d $(CHROOT)/var/lib/postgresql/9.1/data ] || yes | $(inroot) $(EMERGE) --config postgresql-server:9.1
yes | $(inroot) $(EMERGE) --config postgresql-server:9.1
$(inroot) rc-update add postgresql-9.1 default
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-server:$(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 $(AIRPORT_REPO) $(CHROOT)/$(APP_ROOT)
echo 'VERSION="'`date +1.%y%m%d.%H%m`'"' > $(CHROOT)/$(APP_ROOT)/djangoproject/airport/__init__.py
chroot $(CHROOT) virtualenv --no-site-packages $(APP_ROOT)
chroot $(CHROOT) virtualenv-2.7 $(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"
mkdir -p $(CHROOT)/$(APP_ROOT)/etc

View File

@ -1 +1,3 @@
=dev-python/django-1.4* **
dev-db/postgresql-base:9.2 **
dev-db/postgresql-server:9.2 **

View File

@ -1,4 +1,4 @@
dev-db/postgresql-server:9.1
dev-db/postgresql-server:9.2
net-misc/dhcp
www-apache/mod_wsgi
dev-python/django

View File

@ -1,4 +1,4 @@
PGVER = 9.1
PGVER = 9.2
DPVER = 7.15
inroot := chroot $(CHROOT)

View File

@ -1,2 +1,4 @@
www-apps/drupal ~amd64 ~x86
dev-db/postgresql-base ~amd64 ~x86
dev-db/postgresql-server ~amd64 ~x86
dev-php/pecl-uploadprogress ~amd64 ~x86
www-apps/drupal ~amd64 ~x86

View File

@ -1,4 +1,4 @@
dev-db/postgresql-server:9.1
dev-db/postgresql-server:9.2
dev-php/pecl-uploadprogress
mail-mta/ssmtp
net-misc/dhcp

View File

@ -2,7 +2,7 @@ TP_REPO ?= ../../teamplayer
TP_USER = teamplayer
TP_HOME = /opt/teamplayer
TP_DB = /var/lib/teamplayer
PGVER = 9.1
PGVER = 9.2
INSTALL = install
AVAHI := NO
@ -16,16 +16,19 @@ post_files = bash_profile settings_local.py start-teamplayer stop-teamplayer
post_files += local.start local.stop issue lighttpd.conf teamplayer.service
preinstall:
sed -i '/^PYTHON_TARGETS=/d' $(CHROOT)/etc/make.conf
echo 'PYTHON_TARGETS="python2_7"' >> $(CHROOT)/etc/make.conf
$(inroot) $(EMERGE) --select -n $(USEPKG) dev-lang/python:2.7
$(inroot) eselect python set python2.7
$(inroot) python-updater
postinstall: $(post_files) $(SCROBBLER_AUTH)
$(inroot) $(EMERGE) -n $(USEPKG) =dev-db/postgresql-server-$(PGVER)*
$(inroot) $(EMERGE) -n $(USEPKG) dev-db/postgresql-server:$(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-server-$(PGVER)*
yes | $(inroot) $(EMERGE) --config postgresql-server:$(PGVER)
$(inroot) ln -sf /etc/init.d/postgresql-$(PGVER) $(rcdefault)/postgresql-$(PGVER)
ifeq ($(AVAHI),YES)
$(inroot) $(EMERGE) -n $(USEPKG) net-dns/avahi

View File

@ -1,4 +1,4 @@
dev-python/django
=dev-python/django-1.3*
dev-python/flup
dev-python/python-mpd
media-libs/mutagen