summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild_tools/archiso/mythvantage/build.sh3
-rwxr-xr-xbuild_tools/bin/mp.py13
-rwxr-xr-xsetup_env.sh115
-rwxr-xr-xtemplates/enter_dev_chroot.sh13
-rw-r--r--templates/pacman.conf.chroot4
5 files changed, 115 insertions, 33 deletions
diff --git a/build_tools/archiso/mythvantage/build.sh b/build_tools/archiso/mythvantage/build.sh
index bf8e2ea..46d35f7 100755
--- a/build_tools/archiso/mythvantage/build.sh
+++ b/build_tools/archiso/mythvantage/build.sh
@@ -222,7 +222,8 @@ make_customize_root_image() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
cp -af ${script_path}/root-image ${work_dir}
chmod 750 ${work_dir}/root-image/etc/sudoers.d
- chmod 440 ${work_dir}/root-image/etc/sudoers.d/g_wheel
+ #JM
+ #chmod 440 ${work_dir}/root-image/etc/sudoers.d/g_wheel
mkdir -p ${work_dir}/root-image/etc/pacman.d
#JM
#mkdir -p ${work_dir}/storage/data/home
diff --git a/build_tools/bin/mp.py b/build_tools/bin/mp.py
index 8062f5c..4df837b 100755
--- a/build_tools/bin/mp.py
+++ b/build_tools/bin/mp.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python2
-# Version 0.7.4
+# Version 0.7.5
import os
import sys
@@ -41,9 +41,14 @@ XZPKG = ""
# See what git branch we're working under
git_repo = Git()
branches = git_repo.branch()
-git_branch = branches.split('*')[1].lstrip(' ')
-
-if git_branch == "testing":
+git_branch="didnt_find_it"
+for i in branches.split("\n"):
+ if i.strip().startswith("*"):
+ git_branch = i.split("*")[1].lstrip(' ')
+ break
+print git_branch
+
+if git_branch == "R7-testing":
SFIX = "-testing"
elif git_branch == "master":
SFIX = ""
diff --git a/setup_env.sh b/setup_env.sh
index 6c4af4f..1d80511 100755
--- a/setup_env.sh
+++ b/setup_env.sh
@@ -2,8 +2,9 @@
# Script to setup the LinHES development enviroment
# ./setup_env.sh ( i586|i686|x86_64 ) devID
# This script assumes that /tmp is usable.
+#MIRROR_DIR=../pkg_repo
MIRROR_DIR=../pkg_repo
-
+SDIR=`pwd`
function arg_check {
case $1 in
@@ -18,22 +19,37 @@ case $1 in
;;
esac
-if [ ! x$2 = x ]
+
+case $2 in
+ release) BENV="release" ;;
+ testing) BENV="testing" ;;
+
+ *)
+ echo "invalid env specified"
+ echo "valid options include release, testing"
+ echo "EX: ./setup_env.sh i686 testing"
+ exit 1
+ ;;
+ esac
+
+
+if [ ! x$3 = x ]
then
+ USER=$3
#check if developer template is present
- if [ -d templates/developers/$2 ]
+ if [ -d templates/developers/$3 ]
then
- echo "found the template for $2 "
+ echo "found the template for $3 "
FOUNDTEMPLATE="TRUE"
else
- echo "couldn't find templates/developers/$2"
- exit 2
+ echo "couldn't find templates/developers/$3"
+ # exit 2
fi
fi
}
-function static-pacman {
+function static-pacman () {
echo "downloading pacman to tmp"
cd /tmp
wget http://www.knoppmyth.net/repo/$ARCH/pacman-static.tgz
@@ -61,20 +77,67 @@ fi
}
+function checkout_repo {
+ mkdir -p $BENV/$ARCH
+ cd $BENV/$ARCH
+
+
+ git clone git@linhes.org:linhes_dev
+ git clone git@linhes.org:linhes_pkgbuild
+
+# git clone $USER@knoppmyth.net:linhes_pkgbuild
+# git clone $USER@knoppmyth.net:linhes_dev
+
+
+ if [ $BENV == "testing" ]
+ then
+ echo "====================================="
+ echo "switching linhes_pkgbuild to testing"
+ pwd
+ cd linhes_pkgbuild
+ pwd
+ git checkout -b testing origin/testing
+ cd -
+ echo "====================================="
+
+ fi
+
+ if [ $BENV == "testing" ]
+ then
+ echo "====================================="
+ echo "switching linhes_dev to testing"
+ pwd
+ cd linhes_dev
+ pwd
+ git checkout -b testing origin/testing
+ cd -
+ echo "====================================="
+ fi
+
+
+
+
+}
+
+
#-----------------------------------------------
-arg_check $1 $2
+arg_check $1 $2 $3
+
+#findme
+checkout_repo
+
pacman_check
-cd build_tools/clarch
-./setup_links.sh
-cd -
+#cd build_tools/clarch
+#./setup_links.sh
+#cd -
#create the local pkg dir's for mirror and creating pkg's
[ -e $MIRROR_DIR ] || mkdir -p $MIRROR_DIR
for i in i586 i686 x86_64
do
[ -e $MIRROR_DIR/$i ] || mkdir -p $MIRROR_DIR/$i
- for y in core extra core-testing extra-testing chroot-devel mv-core
+ for y in core extra core-testing extra-testing
do
[ -e $MIRROR_DIR/$i/$y ] || mkdir -p $MIRROR_DIR/$i/$y
[ -e $MIRROR_DIR/src_packages/$y ] || mkdir -p $MIRROR_DIR/src_packages/$y
@@ -85,10 +148,16 @@ done
[ -e $MIRROR_DIR/packages ] || mkdir -p $MIRROR_DIR/packages
#correct pacman.conf to use the correct ARCH to build the chroot
+cd $SDIR/$BENV/$ARCH
+cd linhes_dev
sed -e "s/REPLACEME/$ARCH/g" templates/pacman.conf.chroot > /tmp/pacman.conf.chroot
#create the chroot
-./mkarchroot -f -C /tmp/pacman.conf.chroot ../build_root.$ARCH base base-devel cdrkit unison openssh
+pwd
+echo "Creating dev chroot, this requires root access"
+echo "please type your root pass"
+mkdir -p /tmp/cache/pacman
+su -c "./mkarchroot -f -C /tmp/pacman.conf.chroot ../build_root.$ARCH base base-devel openssh git python2 dosfstools rsync squashfs-tools libisoburn gitpython parched"
status=$?
if [ ! $status = 0 ]
then
@@ -98,20 +167,20 @@ then
printf "%s\n" "********************************************************"
exit 1
fi
-#clear out the default resolve.con
+#clear out the default resolve.conf
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 ]
+ if [ -f templates/developers/$3/loginrun.sh ]
then
- cp -f templates/developers/$2/loginrun.sh ../build_root.$ARCH/root/loginrun.sh
+ cp -f templates/developers/$3/loginrun.sh ../build_root.$ARCH/root/loginrun.sh
fi
- if [ -f templates/developers/$2/custom_chroot.sh ]
+ if [ -f templates/developers/$3/custom_chroot.sh ]
then
- cd templates/developers/$2
+ cd templates/developers/$3
./custom_chroot.sh $ARCH
cd -
fi
@@ -124,12 +193,18 @@ chmod 755 ../enter_dev_chroot.$ARCH
printf "%s\n" "********************************************************"
printf "** %-50s **\n" " To enter the chroot (build_root.$ARCH) run:"
-printf "** %-50s **\n" " cd .."
+printf "** %-50s **\n" " cd $BENV/$ARCH"
printf "** %-50s **\n" " ./enter_dev_chroot.$ARCH"
+printf "** %-50s **\n" " First time setup only: "
+printf "** %-50s **\n" " after entering chroot run:"
+printf "** %-50s **\n" " cd /build_tools/archiso/archiso "
+printf "** %-50s **\n" " make install"
+printf "** %-50s **\n" " (it will error out but thats ok) "
+
printf "%s\n" "********************************************************"
#copy makepkg.conf into the chroot
-sed -e "s/i686/$ARCH/g" templates/makepkg.conf > ../build_root.$ARCH/etc/makepkg.conf
+sed -e "s/REPLACEME/$ARCH/g" templates/makepkg.conf > ../build_root.$ARCH/etc/makepkg.conf
#copy pacman.conf into the chroot
sed -e "s/REPLACEME/$ARCH/g" templates/pacman.conf.chroot > ../build_root.$ARCH/etc/pacman.conf
diff --git a/templates/enter_dev_chroot.sh b/templates/enter_dev_chroot.sh
index 9eda528..b3c27d6 100755
--- a/templates/enter_dev_chroot.sh
+++ b/templates/enter_dev_chroot.sh
@@ -61,7 +61,7 @@ cleanUp() { # no arguments
# unmount all:
local mnts1="data/$repoBaseDir data/$packageDir build_tools"
- local mnts2="dev/pts sys proc"
+ local mnts2=" dev dev/pts sys proc"
for i in $mnts1 $mnts2 ; do
grep -q $BROOT/$i /proc/mounts && {
echo -e "unMounting ${C_B}$i${C_N}"
@@ -123,12 +123,13 @@ trap cleanUp 1 2 15 EXIT
ckMount -t proc proc
ckMount -t sysfs sys
-ckMount -t devpts dev/pts
+mount --bind /dev $BROOT/dev
+#ckMount -t devpts dev/pts
-[ -e dev/random ] || mknod dev/random c 1 8
-[ -e dev/urandom ] || mknod dev/urandom c 1 9
-[ -e dev/tty ] || mknod dev/tty c 5 0
-[ -e dev/ptmx ] || mknod dev/ptmx c 5 2
+#[ -e dev/random ] || mknod dev/random c 1 8
+#[ -e dev/urandom ] || mknod dev/urandom c 1 9
+#[ -e dev/tty ] || mknod dev/tty c 5 0
+#[ -e dev/ptmx ] || mknod dev/ptmx c 5 2
ckMount --bind $toolsDir/build_tools build_tools
ckMount --bind $packageDir data/$packageDir
diff --git a/templates/pacman.conf.chroot b/templates/pacman.conf.chroot
index 0ab10ba..232ccee 100644
--- a/templates/pacman.conf.chroot
+++ b/templates/pacman.conf.chroot
@@ -19,7 +19,7 @@
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
-CacheDir = /data/var/cache/pacman/pkg/
+CacheDir = /tmp/cache/pacman
#LogFile = /var/log/pacman.log
HoldPkg = pacman glibc
# If upgrades are available for these packages they will be asked for first
@@ -27,7 +27,7 @@ SyncFirst = pacman
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#XferCommand = /usr/bin/curl -C - -f %u > %o
#CleanMethod = KeepInstalled
-Architecture = i686
+Architecture = REPLACEME
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =