Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] ..build a Paludis enabled Stage3 Archive
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Deutsche Dokumentation
View previous topic :: View next topic  
Author Message
ruth
Retired Dev
Retired Dev


Joined: 07 Sep 2003
Posts: 640
Location: M / AN / BY / GER

PostPosted: Mon Aug 04, 2008 2:34 pm    Post subject: [HOWTO] ..build a Paludis enabled Stage3 Archive Reply with quote

Hallo,

nachdem wir uns hier:
https://forums.gentoo.org/viewtopic-t-688483.html
zu einem Stage3 Archiv emporgearbeitet haben, stellt sich natürlich die Frage, wie man ein Stage3 Archiv inklusive Paludis erzeugen könnte...
Nun, nachdem ja catalyst nicht mit paludis zusammenarbeitet, müssen wir das ganze anders angehen:

Das im folgenden erzeugte Stage3 Archiv ist technisch gesprochen nämlich kein Stage3 Archiv, sondern ein Stage4 Archiv.
Das target stage4 von catalyst erlaubt uns nämlich, folgende Variablen zu setzen:
Code:

portage_confdir:
   /root/catalyst/portage
stage4/packages:
   sys-apps/paludis
stage4/fsscript:
   /root/catalyst/fsscript_paludis.sh

Das Vorgehen sollte jetzt schon eindeutiger sein:
Wir weisen catalyst an, paludis zu installieren
Die Datei /root/catalyst/portage/package.keywords muss dementsprechend folgende Einträge enthalten:
Code:

sys-apps/paludis x86 ~x86
app-admin/eselect x86 ~x86
app-admin/eselect-news x86 ~x86

Damit wird dann paludis installiert.
Schlussendlich fehlen eigentlich nur noch zwei Dateien:

/root/catalyst/stage4_paludis.spec
Code:

subarch:
   i686
target:
   stage4
version_stamp:
        XXX_VERSION_STAMP_XXX
rel_type:
   default
profile:
   default/linux/x86/2008.0
snapshot:
   XXX_VERSION_STAMP_XXX
source_subpath:
   default/stage3-i686-XXX_VERSION_STAMP_XXX
portage_confdir:
   /root/catalyst/portage
stage4/packages:
   sys-apps/paludis
stage4/fsscript:
   /root/catalyst/fsscript_paludis.sh
stage4/empty:
   /usr/portage
   /var/paludis/distfiles
   /var/paludis/repositories
   /var/tmp/paludis

und die Datei:
/root/catalyst/fsscript_paludis.sh
Code:

#!/bin/bash
# export HOME for paludis...
export HOME=/root
do_check_status () {
   if [ $? -eq 0 ]; then
      echo ">>> done"
   else
      echo ">>> Error"
      exit 1
   fi
}

if [ -d /etc/paludis ]; then
   echo ">>> /etc/paludis exists, ok..."
else
   echo ">>> creating /etc/paludis..."
   mkdir /etc/paludis
   do_check_status
fi
if [ -d /etc/paludis/keywords.conf.d ]; then
        echo ">>> /etc/paludis/keywords.conf.d exists, ok..."
else
        echo ">>> creating /etc/paludis/keywords.conf.d..."
        mkdir /etc/paludis/keywords.conf.d
        do_check_status
fi
if [ -d /etc/paludis/repositories ]; then
        echo ">>> /etc/paludis/repositories exists, ok..."
else
        echo ">>> creating /etc/paludis/repositories..."
        mkdir /etc/paludis/repositories
        do_check_status
fi
if [ -d /etc/paludis/use.conf.d ]; then
        echo ">>> /etc/paludis/use.conf.d exists, ok..."
else
        echo ">>> creating /etc/paludis/use.conf.d..."
        mkdir /etc/paludis/use.conf.d
        do_check_status
fi
# ok, minimal dir skeleton exists now...
# lets continue creating the config files...

# bashrc, please adjust CFLAGS, CXXFLAGS, CHOST _MANUALLY_...
# DO IT NOW; DONT FORGET TO ADJUST PARAMETERS BELOW, ELSE YOUR SYSTEM _WILL_ BREAK!!!
#
echo ">>> creating /etc/paludis/bashrc"
cat << EOF > /etc/paludis/bashrc
CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j2"

# export PATH="/usr/lib/ccache/bin/:$PATH"
# export CCACHE_DIR="/var/tmp/ccache"

SKIP_FUNCTIONS=test
case "\${PN}" in
        paludis|gcc)
        unset SKIP_FUNCTIONS
        ;;
esac

EOF
do_check_status

echo ">>> creating /etc/paludis/environment.conf"
cat << EOF > /etc/paludis/environment.conf
world = /var/db/pkg/world

EOF
do_check_status

