From aa49a137c882caf85fe2036641d1eaa87b900b7a Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Fri, 18 Nov 2022 15:11:10 -0500 Subject: linhes-dev: mp.py: rework --rmold rename scripts to lh_ --- linhes/linhes-dev/PKGBUILD | 10 +-- linhes/linhes-dev/lh_setup_dev.sh | 33 +++++++++ linhes/linhes-dev/lh_sync.sh | 126 +++++++++++++++++++++++++++++++++ linhes/linhes-dev/lh_update_db_repo.sh | 22 ++++++ linhes/linhes-dev/lhsync.sh | 126 --------------------------------- linhes/linhes-dev/mp.py | 107 ++++++++++------------------ linhes/linhes-dev/setup_lhdev.sh | 33 --------- linhes/linhes-dev/update_db_repo.sh | 22 ------ 8 files changed, 222 insertions(+), 257 deletions(-) create mode 100755 linhes/linhes-dev/lh_setup_dev.sh create mode 100755 linhes/linhes-dev/lh_sync.sh create mode 100755 linhes/linhes-dev/lh_update_db_repo.sh delete mode 100755 linhes/linhes-dev/lhsync.sh delete mode 100755 linhes/linhes-dev/setup_lhdev.sh delete mode 100755 linhes/linhes-dev/update_db_repo.sh diff --git a/linhes/linhes-dev/PKGBUILD b/linhes/linhes-dev/PKGBUILD index 199d03f..2824f1e 100644 --- a/linhes/linhes-dev/PKGBUILD +++ b/linhes/linhes-dev/PKGBUILD @@ -1,19 +1,19 @@ pkgname=linhes-dev pkgver=9.0 -pkgrel=2 +pkgrel=3 pkgdesc="Scripts to develop LinHES" arch=('x86_64') license=('GPL2') depends=('clean-chroot-manager' 'git' 'python-gitpython' 'rclone' 'yaah') url="http://linhes.org/" -source=('lhsync.sh' 'mp.py' 'setup_lhdev.sh' 'update_db_repo.sh') +source=('lh_sync.sh' 'mp.py' 'lh_setup_dev.sh' 'lh_update_db_repo.sh') package() { cd ${srcdir} install -d ${pkgdir}/usr/bin install -D -m755 * ${pkgdir}/usr/bin/ } -sha256sums=('d781ffb509282d03f40612556a40455fc6ee58b4b3fc60e5457c90cacd65f99c' - '9b577c3508baa3c27fc0dc8891b2da80f7b759cddf23c684a303dcba7ace0474' +sha256sums=('61871516d2bbe1c3300e78715c7c43c46e9b877c66b21e674384d3809b7fdc5e' + '099c88be69e376df8cc8c5454a0ef4ce08660a8868c0c895d1bcc12498bdb833' 'b5d12503757471be72fa20fb86a0b1563916b4db85048dcd78b49eaade3db989' - '6c3adaea49b7a0bb1baa4ed2d2b1d9f9fbab2f78b6e7ec1e8bedf4abecda25ba') + '86c9ebe77228f7e3cc07cb05f480e5584e0e3cad1b889b63a50821f7323bf449') diff --git a/linhes/linhes-dev/lh_setup_dev.sh b/linhes/linhes-dev/lh_setup_dev.sh new file mode 100755 index 0000000..df034c5 --- /dev/null +++ b/linhes/linhes-dev/lh_setup_dev.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +echo "Creating repo directories..." +sudo mkdir -p /data/dev/ +sudo chmod a+w /data/dev/ +mkdir -p /data/dev/LH_buildroot +mkdir -p /data/dev/pkg_repo/x86_64/linhes +mkdir -p /data/dev/pkg_repo/x86_64/linhes-testing +mkdir -p /data/dev/pkg_repo/packages +mkdir -p /data/dev/pkg_repo/sources +mkdir -p /data/dev/pkg_repo/src_packages/linhes +mkdir -p /data/dev/pkg_repo/src_packages/linhes-testing + + +echo -e "\n\nSetup clean-chroot-manager (ccm) and edit ~/.config/clean-chroot-manager.conf"... +sudo ccm l +sed -i 's/CHROOTPATH64=.*/CHROOTPATH64=\"\/data\/dev\/LH_buildroot\"/' ~/.config/clean-chroot-manager.conf +sudo ccm c + +echo -e "\n\nChanging setting in /etc/makepkg.conf..." +#sudo sed -i 's/#PKGDEST=.*/PKGDEST=\/data\/dev\/pkg_repo\/packages/' /etc/makepkg.conf +sudo sed -i 's/#SRCDEST=.*/SRCDEST=\/data\/dev\/pkg_repo\/sources/' /etc/makepkg.conf +sudo sed -i 's/#SRCPKGDEST=.*/SRCPKGDEST=\/data\/dev\/pkg_repo\/src_packages/' /etc/makepkg.conf +sudo sed -i 's/#PACKAGER=.*/PACKAGER=\"LinHESDEV \"/' /etc/makepkg.conf + + +# clone the git linhes_pkgbuild +# Checkout the repo. You will need to have been given a dev account on +# linhes.org. This involves creating a public ssh key and supplying it to +# one of the linhes.org admins. The key is created using ssh-keygen. The +# resulting public key will be stored in .ssh/id_rsa.pub. +echo -e "\n\nCheckout the repo manually. You will need to be given a dev account on linhes.org. This involves creating a public ssh key and supplying it toone of the linhes.org admins. The key is created using ssh-keygen. The resulting public key will be stored in .ssh/id_rsa.pub." +echo -e "EXAMPLE: \ncd /data/dev\ngit clone git@linhes.org:linhes_pkgbuild\n\n" diff --git a/linhes/linhes-dev/lh_sync.sh b/linhes/linhes-dev/lh_sync.sh new file mode 100755 index 0000000..053aaba --- /dev/null +++ b/linhes/linhes-dev/lh_sync.sh @@ -0,0 +1,126 @@ +#!/bin/bash + +#This script will create and synchronize a local package mirror with the repository +#(as defined below) on linhes.org, and will also update the database. +#This script uses a shared account on linhes.org. +#DO NOT change the account name and don't ask for the password, +#instead setup ssh keys and run ssh-agent. + +if [ -e /etc/makepkg.conf ] +then + . /etc/makepkg.conf +else + echo "Couldn't find /etc/makepkg.conf" +fi + +LOCAL_DIR=/data/dev +REMOTE_DIR=/srv/www/repo +PKGROOT=$LOCAL_DIR/pkg_repo/$CARCH + +function sync_dirs { + REMOTE=$1 + LOCAL=$2 + echo "--------------------------------------------------------" + echo " Syncing $3 packages with linhes.org" + echo "--------------------------------------------------------" + echo "Remote: $REMOTE" + echo "Local: $LOCAL" + case $4 in + resync) + rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE $LOCAL --verbose --resync --copy-links + ;; + force) + rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE $LOCAL --verbose --force --copy-links + ;; + *) + rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE $LOCAL --verbose --copy-links + ;; + esac + + if [ ! $? = 0 ] + then + echo "############################################" + echo "## ERRORS OCCURED ##" + echo "############################################" + exit 1 + fi + + #update the local database + if [ "$4" == "update_db" ] + then + echo "--------" + echo "Updating the whole package db..." + echo "--------" + lh_update_db_repo.sh $LOCAL $3 + + echo "--------" + echo "Pushing the package db to linhes.org" + echo "--------" + rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE $LOCAL --verbose --copy-links + fi + + echo "--------------------------------------------------------" + echo " Finished syncing $3 packages" + echo "--------------------------------------------------------" +} + +function source_sync () { + echo "--------------------------------------------------------" + echo " Syncing $1 sources" + echo "--------------------------------------------------------" + REMOTE_SRC=$REMOTE_DIR/src_packages/$1/ + LOCAL_SRC=$LOCAL_DIR/pkg_repo/src_packages/$1/ + echo "Remote: $REMOTE_SRC" + echo "Remote: $LOCAL_SRC" + case $2 in + resync) + rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE_SRC $LOCAL_SRC --verbose --resync --copy-links + ;; + force) + rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE_SRC $LOCAL_SRC --verbose --force --copy-links + ;; + *) + rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE_SRC $LOCAL_SRC --verbose --copy-links + ;; + esac + echo "--------------------------------------------------------" + echo " Finished syncing $3 sources" + echo "--------------------------------------------------------" +} + +function pacman_sync () { + echo "running 'pacman -Sy' to sync repos" + sudo pacman -Sy +} + +#--------------------------------------------------------------- +case $1 in + testing) + sync_dirs $REMOTE_DIR/$CARCH/linhes-testing/ $PKGROOT/linhes-testing/ linhes-testing $2 + source_sync linhes-testing $2 + pacman_sync + ;; + release) + sync_dirs $REMOTE_DIR/$CARCH/linhes/ $PKGROOT/linhes/ linhes $2 + source_sync linhes $2 + pacman_sync + ;; + source) + if [ x = x$2 ] + then + echo "Missing source repository [testing|release]" + exit 1 + fi + source_sync $1 $2 + pacman_sync + ;; + *) + echo "Invalid Options" + echo "lh_sync.sh (testing|release|source[testing|release]) (update_db|resync|force)" + echo + echo "force: force rclone to sync when too many deletes are detected" + echo "resync: overwrites the local package and source repos with ones from linhes.org" + echo "update_db: recreate the db files in the repo and syncs to linhes.org" + echo "EXAMPLE: lh_sync.sh testing update_db <= will sync the testing repo with linhes.org update the local database and resync with linhes.org" + ;; +esac diff --git a/linhes/linhes-dev/lh_update_db_repo.sh b/linhes/linhes-dev/lh_update_db_repo.sh new file mode 100755 index 0000000..3316e38 --- /dev/null +++ b/linhes/linhes-dev/lh_update_db_repo.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# tiny util to regenreate the database on the LOCAL machine + +if [ $# -ne 2 ] +then + echo "incorrect number of args" + echo "lh_update_db_repo.sh directory repo" + echo "EX: update_db_repo.sh /data/dev/pkg_repo/x86_64/linhes-testing linhes-testing" + exit 1 +fi + + +cd $1 +REPO=$2 +echo " --------------------------" +echo "updating database for $REPO" +echo " --------------------------" +#pwd + #forcefully remove the old db to start clean + rm -f $REPO.db.tar.gz + repo-add -q $REPO.db.tar.gz *.pkg.tar.* +cd - diff --git a/linhes/linhes-dev/lhsync.sh b/linhes/linhes-dev/lhsync.sh deleted file mode 100755 index e8cd8b1..0000000 --- a/linhes/linhes-dev/lhsync.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash - -#This script will create and synchronize a local package mirror with the repository -#(as defined below) on linhes.org, and will also update the database. -#This script uses a shared account on linhes.org. -#DO NOT change the account name and don't ask for the password, -#instead setup ssh keys and run ssh-agent. - -if [ -e /etc/makepkg.conf ] -then - . /etc/makepkg.conf -else - echo "Couldn't find /etc/makepkg.conf" -fi - -LOCAL_DIR=/data/dev -REMOTE_DIR=/srv/www/repo -PKGROOT=$LOCAL_DIR/pkg_repo/$CARCH - -function sync_dirs { - REMOTE=$1 - LOCAL=$2 - echo "--------------------------------------------------------" - echo " Syncing $3 packages with linhes.org" - echo "--------------------------------------------------------" - echo "Remote: $REMOTE" - echo "Local: $LOCAL" - case $4 in - resync) - rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE $LOCAL --verbose --resync --copy-links - ;; - force) - rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE $LOCAL --verbose --force --copy-links - ;; - *) - rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE $LOCAL --verbose --copy-links - ;; - esac - - if [ ! $? = 0 ] - then - echo "############################################" - echo "## ERRORS OCCURED ##" - echo "############################################" - exit 1 - fi - - #update the local database - if [ "$4" == "update_db" ] - then - echo "--------" - echo "Updating the whole package db..." - echo "--------" - update_db_repo.sh $LOCAL $3 - - echo "--------" - echo "Pushing the package db to linhes.org" - echo "--------" - rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE $LOCAL --verbose --copy-links - fi - - echo "--------------------------------------------------------" - echo " Finished syncing $3 packages" - echo "--------------------------------------------------------" -} - -function source_sync () { - echo "--------------------------------------------------------" - echo " Syncing $1 sources" - echo "--------------------------------------------------------" - REMOTE_SRC=$REMOTE_DIR/src_packages/$1/ - LOCAL_SRC=$LOCAL_DIR/pkg_repo/src_packages/$1/ - echo "Remote: $REMOTE_SRC" - echo "Remote: $LOCAL_SRC" - case $2 in - resync) - rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE_SRC $LOCAL_SRC --verbose --resync --copy-links - ;; - force) - rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE_SRC $LOCAL_SRC --verbose --force --copy-links - ;; - *) - rclone bisync :sftp,host=linhes.org,user=reposync:$REMOTE_SRC $LOCAL_SRC --verbose --copy-links - ;; - esac - echo "--------------------------------------------------------" - echo " Finished syncing $3 sources" - echo "--------------------------------------------------------" -} - -function pacman_sync () { - echo "running 'pacman -Sy' to sync repos" - sudo pacman -Sy -} - -#--------------------------------------------------------------- -case $1 in - testing) - sync_dirs $REMOTE_DIR/$CARCH/linhes-testing/ $PKGROOT/linhes-testing/ linhes-testing $2 - source_sync linhes-testing $2 - pacman_sync - ;; - release) - sync_dirs $REMOTE_DIR/$CARCH/linhes/ $PKGROOT/linhes/ linhes $2 - source_sync linhes $2 - pacman_sync - ;; - source) - if [ x = x$2 ] - then - echo "Missing source repository [testing|release]" - exit 1 - fi - source_sync $1 $2 - pacman_sync - ;; - *) - echo "Invalid Options" - echo "lhsync.sh (testing|release|source[testing|release]) (update_db|resync|force)" - echo - echo "force: force rclone to sync when too many deletes are detected" - echo "resync: overwrites the local package and source repos with ones from linhes.org" - echo "update_db: recreate the db files in the repo and syncs to linhes.org" - echo "EXAMPLE: lhsync.sh testing update_db <= will sync the testing repo with linhes.org update the local database and resync with linhes.org" - ;; -esac diff --git a/linhes/linhes-dev/mp.py b/linhes/linhes-dev/mp.py index 7aa9d28..7f4c317 100755 --- a/linhes/linhes-dev/mp.py +++ b/linhes/linhes-dev/mp.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Version 3.0.1 +# Version 3.0.2 import os import sys import re @@ -173,7 +173,6 @@ class Packagefile(object): self.arch = value elif item == "depends": self.pkg_dependencies = value.split() - elif item == "makedepends": self.makepkg_dependencies = self.makepkg_dependencies + value.split() elif item == "makedepends_x86_64": @@ -371,8 +370,8 @@ class Packagefile(object): p.close() def make_package(self): - if self.arch == 'any': - self.CARCH = 'any' + #if self.arch == 'any': + # self.CARCH = 'any' #creates both binary and source package print("- Making package...") retcode = subprocess.call(["sudo", "ccm", "s"]) @@ -405,15 +404,15 @@ class Packagefile(object): # pkgname could be a list of several pkgs. Since bash array format is # loose, let bash parse the pkgname(s) first, then return a list for us. self.updateINIT() - if self.arch == 'any': - self.CARCH = 'any' + #if self.arch == 'any': + # self.CARCH = 'any' for i in self.pkglist: print(" Package name:",i) - self.GZPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.CARCH + ".pkg.tar.gz" - self.XZPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.CARCH + ".pkg.tar.xz" - self.ZSTPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.CARCH + ".pkg.tar.zst" + self.GZPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.arch + ".pkg.tar.gz" + self.XZPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.arch + ".pkg.tar.xz" + self.ZSTPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.arch + ".pkg.tar.zst" #print(self.GZPKG) #print(self.XZPKG) #print(self.ZSTPKG) @@ -429,44 +428,28 @@ class Packagefile(object): print(" ERROR in function update_database: Couldn't find the new package:",self.TOTALPKG) sys.exit(2) + # Remove old package(s) from local copy + print(" Looking for old packages") + + oldfilelist = glob.glob(self.DOCROOT + "/" + i + "-*-*-*.pkg.tar.*") + print(" Old Packages:",oldfilelist) + if oldfilelist: + for DELPKG in oldfilelist: + if "--rmold" in self.cli_list: + print(" Deleting old package:",DELPKG) + os.remove(DELPKG) + + # Copy in new package print(" Copying " + self.TOTALPKG + " to " + self.PKGDEST) if shutil.copy2(self.TOTALPKG, self.PKGDEST): os.remove(self.mydir + "/" + self.TOTALPKG) - - # Remove old package(s) from local copy - #print i + "-" + self.epoch + '(pkgver|[\d.]+)' + "-" + '(?!pkgrel)' - oldpkgcheck = re.compile( re.escape(i) + "-" + self.epoch + '(pkgver|[\d.]+)' + "-" + '(?!pkgrel)' ) - - dirlist = os.listdir(self.DOCROOT) - for n in dirlist: - if n.startswith(i): - if not oldpkgcheck.search(n): - print(n,"does not match") - continue - else: - OLDPKG = glob.glob(oldpkgcheck.search(n).group() + "*.pkg.tar.*") - print(" OLDPKG =",OLDPKG) - if OLDPKG: - for DELPKG in OLDPKG: - if "--rmold" in self.cli_list: - print("Deleting old package:",DELPKG) - os.remove(DELPKG) - #subprocess.call(["repo-remove", self.DOCROOT+ "/" + self.REPO + ".db.tar.gz", DELPKG]) - # Remove any symlinks to old packages - # We make it conditional on "--force" because force will overwrite - # an existing package and we want the symlink to stay, pointing to - # the newly built package with the same pkgrel. - if "--force" not in self.makepkg_cmd: - if os.path.islink(self.mydir + "/" + DELPKG): - os.remove(self.mydir + "/" + DELPKG) - # Copy in new package - print(" Updating " + self.DOCROOT + " with " + self.TOTALPKG) - print(" Copying " + self.PKGDEST + "/" + self.TOTALPKG) + print(" Copying " + self.TOTALPKG + " to " + self.DOCROOT) shutil.copy2(self.PKGDEST + "/" + self.TOTALPKG, self.DOCROOT) - print(" Creating symlink " + self.PKGDEST + "/" + self.TOTALPKG) + print(" Creating symlink to " + self.PKGDEST + "/" + self.TOTALPKG) if os.path.islink(self.mydir + "/" + self.TOTALPKG): os.remove(self.mydir + "/" + self.TOTALPKG) os.symlink(self.DOCROOT + "/" + self.TOTALPKG, self.mydir + "/" + self.TOTALPKG) + print(" Adding package to repo") subprocess.call(["repo-add", self.DOCROOT+ "/" + self.REPO + ".db.tar.gz", self.DOCROOT + "/" + self.TOTALPKG]) #print(" Updating pacman database") #subprocess.call(["pacman","-Syyyyy" ]) @@ -481,35 +464,17 @@ class Packagefile(object): sys.exit(2) i = self.pkglist[0] - oldpkgcheck = re.compile( re.escape(i) + "-" + self.epoch + '(pkgver|[\d.]+)' + "-" + '(?!pkgrel)' ) - dirlist = os.listdir(self.SRCPKGDEST + "/" ) - if self.pkgbase: - # Remove old src package(s) from local copy - if "--rmold" in self.cli_list: - for n in dirlist: - if n.startswith(self.pkgbase): - if not oldpkgcheck.search(n): - print(n,"does not match") - continue - else: - OLDSRCPKG = glob.glob(oldpkgcheck.search(n).group() + "*.src.tar.gz") - else: - # Remove old src package(s) from local copy - if "--rmold" in self.cli_list: - for n in dirlist: - if n.startswith(self.pkgname): - if not oldpkgcheck.search(n): - print(n,"does not match") - continue - else: - OLDSRCPKG = glob.glob(oldpkgcheck.search(n).group() + "*.src.tar.gz") - if OLDSRCPKG: - print("OLDSRCPKG =",OLDSRCPKG) - for DELSRCPKG in OLDSRCPKG: - print("Deleting old source package",DELSRCPKG) - os.remove(DELSRCPKG) - - print(" Copying new source package to",self.SRCPKGDEST + "/" + self.REPO + "/" + self.SRCPKG) + + print(" Looking for old sources") + oldfilelist = glob.glob(self.SRCPKGDEST + "/" + self.REPO + "/" + i + "-*-*.src.tar.gz") + print(" Old Sources:",oldfilelist) + if oldfilelist: + for DELPKG in oldfilelist: + if "--rmold" in self.cli_list: + print(" Deleting old source:",DELPKG) + os.remove(DELPKG) + + print(" Copying " + self.SRCPKG + " to " + self.SRCPKGDEST + "/" + self.REPO) if shutil.copy2(self.SRCPKGDEST + "/" + self.SRCPKG, self.SRCPKGDEST + "/" + self.REPO + "/"): os.remove(self.SRCPKGDEST + "/" + self.SRCPKG) @@ -528,8 +493,8 @@ class Packagefile(object): os.rmdir(self.mydir + "/src") # Remove any old -build and -package log files os.chdir(self.mydir) - build_log = self.pkgname + "-" + self.pkgver + "-" + self.pkgrel + "-" + self.CARCH + "-build.log" - pkg_log = self.pkgname + "-" + self.pkgver + "-" + self.pkgrel + "-" + self.CARCH + "-package.log" + build_log = self.pkgname + "-" + self.pkgver + "-" + self.pkgrel + "-" + self.arch + "-build.log" + pkg_log = self.pkgname + "-" + self.pkgver + "-" + self.pkgrel + "-" + self.arch + "-package.log" all_logs = glob.glob("*.log*") #print "All Logs:",all_logs saved_logs = [] diff --git a/linhes/linhes-dev/setup_lhdev.sh b/linhes/linhes-dev/setup_lhdev.sh deleted file mode 100755 index df034c5..0000000 --- a/linhes/linhes-dev/setup_lhdev.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -echo "Creating repo directories..." -sudo mkdir -p /data/dev/ -sudo chmod a+w /data/dev/ -mkdir -p /data/dev/LH_buildroot -mkdir -p /data/dev/pkg_repo/x86_64/linhes -mkdir -p /data/dev/pkg_repo/x86_64/linhes-testing -mkdir -p /data/dev/pkg_repo/packages -mkdir -p /data/dev/pkg_repo/sources -mkdir -p /data/dev/pkg_repo/src_packages/linhes -mkdir -p /data/dev/pkg_repo/src_packages/linhes-testing - - -echo -e "\n\nSetup clean-chroot-manager (ccm) and edit ~/.config/clean-chroot-manager.conf"... -sudo ccm l -sed -i 's/CHROOTPATH64=.*/CHROOTPATH64=\"\/data\/dev\/LH_buildroot\"/' ~/.config/clean-chroot-manager.conf -sudo ccm c - -echo -e "\n\nChanging setting in /etc/makepkg.conf..." -#sudo sed -i 's/#PKGDEST=.*/PKGDEST=\/data\/dev\/pkg_repo\/packages/' /etc/makepkg.conf -sudo sed -i 's/#SRCDEST=.*/SRCDEST=\/data\/dev\/pkg_repo\/sources/' /etc/makepkg.conf -sudo sed -i 's/#SRCPKGDEST=.*/SRCPKGDEST=\/data\/dev\/pkg_repo\/src_packages/' /etc/makepkg.conf -sudo sed -i 's/#PACKAGER=.*/PACKAGER=\"LinHESDEV \"/' /etc/makepkg.conf - - -# clone the git linhes_pkgbuild -# Checkout the repo. You will need to have been given a dev account on -# linhes.org. This involves creating a public ssh key and supplying it to -# one of the linhes.org admins. The key is created using ssh-keygen. The -# resulting public key will be stored in .ssh/id_rsa.pub. -echo -e "\n\nCheckout the repo manually. You will need to be given a dev account on linhes.org. This involves creating a public ssh key and supplying it toone of the linhes.org admins. The key is created using ssh-keygen. The resulting public key will be stored in .ssh/id_rsa.pub." -echo -e "EXAMPLE: \ncd /data/dev\ngit clone git@linhes.org:linhes_pkgbuild\n\n" diff --git a/linhes/linhes-dev/update_db_repo.sh b/linhes/linhes-dev/update_db_repo.sh deleted file mode 100755 index b277a1f..0000000 --- a/linhes/linhes-dev/update_db_repo.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# tiny util to regenreate the database on the LOCAL machine - -if [ $# -ne 2 ] -then - echo "incorrect number of args" - echo "update_db_repo.sh directory repo" - echo "EX: update_db_repo.sh /data/dev/pkg_repo/x86_64/linhes-testing linhes-testing" - exit 1 -fi - - -cd $1 -REPO=$2 -echo " --------------------------" -echo "updating database for $REPO" -echo " --------------------------" -#pwd - #forcefully remove the old db to start clean - rm -f $REPO.db.tar.gz - repo-add -q $REPO.db.tar.gz *.pkg.tar.* -cd - -- cgit v0.12