Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] man-db: add system account man:man
@ 2019-10-23 13:43 voidlinux-github
  2019-10-31  1:13 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: voidlinux-github @ 2019-10-23 13:43 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages man-db
https://github.com/void-linux/void-packages/pull/15737

man-db: add system account man:man
man-db complains that:
> mandb: the setuid man user "man" does not exist

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

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

From 109d518cb3276d53bde2ab75a117cf6f2c2b40bf Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 23 Oct 2019 08:18:33 +0700
Subject: [PATCH] man-db: add system account man:man

man-db complains that:
> mandb: the setuid man user "man" does not exist
---
 srcpkgs/man-db/files/man-db.cron-daily | 1 +
 srcpkgs/man-db/template                | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/man-db/files/man-db.cron-daily b/srcpkgs/man-db/files/man-db.cron-daily
index 6953b76560f..ed5c2342a09 100755
--- a/srcpkgs/man-db/files/man-db.cron-daily
+++ b/srcpkgs/man-db/files/man-db.cron-daily
@@ -7,6 +7,7 @@ set -e
 if ! [ -d /var/cache/man ]; then
     # Recover from deletion, per FHS.
     mkdir -p /var/cache/man
+    chown man:man /var/cache/man
     chmod 755 /var/cache/man
 fi
 
diff --git a/srcpkgs/man-db/template b/srcpkgs/man-db/template
index b6cf1489eca..cbd5e6c2d99 100644
--- a/srcpkgs/man-db/template
+++ b/srcpkgs/man-db/template
@@ -1,7 +1,7 @@
 # Template file for 'man-db'
 pkgname=man-db
 version=2.8.7
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--with-db=db --with-pager=less --with-gzip=/usr/bin/gzip
  --with-bzip2=/usr/bin/bzip2 --disable-rpath --enable-threads=posix
@@ -21,6 +21,9 @@ distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=b9cd5bb996305d08bfe9e1114edc30b4c97be807093b88af8033ed1cf9beb326
 provides="man-0_1"
 lib32disabled=yes
+system_accounts="man"
+man_homedir="/var/cache/man"
+make_dirs="/var/cache/man 0755 man man"
 
 alternatives="
  man:man:/usr/bin/mandb-man

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

* Re: [PR PATCH] [Updated] man-db: add system account man:man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
@ 2019-10-31  1:13 ` voidlinux-github
  2019-10-31  1:13 ` voidlinux-github
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-10-31  1:13 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages man-db
https://github.com/void-linux/void-packages/pull/15737

man-db: add system account man:man
man-db complains that:
> mandb: the setuid man user "man" does not exist

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

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

From 72f7df6d3d480faea4d2e0b3284542fd66b19d5d Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 23 Oct 2019 08:18:33 +0700
Subject: [PATCH] man-db: add system account man:man

man-db complains that:
> mandb: the setuid man user "man" does not exist
---
 srcpkgs/man-db/files/man-db.cron-daily | 1 +
 srcpkgs/man-db/template                | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/man-db/files/man-db.cron-daily b/srcpkgs/man-db/files/man-db.cron-daily
index 6953b76560f..ed5c2342a09 100755
--- a/srcpkgs/man-db/files/man-db.cron-daily
+++ b/srcpkgs/man-db/files/man-db.cron-daily
@@ -7,6 +7,7 @@ set -e
 if ! [ -d /var/cache/man ]; then
     # Recover from deletion, per FHS.
     mkdir -p /var/cache/man
+    chown man:man /var/cache/man
     chmod 755 /var/cache/man
 fi
 
diff --git a/srcpkgs/man-db/template b/srcpkgs/man-db/template
index dfc483c3ea8..84b4a0c28d4 100644
--- a/srcpkgs/man-db/template
+++ b/srcpkgs/man-db/template
@@ -1,7 +1,7 @@
 # Template file for 'man-db'
 pkgname=man-db
 version=2.9.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-db=db --with-pager=less --with-gzip=/usr/bin/gzip
  --with-bzip2=/usr/bin/bzip2 --disable-rpath --enable-threads=posix
@@ -21,6 +21,9 @@ distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=5d4aacd9e8876d6a3203a889860c3524c293c38f04111a3350deab8a6cd3e261
 provides="man-0_1"
 lib32disabled=yes
