repo.sh: Add support for package backup directory

When the archiso is updated, usually the packages are no longer in the build
directories. This update adds the AZB_PACKAGE_BACKUP_DIR variable to allow
repo.sh to gather packages from the backup directory to add to
demz-repo-archiso.
pull/23/head
Jesus Alvarez 11 years ago
parent 2d5bf9d0ca
commit 6b1e11e006
  1. 10
      conf.sh
  2. 12
      lib.sh
  3. 11
      repo.sh

@ -21,8 +21,11 @@ AZB_LTS_KERNEL_X64_VERSION="${AZB_LTS_KERNEL_VERSION}-${AZB_LTS_KERNEL_X64_PKGRE
# Archiso Configuration
AZB_ARCHISO_PKGREL="1"
AZB_KERNEL_ARCHISO_VERSION="3.13.7"
AZB_KERNEL_ARCHISO_PKGREL="1"
AZB_KERNEL_ARCHISO_VERSION="3.14.1"
AZB_KERNEL_ARCHISO_X32_PKGREL="1"
AZB_KERNEL_ARCHISO_X64_PKGREL="1"
AZB_KERNEL_ARCHISO_X32_VERSION="${AZB_KERNEL_ARCHISO_VERSION}-${AZB_KERNEL_ARCHISO_X32_PKGREL}"
AZB_KERNEL_ARCHISO_X64_VERSION="${AZB_KERNEL_ARCHISO_VERSION}-${AZB_KERNEL_ARCHISO_X64_PKGREL}"
# Testing repo Linux version dependencies
# AZB_KERNEL_TEST_VERSION="3.13.8"
@ -44,3 +47,6 @@ AZB_REMOTE_LOGIN="jalvarez@web200.webfactional.com"
# The signing key to use to sign packages
AZB_GPG_SIGN_KEY='0EE7A126'
# Package backup directory (for adding packages to demz-repo-archiso)
AZB_PACKAGE_BACKUP_DIR="/data/pacman/repo/backup"

@ -158,11 +158,15 @@ full_kernel_archiso_version() {
# Determine if the archiso kernel version has the format 3.14 or 3.14.1
[[ ${AZB_KERNEL_ARCHISO_VERSION} =~ ^[[:digit:]]+\.[[:digit:]]+\.([[:digit:]]+) ]]
if [[ ${BASH_REMATCH[1]} != "" ]]; then
AZB_KERNEL_ARCHISO_VERSION_FULL=${AZB_KERNEL_ARCHISO_VERSION}
AZB_KERNEL_ARCHISO_VERSION_CLEAN=$(echo ${AZB_KERNEL_ARCHISO_VERSION} | sed s/-/_/g)
AZB_KERNEL_ARCHISO_X32_VERSION_FULL=${AZB_KERNEL_ARCHISO_X32_VERSION}
AZB_KERNEL_ARCHISO_X32_VERSION_CLEAN=$(echo ${AZB_KERNEL_ARCHISO_X32_VERSION} | sed s/-/_/g)
AZB_KERNEL_ARCHISO_X64_VERSION_FULL=${AZB_KERNEL_ARCHISO_X64_VERSION}
AZB_KERNEL_ARCHISO_X64_VERSION_CLEAN=$(echo ${AZB_KERNEL_ARCHISO_X64_VERSION} | sed s/-/_/g)
else
# Kernel version has the format 3.14, so add a 0.
AZB_KERNEL_ARCHISO_VERSION_FULL=${AZB_KERNEL_ARCHISO_VERSION}.0-${AZB_KERNEL_ARCHISO_PKGREL}
AZB_KERNEL_ARCHISO_VERSION_CLEAN=${AZB_KERNEL_ARCHISO_VERSION}.0_${AZB_KERNEL_ARCHISO_PKGREL}
AZB_KERNEL_ARCHISO_X32_VERSION_FULL=${AZB_KERNEL_ARCHISO_VERSION}.0-${AZB_KERNEL_ARCHISO_X32_PKGREL}
AZB_KERNEL_ARCHISO_X32_VERSION_CLEAN=${AZB_KERNEL_ARCHISO_VERSION}.0_${AZB_KERNEL_ARCHISO_X32_PKGREL}
AZB_KERNEL_ARCHISO_X64_VERSION_FULL=${AZB_KERNEL_ARCHISO_VERSION}.0-${AZB_KERNEL_ARCHISO_X64_PKGREL}
AZB_KERNEL_ARCHISO_X64_VERSION_CLEAN=${AZB_KERNEL_ARCHISO_VERSION}.0_${AZB_KERNEL_ARCHISO_X64_PKGREL}
fi
}

@ -78,6 +78,8 @@ if [[ $AZB_MODE_GIT == 0 && $AZB_MODE_LTS == 0 ]]; then
exit 0;
fi
[[ $AZB_MODE_GIT == 1 ]] && AZB_KERNEL_VERSION=$AZB_GIT_KERNEL_VERSION || AZB_KERNEL_VERSION=$AZB_LTS_KERNEL_VERSION
msg "repo.sh started..."
if [[ $AZB_REPO == "" ]]; then
@ -110,7 +112,13 @@ done
# Get the local packages if no packages were passed to the script
if [[ "${#pkgs[@]}" -eq 0 ]]; then
for pkg in $(find ${path_glob} -iname "*.pkg.tar.xz"); do
# Get packages from the backup directory if the repo is demz-repo-archiso
if [[ $AZB_REPO == "demz-repo-archiso" ]]; then
fcmd_out=$(find ${AZB_PACKAGE_BACKUP_DIR} -iname "*${AZB_KERNEL_ARCHISO_VERSION}*.pkg.tar.xz")
else
fcmd_out=$(find ${path_glob} -iname "*${AZB_KERNEL_VERSION}*.pkg.tar.xz")
fi
for pkg in $fcmd_out; do
debug "Found package: $pkg"
pkgs+=($pkg)
done
@ -144,6 +152,7 @@ if [[ $AZB_REPO != "" ]]; then
# Use a specific version incase of archiso
if [[ $AZB_REPO == "demz-repo-archiso" ]]; then
debug "Expect version: ${AZB_ZOL_VERSION}.*${AZB_KERNEL_ARCHISO_VERSION_CLEAN}-${AZB_ARCHISO_PKGREL}"
[[ $vers =~ ${AZB_ZOL_VERSION}.*${AZB_KERNEL_ARCHISO_VERSION_CLEAN}-${AZB_ARCHISO_PKGREL} ]] && version_match=1
elif [[ $AZB_REPO == "demz-repo-core" && $AZB_MODE_GIT == 1 ]]; then
[[ $vers =~ ${AZB_ZOL_VERSION}.*${AZB_GIT_KERNEL_X64_VERSION_CLEAN}-${AZB_GIT_PKGREL} ]] && version_match=1

Loading…
Cancel
Save