Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Test staging state in CI
@ 2020-12-18 17:54 ericonr
  2020-12-18 18:02 ` [PR PATCH] [Updated] " ericonr
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 17:54 UTC (permalink / raw)
  To: ml

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

There is a new 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


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: 7223 bytes --]

From 45d8aeb53cf2a3c086a5dfe89da71c7f623d3b2f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/2] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 88ea81c5c98..1c12843e8c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1736,8 +1736,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From a41adb054ff2419e5b3e61a10292c2cb5f97ff53 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 staging state in
 repo.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100755 common/travis/check-install.sh

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index be2fd7969db..f44a4dfd4e1 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/show_files.sh" "$TEST"
+          )
diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
new file mode 100755
index 00000000000..7733e2d1a55
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# check-install.sh
+
+if [ -z "$1" ]; then
+	exit
+fi
+
+PKGS=$(cat /tmp/templates)
+
+for pkg in ${PKGS}; do
+	for dep in xbps-query -RX "$pkg"; do
+		xi -ny $pkg $dep
+		[ $? -eq 1 ] && exit 1
+	done
+done
+
+exit 0

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
@ 2020-12-18 18:02 ` ericonr
  2020-12-18 18:15 ` ericonr
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 18:02 UTC (permalink / raw)
  To: ml

[-- 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: 7999 bytes --]

From 45d8aeb53cf2a3c086a5dfe89da71c7f623d3b2f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/3] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 88ea81c5c98..1c12843e8c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1736,8 +1736,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From 89cbd731cea7311e02bc0644483c9c339f659e7a 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/3] .github/workflows: add script to check staging state in
 repo.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100755 common/travis/check-install.sh

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index be2fd7969db..fff011506fb 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" "$TEST"
+          )
diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
new file mode 100755
index 00000000000..7733e2d1a55
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# check-install.sh
+
+if [ -z "$1" ]; then
+	exit
+fi
+
+PKGS=$(cat /tmp/templates)
+
+for pkg in ${PKGS}; do
+	for dep in xbps-query -RX "$pkg"; do
+		xi -ny $pkg $dep
+		[ $? -eq 1 ] && exit 1
+	done
+done
+
+exit 0

From 320fba1d99b584fab46fb514d99dd365ff9e2d71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 3/3] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
  2020-12-18 18:02 ` [PR PATCH] [Updated] " ericonr
@ 2020-12-18 18:15 ` ericonr
  2020-12-18 18:22 ` ericonr
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 18:15 UTC (permalink / raw)
  To: ml

[-- 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: 8084 bytes --]

From 45d8aeb53cf2a3c086a5dfe89da71c7f623d3b2f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/3] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 88ea81c5c98..1c12843e8c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1736,8 +1736,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From 36dc04f45a1f822b43a092efb1f45e54d50cb131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/3] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From e493175ce07221d4847fa97e98c9ce9b30fc3ff7 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 3/3] .github/workflows: add script to check staging state in
 repo.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 22 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100755 common/travis/check-install.sh

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index be2fd7969db..fff011506fb 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" "$TEST"
+          )
diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
new file mode 100755
index 00000000000..5aabcb1a79d
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# check-install.sh
+
+if [ -z "$1" ]; then
+	exit
+fi
+
+PKGS=$(cat /tmp/templates)
+
+for pkg in ${PKGS}; do
+	for dep in xbps-query -RX "$pkg"; do
+		xbps-install \
+			-R hostdir/binpkgs \
+			-R hostdir/binpkgs/nonfree \
+			-Sny \
+			$pkg $dep
+		[ $? -eq 1 ] && exit 1
+	done
+done
+
+exit 0

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI 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
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 18:22 UTC (permalink / raw)
  To: ml

[-- 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: 8087 bytes --]

