summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README30
-rwxr-xr-xbuild_tools/bin/kmsync.sh58
-rwxr-xr-xsetup_env.sh2
3 files changed, 77 insertions, 13 deletions
diff --git a/README b/README
index 6f29290..e1f52d1 100644
--- a/README
+++ b/README
@@ -63,9 +63,12 @@ a) mp
be called from the same directory that contains the PKGBUILD.
This script takes all the same arguments that makepkg takes.
-b) mpr
- Symlink to mp that does the same thing as mp except it copies the
- package to the release repo
+b) mpr | mpl
+ mpr) Symlink to mp that does the same thing as mp except it copies the
+ package to the release repo
+
+ mpr) Symlink to mp that does the same thing as mp except it copies the
+ package to a local repo
c) update_db_repo
Used to completely regenerate the the local package database.
@@ -73,19 +76,24 @@ c) update_db_repo
the repository. Example:
update_db_repo /data/pkg_repo/i686/core-testing core-testing
-d) kmsync.sh (testing|release|chroot-devel
+d) kmsync.sh (testing|release|chroot-devel|source[testing|release|chroot-devel]
This script is used to synchronize the contents of the compiled
packages on knoppmyth.net and the ones on your local machine.
- The script takes 1 argument telling it which repository with which
+ The script takes 1 or 2 arguments telling it which repository with which
to sync up. The first time it's run with any given option the local
directory (/data/pkg_repo/i686/core|extra|chroot-devel)
MUST MUST MUST be empty.
Please use this script with care, any changes that are made in the
local mirror will be copied to the knoppmyth server.
This includes the possibility to completely erase all the packages.
+ Normally the source packages are synced when the binary packages are synced. The
+ source option is present to force an update, and isn't not normally required to be run.
+
Finally this script uses a shared user account on knoppmyth.net that
is a locked account. SSH keys must be setup for this script to work.
+
+
e) build_tools/go.sh
Menu driven fronted to create an ISO with selected profile
The following profiles are available to create an iso.
@@ -103,7 +111,7 @@ e) build_tools/go.sh
location of the resulting ISO. For any of the local profiles to work, it
requires that kmsync be run at least once to populate the local mirror.
-Quick start showing typical process
+Quick start showing typical process to create the chroot and build an ISO.
############
Create the chroot for i686
@@ -116,7 +124,6 @@ First checkout the repo
git clone ssh://$user@knoppmyth.net/mount/repository/LinHES-dev
git clone ssh://$user@knoppmyth.net/mount/repository/LinHES-PKGBUILD
-
cd LinHES-dev/
./setup_env.sh i686
cd ..
@@ -127,8 +134,9 @@ cdb <= alias
./go.sh
(select i686-testing-REMOTE)
-commands used to build a package (tar in this example), and update knoppmyth.net
-Before building ANY packages you __MUST__ run "kmsync.sh testing" at least once while the local package directories are still empty..
+#---------
+Commands used to build a package (tar in this example), and update knoppmyth.net
+Before building ANY packages you __MUST__ run "kmsync.sh testing" at least once while the local package directories are still empty.
Doing this step now will avoid sync headaches down the road.
cdl <= alias that takes you the the top level PKGBUILD directory
@@ -138,8 +146,8 @@ vi PKGBUILD <= bump the pkgrel line by 1
mp
# at this point you should test the package, either by building
# a new iso or installing the package)
-kmsync.sh testing <= this will pull down all changes from knoppmyth.net
- and upload the new tar package
+kmsync.sh testing <= this will pull down all new packages from knoppmyth.net
+ and upload the new tar package. This will also sync up the src packages.
-----------------------
Misc.
diff --git a/build_tools/bin/kmsync.sh b/build_tools/bin/kmsync.sh
index 4308786..c15bef4 100755
--- a/build_tools/bin/kmsync.sh
+++ b/build_tools/bin/kmsync.sh
@@ -27,6 +27,7 @@ function sync_dirs {
#first bring down new changes from knoppmyth.net
unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE $LOCAL
+
if [ ! $? = 0 ]
then
echo "#######################################################"
@@ -43,11 +44,50 @@ function sync_dirs {
echo "-------------------------------------------------------"
echo "----------- Finished with $3 -----------"
echo "-------------------------------------------------------"
+}
+function source_sync () {
+ src_repo=$1
+ case $1 in
+ testing )
+ echo "updating source packages"
+ REMOTE_DIR=/mount/repository/repo/src_packages/core-testing
+ LOCAL=/data/pkg_repo/src_packages/core-testing
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+
+ REMOTE_DIR=/mount/repository/repo/src_packages/extra-testing
+ LOCAL=/data/pkg_repo/src_packages/extra-testing
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+ ;;
+
+ release )
+ echo "updating source packages"
+ REMOTE_DIR=/mount/repository/repo/src_packages/core
+ LOCAL=/data/pkg_repo/src_packages/core
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+
+ REMOTE_DIR=/mount/repository/repo/src_packages/extra
+ LOCAL=/data/pkg_repo/src_packages/extra
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+ ;;
+ chroot-devel )
+ echo "updating source packages"
+ REMOTE_DIR=/mount/repository/repo/src_packages/chroot-devel
+ LOCAL=/data/pkg_repo/src_packages/chroot-devel
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+ ;;
+
+
+
+ *)
+ echo "need to know the source repository [testing|release|chroot-devel]"
+ exit 1
+ ;;
+esac
+}
-}
#---------------------------------------------------------------
if [ ! -d $UNISON ]
then
@@ -66,26 +106,40 @@ fi
+
+
clear
case $1 in
testing)
#sync_dirs $REMOTE $LOCAL
sync_dirs $REMOTE_DIR/$CARCH/core-testing $DOCROOT/core-testing core-testing
sync_dirs $REMOTE_DIR/$CARCH/extra-testing $DOCROOT/extra-testing extra-testing
+ source_sync testing
;;
release)
sync_dirs $REMOTE_DIR/$CARCH/core $DOCROOT/core core
sync_dirs $REMOTE_DIR/$CARCH/extra $DOCROOT/extra extra
+ source_sync release
;;
chroot-devel)
echo "will update chroot-devel"
sync_dirs $REMOTE_DIR/$CARCH/chroot-devel $DOCROOT/chroot-devel chroot-devel
+ source_sync chroot-devel
+ ;;
+
+ source)
+ if [ x = x$2 ]
+ then
+ echo "need to know the source repository [testing|release|chroot-devel]"
+ exit 1
+ fi
+ source_sync $2
;;
*)
echo "invalid options"
- echo "kmsync.sh (testing|release|chroot-devel) "
+ echo "kmsync.sh (testing|release|chroot-devel|source[testing|release|chroot-devel]) "
echo
echo "EX: kmsync.sh testing <= will sync the testing repo with km.net update the local database and resync with km.net"
#echo "kmsync.sh testing oneway <= will syncthe testing repo with km.net update the local database"
diff --git a/setup_env.sh b/setup_env.sh
index 6867b04..6c4af4f 100755
--- a/setup_env.sh
+++ b/setup_env.sh
@@ -77,8 +77,10 @@ do
for y in core extra core-testing extra-testing chroot-devel mv-core
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
done
done
+
[ -e $MIRROR_DIR/sources ] || mkdir -p $MIRROR_DIR/sources
[ -e $MIRROR_DIR/packages ] || mkdir -p $MIRROR_DIR/packages