echo ">>> creating /etc/paludis/licenses.conf"
cat << EOF > /etc/paludis/licenses.conf
*/* *

EOF
do_check_status

echo ">>> creating /etc/paludis/mirrors.conf"
cat << EOF > /etc/paludis/mirrors.conf
* http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/distfiles/

EOF
do_check_status

echo ">>> creating /etc/paludis/keywords.conf.d/base.conf"
cat << EOF > /etc/paludis/keywords.conf.d/base.conf
*/*                 x86

EOF
do_check_status

echo ">>> creating /etc/paludis/keywords.conf.d/paludis.conf"
cat << EOF > /etc/paludis/keywords.conf.d/paludis.conf
sys-apps/paludis x86 ~x86
app-admin/eselect x86 ~x86
app-admin/eselect-news x86 ~x86

EOF
do_check_status

echo ">>> creating /etc/paludis/use.conf.d/paludis.conf"
cat << EOF > /etc/paludis/use.conf.d/paludis.conf
sys-apps/paludis -python

EOF
do_check_status

echo ">>> creating /etc/paludis/repositories/gentoo.conf"
cat << EOF > /etc/paludis/repositories/gentoo.conf
location = /var/paludis/repositories/gentoo/
# sync = rsync://rsync.europe.gentoo.org/gentoo-portage/
sync = rsync://rsync.gentoo.org/gentoo-portage/
profiles = /var/paludis/repositories/gentoo/profiles/default/linux/x86/2008.0
format = ebuild
distdir = /var/paludis/distfiles
names_cache = \${location}/.cache/names
write_cache = /var/cache/paludis/metadata

EOF
do_check_status

echo ">>> creating /etc/paludis/repositories/installed.conf"
cat << EOF > /etc/paludis/repositories/installed.conf
location = /var/db/pkg/
format = vdb
names_cache = \${location}/.cache/names
provides_cache = \${location}/.cache/provides

EOF
do_check_status

echo ">>> creating /var/paludis/repositories"
mkdir -p /var/paludis/repositories
do_check_status

echo ">>> creating /var/paludis/distfiles"
mkdir -p /var/paludis/distfiles
do_check_status
echo ">>> adjusting ownership of /var/paludis/distfiles"
chown paludisbuild:paludisbuild /var/paludis/distfiles
do_check_status
echo ">>> chmod (1) for /var/paludis/distfiles"
chmod g+rwx /var/paludis/distfiles
do_check_status
echo ">>> chmod (2) for /var/paludis/distfiles"
chmod +s /var/paludis/distfiles
do_check_status
echo ">>> creating /var/tmp/paludis"
mkdir -p /var/tmp/paludis
do_check_status
echo ">>> chgrp for /var/tmp/paludis"
chgrp paludisbuild /var/tmp/paludis
do_check_status
echo ">>> chmod (1) for /var/tmp/paludis"
chmod g+rwx /var/tmp/paludis
do_check_status
echo ">>> chmod (2) for /var/tmp/paludis"
chmod +s /var/tmp/paludis
do_check_status

echo ">>> linking portage tree to paludis"
ln -s /usr/portage /var/paludis/repositories/gentoo
do_check_status
mkdir -p /var/paludis/repositories/gentoo/.cache/names
do_check_status

echo ">>> regenerating installed cache"
paludis --regenerate-installed-cache
do_check_status

echo ">>> regenerating installable cache"
paludis --regenerate-installable-cache
do_check_status

echo ">>> re-installing paludis with itself"
paludis -i --debug-build none paludis
do_check_status

echo ">>> re-installing system"
paludis --dl-reinstall always --debug-build none -i system
do_check_status
echo ">>> all done, exiting"
exit 0

Das ganze sollte so ziemlich selbsterklärend sein.
Das Resultat von:
Code:

catalyst -v -f stage4_paludis.spec

ist jedenfalls ein (technisch gesehen Stage4) Stage3 Archiv, das paludis als Paketmanager verwendet.
Das fsscript_paludis.sh beinhaltet die von mir bevorzugte Paludiskonfiguration.
Viele werden diese also an ihre eigenen Bedürfnisse anpassen wollen...
Auch und insbesondere auf die CHOST, CFLAGS, CXXXFLAGS sollte geachtet werden.

Es ist im übrigen klar, dass sich im Laufe der Zeit für paludis benötigte Keywords, Supportpackages,... ändern können (und werden).
Ebenfalls die Konfiguration von Paludis selbst.
Der geneigte Leser und Anwender sollte dann allerdings in der Lage sein, die notwendigen Änderungen selbst durchzuführen...

HTH,
ruth
_________________
"The compiler has tried twice to abort and cannot do so; therefore, compilation will now terminate."
-- IBM PL/I (F) error manual
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Deutsche Dokumentation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum