Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] plocate-1.1.3
@ 2021-01-17 20:37 Duncaen
  2021-01-17 20:44 ` plocate-1.1.3 leahneukirchen
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Duncaen @ 2021-01-17 20:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Duncaen/void-packages plocate
https://github.com/void-linux/void-packages/pull/27991

plocate-1.1.3


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

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

From 740179c839b777e69f0d41f080fac6cceeb65f2a Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Sun, 17 Jan 2021 21:26:59 +0100
Subject: [PATCH 1/2] musl-legacy-compat: update to 0.5.

Add `error_at_line(3)` to error.h
---
 srcpkgs/musl-legacy-compat/files/error.h | 27 ++++++++++++++++++++++++
 srcpkgs/musl-legacy-compat/template      |  2 +-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/musl-legacy-compat/files/error.h b/srcpkgs/musl-legacy-compat/files/error.h
index 4505784182a..c94dbac5bf4 100644
--- a/srcpkgs/musl-legacy-compat/files/error.h
+++ b/srcpkgs/musl-legacy-compat/files/error.h
@@ -26,4 +26,31 @@ static inline void error(int status, int errnum, const char* format, ...)
 		exit(status);
 }
 
+static int error_one_per_line = 0;
+
+static inline void error_at_line(int status, int errnum, const char *filename,
+		unsigned int linenum, const char *format, ...)
+{
+	va_list ap;
+	if (error_one_per_line) {
+		static const char *old_filename;
+		static int old_linenum;
+		if (linenum == old_linenum && filename == old_filename)
+			return;
+		old_filename = filename;
+		old_linenum = linenum;
+	}
+	fprintf(stderr, "%s: %s:%u: ", program_invocation_name, filename, linenum);
+	va_start(ap, format);
+	vfprintf(stderr, format, ap);
+	va_end(ap);
+	if (errnum)
+		fprintf(stderr, ": %s", strerror(errnum));
+	fprintf(stderr, "\n");
+	error_message_count++;
+	if (status)
+		exit(status);
+}
+
+
 #endif	/* _ERROR_H_ */
diff --git a/srcpkgs/musl-legacy-compat/template b/srcpkgs/musl-legacy-compat/template
index afc447314f4..f68bd992251 100644
--- a/srcpkgs/musl-legacy-compat/template
+++ b/srcpkgs/musl-legacy-compat/template
@@ -1,6 +1,6 @@
 # Template file for 'musl-legacy-compat'
 pkgname=musl-legacy-compat
-version=0.4
+version=0.5
 revision=1
 archs="*-musl"
 bootstrap=yes

From b4f8b029dc8524b4f178541ff7d9aad75c18af04 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Sun, 17 Jan 2021 21:34:26 +0100
Subject: [PATCH 2/2] plocate: update to 1.1.3.

---
 srcpkgs/plocate/files/plocate.cron-daily |  6 ++--
 srcpkgs/plocate/files/pupdatedb          |  8 ------
 srcpkgs/plocate/patches/musl.patch       | 35 ++++++++++++++++++++++++
 srcpkgs/plocate/template                 | 19 ++++++++-----
 4 files changed, 49 insertions(+), 19 deletions(-)
 delete mode 100644 srcpkgs/plocate/files/pupdatedb
 create mode 100644 srcpkgs/plocate/patches/musl.patch

diff --git a/srcpkgs/plocate/files/plocate.cron-daily b/srcpkgs/plocate/files/plocate.cron-daily
index 099ba5ce69a..a616d55d280 100644
--- a/srcpkgs/plocate/files/plocate.cron-daily
+++ b/srcpkgs/plocate/files/plocate.cron-daily
@@ -1,5 +1,3 @@
 #!/bin/sh
-set -e
-plocate-build /var/lib/mlocate/mlocate.db /var/lib/mlocate/plocate.db.new
-chgrp _plocate /var/lib/mlocate/plocate.db.new
-mv /var/lib/mlocate/plocate.db.new /var/lib/mlocate/plocate.db
+ulimit -n 131072
+exec pupdatedb
diff --git a/srcpkgs/plocate/files/pupdatedb b/srcpkgs/plocate/files/pupdatedb
deleted file mode 100644
index 08fdbd0748a..00000000000
--- a/srcpkgs/plocate/files/pupdatedb
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# pupdatedb [database directory] - update a database for plocate
-set -e
-dbdir=${1:-${DBDIR:-/var/lib/mlocate}}
-mupdatedb -o "${dbdir}/mlocate.db"
-plocate-build "${dbdir}/mlocate.db" "${dbdir}/plocate.db.new"
-chgrp _plocate "${dbdir}/plocate.db.new"
-mv "${dbdir}/plocate.db.new" "${dbdir}/plocate.db"
diff --git a/srcpkgs/plocate/patches/musl.patch b/srcpkgs/plocate/patches/musl.patch
new file mode 100644
index 00000000000..22e955b6fd4
--- /dev/null
+++ b/srcpkgs/plocate/patches/musl.patch
@@ -0,0 +1,35 @@
+--- conf.cpp
++++ conf.cpp
+@@ -479,7 +479,7 @@
+ 			if (conf_scan_root != NULL)
+ 				error(EXIT_FAILURE, 0, _("--%s specified twice"),
+ 				      "database-root");
+-			conf_scan_root = canonicalize_file_name(optarg);
++			conf_scan_root = realpath(optarg, NULL);
+ 			if (conf_scan_root == NULL)
+ 				error(EXIT_FAILURE, errno, _("invalid value `%s' of --%s"), optarg,
+ 				      "database-root");
+--- database-builder.cpp
++++ database-builder.cpp
+@@ -1,3 +1,5 @@
++#include <sys/types.h>
++
+ #include "database-builder.h"
+ 
+ #include "dprintf.h"
+@@ -10,7 +12,6 @@
+ #include <string_view>
+ #include <sys/stat.h>
+ #include <sys/time.h>
+-#include <sys/types.h>
+ #include <unistd.h>
+ #include <zdict.h>
+ #include <zstd.h>
+--- plocate-build.cpp.orig
++++ plocate-build.cpp
+@@ -1,3 +1,5 @@
++#include <sys/types.h>
++
+ #include "database-builder.h"
+ #include "db.h"
+ #include "dprintf.h"
diff --git a/srcpkgs/plocate/template b/srcpkgs/plocate/template
index 590edee47e8..43b3450c3e3 100644
--- a/srcpkgs/plocate/template
+++ b/srcpkgs/plocate/template
@@ -1,24 +1,31 @@
 # Template file for 'plocate'
 pkgname=plocate
