Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Test staging state in CI
Date: Wed, 23 Dec 2020 20:09:48 +0100	[thread overview]
Message-ID: <20201223190948.A7lp2thDPV3w6zaunDIJGmThMyf00MzmVEkvx2YAXKM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27259@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages ci
https://github.com/void-linux/void-packages/pull/27259

Test staging state in CI
Can still be improved, should probably add subpkg handling.

A patch file from https://github.com/void-linux/void-packages/pull/27259.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci-27259.patch --]
[-- Type: text/x-diff, Size: 3090 bytes --]

From 764548d00cbaaec3e8904de714ef30318a4c330a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 16:22:32 -0300
Subject: [PATCH 1/2] xbps-src: source cross profiles in show-var when using -a
 switch.

This allows the user to query for variables such as XBPS_CROSS_TRIPLET,
which are only available in a cross-build context.
---
 xbps-src | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xbps-src b/xbps-src
index 54016874010..83729a9c2c0 100755
--- a/xbps-src
+++ b/xbps-src
@@ -902,7 +902,11 @@ case "$XBPS_TARGET" in
         for f in ${XBPS_COMMONDIR}/environment/setup/*.sh; do
             source $f
         done
-        source ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh
+        if [ "$XBPS_CROSS_BUILD" ]; then
+            source ${XBPS_COMMONDIR}/cross-profiles/${XBPS_CROSS_BUILD}.sh
+        else
+            source ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh
+        fi
         eval value="\${$XBPS_TARGET_PKG}"
         echo $value
         ;;

From 449315aa733d3f97d451830a3333576441281e50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 14:53:10 -0300
Subject: [PATCH 2/2] .github/workflows: add script to check that packages can
 still be installed.

This will allow us to confirm the repository's staging state in CI.
---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 28 ++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100755 common/travis/check-install.sh

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index be2fd7969db..72f2b3811a3 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -87,3 +87,11 @@ jobs:
           cd /
           "$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH"
           )
+
+      - name: Verify repository state
+        run: |
+          (
+          here="$(pwd)"
+          cd /
+          "$here/common/travis/check-install.sh" "$BOOTSTRAP" "$ARCH"
+          )
diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
new file mode 100755
index 00000000000..d9725670002
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# check-install.sh
+
+export XBPS_TARGET_ARCH="$2" XBPS_DISTDIR=/hostrepo
+
+if [ "$1" != "$XBPS_TARGET_ARCH" ]; then
+	triplet="$(/hostrepo/xbps-src -a "$XBPS_TARGET_ARCH" show-var XBPS_CROSS_TRIPLET)"
+	ROOTDIR="-r /usr/$triplet"
+fi
+
+ADDREPO="--repository=$HOME/hostdir/binpkgs --repository=$HOME/hostdir/binpkgs/nonfree"
+
+while read -r pkg; do
+	for subpkg in $(xsubpkg $pkg); do
+		/bin/echo -e "\x1b[32mTrying to install dependants of $subpkg:\x1b[0m"
+		for dep in $(xbps-query $ADDREPO -RX "$subpkg"); do
+			xbps-install \
+				$ROOTDIR $ADDREPO \
+				-Sny \
+				"$subpkg" "$(xbps-uhelper getpkgname "$dep")"
+			if [ $? -eq 8 ]; then
+				/bin/echo -e "\x1b[31mFailed to install '$subpkg' and '$dep'\x1b[0m"
+				exit 1
+			fi
+		done
+	done
+done < /tmp/templates

  parent reply	other threads:[~2020-12-23 19:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 17:54 [PR PATCH] " ericonr
2020-12-18 18:02 ` [PR PATCH] [Updated] " ericonr
2020-12-18 18:15 ` ericonr
2020-12-18 18:22 ` ericonr
2020-12-18 18:30 ` ericonr
2020-12-18 18:45 ` ericonr
2020-12-18 19:24 ` ericonr
2020-12-18 19:31 ` ericonr
2020-12-18 19:39 ` ericonr
2020-12-18 19:55 ` ericonr
2020-12-20  0:58 ` [PR PATCH] [Updated] " ericonr
2020-12-23 14:50 ` ericonr
2020-12-23 15:01 ` ericonr
2020-12-23 18:18 ` ericonr
2020-12-23 18:30 ` ericonr
2020-12-23 18:46 ` ericonr
2020-12-23 19:09 ` ericonr [this message]
2020-12-23 19:14 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201223190948.A7lp2thDPV3w6zaunDIJGmThMyf00MzmVEkvx2YAXKM@z \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).