+system_accounts="man"
+man_homedir="/var/cache/man"
+make_dirs="/var/cache/man 0755 man man"
 
 alternatives="
  man:man:/usr/bin/mandb-man

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

* Re: [PR PATCH] [Updated] man-db: add system account man:man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
  2019-10-31  1:13 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-10-31  1:13 ` voidlinux-github
  2019-10-31 14:14 ` voidlinux-github
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-10-31  1:13 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages man-db
https://github.com/void-linux/void-packages/pull/15737

man-db: add system account man:man
man-db complains that:
> mandb: the setuid man user "man" does not exist

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

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

From 72f7df6d3d480faea4d2e0b3284542fd66b19d5d Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 23 Oct 2019 08:18:33 +0700
Subject: [PATCH] man-db: add system account man:man

man-db complains that:
> mandb: the setuid man user "man" does not exist
---
 srcpkgs/man-db/files/man-db.cron-daily | 1 +
 srcpkgs/man-db/template                | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/man-db/files/man-db.cron-daily b/srcpkgs/man-db/files/man-db.cron-daily
index 6953b76560f..ed5c2342a09 100755
--- a/srcpkgs/man-db/files/man-db.cron-daily
+++ b/srcpkgs/man-db/files/man-db.cron-daily
@@ -7,6 +7,7 @@ set -e
 if ! [ -d /var/cache/man ]; then
     # Recover from deletion, per FHS.
     mkdir -p /var/cache/man
+    chown man:man /var/cache/man
     chmod 755 /var/cache/man
 fi
 
diff --git a/srcpkgs/man-db/template b/srcpkgs/man-db/template
index dfc483c3ea8..84b4a0c28d4 100644
--- a/srcpkgs/man-db/template
+++ b/srcpkgs/man-db/template
@@ -1,7 +1,7 @@
 # Template file for 'man-db'
 pkgname=man-db
 version=2.9.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-db=db --with-pager=less --with-gzip=/usr/bin/gzip
  --with-bzip2=/usr/bin/bzip2 --disable-rpath --enable-threads=posix
@@ -21,6 +21,9 @@ distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=5d4aacd9e8876d6a3203a889860c3524c293c38f04111a3350deab8a6cd3e261
 provides="man-0_1"
 lib32disabled=yes
+system_accounts="man"
+man_homedir="/var/cache/man"
+make_dirs="/var/cache/man 0755 man man"
 
 alternatives="
  man:man:/usr/bin/mandb-man

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

* Re: man-db: add system account man:man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
  2019-10-31  1:13 ` [PR PATCH] [Updated] " voidlinux-github
  2019-10-31  1:13 ` voidlinux-github
@ 2019-10-31 14:14 ` voidlinux-github
  2019-11-01  0:43 ` voidlinux-github
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-10-31 14:14 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/15737#issuecomment-548395405

Comment:
Hm can we use `_man` instead to avoid clashes with user accounts.

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

* Re: man-db: add system account man:man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
                   ` (2 preceding siblings ...)
  2019-10-31 14:14 ` voidlinux-github
@ 2019-11-01  0:43 ` voidlinux-github
  2019-11-01  0:45 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-11-01  0:43 UTC (permalink / raw)
  To: ml

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

New comment by zdtcd on void-packages repository

https://github.com/void-linux/void-packages/pull/15737#issuecomment-548623371

Comment:
On 2019-10-31 07:14:21 -0700, Duncan Overbruck wrote:
> Hm can we use `_man` instead to avoid clashes with user accounts.

Let's me dig into man-db's source.

-- digging --

Looks like we can, updated patch is comming.

Anyway, man-db uses an extension of glibc's iconv.
Thus, it warns this on musl-libc:

> mandb: iconv_open ("UTF-8//IGNORE", "us-ascii"): Invalid argument

Is it worth to patch man-db ourself to remove `//IGNORE` on musl?

-- 
Danh


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

* Re: [PR PATCH] [Updated] man-db: add system account man:man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
                   ` (3 preceding siblings ...)
  2019-11-01  0:43 ` voidlinux-github
@ 2019-11-01  0:45 ` voidlinux-github
  2019-11-01  0:45 ` voidlinux-github
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-11-01  0:45 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages man-db
https://github.com/void-linux/void-packages/pull/15737

man-db: add system account man:man
man-db complains that:
> mandb: the setuid man user "man" does not exist

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

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