-version=1.0.7
+version=1.1.3
 revision=1
 build_style=meson
+configure_args="
+ -Dupdatedb_progname=pupdatedb
+ -Dlocategroup=_plocate"
 hostmakedepends="pkg-config"
 makedepends="libzstd-devel"
-depends="mlocate"
 short_desc="Much faster locate based on posting lists"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://plocate.sesse.net/"
 distfiles="https://plocate.sesse.net/download/plocate-${version}.tar.gz"
-checksum=528541eede06170aa16488b2c24abad2e527a12053a62a4a49d0eac3a41e21d3
+checksum=5e6174838e53b1d63852215b02bededcb9878d8fc7f375e3b33afd59121811fa
 
 system_accounts="_plocate"
 
 alternatives="
  locate:locate:/usr/bin/plocate
  locate:locate.1:/usr/share/man/man1/plocate.1
- locate:updatedb:/usr/bin/pupdatedb"
+ locate:updatedb:/usr/bin/pupdatedb
+ locate:updatedb.conf.5:/usr/share/man/man5/pupdatedb.conf.5"
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"
@@ -26,8 +33,6 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_install() {
-	# replace daily cronjob with our own version
-	rm ${DESTDIR}/etc/cron.daily/plocate
 	vinstall ${FILESDIR}/plocate.cron-daily 744 etc/cron.daily plocate-build
-	vbin ${FILESDIR}/pupdatedb
+	mv ${DESTDIR}/usr/share/man/man5/{,p}updatedb.conf.5
 }

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

* Re: plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
@ 2021-01-17 20:44 ` leahneukirchen
  2021-01-17 20:57 ` [PR PATCH] [Updated] plocate-1.1.3 Duncaen
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: leahneukirchen @ 2021-01-17 20:44 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#issuecomment-761876900

