]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
2 years agotests: fix update special mount test output
Karel Zak [Mon, 19 Jun 2023 12:56:30 +0000 (14:56 +0200)] 
tests: fix update special mount test output

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agotests: backport special mount script
Karel Zak [Mon, 19 Jun 2023 12:36:59 +0000 (14:36 +0200)] 
tests: backport special mount script

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: always ignore user=<name>
Karel Zak [Mon, 19 Jun 2023 11:29:42 +0000 (13:29 +0200)] 
libmount: always ignore user=<name>

The library (on mount) cares about "user", but has to ignore
"user=name". It works as expected, but only for non-root users. We
need to ignore it also root to be compatible with /sbin/mount.cifs
where some people still use "user=" (rather than "username=").

References: fe0b1e793c9017edba72768e2e0b4c769c204604
Addresses: https://github.com/util-linux/util-linux/issues/2315
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge pull request #2319 from t-8ch/2.39/_NL_TIME_WEEK_1STDAY
Karel Zak [Mon, 19 Jun 2023 09:12:55 +0000 (11:12 +0200)] 
Merge pull request #2319 from t-8ch/2.39/_NL_TIME_WEEK_1STDAY

2.39: meson: check for _NL_TIME_WEEK_1STDAY in langinfo.h

2 years agomeson: check for _NL_TIME_WEEK_1STDAY in langinfo.h
Christian Hesse [Fri, 16 Jun 2023 09:52:10 +0000 (11:52 +0200)] 
meson: check for _NL_TIME_WEEK_1STDAY in langinfo.h

... which is required for `cal`.

Fixes GH-2316

2 years agomeson: conditionalize waitpid
Zbigniew Jędrzejewski-Szmek [Tue, 13 Jun 2023 08:15:39 +0000 (10:15 +0200)] 
meson: conditionalize waitpid

I *think* this mirros what configure.ac does, except that the configuration
option is not implemented.

(cherry picked from commit 334939a19d72febc0ce6f2913a9692123db79058)

2 years agomeson: add conditionalization for test progs
Zbigniew Jędrzejewski-Szmek [Tue, 13 Jun 2023 08:01:52 +0000 (10:01 +0200)] 
meson: add conditionalization for test progs

This just mirrors what the autotools setup is doing.

(cherry picked from commit d6418774aba595c44fa6c68dd2da55cb6f7642dd)

2 years agomeson: implement HAVE_PTY
Zbigniew Jędrzejewski-Szmek [Tue, 13 Jun 2023 07:55:22 +0000 (09:55 +0200)] 
meson: implement HAVE_PTY

This conditional was never implemented in the meson config. Under
autotools, it is guarded by availability of headers and an option. I
didn't implement the option here.

Fixes #2310.

'!= false' is used because 'x == 1' is rejected by meson if 'x' is
false. OTOH, 'x != false' seems to work if 'x' is 1.

(cherry picked from commit 444753601c4c367ca395359ea74fe5c7b86ce56d)

2 years agomeson: install write setgid
Christian Hesse [Fri, 9 Jun 2023 13:04:00 +0000 (15:04 +0200)] 
meson: install write setgid

... as this requires elevated privileges.

(cherry picked from commit cee78467bea45f7a4f890f0c65bd59441bd42697)

2 years agomeson: install wall setgid
Christian Hesse [Fri, 9 Jun 2023 13:02:57 +0000 (15:02 +0200)] 
meson: install wall setgid

... as this requires elevated privileges.

(cherry picked from commit 07641fd93c4829696c1e2101642fee32ad998025)

2 years agomeson: install umount setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install umount setuid

... as this requires elevated privileges.

(cherry picked from commit 1cb3c90ca5de6ffb43f8a40605118a8d84a0c6f3)

2 years agomeson: install mount setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install mount setuid

... as this requires elevated privileges.

(cherry picked from commit 8f49b3693d6f1db36d5ecb7328965686362deaa3)

2 years agomeson: install newgrp setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install newgrp setuid

... as this requires elevated privileges.

(cherry picked from commit cb3dee5a14da552a935680584d2fc5c37cb3a913)

2 years agomeson: install su setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install su setuid

... as this requires elevated privileges.

(cherry picked from commit fb8c224eae4e28502e05770d35c8e3b8509a9b69)

