* [PR PATCH] xbps-src: per-architecture handling of repo confs
@ 2020-01-30 14:24 voidlinux-github
2020-01-30 14:28 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-30 14:49 ` [PR PATCH] [Merged]: " voidlinux-github
0 siblings, 2 replies; 3+ messages in thread
From: voidlinux-github @ 2020-01-30 14:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 772 bytes --]
There is a new pull request by q66 against master on the void-packages repository
https://github.com/void-ppc/void-packages repoconf-rework
https://github.com/void-linux/void-packages/pull/18661
xbps-src: per-architecture handling of repo confs
The new behavior is basically this:
1) Local repos are installed same as before.
2) Multilib configs are now handled only if they exist. They follow a naming system `repos-{local,remote}-ARCH-multilib.conf`.
3) Remote repo files follow naming `repos-remote-ARCH.conf`. If that does not exist, `repos-remote.conf` or `repos-remote-musl.conf` is used instead (fallback).
4) Cross follows the same behavior, just without multilib.
A patch file from https://github.com/void-linux/void-packages/pull/18661.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-repoconf-rework-18661.patch --]
[-- Type: text/x-diff, Size: 6705 bytes --]
From 574309debd120d0368084c234241280965947cac Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Thu, 30 Jan 2020 15:14:30 +0100
Subject: [PATCH] xbps-src: per-architecture handling of repo confs
The new behavior is basically this:
1) Local repos are installed same as before.
2) Multilib configs are now handled only if they exist. They follow
a naming system repos-{local,remote}-ARCH-multilib.conf.
3) Remote repo files follow naming repos-remote-ARCH.conf. If that
does not exist, repos-remote.conf or repos-remote-musl.conf is
used instead (fallback).
4) Cross follows the same behavior, just without multilib.
[ci skip]
---
common/xbps-src/shutils/chroot.sh | 81 ++++++++-----------
....conf => repos-local-x86_64-multilib.conf} | 0
etc/xbps.d/repos-remote-aarch64-musl.conf | 4 +
...conf => repos-remote-x86_64-multilib.conf} | 0
4 files changed, 38 insertions(+), 47 deletions(-)
rename etc/xbps.d/{repos-local-x86_64.conf => repos-local-x86_64-multilib.conf} (100%)
create mode 100644 etc/xbps.d/repos-remote-aarch64-musl.conf
rename etc/xbps.d/{repos-remote-x86_64.conf => repos-remote-x86_64-multilib.conf} (100%)
diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index 228dd2e0399..e56d096412a 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -230,40 +230,33 @@ chroot_sync_repodata() {
sed -e "s,/host,$hostdir,g" ${XBPS_DISTDIR}/etc/xbps.d/repos-local.conf \
> $confdir/10-repository-local.conf
+ # Install multilib conf for local repos if it exists for the architecture
+ if [ -f "${XBPS_DISTDIR}/etc/xbps.d/repos-local-${XBPS_MACHINE}-multilib.conf" ]; then
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-${XBPS_MACHINE}-multilib.conf \
+ $confdir/12-repository-local-multilib.conf
+ fi
+
if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
rm -f $confdir/*remote*
- case "$XBPS_MACHINE" in
- x86_64)
- # x86_64/glibc
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-x86_64.conf \
- $confdir/12-repository-local-x86_64.conf
- ;;
- esac
else
- case "$XBPS_MACHINE" in
- *-musl)
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-musl.conf \
- $confdir/20-repository-remote.conf
- ;;
- *)
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote.conf \
- $confdir/20-repository-remote.conf
- ;;
- esac
- case "$XBPS_MACHINE" in
- x86_64)
- # x86_64/glibc
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-x86_64.conf \
- $confdir/12-repository-local-x86_64.conf
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-x86_64.conf \
- $confdir/22-repository-remote-x86_64.conf
- ;;
- aarch64*)
- # aarch64 glibc/musl
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-aarch64.conf \
- $confdir/22-repository-remote-aarch64.conf
- ;;
- esac
+ if [ -f "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}.conf" ]; then
+ # If per-architecture base remote repo config exists, use that
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}.conf \
+ $confdir/20-repository-remote.conf
+ else
+ # Otherwise use generic base for musl or glibc
+ local suffix=
+ case "$XBPS_MACHINE" in
+ *-musl) suffix="-musl";;
+ esac
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote${suffix}.conf \
+ $confdir/20-repository-remote.conf
+ fi
+ # Install multilib conf for remote repos if it exists for the architecture
+ if [ -f "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}-multilib.conf" ]; then
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}-multilib.conf \
+ $confdir/22-repository-remote-multilib.conf
+ fi
fi
# Copy host repos to the cross root.
@@ -276,24 +269,18 @@ chroot_sync_repodata() {
if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
rm -f $crossconfdir/*remote*
else
- # and then remote repos for target machine
- case "$XBPS_TARGET_MACHINE" in
- aarch64*)
- # aarch64 glibc/musl
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-aarch64.conf \
- $crossconfdir/22-repository-remote-aarch64.conf
- ;;
- *-musl)
- # !aarch64 && musl
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-musl.conf \
+ # Same general logic as above, just into cross root, and no multilib
+ if [ -f "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_TARGET_MACHINE}.conf" ]; then
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_TARGET_MACHINE}.conf \
$crossconfdir/20-repository-remote.conf
- ;;
- *)
- # !aarch64 && glibc
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote.conf \
+ else
+ local suffix=
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl) suffix="-musl"
+ esac
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote${suffix}.conf \
$crossconfdir/20-repository-remote.conf
- ;;
- esac
+ fi
fi
fi
diff --git a/etc/xbps.d/repos-local-x86_64.conf b/etc/xbps.d/repos-local-x86_64-multilib.conf
similarity index 100%
rename from etc/xbps.d/repos-local-x86_64.conf
rename to etc/xbps.d/repos-local-x86_64-multilib.conf
diff --git a/etc/xbps.d/repos-remote-aarch64-musl.conf b/etc/xbps.d/repos-remote-aarch64-musl.conf
new file mode 100644
index 00000000000..4c81aaa9aa8
--- /dev/null
+++ b/etc/xbps.d/repos-remote-aarch64-musl.conf
@@ -0,0 +1,4 @@
+# aarch64 voidlinux remote repositories
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64/nonfree
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64/debug
diff --git a/etc/xbps.d/repos-remote-x86_64.conf b/etc/xbps.d/repos-remote-x86_64-multilib.conf
similarity index 100%
rename from etc/xbps.d/repos-remote-x86_64.conf
rename to etc/xbps.d/repos-remote-x86_64-multilib.conf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src: per-architecture handling of repo confs
2020-01-30 14:24 [PR PATCH] xbps-src: per-architecture handling of repo confs voidlinux-github
@ 2020-01-30 14:28 ` voidlinux-github
2020-01-30 14:49 ` [PR PATCH] [Merged]: " voidlinux-github
1 sibling, 0 replies; 3+ messages in thread
From: voidlinux-github @ 2020-01-30 14:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
There is an updated pull request by q66 against master on the void-packages repository
https://github.com/void-ppc/void-packages repoconf-rework
https://github.com/void-linux/void-packages/pull/18661
xbps-src: per-architecture handling of repo confs
The new behavior is basically this:
1) Local repos are installed same as before.
2) Multilib configs are now handled only if they exist. They follow a naming system `repos-{local,remote}-ARCH-multilib.conf`.
3) Remote repo files follow naming `repos-remote-ARCH.conf`. If that does not exist, `repos-remote.conf` or `repos-remote-musl.conf` is used instead (fallback).
4) Cross follows the same behavior, just without multilib.
A patch file from https://github.com/void-linux/void-packages/pull/18661.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-repoconf-rework-18661.patch --]
[-- Type: text/x-diff, Size: 6705 bytes --]
From ff7d969ae244a806a748d8e6a752e36a2f948a64 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Thu, 30 Jan 2020 15:14:30 +0100
Subject: [PATCH] xbps-src: per-architecture handling of repo confs
The new behavior is basically this:
1) Local repos are installed same as before.
2) Multilib configs are now handled only if they exist. They follow
a naming system repos-{local,remote}-ARCH-multilib.conf.
3) Remote repo files follow naming repos-remote-ARCH.conf. If that
does not exist, repos-remote.conf or repos-remote-musl.conf is
used instead (fallback).
4) Cross follows the same behavior, just without multilib.
[ci skip]
---
common/xbps-src/shutils/chroot.sh | 81 ++++++++-----------
....conf => repos-local-x86_64-multilib.conf} | 0
etc/xbps.d/repos-remote-aarch64-musl.conf | 4 +
...conf => repos-remote-x86_64-multilib.conf} | 0
4 files changed, 38 insertions(+), 47 deletions(-)
rename etc/xbps.d/{repos-local-x86_64.conf => repos-local-x86_64-multilib.conf} (100%)
create mode 100644 etc/xbps.d/repos-remote-aarch64-musl.conf
rename etc/xbps.d/{repos-remote-x86_64.conf => repos-remote-x86_64-multilib.conf} (100%)
diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index 228dd2e0399..be082e2df94 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -230,40 +230,33 @@ chroot_sync_repodata() {
sed -e "s,/host,$hostdir,g" ${XBPS_DISTDIR}/etc/xbps.d/repos-local.conf \
> $confdir/10-repository-local.conf
+ # Install multilib conf for local repos if it exists for the architecture
+ if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-local-${XBPS_MACHINE}-multilib.conf" ]; then
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-${XBPS_MACHINE}-multilib.conf \
+ $confdir/12-repository-local-multilib.conf
+ fi
+
if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
rm -f $confdir/*remote*
- case "$XBPS_MACHINE" in
- x86_64)
- # x86_64/glibc
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-x86_64.conf \
- $confdir/12-repository-local-x86_64.conf
- ;;
- esac
else
- case "$XBPS_MACHINE" in
- *-musl)
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-musl.conf \
- $confdir/20-repository-remote.conf
- ;;
- *)
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote.conf \
- $confdir/20-repository-remote.conf
- ;;
- esac
- case "$XBPS_MACHINE" in
- x86_64)
- # x86_64/glibc
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-x86_64.conf \
- $confdir/12-repository-local-x86_64.conf
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-x86_64.conf \
- $confdir/22-repository-remote-x86_64.conf
- ;;
- aarch64*)
- # aarch64 glibc/musl
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-aarch64.conf \
- $confdir/22-repository-remote-aarch64.conf
- ;;
- esac
+ if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}.conf" ]; then
+ # If per-architecture base remote repo config exists, use that
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}.conf \
+ $confdir/20-repository-remote.conf
+ else
+ # Otherwise use generic base for musl or glibc
+ local suffix=
+ case "$XBPS_MACHINE" in
+ *-musl) suffix="-musl";;
+ esac
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote${suffix}.conf \
+ $confdir/20-repository-remote.conf
+ fi
+ # Install multilib conf for remote repos if it exists for the architecture
+ if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}-multilib.conf" ]; then
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}-multilib.conf \
+ $confdir/22-repository-remote-multilib.conf
+ fi
fi
# Copy host repos to the cross root.
@@ -276,24 +269,18 @@ chroot_sync_repodata() {
if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
rm -f $crossconfdir/*remote*
else
- # and then remote repos for target machine
- case "$XBPS_TARGET_MACHINE" in
- aarch64*)
- # aarch64 glibc/musl
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-aarch64.conf \
- $crossconfdir/22-repository-remote-aarch64.conf
- ;;
- *-musl)
- # !aarch64 && musl
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-musl.conf \
+ # Same general logic as above, just into cross root, and no multilib
+ if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_TARGET_MACHINE}.conf" ]; then
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_TARGET_MACHINE}.conf \
$crossconfdir/20-repository-remote.conf
- ;;
- *)
- # !aarch64 && glibc
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote.conf \
+ else
+ local suffix=
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl) suffix="-musl"
+ esac
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote${suffix}.conf \
$crossconfdir/20-repository-remote.conf
- ;;
- esac
+ fi
fi
fi
diff --git a/etc/xbps.d/repos-local-x86_64.conf b/etc/xbps.d/repos-local-x86_64-multilib.conf
similarity index 100%
rename from etc/xbps.d/repos-local-x86_64.conf
rename to etc/xbps.d/repos-local-x86_64-multilib.conf
diff --git a/etc/xbps.d/repos-remote-aarch64-musl.conf b/etc/xbps.d/repos-remote-aarch64-musl.conf
new file mode 100644
index 00000000000..4c81aaa9aa8
--- /dev/null
+++ b/etc/xbps.d/repos-remote-aarch64-musl.conf
@@ -0,0 +1,4 @@
+# aarch64 voidlinux remote repositories
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64/nonfree
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64/debug
diff --git a/etc/xbps.d/repos-remote-x86_64.conf b/etc/xbps.d/repos-remote-x86_64-multilib.conf
similarity index 100%
rename from etc/xbps.d/repos-remote-x86_64.conf
rename to etc/xbps.d/repos-remote-x86_64-multilib.conf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PR PATCH] [Merged]: xbps-src: per-architecture handling of repo confs
2020-01-30 14:24 [PR PATCH] xbps-src: per-architecture handling of repo confs voidlinux-github
2020-01-30 14:28 ` [PR PATCH] [Updated] " voidlinux-github
@ 2020-01-30 14:49 ` voidlinux-github
1 sibling, 0 replies; 3+ messages in thread
From: voidlinux-github @ 2020-01-30 14:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
There's a merged pull request on the void-packages repository
xbps-src: per-architecture handling of repo confs
https://github.com/void-linux/void-packages/pull/18661
Description:
The new behavior is basically this:
1) Local repos are installed same as before.
2) Multilib configs are now handled only if they exist. They follow a naming system `repos-{local,remote}-ARCH-multilib.conf`.
3) Remote repo files follow naming `repos-remote-ARCH.conf`. If that does not exist, `repos-remote.conf` or `repos-remote-musl.conf` is used instead (fallback).
4) Cross follows the same behavior, just without multilib.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-30 14:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 14:24 [PR PATCH] xbps-src: per-architecture handling of repo confs voidlinux-github
2020-01-30 14:28 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-30 14:49 ` [PR PATCH] [Merged]: " voidlinux-github
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).