Comment:
I think adding `#include <unistd.h>` to database-builder.h is easier, but lgtm.

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

* Re: [PR PATCH] [Updated] plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
  2021-01-17 20:44 ` plocate-1.1.3 leahneukirchen
@ 2021-01-17 20:57 ` Duncaen
  2021-01-17 22:27 ` [PR REVIEW] plocate-1.1.3 ericonr
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-01-17 20:57 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Duncaen/void-packages plocate
https://github.com/void-linux/void-packages/pull/27991

plocate-1.1.3


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

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

From 740179c839b777e69f0d41f080fac6cceeb65f2a Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Sun, 17 Jan 2021 21:26:59 +0100
Subject: [PATCH 1/2] musl-legacy-compat: update to 0.5.

Add `error_at_line(3)` to error.h
---
 srcpkgs/musl-legacy-compat/files/error.h | 27 ++++++++++++++++++++++++
 srcpkgs/musl-legacy-compat/template      |  2 +-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/musl-legacy-compat/files/error.h b/srcpkgs/musl-legacy-compat/files/error.h
index 4505784182a..c94dbac5bf4 100644
--- a/srcpkgs/musl-legacy-compat/files/error.h
+++ b/srcpkgs/musl-legacy-compat/files/error.h
@@ -26,4 +26,31 @@ static inline void error(int status, int errnum, const char* format, ...)
 		exit(status);
 }
 
+static int error_one_per_line = 0;
+
+static inline void error_at_line(int status, int errnum, const char *filename,
+		unsigned int linenum, const char *format, ...)
+{
+	va_list ap;
+	if (error_one_per_line) {
+		static const char *old_filename;
+		static int old_linenum;
+		if (linenum == old_linenum && filename == old_filename)
+			return;
+		old_filename = filename;
+		old_linenum = linenum;
+	}
+	fprintf(stderr, "%s: %s:%u: ", program_invocation_name, filename, linenum);
+	va_start(ap, format);
+	vfprintf(stderr, format, ap);
+	va_end(ap);
+	if (errnum)
+		fprintf(stderr, ": %s", strerror(errnum));
+	fprintf(stderr, "\n");
+	error_message_count++;
+	if (status)
+		exit(status);
+}
+
+
 #endif	/* _ERROR_H_ */
diff --git a/srcpkgs/musl-legacy-compat/template b/srcpkgs/musl-legacy-compat/template
index afc447314f4..f68bd992251 100644
--- a/srcpkgs/musl-legacy-compat/template
+++ b/srcpkgs/musl-legacy-compat/template
@@ -1,6 +1,6 @@
 # Template file for 'musl-legacy-compat'
 pkgname=musl-legacy-compat
-version=0.4
+version=0.5
 revision=1
 archs="*-musl"
 bootstrap=yes

From 10faf21bb2391f00974c90ab24f0c4465453a5b3 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Sun, 17 Jan 2021 21:34:26 +0100
Subject: [PATCH 2/2] plocate: update to 1.1.3.

---
 srcpkgs/plocate/files/plocate.cron-daily |  6 ++----
 srcpkgs/plocate/files/pupdatedb          |  8 --------
 srcpkgs/plocate/patches/musl.patch       | 21 +++++++++++++++++++++
 srcpkgs/plocate/template                 | 19 ++++++++++++-------
 4 files changed, 35 insertions(+), 19 deletions(-)
 delete mode 100644 srcpkgs/plocate/files/pupdatedb
 create mode 100644 srcpkgs/plocate/patches/musl.patch

diff --git a/srcpkgs/plocate/files/plocate.cron-daily b/srcpkgs/plocate/files/plocate.cron-daily
index 099ba5ce69a..a616d55d280 100644
--- a/srcpkgs/plocate/files/plocate.cron-daily
+++ b/srcpkgs/plocate/files/plocate.cron-daily
@@ -1,5 +1,3 @@
 #!/bin/sh
-set -e
-plocate-build /var/lib/mlocate/mlocate.db /var/lib/mlocate/plocate.db.new
-chgrp _plocate /var/lib/mlocate/plocate.db.new
-mv /var/lib/mlocate/plocate.db.new /var/lib/mlocate/plocate.db
+ulimit -n 131072
+exec pupdatedb
diff --git a/srcpkgs/plocate/files/pupdatedb b/srcpkgs/plocate/files/pupdatedb
deleted file mode 100644
index 08fdbd0748a..00000000000
--- a/srcpkgs/plocate/files/pupdatedb
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# pupdatedb [database directory] - update a database for plocate
-set -e
-dbdir=${1:-${DBDIR:-/var/lib/mlocate}}
-mupdatedb -o "${dbdir}/mlocate.db"
-plocate-build "${dbdir}/mlocate.db" "${dbdir}/plocate.db.new"
-chgrp _plocate "${dbdir}/plocate.db.new"
-mv "${dbdir}/plocate.db.new" "${dbdir}/plocate.db"
diff --git a/srcpkgs/plocate/patches/musl.patch b/srcpkgs/plocate/patches/musl.patch
new file mode 100644
index 00000000000..c75020f99b3
--- /dev/null
+++ b/srcpkgs/plocate/patches/musl.patch
@@ -0,0 +1,21 @@
+--- conf.cpp
++++ conf.cpp
+@@ -479,7 +479,7 @@
+ 			if (conf_scan_root != NULL)
+ 				error(EXIT_FAILURE, 0, _("--%s specified twice"),
+ 				      "database-root");
+-			conf_scan_root = canonicalize_file_name(optarg);
++			conf_scan_root = realpath(optarg, NULL);
+ 			if (conf_scan_root == NULL)
+ 				error(EXIT_FAILURE, errno, _("invalid value `%s' of --%s"), optarg,
+ 				      "database-root");
+--- database-builder.h
++++ database-builder.h
+@@ -3,6 +3,7 @@
+ 
+ #include "db.h"
+ 
++#include <unistd.h>
+ #include <chrono>
+ #include <fcntl.h>
+ #include <memory>
diff --git a/srcpkgs/plocate/template b/srcpkgs/plocate/template
index 590edee47e8..43b3450c3e3 100644
--- a/srcpkgs/plocate/template
+++ b/srcpkgs/plocate/template
@@ -1,24 +1,31 @@
 # Template file for 'plocate'
 pkgname=plocate
