From: Goorzhel <Goorzhel@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Two minor fixes to Travis
Date: Tue, 23 Aug 2022 05:13:43 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38841@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 6439 bytes --]
There is a new pull request by Goorzhel against master on the void-packages repository
https://github.com/Goorzhel/void-packages travis_fixes
https://github.com/void-linux/void-packages/pull/38841
Two minor fixes to Travis
<details>
<summary>Before</summary>
```
❯ git log --oneline
6076c6dfb4 New package: radm-0.6.1
9ff585986c liburing: update to 2.2.
83e4219d31 oxipng: update to 5.0.1.
9f175ebf3b so: update to 0.4.8
bd40077123 nemo-image-converter: update to 5.4.1.
❯ cat srcpkgs/radm/template
# Template file for 'radm'
pkgname=radm
version=0.6.1
revision=1
build_style=cargo
makedepends="clang make pam-devel pandoc"
depends="seatd pam"
short_desc="Console-based display manager for Wayland sessions"
maintainer="Antonio Gurgel <antonio@goorzhel.com>"
license="MIT"
homepage="https://sr.ht/~goorzhel/radm/"
distfiles="https://git.sr.ht/~goorzhel/radm/archive/${version}.tar.gz"
checksum=81b87b76f1a59e2675bd4373f03d682b5c7f2b53adc926164f384bae8676c98a
post_install() {
make res/radm.1
vinstall res/pam 644 etc/pam.d radm
vinstall res/rsyslog 644 etc/rsyslog.d radm
vlicense LICENSE
vman res/radm.1
vsv radm
}
❯ sed -i 's/\/hostrepo/./' common/travis/build.sh
❯ sh -x common/travis/build.sh x86_64 aarch64-musl
+ [ x86_64 != aarch64-musl ]
+ arch=-a aarch64-musl
+ [ = 1 ]
+ cat /tmp/templates
+ ./xbps-src sort-dependencies radm
+ PKGS=radm
+ nproc
+ ./xbps-src -j12 -s -H /home/ag/hostdir -a aarch64-musl pkg radm
=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://repo-default.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/debug/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-us.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://repo-us.voidlinux.org/current/nonfree/x86_64-repodata' ...
=> xbps-src: updating repositories for target (aarch64-musl)...
[*] Updating repository `https://repo-default.voidlinux.org/current/aarch64/aarch64-musl-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/aarch64/nonfree/aarch64-musl-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/aarch64/debug/aarch64-musl-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> radm-0.6.1_1: removing autodeps, please wait...
=> radm-0.6.1_1: removing autocrossdeps, please wait...
=> radm-0.6.1_1: building [cargo] [rust] for aarch64-musl...
[host] cargo-1.61.0_1: found (https://repo-default.voidlinux.org/current)
[target] clang-12.0.1_2: found (https://repo-default.voidlinux.org/current/aarch64)
[target] make-4.3_3: found (https://repo-default.voidlinux.org/current/aarch64)
[target] pam-devel-1.5.2_2: found (https://repo-default.voidlinux.org/current/aarch64)
[target] pandoc-2.17.1.1_1: not found
[target] rust-std-1.61.0_1: found (https://repo-default.voidlinux.org/current/aarch64)
[runtime] seatd-0.7.0_1: found (https://repo-default.voidlinux.org/current/aarch64)
[runtime] pam-1.5.2_2: found (https://repo-default.voidlinux.org/current/aarch64)
=> ERROR: pandoc-2.17.1.1_1: cannot be cross compiled...
=> ERROR: pandoc-2.17.1.1_1: yes
+ [ 2 -eq 1 ]
+ exit 0
```
</details>
<details>
<summary>After</summary>
```
❯ git log --oneline | head -3
6de27dac94 common/travis/build.sh: Handle all retcodes
6076c6dfb4 New package: radm-0.6.1
9ff585986c liburing: update to 2.2.
❯ sh -x common/travis/build.sh x86_64 aarch64-musl
+ [ x86_64 != aarch64-musl ]
+ arch=-a aarch64-musl
+ [ = 1 ]
+ cat /tmp/templates
+ ./xbps-src sort-dependencies radm
+ PKGS=radm
+ nproc
+ ./xbps-src -j12 -s -H /home/ag/hostdir -a aarch64-musl pkg radm
=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://repo-default.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/debug/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-us.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://repo-us.voidlinux.org/current/nonfree/x86_64-repodata' ...
=> xbps-src: updating repositories for target (aarch64-musl)...
[*] Updating repository `https://repo-default.voidlinux.org/current/aarch64/aarch64-musl-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/aarch64/nonfree/aarch64-musl-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/aarch64/debug/aarch64-musl-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> radm-0.6.1_1: removing autodeps, please wait...
=> radm-0.6.1_1: removing autocrossdeps, please wait...
=> radm-0.6.1_1: building [cargo] [rust] for aarch64-musl...
[host] cargo-1.61.0_1: found (https://repo-default.voidlinux.org/current)
[target] clang-12.0.1_2: found (https://repo-default.voidlinux.org/current/aarch64)
[target] make-4.3_3: found (https://repo-default.voidlinux.org/current/aarch64)
[target] pam-devel-1.5.2_2: found (https://repo-default.voidlinux.org/current/aarch64)
[target] pandoc-2.17.1.1_1: not found
[target] rust-std-1.61.0_1: found (https://repo-default.voidlinux.org/current/aarch64)
[runtime] seatd-0.7.0_1: found (https://repo-default.voidlinux.org/current/aarch64)
[runtime] pam-1.5.2_2: found (https://repo-default.voidlinux.org/current/aarch64)
=> ERROR: pandoc-2.17.1.1_1: cannot be cross compiled...
=> ERROR: pandoc-2.17.1.1_1: yes
+ ret=2
+ [ 2 -ne 0 ]
+ exit 2
```
</details>
@Gottox @sgn
A patch file from https://github.com/void-linux/void-packages/pull/38841.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-travis_fixes-38841.patch --]
[-- Type: text/x-diff, Size: 1974 bytes --]
From d78a30fdb069418ed3a9accf5682cda7961d80ed Mon Sep 17 00:00:00 2001
From: Antonio Gurgel <antonio@goorzhel.com>
Date: Mon, 22 Aug 2022 19:46:23 -0700
Subject: [PATCH 1/2] common/travis/build.sh: Handle all retcodes
There are some cases in which `xbps-src` will exit 2:
$ ag -c 'exit 2' xbps-src common
xbps-src:1
common/xbps-src/shutils/common.sh:2
$ # 1. Sending INT/TERM to xbps-src,
$ # 2. attempting to cross-build a `nocross` pkg, and
$ # 3. attempting to build a `broken` pkg.
build.sh eats that retcode if it's looking only for `exit 1`,
incorrectly signaling a successful build.
---
common/travis/build.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 007a61f994d7..cb48764cc6ee 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -14,7 +14,8 @@ PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
for pkg in ${PKGS}; do
/hostrepo/xbps-src -j$(nproc) -s -H "$HOME"/hostdir $arch $test pkg "$pkg"
- [ $? -eq 1 ] && exit 1
+ ret=$?
+ [ $ret -ne 0 ] && exit $ret
done
exit 0
From 61b2b8ed83aa3ea1e94fc0911f1aad9562f1c9bd Mon Sep 17 00:00:00 2001
From: Antonio Gurgel <antonio@goorzhel.com>
Date: Mon, 22 Aug 2022 19:55:59 -0700
Subject: [PATCH 2/2] common/travis/changed_templates.sh: reword pls-rebase msg
---
common/travis/changed_templates.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 686436ce4327..b4d882ce039c 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -15,8 +15,8 @@ case "$tip" in
esac
base="$($GIT_CMD merge-base FETCH_HEAD "$tip")" || {
- echo "Your branches is based on too old copy."
- echo "Please rebase to newest copy."
+ echo "Your branch is too far behind the upstream master branch."
+ echo "To retry, rebase your branch and force-push."
exit 1
}
next reply other threads:[~2022-08-23 3:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 3:13 Goorzhel [this message]
2022-08-23 3:15 ` sgn
2022-08-23 3:15 ` [PR PATCH] [Closed]: " sgn
2022-08-23 3:18 ` Goorzhel
2022-08-23 3:27 ` q66
2022-08-23 7:12 ` Goorzhel
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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38841@inbox.vuxu.org \
--to=goorzhel@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).