From 45d8aeb53cf2a3c086a5dfe89da71c7f623d3b2f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/3] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 88ea81c5c98..1c12843e8c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1736,8 +1736,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From 36dc04f45a1f822b43a092efb1f45e54d50cb131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/3] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From 7ca1cb31106f140ba0db77bd2124f028493b3908 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 3/3] .github/workflows: add script to check staging state in
 repo.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 22 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100755 common/travis/check-install.sh

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index be2fd7969db..fff011506fb 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" "$TEST"
+          )
diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
new file mode 100755
index 00000000000..e5a0bf9bb73
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# check-install.sh
+
+if [ -z "$1" ]; then
+	exit
+fi
+
+PKGS=$(cat /tmp/templates)
+
+for pkg in ${PKGS}; do
+	for dep in $(xbps-query -RX "$pkg"); do
+		xbps-install \
+			-R hostdir/binpkgs \
+			-R hostdir/binpkgs/nonfree \
+			-Sny \
+			$pkg $dep
+		[ $? -eq 1 ] && exit 1
+	done
+done
+
+exit 0

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (2 preceding siblings ...)
  2020-12-18 18:22 ` ericonr
@ 2020-12-18 18:30 ` ericonr
  2020-12-18 18:45 ` ericonr
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 18:30 UTC (permalink / raw)
  To: ml

[-- 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: 8099 bytes --]

From 45d8aeb53cf2a3c086a5dfe89da71c7f623d3b2f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/3] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 88ea81c5c98..1c12843e8c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1736,8 +1736,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From 36dc04f45a1f822b43a092efb1f45e54d50cb131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/3] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From 69dcc3694fbd1a513242be54bb57660c66320a4c 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 3/3] .github/workflows: add script to check staging state in
 repo.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 22 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100755 common/travis/check-install.sh

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index be2fd7969db..fff011506fb 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" "$TEST"
+          )
diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
new file mode 100755
index 00000000000..1ab924ed173
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# check-install.sh
+
+if [ -z "$1" ]; then
+	exit
+fi
+
+PKGS=$(cat /tmp/templates)
+
+for pkg in ${PKGS}; do
+	for dep in $(xbps-query -RX "$pkg"); do
+		xbps-install \
+			-R $HOME/hostdir/binpkgs \
+			-R $HOME/hostdir/binpkgs/nonfree \
+			-Sny \
+			$pkg $dep
+		[ $? -eq 1 ] && exit 1
+	done
+done
+
+exit 0

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (3 preceding siblings ...)
  2020-12-18 18:30 ` ericonr
@ 2020-12-18 18:45 ` ericonr
  2020-12-18 19:24 ` ericonr
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 18:45 UTC (permalink / raw)
  To: ml

[-- 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: 8220 bytes --]

From 45d8aeb53cf2a3c086a5dfe89da71c7f623d3b2f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/3] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 88ea81c5c98..1c12843e8c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1736,8 +1736,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From 36dc04f45a1f822b43a092efb1f45e54d50cb131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/3] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From b1cc1fca65df618354cb63e0b1f299079e2f6827 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 3/3] .github/workflows: add script to check staging state in
 repo.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 21 +++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100755 common/travis/check-install.sh

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index be2fd7969db..fff011506fb 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" "$TEST"
+          )
diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
new file mode 100755
index 00000000000..e0c10056f92
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# check-install.sh
+
+if [ -z "$1" ]; then
+	exit
+fi
+
+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 -RX "$subpkg"); do
+			xbps-install \
+				-R $HOME/hostdir/binpkgs \
+				-R $HOME/hostdir/binpkgs/nonfree \
+				-Sny \
+				"$subpkg" "$dep" >/dev/null
+			[ $? -eq 8 ] && exit 1
+		done
+	done
+done < /tmp/templates

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (4 preceding siblings ...)
  2020-12-18 18:45 ` ericonr
@ 2020-12-18 19:24 ` ericonr
  2020-12-18 19:31 ` ericonr
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 19:24 UTC (permalink / raw)
  To: ml

[-- 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: 9547 bytes --]

From 45d8aeb53cf2a3c086a5dfe89da71c7f623d3b2f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/4] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 88ea81c5c98..1c12843e8c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1736,8 +1736,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From 36dc04f45a1f822b43a092efb1f45e54d50cb131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/4] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From 50033648772b72812df98b8e8f936dd9f9c5836f 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 3/4] 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 967d19a2c797197dfa380b79e9bb0e97faa4dc7d 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 4/4] .github/workflows: add script to check that packages can
 still be installed.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 25 +++++++++++++++++++++++++
 2 files changed, 33 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..215f287abf9
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,25 @@
+#!/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" "$dep" >/dev/null
+			[ $? -eq 8 ] && exit 1
+		done
+	done
+done < /tmp/templates

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (5 preceding siblings ...)
  2020-12-18 19:24 ` ericonr
@ 2020-12-18 19:31 ` ericonr
  2020-12-18 19:39 ` ericonr
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 19:31 UTC (permalink / raw)
  To: ml

[-- 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: 9536 bytes --]