2 years agomeson: install chsh setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install chsh setuid

... as this requires elevated privileges.

(cherry picked from commit a13574b1de21d7fd9a0ad63790a7452c369e46e5)

2 years agomeson: install chfn setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install chfn setuid

... as this requires elevated privileges.

(cherry picked from commit 60d457f52991e6f6472171035974ce7a3ae621f3)

2 years agolibmount: introduce LIBMOUNT_FORCE_MOUNT2={always,never,auto}
Karel Zak [Mon, 5 Jun 2023 11:21:11 +0000 (13:21 +0200)] 
libmount: introduce LIBMOUNT_FORCE_MOUNT2={always,never,auto}

Let's introduce a stable workaround for use cases where new kernel API
is not ready to use.

The patch does not use "goto enosys" to exit as nothing in the hookset
is initialized yet.

Addresses: https://github.com/util-linux/util-linux/issues/1992
Addresses: https://github.com/util-linux/util-linux/issues/2283
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch '2.39/libmount/loop-rw' of https://github.com/t-8ch/util-linux into...
Karel Zak [Mon, 12 Jun 2023 10:22:55 +0000 (12:22 +0200)] 
Merge branch '2.39/libmount/loop-rw' of https://github.com/t-8ch/util-linux into stable/v2.39

* '2.39/libmount/loop-rw' of https://github.com/t-8ch/util-linux:
  libmount: (optlist) correctly detect ro status

2 years agolibmount: (optlist) correctly detect ro status
Thomas Weißschuh [Sun, 11 Jun 2023 09:49:54 +0000 (11:49 +0200)] 
libmount: (optlist) correctly detect ro status

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotests: backport mount_setattr test
Karel Zak [Mon, 5 Jun 2023 10:48:34 +0000 (12:48 +0200)] 
tests: backport mount_setattr test

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibblkid: jfs - avoid undefined shift
Milan Broz [Sun, 4 Jun 2023 17:15:55 +0000 (19:15 +0200)] 
libblkid: jfs - avoid undefined shift

Fix previous commit 04a0717b0b0faa1a8078dc6fad05183b8bada395
to avoid undefined shift if value is exactly 32.

  libblkid/src/superblocks/jfs.c:46:39: runtime error:
  shift exponent 32 is too large for 32-bit type 'unsigned int'

Reproducer found with OSS-Fuzz (issue 59284) running over
cryptsetup project (blkid is used in header init).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
2 years agobuild-sys: fix typo in waitpid check
Thomas Weißschuh [Wed, 31 May 2023 14:11:09 +0000 (16:11 +0200)] 
build-sys: fix typo in waitpid check

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoUpdate fsck.8.adoc
Hennie Botha [Wed, 31 May 2023 06:45:25 +0000 (08:45 +0200)] 
Update fsck.8.adoc

Typo

2 years agodmesg: make kmsg read() buffer big enough for kernel
anteater [Mon, 29 May 2023 20:59:11 +0000 (20:59 +0000)] 
dmesg: make kmsg read() buffer big enough for kernel

otherwise, if the kernel log has an item longer than 1024B, our read() gives EINVAL and we stop reading kmsg

2 years agoFix Blizzard-M2-Max
ThomasKaiser [Mon, 29 May 2023 12:47:50 +0000 (14:47 +0200)] 
Fix Blizzard-M2-Max

2 years agoAdd recent Apple ARM cores
ThomasKaiser [Mon, 29 May 2023 12:42:18 +0000 (14:42 +0200)] 
Add recent Apple ARM cores

2 years agolibmount: don't call hooks after mount.<type> helper
Karel Zak [Thu, 25 May 2023 09:48:24 +0000 (11:48 +0200)] 
libmount: don't call hooks after mount.<type> helper

In case more filesystems are specified (or when libmount follows
/{etc,proc}/filesystems) then the library may try to use and
initialize the new API because for some filesystems, we need
exec(/sbin/mount.<type>) and for another fsopen().

The hooks that use the API have to smart and detect that the mount
operation was done in external /sbin/mount.<type> helper. And in this
case, the new API file descriptors must be ignored.

The exception is propagation flags, mount(8) can set the flags after
exec(/sbin/mount.<type>), for example, "mount -t ntfs --make-private".

