Commit Graph

70 Commits

Author SHA1 Message Date
Karel Zak da5d1468c1 build-sys: add .stamp to gitignore
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-04-23 10:39:35 +02:00
Karel Zak 25ce8fb1ed Merge remote-tracking branch 'mariobl/topic/asciidoc'
* mariobl/topic/asciidoc: (71 commits)
  Asciidoc: Update .pot template
  Asciidoc: Reorder example command sequence
  Asciidoc: Update .pot template
  Asciidoc: Better gettext message splitting in nsenter.1.adoc
  Asciidoc: Update .pot template
  Asciidoc: Fix typo and remove invisible spaces which confuse po4a
  Asciidoc: Update .pot template
  Asciidoc: Fix typo
  Asciidoc: Fix artifact from initial import, sixth attempt
  Asciidoc: Update .pot template
  Asciidoc: Fix artifacts from initial import, fifth attempt
  Asciidoc: Fix artifacts from initial import, fourth attempt
  Asciidoc: Update .pot template
  Asciidoc: Fix artifacts from initial import, third attempt
  Asciidoc: Fix artifacts from initial import, second attempt
  Asciidoc: Fix artifacts from initial import
  Asciidoc: Add po4a config file and initial translation template for man pages
  Asciidoc: Small indentation fix in mount.8.adoc
  Asciidoc: Review sys-utils man pages, part 2
  build-sys: fix out-of-tree build
  ...

Signed-off-by: Karel Zak <kzak@redhat.com>
2021-03-29 15:09:27 +02:00
Karel Zak b94cc212fd build-sys: cleanup .gitignore files
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-03-26 11:55:01 +01:00
Zbigniew Jędrzejewski-Szmek d4c880d5a4 meson: add second build system
To build: meson build && ninja -C build
To run tests: ninja -C build check
To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install
To install for realz: sudo ninja -C build install

v2:
- Optional items are now based on the 'feature' feature in meson.
  Built libraries which are disabled turn into disabler() objects
  and also poison any executables which link to them.

What is there:
- building of the binaries and libs and the python module
- installation of binaries, libs, python module, localization files,
  man pages, pkgconfig files
- running of tests
- most options to configure build equivalently to the
  ./configure settings

Partially implemented:
- disabling of stuff when things missing. In the C code, the defines
  are all used, so that should be fine. In the build system, some
  files should be skipped, but that is probably not always done properly.
  Getting this right might require some testing of various build option
  combinations to get the details right.

Not implemented:
- static builds of fdisk and other binaries
- things marked with XXX or FIXME
- ???

Differences:
- .la files are not created. They are useless and everybody hates them.
- Requires.private in pkgconfig files are not present in the
  autogenerated .pc file. Not sure if they should be there or not. If
  necessary, they can be added by hand.
- man pages and systemd units are installed by the install target. Not
  sure why 'make install' doesn't do that.
- the split between / and /usr is probably wrong. But it's all pointless
  anyway, so maybe we could simplify things but not implementing it at
  all under meson?
2021-03-17 15:07:27 +01:00
Qais Yousef 5407f89782 Add uclampset schedutil
Utilization clamping is a new kernel feature that got merged in 5.3. It
allows controlling the performance of a process by manipulating the
utilization such that the task appears bigger or smaller than what it
really is.

There's a system-wide control to to restrict what maximum values the
process are allowed to use.

Man page added in a later patch attempts to explain the usage in more
detail.

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
2021-02-02 10:56:26 +00:00
Karel Zak a0f62b0b20 lsirq: add new command
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-03-06 16:21:10 +01:00
Sami Kerola 57e3dc061b
irqtop: use util-linux libcommon facilities
Including NLS support.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-02-21 21:09:14 +00:00
Karel Zak 33869e5ac0 scriptlive: add new command to re-execute script(1) typescript
The old good scriptreplay(1) just display your recorded session, the
scriptlive(1) uses stdin typescript (from new script(1)) to execute
your commands again.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-08 13:11:54 +02:00
Ruediger Meier 04ae85a7e5 hardlink: enable build with and without pcre2
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-11-12 19:40:33 +01:00
Karel Zak 8fa223daba choom: new command to adjust OOM-killer score value
Let's provide command line tool, man page with OOM description and
bash-completion. It seems better than force end-users to use "echo"
to /proc.