From 45d8aeb53cf2a3c086a5dfe89da71c7f623d3b2f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/4] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 88ea81c5c98..1c12843e8c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1736,8 +1736,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From 36dc04f45a1f822b43a092efb1f45e54d50cb131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/4] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From 50033648772b72812df98b8e8f936dd9f9c5836f 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 3/4] 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 dbf3f862b39f4d9f1b920bf7c03dca2906b7cf37 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 4/4] .github/workflows: add script to check that packages can
 still be installed.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 25 +++++++++++++++++++++++++
 2 files changed, 33 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..5c1220636b8
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,25 @@
+#!/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" "$dep"
+			[ $? -eq 8 ] && exit 1
+		done
+	done
+done < /tmp/templates

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

* Re: Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (6 preceding siblings ...)
  2020-12-18 19:31 ` ericonr
@ 2020-12-18 19:39 ` ericonr
  2020-12-18 19:55 ` ericonr
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 19:39 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27259#issuecomment-748283789

Comment:
Should be basically ready.

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

* Re: Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (7 preceding siblings ...)
  2020-12-18 19:39 ` ericonr
@ 2020-12-18 19:55 ` ericonr
  2020-12-20  0:58 ` [PR PATCH] [Updated] " ericonr
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-18 19:55 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27259#issuecomment-748290174

Comment:
The package update is just as an example, will be removed for the final merge step.

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (8 preceding siblings ...)
  2020-12-18 19:55 ` ericonr
@ 2020-12-20  0:58 ` ericonr
  2020-12-23 14:50 ` ericonr
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-20  0:58 UTC (permalink / raw)
  To: ml

[-- 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: 10233 bytes --]

From f4ec4974886a28199c20ce5eb69376353e5d68c9 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/5] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index e1e2291d5f7..86c26623e4c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1733,8 +1733,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From c489dae6021cd2d00832a8e7a6f59d71e5717b69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/5] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From 372e96e280d90d035c599507f39ac1cf7cb9e429 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 3/5] 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 60fb143e2a22041bef572f03ca6a2de1ee744aab 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 4/5] .github/workflows: add script to check that packages can
 still be installed.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 25 +++++++++++++++++++++++++
 2 files changed, 33 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..5c1220636b8
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,25 @@
+#!/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" "$dep"
+			[ $? -eq 8 ] && exit 1
+		done
+	done
+done < /tmp/templates

From a2254043f5ac18850952f23fc082136c1af9e3c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 19 Dec 2020 21:58:34 -0300
Subject: [PATCH 5/5] gnunet: test

---
 srcpkgs/gnunet/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gnunet/template b/srcpkgs/gnunet/template
index 0ca97a9168d..a8a6dabe66b 100644
--- a/srcpkgs/gnunet/template
+++ b/srcpkgs/gnunet/template
@@ -1,7 +1,7 @@
 # Template file for 'gnunet'
 pkgname=gnunet
 version=0.12.2
-revision=3
+revision=4
 build_style=gnu-configure
 conf_files="/etc/gnunet/gnunet.conf"
 hostmakedepends="automake gettext gettext-devel libtool pkg-config tar texinfo"

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (9 preceding siblings ...)
  2020-12-20  0:58 ` [PR PATCH] [Updated] " ericonr
@ 2020-12-23 14:50 ` ericonr
  2020-12-23 15:01 ` ericonr
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-23 14:50 UTC (permalink / raw)
  To: ml

[-- 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: 10233 bytes --]

From 5d41b6271b2f12f9cbe0b7acff0287a9dcff2efc Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/5] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 98fc15ee985..41bc5f14e19 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1733,8 +1733,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From df75c615eeb8b63aec279be25b87cb0b092c6379 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/5] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From f5882ed4df5057b4732e77f368428bb4a89e1e7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 19 Dec 2020 21:58:34 -0300
Subject: [PATCH 3/5] gnunet: test

---
 srcpkgs/gnunet/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gnunet/template b/srcpkgs/gnunet/template
index 0ca97a9168d..a8a6dabe66b 100644
--- a/srcpkgs/gnunet/template
+++ b/srcpkgs/gnunet/template
@@ -1,7 +1,7 @@
 # Template file for 'gnunet'
 pkgname=gnunet
 version=0.12.2
-revision=3
+revision=4
 build_style=gnu-configure
 conf_files="/etc/gnunet/gnunet.conf"
 hostmakedepends="automake gettext gettext-devel libtool pkg-config tar texinfo"