Fixes: https://github.com/util-linux/util-linux/issues/2267
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agomeson: install symlink for vigr man page
Christian Hesse [Mon, 22 May 2023 14:11:18 +0000 (16:11 +0200)] 
meson: install symlink for vigr man page

2 years agomeson: include bash-completion for write
Christian Hesse [Mon, 22 May 2023 13:57:35 +0000 (15:57 +0200)] 
meson: include bash-completion for write

2 years agomeson: include bash-completion for newgrp
Christian Hesse [Mon, 22 May 2023 13:56:28 +0000 (15:56 +0200)] 
meson: include bash-completion for newgrp

2 years agolibmount: cleanup enosys returns from mount hoop
Karel Zak [Tue, 23 May 2023 10:13:02 +0000 (12:13 +0200)] 
libmount: cleanup enosys returns from mount hoop

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: don't call mount.<type> helper with usernames
Karel Zak [Mon, 22 May 2023 15:26:55 +0000 (17:26 +0200)] 
libmount: don't call mount.<type> helper with usernames

This is v2.39 regression. The "user" mount option is internally
converted to "user=<name>", but this should not be exported to
the mount helpers.

The mount helper accepts the <name> only if specified in mount options
(cifs uses user=). The real username as generated by libmount is not
relevant in this case.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: fix options prepend/insert and merging
Karel Zak [Mon, 22 May 2023 13:00:25 +0000 (15:00 +0200)] 
libmount: fix options prepend/insert and merging

 * the order of the new options should not be changed
   (for example prepend "a,b,c" to list with "d" has to generate "a,b,c,d", not "c,b,a,d")

 * make sure that  options map is defined when merging options

Fixes: https://github.com/util-linux/util-linux/issues/2238
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: check for availability of mount_setattr
Thomas Weißschuh [Sat, 20 May 2023 04:38:20 +0000 (06:38 +0200)] 
libmount: check for availability of mount_setattr

If mount_setattr is not available but needed fall back to the legacy
mount API.

Fixes #2247

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibmount: don't pass option "defaults" to helper
Thomas Weißschuh [Sun, 21 May 2023 17:58:47 +0000 (19:58 +0200)] 
libmount: don't pass option "defaults" to helper

"defaults" is only a pseudo-option that expands to other options.
It should not be passed to helpers.

Reported-by: Quentin Rameau <quinq@fifth.space>
Closes: https://lore.kernel.org/util-linux/20230521181814.0b0f2d38.quinq@fifth.space/
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agobuild-sys: add --disable-waitpid
Frantisek Sumsal [Thu, 18 May 2023 16:56:15 +0000 (18:56 +0200)] 
build-sys: add --disable-waitpid

The new pidfd stuff waitpid uses is not compatible with older kernel
headers, but the rest of the util-linux is still perfectly fine, so
allow disabling just the waitpid utility to make the builds happy again.

2 years agomesg.1 cleanups/updates
наб [Sun, 14 May 2023 23:19:58 +0000 (01:19 +0200)] 
mesg.1 cleanups/updates

First hunk:  grammar.
Second hunk: (a) mentioning BSD ptys and not UNIX98 ones is odd,
             (b) mentioning /only/ ptys is odder still.