From 17c377b210c7a40d6dd7715232fb0702bd466800 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 23 Oct 2019 08:18:33 +0700
Subject: [PATCH] man-db: add system account _man:_man

man-db complains that:
> mandb: the setuid man user "man" does not exist
---
 srcpkgs/man-db/files/man-db.cron-daily | 9 ++++-----
 srcpkgs/man-db/template                | 8 ++++++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/man-db/files/man-db.cron-daily b/srcpkgs/man-db/files/man-db.cron-daily
index 6953b76560f..a602972b400 100755
--- a/srcpkgs/man-db/files/man-db.cron-daily
+++ b/srcpkgs/man-db/files/man-db.cron-daily
@@ -4,11 +4,10 @@
 # man-db cron daily
 set -e
 
-if ! [ -d /var/cache/man ]; then
-    # Recover from deletion, per FHS.
-    mkdir -p /var/cache/man
-    chmod 755 /var/cache/man
-fi
+# Recover from deletion, per FHS.
+mkdir -p /var/cache/man
+chown _man:_man /var/cache/man
+chmod 755 /var/cache/man
 
 # regenerate man database
 /usr/bin/mandb --quiet
diff --git a/srcpkgs/man-db/template b/srcpkgs/man-db/template
index dfc483c3ea8..17202241ba6 100644
--- a/srcpkgs/man-db/template
+++ b/srcpkgs/man-db/template
@@ -1,13 +1,14 @@
 # Template file for 'man-db'
 pkgname=man-db
 version=2.9.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-db=db --with-pager=less --with-gzip=/usr/bin/gzip
  --with-bzip2=/usr/bin/bzip2 --disable-rpath --enable-threads=posix
  --with-lzma=/usr/bin/lzma --with-xz=/usr/bin/xz --disable-setuid
  --without-included-regex --enable-automatic-create --with-libseccomp
- --without-systemdsystemunitdir --without-systemdtmpfilesdir"
+ --without-systemdsystemunitdir --without-systemdtmpfilesdir
+ --enable-cache-owner=_man"
 hostmakedepends="groff pkg-config"
 makedepends="db-devel gettext-devel groff libpipeline-devel libseccomp-devel
  zlib-devel"
@@ -21,6 +22,9 @@ distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=5d4aacd9e8876d6a3203a889860c3524c293c38f04111a3350deab8a6cd3e261
 provides="man-0_1"
 lib32disabled=yes
+system_accounts="_man"
+man_homedir="/var/cache/man"
+make_dirs="/var/cache/man 0755 _man _man"
 
 alternatives="
  man:man:/usr/bin/mandb-man

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

