Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] ripgrep: use system-provided libpcre2
@ 2020-09-28 22:53 Logarithmus
  2020-09-28 22:54 ` [PR PATCH] [Updated] " Logarithmus
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Logarithmus @ 2020-09-28 22:53 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Logarithmus/void-packages ripgrep
https://github.com/void-linux/void-packages/pull/25179

ripgrep: use system-provided libpcre2
By default, for musl targets `libpcre2` is linked statically. This patch fixes this and reduces binary size by ~400 KiB for `x86_64-musl` target.
More info here: https://github.com/burntsushi/rust-pcre2/tree/HEAD/pcre2-sys#notes

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

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

From 56c110dcb133a465ec572b4476464ecf2daa52fd Mon Sep 17 00:00:00 2001
From: Artur Sinila <personal@logarithmus.dev>
Date: Tue, 29 Sep 2020 01:48:27 +0300
Subject: [PATCH] ripgrep: use system-provided libpcre2

---
 srcpkgs/ripgrep/template | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ripgrep/template b/srcpkgs/ripgrep/template
index 339d2de3a39..158619189cc 100644
--- a/srcpkgs/ripgrep/template
+++ b/srcpkgs/ripgrep/template
@@ -1,7 +1,7 @@
 # Template file for 'ripgrep'
 pkgname=ripgrep
 version=12.1.1
-revision=1
+revision=2
 build_style=cargo
 configure_args="--features=pcre2"
 hostmakedepends="ruby-asciidoctor pkg-config"
@@ -13,6 +13,13 @@ homepage="https://github.com/BurntSushi/ripgrep/"
 distfiles="https://github.com/BurntSushi/${pkgname}/archive/${version}.tar.gz"
 checksum=2513338d61a5c12c8fea18a0387b3e0651079ef9b31f306050b1f0aaa926271e
 
+# Dynamic linking to libpcre2 even on musl
+export PCRE2_SYS_STATIC=0
+
+pre_build() {
+	echo "PCRE2_SYS_STATIC=$PCRE2_SYS_STATIC"
+}
+
 post_install() {
 	vlicense LICENSE-MIT
 	vlicense UNLICENSE

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

* Re: [PR PATCH] [Updated] ripgrep: use system-provided libpcre2
  2020-09-28 22:53 [PR PATCH] ripgrep: use system-provided libpcre2 Logarithmus
@ 2020-09-28 22:54 ` Logarithmus
  2020-09-28 22:56 ` Logarithmus
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Logarithmus @ 2020-09-28 22:54 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Logarithmus/void-packages ripgrep
https://github.com/void-linux/void-packages/pull/25179

ripgrep: use system-provided libpcre2
By default, for musl targets `libpcre2` is linked statically. This patch fixes this and reduces binary size by ~400 KiB for `x86_64-musl` target.
More info here: https://github.com/burntsushi/rust-pcre2/tree/HEAD/pcre2-sys#notes

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

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

From 4ade9654d9f84f7274e1c7ef536fef91e9b1de87 Mon Sep 17 00:00:00 2001
From: Artur Sinila <personal@logarithmus.dev>
Date: Tue, 29 Sep 2020 01:48:27 +0300
Subject: [PATCH] ripgrep: use system-provided libpcre2

---
 srcpkgs/ripgrep/template | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ripgrep/template b/srcpkgs/ripgrep/template
index 339d2de3a39..158619189cc 100644
--- a/srcpkgs/ripgrep/template
+++ b/srcpkgs/ripgrep/template
@@ -1,7 +1,7 @@
 # Template file for 'ripgrep'
 pkgname=ripgrep
 version=12.1.1
-revision=1
+revision=2
 build_style=cargo
 configure_args="--features=pcre2"
 hostmakedepends="ruby-asciidoctor pkg-config"
@@ -13,6 +13,13 @@ homepage="https://github.com/BurntSushi/ripgrep/"
 distfiles="https://github.com/BurntSushi/${pkgname}/archive/${version}.tar.gz"
 checksum=2513338d61a5c12c8fea18a0387b3e0651079ef9b31f306050b1f0aaa926271e
 
+# Dynamic linking to libpcre2 even on musl
+export PCRE2_SYS_STATIC=0
+
+pre_build() {
+	echo "PCRE2_SYS_STATIC=$PCRE2_SYS_STATIC"
+}
+
 post_install() {
 	vlicense LICENSE-MIT
 	vlicense UNLICENSE

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

* Re: [PR PATCH] [Updated] ripgrep: use system-provided libpcre2
  2020-09-28 22:53 [PR PATCH] ripgrep: use system-provided libpcre2 Logarithmus
  2020-09-28 22:54 ` [PR PATCH] [Updated] " Logarithmus
