Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] add xpkgdiff to CI
@ 2022-04-18 19:01 classabbyamp
  2022-04-18 19:04 ` [PR PATCH] [Updated] " classabbyamp
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: classabbyamp @ 2022-04-18 19:01 UTC (permalink / raw)
  To: ml

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

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages common/add-xpkgdiff-ci
https://github.com/void-linux/void-packages/pull/36759

add xpkgdiff to CI
- common/travis/xpkgdiff.sh: add script to compare pkgs to previous version
- .github/workflows/build.yaml: add xpkgdiff CI step

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From 4e258a987edeb43d43ba6f4d3e9c4b783f2ce6f5 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Mon, 18 Apr 2022 14:57:36 -0400
Subject: [PATCH 1/3] common/travis/xpkgdiff.sh: add script to compare pkgs to
 previous version

---
 common/travis/xpkgdiff.sh | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100755 common/travis/xpkgdiff.sh

diff --git a/common/travis/xpkgdiff.sh b/common/travis/xpkgdiff.sh
new file mode 100755
index 000000000000..e45c4b3dea92
--- /dev/null
+++ b/common/travis/xpkgdiff.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# xpkgdiff.sh
+
+export XBPS_TARGET_ARCH="$2" XBPS_DISTDIR=/hostrepo
+
+while read -r pkg; do
+	for subpkg in $(xsubpkg $pkg); do
+		if [ xbps-query --repository=$HOME/hostdir/binpkgs \
+						--repository=$HOME/hostdir/binpkgs/nonfree \
+						-i "$subpkg" >&/dev/null ]; then
+			/bin/echo -e "\x1b[32mFile Diff of $subpkg:\x1b[0m"
+			xpkgdiff -f $subpkg
+			/bin/echo -e "\x1b[32mMetadata Diff of $subpkg:\x1b[0m"
+			xpkgdiff -S $subpkg
+			/bin/echo -e "\x1b[32m Diff of $subpkg:\x1b[0m"
+			xpkgdiff -xt $subpkg
+		else
+			/bin/echo -e "\x1b[33m	$subpkg wasn't found\x1b[0m"
+		fi
+	done
+done < /tmp/templates

From 6b94f0ed99a436227a7d3eb32fc3ea1a7d1ec2a1 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Mon, 18 Apr 2022 14:59:55 -0400
Subject: [PATCH 2/3] .github/workflows/build.yaml: add xpkgdiff CI step

---
 .github/workflows/build.yaml | 8 ++++++++
 common/travis/xpkgdiff.sh    | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 2ae7a3e728fa..28881fc543ed 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -94,6 +94,14 @@ jobs:
           "$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH"
           )
 
+      - name: Compare to previous version
+        run: |
+          (
+          here="$(pwd)"
+          cd /
+          "$here/common/travis/xpkgdiff.sh" "$BOOTSTRAP" "$ARCH"
+          )
+
       - name: Verify repository state
         run: |
           (
diff --git a/common/travis/xpkgdiff.sh b/common/travis/xpkgdiff.sh
index e45c4b3dea92..660e6ed6490f 100755
--- a/common/travis/xpkgdiff.sh
+++ b/common/travis/xpkgdiff.sh
@@ -13,7 +13,7 @@ while read -r pkg; do
 			xpkgdiff -f $subpkg
 			/bin/echo -e "\x1b[32mMetadata Diff of $subpkg:\x1b[0m"
 			xpkgdiff -S $subpkg
-			/bin/echo -e "\x1b[32m Diff of $subpkg:\x1b[0m"
+			/bin/echo -e "\x1b[32mDependency Diff of $subpkg:\x1b[0m"
 			xpkgdiff -xt $subpkg
 		else
 			/bin/echo -e "\x1b[33m	$subpkg wasn't found\x1b[0m"

From e99eb67106a93340a73e29a98bf7997ec7b40a6d Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Mon, 18 Apr 2022 15:01:02 -0400
Subject: [PATCH 3/3] chezmoi: test

---
 srcpkgs/chezmoi/template | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index bacfc8c9b294..1aa7f6d03cc3 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,12 +1,11 @@
 # Template file for 'chezmoi'
 pkgname=chezmoi
 version=2.15.1
-revision=1
+revision=2
 build_style=go
 go_import_path="github.com/twpayne/chezmoi/v2"
 go_build_tags="noembeddocs noupgrade"
-go_ldflags="-X main.version=${version} -X main.commit=v${version}
- -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X main.builtBy=xbps"
+go_ldflags="-X main.version=${version} -X main.commit=v${version} -X main.builtBy=xbps"
 short_desc="Manage your dotfiles across multiple machines, securely"
 maintainer="classabbyamp <void@placeviolette.net>"
 license="MIT"
@@ -14,7 +13,13 @@ homepage="https://chezmoi.io/"
 distfiles="https://github.com/twpayne/chezmoi/archive/v${version}.tar.gz"
 checksum=0100dcf8b70774595f56859e5d1b635319ba584ad7b280946352be328f36d679
 
-export CGO_ENABLED=1
+pre_build() {
+	local _date
+	if [ "$SOURCE_DATE_EPOCH" ]; then
+		_date="$(date --utc --date "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d")"
+		go_ldflags="$go_ldflags -X main.date=${_date}"
+	fi
+}
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2022-05-07 20:42 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 19:01 [PR PATCH] add xpkgdiff to CI classabbyamp
2022-04-18 19:04 ` [PR PATCH] [Updated] " classabbyamp
2022-04-18 19:07 ` classabbyamp
2022-04-18 19:14 ` classabbyamp
2022-04-18 19:19 ` classabbyamp
2022-04-18 19:26 ` classabbyamp
2022-04-18 19:33 ` classabbyamp
2022-04-18 19:53 ` classabbyamp
2022-04-18 19:56 ` classabbyamp
2022-04-18 20:14 ` classabbyamp
2022-04-18 20:14 ` classabbyamp
2022-04-18 22:50 ` classabbyamp
2022-04-18 22:54 ` classabbyamp
2022-04-18 23:04 ` classabbyamp
2022-04-18 23:05 ` classabbyamp
2022-04-19  1:10 ` classabbyamp
2022-04-19  1:11 ` classabbyamp
2022-04-19  1:18 ` classabbyamp
2022-04-25 14:47 ` [PR PATCH] [Updated] " classabbyamp
2022-04-26 18:25 ` classabbyamp
2022-04-26 18:32 ` classabbyamp
2022-04-26 18:35 ` classabbyamp
2022-04-26 18:40 ` classabbyamp
2022-05-05 19:42 ` classabbyamp
2022-05-05 20:42 ` classabbyamp
2022-05-06 15:01 ` [PR PATCH] [Updated] " classabbyamp
2022-05-06 19:42 ` Chocimier
2022-05-06 19:46 ` classabbyamp
2022-05-06 19:56 ` classabbyamp
2022-05-07 20:42 ` [PR PATCH] [Merged]: " paper42

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).