* Re: [PR PATCH] [Updated] man-db: add system account man:man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
                   ` (4 preceding siblings ...)
  2019-11-01  0:45 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-11-01  0:45 ` voidlinux-github
  2019-11-01  0:49 ` voidlinux-github
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-11-01  0:45 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages man-db
https://github.com/void-linux/void-packages/pull/15737

man-db: add system account man:man
man-db complains that:
> mandb: the setuid man user "man" does not exist

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

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

From 17c377b210c7a40d6dd7715232fb0702bd466800 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 23 Oct 2019 08:18:33 +0700
Subject: [PATCH] man-db: add system account _man:_man

man-db complains that:
> mandb: the setuid man user "man" does not exist
---
 srcpkgs/man-db/files/man-db.cron-daily | 9 ++++-----
 srcpkgs/man-db/template                | 8 ++++++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/man-db/files/man-db.cron-daily b/srcpkgs/man-db/files/man-db.cron-daily
index 6953b76560f..a602972b400 100755
--- a/srcpkgs/man-db/files/man-db.cron-daily
+++ b/srcpkgs/man-db/files/man-db.cron-daily
@@ -4,11 +4,10 @@
 # man-db cron daily
 set -e
 
-if ! [ -d /var/cache/man ]; then
-    # Recover from deletion, per FHS.
-    mkdir -p /var/cache/man
-    chmod 755 /var/cache/man
-fi
+# Recover from deletion, per FHS.
+mkdir -p /var/cache/man
+chown _man:_man /var/cache/man
+chmod 755 /var/cache/man
 
 # regenerate man database
 /usr/bin/mandb --quiet
diff --git a/srcpkgs/man-db/template b/srcpkgs/man-db/template
index dfc483c3ea8..17202241ba6 100644
--- a/srcpkgs/man-db/template
+++ b/srcpkgs/man-db/template
@@ -1,13 +1,14 @@
 # Template file for 'man-db'
 pkgname=man-db
 version=2.9.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-db=db --with-pager=less --with-gzip=/usr/bin/gzip
  --with-bzip2=/usr/bin/bzip2 --disable-rpath --enable-threads=posix
  --with-lzma=/usr/bin/lzma --with-xz=/usr/bin/xz --disable-setuid
  --without-included-regex --enable-automatic-create --with-libseccomp
- --without-systemdsystemunitdir --without-systemdtmpfilesdir"
+ --without-systemdsystemunitdir --without-systemdtmpfilesdir
+ --enable-cache-owner=_man"
 hostmakedepends="groff pkg-config"
 makedepends="db-devel gettext-devel groff libpipeline-devel libseccomp-devel
  zlib-devel"
@@ -21,6 +22,9 @@ distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=5d4aacd9e8876d6a3203a889860c3524c293c38f04111a3350deab8a6cd3e261
 provides="man-0_1"
 lib32disabled=yes
+system_accounts="_man"
+man_homedir="/var/cache/man"
+make_dirs="/var/cache/man 0755 _man _man"
 
 alternatives="
  man:man:/usr/bin/mandb-man

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

* Re: man-db: add system account man:man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
                   ` (5 preceding siblings ...)
  2019-11-01  0:45 ` voidlinux-github
@ 2019-11-01  0:49 ` voidlinux-github
  2019-11-10 10:08 ` [PR PATCH] [Updated] " voidlinux-github
  2019-11-11  2:37 ` [PR PATCH] [Updated] [NO MERGE] man-db: add system account _man:_man voidlinux-github
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-11-01  0:49 UTC (permalink / raw)
  To: ml

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

New comment by zdtcd on void-packages repository

https://github.com/void-linux/void-packages/pull/15737#issuecomment-548624243

Comment:
On 2019-11-01 07:43:49 +0700, Danh Doan wrote:
> Anyway, man-db uses an extension of glibc's iconv.
> Thus, it warns this on musl-libc:
> 
> > mandb: iconv_open ("UTF-8//IGNORE", "us-ascii"): Invalid argument
> 
> Is it worth to patch man-db ourself to remove `//IGNORE` on musl?

FWIW, this warning is printed out the man-db cronjob.
It'll be annoying to see syslog flooded with this useless message.

-- 
Danh


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

* Re: [PR PATCH] [Updated] man-db: add system account man:man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
                   ` (6 preceding siblings ...)
  2019-11-01  0:49 ` voidlinux-github
@ 2019-11-10 10:08 ` voidlinux-github
  2019-11-11  2:37 ` [PR PATCH] [Updated] [NO MERGE] man-db: add system account _man:_man voidlinux-github
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-11-10 10:08 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages man-db
https://github.com/void-linux/void-packages/pull/15737

man-db: add system account man:man
man-db complains that:
> mandb: the setuid man user "man" does not exist

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

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

From 964fca9361d7848c381ed6ef88dccc133ce748b2 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 23 Oct 2019 08:18:33 +0700
Subject: [PATCH] man-db: add system account _man:_man

man-db complains that:
> mandb: the setuid man user "man" does not exist

While we're at it, patch man-db to not use glibc iconv's extension on
musl.
---
 srcpkgs/man-db/files/man-db.cron-daily        |  9 +++--
 .../files/remove-glibc-ext-warning.patch      | 35 +++++++++++++++++++
 srcpkgs/man-db/template                       | 26 +++++++++++---
 3 files changed, 60 insertions(+), 10 deletions(-)
 create mode 100644 srcpkgs/man-db/files/remove-glibc-ext-warning.patch

diff --git a/srcpkgs/man-db/files/man-db.cron-daily b/srcpkgs/man-db/files/man-db.cron-daily
index 6953b76560f..a602972b400 100755
--- a/srcpkgs/man-db/files/man-db.cron-daily
+++ b/srcpkgs/man-db/files/man-db.cron-daily
@@ -4,11 +4,10 @@
 # man-db cron daily
 set -e
 