@ 2020-09-28 22:56 ` Logarithmus
  2020-09-28 23:02 ` [PR REVIEW] " ericonr
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Logarithmus @ 2020-09-28 22:56 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Logarithmus/void-packages ripgrep
https://github.com/void-linux/void-packages/pull/25179

ripgrep: use system-provided libpcre2
By default, for musl targets `libpcre2` is linked statically. This patch fixes this and reduces binary size by ~400 KiB for `x86_64-musl` target.
More info here: https://github.com/burntsushi/rust-pcre2/tree/HEAD/pcre2-sys#notes

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

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

From f3592386097bdc1d1983a4fac9298b7fb3ba85c8 Mon Sep 17 00:00:00 2001
From: Artur Sinila <personal@logarithmus.dev>
Date: Tue, 29 Sep 2020 01:48:27 +0300
Subject: [PATCH] ripgrep: use system-provided libpcre2

---
 srcpkgs/ripgrep/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ripgrep/template b/srcpkgs/ripgrep/template
index 339d2de3a39..f9983424310 100644
--- a/srcpkgs/ripgrep/template
+++ b/srcpkgs/ripgrep/template
@@ -1,7 +1,7 @@
 # Template file for 'ripgrep'
 pkgname=ripgrep
 version=12.1.1
-revision=1
+revision=2
 build_style=cargo
 configure_args="--features=pcre2"
 hostmakedepends="ruby-asciidoctor pkg-config"
@@ -13,6 +13,9 @@ homepage="https://github.com/BurntSushi/ripgrep/"
 distfiles="https://github.com/BurntSushi/${pkgname}/archive/${version}.tar.gz"
 checksum=2513338d61a5c12c8fea18a0387b3e0651079ef9b31f306050b1f0aaa926271e
 