Addresses: https://github.com/karelzak/util-linux/issues/609
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-04-16 12:53:39 +02:00
Ruediger Meier 316795fcb3 build-sys: disable bz2 tarball and fix some am warnings
Nobody needs the .bz2 tarball. We dont't even upload it to
kernel.org.

BTW we fix dozens of these automake warnings:

    automake-1.13/am/ltlibrary.am: warning: 'libblkid.la': linking libtool libraries using a non-POSIX
    automake-1.13/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'

So we can remove -Wno-portability. The only warning left is this
last GNU-make'ism which somebody may fix when reading it:

   sys-utils/Makemodule.am:191: warning: addprefix sys-utils/,$(SETARCH_LINKS: non-POSIX variable name
   sys-utils/Makemodule.am:191: (probably a GNU make extension)
   Makefile.am:90:   'sys-utils/Makemodule.am' included from here

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-15 21:30:32 +01:00
Sami Kerola c0d78c90be
rfkill: make command to build in util-linux project
After this commit the command merely builds, but does not confirm style used
in util-linux project.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-08-30 20:32:48 +01:00
Sami Kerola 83893f2678 uuidparse: add new command
This command will analyze and print information about UUID's.  The command
is based on libuuid/src/uuid_time.c but modified to use libsmartcol.

[kzak@redhat.com: - minor coding style changes]

Reference: http://marc.info/?l=util-linux-ng&m=149735980715600&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-26 14:46:35 +02:00
Sami Kerola 70ca1a7772
tailf: remove deprecated utility
March 2017 is gone, it is time to remove this utility as scheduled in
earlier commit, and promised in manual page.

Reference: 3f8478a71c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-02 16:51:00 +01:00
Karel Zak b57fe43cd4 fincore: cleanup return codes
Don't use EXIT_* macros as functions return code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-03-23 13:07:06 +01:00
Karel Zak 30d7f61f4f build-sys: add parse-date.y
* add lib/parse-date.y to build system
* add necessary autotools stuff to generate .c on the fly
  (autotools are smart enough to add generated file to tarball)
* check for bison version by ./autogen.sh
* add non-wanted junk to .gitignore

With some modification by J William Piggott with regard to
moving the parse-date API into timeutils.h

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-03-04 11:01:56 -05:00
Karel Zak 22fae330d9 blkreport, blkreset: remove in favour of blkzone
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-23 17:03:26 +01:00
Karel Zak 1ad8ef9187 blkzone: add new command (merge blkreport and blkreset)
This new command is based on the original implementation of blkreport
and blkreset command.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-23 16:43:51 +01:00
Shaun Tancheff 70bb534511 blkzonecmd, blkreport: Add new commands for ZAC/ZBC drives
This patch adds:
 - blkreset to issue Reset (Write Pointer) zone commands
 - blkreport to retrieve drive zone information

[kzak@redhat.com: - cleanup man page and usage()
                  - remove command line options aliases,
                  - use strtosize_or_err()
                  - remove unnecessary -ludev
                  - use blkdev.h stuff]

Signed-off-by: Shaun Tancheff <shaun@tancheff.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-09 13:19:44 +01:00
Heiko Carstens 30e1ea8ba1 chmem: new tool
Move the s390 specific chmem tool to util-linux.

The chmem tool was originally written in perl and is part of the
s390-tools package which can be found here:
https://www.ibm.com/developerworks/linux/linux390/s390-tools.html

Given that the tool is architecture independent, there is no reason to
keep it in an s390 specific repository. It seems to be useful for
other architectures as well.

This patch converts the tool to C and adds it to util-linux, while the
command line options stay compatible. The only exception is the option
"-v" which used to be the short form of "--version". That got changed
to "-V" so it behaves like most other tools contained within
util-linux.

The chmem tool can be used to set memory online or offline. This can
be achieved by specifying a memory range:

Memory Block 19 (0x0000000130000000-0x000000013fffffff) disabled

or by specifying a size where chmem will automatically select memory
blocks:

Memory Block 21 (0x0000000150000000-0x000000015fffffff) disable failed
Memory Block 18 (0x0000000120000000-0x000000012fffffff) disabled
Memory Block 17 (0x0000000110000000-0x000000011fffffff) disabled
Memory Block 16 (0x0000000100000000-0x000000010fffffff) disabled
Memory Block 15 (0x00000000f0000000-0x00000000ffffffff) disabled

or by specifying memory block numbers instead of address ranges:

Memory Block 15 (0x00000000f0000000-0x00000000ffffffff) disabled
Memory Block 16 (0x0000000100000000-0x000000010fffffff) disabled
Memory Block 17 (0x0000000110000000-0x000000011fffffff) disabled
Memory Block 18 (0x0000000120000000-0x000000012fffffff) disabled

This is based on a patch from Clemens von Mann.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2016-11-09 10:02:32 +01:00
Heiko Carstens cad2d1ac92 lsmem: new tool
Move the s390 specific lsmem tool to util-linux.

The lsmem tool was originally written in perl and is part of the
s390-tools package which can be found here:
https://www.ibm.com/developerworks/linux/linux390/s390-tools.html

Given that the tool is architecture independent, there is no reason to
keep it in an s390 specific repository. It seems to be useful for
other architectures as well.

This patch converts the tool to C and adds it to util-linux, while the
command line options stay compatible. The only exception is the option
"-v" which used to be the short form of "--version". That got changed
to "-V" so it behaves like most other tools contained within
util-linux.

The lsmem tool inspect the contents of /sys/devices/system/memory and
prints a summary output similar to what lscpu does:

RANGE                                 SIZE STATE   REMOVABLE BLOCK
0x0000000000000000-0x000000005fffffff 1,5G online  yes       0-5
0x0000000060000000-0x000000007fffffff 512M online  no        6-7
0x0000000080000000-0x000000013fffffff   3G online  yes       8-19
0x0000000140000000-0x000000014fffffff 256M offline -         20
0x0000000150000000-0x000000017fffffff 768M online  no        21-23

Memory block size   :     256M
Total online memory :     5,8G
Total offline memory:     256M

In order to keep the output small the tool merges subsequent address
ranges where the attributes are identical. To avoid merging of line
the "-a" option can be used.

The lsmem tool also has "--extendend" and "--parsable" option which
can be used to customize the output, e.g.  limit the output to
specified columns. This is quite similar to what the lscpu tool does.

This is based on a patch from Clemens von Mann.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2016-11-09 10:02:32 +01:00
Ruediger Meier 8eefcbb8f5 build-sys: ignore vim .swp files
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-22 14:12:25 +01:00
Ruediger Meier 073487aa74 build-sys: no need to un-ignore tracked files
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-17 12:19:12 +01:00
Karel Zak 107ca34a4c libsmartcols: fix samples build, add title.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-25 13:42:51 +01:00
Karel Zak 13f6b9db1e build-sys: add lsns to gitignore
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-27 13:57:22 +01:00
Karel Zak 9d20ffda79 lsipc: new command to list IPC facilities
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2015-07-20 11:48:09 +02:00
Karel Zak 0624d8406b zrmactl: add new command to control /dev/zramN devices
Co-Author: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-01 12:09:55 +02:00
Ruediger Meier 15cb27895d build-sys: use automake's PYTHON primary for __init__.py
Actually the initial reason for this commit was to remove execute
permission from installed __init__.py.

Now after discovering automake's _PYTHON suffix we slightly cleanup
Makemodule.am and we will install byte compiled .pyc and .pyo files.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-06-03 13:12:43 +02:00
Ondrej Oprala 29cc2a5568 lslogins: add functionality
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Sami Kerola 198556b76c cytune: remove from util-linux
Assumption is there are not many who need this tool.  Whom ever they
might be the recommendation is to use the command from old util-linux
release.  Second reason to removal is difficulty to test hardware
specific command when none of the active project members does not seem to
have such.  Basically the command has reached dead end what comes to
maintainability of it.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-05-12 13:06:59 +02:00
Sami Kerola cc93d115de build-sys: sort gitignore files
Use 'LC_ALL=C sort -fu' order for all lists.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-12 12:06:37 +01:00
Karel Zak 88407b9321 nologin: add new command
Currently it's maintained as distro specific (or people use impolite
/bin/false way).

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-30 13:36:26 +02:00
Karel Zak 35ab31266e build-sys: add *vim and clang_complete to gitignore
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-12 11:11:15 +02:00
Sami Kerola a272c5747c build-sys: complete elvtune removal
The first removal managed to remove only most of the elvtune, this commit
will complete the task.