-if ! [ -d /var/cache/man ]; then
-    # Recover from deletion, per FHS.
-    mkdir -p /var/cache/man
-    chmod 755 /var/cache/man
-fi
+# Recover from deletion, per FHS.
+mkdir -p /var/cache/man
+chown _man:_man /var/cache/man
+chmod 755 /var/cache/man
 
 # regenerate man database
 /usr/bin/mandb --quiet
diff --git a/srcpkgs/man-db/files/remove-glibc-ext-warning.patch b/srcpkgs/man-db/files/remove-glibc-ext-warning.patch
new file mode 100644
index 00000000000..18554f46ad7
--- /dev/null
+++ b/srcpkgs/man-db/files/remove-glibc-ext-warning.patch
@@ -0,0 +1,35 @@
+--- src/manconv.c.orig	2019-11-10 16:36:13.200848820 +0700
++++ src/manconv.c	2019-11-10 16:37:04.485337036 +0700
+@@ -111,7 +111,7 @@
+ 	iconv_t cd_utf8, cd = NULL;
+ 	bool to_utf8 = STREQ (try_to_code, "UTF-8") ||
+ 		       STRNEQ (try_to_code, "UTF-8//", 7);
+-	const char *utf8_target = last ? "UTF-8//IGNORE" : "UTF-8";
++	const char *utf8_target = "UTF-8";
+ 	bool ignore_errors = (strstr (try_to_code, "//IGNORE") != NULL);
+ 	int ret = 0;
+ 
+--- src/manconv_client.c.orig	2019-11-10 16:36:08.313802312 +0700
++++ src/manconv_client.c	2019-11-10 16:36:49.110190675 +0700
+@@ -102,7 +102,7 @@
+ 		gl_list_add_last (codes->from, xstrdup (source));
+ 		name = appendstr (name, "UTF-8:", source, (void *) 0);
+ 	}
+-	codes->to = xasprintf ("%s//IGNORE", target);
++	codes->to = xasprintf ("%s", target);
+ 	/* informational only; no shell quoting concerns */
+ 	name = appendstr (name, " -t ", codes->to, (void *) 0);
+ 	if (quiet >= 2)
+--- src/whatis.c.orig	2019-11-10 16:36:19.087904848 +0700
++++ src/whatis.c	2019-11-10 16:36:38.981094210 +0700
+@@ -945,9 +945,7 @@
+ 	display_seen = new_string_set (GL_HASH_SET);
+ 
+ #ifdef HAVE_ICONV
+-	locale_charset = xasprintf ("%s//IGNORE", get_locale_charset ());
+-	conv_to_locale = iconv_open (locale_charset, "UTF-8");
+-	free (locale_charset);
++	conv_to_locale = iconv_open (get_locale_charset(), "UTF-8");
+ #endif /* HAVE_ICONV */
+ 
+ 	if (regex_opt) {
diff --git a/srcpkgs/man-db/template b/srcpkgs/man-db/template
index dfc483c3ea8..39edca48582 100644
--- a/srcpkgs/man-db/template
+++ b/srcpkgs/man-db/template
@@ -1,13 +1,14 @@
 # Template file for 'man-db'
 pkgname=man-db
 version=2.9.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-db=db --with-pager=less --with-gzip=/usr/bin/gzip
  --with-bzip2=/usr/bin/bzip2 --disable-rpath --enable-threads=posix
  --with-lzma=/usr/bin/lzma --with-xz=/usr/bin/xz --disable-setuid
  --without-included-regex --enable-automatic-create --with-libseccomp
- --without-systemdsystemunitdir --without-systemdtmpfilesdir"
+ --without-systemdsystemunitdir --without-systemdtmpfilesdir
+ --enable-cache-owner=_man"
 hostmakedepends="groff pkg-config"
 makedepends="db-devel gettext-devel groff libpipeline-devel libseccomp-devel
  zlib-devel"
@@ -21,6 +22,9 @@ distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=5d4aacd9e8876d6a3203a889860c3524c293c38f04111a3350deab8a6cd3e261
 provides="man-0_1"
 lib32disabled=yes
+system_accounts="_man"
+_man_homedir="/var/cache/man"
+make_dirs="/var/cache/man 0755 _man _man"
 
 alternatives="
  man:man:/usr/bin/mandb-man
@@ -30,10 +34,22 @@ alternatives="
  man:whatis.1:/usr/share/man/man1/mandb-whatis.1
  man:apropos.1:/usr/share/man/man1/mandb-apropos.1"
 
-pre_configure() {
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/gettext"
+		LDFLAGS+=" -lintl";;
+esac
+
+# man-db uses glibc iconv's //IGNORE and //TRANSLIT extension
+# musl doesn't provide this one.
+# Patch it out to remove runtime warning:
+#     unknown encoding: UTF-8//IGNORE
+post_patch() {
 	case "$XBPS_TARGET_MACHINE" in
-		*-musl) CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/gettext"
-			LDFLAGS+=" -lintl";;
+		*-musl)
+			musl_patch="remove-glibc-ext-warning.patch"
+			msg_normal "$pkgver: patching: $musl_patch.\n"
+			patch -sl -Np0 -i "$FILESDIR/$musl_patch" 2>/dev/null
+			;;
 	esac
 }
 

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