-version=1.0.7
+version=1.1.3
 revision=1
 build_style=meson
+configure_args="
+ -Dupdatedb_progname=pupdatedb
+ -Dlocategroup=_plocate"
 hostmakedepends="pkg-config"
 makedepends="libzstd-devel"
-depends="mlocate"
 short_desc="Much faster locate based on posting lists"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://plocate.sesse.net/"
 distfiles="https://plocate.sesse.net/download/plocate-${version}.tar.gz"
-checksum=528541eede06170aa16488b2c24abad2e527a12053a62a4a49d0eac3a41e21d3
+checksum=5e6174838e53b1d63852215b02bededcb9878d8fc7f375e3b33afd59121811fa
 
 system_accounts="_plocate"
 
 alternatives="
  locate:locate:/usr/bin/plocate
  locate:locate.1:/usr/share/man/man1/plocate.1
- locate:updatedb:/usr/bin/pupdatedb"
+ locate:updatedb:/usr/bin/pupdatedb
+ locate:updatedb.conf.5:/usr/share/man/man5/pupdatedb.conf.5"
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"
@@ -26,8 +33,6 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_install() {
-	# replace daily cronjob with our own version
-	rm ${DESTDIR}/etc/cron.daily/plocate
 	vinstall ${FILESDIR}/plocate.cron-daily 744 etc/cron.daily plocate-build
-	vbin ${FILESDIR}/pupdatedb
+	mv ${DESTDIR}/usr/share/man/man5/{,p}updatedb.conf.5
 }

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

* Re: [PR REVIEW] plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
  2021-01-17 20:44 ` plocate-1.1.3 leahneukirchen
  2021-01-17 20:57 ` [PR PATCH] [Updated] plocate-1.1.3 Duncaen
@ 2021-01-17 22:27 ` ericonr
  2021-01-17 23:08 ` Duncaen
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ericonr @ 2021-01-17 22:27 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#discussion_r559247765

Comment:
plocate doesn't try to use this from different TUs, does it? Otherwise it might have some weird results.

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