Third hunk:  mesg is found in the UNIX Programmer's Manual;
             it takes its modern form in V7
             (it's unclear to me why V6 specifically is mentioned,
              since it's still default-invert + always-report-"was X").

2 years agoMerge branch '2.39/bcache' of https://github.com/t-8ch/util-linux into stable/v2.39
Karel Zak [Mon, 5 Jun 2023 09:49:47 +0000 (11:49 +0200)] 
Merge branch '2.39/bcache' of https://github.com/t-8ch/util-linux into stable/v2.39

* '2.39/bcache' of https://github.com/t-8ch/util-linux:
  libblkid: (bcache) also calculate checksum over journal buckets
  libblkid: (bcache) extend superblock definition

2 years agolibblkid: (bcache) also calculate checksum over journal buckets
Thomas Weißschuh [Sat, 3 Jun 2023 11:13:52 +0000 (13:13 +0200)] 
libblkid: (bcache) also calculate checksum over journal buckets

Fixes #2291

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: (bcache) extend superblock definition
Thomas Weißschuh [Sat, 3 Jun 2023 11:13:37 +0000 (13:13 +0200)] 
libblkid: (bcache) extend superblock definition

We will need it for the correct checksum calculation.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoci: prevent prompts during installation
Thomas Weißschuh [Wed, 31 May 2023 08:15:11 +0000 (10:15 +0200)] 
ci: prevent prompts during installation

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotools: (asciidoctor) explicitly require extensions module
Thomas Weißschuh [Wed, 31 May 2023 15:12:12 +0000 (17:12 +0200)] 
tools: (asciidoctor) explicitly require extensions module

This is needed for older versions of asciidoctor.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agobuild-sys: only pass --failure-level if supported
Thomas Weißschuh [Wed, 31 May 2023 14:56:31 +0000 (16:56 +0200)] 
build-sys: only pass --failure-level if supported

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolsfd: (tests) fix typo
Thomas Weißschuh [Wed, 31 May 2023 15:25:22 +0000 (17:25 +0200)] 
lsfd: (tests) fix typo

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoblkzone: don't take address of struct blk_zone
Thomas Weißschuh [Wed, 31 May 2023 10:47:03 +0000 (12:47 +0200)] 
blkzone: don't take address of struct blk_zone

Older versions of GCC do not know the warning so they warn about the
unknown ignored warning.

As struct blk_zone is only 64 bytes anyway just copy it.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoenosys: add support for loongarch
Thomas Weißschuh [Tue, 23 May 2023 14:34:47 +0000 (16:34 +0200)] 
enosys: add support for loongarch

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agomeson: require 0.57
Thomas Weißschuh [Tue, 23 May 2023 14:32:23 +0000 (16:32 +0200)] 
meson: require 0.57

It is needed for fs.read()

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoenosys: split audit arch detection into dedicated header
Thomas Weißschuh [Mon, 22 May 2023 15:25:15 +0000 (17:25 +0200)] 
enosys: split audit arch detection into dedicated header

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoenosys: add support for sparc
Thomas Weißschuh [Mon, 22 May 2023 15:21:26 +0000 (17:21 +0200)] 
enosys: add support for sparc

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agowaitpid: only build when pidfd_open is available
Thomas Weißschuh [Mon, 22 May 2023 16:24:47 +0000 (18:24 +0200)] 
waitpid: only build when pidfd_open is available

Fixes #2256

[kzak@redhat.com: - fix UL_BUILD_INIT() use]

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibsmartcols: (samples): fix format truncation warning
Thomas Weißschuh [Fri, 19 May 2023 15:34:00 +0000 (17:34 +0200)] 
libsmartcols: (samples): fix format truncation warning

As this is only an example and the needed memory is not much just
hardcode a large enough number.
The previously computed value was wrong anyways.

libsmartcols/samples/continuous.c: In function 'main':
libsmartcols/samples/continuous.c:110:61: error: '%3d' directive output may be truncated writing between 3 and 11 bytes into a region of size between 0 and 7 [-Werror=format-truncation=]
  110 |                         snprintf(timecell, timecellsz, "%f [%3d%%]", diff,
      |                                                             ^~~
libsmartcols/samples/continuous.c:110:25: note: 'snprintf' output between 11 and 333 bytes into a destination of size 12
  110 |                         snprintf(timecell, timecellsz, "%f [%3d%%]", diff,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  111 |                                 done ? 100 : (int)(diff / (TIME_PERIOD / 100.0)));
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libsmartcols/samples/continuous.c:110:61: error: '%3d' directive output may be truncated writing 3 bytes into a region of size between 0 and 7 [-Werror=format-truncation=]
  110 |                         snprintf(timecell, timecellsz, "%f [%3d%%]", diff,
      |                                                             ^~~
libsmartcols/samples/continuous.c:110:25: note: 'snprintf' output between 11 and 325 bytes into a destination of size 12
  110 |                         snprintf(timecell, timecellsz, "%f [%3d%%]", diff,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  111 |                                 done ? 100 : (int)(diff / (TIME_PERIOD / 100.0)));
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotest_uuidd: make pthread_t formatting more robust
Thomas Weißschuh [Fri, 19 May 2023 14:47:48 +0000 (16:47 +0200)] 
test_uuidd: make pthread_t formatting more robust

On musl pthread_t is a pointer. To avoid compiler warnings on 32bit
systems add a cast through intptr_t.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agomkfs.minix: handle 64bit time on 32bit system
Thomas Weißschuh [Fri, 19 May 2023 14:47:22 +0000 (16:47 +0200)] 
mkfs.minix: handle 64bit time on 32bit system

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoenosys: add support for MIPS, PowerPC and ARC
Thomas Weißschuh [Wed, 17 May 2023 15:00:31 +0000 (17:00 +0200)] 
enosys: add support for MIPS, PowerPC and ARC

Co-developed-by: Hauke Mertens <hauke@hauke-m.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotest_enosys: fix build on old kernels
Thomas Weißschuh [Tue, 30 May 2023 18:01:49 +0000 (20:01 +0200)] 
test_enosys: fix build on old kernels

Fixes #2277

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agobuild-sys: release++ (v2.39) v2.39
Karel Zak [Wed, 17 May 2023 09:58:48 +0000 (11:58 +0200)] 
build-sys: release++ (v2.39)

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agodocs: update v2.39-ReleaseNotes
Karel Zak [Wed, 17 May 2023 09:57:07 +0000 (11:57 +0200)] 
docs: update v2.39-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agopo-man: merge changes
Karel Zak [Wed, 17 May 2023 09:54:01 +0000 (11:54 +0200)] 
po-man: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agopo: merge changes
Karel Zak [Wed, 17 May 2023 09:53:42 +0000 (11:53 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agopo-man: update uk.po (from translationproject.org)
Yuri Chornoivan [Wed, 17 May 2023 09:45:41 +0000 (11:45 +0200)] 
po-man: update uk.po (from translationproject.org)

2 years agopo-man: update sr.po (from translationproject.org)
Мирослав Николић [Wed, 17 May 2023 09:45:41 +0000 (11:45 +0200)] 
po-man: update sr.po (from translationproject.org)

2 years agopo-man: update fr.po (from translationproject.org)
Frédéric Marchal [Wed, 17 May 2023 09:45:41 +0000 (11:45 +0200)] 
po-man: update fr.po (from translationproject.org)

2 years agopo-man: update de.po (from translationproject.org)
Mario Blättermann [Wed, 17 May 2023 09:45:41 +0000 (11:45 +0200)] 
po-man: update de.po (from translationproject.org)

2 years agopo-man: update cs.po (from translationproject.org)
Petr Písař [Wed, 17 May 2023 09:45:41 +0000 (11:45 +0200)] 
po-man: update cs.po (from translationproject.org)

2 years agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Wed, 17 May 2023 09:44:17 +0000 (11:44 +0200)] 
po: update uk.po (from translationproject.org)

2 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Wed, 17 May 2023 09:44:17 +0000 (11:44 +0200)] 
po: update pl.po (from translationproject.org)

2 years agopo: update ko.po (from translationproject.org)
Seong-ho Cho [Wed, 17 May 2023 09:44:17 +0000 (11:44 +0200)] 
po: update ko.po (from translationproject.org)

2 years agopo: update hr.po (from translationproject.org)
Božidar Putanec [Wed, 17 May 2023 09:44:17 +0000 (11:44 +0200)] 
po: update hr.po (from translationproject.org)

2 years agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Wed, 17 May 2023 09:44:17 +0000 (11:44 +0200)] 
po: update fr.po (from translationproject.org)

2 years agopo: update de.po (from translationproject.org)
Mario Blättermann [Wed, 17 May 2023 09:44:17 +0000 (11:44 +0200)] 
po: update de.po (from translationproject.org)

2 years agopo: update cs.po (from translationproject.org)
Petr Písař [Wed, 17 May 2023 09:44:17 +0000 (11:44 +0200)] 
po: update cs.po (from translationproject.org)

2 years agoMerge branch 'chown' of https://github.com/mbeijen/util-linux
Karel Zak [Mon, 15 May 2023 10:18:17 +0000 (12:18 +0200)] 
Merge branch 'chown' of https://github.com/mbeijen/util-linux

* 'chown' of https://github.com/mbeijen/util-linux:
  Use non-deprecated chown syntax

2 years agoMerge branch 'po-man/warning' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 15 May 2023 07:41:11 +0000 (09:41 +0200)] 
Merge branch 'po-man/warning' of https://github.com/t-8ch/util-linux

* 'po-man/warning' of https://github.com/t-8ch/util-linux:
  po-man: add warning for replaced unicode dashes

2 years agobuild: align build-time checks between meson and autotools
Thomas Weißschuh [Sun, 14 May 2023 16:35:30 +0000 (18:35 +0200)] 
build: align build-time checks between meson and autotools

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoUse non-deprecated chown syntax
Chris Hofstaedtler [Tue, 12 Apr 2022 15:41:05 +0000 (15:41 +0000)] 
Use non-deprecated chown syntax

Closes: #1007139
2 years agopo-man: add warning for replaced unicode dashes
Thomas Weißschuh [Fri, 12 May 2023 08:00:34 +0000 (10:00 +0200)] 
po-man: add warning for replaced unicode dashes

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibfdisk: fix fdisk_check_collisions return code
Karel Zak [Thu, 11 May 2023 08:37:54 +0000 (10:37 +0200)] 
libfdisk: fix fdisk_check_collisions return code

The return code (>0) is nowhere in the library used, but let's be
compatible with function comment ;-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibfdisk: fix wipe-partition feature
Karel Zak [Thu, 11 May 2023 07:44:37 +0000 (09:44 +0200)] 
libfdisk: fix wipe-partition feature

Addresses: https://github.com/util-linux/util-linux/issues/2216
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'tests' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 10 May 2023 13:13:17 +0000 (15:13 +0200)] 
Merge branch 'tests' of https://github.com/t-8ch/util-linux