* Re: [PR PATCH] [Updated] [NO MERGE] man-db: add system account _man:_man
  2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
                   ` (7 preceding siblings ...)
  2019-11-10 10:08 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-11-11  2:37 ` voidlinux-github
  8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-11-11  2:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/zdtcd/void-packages man-db
https://github.com/void-linux/void-packages/pull/15737

[NO MERGE] man-db: add system account _man:_man
man-db complains that:
> mandb: the setuid man user "man" does not exist

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

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

From 2077dab43c7b98e0f3a85f582404f767d12f9db2 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 23 Oct 2019 08:18:33 +0700
Subject: [PATCH] man-db: add system account _man:_man

man-db complains that:
> mandb: the setuid man user "man" does not exist

While we're at it, patch man-db to not use glibc iconv's extension on
musl.
---
 srcpkgs/man-db/files/man-db.cron-daily        |  9 ++-
 .../patches/guard-glibc-iconv-ext.patch       | 59 +++++++++++++++++++
 srcpkgs/man-db/template                       | 18 +++---
 3 files changed, 73 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/man-db/patches/guard-glibc-iconv-ext.patch

diff --git a/srcpkgs/man-db/files/man-db.cron-daily b/srcpkgs/man-db/files/man-db.cron-daily
index 6953b76560f..a602972b400 100755
--- a/srcpkgs/man-db/files/man-db.cron-daily
+++ b/srcpkgs/man-db/files/man-db.cron-daily
@@ -4,11 +4,10 @@
 # man-db cron daily
 set -e
 
-if ! [ -d /var/cache/man ]; then
-    # Recover from deletion, per FHS.
-    mkdir -p /var/cache/man
-    chmod 755 /var/cache/man
-fi
+# Recover from deletion, per FHS.
+mkdir -p /var/cache/man
+chown _man:_man /var/cache/man
+chmod 755 /var/cache/man
 
 # regenerate man database
 /usr/bin/mandb --quiet