* Re: [PR REVIEW] plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (2 preceding siblings ...)
  2021-01-17 22:27 ` [PR REVIEW] plocate-1.1.3 ericonr
@ 2021-01-17 23:08 ` Duncaen
  2021-01-17 23:08 ` Duncaen
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-01-17 23:08 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#discussion_r559253142

Comment:
Yea it doesn't, but glibc does the same so this shouldn't be any worse.

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

* Re: [PR REVIEW] plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (3 preceding siblings ...)
  2021-01-17 23:08 ` Duncaen
@ 2021-01-17 23:08 ` Duncaen
  2021-01-17 23:12 ` ericonr
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-01-17 23:08 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#discussion_r559253142

Comment:
Yea it doesn't, glibc does the same so this shouldn't be any worse.

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

* Re: [PR REVIEW] plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (4 preceding siblings ...)
  2021-01-17 23:08 ` Duncaen
@ 2021-01-17 23:12 ` ericonr
  2021-01-17 23:22 ` Duncaen
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ericonr @ 2021-01-17 23:12 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#discussion_r559253652

Comment:
LGTM, then.

Do you think we could extend the warning in the header to mention that this can be a flawed workaround, depending on how upstream uses the functions?

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

* Re: [PR REVIEW] plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (5 preceding siblings ...)
  2021-01-17 23:12 ` ericonr
@ 2021-01-17 23:22 ` Duncaen
  2021-01-19 22:59 ` plocate-1.1.3 ericonr
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-01-17 23:22 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#discussion_r559254925

Comment:
hm yea not sure if its worth it, after looking at the actual implementation of this in glibc, its probably better to just patch the programs using it and get it upstreamed, there is no real value in `error.h`.
I was expecting there to be some localization stuff or similar.

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

* Re: plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (6 preceding siblings ...)
  2021-01-17 23:22 ` Duncaen
@ 2021-01-19 22:59 ` ericonr
  2021-01-19 23:52 ` plocate-1.1.3 Duncaen
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ericonr @ 2021-01-19 22:59 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#issuecomment-763197039

Comment:
Ping

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

* Re: plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (7 preceding siblings ...)
  2021-01-19 22:59 ` plocate-1.1.3 ericonr
@ 2021-01-19 23:52 ` Duncaen
  2021-02-02 11:13 ` plocate-1.1.3 leahneukirchen
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-01-19 23:52 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#issuecomment-763218855

Comment:
Can't decide what to do, either just merge it as is or try to rewrite and drop the extension of musl-legacy-compat.

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

* Re: plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (8 preceding siblings ...)
  2021-01-19 23:52 ` plocate-1.1.3 Duncaen
@ 2021-02-02 11:13 ` leahneukirchen
  2021-04-06 12:37 ` [PR PATCH] [Updated] plocate-1.1.3 Duncaen
  2021-06-13 20:08 ` [PR PATCH] [Closed]: plocate-1.1.3 Duncaen
  11 siblings, 0 replies; 13+ messages in thread
From: leahneukirchen @ 2021-02-02 11:13 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/27991#issuecomment-771561755

Comment:
:shipit: 

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