* 'tests' of https://github.com/t-8ch/util-linux:
  ci: don't try to install kernel modules if they are not available
  ci: update package list before trying to determine package availability
  tools: (asciidoctor-unicodeconverter) don't fix multi manpages
  tools: (asciidoctor-unicodeconverter) properly handle dotted commands

2 years agoci: don't try to install kernel modules if they are not available
Thomas Weißschuh [Wed, 10 May 2023 10:20:05 +0000 (12:20 +0200)] 
ci: don't try to install kernel modules if they are not available

It seems linux-modules-extra-5.15.0-1036-azure got dropped from Ubuntu
repos. Maybe for security reasons.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoci: update package list before trying to determine package availability
Thomas Weißschuh [Wed, 10 May 2023 10:37:45 +0000 (12:37 +0200)] 
ci: update package list before trying to determine package availability

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotools: (asciidoctor-unicodeconverter) don't fix multi manpages
Thomas Weißschuh [Wed, 10 May 2023 10:23:20 +0000 (12:23 +0200)] 
tools: (asciidoctor-unicodeconverter) don't fix multi manpages

The logic does not work for manpages describing multiple subjects, so
skip it for them.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotools: (asciidoctor-unicodeconverter) properly handle dotted commands
Thomas Weißschuh [Wed, 10 May 2023 10:21:24 +0000 (12:21 +0200)] 
tools: (asciidoctor-unicodeconverter) properly handle dotted commands

