diff -Nru util-linux-2.31.1/aclocal.m4 util-linux-2.32/aclocal.m4 --- util-linux-2.31.1/aclocal.m4 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/aclocal.m4 2018-03-21 14:25:30.664562208 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -364,7 +364,7 @@ [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -379,7 +379,7 @@ [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -395,14 +395,74 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + AC_LANG_POP([C])]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -454,7 +514,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -485,7 +545,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +736,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -752,7 +812,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -949,7 +1009,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -970,7 +1030,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -991,7 +1051,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1041,7 +1101,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1080,7 +1140,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1109,7 +1169,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1156,7 +1216,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1189,8 +1249,9 @@ [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). + dnl FIXME: Remove the need to hard-code Python versions here. m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl +[python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) @@ -1391,7 +1452,7 @@ sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1410,7 +1471,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1491,7 +1552,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1551,7 +1612,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1579,7 +1640,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1598,7 +1659,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru util-linux-2.31.1/AUTHORS util-linux-2.32/AUTHORS --- util-linux-2.31.1/AUTHORS 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/AUTHORS 2018-03-21 13:48:10.237561917 +0000 @@ -87,8 +87,10 @@ Adam Jackson Adrian Knoth Ævar Arnfjörð Bjarmason + ahmogit Alain Guibert Alan Curry + Alan Jenkins Alan Wendt Alden Tondettar Alejandro Martinez Ruiz @@ -112,12 +114,14 @@ Andreas Henriksson Andreas Schwab Andreas Vogel + Andre Wild Andrew McGill Andrew Nayenko Andrew Vagin Andrew Wilcox Andrii Bordunov Andrzej Krzysztofowicz + Andy Grover Andy Lutomirski Aner Perez Anna Jonna Ármannsdóttir @@ -157,6 +161,7 @@ Bryn M. Reeves B Watson Cai Qian + Carlo Caione Carlos Maiolino Carlos Santos Casper Ti. Vector @@ -249,6 +254,7 @@ Frank Mayhar Frédéric Bothamy Frederick Grose + Frédéric Marchal Frederik "Freso" S. Olesen fREW Schmidt Fridolin Pokorny @@ -259,6 +265,7 @@ Gabriele Giacone <1o5g4r8o@gmail.com> Gabriel M. Schuyler Georg Schiesser + Gerald Schaefer Gerhard Schneider Gerrit Renker Giacomo @@ -333,6 +340,7 @@ Jiro SEKIBA Joe Hansen Johannes Berg + John Groves John Keeping John Lindgren John Paul Morrison @@ -358,6 +366,7 @@ Kees Cook Ken Kopin Kent Overstreet + Kenyon Ralph kernc Kevin E. Martin kevin.granade@gmail.com @@ -372,6 +381,7 @@ Lawrence Rust Lennart Poettering Liam Ryan + Libor Bukata Linus Torvalds Li Zefan Lubomir Kundrak @@ -448,6 +458,8 @@ Nicolai Langfeldt Nicolas Boichat Nicolas Provost + Niklas Hambüchen + Nik Nyby Nikolay Sivov Nilgün Belma Bugüner Norbert Buchmuller @@ -495,9 +507,12 @@ Pierre Hauweele Pietro Castelli Po-Yu Chuang + Prarit Bhargava Rafael Aquini Rafael Ferreira + Rafael Fontenelle Rafael Fontenelle + Rafal Luzynski Rafał Miłecki Raghavendra D Prabhu Rainer Gerhards @@ -516,6 +531,7 @@ Richard Yao Rickard Faith Rick Sladkey + Riku Voipio Rik van Riel Robert Förster Robert Millan @@ -535,6 +551,7 @@ Rui Zhao (renyuneyun) Sami Kerola Sami Liedes + Sam Morris Samuel Ortiz Samuel Thibault Sam Varshavchik @@ -570,14 +587,18 @@ Stephen Hemminger Stephen Tweedie Steve Grubb + Steve Kenton Steven Honeyman Steven J. Magnani Steven S. Dick + Steven Smith Steve Philp Stewart Smith Sukadev Bhattiprolu Sven Eckelmann Sven Jost + Sweet Tea Dorminy + taiyu Takeshi Hamasaki Terry Burton Theodore Ts'o @@ -602,6 +623,7 @@ Tommi Kyntola Tommy Thorn Tom Prince + Tony Asleson Torsten Hilbrich Toshi Kani Trần Ngọc Quân @@ -617,6 +639,7 @@ Vladimir 'φ-coder/phcoder' Serbinenko Volker Kuhlmann Volker Schatz + Vratislav Podzimek Waldemar Brodkorb WANG Chao Wanlong Gao diff -Nru util-linux-2.31.1/bash-completion/chmem util-linux-2.32/bash-completion/chmem --- util-linux-2.31.1/bash-completion/chmem 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/bash-completion/chmem 2018-01-02 13:05:35.112815161 +0000 @@ -16,6 +16,7 @@ --disable --blocks --verbose + --zone --help --version " diff -Nru util-linux-2.31.1/bash-completion/lsmem util-linux-2.32/bash-completion/lsmem --- util-linux-2.31.1/bash-completion/lsmem 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/bash-completion/lsmem 2018-01-02 13:05:35.112815161 +0000 @@ -9,7 +9,7 @@ local prefix realcur OUTPUT_ALL OUTPUT realcur="${cur##*,}" prefix="${cur%$realcur}" - OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE' + OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE ZONES' for WORD in $OUTPUT_ALL; do if ! [[ $prefix == *"$WORD"* ]]; then OUTPUT="$WORD ${OUTPUT:-""}" diff -Nru util-linux-2.31.1/bash-completion/umount util-linux-2.32/bash-completion/umount --- util-linux-2.31.1/bash-completion/umount 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/bash-completion/umount 2018-01-02 13:05:35.112815161 +0000 @@ -40,9 +40,10 @@ return 0 ;; esac - local DEVS_MPOINTS - DEVS_MPOINTS="$(mount | awk '{print $1, $3}')" - COMPREPLY=( $(compgen -W "$DEVS_MPOINTS" -- $cur) ) - return 0 + + local oldifs=$IFS + IFS=$'\n' + COMPREPLY=( $( compgen -W '$(findmnt -lno TARGET | sed "s/\([[:blank:]]\)/\\\\\1/g")' -- "$cur" ) ) + IFS=$oldifs } complete -F _umount_module umount diff -Nru util-linux-2.31.1/bash-completion/unshare util-linux-2.32/bash-completion/unshare --- util-linux-2.31.1/bash-completion/unshare 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/bash-completion/unshare 2018-01-02 13:05:35.113815155 +0000 @@ -27,6 +27,7 @@ --user --cgroup --fork + --kill-child --mount-proc --map-root-user --propagation diff -Nru util-linux-2.31.1/bash-completion/zramctl util-linux-2.32/bash-completion/zramctl --- util-linux-2.31.1/bash-completion/zramctl 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/bash-completion/zramctl 2018-03-02 08:52:23.474552154 +0000 @@ -6,7 +6,7 @@ prev="${COMP_WORDS[COMP_CWORD-1]}" case $prev in '-a'|'--algorithm') - COMPREPLY=( $(compgen -W "lzo lz4" -- $cur) ) + COMPREPLY=( $(compgen -W "lzo lz4 lz4hc deflate 842" -- $cur) ) return 0 ;; '-o'|'--output') diff -Nru util-linux-2.31.1/ChangeLog util-linux-2.32/ChangeLog --- util-linux-2.31.1/ChangeLog 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/ChangeLog 2018-03-21 14:27:39.143705023 +0000 @@ -1,3 +1,3 @@ See version control history. -http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=log;h=2.31.1 +http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=log;h=2.32 diff -Nru util-linux-2.31.1/config/ar-lib util-linux-2.32/config/ar-lib --- util-linux-2.31.1/config/ar-lib 1970-01-01 00:00:00.000000000 +0000 +++ util-linux-2.32/config/ar-lib 2017-08-15 07:25:07.000000000 +0000 @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010-2017 Free Software Foundation, Inc. +# Written by Peter Rosin . +# +# 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, 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 . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv in + mingw) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat <. # # This program is free software; you can redistribute it and/or modify @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -342,6 +343,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru util-linux-2.31.1/config/config.guess util-linux-2.32/config/config.guess --- util-linux-2.31.1/config/config.guess 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config/config.guess 2017-08-15 07:25:07.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-10-02' +timestamp='2017-08-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -259,6 +259,9 @@ *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; + *:Redox:*:*) + echo ${UNAME_MACHINE}-unknown-redox + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -837,10 +840,11 @@ UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -1303,14 +1307,21 @@ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1334,15 +1345,18 @@ *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) + NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; @@ -1418,8 +1432,8 @@ $0: unable to guess system type This script (version $timestamp), has failed to recognize the -operating system you are using. If your script is old, overwrite -config.guess and config.sub with the latest versions from: +operating system you are using. If your script is old, overwrite *all* +copies of config.guess and config.sub with the latest versions from: http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess and diff -Nru util-linux-2.31.1/config/config.sub util-linux-2.32/config/config.sub --- util-linux-2.31.1/config/config.sub 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config/config.sub 2017-08-15 07:25:07.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-09-05' +timestamp='2017-04-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -263,7 +263,7 @@ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -301,6 +301,7 @@ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ @@ -314,6 +315,7 @@ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ + | wasm32 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -387,7 +389,7 @@ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -428,6 +430,7 @@ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ @@ -444,6 +447,7 @@ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -946,6 +950,9 @@ nsr-tandem) basic_machine=nsr-tandem ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -1241,6 +1248,9 @@ basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none @@ -1395,7 +1405,7 @@ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ @@ -1407,7 +1417,7 @@ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1636,6 +1646,9 @@ sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; diff -Nru util-linux-2.31.1/config/depcomp util-linux-2.32/config/depcomp --- util-linux-2.31.1/config/depcomp 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config/depcomp 2017-08-15 07:25:07.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # 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 @@ -786,6 +786,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru util-linux-2.31.1/config/gtk-doc.make util-linux-2.32/config/gtk-doc.make --- util-linux-2.31.1/config/gtk-doc.make 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config/gtk-doc.make 2018-02-09 12:22:55.151084281 +0000 @@ -169,6 +169,7 @@ ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html ) $(AM_V_GEN)gtkdoc-fixxref --module-dir=html \ + --module=$(DOC_MODULE) \ --html-dir=$(HTML_DIR) \ $(FIXXREF_OPTIONS) @touch html-build.stamp diff -Nru util-linux-2.31.1/config/install-sh util-linux-2.32/config/install-sh --- util-linux-2.31.1/config/install-sh 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config/install-sh 2017-08-15 07:25:07.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2013-12-25.23; # UTC +scriptversion=2016-01-11.22; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -496,6 +496,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru util-linux-2.31.1/config/missing util-linux-2.32/config/missing --- util-linux-2.31.1/config/missing 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config/missing 2017-08-15 07:25:07.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -210,6 +210,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru util-linux-2.31.1/config/py-compile util-linux-2.32/config/py-compile --- util-linux-2.31.1/config/py-compile 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config/py-compile 2017-08-15 07:25:07.000000000 +0000 @@ -1,9 +1,9 @@ #!/bin/sh # py-compile - Compile a Python program -scriptversion=2011-06-08.12; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 2000-2014 Free Software Foundation, Inc. +# Copyright (C) 2000-2017 Free Software Foundation, Inc. # 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 @@ -165,6 +165,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru util-linux-2.31.1/config/ylwrap util-linux-2.32/config/ylwrap --- util-linux-2.31.1/config/ylwrap 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config/ylwrap 2017-08-15 07:25:07.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2013-01-12.17; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # Written by Tom Tromey . # @@ -242,6 +242,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru util-linux-2.31.1/config.h.in util-linux-2.32/config.h.in --- util-linux-2.31.1/config.h.in 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/config.h.in 2018-03-21 14:25:31.000000000 +0000 @@ -74,6 +74,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `eaccess' function. */ +#undef HAVE_EACCESS + /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H @@ -167,9 +170,15 @@ /* Define to 1 if you have the `jrand48' function. */ #undef HAVE_JRAND48 +/* Define if langinfo.h defines ALTMON_x constants */ +#undef HAVE_LANGINFO_ALTMON + /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H +/* Define if langinfo.h defines _NL_ABALTMON_x constants */ +#undef HAVE_LANGINFO_NL_ABALTMON + /* Define to 1 if you have the header file. */ #undef HAVE_LASTLOG_H @@ -251,12 +260,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_FD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_FS_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_GSMMUX_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_MAJOR_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NET_NAMESPACE_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_RAW_H @@ -482,6 +497,12 @@ /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE +/* Define to 1 if you have the `swapoff' function. */ +#undef HAVE_SWAPOFF + +/* Define to 1 if you have the `swapon' function. */ +#undef HAVE_SWAPON + /* Define to 1 if you have the `sysconf' function. */ #undef HAVE_SYSCONF @@ -700,9 +721,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Is swapon() declared with two parameters? */ -#undef SWAPON_HAS_TWO_ARGS - /* Fallback syscall number for fallocate */ #undef SYS_fallocate @@ -727,6 +745,12 @@ /* Fallback syscall number for setns */ #undef SYS_setns +/* Fallback syscall number for swapoff */ +#undef SYS_swapoff + +/* Fallback syscall number for swapon */ +#undef SYS_swapon + /* Fallback syscall number for unshare */ #undef SYS_unshare diff -Nru util-linux-2.31.1/configure util-linux-2.32/configure --- util-linux-2.31.1/configure 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/configure 2018-03-21 14:25:31.324557805 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for util-linux 2.31.1. +# Generated by GNU Autoconf 2.69 for util-linux 2.32. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='util-linux' PACKAGE_TARNAME='util-linux' -PACKAGE_VERSION='2.31.1' -PACKAGE_STRING='util-linux 2.31.1' +PACKAGE_VERSION='2.32' +PACKAGE_STRING='util-linux 2.32' PACKAGE_BUGREPORT='kzak@redhat.com' PACKAGE_URL='http://www.kernel.org/pub/linux/utils/util-linux/' @@ -659,6 +659,7 @@ ac_c_werror_flag= ac_c_werror_flag= ac_c_werror_flag= +ac_c_werror_flag= gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE @@ -1087,8 +1088,6 @@ DSYMUTIL MANIFEST_TOOL RANLIB -ac_ct_AR -AR DLLTOOL OBJDUMP LN_S @@ -1116,6 +1115,8 @@ usrsbin_execdir usrbin_execdir runstatedir +ac_ct_AR +AR AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V @@ -1206,6 +1207,7 @@ enable_option_checking enable_dependency_tracking enable_silent_rules +enable_asan enable_shared enable_static with_pic @@ -1905,7 +1907,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures util-linux 2.31.1 to adapt to many kinds of systems. +\`configure' configures util-linux 2.32 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1975,7 +1977,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of util-linux 2.31.1:";; + short | recursive ) echo "Configuration of util-linux 2.32:";; esac cat <<\_ACEOF @@ -1989,6 +1991,7 @@ speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") + --enable-asan compile with Address Sanitizer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -2287,7 +2290,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -util-linux configure 2.31.1 +util-linux configure 2.32 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2813,7 +2816,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by util-linux $as_me 2.31.1, which was +It was created by util-linux $as_me 2.32, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -5052,7 +5055,7 @@ # Define the identity of the package. PACKAGE='util-linux' - VERSION='2.31.1' + VERSION='2.32' cat >>confdefs.h <<_ACEOF @@ -5398,6 +5401,177 @@ fi AM_BACKSLASH='\' +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + @@ -5409,7 +5583,7 @@ sub("-.*","",$3); print $3 ~ /^[0-9]+$/ ? $3 : 0}') LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE" -LIBBLKID_DATE="19-Dec-2017" +LIBBLKID_DATE="21-Mar-2018" LIBBLKID_LT_MAJOR=1 LIBBLKID_LT_MINOR=1 LIBBLKID_LT_MICRO=0 @@ -7404,6 +7578,66 @@ + +# Check whether --enable-asan was given. +if test "${enable_asan+set}" = set; then : + enableval=$enable_asan; +else + enable_asan=no + +fi + +if test "x$enable_asan" = xyes; then : + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fsanitize=address" >&5 +$as_echo_n "checking whether compiler handles -fsanitize=address... " >&6; } +if ${ul_cv_warn__fsanitize_address+:} false; then : + $as_echo_n "(cached) " >&6 +else + + # store AC_LANG_WERROR status, then turn it on + save_ac_c_werror_flag="${ac_c_werror_flag}" + +ac_c_werror_flag=yes + + ul_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-Werror ${CPPFLAGS} -fsanitize=address" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ul_cv_warn__fsanitize_address=yes +else + ul_cv_warn__fsanitize_address=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext + # restore AC_LANG_WERROR + ac_c_werror_flag="${save_ac_c_werror_flag}" + + CPPFLAGS="$ul_save_CPPFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ul_cv_warn__fsanitize_address" >&5 +$as_echo "$ul_cv_warn__fsanitize_address" >&6; } + if test "x$ul_cv_warn__fsanitize_address" = xyes; then : + as_fn_append WARN_CFLAGS " -fsanitize=address" +fi + + +fi + + + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -18142,6 +18376,7 @@ linux/tiocl.h \ linux/version.h \ linux/securebits.h \ + linux/net_namespace.h \ locale.h \ mntent.h \ net/if.h \ @@ -18198,6 +18433,28 @@ done +# There is a collision in old kernel-headers. The both files mount.h and fs.h +# define MS_* macros. Fixed by kernel commit e462ec50cb5fad19f6003a3d8087f4a0945dd2b1. +# +for ac_header in linux/fs.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_MOUNT_H + # include + # include + #endif + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + for ac_header in linux/gsmmux.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -18310,6 +18567,98 @@ done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_x constants" >&5 +$as_echo_n "checking whether langinfo.h defines ALTMON_x constants... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main () +{ + + char *str; + str = nl_langinfo (ALTMON_1); + str = nl_langinfo (ALTMON_2); + str = nl_langinfo (ALTMON_3); + str = nl_langinfo (ALTMON_4); + str = nl_langinfo (ALTMON_5); + str = nl_langinfo (ALTMON_6); + str = nl_langinfo (ALTMON_7); + str = nl_langinfo (ALTMON_8); + str = nl_langinfo (ALTMON_9); + str = nl_langinfo (ALTMON_10); + str = nl_langinfo (ALTMON_11); + str = nl_langinfo (ALTMON_12); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_LANGINFO_ALTMON 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines _NL_ABALTMON_x constants" >&5 +$as_echo_n "checking whether langinfo.h defines _NL_ABALTMON_x constants... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main () +{ + + char *str; + str = nl_langinfo (_NL_ABALTMON_1); + str = nl_langinfo (_NL_ABALTMON_2); + str = nl_langinfo (_NL_ABALTMON_3); + str = nl_langinfo (_NL_ABALTMON_4); + str = nl_langinfo (_NL_ABALTMON_5); + str = nl_langinfo (_NL_ABALTMON_6); + str = nl_langinfo (_NL_ABALTMON_7); + str = nl_langinfo (_NL_ABALTMON_8); + str = nl_langinfo (_NL_ABALTMON_9); + str = nl_langinfo (_NL_ABALTMON_10); + str = nl_langinfo (_NL_ABALTMON_11); + str = nl_langinfo (_NL_ABALTMON_12); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_LANGINFO_NL_ABALTMON 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + have_linux_version_h=$ac_cv_header_linux_version_h have_linux_blkzoned_h=$ac_cv_header_linux_blkzoned_h have_linux_btrfs_h=$ac_cv_header_linux_btrfs_h @@ -18382,35 +18731,6 @@ fi -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_SWAP_H -# include -#endif -#include - -int -main () -{ -swapon("/dev/null", 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define SWAPON_HAS_TWO_ARGS 1" >>confdefs.h - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Your libc thinks that swapon has 1 arg only." >&5 -$as_echo "$as_me: Your libc thinks that swapon has 1 arg only." >&6;} - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - ac_fn_c_check_decl "$LINENO" "_NL_TIME_WEEK_1STDAY" "ac_cv_have_decl__NL_TIME_WEEK_1STDAY" "#include " if test "x$ac_cv_have_decl__NL_TIME_WEEK_1STDAY" = xyes; then : @@ -18500,6 +18820,7 @@ __fpending \ secure_getenv \ __secure_getenv \ + eaccess \ err \ errx \ explicit_bzero \ @@ -22393,7 +22714,7 @@ fi -if test "x$enable_libmount_support_mtab" == xyes; then : +if test "x$enable_libmount_support_mtab" = xyes; then : $as_echo "#define USE_LIBMOUNT_SUPPORT_MTAB 1" >>confdefs.h @@ -23293,7 +23614,7 @@ esac fi -if test "x$build_uuidd" = xyes || test "x$enable_libuuid_force_uuidd" == xyes ; then : +if test "x$build_uuidd" = xyes || test "x$enable_libuuid_force_uuidd" = xyes; then : $as_echo "#define HAVE_UUIDD 1" >>confdefs.h @@ -24602,12 +24923,12 @@ yes:yes) build_agetty=yes ;; yes:*) - as_fn_error $? "agetty selected, but required GNU utmpx fucntions not available" "$LINENO" 5;; + as_fn_error $? "agetty selected, but required GNU utmpx functions not available" "$LINENO" 5;; check:yes) build_agetty=yes ;; check:*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx fucntions not found; not building agetty" >&5 -$as_echo "$as_me: WARNING: GNU utmpx fucntions not found; not building agetty" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx functions not found; not building agetty" >&5 +$as_echo "$as_me: WARNING: GNU utmpx functions not found; not building agetty" >&2;} build_agetty=no ;; esac fi @@ -25227,6 +25548,196 @@ + + if test "x$build_swapon" != xno; then + if test "x$enable_swapon" = xno; then + build_swapon=no + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syscall swapon" >&5 +$as_echo_n "checking for syscall swapon... " >&6; } +if ${ul_cv_syscall_swapon+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +int test = SYS_swapon; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + syscall=SYS_swapon +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +int test = _NR_swapon; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + syscall=_NR_swapon +else + + syscall=no + if test "x$linux_os" = xyes; then + case $host_cpu in + + esac + fi + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + ul_cv_syscall_swapon=$syscall + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ul_cv_syscall_swapon" >&5 +$as_echo "$ul_cv_syscall_swapon" >&6; } + case $ul_cv_syscall_swapon in #( + no) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to detect syscall swapon." >&5 +$as_echo "$as_me: WARNING: Unable to detect syscall swapon." >&2;} ;; + SYS_*) ;; + *) +cat >>confdefs.h <<_ACEOF +#define SYS_swapon $ul_cv_syscall_swapon +_ACEOF + ;; + esac + + case $enable_swapon:$ul_cv_syscall_swapon in #( + no:*) + build_swapon=no ;; + yes:no) + as_fn_error $? "swapon selected but swapon syscall not found" "$LINENO" 5 ;; + check:no) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swapon syscall not found; not building swapon" >&5 +$as_echo "$as_me: WARNING: swapon syscall not found; not building swapon" >&2;} + build_swapon=no ;; + *) + build_swapon=yes ;; + esac + fi + fi + + + + + + if test "x$build_swapon" != xno; then + if test "x$enable_swapon" = xno; then + build_swapon=no + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syscall swapoff" >&5 +$as_echo_n "checking for syscall swapoff... " >&6; } +if ${ul_cv_syscall_swapoff+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +int test = SYS_swapoff; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + syscall=SYS_swapoff +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +int test = _NR_swapoff; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + syscall=_NR_swapoff +else + + syscall=no + if test "x$linux_os" = xyes; then + case $host_cpu in + + esac + fi + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + ul_cv_syscall_swapoff=$syscall + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ul_cv_syscall_swapoff" >&5 +$as_echo "$ul_cv_syscall_swapoff" >&6; } + case $ul_cv_syscall_swapoff in #( + no) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to detect syscall swapoff." >&5 +$as_echo "$as_me: WARNING: Unable to detect syscall swapoff." >&2;} ;; + SYS_*) ;; + *) +cat >>confdefs.h <<_ACEOF +#define SYS_swapoff $ul_cv_syscall_swapoff +_ACEOF + ;; + esac + + case $enable_swapon:$ul_cv_syscall_swapoff in #( + no:*) + build_swapon=no ;; + yes:no) + as_fn_error $? "swapon selected but swapoff syscall not found" "$LINENO" 5 ;; + check:no) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swapoff syscall not found; not building swapon" >&5 +$as_echo "$as_me: WARNING: swapoff syscall not found; not building swapon" >&2;} + build_swapon=no ;; + *) + build_swapon=yes ;; + esac + fi + fi + + + + if test "x$build_swapon" != xno; then case $enable_swapon:$build_libblkid in #( no:*) @@ -25292,6 +25803,28 @@ BUILD_SWAPON_FALSE= fi +for ac_func in swapon +do : + ac_fn_c_check_func "$LINENO" "swapon" "ac_cv_func_swapon" +if test "x$ac_cv_func_swapon" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SWAPON 1 +_ACEOF + +fi +done + +for ac_func in swapoff +do : + ac_fn_c_check_func "$LINENO" "swapoff" "ac_cv_func_swapoff" +if test "x$ac_cv_func_swapoff" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SWAPOFF 1 +_ACEOF + +fi +done + @@ -25603,12 +26136,12 @@ yes:yes) build_lslogins=yes ;; yes:*) - as_fn_error $? "lslogins selected, but required GNU utmpx fucntions not available" "$LINENO" 5;; + as_fn_error $? "lslogins selected, but required GNU utmpx functions not available" "$LINENO" 5;; check:yes) build_lslogins=yes ;; check:*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx fucntions not found; not building lslogins" >&5 -$as_echo "$as_me: WARNING: GNU utmpx fucntions not found; not building lslogins" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx functions not found; not building lslogins" >&5 +$as_echo "$as_me: WARNING: GNU utmpx functions not found; not building lslogins" >&2;} build_lslogins=no ;; esac fi @@ -26967,6 +27500,26 @@ esac fi + + + + if test "x$build_lsns" != xno; then + case $enable_lsns:$build_libmount in #( + no:*) + build_lsns=no ;; + yes:yes) + build_lsns=yes ;; + yes:*) + as_fn_error $? "libmount is needed to build lsns" "$LINENO" 5;; + check:yes) + build_lsns=yes ;; + check:*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libmount disabled; not building lsns" >&5 +$as_echo "$as_me: WARNING: libmount disabled; not building lsns" >&2;} + build_lsns=no ;; + esac + fi + if test "x$build_lsns" = xyes; then BUILD_LSNS_TRUE= BUILD_LSNS_FALSE='#' @@ -28005,12 +28558,12 @@ yes:yes) build_last=yes ;; yes:*) - as_fn_error $? "last selected, but required GNU utmpx fucntions not available" "$LINENO" 5;; + as_fn_error $? "last selected, but required GNU utmpx functions not available" "$LINENO" 5;; check:yes) build_last=yes ;; check:*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx fucntions not found; not building last" >&5 -$as_echo "$as_me: WARNING: GNU utmpx fucntions not found; not building last" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx functions not found; not building last" >&5 +$as_echo "$as_me: WARNING: GNU utmpx functions not found; not building last" >&2;} build_last=no ;; esac fi @@ -28092,12 +28645,12 @@ yes:yes) build_utmpdump=yes ;; yes:*) - as_fn_error $? "utmpdump selected, but required GNU utmpx fucntions not available" "$LINENO" 5;; + as_fn_error $? "utmpdump selected, but required GNU utmpx functions not available" "$LINENO" 5;; check:yes) build_utmpdump=yes ;; check:*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx fucntions not found; not building utmpdump" >&5 -$as_echo "$as_me: WARNING: GNU utmpx fucntions not found; not building utmpdump" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx functions not found; not building utmpdump" >&5 +$as_echo "$as_me: WARNING: GNU utmpx functions not found; not building utmpdump" >&2;} build_utmpdump=no ;; esac fi @@ -28777,12 +29330,12 @@ yes:yes) build_login=yes ;; yes:*) - as_fn_error $? "login selected, but required GNU utmpx fucntions not available" "$LINENO" 5;; + as_fn_error $? "login selected, but required GNU utmpx functions not available" "$LINENO" 5;; check:yes) build_login=yes ;; check:*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx fucntions not found; not building login" >&5 -$as_echo "$as_me: WARNING: GNU utmpx fucntions not found; not building login" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx functions not found; not building login" >&5 +$as_echo "$as_me: WARNING: GNU utmpx functions not found; not building login" >&2;} build_login=no ;; esac fi @@ -29018,12 +29571,12 @@ yes:yes) build_su=yes ;; yes:*) - as_fn_error $? "su selected, but required GNU utmpx fucntions not available" "$LINENO" 5;; + as_fn_error $? "su selected, but required GNU utmpx functions not available" "$LINENO" 5;; check:yes) build_su=yes ;; check:*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx fucntions not found; not building su" >&5 -$as_echo "$as_me: WARNING: GNU utmpx fucntions not found; not building su" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx functions not found; not building su" >&5 +$as_echo "$as_me: WARNING: GNU utmpx functions not found; not building su" >&2;} build_su=no ;; esac fi @@ -29132,12 +29685,12 @@ yes:yes) build_runuser=yes ;; yes:*) - as_fn_error $? "runuser selected, but required GNU utmpx fucntions not available" "$LINENO" 5;; + as_fn_error $? "runuser selected, but required GNU utmpx functions not available" "$LINENO" 5;; check:yes) build_runuser=yes ;; check:*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx fucntions not found; not building runuser" >&5 -$as_echo "$as_me: WARNING: GNU utmpx fucntions not found; not building runuser" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx functions not found; not building runuser" >&5 +$as_echo "$as_me: WARNING: GNU utmpx functions not found; not building runuser" >&2;} build_runuser=no ;; esac fi @@ -30086,12 +30639,12 @@ yes:yes) build_write=yes ;; yes:*) - as_fn_error $? "write selected, but required GNU utmpx fucntions not available" "$LINENO" 5;; + as_fn_error $? "write selected, but required GNU utmpx functions not available" "$LINENO" 5;; check:yes) build_write=yes ;; check:*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx fucntions not found; not building write" >&5 -$as_echo "$as_me: WARNING: GNU utmpx fucntions not found; not building write" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU utmpx functions not found; not building write" >&5 +$as_echo "$as_me: WARNING: GNU utmpx functions not found; not building write" >&2;} build_write=no ;; esac fi @@ -30544,7 +31097,7 @@ $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -31063,7 +31616,7 @@ fi -if test "x$enable_usrdir_path" == xyes; then : +if test "x$enable_usrdir_path" = xyes; then : $as_echo "#define USE_USRDIR_PATHS_ONLY 1" >>confdefs.h @@ -32369,7 +32922,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by util-linux $as_me 2.31.1, which was +This file was extended by util-linux $as_me 2.32, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -32436,7 +32989,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -util-linux config.status 2.31.1 +util-linux config.status 2.32 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru util-linux-2.31.1/configure.ac util-linux-2.32/configure.ac --- util-linux-2.31.1/configure.ac 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/configure.ac 2018-03-21 14:01:16.440301929 +0000 @@ -11,10 +11,11 @@ dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors. AC_USE_SYSTEM_EXTENSIONS -AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects]) +AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_CONFIG_SRCDIR([sys-utils/mount.c]) AC_PREFIX_DEFAULT([/usr]) @@ -28,7 +29,7 @@ dnl libblkid version LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE" -LIBBLKID_DATE="19-Dec-2017" +LIBBLKID_DATE="21-Mar-2018" LIBBLKID_LT_MAJOR=1 LIBBLKID_LT_MINOR=1 LIBBLKID_LT_MICRO=0 @@ -141,6 +142,17 @@ UL_WARN_ADD([-Wno-unused-parameter], [NO_UNUSED_WARN_CFLAGS]) AC_SUBST([NO_UNUSED_WARN_CFLAGS]) + +AC_ARG_ENABLE([asan], + AS_HELP_STRING([--enable-asan], [compile with Address Sanitizer]), + [], [enable_asan=no] +) +AS_IF([test "x$enable_asan" = xyes], [ + UL_WARN_ADD([-fsanitize=address]) +]) + + + dnl libtool-2 LT_INIT @@ -223,6 +235,7 @@ linux/tiocl.h \ linux/version.h \ linux/securebits.h \ + linux/net_namespace.h \ locale.h \ mntent.h \ net/if.h \ @@ -267,6 +280,16 @@ utmpx.h \ ]) +# There is a collision in old kernel-headers. The both files mount.h and fs.h +# define MS_* macros. Fixed by kernel commit e462ec50cb5fad19f6003a3d8087f4a0945dd2b1. +# +AC_CHECK_HEADERS([linux/fs.h ], [], [], + [#ifdef HAVE_SYS_MOUNT_H + # include + # include + #endif +]) + AC_CHECK_HEADERS([linux/gsmmux.h ], [], [], [#ifdef LINUX_GSMMUX_H # include @@ -293,6 +316,58 @@ [AM_CONDITIONAL([HAVE_LANGINFO], [true])], [AM_CONDITIONAL([HAVE_LANGINFO], [false])]) +AC_MSG_CHECKING([whether langinfo.h defines ALTMON_x constants]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +]], [[ + char *str; + str = nl_langinfo (ALTMON_1); + str = nl_langinfo (ALTMON_2); + str = nl_langinfo (ALTMON_3); + str = nl_langinfo (ALTMON_4); + str = nl_langinfo (ALTMON_5); + str = nl_langinfo (ALTMON_6); + str = nl_langinfo (ALTMON_7); + str = nl_langinfo (ALTMON_8); + str = nl_langinfo (ALTMON_9); + str = nl_langinfo (ALTMON_10); + str = nl_langinfo (ALTMON_11); + str = nl_langinfo (ALTMON_12); +]])], [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_LANGINFO_ALTMON], [1], + [Define if langinfo.h defines ALTMON_x constants]) +], [ + AC_MSG_RESULT([no]) +]) + + +AC_MSG_CHECKING([whether langinfo.h defines _NL_ABALTMON_x constants]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include +]], [[ + char *str; + str = nl_langinfo (_NL_ABALTMON_1); + str = nl_langinfo (_NL_ABALTMON_2); + str = nl_langinfo (_NL_ABALTMON_3); + str = nl_langinfo (_NL_ABALTMON_4); + str = nl_langinfo (_NL_ABALTMON_5); + str = nl_langinfo (_NL_ABALTMON_6); + str = nl_langinfo (_NL_ABALTMON_7); + str = nl_langinfo (_NL_ABALTMON_8); + str = nl_langinfo (_NL_ABALTMON_9); + str = nl_langinfo (_NL_ABALTMON_10); + str = nl_langinfo (_NL_ABALTMON_11); + str = nl_langinfo (_NL_ABALTMON_12); +]])], [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_LANGINFO_NL_ABALTMON], [1], + [Define if langinfo.h defines _NL_ABALTMON_x constants]) +], [ + AC_MSG_RESULT([no]) +]) + + dnl Convert some ac_cv_header_* variables to have_* dnl have_linux_version_h=$ac_cv_header_linux_version_h @@ -331,20 +406,6 @@ AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec],,, [#include ]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM( -[[ -#ifdef HAVE_SYS_SWAP_H -# include -#endif -#include -]], -[[swapon("/dev/null", 0);]])], -[AC_DEFINE([SWAPON_HAS_TWO_ARGS], [1], [Is swapon() declared with two parameters?]) -], -[AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.]) -]) - - AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include ]]) AC_CHECK_DECL([llseek], @@ -391,6 +452,7 @@ __fpending \ secure_getenv \ __secure_getenv \ + eaccess \ err \ errx \ explicit_bzero \ @@ -1028,7 +1090,7 @@ [], [enable_libmount_support_mtab=no] ) -AS_IF([test "x$enable_libmount_support_mtab" == xyes], [ +AS_IF([test "x$enable_libmount_support_mtab" = xyes], [ AC_DEFINE([USE_LIBMOUNT_SUPPORT_MTAB], [1], [Define to 1 if want to support mtab.]) ]) @@ -1150,7 +1212,7 @@ UL_REQUIRES_BUILD([uuidd], [libuuid]) UL_REQUIRES_HAVE([uuidd], [timer], [timer_create function]) UL_REQUIRES_HAVE([uuidd], [sys_signalfd_h], [sys/signalfd.h header]) -AS_IF([test "x$build_uuidd" = xyes || test "x$enable_libuuid_force_uuidd" == xyes ], [ +AS_IF([test "x$build_uuidd" = xyes || test "x$enable_libuuid_force_uuidd" = xyes], [ AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.]) ]) AM_CONDITIONAL([BUILD_UUIDD], [test "x$build_uuidd" = xyes]) @@ -1325,7 +1387,7 @@ ) UL_BUILD_INIT([agetty]) UL_REQUIRES_HAVE([agetty], [utmpx_h], [utmpx.h header]) -UL_REQUIRES_HAVE([agetty], [gnu_utmpx], [GNU utmpx fucntions]) +UL_REQUIRES_HAVE([agetty], [gnu_utmpx], [GNU utmpx functions]) AM_CONDITIONAL([BUILD_AGETTY], [test "x$build_agetty" = xyes]) AS_IF([test "x$have_futimens" = xyes -a "x$have_inotify_init1" = xyes ], [ AC_DEFINE([AGETTY_RELOAD], [1], [Enable agetty --reload feature]) @@ -1418,10 +1480,14 @@ UL_BUILD_INIT([swapon], [check]) UL_REQUIRES_LINUX([swapon]) +UL_REQUIRES_SYSCALL_CHECK([swapon], [UL_CHECK_SYSCALL([swapon])], [swapon]) +UL_REQUIRES_SYSCALL_CHECK([swapon], [UL_CHECK_SYSCALL([swapoff])], [swapoff]) UL_REQUIRES_BUILD([swapon], [libblkid]) UL_REQUIRES_BUILD([swapon], [libmount]) UL_REQUIRES_BUILD([swapon], [libsmartcols]) AM_CONDITIONAL([BUILD_SWAPON], [test "x$build_swapon" = xyes]) +AC_CHECK_FUNCS([swapon]) +AC_CHECK_FUNCS([swapoff]) UL_BUILD_INIT([lsblk], [check]) @@ -1447,7 +1513,7 @@ UL_REQUIRES_BUILD([lslogins], [libsmartcols]) UL_REQUIRES_HAVE([lslogins], [shadow_h], [shadow.h header]) UL_REQUIRES_HAVE([lslogins], [utmpx_h], [utmpx.h header]) -UL_REQUIRES_HAVE([lslogins], [gnu_utmpx], [GNU utmpx fucntions]) +UL_REQUIRES_HAVE([lslogins], [gnu_utmpx], [GNU utmpx functions]) AM_CONDITIONAL([BUILD_LSLOGINS], [test "x$build_lslogins" = xyes]) @@ -1606,6 +1672,7 @@ UL_BUILD_INIT([lsns], [check]) UL_REQUIRES_LINUX([lsns]) UL_REQUIRES_BUILD([lsns], [libsmartcols]) +UL_REQUIRES_BUILD([lsns], [libmount]) AM_CONDITIONAL([BUILD_LSNS], [test "x$build_lsns" = xyes]) UL_BUILD_INIT([renice], [yes]) @@ -1723,7 +1790,7 @@ ) UL_BUILD_INIT([last]) UL_REQUIRES_HAVE([last], [utmpx_h], [utmpx.h header]) -UL_REQUIRES_HAVE([last], [gnu_utmpx], [GNU utmpx fucntions]) +UL_REQUIRES_HAVE([last], [gnu_utmpx], [GNU utmpx functions]) AM_CONDITIONAL([BUILD_LAST], [test "x$build_last" = xyes]) @@ -1733,7 +1800,7 @@ ) UL_BUILD_INIT([utmpdump]) UL_REQUIRES_HAVE([utmpdump], [utmpx_h], [utmpx.h header]) -UL_REQUIRES_HAVE([utmpdump], [gnu_utmpx], [GNU utmpx fucntions]) +UL_REQUIRES_HAVE([utmpdump], [gnu_utmpx], [GNU utmpx functions]) AM_CONDITIONAL([BUILD_UTMPDUMP], [test "x$build_utmpdump" = xyes]) @@ -1846,7 +1913,7 @@ UL_REQUIRES_HAVE([login], [security_pam_appl_h], [PAM header file]) UL_REQUIRES_HAVE([login], [security_pam_misc_h, security_openpam_h], [PAM conversation functions]) UL_REQUIRES_HAVE([login], [utmpx_h], [utmpx.h header]) -UL_REQUIRES_HAVE([login], [gnu_utmpx], [GNU utmpx fucntions]) +UL_REQUIRES_HAVE([login], [gnu_utmpx], [GNU utmpx functions]) AM_CONDITIONAL([BUILD_LOGIN], [test "x$build_login" = xyes]) AC_ARG_ENABLE([login-chown-vcs], @@ -1892,7 +1959,7 @@ UL_BUILD_INIT([su]) UL_REQUIRES_HAVE([su], [security_pam_appl_h], [PAM header file]) UL_REQUIRES_HAVE([su], [utmpx_h], [utmpx.h header]) -UL_REQUIRES_HAVE([su], [gnu_utmpx], [GNU utmpx fucntions]) +UL_REQUIRES_HAVE([su], [gnu_utmpx], [GNU utmpx functions]) AM_CONDITIONAL([BUILD_SU], [test "x$build_su" = xyes]) @@ -1903,7 +1970,7 @@ UL_BUILD_INIT([runuser]) UL_REQUIRES_HAVE([runuser], [security_pam_appl_h], [PAM header file]) UL_REQUIRES_HAVE([runuser], [utmpx_h], [utmpx.h header]) -UL_REQUIRES_HAVE([runuser], [gnu_utmpx], [GNU utmpx fucntions]) +UL_REQUIRES_HAVE([runuser], [gnu_utmpx], [GNU utmpx functions]) AM_CONDITIONAL([BUILD_RUNUSER], [test "x$build_runuser" = xyes]) @@ -2018,7 +2085,7 @@ ) UL_BUILD_INIT([write]) UL_REQUIRES_HAVE([write], [utmpx_h], [utmpx.h header]) -UL_REQUIRES_HAVE([write], [gnu_utmpx], [GNU utmpx fucntions]) +UL_REQUIRES_HAVE([write], [gnu_utmpx], [GNU utmpx functions]) AM_CONDITIONAL([BUILD_WRITE], [test "x$build_write" = xyes]) @@ -2224,7 +2291,7 @@ [], [enable_usrdir_path=no] ) -AS_IF([test "x$enable_usrdir_path" == xyes], [ +AS_IF([test "x$enable_usrdir_path" = xyes], [ AC_DEFINE([USE_USRDIR_PATHS_ONLY], [1], [Define to 1 to remove /bin and /sbin from PATH env.variable]) ]) diff -Nru util-linux-2.31.1/debian/changelog util-linux-2.32/debian/changelog --- util-linux-2.31.1/debian/changelog 2018-05-03 13:18:49.000000000 +0000 +++ util-linux-2.32/debian/changelog 2018-05-15 13:45:21.000000000 +0000 @@ -1,3 +1,60 @@ +util-linux (2.32-0.1ubuntu1) cosmic; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Build hwclock with audit support. + - Drop debian/hwclock.rules and hwclock.default, recent kernels sync the + RTC automatically. + - Add sulogin-fallback-static-sh.patch: Add support for /bin/static-sh as + fallback if the regular shell fails to execute. Patch ported from + sysvinit. (see LP #505887) + - Add sulogin-lockedpwd.patch: Make sure file systems can be fixed on + machines with locked root accounts (as Ubuntu does by default). Don't + require --force for sulogin. + - Drop the Breaks: cloud-utils, Ubuntu has a different cloud-utils + packaging and this does not affect Ubuntu ≥ 16.04 any more. + - Add debian/util-linux.maintscript to clean upstart jobs on upgrade. This + needs to be kept until after 18.04 LTS. + - Clean up weekly fstrim cron file, now a systemd timer unit. + - Remove obsolete upstart job files on upgrade of rfkill. This change + can be dropped after Ubuntu 18.04. + - Update s390-tools breaks/replaces, to the correct version for ubuntu. + - Enable fstrim.timer by default. + * Dropped changes, merged upstream: + - Cherrypick upstream patches to add zones support to lsmem/chmem. + - lscpu: Decode ARM CPUs (patch taken from 2.32) + * Bugs fixed in new upstream release: + - possible crash in min/max frequency (LP: #1771345) + + -- Julian Andres Klode Tue, 15 May 2018 15:45:21 +0200 + +util-linux (2.32-0.1) unstable; urgency=medium + + * Non-maintainer upload. + [ Ben Hutchings ] + * debian/control: Remove mention of minimum kernel version for rfkill + + [ Laurent Bigonville ] + * New upstream release. + - Drop all the patches merged upstream + * debian/libfdisk1.symbols: Add new exported symbols + + -- Laurent Bigonville Thu, 10 May 2018 17:22:53 +0200 + +util-linux (2.31.1-0.5) unstable; urgency=medium + + * Non-maintainer upload. + + [ Laurent Bigonville ] + * debian/rules: Enable SMACK support for libmount + * Enable audit support (Closes: #745771) + + [ Salvatore Bonaccorso ] + * bash-completion: (umount) use findmnt, escape a space in paths. + (CVE-2018-7738) + Fixes "code execution in bash-completion for umount". (Closes: #892179) + + -- Salvatore Bonaccorso Tue, 06 Mar 2018 22:31:39 +0100 + util-linux (2.31.1-0.4ubuntu4) cosmic; urgency=medium * No-change rebuild for ncurses soname changes. diff -Nru util-linux-2.31.1/debian/control util-linux-2.32/debian/control --- util-linux-2.31.1/debian/control 2018-03-02 00:40:40.000000000 +0000 +++ util-linux-2.32/debian/control 2018-05-10 22:59:25.000000000 +0000 @@ -4,6 +4,7 @@ dh-exec (>= 0.13), dpkg-dev (>= 1.17.14), gettext, + libaudit-dev [linux-any] , libcap-ng-dev [linux-any] , libncurses5-dev, libncursesw5-dev, @@ -390,6 +391,4 @@ rfkill is a simple tool for accessing the Linux rfkill device interface, which is used to enable and disable wireless networking devices, typically WLAN, Bluetooth and mobile broadband. - . - rfkill uses /dev/rfkill, which is present in Linux kernel 2.6.31 and later. diff -Nru util-linux-2.31.1/debian/libfdisk1.symbols util-linux-2.32/debian/libfdisk1.symbols --- util-linux-2.31.1/debian/libfdisk1.symbols 2018-02-14 22:20:23.000000000 +0000 +++ util-linux-2.32/debian/libfdisk1.symbols 2018-05-10 22:59:24.000000000 +0000 @@ -5,6 +5,7 @@ FDISK_2.29@FDISK_2.29 2.29~rc2 FDISK_2.30@FDISK_2.30 2.30.2 FDISK_2.31@FDISK_2.31 2.31.1 + FDISK_2.32@FDISK_2.32 2.32 fdisk_add_partition@FDISK_2.26 2.26.2 fdisk_align_lba@FDISK_2.26 2.26.2 fdisk_align_lba_in_range@FDISK_2.26 2.26.2 @@ -114,6 +115,9 @@ fdisk_label_get_field_by_name@FDISK_2.26 2.26.2 fdisk_label_get_fields_ids@FDISK_2.26 2.26.2 fdisk_label_get_fields_ids_all@FDISK_2.27 2.27~rc1 + fdisk_label_get_geomrange_cylinders@FDISK_2.32 2.32 + fdisk_label_get_geomrange_heads@FDISK_2.32 2.32 + fdisk_label_get_geomrange_sectors@FDISK_2.32 2.32 fdisk_label_get_name@FDISK_2.26 2.26.2 fdisk_label_get_nparttypes@FDISK_2.26 2.26.2 fdisk_label_get_parttype@FDISK_2.26 2.26.2 diff -Nru util-linux-2.31.1/debian/patches/0001-lsmem-chmem-add-memory-zone-awareness.patch util-linux-2.32/debian/patches/0001-lsmem-chmem-add-memory-zone-awareness.patch --- util-linux-2.31.1/debian/patches/0001-lsmem-chmem-add-memory-zone-awareness.patch 2018-02-14 22:20:35.000000000 +0000 +++ util-linux-2.32/debian/patches/0001-lsmem-chmem-add-memory-zone-awareness.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,525 +0,0 @@ -From 4266f916ea8c233a54003281b50f781777f16927 Mon Sep 17 00:00:00 2001 -From: Gerald Schaefer -Date: Wed, 27 Sep 2017 19:44:44 +0200 -Subject: [PATCH 1/3] lsmem/chmem: add memory zone awareness - -With this patch, valid memory zones can be shown with lsmem, and chmem can -set memory online/offline in a specific memory zone, if allowed by the -kernel. The valid memory zones are read from the "valid_zones" sysfs -attribute, and setting memory online to a specific zone is done by -echoing "online_kernel" or "online_movable" to the "state" sysfs -attribute, in addition to the previous "online". - -This patch also changes the default behavior of chmem, when setting memory -online without specifying a memory zone. If valid, memory will be set -online to the zone Movable. This zone is preferable for memory hotplug, as -it makes memory offline much more likely to succeed. - -Signed-off-by: Gerald Schaefer ---- - sys-utils/chmem.8 | 19 ++++++++ - sys-utils/chmem.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++---- - sys-utils/lsmem.1 | 4 +- - sys-utils/lsmem.c | 98 +++++++++++++++++++++++++++++++++++++- - 4 files changed, 247 insertions(+), 11 deletions(-) - ---- a/sys-utils/chmem.8 -+++ b/sys-utils/chmem.8 -@@ -5,6 +5,7 @@ - .B chmem - .RB [ \-h "] [" \-V "] [" \-v "] [" \-e | \-d "]" - [\fISIZE\fP|\fIRANGE\fP|\fB\-b\fP \fIBLOCKRANGE\fP] -+[-z ZONE] - .SH DESCRIPTION - The chmem command sets a particular size or range of memory online or offline. - . -@@ -25,6 +26,19 @@ - range. Alternatively a single block can be specified. \fIBLOCKRANGE\fP requires - the \fB--blocks\fP option. - . -+.IP "\(hy" 2 -+Specify \fIZONE\fP as the name of a memory zone, as shown in the output of the -+\fBlsmem -o +ZONES\fP command. The output shows one or more valid memory zones -+for each memory range. If multiple zones are shown, then the memory range -+currently belongs to the first zone. By default, chmem will set memory online -+to the zone Movable, if this is among the valid zones. This default can be -+changed by specifying the \fB--zone\fP option with another valid zone. -+For memory ballooning, it is recommended to select the zone Movable for memory -+online and offline, if possible. Memory in this zone is much more likely to be -+able to be offlined again, but it cannot be used for arbitrary kernel -+allocations, only for migratable pages (e.g. anonymous and page cache pages). -+Use the \fB\-\-help\fR option to see all available zones. -+. - .PP - \fISIZE\fP and \fIRANGE\fP must be aligned to the Linux memory block size, as - shown in the output of the \fBlsmem\fP command. -@@ -51,6 +65,11 @@ - .BR \-e ", " \-\-enable - Set the specified \fIRANGE\fP, \fISIZE\fP, or \fIBLOCKRANGE\fP of memory online. - .TP -+.BR \-z ", " \-\-zone -+Select the memory \fIZONE\fP where to set the specified \fIRANGE\fP, \fISIZE\fP, -+or \fIBLOCKRANGE\fP of memory online or offline. By default, memory will be set -+online to the zone Movable, if possible. -+.TP - .BR \-h ", " \-\-help - Print a short help text, then exit. - .TP ---- a/sys-utils/chmem.c -+++ b/sys-utils/chmem.c -@@ -49,6 +49,7 @@ - unsigned int use_blocks : 1; - unsigned int is_size : 1; - unsigned int verbose : 1; -+ unsigned int have_zones : 1; - }; - - enum { -@@ -57,6 +58,38 @@ - CMD_NONE - }; - -+enum zone_id { -+ ZONE_DMA = 0, -+ ZONE_DMA32, -+ ZONE_NORMAL, -+ ZONE_HIGHMEM, -+ ZONE_MOVABLE, -+ ZONE_DEVICE, -+}; -+ -+static char *zone_names[] = { -+ [ZONE_DMA] = "DMA", -+ [ZONE_DMA32] = "DMA32", -+ [ZONE_NORMAL] = "Normal", -+ [ZONE_HIGHMEM] = "Highmem", -+ [ZONE_MOVABLE] = "Movable", -+ [ZONE_DEVICE] = "Device", -+}; -+ -+/* -+ * name must be null-terminated -+ */ -+static int zone_name_to_id(const char *name) -+{ -+ size_t i; -+ -+ for (i = 0; i < ARRAY_SIZE(zone_names); i++) { -+ if (!strcasecmp(name, zone_names[i])) -+ return i; -+ } -+ return -1; -+} -+ - static void idxtostr(struct chmem_desc *desc, uint64_t idx, char *buf, size_t bufsz) - { - uint64_t start, end; -@@ -68,22 +101,49 @@ - idx, start, end); - } - --static int chmem_size(struct chmem_desc *desc, int enable) -+static int chmem_size(struct chmem_desc *desc, int enable, int zone_id) - { - char *name, *onoff, line[BUFSIZ], str[BUFSIZ]; - uint64_t size, index; -+ const char *zn; - int i, rc; - - size = desc->size; - onoff = enable ? "online" : "offline"; - i = enable ? 0 : desc->ndirs - 1; - -+ if (enable && zone_id >= 0) { -+ if (zone_id == ZONE_MOVABLE) -+ onoff = "online_movable"; -+ else -+ onoff = "online_kernel"; -+ } -+ - for (; i >= 0 && i < desc->ndirs && size; i += enable ? 1 : -1) { - name = desc->dirs[i]->d_name; - index = strtou64_or_err(name + 6, _("Failed to parse index")); - path_read_str(line, sizeof(line), _PATH_SYS_MEMORY "/%s/state", name); -- if (strcmp(onoff, line) == 0) -+ if (strncmp(onoff, line, 6) == 0) - continue; -+ -+ if (desc->have_zones) { -+ path_read_str(line, sizeof(line), -+ _PATH_SYS_MEMORY "/%s/valid_zones", name); -+ if (zone_id >= 0) { -+ zn = zone_names[zone_id]; -+ if (enable && !strcasestr(line, zn)) -+ continue; -+ if (!enable && strncasecmp(line, zn, strlen(zn))) -+ continue; -+ } else if (enable) { -+ /* By default, use zone Movable for online, if valid */ -+ if (strcasestr(line, zone_names[ZONE_MOVABLE])) -+ onoff = "online_movable"; -+ else -+ onoff = "online"; -+ } -+ } -+ - idxtostr(desc, index, str, sizeof(str)); - rc = path_write_str(onoff, _PATH_SYS_MEMORY"/%s/state", name); - if (rc == -1 && desc->verbose) { -@@ -115,15 +175,23 @@ - return size == 0 ? 0 : size == desc->size ? -1 : 1; - } - --static int chmem_range(struct chmem_desc *desc, int enable) -+static int chmem_range(struct chmem_desc *desc, int enable, int zone_id) - { - char *name, *onoff, line[BUFSIZ], str[BUFSIZ]; - uint64_t index, todo; -+ const char *zn; - int i, rc; - - todo = desc->end - desc->start + 1; - onoff = enable ? "online" : "offline"; - -+ if (enable && zone_id >= 0) { -+ if (zone_id == ZONE_MOVABLE) -+ onoff = "online_movable"; -+ else -+ onoff = "online_kernel"; -+ } -+ - for (i = 0; i < desc->ndirs; i++) { - name = desc->dirs[i]->d_name; - index = strtou64_or_err(name + 6, _("Failed to parse index")); -@@ -133,7 +201,7 @@ - break; - idxtostr(desc, index, str, sizeof(str)); - path_read_str(line, sizeof(line), _PATH_SYS_MEMORY "/%s/state", name); -- if (strcmp(onoff, line) == 0) { -+ if (strncmp(onoff, line, 6) == 0) { - if (desc->verbose && enable) - fprintf(stdout, _("%s already enabled\n"), str); - else if (desc->verbose && !enable) -@@ -141,6 +209,29 @@ - todo--; - continue; - } -+ -+ if (desc->have_zones) { -+ path_read_str(line, sizeof(line), -+ _PATH_SYS_MEMORY "/%s/valid_zones", name); -+ if (zone_id >= 0) { -+ zn = zone_names[zone_id]; -+ if (enable && !strcasestr(line, zn)) { -+ warnx(_("%s enable failed: Zone mismatch"), str); -+ continue; -+ } -+ if (!enable && strncasecmp(line, zn, strlen(zn))) { -+ warnx(_("%s disable failed: Zone mismatch"), str); -+ continue; -+ } -+ } else if (enable) { -+ /* By default, use zone Movable for online, if valid */ -+ if (strcasestr(line, zone_names[ZONE_MOVABLE])) -+ onoff = "online_movable"; -+ else -+ onoff = "online"; -+ } -+ } -+ - rc = path_write_str(onoff, _PATH_SYS_MEMORY"/%s/state", name); - if (rc == -1) { - if (enable) -@@ -236,6 +327,8 @@ - - static void __attribute__((__noreturn__)) usage(void) - { -+ unsigned int i; -+ - FILE *out = stdout; - fputs(USAGE_HEADER, out); - fprintf(out, _(" %s [options] [SIZE|RANGE|BLOCKRANGE]\n"), program_invocation_short_name); -@@ -247,6 +340,14 @@ - fputs(_(" -e, --enable enable memory\n"), out); - fputs(_(" -d, --disable disable memory\n"), out); - fputs(_(" -b, --blocks use memory blocks\n"), out); -+ fputs(_(" -z, --zone select memory zone ("), out); -+ for (i = 0; i < ARRAY_SIZE(zone_names); i++) { -+ fputs(zone_names[i], out); -+ if (i < ARRAY_SIZE(zone_names) - 1) -+ fputc('|', out); -+ } -+ fputs(")\n", out); -+ - fputs(_(" -v, --verbose verbose output\n"), out); - fputs(USAGE_SEPARATOR, out); - printf(USAGE_HELP_OPTIONS(16)); -@@ -259,7 +360,8 @@ - int main(int argc, char **argv) - { - struct chmem_desc _desc = { }, *desc = &_desc; -- int cmd = CMD_NONE; -+ int cmd = CMD_NONE, zone_id = -1; -+ char *zone = NULL; - int c, rc; - - static const struct option longopts[] = { -@@ -269,6 +371,7 @@ - {"help", no_argument, NULL, 'h'}, - {"verbose", no_argument, NULL, 'v'}, - {"version", no_argument, NULL, 'V'}, -+ {"zone", required_argument, NULL, 'z'}, - {NULL, 0, NULL, 0} - }; - -@@ -285,7 +388,7 @@ - - read_info(desc); - -- while ((c = getopt_long(argc, argv, "bdehvV", longopts, NULL)) != -1) { -+ while ((c = getopt_long(argc, argv, "bdehvVz:", longopts, NULL)) != -1) { - - err_exclusive_options(c, longopts, excl, excl_st); - -@@ -308,6 +411,9 @@ - case 'V': - printf(UTIL_LINUX_VERSION); - return EXIT_SUCCESS; -+ case 'z': -+ zone = xstrdup(optarg); -+ break; - default: - errtryhelp(EXIT_FAILURE); - } -@@ -320,10 +426,24 @@ - - parse_parameter(desc, argv[optind]); - -+ /* The valid_zones sysfs attribute was introduced with kernel 3.18 */ -+ if (path_exist(_PATH_SYS_MEMORY "/memory0/valid_zones")) -+ desc->have_zones = 1; -+ else if (zone) -+ warnx(_("zone ignored, no valid_zones sysfs attribute present")); -+ -+ if (zone && desc->have_zones) { -+ zone_id = zone_name_to_id(zone); -+ if (zone_id == -1) { -+ warnx(_("unknown memory zone: %s"), zone); -+ errtryhelp(EXIT_FAILURE); -+ } -+ } -+ - if (desc->is_size) -- rc = chmem_size(desc, cmd == CMD_MEMORY_ENABLE ? 1 : 0); -+ rc = chmem_size(desc, cmd == CMD_MEMORY_ENABLE ? 1 : 0, zone_id); - else -- rc = chmem_range(desc, cmd == CMD_MEMORY_ENABLE ? 1 : 0); -+ rc = chmem_range(desc, cmd == CMD_MEMORY_ENABLE ? 1 : 0, zone_id); - - return rc == 0 ? EXIT_SUCCESS : - rc < 0 ? EXIT_FAILURE : CHMEM_EXIT_SOMEOK; ---- a/sys-utils/lsmem.1 -+++ b/sys-utils/lsmem.1 -@@ -41,12 +41,12 @@ - .BR \-o , " \-\-output " \fIlist\fP - Specify which output columns to print. Use \fB\-\-help\fR - to get a list of all supported columns. -+The default list of columns may be extended if \fIlist\fP is -+specified in the format \fB+\fIlist\fP (e.g. \fBlsmem \-o +NODE\fP). - .TP - .BR \-P , " \-\-pairs" - Produce output in the form of key="value" pairs. - All potentially unsafe characters are hex-escaped (\\x). --The default list of columns may be extended if \fIlist\fP is --specified in the format \fB+\fIlist\fP (e.g. \fBlsmem \-o +NODE\fP). - .TP - .BR \-r , " \-\-raw" - Produce output in raw format. All potentially unsafe characters are hex-escaped ---- a/sys-utils/lsmem.c -+++ b/sys-utils/lsmem.c -@@ -42,11 +42,25 @@ - #define MEMORY_STATE_GOING_OFFLINE 2 - #define MEMORY_STATE_UNKNOWN 3 - -+enum zone_id { -+ ZONE_DMA = 0, -+ ZONE_DMA32, -+ ZONE_NORMAL, -+ ZONE_HIGHMEM, -+ ZONE_MOVABLE, -+ ZONE_DEVICE, -+ ZONE_NONE, -+ ZONE_UNKNOWN, -+ MAX_NR_ZONES, -+}; -+ - struct memory_block { - uint64_t index; - uint64_t count; - int state; - int node; -+ int nr_zones; -+ int zones[MAX_NR_ZONES]; - unsigned int removable:1; - }; - -@@ -72,7 +86,9 @@ - want_state : 1, - want_removable : 1, - want_summary : 1, -- want_table : 1; -+ want_table : 1, -+ want_zones : 1, -+ have_zones : 1; - }; - - enum { -@@ -82,6 +98,18 @@ - COL_REMOVABLE, - COL_BLOCK, - COL_NODE, -+ COL_ZONES, -+}; -+ -+static char *zone_names[] = { -+ [ZONE_DMA] = "DMA", -+ [ZONE_DMA32] = "DMA32", -+ [ZONE_NORMAL] = "Normal", -+ [ZONE_HIGHMEM] = "Highmem", -+ [ZONE_MOVABLE] = "Movable", -+ [ZONE_DEVICE] = "Device", -+ [ZONE_NONE] = "None", /* block contains more than one zone, can't be offlined */ -+ [ZONE_UNKNOWN] = "Unknown", - }; - - /* column names */ -@@ -102,6 +130,7 @@ - [COL_REMOVABLE] = { "REMOVABLE", 0, SCOLS_FL_RIGHT, N_("memory is removable")}, - [COL_BLOCK] = { "BLOCK", 0, SCOLS_FL_RIGHT, N_("memory block number or blocks range")}, - [COL_NODE] = { "NODE", 0, SCOLS_FL_RIGHT, N_("numa node of memory")}, -+ [COL_ZONES] = { "ZONES", 0, SCOLS_FL_RIGHT, N_("valid zones for the memory range")}, - }; - - /* columns[] array specifies all currently wanted output column. The columns -@@ -120,6 +149,20 @@ - return idx; - } - -+/* -+ * name must be null-terminated -+ */ -+static int zone_name_to_id(const char *name) -+{ -+ size_t i; -+ -+ for (i = 0; i < ARRAY_SIZE(zone_names); i++) { -+ if (!strcasecmp(name, zone_names[i])) -+ return i; -+ } -+ return ZONE_UNKNOWN; -+} -+ - #define add_column(ary, n, id) \ - ((ary)[ err_columns_index(ARRAY_SIZE(ary), (n)) ] = (id)) - -@@ -214,6 +257,25 @@ - else - str = xstrdup("-"); - break; -+ case COL_ZONES: -+ if (lsmem->have_zones) { -+ char valid_zones[BUFSIZ]; -+ int j, zone_id; -+ -+ valid_zones[0] = '\0'; -+ for (j = 0; j < blk->nr_zones; j++) { -+ zone_id = blk->zones[j]; -+ if (strlen(valid_zones) + -+ strlen(zone_names[zone_id]) > BUFSIZ - 2) -+ break; -+ strcat(valid_zones, zone_names[zone_id]); -+ if (j + 1 < blk->nr_zones) -+ strcat(valid_zones, "/"); -+ } -+ str = xstrdup(valid_zones); -+ } else -+ str = xstrdup("-"); -+ break; - } - - if (str && scols_line_refer_data(line, i, str) != 0) -@@ -272,7 +334,9 @@ - static void memory_block_read_attrs(struct lsmem *lsmem, char *name, - struct memory_block *blk) - { -+ char *token = NULL; - char line[BUFSIZ]; -+ int i; - - blk->count = 1; - blk->index = strtoumax(name + 6, NULL, 10); /* get of "memory" */ -@@ -287,11 +351,26 @@ - blk->state = MEMORY_STATE_GOING_OFFLINE; - if (lsmem->have_nodes) - blk->node = memory_block_get_node(name); -+ -+ blk->nr_zones = 0; -+ if (lsmem->have_zones) { -+ path_read_str(line, sizeof(line), _PATH_SYS_MEMORY"/%s/%s", name, -+ "valid_zones"); -+ token = strtok(line, " "); -+ } -+ for (i = 0; i < MAX_NR_ZONES; i++) { -+ if (token) { -+ blk->zones[i] = zone_name_to_id(token); -+ blk->nr_zones++; -+ token = strtok(NULL, " "); -+ } -+ } - } - - static int is_mergeable(struct lsmem *lsmem, struct memory_block *blk) - { - struct memory_block *curr; -+ int i; - - if (!lsmem->nblocks) - return 0; -@@ -308,6 +387,15 @@ - if (curr->node != blk->node) - return 0; - } -+ if (lsmem->want_zones && lsmem->have_zones) { -+ if (curr->nr_zones != blk->nr_zones) -+ return 0; -+ for (i = 0; i < curr->nr_zones; i++) { -+ if (curr->zones[i] == ZONE_UNKNOWN || -+ curr->zones[i] != blk->zones[i]) -+ return 0; -+ } -+ } - return 1; - } - -@@ -362,6 +450,12 @@ - - if (memory_block_get_node(lsmem->dirs[0]->d_name) != -1) - lsmem->have_nodes = 1; -+ -+ /* The valid_zones sysfs attribute was introduced with kernel 3.18 */ -+ if (path_exist(_PATH_SYS_MEMORY "/memory0/valid_zones")) -+ lsmem->have_zones = 1; -+ else if (lsmem->want_zones) -+ warnx(_("Cannot read zones, no valid_zones sysfs attribute present")); - } - - static void __attribute__((__noreturn__)) usage(void) -@@ -553,6 +647,8 @@ - lsmem->want_node = 1; - if (has_column(COL_REMOVABLE)) - lsmem->want_removable = 1; -+ if (has_column(COL_ZONES)) -+ lsmem->want_zones = 1; - - /* - * Read data and print output diff -Nru util-linux-2.31.1/debian/patches/0002-tests-lsmem-update-lsmem-test-with-ZONES-column.patch util-linux-2.32/debian/patches/0002-tests-lsmem-update-lsmem-test-with-ZONES-column.patch --- util-linux-2.31.1/debian/patches/0002-tests-lsmem-update-lsmem-test-with-ZONES-column.patch 2017-11-17 14:53:09.000000000 +0000 +++ util-linux-2.32/debian/patches/0002-tests-lsmem-update-lsmem-test-with-ZONES-column.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -From 2dfcdd36d416ef7df54735862257263dce73b3c9 Mon Sep 17 00:00:00 2001 -From: Gerald Schaefer -Date: Wed, 27 Sep 2017 19:44:45 +0200 -Subject: [PATCH 2/3] tests/lsmem: update lsmem test with ZONES column - -The existing s390 and x86_64 dumps already contain the valid_zones sysfs -attribute, so just add a new "lsmem -o +ZONES" test command and update -the expected results. - -Signed-off-by: Gerald Schaefer ---- - tests/expected/lsmem/lsmem-s390-zvm-6g | 21 ++++++++++++++++++ - tests/expected/lsmem/lsmem-x86_64-16g | 39 ++++++++++++++++++++++++++++++++++ - tests/ts/lsmem/lsmem | 1 + - 3 files changed, 61 insertions(+) - -diff --git a/tests/expected/lsmem/lsmem-s390-zvm-6g b/tests/expected/lsmem/lsmem-s390-zvm-6g -index 05af40d..9f4c805 100644 ---- a/tests/expected/lsmem/lsmem-s390-zvm-6g -+++ b/tests/expected/lsmem/lsmem-s390-zvm-6g -@@ -106,3 +106,24 @@ $ lsmem --json --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE - {"range": "0x0000000140000000-0x000000017fffffff", "size": "1G", "state": "offline", "removable": "-", "block": "20-23", "node": "0"} - ] - } -+ -+--- -+ -+$ lsmem -o +ZONES -+RANGE SIZE STATE REMOVABLE BLOCK ZONES -+0x0000000000000000-0x000000006fffffff 1.8G online yes 0-6 DMA -+0x0000000070000000-0x000000007fffffff 256M online no 7 DMA/Normal -+0x0000000080000000-0x000000009fffffff 512M online yes 8-9 Normal -+0x00000000a0000000-0x00000000bfffffff 512M online no 10-11 Normal -+0x00000000c0000000-0x00000000dfffffff 512M online yes 12-13 Normal -+0x00000000e0000000-0x00000000efffffff 256M offline - 14 Normal -+0x00000000f0000000-0x00000000ffffffff 256M online yes 15 Normal -+0x0000000100000000-0x000000010fffffff 256M online no 16 Normal -+0x0000000110000000-0x000000011fffffff 256M online no 17 Normal/Movable -+0x0000000120000000-0x000000012fffffff 256M online yes 18 Movable/Normal -+0x0000000130000000-0x000000013fffffff 256M online yes 19 Movable -+0x0000000140000000-0x000000017fffffff 1G offline - 20-23 Movable -+ -+Memory block size: 256M -+Total online memory: 4.8G -+Total offline memory: 1.3G -diff --git a/tests/expected/lsmem/lsmem-x86_64-16g b/tests/expected/lsmem/lsmem-x86_64-16g -index 14d7d84..40316a5 100644 ---- a/tests/expected/lsmem/lsmem-x86_64-16g -+++ b/tests/expected/lsmem/lsmem-x86_64-16g -@@ -269,3 +269,42 @@ $ lsmem --json --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE - {"range": "0x0000000438000000-0x000000043fffffff", "size": "128M", "state": "online", "removable": "no", "block": "135", "node": "0"} - ] - } -+ -+--- -+ -+$ lsmem -o +ZONES -+RANGE SIZE STATE REMOVABLE BLOCK ZONES -+0x0000000000000000-0x0000000007ffffff 128M online no 0 None -+0x0000000008000000-0x0000000037ffffff 768M online yes 1-6 DMA32 -+0x0000000038000000-0x000000003fffffff 128M online no 7 DMA32 -+0x0000000040000000-0x0000000077ffffff 896M online yes 8-14 DMA32 -+0x0000000078000000-0x000000007fffffff 128M online no 15 DMA32 -+0x0000000080000000-0x00000000afffffff 768M online yes 16-21 DMA32 -+0x00000000b0000000-0x00000000bfffffff 256M online no 22-23 DMA32 -+0x0000000100000000-0x00000001a7ffffff 2.6G online no 32-52 Normal -+0x00000001a8000000-0x00000001afffffff 128M online yes 53 Normal -+0x00000001b0000000-0x00000001bfffffff 256M online no 54-55 Normal -+0x00000001c0000000-0x00000001ffffffff 1G online yes 56-63 Normal -+0x0000000200000000-0x0000000207ffffff 128M online no 64 Normal -+0x0000000208000000-0x000000021fffffff 384M online yes 65-67 Normal -+0x0000000220000000-0x0000000237ffffff 384M online no 68-70 Normal -+0x0000000238000000-0x0000000277ffffff 1G online yes 71-78 Normal -+0x0000000278000000-0x000000028fffffff 384M online no 79-81 Normal -+0x0000000290000000-0x0000000297ffffff 128M online yes 82 Normal -+0x0000000298000000-0x00000002a7ffffff 256M online no 83-84 Normal -+0x00000002a8000000-0x00000002c7ffffff 512M online yes 85-88 Normal -+0x00000002c8000000-0x00000002dfffffff 384M online no 89-91 Normal -+0x00000002e0000000-0x00000002efffffff 256M online yes 92-93 Normal -+0x00000002f0000000-0x000000034fffffff 1.5G online no 94-105 Normal -+0x0000000350000000-0x0000000357ffffff 128M online yes 106 Normal -+0x0000000358000000-0x000000036fffffff 384M online no 107-109 Normal -+0x0000000370000000-0x0000000377ffffff 128M online yes 110 Normal -+0x0000000378000000-0x00000003c7ffffff 1.3G online no 111-120 Normal -+0x00000003c8000000-0x00000003e7ffffff 512M online yes 121-124 Normal -+0x00000003e8000000-0x000000042fffffff 1.1G online no 125-133 Normal -+0x0000000430000000-0x0000000437ffffff 128M online yes 134 Normal -+0x0000000438000000-0x000000043fffffff 128M online no 135 None -+ -+Memory block size: 128M -+Total online memory: 16G -+Total offline memory: 0B -diff --git a/tests/ts/lsmem/lsmem b/tests/ts/lsmem/lsmem -index 79c0523..b131377 100755 ---- a/tests/ts/lsmem/lsmem -+++ b/tests/ts/lsmem/lsmem -@@ -49,6 +49,7 @@ for dump in $(ls $TS_SELF/dumps/*.tar.bz2 | sort); do - do_lsmem --all --output $LSCOLUMNS - do_lsmem --raw --output $LSCOLUMNS - do_lsmem --json --output $LSCOLUMNS -+ do_lsmem -o +ZONES - - ts_finalize_subtest - done --- -2.7.4 - diff -Nru util-linux-2.31.1/debian/patches/0003-lsmem-chmem-add-memory-zone-awareness-to-bash-comple.patch util-linux-2.32/debian/patches/0003-lsmem-chmem-add-memory-zone-awareness-to-bash-comple.patch --- util-linux-2.31.1/debian/patches/0003-lsmem-chmem-add-memory-zone-awareness-to-bash-comple.patch 2018-02-14 22:20:35.000000000 +0000 +++ util-linux-2.32/debian/patches/0003-lsmem-chmem-add-memory-zone-awareness-to-bash-comple.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -From 891a976e6aeaa4db4a3bf3807b020750cc1e323a Mon Sep 17 00:00:00 2001 -From: Andre Wild -Date: Wed, 27 Sep 2017 19:44:46 +0200 -Subject: [PATCH 3/3] lsmem/chmem: add memory zone awareness to bash-completion - -This patch extends the valid --output values with ZONES for the -lsmem bash-completion, and adds the --zone option for the chmem -bash-completion. - -Signed-off-by: Andre Wild -Signed-off-by: Gerald Schaefer ---- - bash-completion/chmem | 1 + - bash-completion/lsmem | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - ---- a/bash-completion/chmem -+++ b/bash-completion/chmem -@@ -16,6 +16,7 @@ - --disable - --blocks - --verbose -+ --zone - --help - --version - " ---- a/bash-completion/lsmem -+++ b/bash-completion/lsmem -@@ -9,7 +9,7 @@ - local prefix realcur OUTPUT_ALL OUTPUT - realcur="${cur##*,}" - prefix="${cur%$realcur}" -- OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE' -+ OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE ZONES' - for WORD in $OUTPUT_ALL; do - if ! [[ $prefix == *"$WORD"* ]]; then - OUTPUT="$WORD ${OUTPUT:-""}" diff -Nru util-linux-2.31.1/debian/patches/docs-update-AUTHORS-file.patch util-linux-2.32/debian/patches/docs-update-AUTHORS-file.patch --- util-linux-2.31.1/debian/patches/docs-update-AUTHORS-file.patch 2018-02-14 14:53:19.000000000 +0000 +++ util-linux-2.32/debian/patches/docs-update-AUTHORS-file.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -From: Karel Zak -Date: Tue, 13 Feb 2018 11:16:02 +0100 -Subject: docs: update AUTHORS file - -Signed-off-by: Karel Zak ---- - AUTHORS | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/AUTHORS b/AUTHORS -index e8024cf..bfd2978 100644 ---- a/AUTHORS -+++ b/AUTHORS -@@ -89,6 +89,7 @@ CONTRIBUTORS: - Ævar Arnfjörð Bjarmason - Alain Guibert - Alan Curry -+ Alan Jenkins - Alan Wendt - Alden Tondettar - Alejandro Martinez Ruiz -@@ -112,12 +113,14 @@ CONTRIBUTORS: - Andreas Henriksson - Andreas Schwab - Andreas Vogel -+ Andre Wild - Andrew McGill - Andrew Nayenko - Andrew Vagin - Andrew Wilcox - Andrii Bordunov - Andrzej Krzysztofowicz -+ Andy Grover - Andy Lutomirski - Aner Perez - Anna Jonna Ármannsdóttir -@@ -259,6 +262,7 @@ CONTRIBUTORS: - Gabriele Giacone <1o5g4r8o@gmail.com> - Gabriel M. Schuyler - Georg Schiesser -+ Gerald Schaefer - Gerhard Schneider - Gerrit Renker - Giacomo -@@ -333,6 +337,7 @@ CONTRIBUTORS: - Jiro SEKIBA - Joe Hansen - Johannes Berg -+ John Groves - John Keeping - John Lindgren - John Paul Morrison -@@ -358,6 +363,7 @@ CONTRIBUTORS: - Kees Cook - Ken Kopin - Kent Overstreet -+ Kenyon Ralph - kernc - Kevin E. Martin - kevin.granade@gmail.com -@@ -372,6 +378,7 @@ CONTRIBUTORS: - Lawrence Rust - Lennart Poettering - Liam Ryan -+ Libor Bukata - Linus Torvalds - Li Zefan - Lubomir Kundrak -@@ -448,6 +455,8 @@ CONTRIBUTORS: - Nicolai Langfeldt - Nicolas Boichat - Nicolas Provost -+ Niklas Hambüchen -+ Nik Nyby - Nikolay Sivov - Nilgün Belma Bugüner - Norbert Buchmuller -@@ -495,9 +504,12 @@ CONTRIBUTORS: - Pierre Hauweele - Pietro Castelli - Po-Yu Chuang -+ Prarit Bhargava - Rafael Aquini - Rafael Ferreira -+ Rafael Fontenelle - Rafael Fontenelle -+ Rafal Luzynski - Rafał Miłecki - Raghavendra D Prabhu - Rainer Gerhards -@@ -516,6 +528,7 @@ CONTRIBUTORS: - Richard Yao - Rickard Faith - Rick Sladkey -+ Riku Voipio - Rik van Riel - Robert Förster - Robert Millan -@@ -573,11 +586,13 @@ CONTRIBUTORS: - Steven Honeyman - Steven J. Magnani - Steven S. Dick -+ Steven Smith - Steve Philp - Stewart Smith - Sukadev Bhattiprolu - Sven Eckelmann - Sven Jost -+ Sweet Tea Dorminy - Takeshi Hamasaki - Terry Burton - Theodore Ts'o -@@ -602,6 +617,7 @@ CONTRIBUTORS: - Tommi Kyntola - Tommy Thorn - Tom Prince -+ Tony Asleson - Torsten Hilbrich - Toshi Kani - Trần Ngọc Quân -@@ -617,6 +633,7 @@ CONTRIBUTORS: - Vladimir 'φ-coder/phcoder' Serbinenko - Volker Kuhlmann - Volker Schatz -+ Vratislav Podzimek - Waldemar Brodkorb - WANG Chao - Wanlong Gao diff -Nru util-linux-2.31.1/debian/patches/fsck.cramfs-fix-crash-when-superblock-size-is-too-small.patch util-linux-2.32/debian/patches/fsck.cramfs-fix-crash-when-superblock-size-is-too-small.patch --- util-linux-2.31.1/debian/patches/fsck.cramfs-fix-crash-when-superblock-size-is-too-small.patch 2018-02-14 14:53:19.000000000 +0000 +++ util-linux-2.32/debian/patches/fsck.cramfs-fix-crash-when-superblock-size-is-too-small.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -From: Ruediger Meier -Date: Tue, 23 Jan 2018 16:59:23 +0100 -Subject: fsck.cramfs: fix crash when superblock size is too small - -This hopefully fixes the original problem addressed by the reverted -patch 7cb962c7. - -The bug was introduced by myself in - f991dbd3 "fsck.cramfs: allow smaller superblock sizes" - -CC: Tobias Stoeckmann -Signed-off-by: Ruediger Meier ---- - disk-utils/fsck.cramfs.c | 2 +- - tests/expected/cramfs/fsck-bad-header | 3 +-- - tests/ts/cramfs/fsck-bad-header | 2 +- - 3 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c -index 50c7d33..820816b 100644 ---- a/disk-utils/fsck.cramfs.c -+++ b/disk-utils/fsck.cramfs.c -@@ -192,7 +192,7 @@ static void test_super(int *start, size_t * length) - errx(FSCK_EX_ERROR, _("unsupported filesystem features")); - - /* What are valid superblock sizes? */ -- if (super.size < sizeof(struct cramfs_super)) -+ if (super.size < *start + sizeof(struct cramfs_super)) - errx(FSCK_EX_UNCORRECTED, _("superblock size (%d) too small"), - super.size); - -diff --git a/tests/expected/cramfs/fsck-bad-header b/tests/expected/cramfs/fsck-bad-header -index ade8a9c..41c2c12 100644 ---- a/tests/expected/cramfs/fsck-bad-header -+++ b/tests/expected/cramfs/fsck-bad-header -@@ -1,2 +1 @@ --fsck.cramfs: file extends past end of filesystem --fsck.cramfs: crc error -+fsck.cramfs: superblock size (76) too small -diff --git a/tests/ts/cramfs/fsck-bad-header b/tests/ts/cramfs/fsck-bad-header -index 8d5309c..add3885 100755 ---- a/tests/ts/cramfs/fsck-bad-header -+++ b/tests/ts/cramfs/fsck-bad-header -@@ -16,7 +16,7 @@ - # GNU General Public License for more details. - # - TS_TOPDIR="${0%/*}/../.." --TS_DESC="fsck endianness" -+TS_DESC="fsck bad header" - - . $TS_TOPDIR/functions.sh - ts_init "$*" diff -Nru util-linux-2.31.1/debian/patches/lib-sha1-fix-indention.patch util-linux-2.32/debian/patches/lib-sha1-fix-indention.patch --- util-linux-2.31.1/debian/patches/lib-sha1-fix-indention.patch 2018-02-14 14:53:19.000000000 +0000 +++ util-linux-2.32/debian/patches/lib-sha1-fix-indention.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,506 +0,0 @@ -From: Karel Zak -Date: Tue, 12 Dec 2017 11:42:28 +0100 -Subject: lib/sha1: fix indention - -* indent -linux -psl -blf lib/sha1.c -* manually fix comments - -Signed-off-by: Karel Zak -(cherry picked from commit 3ae2cb49d9a8c20de1892c691b7cc86f4deb280c) ---- - lib/sha1.c | 427 ++++++++++++++++++++++++++++--------------------------------- - 1 file changed, 195 insertions(+), 232 deletions(-) - -diff --git a/lib/sha1.c b/lib/sha1.c -index 62c0367..e87677c 100644 ---- a/lib/sha1.c -+++ b/lib/sha1.c -@@ -1,43 +1,34 @@ - /* --SHA-1 in C --By Steve Reid --100% Public Domain -+ * SHA-1 in C by Steve Reid -+ * 100% Public Domain -+ * -+ * Test Vectors (from FIPS PUB 180-1) -+ * 1) "abc": A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D -+ * 2) "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq": 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 -+ * 3) A million repetitions of "a": 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F -+ */ - --Test Vectors (from FIPS PUB 180-1) --"abc" -- A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D --"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" -- 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 --A million repetitions of "a" -- 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F --*/ -- --/* #define LITTLE_ENDIAN * This should be #define'd already, if true. */ --/* #define SHA1HANDSOFF * Copies data before messing with it. */ -- --#define SHA1HANDSOFF -+#define UL_SHA1HANDSOFF - - #include - #include -- --/* for uint32_t */ - #include - - #include "sha1.h" - -- - #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) - - /* blk0() and blk() perform the initial expand. */ - /* I got the idea of expanding during the round function from SSLeay */ - #if BYTE_ORDER == LITTLE_ENDIAN --#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ -+# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ - |(rol(block->l[i],8)&0x00FF00FF)) - #elif BYTE_ORDER == BIG_ENDIAN --#define blk0(i) block->l[i] -+# define blk0(i) block->l[i] - #else --#error "Endianness not defined!" -+# error "Endianness not defined!" - #endif -+ - #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ - ^block->l[(i+2)&15]^block->l[i&15],1)) - -@@ -48,249 +39,221 @@ A million repetitions of "a" - #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); - #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); - -- - /* Hash a single 512-bit block. This is the core of the algorithm. */ - --void ul_SHA1Transform( -- uint32_t state[5], -- const unsigned char buffer[64] --) -+void ul_SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) - { -- uint32_t a, b, c, d, e; -+ uint32_t a, b, c, d, e; - -- typedef union -- { -- unsigned char c[64]; -- uint32_t l[16]; -- } CHAR64LONG16; -+ typedef union { -+ unsigned char c[64]; -+ uint32_t l[16]; -+ } CHAR64LONG16; - --#ifdef SHA1HANDSOFF -- CHAR64LONG16 block[1]; /* use array to appear as a pointer */ -+#ifdef UL_SHA1HANDSOFF -+ CHAR64LONG16 block[1]; /* use array to appear as a pointer */ - -- memcpy(block, buffer, 64); -+ memcpy(block, buffer, 64); - #else -- /* The following had better never be used because it causes the -- * pointer-to-const buffer to be cast into a pointer to non-const. -- * And the result is written through. I threw a "const" in, hoping -- * this will cause a diagnostic. -- */ -- CHAR64LONG16 *block = (const CHAR64LONG16 *) buffer; -+ /* The following had better never be used because it causes the -+ * pointer-to-const buffer to be cast into a pointer to non-const. -+ * And the result is written through. I threw a "const" in, hoping -+ * this will cause a diagnostic. -+ */ -+ CHAR64LONG16 *block = (const CHAR64LONG16 *)buffer; - #endif -- /* Copy context->state[] to working vars */ -- a = state[0]; -- b = state[1]; -- c = state[2]; -- d = state[3]; -- e = state[4]; -- /* 4 rounds of 20 operations each. Loop unrolled. */ -- R0(a, b, c, d, e, 0); -- R0(e, a, b, c, d, 1); -- R0(d, e, a, b, c, 2); -- R0(c, d, e, a, b, 3); -- R0(b, c, d, e, a, 4); -- R0(a, b, c, d, e, 5); -- R0(e, a, b, c, d, 6); -- R0(d, e, a, b, c, 7); -- R0(c, d, e, a, b, 8); -- R0(b, c, d, e, a, 9); -- R0(a, b, c, d, e, 10); -- R0(e, a, b, c, d, 11); -- R0(d, e, a, b, c, 12); -- R0(c, d, e, a, b, 13); -- R0(b, c, d, e, a, 14); -- R0(a, b, c, d, e, 15); -- R1(e, a, b, c, d, 16); -- R1(d, e, a, b, c, 17); -- R1(c, d, e, a, b, 18); -- R1(b, c, d, e, a, 19); -- R2(a, b, c, d, e, 20); -- R2(e, a, b, c, d, 21); -- R2(d, e, a, b, c, 22); -- R2(c, d, e, a, b, 23); -- R2(b, c, d, e, a, 24); -- R2(a, b, c, d, e, 25); -- R2(e, a, b, c, d, 26); -- R2(d, e, a, b, c, 27); -- R2(c, d, e, a, b, 28); -- R2(b, c, d, e, a, 29); -- R2(a, b, c, d, e, 30); -- R2(e, a, b, c, d, 31); -- R2(d, e, a, b, c, 32); -- R2(c, d, e, a, b, 33); -- R2(b, c, d, e, a, 34); -- R2(a, b, c, d, e, 35); -- R2(e, a, b, c, d, 36); -- R2(d, e, a, b, c, 37); -- R2(c, d, e, a, b, 38); -- R2(b, c, d, e, a, 39); -- R3(a, b, c, d, e, 40); -- R3(e, a, b, c, d, 41); -- R3(d, e, a, b, c, 42); -- R3(c, d, e, a, b, 43); -- R3(b, c, d, e, a, 44); -- R3(a, b, c, d, e, 45); -- R3(e, a, b, c, d, 46); -- R3(d, e, a, b, c, 47); -- R3(c, d, e, a, b, 48); -- R3(b, c, d, e, a, 49); -- R3(a, b, c, d, e, 50); -- R3(e, a, b, c, d, 51); -- R3(d, e, a, b, c, 52); -- R3(c, d, e, a, b, 53); -- R3(b, c, d, e, a, 54); -- R3(a, b, c, d, e, 55); -- R3(e, a, b, c, d, 56); -- R3(d, e, a, b, c, 57); -- R3(c, d, e, a, b, 58); -- R3(b, c, d, e, a, 59); -- R4(a, b, c, d, e, 60); -- R4(e, a, b, c, d, 61); -- R4(d, e, a, b, c, 62); -- R4(c, d, e, a, b, 63); -- R4(b, c, d, e, a, 64); -- R4(a, b, c, d, e, 65); -- R4(e, a, b, c, d, 66); -- R4(d, e, a, b, c, 67); -- R4(c, d, e, a, b, 68); -- R4(b, c, d, e, a, 69); -- R4(a, b, c, d, e, 70); -- R4(e, a, b, c, d, 71); -- R4(d, e, a, b, c, 72); -- R4(c, d, e, a, b, 73); -- R4(b, c, d, e, a, 74); -- R4(a, b, c, d, e, 75); -- R4(e, a, b, c, d, 76); -- R4(d, e, a, b, c, 77); -- R4(c, d, e, a, b, 78); -- R4(b, c, d, e, a, 79); -- /* Add the working vars back into context.state[] */ -- state[0] += a; -- state[1] += b; -- state[2] += c; -- state[3] += d; -- state[4] += e; -- /* Wipe variables */ -- a = b = c = d = e = 0; --#ifdef SHA1HANDSOFF -- memset(block, '\0', sizeof(block)); -+ /* Copy context->state[] to working vars */ -+ a = state[0]; -+ b = state[1]; -+ c = state[2]; -+ d = state[3]; -+ e = state[4]; -+ /* 4 rounds of 20 operations each. Loop unrolled. */ -+ R0(a, b, c, d, e, 0); -+ R0(e, a, b, c, d, 1); -+ R0(d, e, a, b, c, 2); -+ R0(c, d, e, a, b, 3); -+ R0(b, c, d, e, a, 4); -+ R0(a, b, c, d, e, 5); -+ R0(e, a, b, c, d, 6); -+ R0(d, e, a, b, c, 7); -+ R0(c, d, e, a, b, 8); -+ R0(b, c, d, e, a, 9); -+ R0(a, b, c, d, e, 10); -+ R0(e, a, b, c, d, 11); -+ R0(d, e, a, b, c, 12); -+ R0(c, d, e, a, b, 13); -+ R0(b, c, d, e, a, 14); -+ R0(a, b, c, d, e, 15); -+ R1(e, a, b, c, d, 16); -+ R1(d, e, a, b, c, 17); -+ R1(c, d, e, a, b, 18); -+ R1(b, c, d, e, a, 19); -+ R2(a, b, c, d, e, 20); -+ R2(e, a, b, c, d, 21); -+ R2(d, e, a, b, c, 22); -+ R2(c, d, e, a, b, 23); -+ R2(b, c, d, e, a, 24); -+ R2(a, b, c, d, e, 25); -+ R2(e, a, b, c, d, 26); -+ R2(d, e, a, b, c, 27); -+ R2(c, d, e, a, b, 28); -+ R2(b, c, d, e, a, 29); -+ R2(a, b, c, d, e, 30); -+ R2(e, a, b, c, d, 31); -+ R2(d, e, a, b, c, 32); -+ R2(c, d, e, a, b, 33); -+ R2(b, c, d, e, a, 34); -+ R2(a, b, c, d, e, 35); -+ R2(e, a, b, c, d, 36); -+ R2(d, e, a, b, c, 37); -+ R2(c, d, e, a, b, 38); -+ R2(b, c, d, e, a, 39); -+ R3(a, b, c, d, e, 40); -+ R3(e, a, b, c, d, 41); -+ R3(d, e, a, b, c, 42); -+ R3(c, d, e, a, b, 43); -+ R3(b, c, d, e, a, 44); -+ R3(a, b, c, d, e, 45); -+ R3(e, a, b, c, d, 46); -+ R3(d, e, a, b, c, 47); -+ R3(c, d, e, a, b, 48); -+ R3(b, c, d, e, a, 49); -+ R3(a, b, c, d, e, 50); -+ R3(e, a, b, c, d, 51); -+ R3(d, e, a, b, c, 52); -+ R3(c, d, e, a, b, 53); -+ R3(b, c, d, e, a, 54); -+ R3(a, b, c, d, e, 55); -+ R3(e, a, b, c, d, 56); -+ R3(d, e, a, b, c, 57); -+ R3(c, d, e, a, b, 58); -+ R3(b, c, d, e, a, 59); -+ R4(a, b, c, d, e, 60); -+ R4(e, a, b, c, d, 61); -+ R4(d, e, a, b, c, 62); -+ R4(c, d, e, a, b, 63); -+ R4(b, c, d, e, a, 64); -+ R4(a, b, c, d, e, 65); -+ R4(e, a, b, c, d, 66); -+ R4(d, e, a, b, c, 67); -+ R4(c, d, e, a, b, 68); -+ R4(b, c, d, e, a, 69); -+ R4(a, b, c, d, e, 70); -+ R4(e, a, b, c, d, 71); -+ R4(d, e, a, b, c, 72); -+ R4(c, d, e, a, b, 73); -+ R4(b, c, d, e, a, 74); -+ R4(a, b, c, d, e, 75); -+ R4(e, a, b, c, d, 76); -+ R4(d, e, a, b, c, 77); -+ R4(c, d, e, a, b, 78); -+ R4(b, c, d, e, a, 79); -+ /* Add the working vars back into context.state[] */ -+ state[0] += a; -+ state[1] += b; -+ state[2] += c; -+ state[3] += d; -+ state[4] += e; -+ /* Wipe variables */ -+ a = b = c = d = e = 0; -+#ifdef UL_SHA1HANDSOFF -+ memset(block, '\0', sizeof(block)); - #endif - } - -- - /* SHA1Init - Initialize new context */ - --void ul_SHA1Init( -- UL_SHA1_CTX * context --) -+void ul_SHA1Init(UL_SHA1_CTX *context) - { -- /* SHA1 initialization constants */ -- context->state[0] = 0x67452301; -- context->state[1] = 0xEFCDAB89; -- context->state[2] = 0x98BADCFE; -- context->state[3] = 0x10325476; -- context->state[4] = 0xC3D2E1F0; -- context->count[0] = context->count[1] = 0; -+ /* SHA1 initialization constants */ -+ context->state[0] = 0x67452301; -+ context->state[1] = 0xEFCDAB89; -+ context->state[2] = 0x98BADCFE; -+ context->state[3] = 0x10325476; -+ context->state[4] = 0xC3D2E1F0; -+ context->count[0] = context->count[1] = 0; - } - -- - /* Run your data through this. */ - --void ul_SHA1Update( -- UL_SHA1_CTX * context, -- const unsigned char *data, -- uint32_t len --) -+void ul_SHA1Update(UL_SHA1_CTX *context, const unsigned char *data, uint32_t len) - { -- uint32_t i; -- -- uint32_t j; -- -- j = context->count[0]; -- if ((context->count[0] += len << 3) < j) -- context->count[1]++; -- context->count[1] += (len >> 29); -- j = (j >> 3) & 63; -- if ((j + len) > 63) -- { -- memcpy(&context->buffer[j], data, (i = 64 - j)); -- ul_SHA1Transform(context->state, context->buffer); -- for (; i + 63 < len; i += 64) -- { -- ul_SHA1Transform(context->state, &data[i]); -- } -- j = 0; -- } -- else -- i = 0; -- memcpy(&context->buffer[j], &data[i], len - i); -+ uint32_t i; -+ -+ uint32_t j; -+ -+ j = context->count[0]; -+ if ((context->count[0] += len << 3) < j) -+ context->count[1]++; -+ context->count[1] += (len >> 29); -+ j = (j >> 3) & 63; -+ if ((j + len) > 63) { -+ memcpy(&context->buffer[j], data, (i = 64 - j)); -+ ul_SHA1Transform(context->state, context->buffer); -+ for (; i + 63 < len; i += 64) { -+ ul_SHA1Transform(context->state, &data[i]); -+ } -+ j = 0; -+ } else -+ i = 0; -+ memcpy(&context->buffer[j], &data[i], len - i); - } - -- - /* Add padding and return the message digest. */ - --void ul_SHA1Final( -- unsigned char digest[20], -- UL_SHA1_CTX * context --) -+void ul_SHA1Final(unsigned char digest[20], UL_SHA1_CTX *context) - { -- unsigned i; -+ unsigned i; - -- unsigned char finalcount[8]; -+ unsigned char finalcount[8]; - -- unsigned char c; -+ unsigned char c; - --#if 0 /* untested "improvement" by DHR */ -- /* Convert context->count to a sequence of bytes -- * in finalcount. Second element first, but -- * big-endian order within element. -- * But we do it all backwards. -- */ -- unsigned char *fcp = &finalcount[8]; -+#if 0 /* untested "improvement" by DHR */ -+ /* Convert context->count to a sequence of bytes -+ * in finalcount. Second element first, but -+ * big-endian order within element. -+ * But we do it all backwards. -+ */ -+ unsigned char *fcp = &finalcount[8]; - -- for (i = 0; i < 2; i++) -- { -- uint32_t t = context->count[i]; -+ for (i = 0; i < 2; i++) { -+ uint32_t t = context->count[i]; - -- int j; -+ int j; - -- for (j = 0; j < 4; t >>= 8, j++) -- *--fcp = (unsigned char) t} -+ for (j = 0; j < 4; t >>= 8, j++) -+ *--fcp = (unsigned char)t} - #else -- for (i = 0; i < 8; i++) -- { -- finalcount[i] = (unsigned char) ((context->count[(i >= 4 ? 0 : 1)] >> ((3 - (i & 3)) * 8)) & 255); /* Endian independent */ -- } -+ for (i = 0; i < 8; i++) { -+ finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)] >> ((3 - (i & 3)) * 8)) & 255); /* Endian independent */ -+ } - #endif -- c = 0200; -- ul_SHA1Update(context, &c, 1); -- while ((context->count[0] & 504) != 448) -- { -- c = 0000; -- ul_SHA1Update(context, &c, 1); -- } -- ul_SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ -- for (i = 0; i < 20; i++) -- { -- digest[i] = (unsigned char) -- ((context->state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255); -- } -- /* Wipe variables */ -- memset(context, '\0', sizeof(*context)); -- memset(&finalcount, '\0', sizeof(finalcount)); -+ c = 0200; -+ ul_SHA1Update(context, &c, 1); -+ while ((context->count[0] & 504) != 448) { -+ c = 0000; -+ ul_SHA1Update(context, &c, 1); -+ } -+ ul_SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ -+ for (i = 0; i < 20; i++) { -+ digest[i] = (unsigned char) -+ ((context->state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255); -+ } -+ /* Wipe variables */ -+ memset(context, '\0', sizeof(*context)); -+ memset(&finalcount, '\0', sizeof(finalcount)); - } - --void ul_SHA1( -- char *hash_out, -- const char *str, -- unsigned len) -+void ul_SHA1(char *hash_out, const char *str, unsigned len) - { -- UL_SHA1_CTX ctx; -- unsigned int ii; -- -- ul_SHA1Init(&ctx); -- for (ii=0; ii -Date: Tue, 2 Jan 2018 11:08:03 +0100 -Subject: lib/sha1: use proper WORDS_BIGENDIAN macro - -The original code uses BYTE_ORDER, but we use WORDS_BIGENDIAN in -utl-linux. - -Reported-by: Andreas Schwab -Signed-off-by: Karel Zak -(cherry picked from commit 4ff4b1106e8c6a71cce59ca40a2019342a92d47d) ---- - lib/sha1.c | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/lib/sha1.c b/lib/sha1.c -index e87677c..22d33b3 100644 ---- a/lib/sha1.c -+++ b/lib/sha1.c -@@ -19,14 +19,11 @@ - #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) - - /* blk0() and blk() perform the initial expand. */ --/* I got the idea of expanding during the round function from SSLeay */ --#if BYTE_ORDER == LITTLE_ENDIAN --# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ -- |(rol(block->l[i],8)&0x00FF00FF)) --#elif BYTE_ORDER == BIG_ENDIAN -+#ifdef WORDS_BIGENDIAN - # define blk0(i) block->l[i] - #else --# error "Endianness not defined!" -+# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ -+ |(rol(block->l[i],8)&0x00FF00FF)) - #endif - - #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ diff -Nru util-linux-2.31.1/debian/patches/lscpu-Decode-ARM-CPUs.patch util-linux-2.32/debian/patches/lscpu-Decode-ARM-CPUs.patch --- util-linux-2.31.1/debian/patches/lscpu-Decode-ARM-CPUs.patch 2018-02-14 22:20:35.000000000 +0000 +++ util-linux-2.32/debian/patches/lscpu-Decode-ARM-CPUs.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,327 +0,0 @@ -From 744d62ee0c54963539832ec5943f3d25e0fccfbd Mon Sep 17 00:00:00 2001 -From: Riku Voipio -Date: Thu, 18 Jan 2018 16:57:51 +0200 -Subject: lscpu: Decode ARM CPUs - -Since the kernel developers have refused to make /proc/cpuinfo user -understandable, implement mapping in userspace. lscpu is available for -most users via util-linux, so store the information here. - -Signed-off-by: Riku Voipio ---- - sys-utils/Makemodule.am | 1 + - sys-utils/lscpu-arm.h | 189 +++++++++++++++++++++++++++++++++++++++ - sys-utils/lscpu.c | 47 ++++++++++ - tests/expected/lscpu/lscpu-armv7 | 3 + - 4 files changed, 240 insertions(+) - create mode 100644 sys-utils/lscpu-arm.h - -diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am -index b5b1d4f..b8486e8 100644 ---- a/sys-utils/Makemodule.am -+++ b/sys-utils/Makemodule.am -@@ -357,6 +357,7 @@ usrbin_exec_PROGRAMS += lscpu - lscpu_SOURCES = \ - sys-utils/lscpu.c \ - sys-utils/lscpu.h \ -+ sys-utils/lscpu-arm.h \ - sys-utils/lscpu-dmi.c - lscpu_LDADD = $(LDADD) libcommon.la libsmartcols.la $(RTAS_LIBS) - lscpu_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) -diff --git a/sys-utils/lscpu-arm.h b/sys-utils/lscpu-arm.h -new file mode 100644 -index 0000000..289a900 ---- /dev/null -+++ b/sys-utils/lscpu-arm.h -@@ -0,0 +1,189 @@ -+/* -+ * lscpu-arm.h - ARM CPU identification tables -+ * -+ * Copyright (C) 2018 Riku Voipio -+ * -+ * 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 would 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. -+ * -+ * The information here is gathered from -+ * - ARM manuals -+ * - Linux kernel: arch/armX/include/asm/cputype.h -+ * - GCC sources: config/arch/arch-cores.def -+ * - Ancient wisdom -+ */ -+#ifndef LSCPU_ARM_H -+#define LSCPU_ARM_H -+ -+struct id_part { -+ const int id; -+ const char* name; -+}; -+ -+static const struct id_part arm_part[] = { -+ { 0x810, "ARM810" }, -+ { 0x920, "ARM920" }, -+ { 0x922, "ARM922" }, -+ { 0x926, "ARM926" }, -+ { 0x940, "ARM940" }, -+ { 0x946, "ARM946" }, -+ { 0x966, "ARM966" }, -+ { 0xa20, "ARM1020" }, -+ { 0xa22, "ARM1022" }, -+ { 0xa26, "ARM1026" }, -+ { 0xb02, "ARM11 MPCore" }, -+ { 0xb36, "ARM1136" }, -+ { 0xb56, "ARM1156" }, -+ { 0xb76, "ARM1176" }, -+ { 0xc05, "Cortex-A5" }, -+ { 0xc07, "Cortex-A7" }, -+ { 0xc08, "Cortex-A8" }, -+ { 0xc09, "Cortex-A9" }, -+ { 0xc0d, "Cortex-A12" }, -+ { 0xc0f, "Cortex-A15" }, -+ { 0xc0e, "Cortex-A17" }, -+ { 0xc14, "Cortex-R4" }, -+ { 0xc15, "Cortex-R5" }, -+ { 0xc17, "Cortex-R7" }, -+ { 0xc18, "Cortex-R8" }, -+ { 0xc20, "Cortex-M0" }, -+ { 0xc21, "Cortex-M1" }, -+ { 0xc23, "Cortex-M3" }, -+ { 0xc24, "Cortex-M4" }, -+ { 0xc20, "Cortex-M7" }, -+ { 0xc60, "Cortex-M0+" }, -+ { 0xd01, "Cortex-A32" }, -+ { 0xd03, "Cortex-A53" }, -+ { 0xd04, "Cortex-A35" }, -+ { 0xd05, "Cortex-A55" }, -+ { 0xd07, "Cortex-A57" }, -+ { 0xd08, "Cortex-A72" }, -+ { 0xd09, "Cortex-A73" }, -+ { 0xd0a, "Cortex-A75" }, -+ { 0xd13, "Cortex-R52" }, -+ { 0xd20, "Cortex-M23" }, -+ { 0xd21, "Cortex-M33" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part brcm_part[] = { -+ { 0x516, "ThunderX2" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part dec_part[] = { -+ { 0xa10, "SA110" }, -+ { 0xa11, "SA1100" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part cavium_part[] = { -+ { 0x0a0, "ThunderX" }, -+ { 0x0a1, "ThunderX 88XX" }, -+ { 0x0a2, "ThunderX 81XX" }, -+ { 0x0a3, "ThunderX 83XX" }, -+ { 0x0af, "ThunderX2 99xx" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part apm_part[] = { -+ { 0x000, "X-Gene" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part qcom_part[] = { -+ { 0x00f, "Scorpion" }, -+ { 0x02d, "Scorpion" }, -+ { 0x04d, "Krait" }, -+ { 0x06f, "Krait" }, -+ { 0x201, "Kryo" }, -+ { 0x205, "Kryo" }, -+ { 0x211, "Kryo" }, -+ { 0x800, "Falkor V1/Kryo" }, -+ { 0x801, "Kryo V2" }, -+ { 0xc00, "Falkor" }, -+ { 0xc01, "Saphira" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part samsung_part[] = { -+ { 0x001, "exynos-m1" }, -+ { -1, "unknown" }, -+ -+}; -+ -+static const struct id_part nvidia_part[] = { -+ { 0x000, "Denver" }, -+ { 0x003, "Denver 2" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part marvell_part[] = { -+ { 0x131, "Feroceon 88FR131" }, -+ { 0x581, "PJ4/PJ4b" }, -+ { 0x584, "PJ4B-MP" }, -+ { -1, "unknown" }, -+ -+}; -+ -+static const struct id_part intel_part[] = { -+ { 0x200, "i80200" }, -+ { 0x210, "PXA250A" }, -+ { 0x212, "PXA210A" }, -+ { 0x242, "i80321-400" }, -+ { 0x243, "i80321-600" }, -+ { 0x290, "PXA250B/PXA26x" }, -+ { 0x292, "PXA210B" }, -+ { 0x2c2, "i80321-400-B0" }, -+ { 0x2c3, "i80321-600-B0" }, -+ { 0x2d0, "PXA250C/PXA255/PXA26x" }, -+ { 0x2d2, "PXA210C" }, -+ { 0x411, "PXA27x" }, -+ { 0x41c, "IPX425-533" }, -+ { 0x41d, "IPX425-400" }, -+ { 0x41f, "IPX425-266" }, -+ { 0x682, "PXA32x" }, -+ { 0x683, "PXA930/PXA935" }, -+ { 0x688, "PXA30x" }, -+ { 0x689, "PXA31x" }, -+ { 0xb11, "SA1110" }, -+ { 0xc12, "IPX1200" }, -+ { -1, "unknown" }, -+}; -+ -+static const struct id_part unknown_part[] = { -+ { -1, "unknown" }, -+}; -+ -+struct hw_impl { -+ const int id; -+ const struct id_part *parts; -+ const char *name; -+}; -+ -+static const struct hw_impl hw_implementer[] = { -+ { 0x41, arm_part, "ARM" }, -+ { 0x42, brcm_part, "Broadcom" }, -+ { 0x43, cavium_part, "Cavium" }, -+ { 0x44, dec_part, "DEC" }, -+ { 0x4e, nvidia_part, "Nvidia" }, -+ { 0x50, apm_part, "APM" }, -+ { 0x51, qcom_part, "Qualcomm" }, -+ { 0x53, samsung_part, "Samsung" }, -+ { 0x56, marvell_part, "Marvell" }, -+ { 0x69, intel_part, "Intel" }, -+ { -1, unknown_part, "unknown" }, -+}; -+ -+#endif /* LSCPU_ARM_H */ -diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c -index 10c20aa..93e699c 100644 ---- a/sys-utils/lscpu.c -+++ b/sys-utils/lscpu.c -@@ -68,6 +68,7 @@ - #include "closestream.h" - #include "optutils.h" - #include "lscpu.h" -+#include "lscpu-arm.h" - - #define CACHE_MAX 100 - -@@ -539,6 +540,48 @@ static void read_physical_info_powerpc( - #endif - - static void -+arm_cpu_decode(struct lscpu_desc *desc) -+{ -+ int j, impl, part; -+ const struct id_part *parts = NULL; -+ char buf[8]; -+ if (desc->vendor == NULL || desc->model == NULL) -+ return; -+ if ((strncmp(desc->vendor,"0x",2) || -+ strncmp(desc->model,"0x",2) )) -+ return; -+ -+ impl=(int)strtol(desc->vendor, NULL, 0); -+ part=(int)strtol(desc->model, NULL, 0); -+ -+ for (j = 0; hw_implementer[j].id != -1; j++) { -+ if (hw_implementer[j].id == impl) { -+ parts = hw_implementer[j].parts; -+ desc->vendor = (char *)hw_implementer[j].name; -+ break; -+ } -+ } -+ if ( parts == NULL) -+ return; -+ -+ for (j = 0; parts[j].id != -1; j++) { -+ if (parts[j].id == part) { -+ desc->modelname = (char *)parts[j].name; -+ break; -+ } -+ } -+ -+ /* Print out the rXpY string for ARM cores */ -+ if (impl == 0x41 && desc->revision != NULL && -+ desc->stepping != NULL) { -+ int revision = atoi(desc->revision); -+ int variant = (int)strtol(desc->stepping, NULL, 0); -+ snprintf(buf, sizeof(buf), "r%dp%d", variant, revision ); -+ desc->stepping=xstrdup(buf); -+ } -+} -+ -+static void - read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod) - { - FILE *fp = path_fopen("r", 1, _PATH_PROC_CPUINFO); -@@ -555,11 +598,14 @@ read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod) - while (fgets(buf, sizeof(buf), fp) != NULL) { - if (lookup(buf, "vendor", &desc->vendor)) ; - else if (lookup(buf, "vendor_id", &desc->vendor)) ; -+ else if (lookup(buf, "CPU implementer", &desc->vendor)) ; /* ARM and aarch64 */ - else if (lookup(buf, "family", &desc->family)) ; - else if (lookup(buf, "cpu family", &desc->family)) ; - else if (lookup(buf, "model", &desc->model)) ; -+ else if (lookup(buf, "CPU part", &desc->model)) ; /* ARM and aarch64 */ - else if (lookup(buf, "model name", &desc->modelname)) ; - else if (lookup(buf, "stepping", &desc->stepping)) ; -+ else if (lookup(buf, "CPU variant", &desc->stepping)) ; /* aarch64 */ - else if (lookup(buf, "cpu MHz", &desc->mhz)) ; - else if (lookup(buf, "cpu MHz dynamic", &desc->dynamic_mhz)) ; /* s390 */ - else if (lookup(buf, "cpu MHz static", &desc->static_mhz)) ; /* s390 */ -@@ -2207,6 +2253,7 @@ int main(int argc, char *argv[]) - - read_nodes(desc); - read_hypervisor(desc, mod); -+ arm_cpu_decode(desc); - - switch(mod->mode) { - case OUTPUT_SUMMARY: -diff --git a/tests/expected/lscpu/lscpu-armv7 b/tests/expected/lscpu/lscpu-armv7 -index e67af47..5d1b7f9 100644 ---- a/tests/expected/lscpu/lscpu-armv7 -+++ b/tests/expected/lscpu/lscpu-armv7 -@@ -3,7 +3,10 @@ On-line CPU(s) list: 0,1 - Thread(s) per core: 1 - Core(s) per socket: 2 - Socket(s): 1 -+Vendor ID: ARM - Model: 4 -+Model name: Cortex-A15 -+Stepping: r0p4 - CPU max MHz: 1700.0000 - CPU min MHz: 200.0000 - BogoMIPS: 1694.10 --- -cgit v1.1 - diff -Nru util-linux-2.31.1/debian/patches/Revert-fsck.cramfs-Fix-bus-error-on-broken-file-system.patch util-linux-2.32/debian/patches/Revert-fsck.cramfs-Fix-bus-error-on-broken-file-system.patch --- util-linux-2.31.1/debian/patches/Revert-fsck.cramfs-Fix-bus-error-on-broken-file-system.patch 2018-02-14 14:53:19.000000000 +0000 +++ util-linux-2.32/debian/patches/Revert-fsck.cramfs-Fix-bus-error-on-broken-file-system.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -From: Ruediger Meier -Date: Tue, 23 Jan 2018 16:59:22 +0100 -Subject: Revert "fsck.cramfs: Fix bus error on broken file system." - -This reverts commit 7cb962c77015e9383b53eeb22ce732cb5216bbc3. - -It can't be right that we mmap (start + super.size) bytes from a file -which is usually only super.size bytes large. The patch "fixed" a -problem when super.size is bad but now it fails for the correct case: - -$ mkdir -p root/subdir -$ ./mkfs.cramfs -p root cramfs -$ ./fsck.cramfs cramfs -Bus error (core dumped) - -We will fix the original problem later. - -CC: Tobias Stoeckmann -Signed-off-by: Ruediger Meier ---- - disk-utils/fsck.cramfs.c | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c -index b2a3cc1..50c7d33 100644 ---- a/disk-utils/fsck.cramfs.c -+++ b/disk-utils/fsck.cramfs.c -@@ -220,24 +220,23 @@ static void test_crc(int start) - crc = crc32(0L, NULL, 0); - - buf = -- mmap(NULL, start + super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); -+ mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); - if (buf == MAP_FAILED) { - buf = -- mmap(NULL, start + super.size, PROT_READ | PROT_WRITE, -+ mmap(NULL, super.size, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (buf != MAP_FAILED) { -- if (lseek(fd, start, SEEK_SET) == (off_t) -1) -+ if (lseek(fd, 0, SEEK_SET) == (off_t) -1) - err(FSCK_EX_ERROR, _("seek on %s failed"), filename); -- if (read(fd, (unsigned char *) buf + start, super.size) != -- (ssize_t) super.size) -+ if (read(fd, buf, super.size) != (ssize_t) super.size) - err(FSCK_EX_ERROR, _("cannot read %s"), filename); - } - } - if (buf != MAP_FAILED) { - ((struct cramfs_super *)((unsigned char *) buf + start))->fsid.crc = - crc32(0L, NULL, 0); -- crc = crc32(crc, (unsigned char *) buf + start, super.size); -- munmap(buf, start + super.size); -+ crc = crc32(crc, (unsigned char *) buf + start, super.size - start); -+ munmap(buf, super.size); - } else { - int retval; - size_t length = 0; diff -Nru util-linux-2.31.1/debian/patches/series util-linux-2.32/debian/patches/series --- util-linux-2.31.1/debian/patches/series 2018-02-14 22:20:35.000000000 +0000 +++ util-linux-2.32/debian/patches/series 2018-05-15 13:01:13.000000000 +0000 @@ -1,13 +1,4 @@ verbose-tests.patch -lib-sha1-fix-indention.patch -lib-sha1-use-proper-WORDS_BIGENDIAN-macro.patch -Revert-fsck.cramfs-Fix-bus-error-on-broken-file-system.patch -fsck.cramfs-fix-crash-when-superblock-size-is-too-small.patch -tests-rewrite-fsck-bad-header.patch -docs-update-AUTHORS-file.patch sulogin-fallback-static-sh.patch sulogin-lockedpwd.patch -0001-lsmem-chmem-add-memory-zone-awareness.patch -0002-tests-lsmem-update-lsmem-test-with-ZONES-column.patch -0003-lsmem-chmem-add-memory-zone-awareness-to-bash-comple.patch -lscpu-Decode-ARM-CPUs.patch + diff -Nru util-linux-2.31.1/debian/patches/sulogin-lockedpwd.patch util-linux-2.32/debian/patches/sulogin-lockedpwd.patch --- util-linux-2.31.1/debian/patches/sulogin-lockedpwd.patch 2017-11-17 14:42:43.000000000 +0000 +++ util-linux-2.32/debian/patches/sulogin-lockedpwd.patch 2018-05-15 12:59:30.000000000 +0000 @@ -4,7 +4,7 @@ --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c -@@ -983,7 +983,8 @@ +@@ -981,7 +981,8 @@ int main(int argc, char **argv) const char *passwd = pwd->pw_passwd; const char *answer; int failed = 0, doshell = 0; diff -Nru util-linux-2.31.1/debian/patches/tests-rewrite-fsck-bad-header.patch util-linux-2.32/debian/patches/tests-rewrite-fsck-bad-header.patch --- util-linux-2.31.1/debian/patches/tests-rewrite-fsck-bad-header.patch 2018-02-14 14:53:19.000000000 +0000 +++ util-linux-2.32/debian/patches/tests-rewrite-fsck-bad-header.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,331 +0,0 @@ -From: Ruediger Meier -Date: Tue, 23 Jan 2018 16:59:24 +0100 -Subject: tests: rewrite fsck-bad-header - -Fix test for systems with pagesize != 4096 -Loop over many combinations of sizes, endianness and blocksizes. - -Signed-off-by: Ruediger Meier ---- - tests/expected/cramfs/fsck-bad-header | 1 - - tests/expected/cramfs/fsck-bad-header-nopad-4K-be | 29 +++++++++ - tests/expected/cramfs/fsck-bad-header-nopad-4K-le | 29 +++++++++ - tests/expected/cramfs/fsck-bad-header-pad-4K-be | 29 +++++++++ - tests/expected/cramfs/fsck-bad-header-pad-4K-le | 29 +++++++++ - tests/expected/cramfs/fsck-bad-header-pad-64K-be | 29 +++++++++ - tests/expected/cramfs/fsck-bad-header-pad-64K-le | 29 +++++++++ - tests/ts/cramfs/fsck-bad-header | 74 +++++++++++++++++++++-- - 8 files changed, 243 insertions(+), 6 deletions(-) - delete mode 100644 tests/expected/cramfs/fsck-bad-header - create mode 100644 tests/expected/cramfs/fsck-bad-header-nopad-4K-be - create mode 100644 tests/expected/cramfs/fsck-bad-header-nopad-4K-le - create mode 100644 tests/expected/cramfs/fsck-bad-header-pad-4K-be - create mode 100644 tests/expected/cramfs/fsck-bad-header-pad-4K-le - create mode 100644 tests/expected/cramfs/fsck-bad-header-pad-64K-be - create mode 100644 tests/expected/cramfs/fsck-bad-header-pad-64K-le - -diff --git a/tests/expected/cramfs/fsck-bad-header b/tests/expected/cramfs/fsck-bad-header -deleted file mode 100644 -index 41c2c12..0000000 ---- a/tests/expected/cramfs/fsck-bad-header -+++ /dev/null -@@ -1 +0,0 @@ --fsck.cramfs: superblock size (76) too small -diff --git a/tests/expected/cramfs/fsck-bad-header-nopad-4K-be b/tests/expected/cramfs/fsck-bad-header-nopad-4K-be -new file mode 100644 -index 0000000..397d1ba ---- /dev/null -+++ b/tests/expected/cramfs/fsck-bad-header-nopad-4K-be -@@ -0,0 +1,29 @@ -+## size: 0 -+fsck.cramfs: superblock size (0) too small -+ret: 4 -+ -+## size: 75 -+fsck.cramfs: superblock size (75) too small -+ret: 4 -+ -+## size: 76 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 4095 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 4096 -+ret: 0 -+ -+## size: 4097 -+fsck.cramfs: file length too short -+ret: 4 -+ -+## size: 4294967295 -+fsck.cramfs: file length too short -+ret: 4 -+ -diff --git a/tests/expected/cramfs/fsck-bad-header-nopad-4K-le b/tests/expected/cramfs/fsck-bad-header-nopad-4K-le -new file mode 100644 -index 0000000..397d1ba ---- /dev/null -+++ b/tests/expected/cramfs/fsck-bad-header-nopad-4K-le -@@ -0,0 +1,29 @@ -+## size: 0 -+fsck.cramfs: superblock size (0) too small -+ret: 4 -+ -+## size: 75 -+fsck.cramfs: superblock size (75) too small -+ret: 4 -+ -+## size: 76 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 4095 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 4096 -+ret: 0 -+ -+## size: 4097 -+fsck.cramfs: file length too short -+ret: 4 -+ -+## size: 4294967295 -+fsck.cramfs: file length too short -+ret: 4 -+ -diff --git a/tests/expected/cramfs/fsck-bad-header-pad-4K-be b/tests/expected/cramfs/fsck-bad-header-pad-4K-be -new file mode 100644 -index 0000000..8e23161 ---- /dev/null -+++ b/tests/expected/cramfs/fsck-bad-header-pad-4K-be -@@ -0,0 +1,29 @@ -+## size: 76 -+fsck.cramfs: superblock size (76) too small -+ret: 4 -+ -+## size: 587 -+fsck.cramfs: superblock size (587) too small -+ret: 4 -+ -+## size: 588 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 4095 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 4096 -+ret: 0 -+ -+## size: 4097 -+fsck.cramfs: file length too short -+ret: 4 -+ -+## size: 4294967295 -+fsck.cramfs: file length too short -+ret: 4 -+ -diff --git a/tests/expected/cramfs/fsck-bad-header-pad-4K-le b/tests/expected/cramfs/fsck-bad-header-pad-4K-le -new file mode 100644 -index 0000000..8e23161 ---- /dev/null -+++ b/tests/expected/cramfs/fsck-bad-header-pad-4K-le -@@ -0,0 +1,29 @@ -+## size: 76 -+fsck.cramfs: superblock size (76) too small -+ret: 4 -+ -+## size: 587 -+fsck.cramfs: superblock size (587) too small -+ret: 4 -+ -+## size: 588 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 4095 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 4096 -+ret: 0 -+ -+## size: 4097 -+fsck.cramfs: file length too short -+ret: 4 -+ -+## size: 4294967295 -+fsck.cramfs: file length too short -+ret: 4 -+ -diff --git a/tests/expected/cramfs/fsck-bad-header-pad-64K-be b/tests/expected/cramfs/fsck-bad-header-pad-64K-be -new file mode 100644 -index 0000000..15d4ff1 ---- /dev/null -+++ b/tests/expected/cramfs/fsck-bad-header-pad-64K-be -@@ -0,0 +1,29 @@ -+## size: 76 -+fsck.cramfs: superblock size (76) too small -+ret: 4 -+ -+## size: 587 -+fsck.cramfs: superblock size (587) too small -+ret: 4 -+ -+## size: 588 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 65535 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 65536 -+ret: 0 -+ -+## size: 65537 -+fsck.cramfs: file length too short -+ret: 4 -+ -+## size: 4294967295 -+fsck.cramfs: file length too short -+ret: 4 -+ -diff --git a/tests/expected/cramfs/fsck-bad-header-pad-64K-le b/tests/expected/cramfs/fsck-bad-header-pad-64K-le -new file mode 100644 -index 0000000..15d4ff1 ---- /dev/null -+++ b/tests/expected/cramfs/fsck-bad-header-pad-64K-le -@@ -0,0 +1,29 @@ -+## size: 76 -+fsck.cramfs: superblock size (76) too small -+ret: 4 -+ -+## size: 587 -+fsck.cramfs: superblock size (587) too small -+ret: 4 -+ -+## size: 588 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 65535 -+fsck.cramfs: file extends past end of filesystem -+fsck.cramfs: crc error -+ret: 4 -+ -+## size: 65536 -+ret: 0 -+ -+## size: 65537 -+fsck.cramfs: file length too short -+ret: 4 -+ -+## size: 4294967295 -+fsck.cramfs: file length too short -+ret: 4 -+ -diff --git a/tests/ts/cramfs/fsck-bad-header b/tests/ts/cramfs/fsck-bad-header -index add3885..c71782b 100755 ---- a/tests/ts/cramfs/fsck-bad-header -+++ b/tests/ts/cramfs/fsck-bad-header -@@ -25,14 +25,78 @@ ts_check_test_command "$TS_CMD_MKCRAMFS" - ts_check_test_command "$TS_CMD_FSCKCRAMFS" - ts_check_prog "dd" - --IMAGE_SOURCE="$TS_OUTDIR/${TS_TESTNAME}-data/root" -+function num2binary() -+{ -+ local num=$1 -+ local endian=$2 -+ -+ test "$num" -ge 0 -a "$num" -le 4294967295 || return 1 -+ test "$endian" = "be" -o "$endian" = "le" || return 1 -+ -+ # how to do that easier? -+ if test "$endian" = "be"; then -+ echo -en "$(printf "%08x" "$1" | sed 's/\(..\)/\\x\1/g')" -+ else -+ echo -en "$(printf "%08x" "$1" | sed 's/^\(..\)\(..\)\(..\)\(..\)$/\\x\4\\x\3\\x\2\\x\1/')" -+ fi -+} -+ -+function fsck_loop_sizes() -+{ -+ local endian=$1 # be, le -+ local seek=$2 # 4 for nopad, 516 for pad -+ shift 2 # the rest are sizes to loop over -+ -+ for size in "$@"; do -+ ts_log "## size: $size" -+ cp -a "$IMAGE_FILE" "$IMAGE_FILE.tmp" -+ num2binary "$size" $endian | -+ dd of="$IMAGE_FILE.tmp" bs=1 seek="$seek" count=4 conv=notrunc &> /dev/null -+ $TS_CMD_FSCKCRAMFS "$IMAGE_FILE.tmp" >> $TS_OUTPUT 2>&1 -+ ts_log "ret: $? -+" -+ done -+ rm -f "$IMAGE_FILE" -+} -+ -+ -+IMAGE_SOURCE="$TS_OUTDIR/${TS_TESTNAME}-data" - IMAGE_FILE="$TS_OUTDIR/${TS_TESTNAME}-cramfs.img" - - mkdir -p "${IMAGE_SOURCE}/subdir" &> /dev/null --$TS_CMD_MKCRAMFS -p -N big $IMAGE_SOURCE $IMAGE_FILE &> /dev/null --echo -ne \\00\\x4c | -- dd of=$IMAGE_FILE bs=1 seek=518 count=2 conv=notrunc &> /dev/null --$TS_CMD_FSCKCRAMFS $IMAGE_FILE >> $TS_OUTPUT 2>&1 -+ -+ts_init_subtest "nopad-4K-be" -+$TS_CMD_MKCRAMFS -N big -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null -+fsck_loop_sizes be 4 0 75 76 4095 4096 4097 4294967295 -+rm -f "$IMAGE_FILE" -+ts_finalize_subtest -+ -+ts_init_subtest "nopad-4K-le" -+$TS_CMD_MKCRAMFS -N little -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null -+fsck_loop_sizes le 4 0 75 76 4095 4096 4097 4294967295 -+ts_finalize_subtest -+ -+ts_init_subtest "pad-4K-be" -+$TS_CMD_MKCRAMFS -p -N big -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null -+fsck_loop_sizes be 516 76 587 588 4095 4096 4097 4294967295 -+ts_finalize_subtest -+ -+ts_init_subtest "pad-4K-le" -+$TS_CMD_MKCRAMFS -p -N little -b 4096 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null -+fsck_loop_sizes le 516 76 587 588 4095 4096 4097 4294967295 -+ts_finalize_subtest -+ -+ts_init_subtest "pad-64K-be" -+$TS_CMD_MKCRAMFS -p -N big -b 65536 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null -+fsck_loop_sizes be 516 76 587 588 65535 65536 65537 4294967295 -+ts_finalize_subtest -+ -+ts_init_subtest "pad-64K-le" -+$TS_CMD_MKCRAMFS -p -N little -b 65536 $IMAGE_SOURCE $IMAGE_FILE &> /dev/null -+fsck_loop_sizes le 516 76 587 588 65535 65536 65537 4294967295 -+ts_finalize_subtest -+ -+rm -rf "$IMAGE_SOURCE" "$IMAGE_FILE.tmp" - - ts_finalize - diff -Nru util-linux-2.31.1/debian/patches/verbose-tests.patch util-linux-2.32/debian/patches/verbose-tests.patch --- util-linux-2.31.1/debian/patches/verbose-tests.patch 2018-02-14 22:20:24.000000000 +0000 +++ util-linux-2.32/debian/patches/verbose-tests.patch 2018-05-10 22:59:25.000000000 +0000 @@ -22,7 +22,7 @@ --srcdir=$(abs_top_srcdir) --builddir=$(abs_top_builddir) \ --parallel $(TS_OPTS) diff --git a/tests/functions.sh b/tests/functions.sh -index b93522c..713350b 100644 +index 2fb0ddb..48379f2 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -132,6 +132,17 @@ function ts_failed_subtest { diff -Nru util-linux-2.31.1/debian/rules util-linux-2.32/debian/rules --- util-linux-2.31.1/debian/rules 2018-02-14 22:20:35.000000000 +0000 +++ util-linux-2.32/debian/rules 2018-05-10 22:59:25.000000000 +0000 @@ -9,12 +9,13 @@ ifeq ($(DEB_HOST_ARCH_OS),linux) CONFOPTS += --enable-raw CONFOPTS += --with-selinux +CONFOPTS += --with-smack CONFOPTS += --enable-partx CONFOPTS += --with-audit ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) - CONFOPTS += --without-systemd --without-udev + CONFOPTS += --without-systemd --without-udev --without-audit else - CONFOPTS += --with-systemd --with-udev + CONFOPTS += --with-systemd --with-udev --with-audit endif endif diff -Nru util-linux-2.31.1/disk-utils/cfdisk.c util-linux-2.32/disk-utils/cfdisk.c --- util-linux-2.31.1/disk-utils/cfdisk.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/cfdisk.c 2018-01-17 12:52:06.790502649 +0000 @@ -264,7 +264,7 @@ static void cfdisk_init_debug(void) { - __UL_INIT_DEBUG(cfdisk, CFDISK_DEBUG_, 0, CFDISK_DEBUG); + __UL_INIT_DEBUG_FROM_ENV(cfdisk, CFDISK_DEBUG_, 0, CFDISK_DEBUG); } /* Initialize output columns -- we follow libfdisk fields (usually specific diff -Nru util-linux-2.31.1/disk-utils/cramfs_common.c util-linux-2.32/disk-utils/cramfs_common.c --- util-linux-2.31.1/disk-utils/cramfs_common.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/cramfs_common.c 2018-03-20 17:51:53.974753296 +0000 @@ -2,7 +2,7 @@ * cramfs_common - cramfs common code * * Copyright (c) 2008 Roy Peled, the.roy.peled -at- gmail.com - * Copyright (c) 2004-2006 by Michael Holzt, kju -at- fqdn.org + * Copyright (c) 2004-2006 by Juliane Holzt, kju -at- fqdn.org * * 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 diff -Nru util-linux-2.31.1/disk-utils/cramfs.h util-linux-2.32/disk-utils/cramfs.h --- util-linux-2.31.1/disk-utils/cramfs.h 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/cramfs.h 2018-03-20 17:51:39.638850199 +0000 @@ -2,7 +2,7 @@ * cramfs_common - cramfs common code * * Copyright (c) 2008 Roy Peled, the.roy.peled -at- gmail - * Copyright (c) 2004-2006 by Michael Holzt, kju -at- fqdn.org + * Copyright (c) 2004-2006 by Juliane Holzt, kju -at- fqdn.org * * 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 diff -Nru util-linux-2.31.1/disk-utils/fdisk.c util-linux-2.32/disk-utils/fdisk.c --- util-linux-2.31.1/disk-utils/fdisk.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/fdisk.c 2018-02-20 13:16:11.728509896 +0000 @@ -68,7 +68,7 @@ static void fdiskprog_init_debug(void) { - __UL_INIT_DEBUG(fdisk, FDISKPROG_DEBUG_, 0, FDISK_DEBUG); + __UL_INIT_DEBUG_FROM_ENV(fdisk, FDISKPROG_DEBUG_, 0, FDISK_DEBUG); } static void reply_sighandler(int sig __attribute__((unused))) diff -Nru util-linux-2.31.1/disk-utils/fdisk-list.c util-linux-2.32/disk-utils/fdisk-list.c --- util-linux-2.31.1/disk-utils/fdisk-list.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/fdisk-list.c 2018-03-09 12:31:47.390255981 +0000 @@ -334,7 +334,7 @@ if (devno <= 0) continue; - if (sysfs_devno_is_lvm_private(devno, NULL) || + if (sysfs_devno_is_dm_private(devno, NULL) || sysfs_devno_is_wholedisk(devno) <= 0) continue; diff -Nru util-linux-2.31.1/disk-utils/fdisk-menu.c util-linux-2.32/disk-utils/fdisk-menu.c --- util-linux-2.31.1/disk-utils/fdisk-menu.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/fdisk-menu.c 2018-02-16 10:25:22.864011770 +0000 @@ -88,6 +88,7 @@ #define MENU_ENT_NEST(k, t, l, p) { .title = t, .key = k, .normal = 1, .label = l, .parent = p } #define MENU_XENT_NEST(k, t, l, p) { .title = t, .key = k, .expert = 1, .label = l, .parent = p } +#define MENU_BENT_NEST(k, t, l, p) { .title = t, .key = k, .expert = 1, .normal = 1, .label = l, .parent = p } /* Generic menu */ static const struct menu menu_generic = { @@ -150,7 +151,7 @@ .callback = geo_menu_cb, .exclude = FDISK_DISKLABEL_GPT | FDISK_DISKLABEL_BSD, .entries = { - MENU_XSEP(N_("Geometry")), + MENU_XSEP(N_("Geometry (for the current label)")), MENU_XENT('c', N_("change number of cylinders")), MENU_XENT('h', N_("change number of heads")), MENU_XENT('s', N_("change number of sectors/track")), @@ -162,12 +163,12 @@ .callback = gpt_menu_cb, .label = FDISK_DISKLABEL_GPT, .entries = { - MENU_XSEP(N_("GPT")), + MENU_BSEP(N_("GPT")), MENU_XENT('i', N_("change disk GUID")), MENU_XENT('n', N_("change partition name")), MENU_XENT('u', N_("change partition UUID")), MENU_XENT('l', N_("change table length")), - MENU_XENT('M', N_("enter protective/hybrid MBR")), + MENU_BENT('M', N_("enter protective/hybrid MBR")), MENU_XSEP(""), MENU_XENT('A', N_("toggle the legacy BIOS bootable flag")), @@ -221,7 +222,7 @@ MENU_XENT('b', N_("move beginning of data in a partition")), MENU_XENT('i', N_("change the disk identifier")), - MENU_XENT_NEST('M', N_("return from protective/hybrid MBR to GPT"), + MENU_BENT_NEST('M', N_("return from protective/hybrid MBR to GPT"), FDISK_DISKLABEL_DOS, FDISK_DISKLABEL_GPT), { 0, NULL } } @@ -739,7 +740,8 @@ if (!mbr) return -ENOMEM; *cxt0 = cxt = mbr; - fdisk_enable_details(cxt, 1); /* keep us in expert mode */ + if (fdisk_is_details(cxt)) + fdisk_enable_details(cxt, 1); /* keep us in expert mode */ fdisk_info(cxt, _("Entering protective/hybrid MBR disklabel.")); return 0; } @@ -1002,32 +1004,50 @@ return rc; } -/* C/H/S commands */ +/* C/H/S commands + * + * The geometry setting from this dialog is not persistent and maybe reset by + * fdisk_reset_device_properties() (for example when you create a new disk + * label). Note that on command line specified -C/-H/-S setting is persistent + * as it's based on fdisk_save_user_geometry(). + */ static int geo_menu_cb(struct fdisk_context **cxt0, const struct menu *menu __attribute__((__unused__)), const struct menu_entry *ent) { struct fdisk_context *cxt = *cxt0; + struct fdisk_label *lb = fdisk_get_label(cxt, NULL); int rc = -EINVAL; uintmax_t c = 0, h = 0, s = 0; + fdisk_sector_t mi, ma; DBG(MENU, ul_debug("enter GEO menu")); assert(cxt); assert(ent); + /* default */ + if (!lb) + lb = fdisk_get_label(cxt, "dos"); + switch (ent->key) { case 'c': - rc = fdisk_ask_number(cxt, 1, fdisk_get_geom_cylinders(cxt), - 1048576, _("Number of cylinders"), &c); + fdisk_label_get_geomrange_cylinders(lb, &mi, &ma); + rc = fdisk_ask_number(cxt, mi, fdisk_get_geom_cylinders(cxt), + ma, _("Number of cylinders"), &c); break; case 'h': - rc = fdisk_ask_number(cxt, 1, fdisk_get_geom_heads(cxt), - 256, _("Number of heads"), &h); + { + unsigned int i, a; + fdisk_label_get_geomrange_heads(lb, &i, &a); + rc = fdisk_ask_number(cxt, i, fdisk_get_geom_heads(cxt), + a, _("Number of heads"), &h); break; + } case 's': - rc = fdisk_ask_number(cxt, 1, fdisk_get_geom_sectors(cxt), - 63, _("Number of sectors"), &s); + fdisk_label_get_geomrange_sectors(lb, &mi, &ma); + rc = fdisk_ask_number(cxt, mi, fdisk_get_geom_sectors(cxt), + ma, _("Number of sectors"), &s); break; } diff -Nru util-linux-2.31.1/disk-utils/fsck.c util-linux-2.32/disk-utils/fsck.c --- util-linux-2.31.1/disk-utils/fsck.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/fsck.c 2018-02-19 12:05:26.672717039 +0000 @@ -540,24 +540,34 @@ } /* Find fsck program for a given fs type. */ -static char *find_fsck(const char *type) +static int find_fsck(const char *type, char **progpath) { char *s; const char *tpl; - static char prog[256]; + char *prog = NULL; char *p = xstrdup(fsck_path); + int rc; /* Are we looking for a program or just a type? */ tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s"); for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) { - sprintf(prog, tpl, s, type); + xasprintf(&prog, tpl, s, type); if (access(prog, X_OK) == 0) break; + free(prog); + prog = NULL; } + free(p); + rc = prog ? 1 : 0; + + if (progpath) + *progpath = prog; + else + free(prog); - return(s ? prog : NULL); + return rc; } static int progress_active(void) @@ -885,7 +895,7 @@ */ static int fsck_device(struct libmnt_fs *fs, int interactive) { - char progname[80], *progpath; + char *progname, *progpath; const char *type; int retval; @@ -902,9 +912,10 @@ else type = DEFAULT_FSTYPE; - sprintf(progname, "fsck.%s", type); - progpath = find_fsck(progname); - if (progpath == NULL) { + xasprintf(&progname, "fsck.%s", type); + + if (!find_fsck(progname, &progpath)) { + free(progname); if (fs_check_required(type)) { retval = ENOENT; goto err; @@ -914,6 +925,8 @@ num_running++; retval = execute(progname, progpath, type, fs, interactive); + free(progname); + free(progpath); if (retval) { num_running--; goto err; @@ -1148,7 +1161,7 @@ /* See if the program is available. */ - if (find_fsck(type) == NULL) { + if (!find_fsck(type, NULL)) { if (fs_check_required(type)) warnx(_("cannot check %s: fsck.%s not found"), fs_get_device(fs), type); diff -Nru util-linux-2.31.1/disk-utils/fsck.cramfs.c util-linux-2.32/disk-utils/fsck.cramfs.c --- util-linux-2.31.1/disk-utils/fsck.cramfs.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/fsck.cramfs.c 2018-02-16 10:25:22.864011770 +0000 @@ -47,7 +47,7 @@ /* We don't use our include/crc32.h, but crc32 from zlib! * - * The zlib implemenation performs pre/post-conditioning. The util-linux + * The zlib implementation performs pre/post-conditioning. The util-linux * imlemenation requires post-conditioning (xor) in the applications. */ #include @@ -192,7 +192,7 @@ errx(FSCK_EX_ERROR, _("unsupported filesystem features")); /* What are valid superblock sizes? */ - if (super.size < sizeof(struct cramfs_super)) + if (super.size < *start + sizeof(struct cramfs_super)) errx(FSCK_EX_UNCORRECTED, _("superblock size (%d) too small"), super.size); @@ -220,24 +220,28 @@ crc = crc32(0L, NULL, 0); buf = - mmap(NULL, start + super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); + mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); if (buf == MAP_FAILED) { buf = - mmap(NULL, start + super.size, PROT_READ | PROT_WRITE, + mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (buf != MAP_FAILED) { - if (lseek(fd, start, SEEK_SET) == (off_t) -1) + ssize_t tmp; + if (lseek(fd, 0, SEEK_SET) == (off_t) -1) err(FSCK_EX_ERROR, _("seek on %s failed"), filename); - if (read(fd, (unsigned char *) buf + start, super.size) != - (ssize_t) super.size) + tmp = read(fd, buf, super.size); + if (tmp < 0) err(FSCK_EX_ERROR, _("cannot read %s"), filename); + if (tmp != (ssize_t) super.size) + errx(FSCK_EX_ERROR, _("failed to read %"PRIu32" bytes from file %s"), + super.size, filename); } } if (buf != MAP_FAILED) { ((struct cramfs_super *)((unsigned char *) buf + start))->fsid.crc = crc32(0L, NULL, 0); - crc = crc32(crc, (unsigned char *) buf + start, super.size); - munmap(buf, start + super.size); + crc = crc32(crc, (unsigned char *) buf + start, super.size - start); + munmap(buf, super.size); } else { int retval; size_t length = 0; diff -Nru util-linux-2.31.1/disk-utils/mkfs.cramfs.c util-linux-2.32/disk-utils/mkfs.cramfs.c --- util-linux-2.31.1/disk-utils/mkfs.cramfs.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/mkfs.cramfs.c 2018-02-16 10:25:22.864011770 +0000 @@ -39,7 +39,7 @@ /* We don't use our include/crc32.h, but crc32 from zlib! * - * The zlib implemenation performs pre/post-conditioning. The util-linux + * The zlib implementation performs pre/post-conditioning. The util-linux * imlemenation requires post-conditioning (xor) in the applications. */ #include diff -Nru util-linux-2.31.1/disk-utils/sfdisk.8 util-linux-2.32/disk-utils/sfdisk.8 --- util-linux-2.31.1/disk-utils/sfdisk.8 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/sfdisk.8 2018-01-17 15:29:14.255752498 +0000 @@ -58,6 +58,22 @@ It is necessary to explicitly create all partitions including whole-disk system partitions. +.B sfdisk +uses BLKRRPART (reread partition table) ioctl to make sure that the device is +not used by system or another tools (see also --no-reread). It's possible that +this feature or another sfdisk activity races with \fBudevd\fR. The recommended way +how to avoid possible collisions is to use exclusive flock for the whole-disk +device to serialize device access. The exclusive lock will cause udevd to skip +the event handling on the device. For example: +.RS +.sp +.nf +.B "flock /dev/sdc sfdisk /dev/sdc" +.fi +.sp +.RE +Note, this semantic is not currently supported by udevd for MD and DM devices. + .SH COMMANDS The commands are mutually exclusive. .TP @@ -78,10 +94,14 @@ values from the partition table and does not use built-in defaults for the unused partition given with \fB\-N\fR. See also \fB\-\-append\fR. .TP -.BR \-A , " \-\-activate \fIdevice " [ \fIpartition-number ...] -Switch on the bootable flag for the specified partitions. -If no \fIpartition-number\fR is specified, -then list the partitions with an enabled flag. +.BR \-A , " \-\-activate \fIdevice " [ \fIpartition-number...] +Switch on the bootable flag for the specified partitions and switch off the +bootable flag on all unspecified partitions. The special placeholder '-' +may be used instead of the partition numbers to switch off the bootable flag +on all partitions. + +If no \fIpartition-number\fR is specified, then list the partitions with an +enabled flag. .TP .BR "\-\-delete \fIdevice " [ \fIpartition-number ...] Delete all or the specified partitions. @@ -357,6 +377,12 @@ .TP .B U EFI System partition, means EF for MBR and C12A7328-F81F-11D2-BA4B-00A0C93EC93B for GPT +.TP +.B R +Linux RAID; means FD for MBR and A19D880F-05FC-4D3B-A006-743F0F84911E for GPT +.TP +.B V +LVM; means 8E for MBR and E6D6D379-F507-44C2-A23C-238F2A3DF928 for GPT .RE .PP The default diff -Nru util-linux-2.31.1/disk-utils/sfdisk.c util-linux-2.32/disk-utils/sfdisk.c --- util-linux-2.31.1/disk-utils/sfdisk.c 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/disk-utils/sfdisk.c 2018-01-17 12:52:52.231192234 +0000 @@ -119,7 +119,7 @@ static void sfdiskprog_init_debug(void) { - __UL_INIT_DEBUG(sfdisk, SFDISKPROG_DEBUG_, 0, SFDISK_DEBUG); + __UL_INIT_DEBUG_FROM_ENV(sfdisk, SFDISKPROG_DEBUG_, 0, SFDISK_DEBUG); } @@ -546,8 +546,15 @@ rc = move_partition_data(sf, sf->partno, sf->orig_pa); if (!rc) { fdisk_info(sf->cxt, _("\nThe partition table has been altered.")); - if (!sf->notell) + if (!sf->notell) { + /* Let's wait a little bit. It's possible that our + * system is still busy with a previous re-read + * ioctl (on sfdisk start) or with another task + * related to the write to the device. + */ + xusleep(250000); fdisk_reread_partition_table(sf->cxt); + } } } if (!rc) @@ -816,8 +823,13 @@ if (rc) err(EXIT_FAILURE, _("cannot open %s"), devname); - if (!fdisk_is_label(sf->cxt, DOS)) - errx(EXIT_FAILURE, _("toggle boot flags is supported for MBR only")); + if (fdisk_is_label(sf->cxt, GPT)) { + /* Switch from GPT to PMBR */ + sf->cxt = fdisk_new_nested_context(sf->cxt, "dos"); + if (!sf->cxt) + err(EXIT_FAILURE, _("cannot switch to PMBR")); + } else if (!fdisk_is_label(sf->cxt, DOS)) + errx(EXIT_FAILURE, _("toggle boot flags is supported for MBR or PMBR only")); if (!listonly && sf->backup) backup_partition_table(sf, devname); @@ -848,7 +860,11 @@ /* sfdisk --activate [..] */ for (i = 1; i < argc; i++) { - int n = strtou32_or_err(argv[i], _("failed to parse partition number")); + int n; + + if (i == 1 && strcmp(argv[1], "-") == 0) + break; + n = strtou32_or_err(argv[i], _("failed to parse partition number")); rc = fdisk_toggle_partition_flag(sf->cxt, n - 1, DOS_FLAG_ACTIVE); if (rc) @@ -858,6 +874,7 @@ } fdisk_unref_partition(pa); + if (listonly) rc = fdisk_deassign_device(sf->cxt, 1); else @@ -1295,8 +1312,8 @@ fputc('\n', stdout); fputs(_(" The partition type. Default is a Linux data partition.\n"), stdout); - fputs(_(" MBR: hex or L,S,E,X shortcuts.\n"), stdout); - fputs(_(" GPT: UUID or L,S,H shortcuts.\n"), stdout); + fputs(_(" MBR: hex or L,S,E,X,U,R,V shortcuts.\n"), stdout); + fputs(_(" GPT: UUID or L,S,H,U,R,V shortcuts.\n"), stdout); fputc('\n', stdout); fputs(_(" Use '*' to mark an MBR partition as bootable.\n"), stdout); @@ -1826,7 +1843,7 @@ fputs(_("Display or manipulate a disk partition table.\n"), out); fputs(USAGE_COMMANDS, out); - fputs(_(" -A, --activate [ ...] list or set bootable MBR partitions\n"), out); + fputs(_(" -A, --activate [ ...] list or set bootable (P)MBR partitions\n"), out); fputs(_(" -d, --dump dump partition table (usable for later input)\n"), out); fputs(_(" -J, --json dump partition table in JSON format\n"), out); fputs(_(" -g, --show-geometry [ ...] list geometry of all or specified devices\n"), out); diff -Nru util-linux-2.31.1/Documentation/deprecated.txt util-linux-2.32/Documentation/deprecated.txt --- util-linux-2.31.1/Documentation/deprecated.txt 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/Documentation/deprecated.txt 2018-02-16 10:25:22.863011777 +0000 @@ -2,6 +2,18 @@ deprecated utils are in maintenance mode and we keep them in source tree for backward compatibility only. +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 @@ -60,7 +72,7 @@ -------------------------- What: CHS stuff in fdisk (except SUN where are partitions addresses by cylinders only) -Why: use addresssing by sectors, CHS does not work with modern disks, +Why: use addressing by sectors, CHS does not work with modern disks, confusing for users... -------------------------- diff -Nru util-linux-2.31.1/Documentation/licenses/COPYING.ISC util-linux-2.32/Documentation/licenses/COPYING.ISC --- util-linux-2.31.1/Documentation/licenses/COPYING.ISC 1970-01-01 00:00:00.000000000 +0000 +++ util-linux-2.32/Documentation/licenses/COPYING.ISC 2018-01-17 13:38:49.492594973 +0000 @@ -0,0 +1,11 @@ +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. diff -Nru util-linux-2.31.1/Documentation/parse-date.txt util-linux-2.32/Documentation/parse-date.txt --- util-linux-2.31.1/Documentation/parse-date.txt 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/Documentation/parse-date.txt 2018-02-16 10:25:22.863011777 +0000 @@ -462,7 +462,7 @@ environment variable and external file, and lacks the thread-safety of `parse_datetime'. - This chapter was originally produced by Franc,ois Pinard + This chapter was originally produced by François Pinard () from the `parse_datetime.y' source code, and then edited by K. Berry (). diff -Nru util-linux-2.31.1/Documentation/releases/v2.31.1-ReleaseNotes util-linux-2.32/Documentation/releases/v2.31.1-ReleaseNotes --- util-linux-2.31.1/Documentation/releases/v2.31.1-ReleaseNotes 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/Documentation/releases/v2.31.1-ReleaseNotes 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -util-linux 2.31.1 Release Notes -=============================== - -bash-completion: - - Exclude /dev/fd from fsck find [Kevin Locke] -blkid: - - Add support for LUKS2 and new LABEL attributes. [Milan Broz] -blockdev: - - be more explicit for BLKSSZ in blockdev.8 [Karel Zak] -build-sys: - - move rfkill to /usr/sbin [Karel Zak] -column: - - use \x for invalid multibyte seq. [Karel Zak] -dmesg: - - add note about -F format to the man page [Karel Zak] -docs: - - improve setarch(8) manual page [Sami Kerola] - - update AUTHORS file [Karel Zak] -fincore: - - fix a typo in fincore.1 [Masatake YAMATO] -fsck.cramfs: - - Fix bus error on broken file system. [Tobias Stoeckmann] -hwclock: - - add iso-8601 overflow check [J William Piggott] - - fix debug regression [J William Piggott] - - revert ioctl test [Karel Zak] -lib/mbsalign: - - add mbs_invalid_encode() [Karel Zak] -lib/md5: - - use ul_/UL_ prefix [Karel Zak] -lib/sha1: - - use ul_/UL_prefix for symbols [Karel Zak] -lib/timeutils: - - ISO_8601_BUFSIZ too small [J William Piggott] -libblkid: - - vfat Fix reading labels which starts with byte 0x05 [Pali Rohár] -libfdisk: - - (sun) enhance searching of free space [Mikhail Vorobyov] - - (sun) fix creation of whole disk partition [Mikhail Vorobyov] - - (sun) move aligning of the first sector before availability check [Mikhail Vorobyov] - - Fix uninitialized structure [Roddy Shuler] -libmount: - - Allow MNT_FORCE and MNT_DETACH at umount [Joshua Watt] - - add nsfs between pseudo filesystems [Karel Zak] -libsmartcols: - - don't add blank padding after left aligned title [Karel Zak] -lsblk: - - add hint about perms to man page [Karel Zak] -lscpu: - - Treat read failure on Xen Hypervisor properties as non-fatal [Dirk Mueller] -lslocks: - - add note about OFDLCK [Karel Zak] -man: - - use long options in text and add example to uuidgen [Sami Kerola] -mcookie: - - properly initialize hash [Karel Zak] -md5: - - declare byteReverse as static [Luca Ceresoli] -misc: - - fix typos [Sami Kerola] -mount: - - add hint about -t and root perms to the man page [Karel Zak] - - add more details about UUIDs and LABELs to the man page [Karel Zak] -nsenter: - - fix compiler warning [-Wuninitialized] [Karel Zak] -po: - - merge changes [Karel Zak] - - update cs.po (from translationproject.org) [Petr Písař] - - update ja.po (from translationproject.org) [Takeshi Hamasaki] - - update pl.po (from translationproject.org) [Jakub Bogusz] -rtcwake: - - add note about HW and sleep to the man page [Karel Zak] - - fix sys vs. rtc time delta usage [Karel Zak] -sample-scols-title: - - add left title without padding [Karel Zak] -sfdisk: - - create empty label on 'write' command [Karel Zak] -test_sha1: - - update helper [Karel Zak] -tests: - - add LUKS test images [Milan Broz] - - add fsck.cramfs bad-header test [Karel Zak] - - don't use mount. helpers in mount-by-pattern tests [Karel Zak] - - update columns test due to dda229c7b2b16a31fae8e99079ab4f4ae5bc8eac [Karel Zak] - - update libsmartcols/title [Karel Zak] -vipw: - - do not let editor to inherit open file descriptors [Sami Kerola] diff -Nru util-linux-2.31.1/Documentation/releases/v2.32-ReleaseNotes util-linux-2.32/Documentation/releases/v2.32-ReleaseNotes --- util-linux-2.31.1/Documentation/releases/v2.32-ReleaseNotes 1970-01-01 00:00:00.000000000 +0000 +++ util-linux-2.32/Documentation/releases/v2.32-ReleaseNotes 2018-03-21 13:58:22.969462206 +0000 @@ -0,0 +1,492 @@ +Util-linux 2.32 Release Notes +============================= + +Release highlights +------------------ + +The command cal(1) has been improved to provide better control on used calendar +system. Now it is possible to switch between Gregorian and Julian exclusively, +or use the current default (reform in September 1752). The new command line +options --reform and --iso have been added. The command also follows terminal +width to format output. + +The library libblkid has been extended to support LUKS2, Micron mpool, VDO and +Atari partition table. + +The command rfkill(8) has been moved to /usr/sbin to be compatible with the +original rfkill implementation. + +The command dmesg(1) provides better support for multi-line messages and the +new command line option --force-prefix to print facility, level or timestamp +information to each line of a multi-line message + +The command fallocate(1) --dig-holes is faster and more effect now. + +The command fdisk(8) provides access to Protective MBR accessible from main +menu. The Sun label support has been improved. + +The command lscpu(1) provides more details about ARM CPUs now. + +The command lsmem(1) supports memory zone awareness now. + +The command lsns(8) provides netnsid and nsfs columns now. + +The command rtcwake(8) waits stdin to settle down before entering a system +sleep. + +The new command line option --kill-child has been added to unshare(1). + + +Stable maintenance releases between v2.31 and v2.32 +--------------------------------------------------- + +util-linux 2.31.1 [Dec 19 2017] + + * https://www.kernel.org/pub/linux/utils/util-linux/v2.31/v2.31.1-ReleaseNotes + https://www.kernel.org/pub/linux/utils/util-linux/v2.31/v2.31.1-ChangeLog + + +Changes between v2.31 and v2.32 +------------------------------- + +agetty: + - Fix a use of uninitialised memory in an agetty error path. [Steven Smith] + - add support for /etc/issue.d [Karel Zak] + - remove unused flag [Karel Zak] +bash-completion: + - (umount) use findmnt, escape a space in paths [Karel Zak] + - Exclude /dev/fd from fsck find [Kevin Locke] + - update zramctl algorithms list [Sami Kerola] +blkid: + - Add support for LUKS2 and new LABEL attributes. [Milan Broz] +blkzone: + - Fix a typo in blkzone.8 [Masanari Iida] +blockdev: + - be more explicit for BLKSSZ in blockdev.8 [Karel Zak] +build-sys: + - (configure) fix bashisms [Mike Frysinger] + - add --enable-asan and --memcheck-asan for tests [Karel Zak] + - add missing include [Karel Zak] + - automake is able to find headers in builddir ... [Ruediger Meier] + - avoid using prog_DEPENDENCIES [Ruediger Meier] + - disable bz2 tarball and fix some am warnings [Ruediger Meier] + - don't check for swapon() number of arguments [Karel Zak] + - forgot update NEWS for v2.32-rc1 [Karel Zak] + - gtkdoc-fixxref v1.27 requires module option [Karel Zak] + - lsns requires libmount [Karel Zak] + - move rfkill to /usr/sbin [Karel Zak] + - release++ (v2.32-rc2) [Karel Zak] + - remove generated headers from dist tar ball [Ruediger Meier] + - remove redundant EXTRA_DIST files [Ruediger Meier] + - remove unneeded dependencies on bla.h.in [Ruediger Meier] +cal: + - Use ALTMON_* correctly [Rafal Luzynski] + - add ifdef TEST_CAL [Karel Zak] + - add option to set Gregorian reform date [J William Piggott] + - clean up man page synopsis syntax [Karel Zak] + - do not set months_in_row with -3 option [J William Piggott] + - don't use year header for -1, -3 or -n [Karel Zak] + - explain magic values for day of week calculation [Karel Zak] + - fix first week calculation [J William Piggott] + - fix julian calendars for large years [J William Piggott] + - fix multi-byte comment, explain in better way [Karel Zak, J William Piggott] + - fix week calculations for 1752 [J William Piggott] + - follow terminal width [Karel Zak] + - honor num_months when only a year argument [J William Piggott] + - move REFORMATION_YEAR to control struct [J William Piggott] + - remove extra space after year output [Karel Zak] + - update man page [J William Piggott] +chmem: + - cleanup includes [Karel Zak] + - cleanup usage() [Karel Zak] +chrt: + - fix compiler warning [-Wmaybe-uninitialized] [Karel Zak] +column: + - add --table-noheadings [Karel Zak] + - allow to hide unnamed columns [Karel Zak] + - don't ignore space-char separators at begin of the line [Karel Zak] + - fix memory leak [coverity scan] [Karel Zak] + - update column.1 [ahmogit] + - use \x for invalid multibyte seq. [Karel Zak] +dmesg: + - Add --force-prefix option [Prarit Bhargava] + - add note about -F format to the man page [Karel Zak] + - fix compiler warning [-Wuninitialized] [Karel Zak] + - use xstrdup() in xalloc.h based util [Karel Zak] +docs: + - add ISC licence [Carlos Santos] + - add new idea to TODO list [Karel Zak] + - add note about JSON [Karel Zak] + - add note about NVMe-multipath to TODO [Karel Zak] + - add remount-all idea to TODO [Karel Zak] + - add script(1) events idea to TODO [Karel Zak] + - improve setarch(8) manual page [Sami Kerola] + - update AUTHORS file [Karel Zak] + - update TODO [Karel Zak] + - update TODO file [Karel Zak] + - update v2.32-ReleaseNotes [Karel Zak] +eject: + - remove list_speeds() #ifdef CDROM_SELECT_SPEED protection [Sami Kerola] +fallocate: + - dig holes only in data extents [Karel Zak, Vaclav Dolezal] + - remove typo [Karel Zak] +fdisk: + - (gpt) make PMBR accessible from main menu [Karel Zak] +fincore: + - Handle large files correctly on 32 bit [Tobias Stoeckmann] + - Handle large files on 32 bit without LFS [Tobias Stoeckmann] + - fix a typo in fincore.1 [Masatake YAMATO] +findfs: + - don't include exitcodes.h [Karel Zak] +findmnt: + - findmnt.8 remove spurious spaces before "--tree" and "--verbose" [Jakub Wilk] +fsck: + - cleanup find_fsck() [Karel Zak] + - coding style cleanup [Karel Zak] + - use xasprintf to avoid buffer overruns with an insane fs type [Theodore Ts'o] +fsck.cramfs: + - Fix bus error on broken file system. [Tobias Stoeckmann] + - fix crash when superblock size is too small [Ruediger Meier] + - fix error message [Ruediger Meier] +fstrim: + - don't include exitcodes.h [Karel Zak] + - fix fs.h and mount.h collision [Karel Zak] +hwclock: + - add --ul-debug implementing debug.h [J William Piggott] + - add iso-8601 overflow check [J William Piggott] + - fix debug regression [J William Piggott] + - rename --debug option to --verbose [J William Piggott] + - revert ioctl test [Karel Zak] + - use reentrant time conversion functions [J William Piggott] +include/c: + - add errexec() [Karel Zak] +include/debug: + - don't print pointer address for SUID programs [Karel Zak] + - improve debug message [Karel Zak] + - introduce __UL_INIT_DEBUG_FROM_STRING() [Karel Zak] + - print info when addresses suppressed [Karel Zak] +kill: + - Extract signal names into signames.h/signames.c [Niklas Hambüchen] +lib: + - Add simple crc32c() function [John Groves] +lib/exec_shell: + - (and pager) use errexec() [Karel Zak] + - cleanup function attributes [Karel Zak] +lib/mangle: + - return size of the decoded buffer [Karel Zak] +lib/mbsalign: + - Fix escaping nonprintable multibyte characters [Vaclav Dolezal] + - add mbs_invalid_encode() [Karel Zak] + - encode \x to \xecx [Karel Zak] + - encode backslash to prevent ambiguity [Vaclav Dolezal] + - escape "\x" when HAVE_WIDECHAR not defined [Vaclav Dolezal] +lib/md5: + - use ul_/UL_ prefix [Karel Zak] +lib/path: + - make path_set_prefix() independent on cpu_set_t [Karel Zak] +lib/randutils: + - Do not block on getrandom() [Carlo Caione] + - don't break on EAGAIN, use usleep() [Karel Zak] +lib/sha1: + - fix indention [Karel Zak] + - use proper WORDS_BIGENDIAN macro [Karel Zak] + - use ul_/UL_prefix for symbols [Karel Zak] +lib/signames: + - fix redefinition of 'sys_signame' on OSX [Karel Zak] + - remove signame array from header file [Karel Zak] + - remove unused function [Sami Kerola] +lib/timeutils: + - ISO_8601_BUFSIZ too small [J William Piggott] + - add common ISO timestamp masks [J William Piggott] + - add get_gmtoff() [J William Piggott] +lib/timeutils.c: + - bug fix Segmentation fault [J William Piggott] + - strxxx_iso do not wrap tm_year [J William Piggott] + - strxxx_iso test conversion errors [J William Piggott] + - warn format_iso_time() overflow [J William Piggott] +libblkid: + - (bcache) cleanup magic string definition [Karel Zak] + - (dos) make subtypes probing more robust [Karel Zak] + - (mpool) checksum is LE [Karel Zak] + - (mpool) don't use gtkdocs-like comment block [Karel Zak] + - Add VDO superblock information into blkid [Sweet Tea Dorminy] + - Add support for Micron mpool formatted drives [John Groves] + - Add support for stratis [Tony Asleson] + - Mark char* params to blkid_dev_set_search as const [Andy Grover] + - Support for Atari partitioning scheme [Vaclav Dolezal] + - add debug messages when ignore useless devices [Karel Zak] + - atari - don't add duplicate entries [Vaclav Dolezal] + - atari - fix bad variable name [Vaclav Dolezal] + - atari - reject devices with blocksize != 512 [Vaclav Dolezal] + - atari - test if any partition fits disk size [Vaclav Dolezal] + - ignore private Stratis devices [Tony Asleson] + - improve FreeBSD partitions parsing [Karel Zak] + - make mpool independent on libuuid [Karel Zak] + - udf Fix parsing LVID location [Pali Rohár] + - udf Fix parsing UDF revision [Pali Rohár] + - udf Fix reading Logical Volume Integrity Descriptor Implementation Use (LVIDIU) [Pali Rohár] + - udf Optimize and fix probing when block size > 2048 bytes [Pali Rohár] + - udf Really try to read only first LVID [Pali Rohár] + - udf Stop scanning Volume Descriptors after we found Terminating Descriptor [Pali Rohár] + - udf Update copyright [Pali Rohár] + - udf Use UDF revision field from LVD domain id "*OSTA UDF Compliant" as a fallback value for ID_FS_VERSION when LVIDIU is missing [Pali Rohár] + - vfat Fix reading labels which starts with byte 0x05 [Pali Rohár] +libfdisk: + - (docs) add missing docs blocks [Karel Zak] + - (docs) improve enums documentation [Karel Zak] + - (docs) update year [Karel Zak] + - (dos) fix max heads [Karel Zak] + - (gpt) add VMware specific UUIDs [Karel Zak] + - (gpt) move backup header after device resize [Karel Zak] + - (gpt) use fdisk_warn() for failed name setting [Karel Zak] + - (script) be consistent in code with types [Karel Zak] + - (script) support R (RAID) and V (LVM) shortcuts [Karel Zak] + - (sun) enhance searching of free space [Mikhail Vorobyov] + - (sun) fix creation of whole disk partition [Mikhail Vorobyov] + - (sun) fix n-1 bug and whole-disk [Karel Zak] + - (sun) move aligning of the first sector before availability check [Mikhail Vorobyov] + - Fix uninitialized structure [Roddy Shuler] + - allocate enough bytes for ucs2 to utf8 encoding [Vaclav Dolezal] + - allow to start freespace for zero [Karel Zak] + - extend API to provide label specific geometry ranges [Karel Zak] + - fix docs warnings [Karel Zak] + - gpt properly encode string on rename [Vaclav Dolezal] + - return bytes processed from gpt_entry_set_name(), process rc [Vaclav Dolezal] +libmount: + - (docs) update year [Karel Zak] + - Allow MNT_FORCE and MNT_DETACH at umount [Joshua Watt] + - Use waitpid() when waiting for mount helper child process [Vratislav Podzimek] + - add missing macro to docs [Karel Zak] + - add nsfs between pseudo filesystems [Karel Zak] + - check waitpid() return code [Karel Zak] + - deallocate on /proc/swaps parse error [Karel Zak] + - fix access() utab write test [Karel Zak] + - fix debug message [Karel Zak] + - fix example in docs [Karel Zak] + - fix fs pattern usage in mount --all [Karel Zak] + - fix mnt_table_is_fs_mounted() for rbind [Karel Zak] + - make libmount.h more robust [Karel Zak] + - make sure we deallocate on parse error [Karel Zak] + - minimize utimensat() write test usage [Karel Zak] + - use eacess() rather than open() to check mtab/utab [Karel Zak] +libsmartcols: + - (docs) update year [Karel Zak] + - don't add blank padding after left aligned title [Karel Zak] + - fix docs warnings [Karel Zak] + - fix mem-leaks in samples [Karel Zak] + - fixes issue with 0 width columns [taiyu] + - interpret zero width for pending data as error [Karel Zak] + - set minimal column width to 1 [Karel Zak] +libuuid: + - make "CONFORMING TO" man sections more explicit [Karel Zak] +login: + - add LOGIN_PLAIN_PROMPT to login.defs [Karel Zak] +login-utils: + - use free_getlogindefs_data() [Karel Zak] +lsblk: + - add hint about perms to man page [Karel Zak] + - document LSBLK_DEBUG= [Karel Zak] + - try device/dev to read devno [Karel Zak] +lscpu: + - (arm) cleanup code [Karel Zak] + - Decode ARM CPUs [Riku Voipio] + - Treat read failure on Xen Hypervisor properties as non-fatal [Dirk Mueller] + - move ARM decoding to lscpu-arm.c [Karel Zak] + - move struct lscpu_desc header file [Karel Zak] +lscpu-arm: + - add Faraday And Brahma cores [Riku Voipio] +lslocks: + - add note about OFDLCK [Karel Zak] +lsmem: + - add --split [Karel Zak] + - add hint about block merges to the man page [Karel Zak] + - fix memory leak [coverity scan] [Karel Zak] + - fix total online/offline memory calculation [Gerald Schaefer] + - improve path_read_xxx() usage [Karel Zak] + - make --split optional, follow output by default [Karel Zak] +lsmem/chmem: + - add memory zone awareness [Gerald Schaefer] + - add memory zone awareness to bash-completion [Andre Wild] +lsns: + - (man) write about using multi-line in NSFS cell of lsns [Masatake YAMATO] + - add --nowrap(-W) option [Masatake YAMATO] + - add a case for testing netnsid column [Masatake YAMATO] + - add a case for testing nsfs column [Masatake YAMATO] + - add netnsid column [Masatake YAMATO] + - add nsfs column [Masatake YAMATO] + - disable netnsid column by default [Masatake YAMATO] + - fix clang compiler warning [Ruediger Meier] + - initialize stuff when really necessary [Karel Zak] + - nsfs stuff cleanup [Karel Zak] + - remove if-after-xcalloc [Karel Zak] + - rename notruns to no_trunc [Karel Zak] +man: + - use long options in text and add example to uuidgen [Sami Kerola] +mcookie: + - (man) add note about getrandom() [Karel Zak] + - properly initialize hash [Karel Zak] +md5: + - declare byteReverse as static [Luca Ceresoli] +misc: + - fix printf i386 compiler warnings [Ruediger Meier] + - fix typos [Sami Kerola] + - fix typos using codespell [Ruediger Meier] + - remove %p from debug messages [Karel Zak] +mount: + - (man) be explicit about bind operation [Karel Zak] + - (man) update mount options for UDF [Steve Kenton] + - add hint about -t and root perms to the man page [Karel Zak] + - add more details about UUIDs and LABELs to the man page [Karel Zak] + - add note about "already mounted" behavior [Karel Zak] + - add note about cached kernel table for --all [Karel Zak] + - be more accurate in man page about propagation flags [Karel Zak] +mount(8): + - drop redundant filesystem-specific sections [Mike Frysinger] + - point people to the proc(5) page for mount options [Mike Frysinger] + - umount does not (anymore?) say `none busy' [Alan Jenkins] +newgrp: + - use errexec() [Karel Zak] +nsenter: + - fix compiler warning [-Wuninitialized] [Karel Zak] + - revert changes committed by accident [Karel Zak] +po: + - merge changes [Karel Zak] + - update cs.po (from translationproject.org) [Petr Písař] + - update es.po (from translationproject.org) [Antonio Ceballos Roa] + - update fi.po (from translationproject.org) [Lauri Nurmi] + - update fr.po (from translationproject.org) [Frédéric Marchal] + - update ja.po (from translationproject.org) [Takeshi Hamasaki] + - update pl.po (from translationproject.org) [Jakub Bogusz] + - update pt_BR.po (from translationproject.org) [Rafael Fontenelle] + - update uk.po (from translationproject.org) [Yuri Chornoivan] +rename: + - rename.1 fix typo, where -> were [Kenyon Ralph] + - use access(3) to check if a file exists [Sami Kerola] +rfkill: + - provide RFKILL_TYPE_FM if undefined [Ruediger Meier] +rtcwake: + - add note about HW and sleep to the man page [Karel Zak] + - fix sys vs. rtc time delta usage [Karel Zak] + - wait stdin to settle down before entering a system sleep [Sami Kerola] +sample-scols-title: + - add left title without padding [Karel Zak] +schedutils: + - use errexec() [Karel Zak] +setarch: + - minor code clean up [Sami Kerola] +setpriv: + - add example section [Sam Morris] + - fix manpage typo [Sam Morris] + - improve description in man page [Sam Morris] + - include --init-groups in the list of options that can be specified with --[re]gid [Sam Morris] +setsid: + - new option --fork [Karel Zak] +sfdisk: + - add hint about udev and flock to the man page [Karel Zak] + - allow to disable bootable flag on all partitions [Karel Zak] + - allow to use --activate for PMBR [Karel Zak] + - cleanup shortcuts in man page too [Karel Zak] + - create empty label on 'write' command [Karel Zak] + - wait before re-read [Karel Zak] +signames: + - Make input char buffers const [Niklas Hambüchen] +su: + - build fix for the case where USE_PTY is not defined [Samuel Thibault] + - use errexec() [Karel Zak] +sys-utils: + - use errexec() [Karel Zak] +test: + - Add UDF hdd image with final block size 4096 created by Linux mkudffs 1.3 [Pali Rohár] + - use subtests for jan1753 cal(1) test [Karel Zak] +test_sha1: + - update helper [Karel Zak] +tests: + - Add UDF cd image created by mkudfiso 20100208 [Pali Rohár] + - GPT device resize test [Karel Zak] + - add /proc/swaps libmount parser test [Karel Zak] + - add LUKS test images [Milan Broz] + - add cal(1) --week=40 1752 [Karel Zak] + - add fsck.cramfs bad-header test [Karel Zak] + - add ipcslimits lock [Ruediger Meier] + - add lock on shared resources (e.g. scsi_debug) [Karel Zak] + - add mdadm locks [Karel Zak] + - add mpool blkid test image [Karel Zak] + - add set-x to lsns test [Karel Zak] + - add some more udevadm settle [Ruediger Meier] + - add tests for encode functions from lib/mbsalign.c [Vaclav Dolezal] + - add udevadm settle to sfdisk/resize [Ruediger Meier] + - add wierd sleep for libmount/context [Ruediger Meier] + - added missing expected outputs for partx (atari) [Vaclav Dolezal] + - added test for libblkid atari pt [Vaclav Dolezal] + - adjust for ISO timezone colon use [J William Piggott] + - allow to use memory checks for libsmartcols [Karel Zak] + - better lsns report on fail [Karel Zak] + - check for HAVE_LINUX_NET_NAMESPACE_H [Karel Zak] + - column(1) test for space-char separator [Karel Zak] + - column(1) test non-space separator at begin of line [Karel Zak] + - consolidate ts_device_has UUID or LABEL [Ruediger Meier] + - don't call tests with races in --parallel [Karel Zak] + - don't lock fd 1 (stdout), don't use /proc/$$/fd [Ruediger Meier] + - don't use mount. helpers in mount-by-pattern tests [Karel Zak] + - don't use unlocked resources [Ruediger Meier] + - dont't timeout flock [Ruediger Meier] + - fix fincore/count KNOWN_FAIL [Ruediger Meier] + - fix grep expressions for devices [Ruediger Meier] + - fix losetup race [Ruediger Meier] + - fix lsns perms [Karel Zak] + - handle xargs errors and invalid args [Ruediger Meier] + - make lsns test more robust [Karel Zak] + - mark fincore/count as KNOWN_FAIL [Karel Zak] + - mark mbsencode as KNOWN_FAIL [Vaclav Dolezal] + - mbsencode - removed emoji, added control unicode character [Vaclav Dolezal] + - mbsencode - test for HAVE_WIDECHAR [Vaclav Dolezal] + - merge 1m and 3m cal(1) tests [Karel Zak] + - merge sep1752 cal(1) tests [Karel Zak] + - merge year cal(1) tests [Karel Zak] + - re-introduce bash 3 compatibility (OSX) [Ruediger Meier] + - rename --memcheck to --memcheck-valgrind [Karel Zak] + - rename ts_valgrind to ts_run [Karel Zak] + - rewrite cal(1) bigyear test [Karel Zak] + - rewrite fsck-bad-header [Ruediger Meier] + - simplify cal(1) sep1752w test [Karel Zak] + - support multiple locks [Karel Zak] + - suppress warning for old sync(1) [root] + - unlocks on failed ts_scsi_debug_init [Karel Zak] + - update build-sys tests [Karel Zak] + - update cal(1) tests [Karel Zak] + - update columns test due to dda229c7b2b16a31fae8e99079ab4f4ae5bc8eac [Karel Zak] + - update default lsmem output [Karel Zak] + - update libsmartcols/title [Karel Zak] + - update lsmem [Karel Zak] + - update setarch test [Karel Zak] + - use TS_HELPER_CAL [Karel Zak] + - use flock to modify fstab [Karel Zak] + - use libtool to execute with valgrind [Karel Zak] + - use pgrep instead of ps --ppid ... [Ruediger Meier] + - use subtests for sep1752w test [Karel Zak] + - use subtests for weekarg cal(1) tests [Karel Zak] + - use subtests for weeknum cal(1) tests [Karel Zak] +tests/lsmem: + - update lsmem test with ZONES column [Gerald Schaefer] +text-utils: + - use errexec() [Karel Zak] +tools: + - improve checkmans [Karel Zak] +travis: + - enable osx root checks [Ruediger Meier] + - homebrew/dupes was deprecated [Ruediger Meier] + - use parallel root checks [Ruediger Meier] +unshare: + - Add --kill-child option. [Niklas Hambüchen] + - Allow passing to --kill-child [Niklas Hambüchen] + - cleanup if-if code [Karel Zak] +uuidd: + - cosmetic coding style change [Karel Zak] + - don't truncate long socket paths [Ruediger Meier] +vipw: + - do not let editor to inherit open file descriptors [Sami Kerola] + - use errexec() [Karel Zak] +whereis: + - fix typo in debug message [Karel Zak] +zramctl: + - use xstrdup() [Karel Zak] diff -Nru util-linux-2.31.1/Documentation/TODO util-linux-2.32/Documentation/TODO --- util-linux-2.31.1/Documentation/TODO 2017-12-21 14:44:24.000000000 +0000 +++ util-linux-2.32/Documentation/TODO 2018-03-09 09:56:08.626093167 +0000 @@ -1,55 +1,67 @@ Note that items with (!) have high priority. -build-sys ---------- - - for example - ./configure --disable-all-programs --enable-hwclock +libsmartcols +------------ + - (!) add libscols_column->json_type and scols_column_set_jsontype() + to generate proper JSON output. Now the library uses quotes (= all is + string) for everything. See for example SIZE in "lsblk --json --bytes" + output. - enables only hwclock, unfortunately we have no --enable/disable for all programs. - It would be nice to have generic --enable-programs , for example: +column +------ + - add option to NOT ignore empty lines + https://github.com/karelzak/util-linux/issues/593 + +script +------ + - (!) add terminal type ($TERM), columns and lines to the header line, something like: + + Script started on 2018-03-05 13:02:08+0100 [term="xterm-256color", lines=53, columns=190] + + see https://github.com/karelzak/util-linux/issues/583 + + - think about optional "event" records in timing file to save information + about non-data changes like signals (SIGWINCH, SIGSTOP, SIGCONT, etc.) + in format: - ./configure --disable-all-programs --enable-programs hwclock,lsblk +