* Re: [PR PATCH] [Updated] plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (9 preceding siblings ...)
  2021-02-02 11:13 ` plocate-1.1.3 leahneukirchen
@ 2021-04-06 12:37 ` Duncaen
  2021-06-13 20:08 ` [PR PATCH] [Closed]: plocate-1.1.3 Duncaen
  11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-04-06 12:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Duncaen/void-packages plocate
https://github.com/void-linux/void-packages/pull/27991

plocate-1.1.3


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

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

From 701abe9721581fd9d9fcb8450dfa7ea57e518750 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Sun, 17 Jan 2021 21:26:59 +0100
Subject: [PATCH 1/2] musl-legacy-compat: update to 0.5.

Add `error_at_line(3)` to error.h
---
 srcpkgs/musl-legacy-compat/files/error.h | 27 ++++++++++++++++++++++++
 srcpkgs/musl-legacy-compat/template      |  4 ++--
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/musl-legacy-compat/files/error.h b/srcpkgs/musl-legacy-compat/files/error.h
index 835d0cb7f7df..9a4e1f8d0064 100644
--- a/srcpkgs/musl-legacy-compat/files/error.h
+++ b/srcpkgs/musl-legacy-compat/files/error.h
@@ -30,4 +30,31 @@ static inline void error(int status, int errnum, const char* format, ...)
 		exit(status);
 }
 
+static int error_one_per_line = 0;
+
+static inline void error_at_line(int status, int errnum, const char *filename,
+		unsigned int linenum, const char *format, ...)
+{
+	va_list ap;
+	if (error_one_per_line) {
+		static const char *old_filename;
+		static int old_linenum;
+		if (linenum == old_linenum && filename == old_filename)
+			return;
+		old_filename = filename;
+		old_linenum = linenum;
+	}
+	fprintf(stderr, "%s: %s:%u: ", program_invocation_name, filename, linenum);
+	va_start(ap, format);
+	vfprintf(stderr, format, ap);
+	va_end(ap);
+	if (errnum)
+		fprintf(stderr, ": %s", strerror(errnum));
+	fprintf(stderr, "\n");
+	error_message_count++;
+	if (status)
+		exit(status);
+}
+
+
 #endif	/* _ERROR_H_ */
diff --git a/srcpkgs/musl-legacy-compat/template b/srcpkgs/musl-legacy-compat/template
index a59d4e7683f0..f68bd9922512 100644
--- a/srcpkgs/musl-legacy-compat/template
+++ b/srcpkgs/musl-legacy-compat/template
@@ -1,7 +1,7 @@
 # Template file for 'musl-legacy-compat'
 pkgname=musl-legacy-compat
-version=0.4
-revision=2
+version=0.5
+revision=1
 archs="*-musl"
 bootstrap=yes
 short_desc="Legacy compatibility headers for the musl libc"

From 0cd0ea3c9d02384bd161b6789cbf271e80a893c9 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Sun, 17 Jan 2021 21:34:26 +0100
Subject: [PATCH 2/2] plocate: update to 1.1.6.

---
 srcpkgs/plocate/files/plocate.cron-daily |  6 ++----
 srcpkgs/plocate/files/pupdatedb          |  8 --------
 srcpkgs/plocate/patches/musl.patch       | 21 +++++++++++++++++++++
 srcpkgs/plocate/template                 | 19 ++++++++++++-------
 4 files changed, 35 insertions(+), 19 deletions(-)
 delete mode 100644 srcpkgs/plocate/files/pupdatedb
 create mode 100644 srcpkgs/plocate/patches/musl.patch

diff --git a/srcpkgs/plocate/files/plocate.cron-daily b/srcpkgs/plocate/files/plocate.cron-daily
index 099ba5ce69af..a616d55d2809 100644
--- a/srcpkgs/plocate/files/plocate.cron-daily
+++ b/srcpkgs/plocate/files/plocate.cron-daily
@@ -1,5 +1,3 @@
 #!/bin/sh
-set -e
-plocate-build /var/lib/mlocate/mlocate.db /var/lib/mlocate/plocate.db.new
-chgrp _plocate /var/lib/mlocate/plocate.db.new
-mv /var/lib/mlocate/plocate.db.new /var/lib/mlocate/plocate.db
+ulimit -n 131072
+exec pupdatedb
diff --git a/srcpkgs/plocate/files/pupdatedb b/srcpkgs/plocate/files/pupdatedb
deleted file mode 100644
index 08fdbd0748ab..000000000000
--- a/srcpkgs/plocate/files/pupdatedb
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# pupdatedb [database directory] - update a database for plocate
-set -e
-dbdir=${1:-${DBDIR:-/var/lib/mlocate}}
-mupdatedb -o "${dbdir}/mlocate.db"
-plocate-build "${dbdir}/mlocate.db" "${dbdir}/plocate.db.new"
-chgrp _plocate "${dbdir}/plocate.db.new"
-mv "${dbdir}/plocate.db.new" "${dbdir}/plocate.db"
diff --git a/srcpkgs/plocate/patches/musl.patch b/srcpkgs/plocate/patches/musl.patch
new file mode 100644
index 000000000000..c75020f99b30
--- /dev/null
+++ b/srcpkgs/plocate/patches/musl.patch
@@ -0,0 +1,21 @@
+--- conf.cpp
++++ conf.cpp
+@@ -479,7 +479,7 @@
+ 			if (conf_scan_root != NULL)
+ 				error(EXIT_FAILURE, 0, _("--%s specified twice"),
+ 				      "database-root");
+-			conf_scan_root = canonicalize_file_name(optarg);
++			conf_scan_root = realpath(optarg, NULL);
+ 			if (conf_scan_root == NULL)
+ 				error(EXIT_FAILURE, errno, _("invalid value `%s' of --%s"), optarg,
+ 				      "database-root");
+--- database-builder.h
++++ database-builder.h
+@@ -3,6 +3,7 @@
+ 
+ #include "db.h"
+ 
++#include <unistd.h>
+ #include <chrono>
+ #include <fcntl.h>
+ #include <memory>
diff --git a/srcpkgs/plocate/template b/srcpkgs/plocate/template
index 590edee47e82..dd0eb77f51b3 100644
--- a/srcpkgs/plocate/template
+++ b/srcpkgs/plocate/template
@@ -1,24 +1,31 @@
 # Template file for 'plocate'
 pkgname=plocate