Split from the end of the docname, as otherwise commands like "fsck.foo"
are stripped of their suffix.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolib/pager: fix output truncation from buffered stdout
Chris Webb [Tue, 9 May 2023 16:46:00 +0000 (17:46 +0100)] 
lib/pager: fix output truncation from buffered stdout

Commit 518a0ad dropped fflush(stdout) and fflush(stderr) from
wait_for_pager() before STDOUT_FILENO and STDERR_FILENO are closed
because it is called from a signal handler and they are async-unsafe.

However, failure to flush output leads to unwanted truncation when
stdout is fully buffered, which it is by default when we are linked
against musl.

Ensure stdout and stderr are line-buffered before redirecting them to
the pager subprocess to avoid this.

Addresses: https://github.com/util-linux/util-linux/issues/2218
Signed-off-by: Chris Webb <chris@arachsys.com>
2 years agofsck: use BLKID_SUBLKS_BADCSUM
Karel Zak [Tue, 9 May 2023 11:25:09 +0000 (13:25 +0200)] 
fsck: use BLKID_SUBLKS_BADCSUM

We need to be a little bit more promiscuou in fsck to see also
inconsistent superblocks.

It would be possible to do not use libmount to ask for filesystem type
and ask directly libblkid, but libmount is also used to parse fstab
and search in the file and in this case it caches FS tags. It seems
better to continue with libmount to reduce overhead and keep the code
simple.