Original-removal: 7f1fe74248
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-23 10:58:40 +02:00
Ondrej Oprala 3246f4b98c pylibmount: add __init__.py
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-08-19 15:06:37 +02:00
Karel Zak 58a3cee647 chkdupexe: remove, deprecated for years
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-14 13:34:11 +01:00
Andy Lutomirski 5600c405d5 setpriv: run a program with different Linux privilege settings
This new command can set no_new_privs, uid, gid, groups, securebits,
inheritable caps, the cap bounding set, securebits, and selinux and
apparmor labels.

[kerolasa@iki.fi: a lot of small adjustment making the command to be good
fit to util-linux project]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
2013-02-05 10:35:33 +01:00
Sami Kerola a4c8fe7b8c build-sys: add nsenter to gitignore
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-01-25 15:37:20 +01:00
Sami Kerola 5acc0e0c57 build-sys: add gcov files to .gitignore
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-01-24 16:49:23 +01:00
Sami Kerola 4cf02b6510 ddate: remove from util-linux
See RedHat bug for reasons why the ddate is cleaned up.  The reference is
where to get the command in future.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=823156
References: https://github.com/bo0ts/ddate
Acked-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 16:41:49 +02:00
Lukas Czerner d964b669c8 blkdiscard: add new command
blkdiscard is used to discard device sectors. This is useful for
solid-state drivers (SSDs) and thinly-provisioned storage. Unlike
fstrim this command is used directly on the block device.