-version=1.0.7
+version=1.1.6
 revision=1
 build_style=meson
+configure_args="
+ -Dupdatedb_progname=pupdatedb
+ -Dlocategroup=_plocate"
 hostmakedepends="pkg-config"
 makedepends="libzstd-devel"
-depends="mlocate"
 short_desc="Much faster locate based on posting lists"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://plocate.sesse.net/"
 distfiles="https://plocate.sesse.net/download/plocate-${version}.tar.gz"
-checksum=528541eede06170aa16488b2c24abad2e527a12053a62a4a49d0eac3a41e21d3
+checksum=bff5d80874639003ffba34a37778081ca0a75f89ea0ca3d1bee9309332bfdbd3
 
 system_accounts="_plocate"
 
 alternatives="
  locate:locate:/usr/bin/plocate
  locate:locate.1:/usr/share/man/man1/plocate.1
- locate:updatedb:/usr/bin/pupdatedb"
+ locate:updatedb:/usr/bin/pupdatedb
+ locate:updatedb.conf.5:/usr/share/man/man5/pupdatedb.conf.5"
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	makedepends+=" musl-legacy-compat"
+fi
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"
@@ -26,8 +33,6 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_install() {
-	# replace daily cronjob with our own version
-	rm ${DESTDIR}/etc/cron.daily/plocate
 	vinstall ${FILESDIR}/plocate.cron-daily 744 etc/cron.daily plocate-build
-	vbin ${FILESDIR}/pupdatedb
+	mv ${DESTDIR}/usr/share/man/man5/{,p}updatedb.conf.5
 }

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

* Re: [PR PATCH] [Closed]: plocate-1.1.3
  2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
                   ` (10 preceding siblings ...)
  2021-04-06 12:37 ` [PR PATCH] [Updated] plocate-1.1.3 Duncaen
@ 2021-06-13 20:08 ` Duncaen
  11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-06-13 20:08 UTC (permalink / raw)
  To: ml

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

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

plocate-1.1.3
https://github.com/void-linux/void-packages/pull/27991

Description:


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

end of thread, other threads:[~2021-06-13 20:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-17 20:37 [PR PATCH] plocate-1.1.3 Duncaen
2021-01-17 20:44 ` plocate-1.1.3 leahneukirchen
2021-01-17 20:57 ` [PR PATCH] [Updated] plocate-1.1.3 Duncaen
2021-01-17 22:27 ` [PR REVIEW] plocate-1.1.3 ericonr
2021-01-17 23:08 ` Duncaen
2021-01-17 23:08 ` Duncaen
2021-01-17 23:12 ` ericonr
2021-01-17 23:22 ` Duncaen
2021-01-19 22:59 ` plocate-1.1.3 ericonr
2021-01-19 23:52 ` plocate-1.1.3 Duncaen
2021-02-02 11:13 ` plocate-1.1.3 leahneukirchen
2021-04-06 12:37 ` [PR PATCH] [Updated] plocate-1.1.3 Duncaen
2021-06-13 20:08 ` [PR PATCH] [Closed]: plocate-1.1.3 Duncaen

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