Commit 3d45ba44 authored by Andreas Henriksson's avatar Andreas Henriksson

New upstream version 2.29~rc2

parents 71778035 d7b32ebe
......@@ -117,6 +117,7 @@ CONTRIBUTORS:
Arnaud Mouiche <arnaud.mouiche@invoxia.com>
Arun Persaud <arun@nubati.net>
Attila Áfra <attila.afra@gmail.com>
Aurelien Aptel <aaptel@suse.com>
Aurelien Jarno <aurel32@debian.org>
Balint Cristian <cbalint@redhat.com>
Bastian Friedrich <bastian.friedrich@collax.com>
......@@ -172,6 +173,7 @@ CONTRIBUTORS:
Daniel Mierswa <impulze@impulze.org>
Daniel Nylander <po@danielnylander.se>
Daniel Quinlan <quinlan@yggdrasil.com>
Daniel Shahaf <danielsh@apache.org>
Daniel Stodden <daniel.stodden@googlemail.com>
Daniel Thumim <dthumim@mit.edu>
Daniel Trebbien <dtrebbien@gmail.com>
......@@ -242,6 +244,7 @@ CONTRIBUTORS:
Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Guillem Jover <guillem@hadrons.org>
Gunnar Ritter <g-r@bigfoot.de>
Gustavo Zacarias <gustavo@zacarias.com.ar>
Hajime Taira <htaira@redhat.com>
Hamish Coleman <hamish@zot.org>
Hannes Reinecke <hare@suse.de>
......@@ -270,6 +273,7 @@ CONTRIBUTORS:
Jaakko Hyvätti <HYVATTI@cc.helsinki.fi>
Jakob Unterwurzacher <jakobunt@gmail.com>
Jakub Bogusz <qboosh@pld-linux.org>
James Bottomley <James.Bottomley@HansenPartnership.com>
James Buren <ryuo@frugalware.org>
James Clarke <jrtc27@jrtc27.com>
James Hunt <james.hunt@ubuntu.com>
......@@ -368,6 +372,7 @@ CONTRIBUTORS:
Michael Glad <glad@daimi.aau.dk>
Michael Marineau <michael.marineau@coreos.com>
Michael Piefel <piefel@informatik.hu-berlin.de>
Michał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Michal Humpula <michal.humpula@hudrydum.cz>
Michal Luscon <mluscon@redhat.com>
Michal Schmidt <mschmidt@redhat.com>
......@@ -451,6 +456,7 @@ CONTRIBUTORS:
Richard Tollerton <rich.tollerton@ni.com>
Richard Weinberger <richard@nod.at>
Richard W.M. Jones <rjones@redhat.com>
Richard Yann <yann.richard@uhb.fr>
Richard Yao <ryao@gentoo.org>
Rickard Faith <faith@cs.unc.edu>
Rick Sladkey <jrs@world.std.com>
......@@ -509,6 +515,7 @@ CONTRIBUTORS:
Sven Eckelmann <sven.eckelmann@gmx.de>
Sven Jost <sven.jost@googlemail.com>
Takeshi Hamasaki <hmatrjp@users.sourceforge.jp>
Terry Burton <tez@terryburton.co.uk>
Theodore Ts'o <tytso@mit.edu>
Thierry Reding <thierry.reding@avionic-design.de>
Thierry Vignaud <thierry.vignaud@gmail.com>
......
See version control history.
http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=log;h=2.28.2
http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=log;h=2.29-rc2
Note that items with (!) have high priority.
su/runuser:
- (!) implement pty container for all su/runuser session (something like
script(1)) to separate user from the original terminal (see CVE-2016-2779)
- add functions strtime_short(), strtime_iso(), strtime_ctime(), ...
- cleanup lib/path.c:
......
......@@ -35,7 +35,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
fprintf(out, _(" %s [options] file...\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" -n, --no-argument option does not use argument\n"), out);
fputs(_(" -o, --optional[=<arg>] option argument is optional\n"), out);
fputs(_(" --optional[=<arg>] option argument is optional\n"), out);
fputs(_(" -r, --required <arg> option requires an argument\n"), out);
fputs(_(" -z no long option\n"), out);
fputs(_(" --xyzzy a long option only\n"), out);
......@@ -57,11 +57,11 @@ int main(int argc, char **argv)
int c;
enum {
OPT_XYZZY = CHAR_MAX + 1
OPT_XYZZY = CHAR_MAX + 1,
OPT_OPTIONAL /* see howto-man-page.txt about short option */
};
static const struct option longopts[] = {
{"no-argument", no_argument, NULL, 'n'},
{"optional", optional_argument, NULL, 'o'},
{"required", required_argument, NULL, 'r'},
{"xyzzy", no_argument, NULL, OPT_XYZZY},
{"extremely-long-long-option", no_argument, NULL, 'e'},
......@@ -77,10 +77,10 @@ int main(int argc, char **argv)
textdomain(PACKAGE);
atexit(close_stdout);
while ((c = getopt_long(argc, argv, "no::r:elfVh", longopts, NULL)) != -1)
while ((c = getopt_long(argc, argv, "nr:elfVh", longopts, NULL)) != -1)
switch (c) {
case 'n':
case 'o':
case OPT_OPTIONAL:
case 'r':
case OPT_XYZZY:
case 'e':
......
......@@ -34,11 +34,6 @@ why: does not provide control on output data formatting. The recommended solut
--------------------------
what: "pid" as binary name for "kill --pid"
why: too ugly, too obscure
--------------------------
What: mkfs
Why: use filesystem specific mkfs.<type>.
......
......@@ -18,7 +18,7 @@
.\"
.\" Please read `man 7 groff_man' to see how to use the various macros.
.\"
.TH EXAMPLE "1" "July 2014" "util-linux" "User Commands"
.TH EXAMPLE "1" "April 2016" "util-linux" "User Commands"
.SH NAME
example \- a util-linux man-page howto
.SH SYNOPSIS
......@@ -33,7 +33,7 @@ Write such here.
\fB\-n\fR, \fB\-\-no\-argument\fR
This option does not use an argument.
.TP
\fB\-o\fR, \fB\-\-optional\fR[\fI=argument\fR]
\fB\-\-optional\fR[\fI=argument\fR]
Tell in this description that the
.I argument
is optional, and what happens when it is or is not given. Notice that the word
......@@ -43,6 +43,24 @@ usage text uses the argument
.IR num ,
the manual page should say
.IR number .
.IP
Notice that after release v2.28 it was decided that introducing new options
taking optional arguments should be limited to long-only options. This is
done primarily to avoid problematic behaviour of short options. Imagine for
example normal option
.B \-n
and optional option
.BR \-o .
One will expect
.B command \ \-no
and
.B command \ \-on
to be the same, but in fact the former is two separate options while the
later will use
.B n
as option argument of
.BR -o .
So it is best to avoid short forms of optional options altogether.
.TP
\fB\-r\fR, \fB\-\-required\fR \fIargument\fR
Tell in this description that the
......
......@@ -45,7 +45,7 @@ Usage:
Options:
-n, --no-argument option does not use argument
-o, --optional[=<arg>] option argument is optional
--optional[=<arg>] option argument is optional
-r, --required <arg> option requires an argument
-z no long option
--xyzzy a long option only
......
util-linux 2.28.1 Release Notes
===============================
agetty:
- call uname() only when necessary [Karel Zak]
- don't modify argv[] when parse speeds [Karel Zak]
- fix \S usage [Karel Zak]
blkdiscard:
- Improve man page [Allon Mureinik]
build-sys:
- add --enable-libuuid-force-uuidd [Ruediger Meier]
- add tools/Makemodule.am [Karel Zak]
- fix uClibc-ng scanf check [Waldemar Brodkorb]
- workaround for autoconf "present but cannot be compiled" [Karel Zak]
cfdisk:
- use libsmartcols ASCII for non-widechar environment [Karel Zak]
chfn:
- chsh use selinux_check_passwd_access() [Karel Zak]
colcrt:
- avoid the command getting hung [afl] [Sami Kerola]
deprecated.txt:
- Add sfdisk --show-pt-geometry [Stanislav Brabec]
dmesg:
- --notime should not suppress --show-delta [Sami Kerola]
docs:
- update AUTHORS file [Karel Zak]
fdisk:
- make -l <dev ...> behaves like fdisk -l [Thierry Vignaud]
fsck:
- fix racing between unlock/unlink and open [Yuriy M. Kaminskiy]
lib:
- avoid double free in loopdev.c [Sami Kerola]
libblkid:
- Add metadata signature check for IMSM on 4Kn drives [Alexey Obitotskiy]
- avoid non-empty recursion in EBR [Karel Zak]
- ignore extended partition at zero offset [Karel Zak]
- make I/O errors on CDROMs non-fatal [Karel Zak]
- make blkid_do_wipe() work with probes with offset [Petr Uzel]
- Add length check in probe_nilfs2 before crc32 [Torsten Hilbrich]
- fix probe_nilfs2 I/O error backup [Karel Zak]
libfdisk:
- (gpt) be more careful with 64bit constants [Karel Zak]
- don't offer zero length freespace [Karel Zak]
- fix range checking for fdisk_set_last_lba [Sassan Panahinejad]
libmount:
- Preserve empty string value in optstr parsing [Filipe Brandenburger]
- fix memory leak [Sami Kerola]
- fix mnt_table_parse_stream() logic [Karel Zak]
- make kernel_fs_postparse() more robust [Karel Zak]
libsmartcols:
- Corrected JSON escaping [Karel Zak, Bryan Elliott]
logger:
- add man page note about the default --tag [Karel Zak]
- be more precise about --port description [Karel Zak]
lsblk:
- improve support for nvme [Karel Zak]
- use ID_WWN_WITH_EXTENSION is possible [Karel Zak]
man pages:
- fix spacing between man page name & section number [Mike Frysinger]
mkswap:
- tolerate ENOTSUP when failing to relabel [Lubomir Rintel]
mount:
- try to tell what mount was doing when it failed [Sami Kerola]
po:
- merge changes [Karel Zak]
- update ja.po (from translationproject.org) [Takeshi Hamasaki]
- update nl.po (from translationproject.org) [Benno Schulenberg]
- update sv.po (from translationproject.org) [Sebastian Rasmussen]
pylibmount:
- include c.h [Karel Zak]
script:
- avoid trying fclose(NULL) [Sami Kerola]
- use empty-slave heuristic more carefully [Karel Zak]
setpwnam:
- fix memory leak [Sami Kerola]
sfdisk:
- Add --show-pt-geometry compatibility code [Stanislav Brabec]
- add show-pt-geometry to usage() and sfdisk.8 [Karel Zak]
- exit with error if rereading partition table fails [Victor Dodon]
tailf:
- Fix previously adjusted segfault patch [Tobias Stoeckmann]
- Fix segmentation fault in tailf on 32 bit [Tobias Stoeckmann]
taskset:
- clarify that masks are always hex in man page [Chris Metcalf]
tests:
- Use proper word splitting when executing tests [Filipe Brandenburger]
- update build-sys test [Karel Zak]
tools:
- add script to load .po from translationproject.org [Karel Zak]
umount:
- add note about FS names differences to the man page [Karel Zak]
wipefs:
- force GPT detection [Karel Zak]
write:
- fix setuid related regression [Wayne Pollock]
util-linux 2.28.2 Release Notes
===============================
blkdev:
- guard against missing DIOCGDINFO on FreeBSD 11 [Franco Fichtner]
build-sys:
- add parisc to define ARCH_ [Karel Zak]
docs:
- update AUTHORS file [Karel Zak]
lib/loopdev:
- Set errno in is_loopdev on error [Tobias Stoeckmann]
libblkid:
- Avoid OOB access on illegal ZFS superblocks [Tobias Stoeckmann]
- Check that cluster size is nonzero when probing exFAT [Rostislav Skudnov]
- [exfat] Limit maximum number of iterations in find_label [Rostislav Skudnov]
libsmartcols:
- fix empty cell padding [Karel Zak]
- fix padding for non-maxout output [Karel Zak]
lsns:
- missing ns/<name> is not error [Karel Zak]
pathnames:
- guard clashing definitions on FreeBSD [Franco Fichtner]
po:
- merge changes [Karel Zak]
sfdisk:
- revert exit with error if rereading partition table fails [Karel Zak]
tests:
- Fix fdisk/id and fdisk/mbr-nondos-mode on Sparc [James Clarke]
- keep 'hppa' in fdisk/bsd test too [Karel Zak]
- really fix fdisk/bsd for hppa [Helge Deller]
umount:
- fix obsolete info about loop= in umount.8 [Karel Zak]
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
util-linux 2.28.2: Sep 07 2016
* see Documentation/releases/v2.28.2-ReleaseNotes or the complete changelog at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.2-ChangeLog
util-linux 2.29-rc2: Oct 19 2016
* see Documentation/releases/v2.29-ReleaseNotes or the complete changelog at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-rc2-ChangeLog
util-linux 2.28.1: Aug 11 2016
* see Documentation/releases/v2.28.1-ReleaseNotes or the complete changelog at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ChangeLog
util-linux 2.29-rc1: Sep 30 2016
* see Documentation/releases/v2.29-ReleaseNotes or the complete changelog at
ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29-rc1-ChangeLog
util-linux 2.28: Apr 12 2016
* see Documentation/releases/v2.28-ReleaseNotes or the complete changelog at
......
......@@ -32,7 +32,7 @@ _fsck_module()
return 0
;;
esac
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
COMPREPLY=( $(compgen -W "$(find -L /dev/ -type b 2>/dev/null)" -- $cur) )
return 0
}
complete -F _fsck_module fsck
......@@ -172,10 +172,10 @@
/* Define if libmount available. */
#undef HAVE_LIBMOUNT
/* Define to 1 if you have the `ncurses' library (-lncurses). */
/* Define if ncurses library available */
#undef HAVE_LIBNCURSES
/* Define to 1 if you have the `ncursesw' library (-lncursesw). */
/* Define if ncursesw library available */
#undef HAVE_LIBNCURSESW
/* Define to 1 if you have the `readline' library (-lreadline). */
......@@ -673,8 +673,11 @@
/* Enables colorized output from utils by default */
#undef USE_COLORS_BY_DEFAULT
/* Define to 1 if want to ignore mtab in all situations. */
#undef USE_LIBMOUNT_FORCE_MOUNTINFO
/* Define to 1 if want to support mtab. */
#undef USE_LIBMOUNT_SUPPORT_MTAB
/* Enable plymouth support feature for sulogin and aggety */
#undef USE_PLYMOUTH_SUPPORT
/* Should sulogin use a emergency mount of /dev and /proc? */
#undef USE_SULOGIN_EMERGENCY_MOUNT
......
This diff is collapsed.
This diff is collapsed.
......@@ -143,16 +143,6 @@ fdisk_LDADD = $(LDADD) libcommon.la libfdisk.la \
libsmartcols.la libtcolors.la $(READLINE_LIBS)
fdisk_CFLAGS = $(AM_CFLAGS) -I$(ul_libfdisk_incdir) -I$(ul_libsmartcols_incdir)
if BUILD_LIBBLKID
fdisk_CFLAGS += -I$(ul_libblkid_incdir)
fdisk_LDADD += libblkid.la
endif
if BUILD_LIBUUID
fdisk_CFLAGS += -I$(ul_libuuid_incdir)
fdisk_LDADD += libuuid.la
endif
if HAVE_STATIC_FDISK
sbin_PROGRAMS += fdisk.static
fdisk_static_SOURCES = $(fdisk_SOURCES)
......@@ -175,16 +165,6 @@ sfdisk_LDADD = $(LDADD) libcommon.la libfdisk.la \
libsmartcols.la libtcolors.la $(READLINE_LIBS)
sfdisk_CFLAGS = $(AM_CFLAGS) -I$(ul_libfdisk_incdir) -I$(ul_libsmartcols_incdir)
if BUILD_LIBUUID
sfdisk_CFLAGS += -I$(ul_libuuid_incdir)
sfdisk_LDADD += libuuid.la
endif
if BUILD_LIBBLKID
sfdisk_CFLAGS += -I$(ul_libblkid_incdir)
sfdisk_LDADD += libblkid.la
endif
if HAVE_STATIC_SFDISK
sbin_PROGRAMS += sfdisk.static
sfdisk_static_SOURCES = $(sfdisk_SOURCES)
......@@ -210,11 +190,6 @@ cfdisk_CFLAGS = \
-I$(ul_libfdisk_incdir) \
-I$(ul_libsmartcols_incdir)
if BUILD_LIBBLKID
cfdisk_CFLAGS += -I$(ul_libblkid_incdir)
cfdisk_LDADD += libblkid.la
endif
if BUILD_LIBMOUNT
cfdisk_CFLAGS += -I$(ul_libmount_incdir)
cfdisk_LDADD += libmount.la
......
......@@ -61,7 +61,7 @@ Print device size in bytes.
.IP "\fB\-\-getsize\fP"
Print device size (32-bit!) in sectors. Deprecated in favor of the \-\-getsz option.
.IP "\fB\-\-getss\fP"
Print sectorsize in bytes \(en usually 512.
Print sector size in bytes \(en usually 512.
.IP "\fB\-\-getsz\fP"
Get size in 512-byte sectors.
.IP "\fB\-\-rereadpt\fP"
......
......@@ -184,6 +184,8 @@ enables libfdisk debug output.
enables libblkid debug output.
.IP LIBSMARTCOLS_DEBUG=all
enables libsmartcols debug output.
.IP LIBSMARTCOLS_DEBUG_PADDING=on
use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG.
.SH "SEE ALSO"
.BR fdisk (8),
......
......@@ -23,10 +23,6 @@
#include <sys/ioctl.h>
#include <libfdisk.h>
#ifdef HAVE_LIBBLKID
# include <blkid.h> /* keep it optional */
#endif
#ifdef HAVE_LIBMOUNT
# include <libmount.h> /* keep it optional for non-linux systems */
#endif
......@@ -64,16 +60,19 @@
#include "debug.h"
#include "list.h"
static const char *default_disks[] = {
#ifdef __GNU__
# define DEFAULT_DEVICE "/dev/hd0"
# define ALTERNATE_DEVICE "/dev/sd0"
"/dev/hd0",
"/dev/sd0",
#elif defined(__FreeBSD__)
# define DEFAULT_DEVICE "/dev/ad0"
# define ALTERNATE_DEVICE "/dev/da0"
"/dev/ad0",
"/dev/da0",
#else
# define DEFAULT_DEVICE "/dev/sda"
# define ALTERNATE_DEVICE "/dev/hda"
"/dev/sda",
"/dev/vda",
"/dev/hda",
#endif
};
#define ARROW_CURSOR_STRING ">> "
#define ARROW_CURSOR_DUMMY " "
......@@ -180,7 +179,7 @@ static struct cfdisk_menuitem main_menuitems[] = {
{ 'b', N_("Bootable"), N_("Toggle bootable flag of the current partition") },
{ 'd', N_("Delete"), N_("Delete the current partition") },
{ 'n', N_("New"), N_("Create new partition from free space") },
{ 'q', N_("Quit"), N_("Quit program without writing partition table") },
{ 'q', N_("Quit"), N_("Quit program without writing changes") },
{ 't', N_("Type"), N_("Change the partition type") },
{ 'h', N_("Help"), N_("Print help screen") },
{ 's', N_("Sort"), N_("Fix partitions order") },
......@@ -537,7 +536,7 @@ static int is_freespace(struct cfdisk *cf, size_t i)
}
/* converts libfdisk FDISK_ASKTYPE_MENU to cfdisk menu and returns user's
* responseback to libfdisk
* response back to libfdisk
*/
static int ask_menu(struct fdisk_ask *ask, struct cfdisk *cf)
{
......@@ -1202,16 +1201,24 @@ inline static int extra_insert_pair(struct cfdisk_line *l, const char *name, con
return rc;
}
#ifdef HAVE_LIBMOUNT
static char *get_mountpoint(struct cfdisk *cf, const char *uuid, const char *label)
#ifndef HAVE_LIBMOUNT
static char *get_mountpoint( struct cfdisk *cf __attribute__((unused)),
const char *tagname __attribute__((unused)),
const char *tagdata __attribute__((unused)))
{
return NULL;
}
#else
static char *get_mountpoint(struct cfdisk *cf, const char *tagname, const char *tagdata)
{
struct libmnt_fs *fs = NULL;
char *target = NULL;
int mounted = 0;
assert(uuid || label);
assert(tagname);
assert(tagdata);
DBG(UI, ul_debug("asking for mountpoint [uuid=%s, label=%s]", uuid, label));
DBG(UI, ul_debug("asking for mountpoint [%s=%s]", tagname, tagdata));
if (!cf->mntcache)
cf->mntcache = mnt_new_cache();
......@@ -1226,9 +1233,7 @@ static char *get_mountpoint(struct cfdisk *cf, const char *uuid, const char *lab