From dae2494e6d2981bc92a53fa1bfb2a5cd77a51fc6 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Fri, 3 Oct 2008 14:01:12 -0700 Subject: add support for chroot-devel repo --- build_tools/bin/mp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_tools/bin/mp b/build_tools/bin/mp index c69c622..6c1b683 100755 --- a/build_tools/bin/mp +++ b/build_tools/bin/mp @@ -28,6 +28,11 @@ function find_repo { else REPO=core${PFIX} fi + echo $mydir|grep -q "chroot-devel" + if [ $? = 0 ] + then + REPO=chroot-devel + fi DOCROOT=/data/pkg_repo/$CARCH/$REPO } -- cgit v0.12 From a343f779dab7d963d5e58b484cd81aaa19f029b5 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Fri, 3 Oct 2008 21:10:18 -0700 Subject: fix location of packages --- build_tools/clarch/larch/profiles/i686-testing-local/pacman.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/clarch/larch/profiles/i686-testing-local/pacman.conf b/build_tools/clarch/larch/profiles/i686-testing-local/pacman.conf index 750502b..f27a2a6 100755 --- a/build_tools/clarch/larch/profiles/i686-testing-local/pacman.conf +++ b/build_tools/clarch/larch/profiles/i686-testing-local/pacman.conf @@ -35,7 +35,7 @@ CacheDir = /data/var/cache/pacman/pkg # - local/custom mirrors can be added here or in separate files # [core-testing] -Server = file:///data/local/pkg_repo/i686/core-testing +Server = file:///data/pkg_repo/i686/core-testing #Server = http://localmirror/repo/r6-testing/ -- cgit v0.12 From d63abecec6eb30923a11db85cf0b08229499f147 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Fri, 3 Oct 2008 21:10:35 -0700 Subject: add /dev/ptmx --- templates/enter_dev_chroot.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/enter_dev_chroot.sh b/templates/enter_dev_chroot.sh index 8f5eb40..1abf10d 100644 --- a/templates/enter_dev_chroot.sh +++ b/templates/enter_dev_chroot.sh @@ -66,6 +66,7 @@ fi [ -e $BROOT/dev/random ] || mknod $BROOT/dev/random c 1 8 [ -e $BROOT/dev/urandom ] || mknod $BROOT/dev/urandom c 1 9 [ -e $BROOT/dev/tty ] || mknod $BROOT/dev/tty c 5 0 +[ -e $BROOT/dev/ptmx ] || mknod $BROOT/dev/ptmx c 5 2 -- cgit v0.12 From ae89cebca11fb20c823263ce2b32ed80d371d27a Mon Sep 17 00:00:00 2001 From: James Meyer Date: Fri, 3 Oct 2008 22:25:42 -0700 Subject: setup_env.sh now takes an 2nd argument naming the developer template to use. If the template is not found the script will exit. If the template is found it will copy loginrun.sh to the chroot, and also execute custom_chroot.sh --- setup_env.sh | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/setup_env.sh b/setup_env.sh index 986b5ca..85a5ad8 100755 --- a/setup_env.sh +++ b/setup_env.sh @@ -1,6 +1,6 @@ #!/bin/bash # Script to setup the LinHES development enviroment -# ./setup_env.sh ( i586|i686|x86_64 ) +# ./setup_env.sh ( i586|i686|x86_64 ) devID # This script assumes that /tmp is usable. MIRROR_DIR=../pkg_repo @@ -17,8 +17,23 @@ case $1 in exit 1 ;; esac + +if [ ! x$2 = x ] +then + #check if developer template is present + if [ -d templates/developers/$2 ] + then + echo "found the template for $2 " + FOUNDTEMPLATE="TRUE" + else + echo "couldn't find templates/developers/$2" + exit 2 + fi +fi + } + function pacman_check { which pacman status=$? @@ -32,7 +47,7 @@ function pacman_check { #----------------------------------------------- -arg_check $1 +arg_check $1 $2 pacman_check @@ -69,6 +84,22 @@ fi #clear out the default resolve.con mv -f ../build_root.$ARCH/etc/resolv.conf ../build_root.$ARCH/etc/resolv.conf.orig +if [ x$FOUNDTEMPLATE = xTRUE ] +then + #check for login run + if [ -f templates/developers/$2/loginrun.sh ] + then + cp -f templates/developers/$2/loginrun.sh ../build_root.$ARCH/root/loginrun.sh + fi + + if [ -f templates/developers/$2/custom_chroot.sh ] + then + cd templates/developers/$2 + ./custom_chroot.sh $ARCH + cd - + fi +fi + #create custom enter_dev_chroot.sh script sed -e "s/REPLACEME/$ARCH/g" templates/enter_dev_chroot.sh > ../enter_dev_chroot.$ARCH.sh chmod 755 ../enter_dev_chroot.$ARCH.sh @@ -78,6 +109,7 @@ echo "** cd .. **" echo "** ./enter_dev_chroot.$ARCH.sh **" echo "********************************************************" + #copy makepkg.conf into the chroot sed -e "s/i686/$ARCH/g" templates/makepkg.conf > ../build_root.$ARCH/etc/makepkg.conf #copy pacman.conf into the chroot -- cgit v0.12 From 2694b203964a62bbe6675d7653d401e473f9be00 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Fri, 3 Oct 2008 22:30:10 -0700 Subject: jams-developer template --- templates/developers/jams/custom_chroot.sh | 11 +++++++++++ templates/developers/jams/loginrun.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 templates/developers/jams/custom_chroot.sh diff --git a/templates/developers/jams/custom_chroot.sh b/templates/developers/jams/custom_chroot.sh new file mode 100755 index 0000000..75fe866 --- /dev/null +++ b/templates/developers/jams/custom_chroot.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -x +build_root="../../../../build_root" +#copy in the ssh keys +cp -rp /home/jams/.ssh $build_root.${1}/root +chown root.root $build_root.${1}/root/.ssh + +#copy in display +cp display.sh $build_root.${1}/etc/profile.d +#copy in .gtkrc +cp .gtkrc-2.0 $build_root.${1}/root \ No newline at end of file diff --git a/templates/developers/jams/loginrun.sh b/templates/developers/jams/loginrun.sh index 5f936b0..dbd5d5c 100755 --- a/templates/developers/jams/loginrun.sh +++ b/templates/developers/jams/loginrun.sh @@ -1,4 +1,4 @@ #!/bin/bash thunar & -terminal +terminal & -- cgit v0.12 From 8202aecfb8f6937a30bfd06f2d586e45596d445a Mon Sep 17 00:00:00 2001 From: James Meyer Date: Fri, 3 Oct 2008 22:42:33 -0700 Subject: fix the Term variable --- templates/enter_dev_chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/enter_dev_chroot.sh b/templates/enter_dev_chroot.sh index 1abf10d..1bf957b 100644 --- a/templates/enter_dev_chroot.sh +++ b/templates/enter_dev_chroot.sh @@ -163,7 +163,7 @@ fi echo -e "\e]0;chroot-pkgbuild\a" #used for Konsole echo -e "\e]30;chroot-pkgbuild\a" -env -i /usr/sbin/chroot $BROOT /bin/bash --login +env -i TERM=$TERM /usr/sbin/chroot $BROOT /bin/bash --login -- cgit v0.12