summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xabslibre6
-rwxr-xr-xany-to-ours167
-rw-r--r--config3
-rw-r--r--config_abslibre_gnu+hurd16
-rw-r--r--config_abslibre_gnu+linux16
-rw-r--r--config_abslibre_gnu+linux_arm16
-rw-r--r--config_gnu+hurd12
-rw-r--r--config_gnu+linux12
-rw-r--r--platforms4
9 files changed, 133 insertions, 119 deletions
diff --git a/abslibre b/abslibre
index 20d931f..17b425e 100755
--- a/abslibre
+++ b/abslibre
@@ -8,13 +8,11 @@ set -e
# * Sync bs (abslibre) from bs derivation (abs) excluding from blacklist
# * Create repo.abs.tar.gz tarballs
-platform_name="${platform/\//+}"
-source "$(dirname "$(readlink -e "$0")")/config_${platform_name,,}"
+source "$(dirname "$(readlink -e "$0")")/platforms"
for 'platform' in "${PLATFORMS[@]}"; do
- platform_name="${platform/\//+}"
- . "./config_${platform_name,,}"
+ source "$(dirname "$(readlink -e "$0")")/config_${platform}"
function sync_bs_derivation() {
for 'ARCH' in 'any' "${ARCHES[@]}"; do
diff --git a/any-to-ours b/any-to-ours
index a84c368..92d30f9 100755
--- a/any-to-ours
+++ b/any-to-ours
@@ -7,8 +7,7 @@ trap_exit() {
exit 1
}
-platform_name="${platform/\//+}"
-source "$(dirname "$(readlink -e "$0")")/config_${platform_name,,}"
+source "$(dirname "$(readlink -e "$0")")/platforms"
source "$(dirname "$(readlink -e "$0")")/db-libremessages"
# From makepkg
@@ -18,101 +17,107 @@ trap 'trap_exit "$(gettext "TERM signal caught. Exiting...")"' TERM HUP QUIT
trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT
trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
-# Traverse all Arch repos
-for '_repo' in "${MAIN_REPOS[@]}"; do
- msg "Processing %s..." "${_repo}"
-
- # Find 'any' packages
- # This is hardcoded but it could release other arches...
- PKGS=($(find "${REPO_DIR}/${_repo}/os/${ARCHES[0]}/" \
- -iname '*-any.pkg.tar.?z' \
- -printf "%f "))
-
- if [ ${#PKGS[@]} -eq 0 ]; then
- msg2 "No '%s' packages here" any
- continue
- fi
-
- for '_arch' in "${ARCHES[@]}"; do
- msg2 "Syncing %s..." "${_arch}"
-
- # Sync 'any' only and extract the synced packages
- SYNCED=($(
- rsync -av \
- --include='*-any.pkg.tar.?z' \
- --include='*-any.pkg.tar.?z.sig' \
- --exclude='*' \
- "${REPO_DIR}/${_repo}/os/${ARCHES[0]}/" \
- "${REPO_DIR}/${_repo}/os/${_arch}/" 2>&1 | \
- grep 'any\.pkg\.tar\..z$' | \
- cut -d ' ' -f 1 ))
-
- if [ "${#SYNCED[@]}" -eq 0 ]; then
- msg2 "Already synced (or error happened)"
- continue
- fi
-
- msg2 "Synced %d packages: %s" "${#SYNCED[@]}" "${SYNCED[*]}"
+for 'platform' in "${PLATFORMS[@]}"; do
- msg2 "Adding to db..."
+ source "$(dirname "$(readlink -e "$0")")/config_${platform}"
- pushd "${REPO_DIR}/${_repo}/os/${_arch}/" >/dev/null
+ # Traverse all Arch repos
+ for '_repo' in "${MAIN_REPOS[@]}"; do
+ msg "Processing %s..." "${_repo}"
- # Add the packages to the db
- repo-add "${_repo}${DB_EXT}" "${SYNCED[@]}"
+ # Find 'any' packages
+ # This is hardcoded but it could release other arches...
+ PKGS=($(find "${REPO_DIR}/${_repo}/os/${ARCHES[0]}/" \
+ -iname '*-any.pkg.tar.?z' \
+ -printf "%f "))
- popd >/dev/null
-
- # Avoid mixups
- unset 'SYNCED' 'PKGS'
- done
- if [ -n "${MULTILIB}" ]; then
- for '_repo_multilib' in "${MULTILIB_REPOS[@]}"; do
- msg "Processing %s..." "${_repo}" '(multilib)'
-
- # Find 'any' packages
- # This is hardcoded but it could release other arches...
- PKGS_MULTILIB=($(find "${REPO_DIR}/${_repo_multilib}/os/${MULTILIB[0]}/" \
- -iname '*-any.pkg.tar.?z' \
- -printf "%f "))
-
- if [ ${#PKGS_MULTILIB[@]} -eq 0 ]; then
- msg2 "No '%s' multilib packages here" any
- continue
- fi
+ if [ ${#PKGS[@]} -eq 0 ]; then
+ msg2 "No '%s' packages here" any
+ continue
+ fi
- for '_arch_multilib' in "${MULTILIB[@]}"; do
- msg2 "Syncing %s..." "${_arch_multilib}" '(multilib)'
-
- # Sync 'any' only and extract the synced packages
- SYNCED_MULTILIB=($(
- rsync -av \
- --include='*-any.pkg.tar.?z' \
- --include='*-any.pkg.tar.?z.sig' \
- --exclude='*' \
- "${REPO_DIR}/${_repo_multilib}/os/${MULTILIB[0]}/" \
- "${REPO_DIR}/${_repo_multilib}/os/${_arch_multilib}/" 2>&1 | \
- grep 'any\.pkg\.tar\..z$' | \
- cut -d ' ' -f 1 ))
-
- if [ "${#SYNCED_MULTILIB[@]}" -eq 0 ]; then
+ for '_arch' in "${ARCHES[@]}"; do
+ msg2 "Syncing %s..." "${_arch}"
+
+ # Sync 'any' only and extract the synced packages
+ SYNCED=($(
+ rsync -av \
+ --include='*-any.pkg.tar.?z' \
+ --include='*-any.pkg.tar.?z.sig' \
+ --exclude='*' \
+ "${REPO_DIR}/${_repo}/os/${ARCHES[0]}/" \
+ "${REPO_DIR}/${_repo}/os/${_arch}/" 2>&1 | \
+ grep 'any\.pkg\.tar\..z$' | \
+ cut -d ' ' -f 1 ))
+
+ if [ "${#SYNCED[@]}" -eq 0 ]; then
msg2 "Already synced (or error happened)"
continue
fi
- msg2 "Synced %d packages: %s" "${#SYNCED_MULTILIB[@]}" "${SYNCED_MULTILIB[*]}"
+ msg2 "Synced %d packages: %s" "${#SYNCED[@]}" "${SYNCED[*]}"
- msg2 "Adding Multilib to db..."
+ msg2 "Adding to db..."
- pushd "${REPO_DIR}/${_repo_multilib}/os/${_arch_multilib}/" >/dev/null
+ pushd "${REPO_DIR}/${_repo}/os/${_arch}/" >/dev/null
# Add the packages to the db
- repo-add "${_repo_multilib}${DB_EXT}" "${SYNCED_MULTILIB[@]}"
+ repo-add "${_repo}${DB_EXT}" "${SYNCED[@]}"
popd >/dev/null
# Avoid mixups
- unset 'SYNCED_MULTILIB' 'PKGS_MULTILIB'
+ unset 'SYNCED' 'PKGS'
done
- fi
+ if [ -n "${MULTILIB}" ]; then
+ for '_repo_multilib' in "${MULTILIB_REPOS[@]}"; do
+ msg "Processing %s..." "${_repo}" '(multilib)'
+
+ # Find 'any' packages
+ # This is hardcoded but it could release other arches...
+ PKGS_MULTILIB=($(find "${REPO_DIR}/${_repo_multilib}/os/${MULTILIB[0]}/" \
+ -iname '*-any.pkg.tar.?z' \
+ -printf "%f "))
+
+ if [ ${#PKGS_MULTILIB[@]} -eq 0 ]; then
+ msg2 "No '%s' multilib packages here" any
+ continue
+ fi
+
+ for '_arch_multilib' in "${MULTILIB[@]}"; do
+ msg2 "Syncing %s..." "${_arch_multilib}" '(multilib)'
+
+ # Sync 'any' only and extract the synced packages
+ SYNCED_MULTILIB=($(
+ rsync -av \
+ --include='*-any.pkg.tar.?z' \
+ --include='*-any.pkg.tar.?z.sig' \
+ --exclude='*' \
+ "${REPO_DIR}/${_repo_multilib}/os/${MULTILIB[0]}/" \
+ "${REPO_DIR}/${_repo_multilib}/os/${_arch_multilib}/" 2>&1 | \
+ grep 'any\.pkg\.tar\..z$' | \
+ cut -d ' ' -f 1 ))
+
+ if [ "${#SYNCED_MULTILIB[@]}" -eq 0 ]; then
+ msg2 "Already synced (or error happened)"
+ continue
+ fi
+
+ msg2 "Synced %d packages: %s" "${#SYNCED_MULTILIB[@]}" "${SYNCED_MULTILIB[*]}"
+
+ msg2 "Adding Multilib to db..."
+
+ pushd "${REPO_DIR}/${_repo_multilib}/os/${_arch_multilib}/" >/dev/null
+
+ # Add the packages to the db
+ repo-add "${_repo_multilib}${DB_EXT}" "${SYNCED_MULTILIB[@]}"
+
+ popd >/dev/null
+
+ # Avoid mixups
+ unset 'SYNCED_MULTILIB' 'PKGS_MULTILIB'
+ done
+ done
+ fi
+ done
done
diff --git a/config b/config
index d99bd04..2c507cf 100644
--- a/config
+++ b/config
@@ -1,8 +1,5 @@
#!/hint/bash
-# Parabola Platforms
-PLATFORMS=('ABSLibre_GNU/linux') # 'GNU/Hurd' 'GNU/Linux' 'ABSLibre_GNU/Hurd'
-
# Parabola Software Development
PSD=('rolling' 'testing' 'stable')
diff --git a/config_abslibre_gnu+hurd b/config_abslibre_gnu+hurd
index 93dc4fa..e0559e3 100644
--- a/config_abslibre_gnu+hurd
+++ b/config_abslibre_gnu+hurd
@@ -2,7 +2,9 @@
source "$(dirname "$(readlink -e "$0")")/config"
-# Parabola GNU/Hurd configuration with Arch GNU/Hurd derivation
+# Parabola Platform
+PLATFORM_NAME='GNU/Hurd'
+PLATFORM='gnu+hurd'
DERIVATION='true'
# Archictectures
@@ -36,26 +38,26 @@ PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPO
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL='abslibre_gnu+hurd'
+PKG_POOL="abslibre_${PLATFORM}"
# Directories where sources are stored
-SRC_POOL='abslibre_gnu+hurd'
+SRC_POOL="abslibre_${PLATFORM}"
# Build System and Repository scripts
-BS_MAIN_NAME='abslibre_gnu+hurd'
+BS_MAIN_NAME="abslibre_${PLATFORM}"
BS_MAIN_DIR="${SRV_DIR}/${BS_MAIN_NAME}"
-BS_DERIVATION_NAME='abs_gnu+hurd'
+BS_DERIVATION_NAME="abs_${PLATFORM}"
BS_DERIVATION_DIR="${SRV_DIR}/${BS_DERIVATION_NAME}"
BS_GIT="${GIT_BASE}/abslibre/${BS_MAIN_NAME}.git"
# BS_GIT='http://projects.parabola.gnu/abslibre/${BS_MAIN_NAME}.git'
BS_GIT_TMP="${TMP_DIR}/${BS_MAIN_NAME}"
-BLACKLIST_NAME='blacklist_gnu+hurd.txt'
+BLACKLIST_NAME="blacklist_${PLATFORM}.txt"
BLACKLIST_FILE="${HOME}/blacklist/${BLACKLIST_NAME}.txt"
BLACKLIST_TMP="${TMP_DIR}/${BLACKLIST_NAME}.txt"
SYNC_DERIVATION_SERVER='rsync.archhurd.org'
# Base Repository
-REPO_DIR="${SRV_DIR}/repo/abslibre_gnu+hurd"
+REPO_DIR="${SRV_DIR}/repo/abslibre_${PLATFORM}"
CLEANUP_DESTDIR="${REPO_DIR}/old/packages"
CLEANUP_DRYRUN='false'
diff --git a/config_abslibre_gnu+linux b/config_abslibre_gnu+linux
index 7a76a02..d6bb708 100644
--- a/config_abslibre_gnu+linux
+++ b/config_abslibre_gnu+linux
@@ -2,7 +2,9 @@
source "$(dirname "$(readlink -e "$0")")/config"
-# Parabola GNU/Linux-libre configuration with Arch GNU/Linux derivation
+# Parabola Platform
+PLATFORM_NAME='GNU/Linux-libre'
+PLATFORM='gnu+linux'
DERIVATION='true'
# Archictectures
@@ -36,26 +38,26 @@ PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPO
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL='abslibre_gnu+linux'
+PKG_POOL="abslibre_${PLATFORM}"
# Directories where sources are stored
-SRC_POOL='abslibre_gnu+linux'
+SRC_POOL="abslibre_${PLATFORM}"
# Build System and Repository scripts
-BS_MAIN_NAME='abslibre_gnu+linux'
+BS_MAIN_NAME="abslibre_${PLATFORM}"
BS_MAIN_DIR="${SRV_DIR}/${BS_MAIN_NAME}"
-BS_DERIVATION_NAME='abs_gnu+linux'
+BS_DERIVATION_NAME="abs_${PLATFORM}"
BS_DERIVATION_DIR="${SRV_DIR}/${BS_DERIVATION_NAME}"
BS_GIT="${GIT_BASE}/abslibre/${BS_MAIN_NAME}.git"
# BS_GIT='http://projects.parabola.gnu/abslibre/${BS_MAIN_NAME}.git'
BS_GIT_TMP="${TMP_DIR}/${BS_MAIN_NAME}"
-BLACKLIST_NAME='blacklist_gnu+linux.txt'
+BLACKLIST_NAME="blacklist_${PLATFORM}.txt"
BLACKLIST_FILE="${HOME}/blacklist/${BLACKLIST_NAME}.txt"
BLACKLIST_TMP="${TMP_DIR}/${BLACKLIST_NAME}.txt"
SYNC_DERIVATION_SERVER='rsync.archlinux.org'
# Base Repository
-REPO_DIR="${SRV_DIR}/repo/abslibre_gnu+linux"
+REPO_DIR="${SRV_DIR}/repo/abslibre_${PLATFORM}"
CLEANUP_DESTDIR="${REPO_DIR}/old/packages"
CLEANUP_DRYRUN='false'
diff --git a/config_abslibre_gnu+linux_arm b/config_abslibre_gnu+linux_arm
index ad113b4..c454868 100644
--- a/config_abslibre_gnu+linux_arm
+++ b/config_abslibre_gnu+linux_arm
@@ -2,7 +2,9 @@
source "$(dirname "$(readlink -e "$0")")/config"
-# Parabola GNU/Linux-libre configuration with Arch GNU/Linux ARM derivation
+# Parabola Platform
+PLATFORM_NAME='GNU/Linux-libre'
+PLATFORM='gnu+linux'
DERIVATION='true'
# Archictectures
@@ -36,26 +38,26 @@ PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${LIBRE_MAIN_REPO
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL='abslibre_gnu+linux_arm'
+PKG_POOL="abslibre_${PLATFORM}_arm"
# Directories where sources are stored
-SRC_POOL='abslibre_gnu+linux_arm'
+SRC_POOL="abslibre_${PLATFORM}_arm"
# Build System and Repository scripts
-BS_MAIN_NAME='abslibre_gnu+linux_arm'
+BS_MAIN_NAME="abslibre_${PLATFORM}_arm"
BS_MAIN_DIR="${SRV_DIR}/${BS_MAIN_NAME}"
-BS_DERIVATION_NAME='abs_gnu+linux_arm'
+BS_DERIVATION_NAME="abs_${PLATFORM}_arm"
BS_DERIVATION_DIR="${SRV_DIR}/${BS_DERIVATION_NAME}"
BS_GIT="${GIT_BASE}/abslibre/${BS_MAIN_NAME}.git"
# BS_GIT='http://projects.parabola.gnu/abslibre/${BS_MAIN_NAME}.git'
BS_GIT_TMP="${TMP_DIR}/${BS_MAIN_NAME}"
-BLACKLIST_NAME='blacklist_gnu+linux_arm.txt'
+BLACKLIST_NAME="blacklist_${PLATFORM}_arm.txt"
BLACKLIST_FILE="${HOME}/blacklist/${BLACKLIST_NAME}.txt"
BLACKLIST_TMP="${TMP_DIR}/${BLACKLIST_NAME}.txt"
SYNC_DERIVATION_SERVER='rsync.archlinuxarm.org'
# Base Repository
-REPO_DIR="${SRV_DIR}/repo/abslibre_gnu+linux_arm"
+REPO_DIR="${SRV_DIR}/repo/abslibre_${PLATFORM}_arm"
CLEANUP_DESTDIR="${REPO_DIR}/old/packages"
CLEANUP_DRYRUN='false'
diff --git a/config_gnu+hurd b/config_gnu+hurd
index 9408dee..d39b4ef 100644
--- a/config_gnu+hurd
+++ b/config_gnu+hurd
@@ -2,7 +2,9 @@
source "$(dirname "$(readlink -e "$0")")/config"
-# Parabola GNU/Hurd configuration without any distribution derivation
+# Parabola Platform
+PLATFORM_NAME='GNU/Hurd'
+PLATFORM='gnu+hurd'
DERIVATION='false'
# Archictectures
@@ -32,20 +34,20 @@ PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${MAIN_REPOS[@]}"
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL='gnu+hurd'
+PKG_POOL="${PLATFORM}"
# Directories where sources are stored
-SRC_POOL='gnu+hurd'
+SRC_POOL="${PLATFORM}"
# Build System and Repository scripts
-BS_MAIN_NAME='pbs_gnu+hurd'
+BS_MAIN_NAME="pbs_${PLATFORM}"
BS_MAIN_DIR="${SRV_DIR}/${BS_MAIN_NAME}"
BS_GIT="${GIT_BASE}/${BS_MAIN_NAME}/pmr.git"
# BS_GIT='http://projects.parabola.gnu/${BS_MAIN_NAME}/pmr.git'
BS_GIT_TMP="${TMP_DIR}/${BS_MAIN_NAME}"
# Base Repository
-REPO_DIR="${SRV_DIR}/repo/gnu+hurd"
+REPO_DIR="${SRV_DIR}/repo/${PLATFORM}"
CLEANUP_DESTDIR="${REPO_DIR}/old/packages"
CLEANUP_DRYRUN='false'
diff --git a/config_gnu+linux b/config_gnu+linux
index eee8b11..59e7365 100644
--- a/config_gnu+linux
+++ b/config_gnu+linux
@@ -2,7 +2,9 @@
source "$(dirname "$(readlink -e "$0")")/config"
-# Parabola GNU/Linux-libre configuration without any distribution derivation
+# Parabola Platform
+PLATFORM_NAME='GNU/Linux-libre'
+PLATFORM='gnu+linux'
DERIVATION='false'
# Archictectures
@@ -32,20 +34,20 @@ PKG_MULTILIB_REPOS=("${EXTRA_REPOS[@]}" "${PATFORM_REPOS[@]}" "${MAIN_REPOS[@]}"
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL='gnu+linux'
+PKG_POOL="${PLATFORM}"
# Directories where sources are stored
-SRC_POOL='gnu+linux'
+SRC_POOL="${PLATFORM}"
# Build System and Repository scripts
-BS_MAIN_NAME='pbs_gnu+linux'
+BS_MAIN_NAME="pbs_${PLATFORM}"
BS_MAIN_DIR="${SRV_DIR}/${BS_MAIN_NAME}"
BS_GIT="${GIT_BASE}/${BS_MAIN_NAME}/pmr.git"
# BS_GIT='http://projects.parabola.gnu/${BS_MAIN_NAME}/pmr.git'
BS_GIT_TMP="${TMP_DIR}/${BS_MAIN_NAME}"
# Base Repository
-REPO_DIR="${SRV_DIR}/repo/gnu+linux"
+REPO_DIR="${SRV_DIR}/repo/${PLATFORM}"
CLEANUP_DESTDIR="${REPO_DIR}/old/packages"
CLEANUP_DRYRUN='false'
diff --git a/platforms b/platforms
new file mode 100644
index 0000000..4c8762f
--- /dev/null
+++ b/platforms
@@ -0,0 +1,4 @@
+#!/hint/bash
+
+# Parabola Platforms
+PLATFORMS=('abslibre_gnu+linux' 'abslibre_gnu+linux_arm') # 'gnu+hurd' 'gnu+linux' 'abslibre_gnu+hurd'