diff --git a/srcpkgs/man-db/patches/guard-glibc-iconv-ext.patch b/srcpkgs/man-db/patches/guard-glibc-iconv-ext.patch
new file mode 100644
index 00000000000..bbf7b26ff11
--- /dev/null
+++ b/srcpkgs/man-db/patches/guard-glibc-iconv-ext.patch
@@ -0,0 +1,59 @@
+ src/manconv.c        | 7 ++++++-
+ src/manconv_client.c | 4 ++++
+ src/whatis.c         | 4 ++++
+ 3 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git src/manconv.c src/manconv.c
+index b9ac8d3a..8f5bdaee 100644
+--- src/manconv.c
++++ src/manconv.c
+@@ -111,9 +111,14 @@ static int try_iconv (pipeline *p, const char *try_from_code, const char *to,
+ 	iconv_t cd_utf8, cd = NULL;
+ 	bool to_utf8 = STREQ (try_to_code, "UTF-8") ||
+ 		       STRNEQ (try_to_code, "UTF-8//", 7);
+-	const char *utf8_target = last ? "UTF-8//IGNORE" : "UTF-8";
+ 	bool ignore_errors = (strstr (try_to_code, "//IGNORE") != NULL);
+ 	int ret = 0;
++#ifdef __GLIBC__
++	const char *utf8_target = last ? "UTF-8//IGNORE" : "UTF-8";
++#else /* __GLIBC__ */
++	const char *utf8_target = "UTF-8";
++	last = false;
++#endif /* ! __GLIBC__ */
+ 
+ 	debug ("trying encoding %s -> %s\n", try_from_code, try_to_code);
+ 
+diff --git src/manconv_client.c src/manconv_client.c
+index 0c41bec6..2a7f1398 100644
+--- src/manconv_client.c
++++ src/manconv_client.c
+@@ -102,7 +102,11 @@ void add_manconv (pipeline *p, const char *source, const char *target)
+ 		gl_list_add_last (codes->from, xstrdup (source));
+ 		name = appendstr (name, "UTF-8:", source, (void *) 0);
+ 	}
++#ifdef __GLIBC__
+ 	codes->to = xasprintf ("%s//IGNORE", target);
++#else /* __GLIBC__ */
++	codes->to = xasprintf ("%s", target);
++#endif /* ! __GLIBC__ */
+ 	/* informational only; no shell quoting concerns */
+ 	name = appendstr (name, " -t ", codes->to, (void *) 0);
+ 	if (quiet >= 2)
+diff --git src/whatis.c src/whatis.c
+index d2559169..ec80c117 100644
+--- src/whatis.c
++++ src/whatis.c
+@@ -945,9 +945,13 @@ int main (int argc, char *argv[])
+ 	display_seen = new_string_set (GL_HASH_SET);
+ 
+ #ifdef HAVE_ICONV
++#ifdef __GLIBC__
+ 	locale_charset = xasprintf ("%s//IGNORE", get_locale_charset ());
+ 	conv_to_locale = iconv_open (locale_charset, "UTF-8");
+ 	free (locale_charset);
++#else /* __GLIBC__ */
++	conv_to_locale = iconv_open(get_locale_charset (), "UTF-8");
++#endif /* ! __GLIBC__ */
+ #endif /* HAVE_ICONV */
+ 
+ 	if (regex_opt) {
diff --git a/srcpkgs/man-db/template b/srcpkgs/man-db/template
index dfc483c3ea8..c5071c0c6ec 100644
--- a/srcpkgs/man-db/template
+++ b/srcpkgs/man-db/template
@@ -1,13 +1,14 @@
 # Template file for 'man-db'
 pkgname=man-db
 version=2.9.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-db=db --with-pager=less --with-gzip=/usr/bin/gzip
  --with-bzip2=/usr/bin/bzip2 --disable-rpath --enable-threads=posix
  --with-lzma=/usr/bin/lzma --with-xz=/usr/bin/xz --disable-setuid
  --without-included-regex --enable-automatic-create --with-libseccomp
- --without-systemdsystemunitdir --without-systemdtmpfilesdir"
+ --without-systemdsystemunitdir --without-systemdtmpfilesdir
+ --enable-cache-owner=_man"
 hostmakedepends="groff pkg-config"
 makedepends="db-devel gettext-devel groff libpipeline-devel libseccomp-devel
  zlib-devel"
@@ -21,6 +22,9 @@ distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
 checksum=5d4aacd9e8876d6a3203a889860c3524c293c38f04111a3350deab8a6cd3e261
 provides="man-0_1"
 lib32disabled=yes
+system_accounts="_man"
+_man_homedir="/var/cache/man"
+make_dirs="/var/cache/man 0755 _man _man"
 
 alternatives="
  man:man:/usr/bin/mandb-man
@@ -30,12 +34,10 @@ alternatives="
  man:whatis.1:/usr/share/man/man1/mandb-whatis.1
  man:apropos.1:/usr/share/man/man1/mandb-apropos.1"
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/gettext"
-			LDFLAGS+=" -lintl";;
-	esac
-}
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/gettext"
+		LDFLAGS+=" -lintl";;
+esac
 
 post_install() {
 	# Rename files for alternatives

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

end of thread, other threads:[~2019-11-11  2:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 13:43 [PR PATCH] man-db: add system account man:man voidlinux-github
2019-10-31  1:13 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-31  1:13 ` voidlinux-github
2019-10-31 14:14 ` voidlinux-github
2019-11-01  0:43 ` voidlinux-github
2019-11-01  0:45 ` [PR PATCH] [Updated] " voidlinux-github
2019-11-01  0:45 ` voidlinux-github
2019-11-01  0:49 ` voidlinux-github
2019-11-10 10:08 ` [PR PATCH] [Updated] " voidlinux-github
2019-11-11  2:37 ` [PR PATCH] [Updated] [NO MERGE] man-db: add system account _man:_man voidlinux-github

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