EVERYTHING FROM THE OTHER REPO

This commit is contained in:
2026-07-29 03:36:26 +03:00
parent 6777ea96db
commit 92a6ae42f5
4426 changed files with 1696506 additions and 2 deletions
@@ -0,0 +1,7 @@
What is here
------------
The util-linux contains supplementary textual material, such as
readme files, release notes, licenses and so on. Common to these
files is that they contain information for contributors but
should not end up to end user installation.
@@ -0,0 +1,31 @@
PAM configuration is very distribution specific. This is reason why upstream
util-linux package does not install any PAM config files.
Expected PAM config files:
login(1):
/etc/pam.d/remote - for -h command line option
/etc/pam.d/login - regular login
su(1):
/etc/pam.d/su-l - for --login command line option
/etc/pam.d/su - regular su
runuser(1):
/etc/pam.d/runuser-l - for --login command line option
/etc/pam.d/runuser - regular su
Note that runuser requires only "session" setting (and for example
"auth sufficient pam_rootok.so" dummy line).
chfn(1):
/etc/pam.d/chfn
chsh(1):
/etc/pam.d/chsh
@@ -0,0 +1,12 @@
Periodic fstrim for SSD disks
-----------------------------
fstrim(8) is used on a mounted filesystem to discard blocks which are not in
use by the filesystem. This is useful in particular for solid-state drives
(SSDs).
A systemd service and matching timer is available to periodically perform
fstrim on relevant filesystems, but is *not* enabled by default. To enable it
according to the default weekly cadence, just do the following as root:
systemctl enable fstrim.timer
@@ -0,0 +1,80 @@
libblkid - a library to handle device identification and token extraction
Basic usage is as follows - there are two normal usage patterns:
For cases where a program wants information about multiple devices, or
expects to be doing multiple token searches, the program should
directly initialize cache file via (second parameter is cache
filename, NULL = default):
blkid_cache cache = NULL;
if (blkid_get_cache(&cache, NULL) < 0)
/* error reading the cache file, not really fatal */
Note that if no cache file exists, an empty cache struct is still
allocated. Usage of libblkid functions will use the cache to avoid
needless device scans.
The model of the blkid cache is that each device has a number of
attributes that can be associated with it. Currently the attributes
which are supported (and set) by blkid are:
TYPE filesystem type
UUID filesystem uuid
LABEL filesystem label
How to use libblkid? Normally, you either want to find a device with
a specific NAME=value token, or you want to output token(s) from a
device. To find a device that matches a following attribute, you
simply call the blkid_get_devname() function:
if ((devname = blkid_get_devname(cache, attribute_name, value))) {
/* do something with devname */
string_free(devname);
}
The cache parameter is optional; if it is NULL, then the blkid library
will load the default blkid.tab cache file, and then release the cache
before function call returns. The return value is an allocated string
which holds the resulting device name (if it is found). If the value
is NULL, then attribute_name is parsed as if it were
"<attribute_name>=<value>"; if it cannot be so parsed, then the
original attribute_name is returned in a copied allocated string.
This is a convenience to allow user programs to want to translate user
input, whether it is of the form: "/dev/hda1", "LABEL=root",
"UUID=082D-26E3", and get back a device name that it can use.
Alternatively, of course, the programmer can pass an attribute name of
"LABEL", and value of "root", if that is more convenient.
Another common usage is to retrieve the value of a specific attribute
for a particular device. This can be used to determine the filesystem
type, or label, or uuid for a particular device:
if ((value = blkid_get_tag_value(cache, attribute_name, devname))) {
/* do something with value */
string_free(value);
}
If a program needs to call multiple blkid functions, then passing in a
cache value of NULL is not recommended, since the blkid.tab file
will be repeatedly parsed over and over again, with memory allocated
and deallocated. To initialize the blkid cache, blkid_get_cache()
function is used:
if (blkid_get_cache(&cache, NULL) < 0)
goto errout;
The second parameter of blkid_get_cache (if non-zero) is the alternate filename
of the blkid cache file (see blkid man page for more information about the
default cache file location).
Normally, programs should just pass in NULL.
If you have called blkid_get_cache(), you should call blkid_put_cache()
when you are done using the blkid library functions. This will save the
cache to the blkid.tab file, if you have write access to the file. It
will also free all associated devices and tags:
blkid_put_cache(cache);
@@ -0,0 +1,42 @@
The cal(1) date routines were written from scratch, basically from first
principles. The algorithm for calculating the day of week from any
Gregorian date was "reverse engineered". This was necessary as most of
the documented algorithms have to do with date calculations for other
calendars (e.g. julian) and are only accurate when converted to gregorian
within a narrow range of dates.
1 Jan 1 is a Saturday because that's what cal says and I couldn't change
that even if I was dumb enough to try. From this we can easily calculate
the day of week for any date. The algorithm for a zero based day of week:
calculate the number of days in all prior years (year-1)*365
add the number of leap years (days?) since year 1
(not including this year as that is covered later)
add the day number within the year
this compensates for the non-inclusive leap year
calculation
if the day in question occurs before the gregorian reformation
(3 sep 1752 for our purposes), then simply return
(value so far - 1 + SATURDAY's value of 6) modulo 7.
if the day in question occurs during the reformation (3 sep 1752
to 13 sep 1752 inclusive) return THURSDAY. This is my
idea of what happened then. It does not matter much as
this program never tries to find day of week for any day
that is not the first of a month.
otherwise, after the reformation, use the same formula as the
days before with the additional step of subtracting the
number of days (11) that were adjusted out of the calendar
just before taking the modulo.
It must be noted that the number of leap years calculation is sensitive
to the date for which the leap year is being calculated. A year that occurs
before the reformation is determined to be a leap year if its modulo of
4 equals zero. But after the reformation, a year is only a leap year if
its modulo of 4 equals zero and its modulo of 100 does not. Of course,
there is an exception for these century years. If the modulo of 400 equals
zero, then the year is a leap year anyway. This is, in fact, what the
gregorian reformation was all about (a bit of error in the old algorithm
that caused the calendar to be inaccurate.)
Once we have the day in year for the first of the month in question, the
rest is trivial.
@@ -0,0 +1,41 @@
# @(#)README 5.1 (Berkeley) 5/22/90
col - filter out reverse line feeds.
In the 32V source code to col(1) the default behavior was to NOT compress
spaces into tabs. There was a -h option which caused it to compress spaces
into tabs. There was no -x flag.
The 32V documentation, however, was consistent with the SVID (actually, V7
at the time) and documented a -x flag (as defined above) while making no
mention of a -h flag. Just before 4.3BSD went out, CSRG updated the manual
page to reflect the way the code worked. Suspecting that this was probably
the wrong way to go, this version adopts the SVID defaults, and no longer
documents the -h option.
The S5 -p flag is not supported because it isn't clear what it does (looks
like a kludge introduced for a particular printer).
Known differences between AT&T's col and this one (# is delimiter):
Input AT&T col this col
#\nabc\E7def\n# # def\nabc\r# # def\nabc\n#
#a# ## #a\n#
- last line always ends with at least one \n (or \E9)
#1234567 8\n# #1234567\t8\n# #1234567 8\n#
- single space not expanded to tab
-f #a\E8b\n# #ab\n# # b\E9\ra\n#
- can back up past first line (as far as you want) so you
*can* have a super script on the first line
#\E9_\ba\E8\nb\n# #\n_\bb\ba\n# #\n_\ba\bb\n#
- always print last character written to a position,
AT&T col claims to do this but doesn't.
If a character is to be placed on a line that has been flushed, a warning
is produced (the AT&T col is silent). The -l flag (not in AT&T col) can
be used to increase the number of lines buffered to avoid the problem.
General algorithm: a limited number of lines are buffered in a linked
list. When a printable character is read, it is put in the buffer of
the current line along with the column it's supposed to be in. When
a line is flushed, the characters in the line are sorted according to
column and then printed.
@@ -0,0 +1,787 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: util-linux
Upstream-Contact: util-linux@vger.kernel.org
Source: https://www.kernel.org/pub/linux/utils/util-linux/
Files: *
Copyright: Michal Luscon <mluscon@redhat.com>
1986 Gary S. Brown
1990 Gordon Irlam (gordoni@cs.ua.oz.au)
1991, 1992 Linus Torvalds
1991-2004 Miquel van Smoorenburg
1992 A. V. Le Blanc (LeBlanc@mcc.ac.uk)
1992-1997 Michael K. Johnson, johnsonm@redhat.com
1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2008 Theodore Ts'o <tytso@mit.edu>
1994 Kevin E. Martin (martin@cs.unc.edu)
1994 Salvatore Valente <svalente@mit.edu>
1994,1996 Alessandro Rubini (rubini@ipvvis.unipv.it)
1994-2005 Jeff Tranter (tranter@pobox.com)
1995, 1999, 2000 Andries E. Brouwer <aeb@cwi.nl>
1997-2005 Frodo Looijaard <frodo@frodo.looijaard.name>
1998 Danek Duvall <duvall@alumni.princeton.edu>
1999 Andreas Dilger
1999-2002 Transmeta Corporation
1999, 2000, 2002-2009, 2010, 2011, 2012, 2014 Red Hat, Inc.
2000 Werner Almesberger
2004-2006 Michael Holzt, kju -at- fqdn.org
2005 Adrian Bunk
2007-2023 Karel Zak <kzak@redhat.com>
2007, 2011, 2012, 2016 SuSE LINUX Products GmbH
2008 Cai Qian <qcai@redhat.com>
2008 Hayden A. James (hayden.james@gmail.com)
2008 James Youngman <jay@gnu.org>
2008 Roy Peled, the.roy.peled -at- gmail.com
2009 Mikhail Gusarov <dottedmag@dottedmag.net>
2010, 2011, 2012 Davidlohr Bueso <dave@gnu.org>
2010 Jason Borden <jborden@bluehost.com>A
2010 Hajime Taira <htaira@redhat.com>
2010 Masatake Yamato <yamato@redhat.com>
2011 IBM Corp.
2012 Andy Lutomirski <luto@amacapital.net>
2012 Lennart Poettering
2012 Sami Kerola <kerolasa@iki.fi>
2012 Cody Maloney <cmaloney@theoreticalchaos.com>
2012 Werner Fink <werner@suse.de>
2013,2014 Ondrej Oprala <ooprala@redhat.com>
License: GPL-2+
Files: schedutils/ionice.c
Copyright: 2005 Jens Axboe <jens@axboe.dk>
License: GPL-2
Files: schedutils/chrt.c
schedutils/taskset.c
Copyright: 2004 Robert Love <rml@tech9.net>
2010 Karel Zak <kzak@redhat.com>
License: GPL-2
Files: disk-utils/raw.c
Copyright: 1999, 2000, Red Hat Software
License: GPL-2
Files: sys-utils/hwclock-parse-date.y
Copyright: Steven M. Bellovin <smb@research.att.com>
Unknown Authors on Usenet
1990 Rich $alz <rsalz@bbn.com>
1990 Jim Berets <jberets@bbn.com>
1999, 2004 Paul Eggert <eggert@twinsun.com>
License: GPL-3+
Files: sys-utils/irq-common.c
sys-utils/irqtop.c
sys-utils/lsirq.c
Copyright: 2020, Karel Zak <kzak@redhat.com>
2019, zhenwei pi <pizhenwei@bytedance.com>
License: LGPL-2.1+
Files: sys-utils/irq-common.h
Copyright: 2012-2023, Karel Zak <kzak@redhat.com>
2012, Sami Kerola <kerolasa@iki.fi>
License: LGPL-2.1+
Files: sys-utils/ipcmk.c
Copyright: 2008, Karel Zak <kzak@redhat.com>
2008, Hayden A. James (hayden.james@gmail.com)
License: GPL-2+
Files: sys-utils/ipcrm.c
Copyright: 1993, rishna balasubramanian
License: GPL-2+
Files: sys-utils/ipcs.c
Copyright: 2006-2023, Karel Zak <kzak@redhat.com>
1995, ike Jagdis <jaggy@purplet.demon.co.uk>
License: GPL-2+
Files: sys-utils/ipcutils.c
sys-utils/ipcutils.h
Copyright: 2012-2023, Karel Zak <kzak@redhat.com>
2012, Sami Kerola <kerolasa@iki.fi>
License: GPL-2+
Files: sys-utils/lscpu-arm.c
Copyright: 2018, Riku Voipio <riku.voipio@iki.fi>
License: GPL-2+
Files: sys-utils/lscpu-dmi.c
Copyright: 2020, FUJITSU LIMITED.
License: GPL-2
Files: sys-utils/lscpu-topology.c
sys-utils/lscpu-virt.c
sys-utils/lscpu.c
Copyright: 2008-2023, Karel Zak <kzak@redhat.com>
2008, Cai Qian <qcai@redhat.com>
License: GPL-2+
Files: sys-utils/lscpu.h
Copyright: 2013-2023, Karel Zak <kzak@redhat.com>
2013, Ondrej Oprala <ooprala@redhat.com>
License: GPL-2+
Files: sys-utils/lsipc.c
Copyright: 2015, Ondrej Oprala <ooprala@redhat.com>
2015, Karel Zak <ooprala@redhat.com>
License: GPL-2+
Files: sys-utils/lsmem.c
Copyright: 2016, Karel Zak <kzak@redhat.com>
2016, IBM Corp.
License: GPL-2+
Files: sys-utils/nsenter.c
Copyright: 2012-2013 Eric Biederman <ebiederm@xmission.com>
License: GPL-2
Files: disk-utils/mkfs.minix.c
disk-utils/mkswap.c
Copyright: 1991, 1992 Linus Torvalds
License: GPL-2
Files: lib/blkdev.c
lib/color-names.c
lib/langinfo.c
lib/loopdev.c
lib/mangle.c
lib/path.c
lib/procfs.c
lib/sysfs.c
lib/ttyutils.c
misc-utils/mcookie.c
sys-utils/setsid.c
text-utils/line.c
Copyright: n/a
License: public-domain
Files: login-utils/vipw.c
misc-utils/cal.c
misc-utils/kill.c
misc-utils/logger.c
misc-utils/look.c
misc-utils/whereis.c
sys-utils/renice.c
term-utils/mesg.c
term-utils/script.c
term-utils/ttymsg.c
term-utils/wall.c
term-utils/write.c
text-utils/col.c
text-utils/colcrt.c
text-utils/colrm.c
text-utils/column.c
text-utils/hexdump.c
text-utils/hexdump.h
text-utils/hexdump-conv.c
text-utils/hexdump-display.c
text-utils/hexdump-parse.c
text-utils/rev.c
text-utils/ul.c
Copyright: 1980, 1983, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
The Regents of the University of California
2014 Sami Kerola <kerolasa@iki.fi>
2014-2023 Karel Zak <kzak@redhat.com>
License: BSD-4-clause
Files: sys-utils/flock.c
Copyright: 2003-2005 H. Peter Anvin
License: Expat
Files: sys-utils/rfkill.c
Copyright: 2017, Sami Kerola <kerolasa@iki.fi>
2017, Karel Zak <kzak@redhat.com>
2009, Tim Gardner <tim.gardner@canonical.com>
2009, Marcel Holtmann <marcel@holtmann.org>
2009, Johannes Berg <johannes@sipsolutions.net>
License: ISC
Files: sys-utils/rtcwake.c
Copyright: 2007-2023, Karel Zak <kzak@redhat.com>
2007, Bernhard Walle <bwalle@suse.de>
License: GPL-2+
Files: text-utils/pg.c
Copyright: 2000-2001 Gunnar Ritter
License: BSD-3-clause
Files: login-utils/login.c
Copyright: 1980, 1987, 1988 The Regents of the University of California.
2011 Karel Zak <kzak@redhat.com>
License: BSLA
Files: libuuid/*
libuuid/src/*
libuuid/man/*
Copyright: 1996, 1997, 1998, 1999, 2007 Theodore Ts'o.
1999 Andreas Dilger (adilger@enel.ucalgary.ca)
License: BSD-3-clause
Files: include/xalloc.h
Copyright: 2010 Davidlohr Bueso <dave@gnu.org>
2010-2022 Karel Zak <kzak@redhat.com>
License: LGPL-2+
Files: */colors.*
Copyright: 2012 Ondrej Oprala <ooprala@redhat.com>
2012-2014 Karel Zak <kzak@redhat.com>
License: LGPL-2+
Files: login-utils/setpwnam.h
login-utils/setpwnam.c
Copyright: 1994 Martin Schulze <joey@infodrom.north.de>
1994 Salvatore Valente <svalente@mit.edu>
License: LGPL-2+
Files: libfdisk/*
libfdisk/src/*
Copyright: 2007-2013 Karel Zak <kzak@redhat.com>
2012 Davidlohr Bueso <dave@gnu.org>
License: LGPL-2.1+
Files: lib/c_strtod.c
lib/canonicalize.c
*/match.*
Copyright: 2008-2014, 2016-2018, 2021, 2023, Karel Zak <kzak@redhat.com>
License: LGPL
Files: lib/colors.c
Copyright: 2012-2014, Karel Zak <kzak@redhat.com>
2012, Ondrej Oprala <ooprala@redhat.com>
License: LGPL-2.1+
Files: lib/cpuset.c
Copyright: 2008-2009, 2010, 2011, 2012 Karel Zak <kzak@redhat.com>
License: LGPL-2.1+
Files: lib/encode.c
Copyright: 2020, Pali Rohár <pali.rohar@gmail.com>
2009, Karel Zak <kzak@redhat.com>
2008, Kay Sievers <kay.sievers@vrfy.org>
License: LGPL
Files: lib/fileutils.c
Copyright: 2012-2020, Karel Zak <kzak@redhat.com>
2012, Sami Kerola <kerolasa@iki.fi>
License: public-domain
Files: lib/ismounted.c
Copyright: 1995-2000, 2008, Theodore Tso.
License: GPL-2+
Files: lib/logindefs.c
Copyright: 2003-2005, Thorsten Kukuk
License: GPL-2+
Files: lib/plymouth-ctrl.c
Copyright: 2016, Werner Fink <werner@suse.de>
2016, SUSE Linux GmbH
License: GPL-2+
Files: lib/strutils.c
Copyright: 2010, Karel Zak <kzak@redhat.com>
2010, Davidlohr Bueso <dave@gnu.org>
License: public-domain
Files: lib/strv.c
*/timeutils.*
Copyright: 2014-2022, Karel Zak <kzak@redhat.com>
2010, Lennart Poettering
License: LGPL-2.1+
Files: lib/xxhash.c
Copyright: 2012-2020, Yann Collet
License: BSD-2-clause
Files: */mbsalign.*
Copyright: 2009-2010 Free Software Foundation, Inc.
2010-2013 Karel Zak <kzak@redhat.com>
License: LGPL-2.1+
Files: include/list.h
Copyright: 2008 Karel Zak <kzak@redhat.com>
1999-2008 by Theodore Ts'o
License: LGPL
Files: libblkid/*
libblkid/src/*
libblkid/samples/*
libblkid/src/partitions/*
libblkid/src/superblocks/*
libblkid/src/topology/*
Copyright: 1999, 2001 Andries Brouwer
1995, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004
Theodore Ts'o.
2001 Andreas Dilger (adilger@turbolinux.com)
2004-2008 Kay Sievers <kay.sievers@vrfy.org>
2008-2023 Karel Zak <kzak@redhat.com>
2009 Bastian Friedrich <bastian.friedrich@collax.com>
2009 Corentin Chary <corentincj@iksaif.net>
2009 Mike Hommey <mh@glandium.org>
2009 Red Hat, Inc.
2009-2010 Andreas Dilger <adilger@sun.com>
2010 Andrew Nayenko <resver@gmail.com>
2010 Jeroen Oortwijn <oortwijn@gmail.com>
2010 Jiro SEKIBA <jir@unicus.jp>
2011 Philipp Marek <philipp.marek@linbit.com>
2012 Milan Broz <mbroz@redhat.com>
2013 Alejandro Martinez Ruiz <alex@nowcomputing.com>
2013 Eric Sandeen <sandeen@redhat.com>
2013 Rolf Fokkens <rolf@fokkens.nl>
2013 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
License: LGPL-2.1+
Files: include/cpuset.h
lib/randutils.c
Copyright: *unknown*
License: LGPL
Files: misc-utils/blkid.c
Copyright: 2001 Andreas Dilger
License: LGPL
Files: misc-utils/enosys.c
misc-utils/lsclocks.c
misc-utils/waitpid.c
sys-utils/setpriv-landlock.c
sys-utils/setpriv-landlock.h
Copyright: 2022, 2023, Thomas Weißschuh <thomas@t-8ch.de>
License: GPL-2+
Files: misc-utils/exch.c
misc-utils/fadvise.c
misc-utils/fincore.c
misc-utils/findmnt.c
misc-utils/lsblk.c
lsfd-cmd/bdev.c
lsfd-cmd/cdev.c
lsfd-cmd/decode-file-flags.c
lsfd-cmd/fifo.c
lsfd-cmd/file.c
lsfd-cmd/sock-xinfo.c
lsfd-cmd/sock.c
lsfd-cmd/sock.h
lsfd-cmd/unkn.c
lsfd-cmd/lsfd.c
lsfd-cmd/lsfd.h
misc-utils/wipefs.c
Copyright: 2002-2018, 2021-2023, Red Hat, Inc.
License: GPL-2+
Files: misc-utils/findfs.c
misc-utils/lsblk-devtree.c
Copyright: 2006-2016, 2018, 2021, Karel Zak <kzak@redhat.com>
License: GPL-2+
Files: misc-utils/getopt.c
Copyright: 1997-2014, Frodo Looijaard <frodo@frodo.looijaard.name>
License: GPL-2+
Files: misc-utils/hardlink.c
Copyright: 2021, Karel Zak <kzak@redhat.com>
2008-2014, Julian Andres Klode <jak@jak-linux.org>
License: Expat
Files: misc-utils/lastlog2.c
Copyright: 2023, 2024, Thorsten Kukuk <kukuk@suse.com>
License: BSD-2-clause
Files: misc-utils/lsblk.h
Copyright: 2010-2018, Red Hat, Inc.
License: GPL-2+
Files: misc-utils/lslocks.c
Copyright: 2010-2012, Davidlohr Bueso <dave@gnu.org>
License: GPL-2+
Files: misc-utils/namei.c
Copyright: 2007-2023, Karel Zak <kzak@redhat.com>
License: GPL-2+
Files: misc-utils/pipesz.c
Copyright: 2022, Nathan Sharp
License: GPL-2+
Files: misc-utils/test_uuidd.c
Copyright: 2015, Karel Zak <kzak@redhat.com>
2006, Hewlett-Packard Development Company, L.P.
License: GPL-2+
Files: misc-utils/uuidd.c
Copyright: 2007, Theodore Tso
License: GPL-2+
Files: misc-utils/uuidgen.c
Copyright: 1999, Andreas Dilger and Theodore Tso
License: GPL-2+
Files: misc-utils/uuidparse.c
Copyright: 2017, Sami Kerola
1998, 1999, Theodore Tso.
License: BSD-3-clause
Files: libmount/*
libmount/src/*
Copyright: 2008-2023 Karel Zak <kzak@redhat.com>
License: LGPL-2.1+
Files: libmount/python/*
Copyright: 2013, Red Hat, Inc.
License: LGPL-3+
Files: libsmartcols/*
Copyright: 2009-2023 Karel Zak <kzak@redhat.com>
2014 Ondrej Oprala <ooprala@redhat.com>
License: LGPL-2.1+
Files: pam_lastlog2/*
Copyright: 2023-2024 Thorsten Kukuk
License: BSD-2-clause
Files: debian/*
Copyright: Guy Maor <maor@debian.org>
Sean 'Shaleh' Perry <shaleh@debian.org>
Adrian Bunk <bunk@stusta.de>
LaMont Jones <lamont@debian.org>
1996-2003 Martin Mitchell (martin@debian.org)
2008-2012 Frank Lichtenheld (djpig@debian.org)
2014 Andreas Henriksson <andreas@fatal.se>
2017-2020 Michael Biebl <biebl@debian.org>
2019 Petter Reinholdtsen <pere@debian.org>
2017-2024 Chris Hofstaedtler <zeha@debian.org>
License: GPL-2+
Files: debian/po/*
Copyright: Aiet Kolkhi <aietkolkhi@gmail.com>
Anton Gladky <gladky.anton@gmail.com>
Arief S F (arief@gurame.fisika.ui.ac.id>
Armin Beširović <armin@linux.org.ba>
astur <malditoastur@gmail.com>
Axel Bojer <axelb@skolelinux.no>
Bart Cornelis <cobaco@skolelinux.no>
Bartosz Feski <fenio@o2.pl>
Basil Shubin <bashu@surgut.ru>
Baurzhan Muftakhidinov <baurthefirst@gmail.com>
Bjorn Steensrud <bjornst@powertech.no>
Claus Hindsgaul <claus_h@image.dk>
Clytie Siddall <clytie@riverland.net.au>
Dafydd Tomos <l10n@da.fydd.org>
Damyan Ivanov <dam@modsoftsys.com>
Daniel Franganillo <dfranganillo@gmail.com>
Daniel Nylander <po@danielnylander.se>
Danishka Navin <danishka@gmail.com>
Dauren Sarsenov <daur88@inbox.ru>
Dominik Zablotny <dominz@wp.pl>
Dr.T.Vasudevan <agnihot3@gmail.com>
Eddy Petrisor <eddy.petrisor@gmail.com>
Eder L. Marques <frolic@debian-ce.org>
Elian Myftiu <elian.myftiu@gmail.com>
Emmanuel Galatoulas <galas@tee.gr>
Esko Arajärvi <edu@iki.fi>
Frank Lichtenheld <djpig@debian.org>
Frédéric Bothamy <frederic.bothamy@free.fr>
Gabor Burjan <buga@buvoshetes.hu>
George Papamichelakis <george@step.gr>
Hans Fredrik Nordhaug <hans@nordhaug.priv.no>
Håvard Korsvoll <korsvoll@gmail.com>
Hideki Yamane <henrich@samba.gr.jp>
Hleb Rubanau <g.rubanau@gmail.com>
I Gede Wijaya S <gwijayas@yahoo.com>
Ivan Masár <helix84@centrum.sk>
Jacobo Tarrio <jtarrio@debian.org>
Jamil Ahmed <jamil@ankur.org.bd>
Janos Guljas <janos@resenje.org>
Jordi Mallach <jordi@debian.org>
Josip Rodin <joy+ditrans@linux.hr>
Karolina Kalic <karolina@resenje.org>
Kartik Mistry <kartik.mistry@gmail.com>
Kęstutis Biliūnas <kebil@kaunas.init.lt>
Kevin Scannell <kscanne@gmail.com>
Khoem Sokhem <khoemsokhem@khmeros.info>
Klaus Ade Johnstad <klaus@skolelinux.no>
Knut Yrvin <knuty@skolelinux.no>
Konstantinos Margaritis <markos@debian.org>
Kostas Papadimas <pkst@gnome.org>
Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
Lior Kaplan <kaplan@debian.org>
Luiz Portella <lfpor@lujz.org>
Mallikarjuna <Mallikarjunasj@gmail.com>
Mert Dirik <mertdirik@gmail.com>
Milo Casagrande <milo@ubuntu.com>
Ming Hua <minghua@ubuntu.com>
Miroslav Kure <kurem@debian.cz>
Mouhamadou Mamoune Mbacke <mouhamadoumamoune@gmail.com>
Nabin Gautam <nabin@mpp.org.np>
Ossama M. Khayat <okhayat@yahoo.com>
Ovidiu Damian <deelerious@gmail.com>
Parlin Imanuel Toh <parlin_i@yahoo.com>
Pavel Piatruk <berserker@neolocation.com>
Piarres Beobide <pi@beobide.net>
Praveen|പ്രവീണ്‍ A|എ <pravi.a@gmail.com>
Rūdolfs Mazurs <rudolfs.mazurs@gmail.com>
Sahran <Sahran.ug@gmail.com>
Sampada Nakhare <sampadanakhare@gmail.com>
Setyo Nugroho <setyo@gmx.net>
Simão Pedro Cardoso <pthell@gmail.com>
Stefano Melchior <stefano.melchior@openlabs.it>
Sunjae Park <darehanl@gmail.com>
Sveinn í Felli <sveinki@nett.is>
Tetralet <tetralet@gmail.com>
Theppitak Karoonboonyanan <thep@linux.thai.net>
Tshewang Norbu <bumthap2006@hotmail.com>
Vahid Ghaderi <vahid_male1384@yahoo.com>
Vanja Cvelbar <cvelbar@gmail.com>
Veeven <veeven@gmail.com>
Vikram Vincent <vincentvikram@gmail.com>
Yoppy Hidayanto <yoppy.hidayanto@gmail.com>
License: GPL-2+
License: public-domain
The files tagged with this license contains the following paragraphs:
.
No copyright is claimed. This code is in the public domain; do with
it what you wish.
.
Written by Karel Zak <kzak@redhat.com>
License: GPL-2
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, v2, as
published by the Free Software Foundation
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.
On Debian systems, the complete text of the GNU General Public
License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.
On Debian systems, the complete text of the GNU General Public
License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public
License version 3 can be found in `/usr/share/common-licenses/GPL-3'.
License: BSD-2-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1) Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
.
2) Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
3) Neither the name of the ORGANIZATION nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
License: BSD-4-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
License: BSLA
Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley. The name of the
University may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
License: LGPL
This file may be redistributed under the terms of the
GNU Lesser General Public License.
.
On Debian systems, the complete text of the GNU Lesser General Public
License can be found in /usr/share/common-licenses/LGPL.
License: LGPL-2+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
The complete text of the GNU Lesser General Public License
can be found in /usr/share/common-licenses/LGPL-2 file.
License: LGPL-2.1+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1, or (at your option)
any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.
On Debian systems, the complete text of the GNU Lesser General Public
License version 2.1 can be found in /usr/share/common-licenses/LGPL-2.1.
License: LGPL-3+
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-3".
License: Expat
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
License: ISC
The ISC License
.
Copyright (c) 2024 by the copyright holder
.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,124 @@
The following is a list of commands or features that are deprecated. All
deprecated utils are in maintenance mode and we keep them in source tree for
backward compatibility only.
what: column --table-empty-lines
why: renamed to --keep-empty-lines
since: v2.37
--------------------------
what: hwclock --debug
why: renamed to --verbose, and may be repurposed later.
since: v2.32
--------------------------
what: hwclock -v for version
why: renamed to -V
since: v2.20 (was repurposed to verbose in v2.32)
--------------------------
what: column --columns
why: renamed to --output-width
since: v2.30
--------------------------
what: sfdisk --show-size
why: this does not belong to fdisk, use "blockdev --getsz"
--------------------------
what: sfdisk --Linux
why: unnecessary option, only Linux (non-DOS mode) is supported
--------------------------
what: sfdisk --unit
why: unnecessary option, only 'S'ector unit is supported
--------------------------
what: sfdisk --show-pt-geometry
why: equal to --show-geometry for a long time
--------------------------
what: "swapon --summary" output format
why: does not provide control on output data formatting. The recommended solution
is to use --show=<columns> in all scripts.
--------------------------
What: mkfs
Why: use filesystem specific mkfs.<type>.
--------------------------
What: fdisk -s <device>
Why: this does not belong to fdisk, use "blockdev --getsz"
--------------------------
What: 'udev' and 'list' blkid(8) output formats
Why: udevd links libblkid directly; the 'list' is unnecessary, use lsblk(8)
--------------------------
What: line(1) command
Why: use the read(1) command
--------------------------
What: pg(1) command
Why: use less(1) or more(1)
--------------------------
What: CHS stuff in fdisk (except SUN where are partitions addresses by cylinders only)
Why: use addressing by sectors, CHS does not work with modern disks,
confusing for users...
--------------------------
What: losetup -s
Why: the option -s is in collision with the Loop-AES losetup dialect that is used
in some distributions. Use the long version (--show) only.
--------------------------
What: losetup output format without --list
deprecated format:
# losetup -a
/dev/loop0: []: (/home/fs-images/swap.img)
/dev/loop1: []: (/home/fs-images/disk.img), offset 100
new format:
# losetup
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
/dev/loop0 0 0 0 0 /home/fs-images/swap.img
/dev/loop1 0 100 0 0 /home/fs-images/disk.img
--------------------------
What: tunelp
Why: parallel port printers are probably almost extinct devices
----------------------------
The Single UNIX(TM) Specification, Version 2
Copyright (C) 1997 The Open Group
Legacy utilities which are part util-linux package are:
col
line
pg
https://pubs.opengroup.org/onlinepubs/7908799/xcu/intro.html#tag_001_003_003
@@ -0,0 +1,75 @@
#!/bin/bash
# A small example script for using the getopt(1) program.
# This script will only work with bash(1).
# A similar script using the tcsh(1) language can be found
# as getopt-example.tcsh.
# Example input and output (from the bash prompt):
#
# ./getopt-example.bash -a par1 'another arg' --c-long 'wow!*\?' -cmore -b " very long "
# Option a
# Option c, no argument
# Option c, argument 'more'
# Option b, argument ' very long '
# Remaining arguments:
# --> 'par1'
# --> 'another arg'
# --> 'wow!*\?'
# Note that we use "$@" to let each command-line parameter expand to a
# separate word. The quotes around "$@" are essential!
# We need TEMP as the 'eval set --' would nuke the return value of getopt.
TEMP=$(getopt -o 'ab:c::' --long 'a-long,b-long:,c-long::' -n 'example.bash' -- "$@")
if [ $? -ne 0 ]; then
echo 'Terminating...' >&2
exit 1
fi
# Note the quotes around "$TEMP": they are essential!
eval set -- "$TEMP"
unset TEMP
while true; do
case "$1" in
'-a'|'--a-long')
echo 'Option a'
shift
continue
;;
'-b'|'--b-long')
echo "Option b, argument '$2'"
shift 2
continue
;;
'-c'|'--c-long')
# c has an optional argument. As we are in quoted mode,
# an empty parameter will be generated if its optional
# argument is not found.
case "$2" in
'')
echo 'Option c, no argument'
;;
*)
echo "Option c, argument '$2'"
;;
esac
shift 2
continue
;;
'--')
shift
break
;;
*)
echo 'Internal error!' >&2
exit 1
;;
esac
done
echo 'Remaining arguments:'
for arg; do
echo "--> '$arg'"
done
@@ -0,0 +1,31 @@
This package contains a reimplementation of getopt(1).
PREFACE
Getopt(1) is a program to help shell scripts parse command-line parameters.
HIGHLIGHTS
It can do anything that the GNU getopt(3) routines can do.
It can cope with spaces and shell metacharacters within arguments.
It can parse long parameters.
It can shuffle parameters, so you can mix options and other parameters on
the command-line.
It can be easily identified as an enhanced getopt(1) from within shell scripts.
It can report parse errors as coming from the shell script.
It is fully compatible with other getopt(1) implementations.
COPYING
This program comes under the GNU general public license version 2. See the
file COPYING included in this package. Note that though you may freely
copy it, it is copyright (c) 1997-2005 by Frodo Looijaard
<frodo@frodo.looijaard.name>.
Files in the gnu directory are from glibc-2.0.4: copyright (C) 1987, 88,
89, 90, 91, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
@@ -0,0 +1,38 @@
20051107: Bumped up version number to 1.1.4
20051107: Makefile: package target
20051107: Changed email and website to current ones
20051107: Fixed a few typos in the manpage (sync with util-linux (2.12r)
20030123: Bumped up version number to 1.1.3
20030123: Changed WITH_GETTEXT option to WITHOUT_GETTEXT
20030123: Renamed example programs to have the string getopt- prepended
20030123: Manpage: all minus signs are now escaped
20030123: Sync with util-linux (2.11y)
20010329: Bumped up version number to 1.1.2
20010329: Sync with util-linux
20010311: Bumped up version number to 1.1.1
20010311: Fixed stupid compilation error if NLS not selected
20000630: Bumped up version number to 1.1.0
20000630: Ported the Native Language Support patches from util-linux
They are written by Arkadiusz Miśkiewicz <misiek@pld.org.pl>
20000627: Bumped up version number to 1.0.6
20000627: A few manpage tweaks
20000616: Introduced DESTDIR and directory creation in the Makefile.
19990716: Bumped up version number to 1.0.5
19990622: Made -u work
19990101: Bumped up version number to 1.0.4 (aka. 1.0.3a in util-linux)
19990101: Very small fix in main()
19990101: Updated util-linux Makefile
19980628: Bumped up version number to 1.0.3
19980628: Removed remaining incompatibility with tcsh-6.02 from parse.tcsh
980626: Added separate Makefile for util-linux
19980625: Removed several bugs from parse.tcsh, partly thanks to Volker Kuhlmann
(v.kuhlmann@elec.canterbury.ac.nz).
19980612: Removed reference to getopt in util-linux
19980611: Bumped up version number to 1.0.2
19980611: Fixed --version bug (was not available, though documented!)
19980611: Removed compiler warnings.
19980603: Bumped up version number to 1.0.1
19980603: Fixed sizeof() bug (should be strlen) in getopt.c, thanks to
Bob Proulx (rwp@hprwp.fc.hp.com).
19980505: Changed date field in LSM to proper syntax
19980505: Released version 1.0
@@ -0,0 +1,95 @@
util-linux build system
=======================
- the build system is non-recursive, individual subdirectories use
Makemodule.am files. These files are merged together by automake
into one global Makefile in the top-level directory
- all final build results (binaries, libtool scripts) are stored in top-level
source directory
- all Makemodule.am files have to be designed as top-level makefiles, it
means with full paths (e.g. foo_SOURCES = subdir/foo.c)
- always use '+=' operator for global variables (e.g. bin_PROGRAMS += foo)
- use libcommon.la (without path!) for lib/ stuff (e.g. foo_LDADD = libcommon.la)
- for libblkid, libuuid and libmount use lib<name>.la in _LDADD and
-I$(ul_lib<name>_incdir) in _CFLAGS, for example
foo_LDADD = libmount.la
foo_CFLAGS = -I$(ul_libmount_incdir)
- always use suffixes for hooks, for example
install-exec-hook-foo:
ln -sf foo foooo
INSTALL_EXEC_HOOKS += install-exec-hook-foo
- all util-linux specific autoconf macros use UL_ prefix
- utils in Makefile.am files are enabled/disabled according to BUILD_<NAME>
conditions (AM_CONDITIONAL), for example:
if BUILD_HWCLOCK
...
endif
- "if BUILD_<NAME>" blocks are never nested within another "if BUILD_<NAME>",
all dependencies have to be resolved in configure.ac (see UL_REQUIRES_BUILD())
- all BUILD_<NAME> in configure.am are always based on build_<name> variables,
for example:
AM_CONDITIONAL([BUILD_HWCLOCK], test "x$build_hwclock" = xyes)
the $build_<name> should be available in whole configure script
- AC_ARG_ENABLE() status is always stored in $enable_<name> variable, possible
setting:
"check" - util/feature is optional, if any subcomponent (function, lib,
...) is missing a warning is printed and the util/feature is
disabled
"yes" - util/feature is required, if any subcomponent (function, lib,
...) is missing an error is printed and ./configure aborted
"no" - the util/feature is unwanted
The default status is always defined by UL_DEFAULT_ENABLE() and it might be
globally modified by $ul_default_estate (see AC_ARG_ENABLE([all-programs])).
- it's possible to disable all programs, but enable just one (or more)
explicitly specified, for example:
./configure --disable-all-programs --enable-hwclock
- some basic scenarios for the ./configure script are defined in the
tools/config-gen.d/ directory. If you want to use these predefined scenarios
then call
./tools/config-gen [<scenario> ...]
for example
./tools/config-gen all selinux
will build all utils with enabled selinux support. You can also define some
CFLAGS, for example:
CFLAGS=$(rpm --eval '%optflags') ./tools/config-gen all
will use the default distro flags.
WARNING: config-gen is not designed for end-user or downstream distributions!
It's for development purpose only. All end-users and downstream have
to use standard ./configure script only.
- the tools/config-gen script is also used for build system regression tests,
the test is not enabled by default, you have to use
tests/run.sh build-sys --force
@@ -0,0 +1,90 @@
The common case
./autogen.sh && ./configure && make
If something fails read the last lines. Typical reason to
fail is a missing dependency, such as libtool or gettext.
make install-strip
Note that on the production systems it is strongly recommended to use
"make install-strip" to install binaries and libraries. The result
from the standard "make install" may produce large binaries with
unnecessary symbols.
Autotools
`./autogen.sh' generates all files needed to compile
and install the code (run it after checkout from git)
`make distclean' removes all unnecessary files, but the
code can still be recompiled with "./configure; make"
`make dist-gzip' (or -bzip2) creates a tarball that can
be configured and compiled without running `./autogen.sh'
Compiling
Use SUID_CFLAGS and SUID_LDFLAGS when you want to define
special compiler options for typical suid programs, for
example:
./configure SUID_CFLAGS="-fpie" SUID_LDFLAGS="-pie"
The SUID_* feature is currently supported for chfn, chsh,
newgrp, su, write, mount, and umount.
Use DAEMON_CFLAGS and DAEMON_LDFLAGS when you want to define
special compiler options for daemons; supported for uuidd.
Use SOLIB_CFLAGS and SOLIB_LDFLAGS when you want to define
special compiler options for shared libraries; supported for
libmount, libblkid and libuuid.
FIXME: add notes about klib and uClib.
Compile certain portion
See ./configure --help and use --disable-* and --enable-* options.
It's also possible to disable all the programs and enable only wanted.
For example:
./configure --disable-all-programs --enable-fallocate
Note that the configure script tracks dependencies between libs and
tools. Always see warning messages and follow error messages if any
dependence is necessary. For example to compile mount(8) you need also
libmount, libblkid and libuuid:
./configure --disable-all-programs --enable-mount --enable-libmount \
--enable-libblkid --enable-libuuid
Static linking
Use --enable-static-programs[=LIST] configure option when
you want to use statically linked programs.
Note, mount(8) uses get{pw,gr}nam() and getpwuid()
functions for translation from username and groupname to
UID and GID. These functions could be implemented by
dynamically loaded independent modules (NSS) in your libc
(e.g. glibc). These modules are not statically linked to
mount(8) and mount.static is still using dlopen() like
dynamically linked version.
The translation won't work in environment where NSS
modules are not installed.
For example normal system (NSS modules are available):
# ./mount.static -v -f -n -ouid=kzak /mnt/foo
LABEL=/mnt/foo on /mnt/foo type vfat (rw,uid=500)
^^^^^^^
and without NSS modules:
# chroot . ./mount.static -v -f -n -ouid=kzak /mnt/win
LABEL=/mnt/win on /mnt/win type vfat (rw,uid=kzak)
^^^^^^^^
@@ -0,0 +1,74 @@
Debugging util-linux programs
=============================
How to deal libtool
-------------------
There are considerations to be made when profiling or debugging some programs
found in the util-linux package. Because wrapper scripts are used for the
binaries to make sure all library dependencies are met, you cannot use tools
such as gdb or valgrind directly with them.
Let's take for example the mount command:
$> cd /path/to/util-linux
$> file mount/mount
mount/mount: Bourne-Again shell script text executable
The binary itself is located in the mount/.libs/ directory:
$> file mount/.libs/mount
mount/.libs/mount: ELF 64-bit LSB executable, x86-64, version 1 \
(SYSV), dynamically linked (uses shared libs) [...]
When this command is run, there's a library dependency error:
$> mount/.libs/mount
mount/.libs/mount: /lib/libblkid.so.1: version `BLKID_2.20' not found \
(required by mount/.libs/mount)
To overcome this we need set the LD_LIBRARY_PATH variable to read the path of
the shared lib found in the sources, and not system-wide:
$> export LD_LIBRARY_PATH=$PWD/libblkid/src/.libs/:$LD_LIBRARY_PATH
Now external debugging tools can be run on the binary.
Happy hacking!
Davidlohr Bueso, August 2011
The libmount & libblkid
-----------------------
Both of the libraries can be debugged by setting an environment variable
consisting of a number. The number will be used as a bit mask, so the more 1 the
higher the debugging level. Search for `DEBUG' from files
libblkid/src/blkidP.h
libmount/src/mountP.h
to see what the different bits mean. At the time of writing this the following
enabled full debug.
export LIBBLKID_DEBUG=all
export LIBMOUNT_DEBUG=all
export LIBFDISK_DEBUG=all
export LIBSMARTCOLS_DEBUG=all
The libblkid reads by default /etc/blkid.conf which can be overridden by the
environment variable BLKID_CONF. See manual libblkid/libblkid.3 for details
about the configuration file.
Block device information is normally kept in a cache file (see blkid man page
for more information about the cache file location) that can be overridden by
the environment variable BLKID_FILE.
To libmount uses three paths, which can be overridden by using environment
variables. Notice that these environment variables are ignored for non-root
users.
env variable if not set defaults to
LIBMOUNT_FSTAB /etc/fstab
LIBMOUNT_MTAB /etc/mtab
LIBMOUNT_UTAB /run/mount/utab or /dev/.mount/utab
@@ -0,0 +1,2 @@
Since v2.37 util-linux project uses asciidoc format to maintain man pages.
See man-common/manpage-stub.adoc for more details.
@@ -0,0 +1,152 @@
util-linux regression tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's expected that for each invasive change or important bugfix you will
include a test to your patch.
Compile binaries, libs, extra test programs and run the basic tests:
$ make check
Compile extra test programs only:
$ make check-programs
Note that the configure option --disable-static disables many of libmount and
libblkid unit tests.
Run all tests including tests that require root permissions:
# cd tests
# ./run.sh [options, see --help]
Alternatively using sudo and make:
$ make check-programs
$ sudo -E make check TS_OPTS="--parallel=1"
note that as root you have to manually remove output and diff directories
# rm -rf output diff
or run 'make clean' as root.
Run subset of tests:
$ cd tests
$ ./run.sh <test_directory-name>
for example:
$ ./run.sh blkid
$ ./run.sh libmount
or individual test script, for example:
$ ./ts/cal/year
The tests is possible to exclude by ./run.sh --exclude=<list> where the
<list> is blank separated test names in format "testdir/testname", for example:
$ ./run.sh --exclude="mount/move"
The --exclude is evaluated by the ./run.sh script only. See below
TS_OPT_testdir_[testscript_]fake=
environment variable which provides more powerful functionality to skip tests.
*** WARNING for root users ***
The tests touch your /etc/fstab, initialize loop devices or scsi_debug devices
if executed with root permissions.
Please, be careful and use these tests only for development and never on
production system.
fuzz targets
------------
The fuzz targets can be built and run along with the other tests (after installing
clang):
$ ./tools/config-gen fuzz
$ make check
environment variables
---------------------
TS_COMMAND
Evaluated by "make check" to override the default command (run.sh).
Example:
- build all test dependencies, but skip the actual test
$ make check TS_COMMAND="true"
TS_OPTS
Evaluated by "make check" to pass options.to run.sh (see ./run.sh --help).
Examples:
- run utmp tests only
$ make check TS_OPTS="--parallel=1 utmp"
TS_OPT_testdir_[testscript_]fake="<yes|no>"
Evaluated by any test script to skip certain tests.
Examples:
- skip all the tests within "fdisk" test-directory:
$ make check TS_OPT_fdisk_fake="yes"
- skip only "fdisk/bsd" test:
$ make check TS_OPT_fdisk_bsd_fake="yes"
- skip all "fdisk" tests except fdisk/bsd:
$ make check TS_OPT_fdisk_fake="yes" TS_OPT_fdisk_bsd_fake="no"
TS_OPT_testdir_[testscript_]known_fail="<yes|no>"
Similar usage like TS_OPT_*_fake above. "known_fail" means that the given
test will run but (negative) results will be ignored. The build log and test
diffs will still remind you about the issue.
TS_OPT_testdir_[testscript_]verbose="<yes|no>"
Set verbosity for certain tests. Similar usage like TS_OPT_*_fake above.
TS_OPT_testdir_[testscript_]memcheck="<yes|no>"
Run certain tests with valgrind. Similar usage like TS_OPT_*_fake above.
External services
-----------------
Coveralls coverage reports
URL: https://coveralls.io/github/util-linux/util-linux
lgtm CI - automatically executed security code analysis
URL: https://lgtm.com/projects/g/util-linux/util-linux/
Coverity Scan
URL: https://scan.coverity.com/projects/karelzak-util-linux
Fossies codespell report
URL: https://fossies.org/linux/test/util-linux-master.tar.gz/codespell.html
OSS-Fuzz
URL: https://google.github.io/oss-fuzz/
URL: https://oss-fuzz-build-logs.storage.googleapis.com/index.html#util-linux
URL: https://oss-fuzz.com/coverage-report/job/libfuzzer_asan_util-linux/latest
CIFuzz
URL: https://google.github.io/oss-fuzz/getting-started/continuous-integration/
URL: https://github.com/util-linux/util-linux/actions?query=workflow%3ACIFuzz
@@ -0,0 +1,3 @@
Hwclock is a program that runs under Linux and sets and queries the
Hardware Clock, which is often called the Real Time Clock, RTC, or
CMOS clock.
@@ -0,0 +1,76 @@
25/10/95 Peter Orbaek <poe@daimi.aau.dk>
Some notes for using agetty with modems
Using a comms program to initialize the modem
---------------------------------------------
* Use kermit or minicom to initialize the modem to
- be entirely quiet.
- don't do local echo in command mode.
- turn on DCD (carrier detect) only when there is a connection going.
- enable auto-answer.
- keep a constant computer/modem bitrate at all times.
- optionally save this setup as the modem startup configuration.
* Run agetty on the appropriate ttySn port with the arguments:
* -w to wait for a CR or LF before writing the /etc/issue message
* computer/modem bitrate
* the tty name.
Example from my modem setup, an old 2400 bps SupraModem using Hayes standard
AT commands.
Initialize modem using kermit with the commands
AT E0 Q1 &D2 &C1 S0=1 &W0
to
- turn off local echo from modem when in command mode (E0).
- disable all result codes from modem (Q1).
- make an on/off transition on the DTR line make the modem
disconnect and go into command mode (&D2).
- make the computer/modem DCD line track the modem/modem
carrier detect signal, i.e. no connection means no
carrier detect signal to the computer (&C1).
- enable auto-answer after the first ring (S0=1).
- store the configuration as the start configuration (&W0).
The commands on your modem to achieve the same setup may vary, especially
the &D2 and &C1 commands may not be entirely standard.
Exit kermit/minicom.
Put the command
/sbin/agetty -w 2400 ttyS1
in the command field of the appropriate line in /etc/inittab to start
agetty on /dev/ttyS1 with a 2400 bps speed between modem and computer.
Initializing the modem with agetty
----------------------------------
Use the agetty -I command line option to specify a modem init string, like
for the same setup as above, use the following agetty command in your
/etc/inittab.
/sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 2400 ttyS1
The final \015 is an octal coding of the carriage return character
ending the command string.
If you're using simpleinit (part of this package) instead of the SYSV
compatible init (you're most likely using the SYSV one!) then you must
remove the single quotes from the command line above.
Note that the &W0 command was not used here since the modem will be
initialized each time agetty starts.
With a V.34 (28.8 kbps) modem try starting with a command like:
/sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 115200 ttyS1
Note that agetty supports the higher (>9600 bps) serial speeds
directly, there's no need to use setserial to use the higher speeds.
@@ -0,0 +1,17 @@
mount/umount for Linux 0.97.3 and later.
Authors:
Doug Quale <quale@saavik.cs.wisc.edu>,
H.J. Lu <hlu@eecs.wsu.edu>,
Rick Sladkey <jrs@world.std.com>,
Stephen Tweedie <sct@dcs.ed.ac.uk>.
Andries Brouwer <aeb@cwi.nl>
Adrian Bunk <bunk@stusta.de>
Presently in util-linux maintained by Karel Zak <kzak@redhat.com>.
== Notes to developers ==
The final solution will be libmount/mount.c as the
mount(8) command implementation. So, let's keep the
current mount/* code in maintenance mode and don't try to
rewrite it :-)
@@ -0,0 +1,13 @@
README for the "pg" utility for Linux.
The "pg" utility is the historic System V equivalent to BSD's "more". This
is a free clone of it, and it is intended to conform to the SVID 4 as well
as the SUSv2 specification of this command.
Contrasting to the System V implementation, this one filters backspace
formatting sequences while searching, so you can comfortably search in nroff
output like manual pages.
Gunnar Ritter
Freiburg i. Br.
Germany
@@ -0,0 +1,42 @@
Release schedule
----------------
The util-linux package uses the <major>.<minor>.<maintenance> version
numbering scheme. Since the major version is pretty much fixed, any
release means an increment of the minor number. The minor version is
incremented roughly twice per year. The easiest way to estimate when
the next version will appear, is to look at the time stamp of the last
release.
Before each release there are a few release candidates, which will be
collectively tested. During the test period changes to the code base
are restricted. Usually there are two release candidates.
what length what will be accepted into upstream
---------------------------------------------------------
rc1 1-2 weeks bug fixes only
rc2 1-2 weeks translations, fatal/trivial bug fixes
The period between a release and the next release candidate can be considered
as the merge window.
The release tarball is generated by "make distcheck" command.
Release criteria
----------------
For all releases it is required that:
- make checkincludes passes
- make checkconfig passes
- make distcheck passes
- cd tests && ./run.sh passes
- an out-of-tree build works
(cd .. && mkdir build && cd build && ../util-linux/configure && make)
- ideally: a build with uClibc works, and --with-slang works
See also
--------
../README