Commit Graph

59 Commits

Author SHA1 Message Date
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
Karel Zak 5f8c14a05b build-sys: ignore .dirstamp file
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:07:33 +02:00
Karel Zak 0e60bc9b15 build-sys: add compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-06 12:10:41 +02:00
Karel Zak 132ea94136 build-sys: rename and move macros
- use m4/ul.m4 for util-linux macros
 - use UL_ prefix for all util-linux macros

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-03 12:32:49 +01:00
Sami Kerola 2b85ab880d build-sys: use AUTOMAKE_OPTIONS = gnu
The change will cause make dist to have INSTALL file from
automake release, which hopefully is more up to date than
manually maintained version.

The gnu option will also require ChangeLog to be present, and
without doubts no-one wants to maintain that manually. I added
file to reference link to internet git repository view.

At the time of make dist current tag is added to the ChangeLog
reference which will make release to point exactly to the point
where changes ended. Minor drawback is that untagged make dist
releases will contain a broken link in ChangeLog.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-05-26 15:04:01 +02:00
Sami Kerola 38c75b59e3 build-sys: use git-version-gen to distinct git and release versions
The script is copied as is from gnulib.

[kzak@redhat.com: - generate .tarball-version and .version files in
                    top level Makefile.am
                  - delete autom4te.cache in autogen.sh]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-05 16:34:00 +02:00
Karel Zak 9e1c5b3878 build-sys: ignore generated ltmain.sh
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-05 13:39:35 +01:00
Karel Zak 4b2ede3ef2 build-sys: use generated libtool-2 stuff
The commit 60a4edd662 temporary disabled
libtool-2 in autogen.sh. It seems that libtool-2 in available in
many distributions now, so we don't have to manage the generated .m4
libtool files in git anymore.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-05 13:17:12 +01:00
Petr Uzel 1bb0854261 git: ignore index files generated by ctags and cscope
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2010-05-28 14:29:26 +02:00
Karel Zak a77bfc3a00 build-sys: clean up gtk-doc usage
Currently gtk-doc is optional. Unfortunately, the ./configure script
still depends on GTK_DOC_CHECK macro and shlibs/blkid/docs/Makefile.am
depends on gtk-doc.make.

It seems that the best solution is to add gtk-doc.[make,m4] files to
the repository.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-12 15:20:27 +02:00
Karel Zak 1e018c1571 libblkid: gtkdocize (API docs generated by gtk-docs)
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-16 21:39:37 +02:00
Karel Zak 3ac22f7a17 build-sys: add --disable-tls
* add AX_TLS autoconf macro

 * add --disabletls option

 * cleanup gen_uuid.c code to remove gcc warnings when compiled
   without TLS macro.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-22 10:06:16 +02:00