Added PACKAGES_TO_REMOVE PACKAGES_TO_ADD env vars, cleaning & minor fixes

- Added sabayon-build portage configuration file script
- Selected gentoo profile (amd64 desktop)
This commit is contained in:
mudler
2015-06-05 15:39:18 +02:00
parent e2297f890c
commit 6f9c560672
3 changed files with 86 additions and 10 deletions
+44 -10
View File
@@ -1,3 +1,4 @@
# XXX: need to check other stage3 implementations
# use the tianon gentoo stage3
#FROM tianon/gentoo-stage3
#python 3 :(
@@ -9,33 +10,42 @@
FROM plabedan/gentoo
# python 2.7
# make sure the package repository is up to date
ENV PACKAGES_TO_REMOVE="sys-devel/llvm dev-libs/ppl app-admin/sudo x11-libs/gtk+:3 x11-libs/gtk+:2 mariadb sys-fs/ntfs3g"
ENV PACKAGES_TO_ADD="app-text/pastebunz dev-lang/python-exec-0.3.1-r1"
# Make sure portage is synced and adding sabayon overlay
RUN emerge --sync
RUN layman -a sabayon
# XXX: hackz need to be re-installed, fails in equo rescue generate phase
RUN emerge -C =dev-python/python-exec-0.3.1
# Setting locales
RUN echo "en_US.UTF-8 UTF-8 " >> /etc/locale.gen
RUN locale-gen
RUN eselect locale set en_US.utf8
RUN env-update
# Adding required use flags
ADD ./conf/00-sabayon.package.use /etc/portage/package.use/00-sabayon.package.use
# Adding required keyword changes
ADD ./conf/00-sabayon.package.keywords /etc/portage/package.keywords/00-sabayon.package.keywords
# emerging equo and expect
RUN emerge -vt equo --autounmask-write
RUN emerge expect
# Generating empty equo db
ADD ./script/generate-equo-db.sh /
ADD ./ext/equo.sql /
RUN chmod +x /generate-equo-db.sh
RUN ./generate-equo-db.sh && rm -rfv /equo.sql /generate-equo-db.sh
# Choosing only python2.7 for now, cleaning others
RUN eselect python set python2.7
# XXX: hackz ca-certificates need to be re-installed, fails in equo rescue generate phase
RUN emerge -C python:3.2 python:3.3 app-misc/ca-certificates
RUN eselect locale set en_US.utf8
@@ -47,19 +57,43 @@ ADD ./script/equo-rescue-generate.exp /
RUN chmod +x /equo-rescue-generate.exp
RUN ./equo-rescue-generate.exp
RUN rm -rfv /equo-rescue-generate.exp
# Updating repository db
RUN cp -rfv /etc/entropy/repositories.conf.d/entropy_sabayonlinux.org.example /etc/entropy/repositories.conf.d/entropy_sabayonlinux.org
RUN equo up
# Now we can clean from spinbase the stuff easily
RUN equo rm --configfiles --deep dev-tcltk/expect dev-lang/tcl
# Sorting mirrors
RUN equo repo mirrorsort sabayonlinux.org
# Removing portage
RUN rm -rf /usr/portage/*
RUN equo i app-misc/ca-certificates
# Accepting licenses needed to continue automatic install/upgrade
ADD ./conf/spinbase-licenses /etc/entropy/packages/license.accept
RUN wget https://raw.githubusercontent.com/Sabayon/build/master/conf/intel/portage/package.license -O /etc/portage/package.license
# Specifying a gentoo profile
RUN eselect profile set 3
RUN equo i app-misc/ca-certificates --relaxed --nodeps
# Portage configurations
ADD ./script/sabayon-build.sh /sabayon-build.sh
RUN chmod +x /sabayon-build.sh
RUN ./sabayon-build.sh
RUN rm -rf /sabayon-build.sh
RUN equo u
# Handling install/removal of packages specified in env (and also the basic needed)
# XXX: sabayon-artwork-core and linux-sabayon should be moved in molecules file
RUN equo i linux-sabayon sabayon-artwork-core $PACKAGES_TO_ADD
RUN equo rm $PACKAGES_TO_REMOVE
# Cleaning accepted licenses
RUN rm -rf /etc/entropy/packages/license.accept
# Merging defaults configurations
RUN echo -5 | equo conf update
# Writing package list file
RUN equo q list installed -qv > /etc/sabayon-pkglist
# Cleaning equo package cache
RUN equo cleanup
+21
View File
@@ -0,0 +1,21 @@
AGPL-3
CC-BY-SA-3.0
CC0-1.0
GPL-1+
HPND
IJG
MPL-2.0
Old-MIT
PCRE
RSA
Ruby-BSD
SMAIL
TermReadKey
UoI-NCSA
inner-net
libmng
libpng
libtiff
rc
tcltk
man-pages
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
# fetch the bits!
cd /opt
git clone git://github.com/Sabayon/build.git sabayon-build
cd /opt/sabayon-build/conf/intel/portage
# keep your specific stuff in "myconf" branch:
git checkout -b myconf
# symlink to your <arch>:
ln -sf make.conf.amd64 make.conf
ln -sf package.env.amd64 package.env
# add & commit
git add make.conf package.env
git config --global user.name "root"
git config --global user.email "root@localhost"
git commit
# rename the gentoo /etc/make.conf and /etc/portage/:
cd /etc/
mv portage portage-gentoo
mv make.conf make.conf-gentoo
# symlink to sabayon /etc/make.conf /etc/portage/:
ln -sf /opt/sabayon-build/conf/intel/portage portage