summaryrefslogtreecommitdiffstats
path: root/misc-utils/Makemodule.am
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'hardlink' of https://github.com/rudimeier/util-linux into hardlinkKarel Zak2019-02-061-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'hardlink' of https://github.com/rudimeier/util-linux: (25 commits) hardlink: add first simple tests hardlink: util-linux usage hardlink: fix compiler warnings hardlink: style indentations and license header hardlink: enable build with and without pcre2 fixes for the fixes temporal fix before re-patch (updates from Fedora repo) Update hardlink.1 Fixed version number, added changelog about Todd Lewis' patch exclude files via pcre Fixed 32 bit build with gcc7 (RH Bugzilla ID 1422989) spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); update FSF address at .c source file Revert "spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file" spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file Mention -f option in the man page do not allow to hardlink files across filesystems by default (#786719) (use -f option to override) fix possible buffer overflows, integer overflows, update man page fix URL and remove mmap() (#676962, #672917) - update docs to describe highest verbosity -vv option (#210816) - use dist Resolves: 210816 mostly spec cleanup ...
| * hardlink: enable build with and without pcre2Ruediger Meier2018-11-121-0/+12
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | lsblk: add basic function to build devices treeKarel Zak2018-12-071-0/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: move udev and blkid stuff to lsblk-properties.cKarel Zak2018-09-191-0/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: move mount stuff to lsblk-mnt.cKarel Zak2018-09-141-0/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: add lsblk.hKarel Zak2018-09-141-1/+3
|/ | | | | | | * move core struct to the header file * move debug stuff to the header file Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: add ifdef TEST_CALKarel Zak2018-02-021-0/+5
| | | | | | | | | | The test program follows CAL_TEST_TIME=<sec> rather than libc time(). It allows to use cal(1) in regression tests in cases where output depends on the current time. (We already use the same for example for logger.) Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: use libsmartcolsKarel Zak2017-06-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old output is horrible and useless when more devices specified. The old format is also too tricky if more signatures detected. The new output uses one line for each signature, prefixed by device name. For example my workstation: # wipefs /dev/sda* /dev/sdb* DEVICE OFFSET TYPE UUID LABEL sda 0x1fe PMBR sda 0x37e4895e00 gpt sda 0x200 gpt sda1 0x1fe vfat F2BC-BFEC EFI sda1 0x0 vfat F2BC-BFEC EFI sda1 0x36 vfat F2BC-BFEC EFI sda2 0x438 ext4 c5490147-2a6c-4c8a-aa1b-33492034f927 BOOT sda3 0x438 ext4 196972ad-3b13-4bba-ac54-4cb3f7b409a4 HOME sda4 0x438 ext4 d834bc84-0089-4be1-9013-cd8bf35d5ffa ROOT sda5 0x438 ext4 e8ce5375-29d4-4e2f-a688-d3bae4b8d162 WINE sda6 0xff6 swap 210337c6-f8b5-4d65-aab5-a0f343fa9ad4 SWAP sdb 0x200 gpt sdb 0x1fe dos sdb1 0x438 ext4 6467a684-0d10-4f61-a301-67bb26934d90 This patch add --noheadings, --json and --output. Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidparse: add new commandSami Kerola2017-06-261-0/+8
| | | | | | | | | | | 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>
* cal: ncurses cleanupKarel Zak2017-05-301-2/+12
| | | | | | | | | * use proper paths to term.h * keep ncurses support optional * link with TINFO_LIBS (-ltinfo), or fallback to NCURSES_LIBS (-ltinfo -lncurses) * don't include unnecessary ncurses.h (term.h is enough) Signed-off-by: Karel Zak <kzak@redhat.com>
* fincore: use libsmartcolsKarel Zak2017-03-231-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* man: add a page for fincore commandMasatake YAMATO2017-03-231-0/+1
| | | | Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* fincore: new command for counting pages of file contents in coreMasatake YAMATO2017-03-231-0/+5
| | | | | Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: (verify) add source verificationKarel Zak2016-09-231-2/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add --verify and --verboseKarel Zak2016-09-231-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove duplicate cal sourcesRuediger Meier2016-02-291-9/+1Star
| | | | | | | | These extra sources should have been removed since cal is linked against libcommon (see 7b353df2). CC: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: always add AM_CFLAGSRuediger Meier2016-02-231-1/+2
| | | | | | | | We were missing our nice compliler warnings for many programs and libs. See next commits how many trivial and non-trival warnings have to be fixed. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: always use global LDADDRuediger Meier2016-02-231-1/+2
| | | | | | | | This was a major showstopper when building on a system where LTLIBINTL libs are needed (e.g. OSX). Maybe there are a few test programs which wouldn't need LDADD ... never mind. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc-utils: build test_uuidd only if BUILD_UUIDDRuediger Meier2016-02-121-0/+5
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: remove libtermcap supportSami Kerola2016-01-261-3/+0Star
| | | | | | | | | | It is unlikely anyone is going to build this project on system where libtermcap is available. Fedora project obsoleted libtermcap 2007-12-12 in favour of ncurses. Debian made same move 2005. Reference: https://fedoraproject.org/wiki/Deprecated_packages Reference: https://www.debian.org/doc/manuals/debian-faq/ch-compat.en.html#s-termcap Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* namei: move icache to lib/Karel Zak2015-11-271-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use REALTIME_LIBSKarel Zak2015-10-091-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidd: use signalfd() and setup_timer()Sami Kerola2015-10-091-2/+2
| | | | | | | | Point of this change is to replace use of signal() and alarm() system calls using newer interfaces. Nice side effect is that the point where timer was earlier used cannot be distracted by sending rogue SIGALRM. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* logger: add --sd-id and -sd-paramKarel Zak2015-10-011-1/+1
| | | | | | | | | | | | | | | | | | This patch add support for RFC 5424 structured data elements. For example: logger --rfc5424 --sd-id zoo@123 \ --sd-param tiger=\"hungry\" \ --sd-param zebra=\"running\" \ --sd-id manager@123 \ --sd-param onMeeting=\"yes\" \ "this is message" produces: <13>1 2015-10-01T14:07:59.168662+02:00 ws kzak - - [timeQuality tzKnown="1" isSynced="1" syncAccuracy="218616"][zoo@123 tiger="hungry" zebra="running"][manager@123 onMeeting="yes"] this is message Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: add -DTEST_LOGGERKarel Zak2015-03-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | "make test_logger" now compiles logger(1) test program to overwrite system datetime stuff, hostname and PID, for example: export TZ=GMT export LOGGER_TEST_TIMEOFDAY=1234567890.123456 export LOGGER_TEST_HOSTNAME=foo export LOGGER_TEST_GETPID=123 ./test_logger --rfc5424 --no-act --stderr -i --tag MyTag mesg <13>1 2009-02-13T23:31:30.123456+00:00 foo MyTag 123 - [timeQuality tzKnown="1" isSynced="0"] mesg if the LOGGER_TEST_* variables are not specified then default to standard logger(1) behavior. Note that it would be possible to use for example "unshare --utc" to make hostname stable and portable, but LOGGER_TEST_* variables allow to keep the tests less complex. Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/colors: use libtinfo to check terminal capabilityKarel Zak2015-02-271-1/+1
| | | | | | | | | | | | | | | The current implementation assumes that all terminals supports colors and users are forcet to use terminal-colors.d/ to disable colors for some terminals. This patch checks for maximal supported colors for the current terminal and colors are automatically disabled for terminals like vt100. The patch moves lib/colors.c from libcommon.la to libtcolors.la to avoid collisions with another utils. Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: link libsystemd-daemon.soRuediger Meier2015-02-241-2/+2
| | | | | | | | | | Noticed on openSUSE 13.1: util-linux-2.26/misc-utils/logger.c:735: undefined reference to `sd_booted' Introduced in d77dc29e. CC: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: add BUILD_GETOPTKarel Zak2014-05-211-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add BUILD_{BLKID,FINDFS,WIPEFS,FINDMNT}Karel Zak2014-05-211-12/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add BUILD_{UUIDGEN,CAL,LOGGER,LOOP,MCOOKIE,NAMEI,WHEREIS}Karel Zak2014-05-211-3/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: consolidate systemd supportKarel Zak2014-04-091-6/+6
| | | | | | | | | | | | | | | * systemd (since v209) uses only one library (when compiled without --enable-compat-libs) * all systemd build-sys stuff is merged into HAVE_SYSTEMD (automake) and HAVE_LIBSYSTEMD (C macro) now * all is controlled by --with-systemd, default is to automatically check for systemd libs * no more --enable-socket-activation and --enable-journald Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: use libsmartcolsOndrej Oprala2014-04-031-2/+2
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* lsblk: use libsmartcolsOndrej Oprala2014-04-031-2/+2
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* findmnt: use libsmartcolsOndrej Oprala2014-04-031-2/+2
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* mcookie: use lib/randutilsSami Kerola2014-03-261-0/+1
| | | | | | | | | The mcookie should reuse existing code, and there is definitely no need to prefer /dev/random for this utility. See reference for explanation about later statement. References: http://www.2uo.de/myths-about-urandom/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* logger: allow user to send structured journald messagesSami Kerola2014-03-041-0/+4
| | | | | | | | | | | | | This feature is hopefully mostly used to give MESSAGE_ID labels for messages coming from scripts, making search of messages easy. The logger(1) manual page update should give enough information how to use --journald option. [kzak@redhat.com: - add missing #ifdefs - use xalloc.h] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidd: use pkg-config to find systemd-deamon supportSami Kerola2014-01-071-5/+3Star
| | | | | | | | [kzak@redhat.com: - remove USE_SOCKET_ACTIVATION and use HAVE_* as we use for another libs] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move getopt examples to docdirKarel Zak2013-10-141-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* clean up term lib handlingMike Frysinger2013-09-301-10/+2Star
| | | | | | | | | | | | | | | | | The ncurses package has been providing pkg-config files for a while now. So let's start using them to get the proper linker & compiler flags. It can make a difference when ncurses is configured in a way that requires extra link time flags but util-linux doesn't provide them, or when the headers live in a weird place and util-linux can't find them. Since the NCURSES_LIBS is always defined for the Makefile, there's no need to gate on the HAVE_NCURSES conditional. When it's disabled, the var will simply be empty. With a minor tweak to how tinfo is handled, we can do the same thing -- we just always use TINFO_LIBS in the Makefile's. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* build-sys: add CFLAGS and LDFLAGS for daemons and shared libsKarel Zak2013-08-271-1/+2
| | | | | | | | This is necessary for paranoid security guys who believe that things like "-Wl,-z,relro" or "-Wl,-z,bind_now" is a way how to make the world a safer place... Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: support --color[={auto,always,never}]Sami Kerola2013-05-261-1/+1
| | | | | | | | Similar with dmesg commit 9bc2b51a06dc9cf6244106ac489ab08a91fd4360. CC: Pádraig Brady <P@draigBrady.com> Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* uuidd: clean up error messagesKarel Zak2013-05-151-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* whereis: canonicalize directories pathsKarel Zak2013-03-201-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chkdupexe: remove, deprecated for yearsKarel Zak2013-03-141-7/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: use new API from lib/procutils.cKarel Zak2013-03-121-4/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: allow to read (PART)UUID/LABEL from udev DBKarel Zak2013-02-181-0/+3
| | | | | | | | | | | Currently findmnt uses libmount to get filesystem properties (and libmount uses libblkid). This works as expected, but root permissions are required to read the tags from the devices. It seems better to read the information from udev db and use libblkid as fallback solution only. Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: use libmount to parse mountinfoKarel Zak2013-02-141-1/+2
| | | | | | | | | | | | | old version: $ strace -e open lslocks 2>&1 | grep mountinfo | wc -l 118 new version: strace -e open ./lslocks 2>&1 | grep mountinfo | wc -l 1 Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use libcommon.a for lslocksKarel Zak2012-11-221-6/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ddate: remove from util-linuxSami Kerola2012-10-151-7/+0Star
| | | | | | | | | | | 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>
* build-sys: expand paths at make timeKarel Zak2012-08-151-6/+1Star
| | | | | | | | | | | | | autoconf docs about *dir variables (e.g bindir): ... A corollary is that you should not use these variables except in makefiles... ...you should not rely on AC_CONFIG_FILES to replace bindir and friends in your shell scripts and other files; instead, let make manage their replacement. Signed-off-by: Karel Zak <kzak@redhat.com>