+# Dynamic linking to libpcre2 even on musl
+export PCRE2_SYS_STATIC=0
+
 post_install() {
 	vlicense LICENSE-MIT
 	vlicense UNLICENSE

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

* Re: [PR REVIEW] ripgrep: use system-provided libpcre2
  2020-09-28 22:53 [PR PATCH] ripgrep: use system-provided libpcre2 Logarithmus
  2020-09-28 22:54 ` [PR PATCH] [Updated] " Logarithmus
  2020-09-28 22:56 ` Logarithmus
@ 2020-09-28 23:02 ` ericonr
  2020-09-28 23:47 ` Logarithmus
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ericonr @ 2020-09-28 23:02 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25179#discussion_r496282054

Comment:
Any other Rust stuff using pcre2? We could add this to the Rust helper together with the other variables.

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

* Re: ripgrep: use system-provided libpcre2
  2020-09-28 22:53 [PR PATCH] ripgrep: use system-provided libpcre2 Logarithmus
                   ` (2 preceding siblings ...)
  2020-09-28 23:02 ` [PR REVIEW] " ericonr
@ 2020-09-28 23:47 ` Logarithmus
  2020-09-28 23:49 ` Logarithmus
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Logarithmus @ 2020-09-28 23:47 UTC (permalink / raw)
  To: ml

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

New comment by Logarithmus on void-packages repository

https://github.com/void-linux/void-packages/pull/25179#issuecomment-700341018

Comment:
On Mon, 2020-09-28 at 16:02 -0700, Érico Nogueira Rolim wrote:
> @ericonr commented on this pull request.
> 
> In srcpkgs/ripgrep/template:
> > @@ -13,6 +13,9 @@ homepage="https://github.com/BurntSushi/ripgrep/"
>  distfiles="https://github.com/BurntSushi/${pkgname}/archive/${version}.tar.gz
> "
>  checksum=2513338d61a5c12c8fea18a0387b3e0651079ef9b31f306050b1f0aaa92
> 6271e
>  
> +# Dynamic linking to libpcre2 even on musl
> +export PCRE2_SYS_STATIC=0
> Any other Rust stuff using pcre2? We could add this to the Rust
> helper together with the other variables.
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
@ericonr you can find crates which depend on `pcre2-sys`
[here](https://lib.rs/crates/pcre2/rev). AFAIK at the moment non of
them is present in void repositories, but I agree with you that it'd be
better to put this environment variable into rust helper.



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

* Re: ripgrep: use system-provided libpcre2
  2020-09-28 22:53 [PR PATCH] ripgrep: use system-provided libpcre2 Logarithmus
                   ` (3 preceding siblings ...)
  2020-09-28 23:47 ` Logarithmus
@ 2020-09-28 23:49 ` Logarithmus
  2020-09-29  0:13 ` [PR PATCH] [Closed]: " Logarithmus
  2020-09-29  0:13 ` Logarithmus
  6 siblings, 0 replies; 8+ messages in thread
From: Logarithmus @ 2020-09-28 23:49 UTC (permalink / raw)
  To: ml

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

New comment by Logarithmus on void-packages repository

https://github.com/void-linux/void-packages/pull/25179#issuecomment-700341018

Comment:
@ericonr you can find crates which depend on pcre2-sys
at https://lib.rs/crates/pcre2/rev. AFAIK at the moment none of
them is present in void repositories, but I agree with you that it'd be
better to put this environment variable into rust helper.



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

* Re: [PR PATCH] [Closed]: ripgrep: use system-provided libpcre2
  2020-09-28 22:53 [PR PATCH] ripgrep: use system-provided libpcre2 Logarithmus
                   ` (4 preceding siblings ...)
  2020-09-28 23:49 ` Logarithmus
@ 2020-09-29  0:13 ` Logarithmus
  2020-09-29  0:13 ` Logarithmus
  6 siblings, 0 replies; 8+ messages in thread
From: Logarithmus @ 2020-09-29  0:13 UTC (permalink / raw)
  To: ml

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

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

ripgrep: use system-provided libpcre2
https://github.com/void-linux/void-packages/pull/25179

Description:
By default, for musl targets `libpcre2` is linked statically. This patch fixes this and reduces binary size by ~400 KiB for `x86_64-musl` target.
More info here: https://github.com/burntsushi/rust-pcre2/tree/HEAD/pcre2-sys#notes

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

* Re: ripgrep: use system-provided libpcre2
  2020-09-28 22:53 [PR PATCH] ripgrep: use system-provided libpcre2 Logarithmus
                   ` (5 preceding siblings ...)
  2020-09-29  0:13 ` [PR PATCH] [Closed]: " Logarithmus
@ 2020-09-29  0:13 ` Logarithmus
  6 siblings, 0 replies; 8+ messages in thread
From: Logarithmus @ 2020-09-29  0:13 UTC (permalink / raw)
  To: ml

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

New comment by Logarithmus on void-packages repository

https://github.com/void-linux/void-packages/pull/25179#issuecomment-700348331

Comment:
Closing in favor of https://github.com/void-linux/void-packages/pull/25182

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

end of thread, other threads:[~2020-09-29  0:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 22:53 [PR PATCH] ripgrep: use system-provided libpcre2 Logarithmus
2020-09-28 22:54 ` [PR PATCH] [Updated] " Logarithmus
2020-09-28 22:56 ` Logarithmus
2020-09-28 23:02 ` [PR REVIEW] " ericonr
2020-09-28 23:47 ` Logarithmus
2020-09-28 23:49 ` Logarithmus
2020-09-29  0:13 ` [PR PATCH] [Closed]: " Logarithmus
2020-09-29  0:13 ` Logarithmus

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