From d5349b17e0904b581acba4b0f03a90e79060ae88 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 4/5] 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 3d35ed1869ff5f2ee47c01acc213ceed6dd3d329 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 5/5] .github/workflows: add script to check that packages can
 still be installed.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 25 +++++++++++++++++++++++++
 2 files changed, 33 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..5c1220636b8
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,25 @@
+#!/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" "$dep"
+			[ $? -eq 8 ] && exit 1
+		done
+	done
+done < /tmp/templates

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (10 preceding siblings ...)
  2020-12-23 14:50 ` ericonr
@ 2020-12-23 15:01 ` ericonr
  2020-12-23 18:18 ` ericonr
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-23 15:01 UTC (permalink / raw)
  To: ml

[-- 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: 10862 bytes --]

From 5d41b6271b2f12f9cbe0b7acff0287a9dcff2efc Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/6] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 98fc15ee985..41bc5f14e19 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1733,8 +1733,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From df75c615eeb8b63aec279be25b87cb0b092c6379 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/6] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From f5882ed4df5057b4732e77f368428bb4a89e1e7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 19 Dec 2020 21:58:34 -0300
Subject: [PATCH 3/6] gnunet: test

---
 srcpkgs/gnunet/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gnunet/template b/srcpkgs/gnunet/template
index 0ca97a9168d..a8a6dabe66b 100644
--- a/srcpkgs/gnunet/template
+++ b/srcpkgs/gnunet/template
@@ -1,7 +1,7 @@
 # Template file for 'gnunet'
 pkgname=gnunet
 version=0.12.2
-revision=3
+revision=4
 build_style=gnu-configure
 conf_files="/etc/gnunet/gnunet.conf"
 hostmakedepends="automake gettext gettext-devel libtool pkg-config tar texinfo"

From d5349b17e0904b581acba4b0f03a90e79060ae88 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 4/6] 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 3d35ed1869ff5f2ee47c01acc213ceed6dd3d329 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 5/6] .github/workflows: add script to check that packages can
 still be installed.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 25 +++++++++++++++++++++++++
 2 files changed, 33 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..5c1220636b8
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,25 @@
+#!/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" "$dep"
+			[ $? -eq 8 ] && exit 1
+		done
+	done
+done < /tmp/templates

From 07cc1f1fba39ca1e73dab9b03a430c63bbeedbe2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Wed, 23 Dec 2020 12:01:16 -0300
Subject: [PATCH 6/6] gnunet

---
 srcpkgs/gnunet/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/gnunet/template b/srcpkgs/gnunet/template
index a8a6dabe66b..207dd27db36 100644
--- a/srcpkgs/gnunet/template
+++ b/srcpkgs/gnunet/template
@@ -44,6 +44,10 @@ pre_configure() {
 	NOCONFIGURE=1 autoreconf -fi
 }
 
+do_check() {
+	echo tmp
+}
+
 post_install() {
 	vmkdir etc/gnunet
 	vcopy "${FILESDIR}/gnunet.conf" etc/gnunet/gnunet.conf

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (11 preceding siblings ...)
  2020-12-23 15:01 ` ericonr
@ 2020-12-23 18:18 ` ericonr
  2020-12-23 18:30 ` ericonr
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-23 18:18 UTC (permalink / raw)
  To: ml

[-- 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: 11549 bytes --]

From 5d41b6271b2f12f9cbe0b7acff0287a9dcff2efc Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/7] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 98fc15ee985..41bc5f14e19 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1733,8 +1733,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From df75c615eeb8b63aec279be25b87cb0b092c6379 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/7] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From f5882ed4df5057b4732e77f368428bb4a89e1e7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 19 Dec 2020 21:58:34 -0300
Subject: [PATCH 3/7] gnunet: test

---
 srcpkgs/gnunet/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gnunet/template b/srcpkgs/gnunet/template
index 0ca97a9168d..a8a6dabe66b 100644
--- a/srcpkgs/gnunet/template
+++ b/srcpkgs/gnunet/template
@@ -1,7 +1,7 @@
 # Template file for 'gnunet'
 pkgname=gnunet
 version=0.12.2
-revision=3
+revision=4
 build_style=gnu-configure
 conf_files="/etc/gnunet/gnunet.conf"
 hostmakedepends="automake gettext gettext-devel libtool pkg-config tar texinfo"

From d5349b17e0904b581acba4b0f03a90e79060ae88 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 4/7] 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 3d35ed1869ff5f2ee47c01acc213ceed6dd3d329 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 5/7] .github/workflows: add script to check that packages can
 still be installed.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 25 +++++++++++++++++++++++++
 2 files changed, 33 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..5c1220636b8
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,25 @@
+#!/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" "$dep"
+			[ $? -eq 8 ] && exit 1
+		done
+	done
+done < /tmp/templates

