summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_tools/archiso-19/mythvantage/airootfs/etc/systemd/system/linhes-install.service2
-rwxr-xr-xbuild_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh2
-rwxr-xr-x[-rw-r--r--]build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh0
-rw-r--r--build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/mount2.28.2.tar.xz (renamed from build_tools/archiso-19/mythvantage/mount2.28.2.tar.xz)bin652528 -> 652528 bytes
-rwxr-xr-xbuild_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh13
-rwxr-xr-xbuild_tools/archiso-19/mythvantage/build.sh2
-rwxr-xr-xbuild_tools/archiso-19/mythvantage/profile_files/boot_background.psdbin9840326 -> 9969956 bytes
-rw-r--r--build_tools/archiso-19/mythvantage/profile_files/packages.x86_643
-rw-r--r--build_tools/archiso-19/mythvantage/profile_files/packages.x86_64.cache12
-rwxr-xr-xbuild_tools/archiso-19/mythvantage/profile_files/remote_release.pngbin34021 -> 35637 bytes
-rwxr-xr-xbuild_tools/bin/chk_arch_pkg.py31
-rwxr-xr-xbuild_tools/bin/kmsync.sh59
-rwxr-xr-xbuild_tools/bin/lddd198
-rwxr-xr-xbuild_tools/bin/mpv2.py30
-rwxr-xr-xbuild_tools/bin/reset_pacman_chroot.sh26
-rwxr-xr-xsetup_env.sh2
16 files changed, 188 insertions, 192 deletions
diff --git a/build_tools/archiso-19/mythvantage/airootfs/etc/systemd/system/linhes-install.service b/build_tools/archiso-19/mythvantage/airootfs/etc/systemd/system/linhes-install.service
index c517e39..0d0b227 100644
--- a/build_tools/archiso-19/mythvantage/airootfs/etc/systemd/system/linhes-install.service
+++ b/build_tools/archiso-19/mythvantage/airootfs/etc/systemd/system/linhes-install.service
@@ -4,6 +4,6 @@ Description=Start LinHES installer at display
[Service]
Type=oneshot
ExecStart=/root/linhes_install/startx
-ExecStop=bash /root/linhres_install/all_stop.sh
+ExecStop=/root/linhes_install/all_stop.sh
RemainAfterExit=yes
diff --git a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh
index 2b0cdb2..3a58d48 100755
--- a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh
+++ b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/LinHES-install.sh
@@ -45,5 +45,3 @@ fi
wait $pid
-
-
diff --git a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh
index 6d86635..6d86635 100644..100755
--- a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh
+++ b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/all_stop.sh
diff --git a/build_tools/archiso-19/mythvantage/mount2.28.2.tar.xz b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/mount2.28.2.tar.xz
index dd8eeff..dd8eeff 100644
--- a/build_tools/archiso-19/mythvantage/mount2.28.2.tar.xz
+++ b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/mount2.28.2.tar.xz
Binary files differ
diff --git a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh
index f9e9c5a..638aa91 100755
--- a/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh
+++ b/build_tools/archiso-19/mythvantage/airootfs/root/linhes_install/pre_install.sh
@@ -82,9 +82,10 @@ stat_done
stat_busy "Checking for remote"
init_remote
stat_done
-printhl "Finished"
+#printhl "Finished"
#creating /myth for live cd
+stat_busy "Preparing Live Environment"
. /usr/MythVantage/bin/mv_config.py
HDIR=`dirname $MYTHHOME`
mkdir -p $HDIR
@@ -94,22 +95,28 @@ chown -R mythtv.mythtv $MYTHHOME
mkdir -p $DATAMOUNT
create_media_dirs.sh $DATAMOUNT
chown -R mythtv.mythtv $DATAMOUNT/media
+stat_done
+
+#printhl "Finished"
+stat_busy "Starting Services"
-printhl "Finished"
systemctl start dbus
systemctl start avahi-daemon
+stat_done
echo $CMDLINE | grep -qi NoX
if [ $? = 0 ]
then
echo ""
- printhl "No auto X option found"
+ printhl "No auto X option found. Will not start X."
# /usr/bin/chvt 2
else
+ stat_busy "Starting linhes-install"
#/root/linhes_install/startx &
systemctl start linhes-install
+ stat_done
fi
# Set up automatically logged in user
diff --git a/build_tools/archiso-19/mythvantage/build.sh b/build_tools/archiso-19/mythvantage/build.sh
index 921bc23..f64ae43 100755
--- a/build_tools/archiso-19/mythvantage/build.sh
+++ b/build_tools/archiso-19/mythvantage/build.sh
@@ -91,8 +91,6 @@ make_customize_airootfs() {
setarch ${arch} mkarchiso ${verbose} -w "${work_dir}/${arch}" -C "${pacman_conf}" -D "${install_dir}" -r '/root/customize_airootfs.sh' run
rm ${work_dir}/${arch}/airootfs/root/customize_airootfs.sh
- #copy in a static built mount 2.28.2 for mv_install.py to run for install on the iso
- cp -af ${script_path}/mount2.28.2.tar.xz ${work_dir}/${arch}/airootfs/tmp/
}
# Prepare kernel/initramfs ${install_dir}/boot/
diff --git a/build_tools/archiso-19/mythvantage/profile_files/boot_background.psd b/build_tools/archiso-19/mythvantage/profile_files/boot_background.psd
index 1b9b784..746e379 100755
--- a/build_tools/archiso-19/mythvantage/profile_files/boot_background.psd
+++ b/build_tools/archiso-19/mythvantage/profile_files/boot_background.psd
Binary files differ
diff --git a/build_tools/archiso-19/mythvantage/profile_files/packages.x86_64 b/build_tools/archiso-19/mythvantage/profile_files/packages.x86_64
index b6e0e2e..fee5045 100644
--- a/build_tools/archiso-19/mythvantage/profile_files/packages.x86_64
+++ b/build_tools/archiso-19/mythvantage/profile_files/packages.x86_64
@@ -63,12 +63,11 @@ mysql-python
expect
curl
dnsutils
-parted
sg3_utils
nmbscan
squashfs-tools
rsync
-python-parted
+python2-pyparted
python2-pexpect
python-netifaces
python-iplib
diff --git a/build_tools/archiso-19/mythvantage/profile_files/packages.x86_64.cache b/build_tools/archiso-19/mythvantage/profile_files/packages.x86_64.cache
index 5a8632a..74be99d 100644
--- a/build_tools/archiso-19/mythvantage/profile_files/packages.x86_64.cache
+++ b/build_tools/archiso-19/mythvantage/profile_files/packages.x86_64.cache
@@ -9,9 +9,16 @@ nvidia-utils
opencl-nvidia
nvidia-settings
libxnvctrl
+nvidia-390xx
+nvidia-390xx-settings
+nvidia-390xx-utils
+opencl-nvidia-390xx
+libxnvctrl-390xx
nvidia-340xx
+nvidia-340xx-settings
nvidia-340xx-utils
opencl-nvidia-340xx
+libxnvctrl-340xx
nvidia-304xx
nvidia-304xx-utils
opencl-nvidia-304xx
@@ -31,8 +38,11 @@ xf86-input-vmmouse
xf86-video-vmware
xf86-video-vesa
xf86-video-intel
+xf86-video-ati
mesa
+mesa-demos
libglvnd
+libva-mesa-driver
libva-intel-driver
-svga-dri
+libva-utils
nss-mdns
diff --git a/build_tools/archiso-19/mythvantage/profile_files/remote_release.png b/build_tools/archiso-19/mythvantage/profile_files/remote_release.png
index a3a716f..27f4526 100755
--- a/build_tools/archiso-19/mythvantage/profile_files/remote_release.png
+++ b/build_tools/archiso-19/mythvantage/profile_files/remote_release.png
Binary files differ
diff --git a/build_tools/bin/chk_arch_pkg.py b/build_tools/bin/chk_arch_pkg.py
index 119084b..7af02bd 100755
--- a/build_tools/bin/chk_arch_pkg.py
+++ b/build_tools/bin/chk_arch_pkg.py
@@ -13,7 +13,8 @@ import re
import subprocess
def getArchVer():
- repos=['testing', 'core', 'extra', 'community-testing', 'community', 'aur']
+# repos=['testing', 'core', 'extra', 'community-testing', 'community', 'aur']
+ repos=['core', 'extra', 'community-testing', 'community', 'aur']
website=""
archVer=""
aPKGBUILD=""
@@ -114,19 +115,20 @@ def getSource():
else:
str1 = raw_input("\n Press any key to download source from arch, or N to cancel: ")
if str1 != 'N' and str1 != 'n':
+ filename=currDirName + ".tar.gz"
if repo == "aur":
dlSource = sourceURL
+ subprocess.call(["curl", "-O", dlSource])
+ subprocess.call(["tar", "xvf", filename])
else:
if "community" in repo:
repoTag = "community"
else:
repoTag = "packages"
- dlSource = 'https://git.archlinux.org/svntogit/%s.git/snapshot/%s-packages/%s.tar.gz' %(repoTag, repoTag, currDirName)
+ subprocess.call(["asp", "update"])
+ subprocess.call(["asp", "export", currDirName])
- print dlSource
- subprocess.call(["curl", "-O", dlSource])
- filename=currDirName + ".tar.gz"
- subprocess.call(["tar", "xvf", filename])
+ #print dlSource
if yes_all:
str2 = "Y"
@@ -136,14 +138,15 @@ def getSource():
if repo == "aur":
srcDir = os.getcwd() + "/" + currDirName
else:
- srcDir = os.getcwd() + "/" + repoTag + "-packages/" + currDirName + "/trunk/"
+ #srcDir = os.getcwd() + "/" + repoTag + "-packages/" + currDirName + "/trunk/"
+ srcDir = os.getcwd() + "/" + currDirName
src_files = os.listdir(srcDir)
for file_name in src_files:
if file_name != ".AURINFO" and file_name != ".SRCINFO":
full_file_name = os.path.join(srcDir, file_name)
if (os.path.isfile(full_file_name)):
shutil.copy(full_file_name, os.getcwd())
- subprocess.call("diff -q -x '__arch_LH.diff' -x '__changelog' -x '.SRCINFO' -x '.AURINFO' -x 'pkg' -x 'src' -x '*.pkg.tar.xz' -x 'packages-packages' -x 'community-packages' -x %s -x '*-package.log' -x '*-build.log' -x '%s' ./ %s > ./__arch_LH.diff" % (currDirName,filename, srcDir), shell=True)
+ subprocess.call("diff -q -x '__arch_LH.diff' -x '__changelog' -x '.SRCINFO' -x '.AURINFO' -x 'pkg' -x 'src' -x '*.pkg.tar.xz' -x '*.pkg.tar.zst' -x 'packages-packages' -x 'community-packages' -x %s -x '*-package.log' -x '*-build.log' -x '%s' ./ %s > ./__arch_LH.diff" % (currDirName,filename, srcDir), shell=True)
if os.stat(os.getcwd() + "/__arch_LH.diff").st_size == 0:
subprocess.call("rm __arch_LH.diff", shell=True)
else:
@@ -154,11 +157,12 @@ def getSource():
else:
str3 = raw_input("\n Press any key to remove downloads, or N to cancel: ")
if str3 != 'N' and str3 != 'n':
- subprocess.call(["rm", filename])
+ subprocess.call(["rm", "-r", currDirName])
if repo == "aur":
- subprocess.call(["rm", "-r", currDirName])
- else:
- subprocess.call(["rm", "-r", repoTag + "-packages"])
+ subprocess.call(["rm", filename])
+ #else:
+ #subprocess.call(["rm", "-r", repoTag + "-packages"])
+ #subprocess.call(["rm", "-r", currDirName])
else:
sys.exit(0)
@@ -180,7 +184,8 @@ def main():
print "Searching for " + currDirName + " on archlinux.org..."
archVer = getArchVer()
getLHVer()
- if archVer != "" and sourceURL != "":
+# if archVer != "" and sourceURL != "":
+ if sourceURL != "":
getSource()
if __name__ == "__main__":
diff --git a/build_tools/bin/kmsync.sh b/build_tools/bin/kmsync.sh
index 42b001b..9b0a992 100755
--- a/build_tools/bin/kmsync.sh
+++ b/build_tools/bin/kmsync.sh
@@ -1,8 +1,9 @@
#!/bin/bash
-#This script will create and synchronize a local package mirror with the repository (as defined below) on linhes.org, it will also update the database.
-#This script uses a shared account on linhes.org. DO NOT change the account name
-# and dont' ask for the password, instead setup ssh keys.
-#
+
+#This script will create and synchronize a local package mirror with the repository (as defined below) on linhes.org,
+# it will also update the database.
+#This script uses a shared account on linhes.org.
+# DO NOT change the account name and dont' ask for the password, instead setup ssh keys.
if [ -e /etc/makepkg.conf ]
@@ -29,7 +30,7 @@ function sync_dirs {
#first bring down new changes from linhes.org
echo "--------"
echo
- echo "Syncing the packages with linhes.org"
+ echo "Syncing the packages with linhes.org"
echo
echo "--------"
unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@linhes.org/$REMOTE $LOCAL
@@ -43,7 +44,11 @@ function sync_dirs {
fi
#update the local database
- update_db_repo.sh $LOCAL $3
+ if [ "$4" == "update_db" ]
+ then
+ echo "Updating the whole db..."
+ update_db_repo.sh $LOCAL $3
+ fi
#push the database back
echo "--------"
@@ -51,8 +56,8 @@ function sync_dirs {
echo "Pushing the pkg database to linhes.org"
echo
echo "--------"
- unison km-up -logfile /tmp/unison-up.log -auto -batch -numericids -force $LOCAL $LOCAL ssh://reposync@linhes.org/$REMOTE
- #scp $LOCAL/*.db.tar.gz reposync@linhes.org:$REMOTE/
+ unison km-up -logfile /tmp/unison-up.log -auto -batch -numericids -force $LOCAL $LOCAL ssh://reposync@linhes.org/$REMOTE
+ #scp $LOCAL/*.db.tar.gz reposync@linhes.org:$REMOTE/
echo "-------------------------------------------------------"
echo "----------- Finished with $3 -----------"
@@ -62,41 +67,40 @@ function sync_dirs {
function source_sync () {
src_repo=$1
- case $1 in
+ case $1 in
testing )
echo "updating source packages"
REMOTE_DIR=/srv/www/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@linhes.org/$REMOTE_DIR $LOCAL
-
+
REMOTE_DIR=/srv/www/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@linhes.org/$REMOTE_DIR $LOCAL
;;
- release )
+ release )
echo "updating source packages"
REMOTE_DIR=/srv/www/repo/src_packages/core
LOCAL=/data/pkg_repo/src_packages/core
unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@linhes.org/$REMOTE_DIR $LOCAL
-
+
REMOTE_DIR=/srv/www/repo/src_packages/extra
LOCAL=/data/pkg_repo/src_packages/extra
unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@linhes.org/$REMOTE_DIR $LOCAL
;;
- chroot-devel )
+
+ chroot-devel )
echo "updating source packages"
REMOTE_DIR=/srv/www/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@linhes.org/$REMOTE_DIR $LOCAL
;;
-
-
- *)
+ *)
echo "need to know the source repository [testing|release|chroot-devel]"
exit 1
- ;;
+ ;;
esac
}
@@ -124,30 +128,28 @@ 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
+ sync_dirs $REMOTE_DIR/$CARCH/core-testing $DOCROOT/core-testing core-testing $2
+ sync_dirs $REMOTE_DIR/$CARCH/extra-testing $DOCROOT/extra-testing extra-testing $2
source_sync testing
- pacman_sync
+ pacman_sync
;;
release)
- sync_dirs $REMOTE_DIR/$CARCH/core $DOCROOT/core core
- sync_dirs $REMOTE_DIR/$CARCH/extra $DOCROOT/extra extra
+ sync_dirs $REMOTE_DIR/$CARCH/core $DOCROOT/core core $2
+ sync_dirs $REMOTE_DIR/$CARCH/extra $DOCROOT/extra extra $2
source_sync release
- pacman_sync
+ pacman_sync
;;
chroot-devel)
echo "will update chroot-devel"
- sync_dirs $REMOTE_DIR/$CARCH/chroot-devel $DOCROOT/chroot-devel chroot-devel
+ sync_dirs $REMOTE_DIR/$CARCH/chroot-devel $DOCROOT/chroot-devel chroot-devel $2
source_sync chroot-devel
- pacman_sync
+ pacman_sync
;;
source)
@@ -163,9 +165,8 @@ case $1 in
echo "invalid options"
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 "EX: kmsync.sh testing update_db <= 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"
-
;;
esac
echo "Finished."
diff --git a/build_tools/bin/lddd b/build_tools/bin/lddd
index a16b332..590fe6c 100755
--- a/build_tools/bin/lddd
+++ b/build_tools/bin/lddd
@@ -2,6 +2,18 @@
#
# lddd - find broken library links on your machine
#
+# License: Unspecified
+
+#!/hint/bash
+# This may be included with or without `set -euE`
+
+# License: Unspecified
+
+[[ -z ${_INCLUDE_COMMON_SH:-} ]] || return 0
+_INCLUDE_COMMON_SH=true
+
+# shellcheck disable=1091
+. /usr/share/makepkg/util.sh
# Avoid any encoding problems
export LANG=C
@@ -9,68 +21,37 @@ export LANG=C
shopt -s extglob
# check if messages are to be printed using color
-unset ALL_OFF BOLD BLUE GREEN RED YELLOW
if [[ -t 2 ]]; then
- # prefer terminal safe colored and bold text when tput is supported
- if tput setaf 0 &>/dev/null; then
- ALL_OFF="$(tput sgr0)"
- BOLD="$(tput bold)"
- BLUE="${BOLD}$(tput setaf 4)"
- GREEN="${BOLD}$(tput setaf 2)"
- RED="${BOLD}$(tput setaf 1)"
- YELLOW="${BOLD}$(tput setaf 3)"
- else
- ALL_OFF="\e[1;0m"
- BOLD="\e[1;1m"
- BLUE="${BOLD}\e[1;34m"
- GREEN="${BOLD}\e[1;32m"
- RED="${BOLD}\e[1;31m"
- YELLOW="${BOLD}\e[1;33m"
- fi
+ colorize
+else
+ # shellcheck disable=2034
+ declare -gr ALL_OFF='' BOLD='' BLUE='' GREEN='' RED='' YELLOW=''
fi
-readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
-
-plain() {
- local mesg=$1; shift
- printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-msg() {
- local mesg=$1; shift
- printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-msg2() {
- local mesg=$1; shift
- printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-warning() {
- local mesg=$1; shift
- printf "${YELLOW}==> WARNING:${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-error() {
- local mesg=$1; shift
- printf "${RED}==> ERROR:${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
stat_busy() {
local mesg=$1; shift
- printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}...${ALL_OFF}" >&2
+ # shellcheck disable=2059
+ printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}...${ALL_OFF}" "$@" >&2
}
stat_done() {
+ # shellcheck disable=2059
printf "${BOLD}done${ALL_OFF}\n" >&2
}
+_setup_workdir=false
setup_workdir() {
- [[ -z $WORKDIR ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX")
+ [[ -z ${WORKDIR:-} ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX")
+ _setup_workdir=true
+ trap 'trap_abort' INT QUIT TERM HUP
+ trap 'trap_exit' EXIT
}
cleanup() {
- [[ -n $WORKDIR ]] && rm -rf "$WORKDIR"
- exit ${1:-0}
+ if [[ -n ${WORKDIR:-} ]] && $_setup_workdir; then
+ rm -rf "$WORKDIR"
+ fi
+ exit "${1:-0}"
}
abort() {
@@ -94,81 +75,54 @@ die() {
cleanup 255
}
-trap 'trap_abort' INT QUIT TERM HUP
-trap 'trap_exit' EXIT
-
##
-# usage : in_array( $needle, $haystack )
-# return : 0 - found
-# 1 - not found
+# usage : lock( $fd, $file, $message, [ $message_arguments... ] )
##
-in_array() {
- local needle=$1; shift
- local item
- for item in "$@"; do
- [[ $item = $needle ]] && return 0 # Found
- done
- return 1 # Not Found
-}
+lock() {
+ # Only reopen the FD if it wasn't handed to us
+ if ! [[ "/dev/fd/$1" -ef "$2" ]]; then
+ mkdir -p -- "$(dirname -- "$2")"
+ eval "exec $1>"'"$2"'
+ fi
-##
-# usage : get_full_version( [$pkgname] )
-# return : full version spec, including epoch (if necessary), pkgver, pkgrel
-##
-get_full_version() {
- # set defaults if they weren't specified in buildfile
- pkgbase=${pkgbase:-${pkgname[0]}}
- epoch=${epoch:-0}
- if [[ -z $1 ]]; then
- if (( ! epoch )); then
- echo $pkgver-$pkgrel
- else
- echo $epoch:$pkgver-$pkgrel
- fi
- else
- for i in pkgver pkgrel epoch; do
- local indirect="${i}_override"
- eval $(declare -f package_$1 | sed -n "s/\(^[[:space:]]*$i=\)/${i}_override=/p")
- [[ -z ${!indirect} ]] && eval ${indirect}=\"${!i}\"
- done
- if (( ! $epoch_override )); then
- echo $pkgver_override-$pkgrel_override
- else
- echo $epoch_override:$pkgver_override-$pkgrel_override
- fi
+ if ! flock -n "$1"; then
+ stat_busy "${@:3}"
+ flock "$1"
+ stat_done
fi
}
##
-# usage : lock( $fd, $file, $message )
+# usage : slock( $fd, $file, $message, [ $message_arguments... ] )
##
-lock() {
- eval "exec $1>"'"$2"'
- if ! flock -n $1; then
- stat_busy "$3"
- flock $1
+slock() {
+ # Only reopen the FD if it wasn't handed to us
+ if ! [[ "/dev/fd/$1" -ef "$2" ]]; then
+ mkdir -p -- "$(dirname -- "$2")"
+ eval "exec $1>"'"$2"'
+ fi
+
+ if ! flock -sn "$1"; then
+ stat_busy "${@:3}"
+ flock -s "$1"
stat_done
fi
}
##
-# usage : slock( $fd, $file, $message )
+# usage : lock_close( $fd )
##
-slock() {
- eval "exec $1>"'"$2"'
- if ! flock -sn $1; then
- stat_busy "$3"
- flock -s $1
- stat_done
- fi
+lock_close() {
+ local fd=$1
+ # https://github.com/koalaman/shellcheck/issues/862
+ # shellcheck disable=2034
+ exec {fd}>&-
}
##
# usage: pkgver_equal( $pkgver1, $pkgver2 )
##
pkgver_equal() {
- local left right
-
if [[ $1 = *-* && $2 = *-* ]]; then
# if both versions have a pkgrel, then they must be an exact match
[[ $1 = "$2" ]]
@@ -187,7 +141,7 @@ pkgver_equal() {
find_cached_package() {
local searchdirs=("$PWD" "$PKGDEST") results=()
local targetname=$1 targetver=$2 targetarch=$3
- local dir pkg pkgbasename pkgparts name ver rel arch size r results
+ local dir pkg pkgbasename name ver rel arch r results
for dir in "${searchdirs[@]}"; do
[[ -d $dir ]] || continue
@@ -225,7 +179,7 @@ find_cached_package() {
return 1
;;
1)
- printf '%s\n' "$results"
+ printf '%s\n' "${results[0]}"
return 0
;;
*)
@@ -235,18 +189,6 @@ find_cached_package() {
esac
}
-##
-# usage : check_root ("$0" "$@")
-##
-check_root() {
- (( EUID == 0 )) && return
- if type -P sudo >/dev/null; then
- exec sudo -- "$@"
- else
- exec su root -c "$(printf ' %q' "$@")"
- fi
-}
-
ifs=$IFS
IFS="${IFS}:"
@@ -259,10 +201,10 @@ TEMPDIR=$(mktemp -d --tmpdir lddd-script.XXXX)
msg 'Go out and drink some tea, this will take a while :) ...'
# Check ELF binaries in the PATH and specified dir trees.
for tree in $PATH $libdirs $extras; do
- msg2 "DIR $tree"
+ msg2 "DIR %s" "$tree"
# Get list of files in tree.
- files=$(find $tree -type f ! -name '*.a' ! -name '*.la' ! -name '*.py*' ! -name '*.txt' ! -name '*.h' ! -name '*.ttf' ! \
+ files=$(find "$tree" -type f ! -name '*.a' ! -name '*.la' ! -name '*.py*' ! -name '*.txt' ! -name '*.h' ! -name '*.ttf' ! \
-name '*.rb' ! -name '*.ko' ! -name '*.pc' ! -name '*.enc' ! -name '*.cf' ! -name '*.def' ! -name '*.rules' ! -name \
'*.cmi' ! -name '*.mli' ! -name '*.ml' ! -name '*.cma' ! -name '*.cmx' ! -name '*.cmxa' ! -name '*.pod' ! -name '*.pm' \
! -name '*.pl' ! -name '*.al' ! -name '*.tcl' ! -name '*.bs' ! -name '*.o' ! -name '*.png' ! -name '*.gif' ! -name '*.cmo' \
@@ -270,22 +212,22 @@ for tree in $PATH $libdirs $extras; do
-name '*.mcopclass' ! -name '*.mcoptype')
IFS=$ifs
for i in $files; do
- if (( $(file $i | grep -c 'ELF') != 0 )); then
+ if (( $(file "$i" | grep -c 'ELF') != 0 )); then
# Is an ELF binary.
- if (( $(ldd $i 2>/dev/null | grep -c 'not found') != 0 )); then
+ if (( $(ldd "$i" 2>/dev/null | grep -c 'not found') != 0 )); then
# Missing lib.
- echo "$i:" >> $TEMPDIR/raw.txt
- ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
+ echo "$i:" >> "$TEMPDIR/raw.txt"
+ ldd "$i" 2>/dev/null | grep 'not found' >> "$TEMPDIR/raw.txt"
fi
fi
done
done
-grep '^/' $TEMPDIR/raw.txt | sed -e 's/://g' >> $TEMPDIR/affected-files.txt
+grep '^/' "$TEMPDIR/raw.txt" | sed -e 's/://g' >> "$TEMPDIR/affected-files.txt"
# invoke pacman
-for i in $(cat $TEMPDIR/affected-files.txt); do
- pacman -Qo $i | awk '{print $4,$5}' >> $TEMPDIR/pacman.txt
-done
+while read -r i; do
+ pacman -Qo "$i" | awk '{print $4,$5}' >> "$TEMPDIR/pacman.txt"
+done < "$TEMPDIR/affected-files.txt"
# clean list
-sort -u $TEMPDIR/pacman.txt >> $TEMPDIR/possible-rebuilds.txt
+sort -u "$TEMPDIR/pacman.txt" >> "$TEMPDIR/possible-rebuilds.txt"
-msg "Files saved to $TEMPDIR"
+msg "Files saved to %s" "$TEMPDIR"
diff --git a/build_tools/bin/mpv2.py b/build_tools/bin/mpv2.py
index b3d5cf2..51a9cb7 100755
--- a/build_tools/bin/mpv2.py
+++ b/build_tools/bin/mpv2.py
@@ -156,6 +156,7 @@ class Packagefile(object):
self.TOTALPKG = ""
self.GZPKG = ""
self.XZPKG = ""
+ self.ZSTPKG = ""
self.repolist=["core", "extra",
"chroot-devel", "mv-core", "xmpl", "local"]
self.mydir = os.getcwd()
@@ -540,10 +541,14 @@ class Packagefile(object):
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"
print self.GZPKG
print self.XZPKG
+ print self.ZSTPKG
- if os.path.isfile(self.PKGDEST + "/" + self.XZPKG):
+ if os.path.isfile(self.PKGDEST + "/" + self.ZSTPKG):
+ self.TOTALPKG = self.ZSTPKG
+ elif os.path.isfile(self.PKGDEST + "/" + self.XZPKG):
self.TOTALPKG = self.XZPKG
elif os.path.isfile(self.PKGDEST + "/" + self.GZPKG):
self.TOTALPKG = GZPKG
@@ -565,13 +570,14 @@ class Packagefile(object):
print n,"does not match"
continue
else:
- OLDPKG = glob.glob(oldpkgcheck.search(n).group() + "*.pkg.tar.?z")
+ 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
@@ -583,6 +589,10 @@ class Packagefile(object):
print " Updating " + self.DOCROOT + " with " + self.TOTALPKG
print " Copying " + self.PKGDEST + "/" + self.TOTALPKG
shutil.copy2(self.PKGDEST + "/" + self.TOTALPKG, self.DOCROOT)
+ print " Creating symlink " + 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)
subprocess.call(["repo-add", self.DOCROOT+ "/" + self.REPO + ".db.tar.gz", self.DOCROOT + "/" + self.TOTALPKG])
print " Updating pacman database"
subprocess.call(["pacman","-Syyyyy" ])
@@ -1020,15 +1030,15 @@ def main():
print "\n\n\n\n"
print "#######################################################"
- print "\n"
- print "Successful updated from ABS:"
- print "----------------------------"
- pprint.pprint(update_pkg)
+# print "\n"
+# print "Successful updated from ABS:"
+# print "----------------------------"
+# pprint.pprint(update_pkg)
- print "\n"
- print "Failed updated from ABS:"
- print "----------------------------"
- pprint.pprint(failed_update)
+# print "\n"
+# print "Failed updated from ABS:"
+# print "----------------------------"
+# pprint.pprint(failed_update)
print "\n"
diff --git a/build_tools/bin/reset_pacman_chroot.sh b/build_tools/bin/reset_pacman_chroot.sh
new file mode 100755
index 0000000..802665b
--- /dev/null
+++ b/build_tools/bin/reset_pacman_chroot.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+echo "Removing all but base & base-devel..."
+#pacman -R $(comm -23 <(pacman -Qq | sort) <((for i in $(pacman -Qqg base); do pactree -ul "$i"; done) | sort -u))
+#pacman -R $(comm -23 <(pacman -Qq | sort) <((
+pacman -Qq | sort > /tmp/allInstalled.reset
+rm /tmp/baseDeps.reset
+
+for i in $(pacman -Qqg base base-devel)
+do
+ pactree -ul "$i" >> /tmp/baseDeps.reset
+done
+
+for i in pacman glibc pacman-contrib
+do
+ echo "$i" >> /tmp/baseDeps.reset
+done
+
+sort -u /tmp/baseDeps.reset > /tmp/baseDepsSorted.reset
+
+removePkgs="$(comm -23 /tmp/allInstalled.reset /tmp/baseDepsSorted.reset)"
+
+pacman -R --noconfirm $removePkgs
+
+#echo "Adding back other packages..."
+pacman -S --noconfirm base-devel pacman-contrib asp openssh git python2 dosfstools rsync squashfs-tools libisoburn python2-gitpython parched unison arch-install-scripts lynx python2-ndg-httpsclient wget findbrokenpkgs tig
diff --git a/setup_env.sh b/setup_env.sh
index fe7ccbd..0b0b3a7 100755
--- a/setup_env.sh
+++ b/setup_env.sh
@@ -157,7 +157,7 @@ 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 unison arch-install-scripts lynx"
+su -c "./mkarchroot -f -C /tmp/pacman.conf.chroot ../build_root.$ARCH base base-devel openssh git python2 dosfstools rsync squashfs-tools libisoburn python2-gitpython parched unison arch-install-scripts lynx"
status=$?
if [ ! $status = 0 ]
then