Addresses: https://github.com/util-linux/util-linux/issues/2214
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibmount: allow overwrite how to use libblkid
Karel Zak [Tue, 9 May 2023 11:21:58 +0000 (13:21 +0200)] 
libmount: allow overwrite how to use libblkid

This is unnecessary for classic mount-like tasks, but application
may use libmount in situation when the default for probing is not
optimal.

Addresses: https://github.com/util-linux/util-linux/issues/2214
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolibfdisk: use BLKID_SUBLKS_BADCSUM and BLKID_PARTS_FORCE_GPT
Karel Zak [Tue, 9 May 2023 11:19:20 +0000 (13:19 +0200)] 
libfdisk: use BLKID_SUBLKS_BADCSUM and BLKID_PARTS_FORCE_GPT

Let's keep libblkid in more promiscuous mode to detect more possible
signatures.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'sulogin-term' of https://github.com/DaanDeMeyer/util-linux
Karel Zak [Tue, 9 May 2023 09:21:57 +0000 (11:21 +0200)] 
Merge branch 'sulogin-term' of https://github.com/DaanDeMeyer/util-linux

* 'sulogin-term' of https://github.com/DaanDeMeyer/util-linux:
  sulogin: Don't overwrite TERM if already set

2 years agoMerge branch 'ci/riscv' of https://github.com/t-8ch/util-linux
Karel Zak [Tue, 9 May 2023 09:21:37 +0000 (11:21 +0200)] 
Merge branch 'ci/riscv' of https://github.com/t-8ch/util-linux

* 'ci/riscv' of https://github.com/t-8ch/util-linux:
  ci: also build on riscv64
  lsns: (tests) skip test if rtnetlin is nonfunctional

2 years agopo-man: add cs to po4a.cfg
Karel Zak [Tue, 9 May 2023 08:52:02 +0000 (10:52 +0200)] 
po-man: add cs to po4a.cfg

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agosulogin: Don't overwrite TERM if already set
Daan De Meyer [Mon, 8 May 2023 08:03:09 +0000 (10:03 +0200)] 
sulogin: Don't overwrite TERM if already set

The service invoking sulogin might already have set TERM to something
useful so if that's the case let's not overwrite it.

2 years agoci: also build on riscv64
Thomas Weißschuh [Sat, 6 May 2023 06:25:34 +0000 (08:25 +0200)] 
ci: also build on riscv64

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolsns: (tests) skip test if rtnetlin is nonfunctional
Thomas Weißschuh [Sat, 6 May 2023 21:19:03 +0000 (23:19 +0200)] 
lsns: (tests) skip test if rtnetlin is nonfunctional

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agopo-man: clean all generated files
Thomas Weißschuh [Sat, 6 May 2023 05:07:01 +0000 (07:07 +0200)] 
po-man: clean all generated files

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agopo-man: ignore all generated sources
Thomas Weißschuh [Sat, 6 May 2023 04:53:51 +0000 (06:53 +0200)] 
po-man: ignore all generated sources

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoci: build translated manpages during test
Thomas Weißschuh [Fri, 5 May 2023 08:42:03 +0000 (10:42 +0200)] 
ci: build translated manpages during test

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotools: (asciidoctor-unicodeconverter) fix up name section with dash
Thomas Weißschuh [Fri, 5 May 2023 21:33:14 +0000 (23:33 +0200)] 
tools: (asciidoctor-unicodeconverter) fix up name section with dash

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotools: (asciidoctor-unicodeconverter) fix state machine comparision
Thomas Weißschuh [Fri, 5 May 2023 21:14:44 +0000 (23:14 +0200)] 
tools: (asciidoctor-unicodeconverter) fix state machine comparision

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agopo-man: fix quoting in comparision to skip nonexisting translations
Thomas Weißschuh [Fri, 5 May 2023 09:11:23 +0000 (11:11 +0200)] 
po-man: fix quoting in comparision to skip nonexisting translations

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoMerge branch 'ci/python' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 5 May 2023 07:27:33 +0000 (09:27 +0200)] 
Merge branch 'ci/python' of https://github.com/t-8ch/util-linux

* 'ci/python' of https://github.com/t-8ch/util-linux:
  ci: test python bindings