blkkdiscard uses BLKDISCARD ioctl or BLKSECDISCARD ioctl for the secure
discard.

All data in the discarded region on the device will be lost!

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
2012-09-28 01:12:09 +02:00
Karel Zak fce05e9617 Revert "blkdiscard: new command"
This was only attempt as alternative implementation, unfortunately
pushed publicly... sorry.

This reverts commit c84ed54cef.
2012-09-28 01:10:08 +02:00
Karel Zak c84ed54cef blkdiscard: new command
Add to fstrim(8) code to support new discard BLKDISCARD and
BLKSECDISCARD ioctls for block devices.  The new command is only
symlink to fstrim(8) as the both utils share some code and the basic
ideas.

Based on patch from Lukas Czerner <lczerner@redhat.com>.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-27 11:38:31 +02:00
Karel Zak 7ec6adb1cc runuser: new command (derived from su(1))
This command is based on su(1), the differences:

 - based on Fedora runuser su(1) patch
 - not installed with suid rights
 - allowed for root users only
 - don't ask for password
 - uses PAM session, for example:

$ cat /etc/pam.d/runuser
auth		sufficient	pam_rootok.so
session		optional	pam_keyinit.so revoke
session		required	pam_limits.so
session		required	pam_unix.so

$ cat /etc/pam.d/runuser-l
auth		include		runuser
session		optional	pam_keyinit.so force revoke
session		include		runuser

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 17:00:31 +02:00
Karel Zak 8863a802eb resizepart: add new command
This is a simple wrapper for BLKPG_RESIZE_PARTITION (since kernel 3.6).

Co-Author: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-13 22:10:14 +02:00
Sami Kerola 404fa3f33b build-sys: add files make check generates in gitignore
The config/test-driver appears at automake stage, rest after running
'make check'.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-06 14:54:03 +02:00
Karel Zak 611de4cc2a build-sys: use slash for binaries in gitignore
.. otherwise git interprets binaries names as shell blog and apply
the pattern globally.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-31 19:55:44 +02:00
Karel Zak bdf5f542e2 build-sys: add UL_PROG_CLANG function, rename warnings.m4 -> compiler.m4
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 15:48:43 +02:00
Karel Zak 78d5ceacb1 utmpdump: new command, merge from sysvinit
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 16:34:46 +02:00
Karel Zak f38e5ff355 build-sys: cleanup .gitignore files
- move all binaries to top-level .gitignore
 - remove unnecessary */.gitignore files

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00