From 07cc1f1fba39ca1e73dab9b03a430c63bbeedbe2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Wed, 23 Dec 2020 12:01:16 -0300
Subject: [PATCH 6/7] gnunet

---
 srcpkgs/gnunet/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/gnunet/template b/srcpkgs/gnunet/template
index a8a6dabe66b..207dd27db36 100644
--- a/srcpkgs/gnunet/template
+++ b/srcpkgs/gnunet/template
@@ -44,6 +44,10 @@ pre_configure() {
 	NOCONFIGURE=1 autoreconf -fi
 }
 
+do_check() {
+	echo tmp
+}
+
 post_install() {
 	vmkdir etc/gnunet
 	vcopy "${FILESDIR}/gnunet.conf" etc/gnunet/gnunet.conf

From 3a681fd55d3af48030f87fe664d431d0d90e07ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Wed, 23 Dec 2020 15:17:53 -0300
Subject: [PATCH 7/7] trav

---
 common/travis/check-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
index 5c1220636b8..4d0e49a9702 100755
--- a/common/travis/check-install.sh
+++ b/common/travis/check-install.sh
@@ -18,7 +18,7 @@ while read -r pkg; do
 			xbps-install \
 				$ROOTDIR $ADDREPO \
 				-Sny \
-				"$subpkg" "$dep"
+				"$subpkg" "$(xbps-uhelper getpkgname "$dep")"
 			[ $? -eq 8 ] && exit 1
 		done
 	done

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (12 preceding siblings ...)
  2020-12-23 18:18 ` ericonr
@ 2020-12-23 18:30 ` ericonr
  2020-12-23 18:46 ` ericonr
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-23 18:30 UTC (permalink / raw)
  To: ml

[-- 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: 11699 bytes --]

From 5d41b6271b2f12f9cbe0b7acff0287a9dcff2efc Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 18 Nov 2020 16:33:42 -0600
Subject: [PATCH 1/7] libextractor: update to 1.10

Update for CVE-2019-15531

Closes: #26493 [via git-merge-pr]
---
 common/shlibs                                |   4 +-
 srcpkgs/libextractor/patches/exiv-0.27.patch | 127 -------------------
 srcpkgs/libextractor/template                |   6 +-
 3 files changed, 5 insertions(+), 132 deletions(-)
 delete mode 100644 srcpkgs/libextractor/patches/exiv-0.27.patch

diff --git a/common/shlibs b/common/shlibs
index 98fc15ee985..41bc5f14e19 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1733,8 +1733,8 @@ libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
 libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1
 liblensfun.so.1 lensfun-0.3.2_1
 libmitlm.so.1 mitlm-0.4.2_1
-libextractor.so.3 libextractor-1.1_1
-libextractor_common.so.1 libextractor-1.1_1
+libextractor.so.2 libextractor-1.10_1
+libextractor_common.so.1 libextractor-1.10_1
 libpano13.so.3 libpano13-2.9.19_1
 libubsan.so.1 libsanitizer-8.2.0_1
 libtsan.so.0 libsanitizer-6.3.0_1
diff --git a/srcpkgs/libextractor/patches/exiv-0.27.patch b/srcpkgs/libextractor/patches/exiv-0.27.patch
deleted file mode 100644
index cfdb6426408..00000000000
--- a/srcpkgs/libextractor/patches/exiv-0.27.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- 
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
- 
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
- 
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- 
- 
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index bd7af6f78de..9e2c898b2b6 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,6 +1,6 @@
 # Template file for 'libextractor'
 pkgname=libextractor
-version=1.9
+version=1.10
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -14,11 +14,11 @@ maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/libextractor/"
 distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
+checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
 post_install() {
-	sed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
+	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }
 
 libextractor-devel_package() {

From df75c615eeb8b63aec279be25b87cb0b092c6379 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 18 Dec 2020 15:01:53 -0300
Subject: [PATCH 2/7] tmp

---
 srcpkgs/libextractor/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 9e2c898b2b6..6e7418de150 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -17,6 +17,10 @@ distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357
 patch_args="-Np1"
 
+do_check() {
+	: #tmp
+}
+
 post_install() {
 	vsed -i "s|\(-specs=.*hardened-ld\)||g" ${DESTDIR}/usr/lib/pkgconfig/libextractor.pc
 }

From f5882ed4df5057b4732e77f368428bb4a89e1e7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 19 Dec 2020 21:58:34 -0300
Subject: [PATCH 3/7] gnunet: test

---
 srcpkgs/gnunet/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gnunet/template b/srcpkgs/gnunet/template
index 0ca97a9168d..a8a6dabe66b 100644
--- a/srcpkgs/gnunet/template
+++ b/srcpkgs/gnunet/template
@@ -1,7 +1,7 @@
 # Template file for 'gnunet'
 pkgname=gnunet
 version=0.12.2
-revision=3
+revision=4
 build_style=gnu-configure
 conf_files="/etc/gnunet/gnunet.conf"
 hostmakedepends="automake gettext gettext-devel libtool pkg-config tar texinfo"

From d5349b17e0904b581acba4b0f03a90e79060ae88 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 4/7] 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 3d35ed1869ff5f2ee47c01acc213ceed6dd3d329 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 5/7] .github/workflows: add script to check that packages can
 still be installed.

---
 .github/workflows/build.yaml   |  8 ++++++++
 common/travis/check-install.sh | 25 +++++++++++++++++++++++++
 2 files changed, 33 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..5c1220636b8
--- /dev/null
+++ b/common/travis/check-install.sh
@@ -0,0 +1,25 @@
+#!/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" "$dep"
+			[ $? -eq 8 ] && exit 1
+		done
+	done
+done < /tmp/templates

From 07cc1f1fba39ca1e73dab9b03a430c63bbeedbe2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Wed, 23 Dec 2020 12:01:16 -0300
Subject: [PATCH 6/7] gnunet

---
 srcpkgs/gnunet/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/gnunet/template b/srcpkgs/gnunet/template
index a8a6dabe66b..207dd27db36 100644
--- a/srcpkgs/gnunet/template
+++ b/srcpkgs/gnunet/template
@@ -44,6 +44,10 @@ pre_configure() {
 	NOCONFIGURE=1 autoreconf -fi
 }
 
+do_check() {
+	echo tmp
+}
+
 post_install() {
 	vmkdir etc/gnunet
 	vcopy "${FILESDIR}/gnunet.conf" etc/gnunet/gnunet.conf

From 4309f314a8bb46b0d270eb80c1c10df052fdcbf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Wed, 23 Dec 2020 15:17:53 -0300
Subject: [PATCH 7/7] trav

---
 common/travis/check-install.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/common/travis/check-install.sh b/common/travis/check-install.sh
index 5c1220636b8..d9725670002 100755
--- a/common/travis/check-install.sh
+++ b/common/travis/check-install.sh
@@ -18,8 +18,11 @@ while read -r pkg; do
 			xbps-install \
 				$ROOTDIR $ADDREPO \
 				-Sny \
-				"$subpkg" "$dep"
-			[ $? -eq 8 ] && exit 1
+				"$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

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

* Re: Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (13 preceding siblings ...)
  2020-12-23 18:30 ` ericonr
@ 2020-12-23 18:46 ` ericonr
  2020-12-23 19:09 ` [PR PATCH] [Updated] " ericonr
  2020-12-23 19:14 ` [PR PATCH] [Merged]: " ericonr
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-23 18:46 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27259#issuecomment-750426835

Comment:
I will clean up the commit history in a bit, just letting it sit so the check results can be seen.

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

* Re: [PR PATCH] [Updated] Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (14 preceding siblings ...)
  2020-12-23 18:46 ` ericonr
@ 2020-12-23 19:09 ` ericonr
  2020-12-23 19:14 ` [PR PATCH] [Merged]: " ericonr
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-23 19:09 UTC (permalink / raw)
  To: ml

[-- 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

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

* Re: [PR PATCH] [Merged]: Test staging state in CI
  2020-12-18 17:54 [PR PATCH] Test staging state in CI ericonr
                   ` (15 preceding siblings ...)
  2020-12-23 19:09 ` [PR PATCH] [Updated] " ericonr
@ 2020-12-23 19:14 ` ericonr
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-23 19:14 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

Test staging state in CI
https://github.com/void-linux/void-packages/pull/27259

Description:
Can still be improved, should probably add subpkg handling.

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

end of thread, other threads:[~2020-12-23 19:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18 17:54 [PR PATCH] Test staging state in CI 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 ` [PR PATCH] [Updated] " ericonr
2020-12-23 19:14 ` [PR PATCH] [Merged]: " ericonr

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