diff -Nru libcgroup-2.0/aclocal.m4 libcgroup-2.0.2/aclocal.m4 --- libcgroup-2.0/aclocal.m4 2021-05-06 14:15:58.000000000 +0000 +++ libcgroup-2.0.2/aclocal.m4 2022-05-12 13:51:22.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ [am__api_version='1.16' 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.16.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ # 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.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])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-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -118,7 +118,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,7 +170,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,7 +201,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -392,7 +392,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -431,7 +431,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -458,7 +460,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -655,7 +657,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +678,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -695,7 +697,7 @@ rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Copyright (C) 1998-2018 Free Software Foundation, Inc. +# Copyright (C) 1998-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -715,7 +717,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -758,7 +760,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -797,7 +799,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -826,7 +828,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -873,7 +875,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -892,7 +894,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -973,7 +975,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1033,7 +1035,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1061,7 +1063,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1080,7 +1082,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/build-aux/ar-lib libcgroup-2.0.2/build-aux/ar-lib --- libcgroup-2.0/build-aux/ar-lib 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/ar-lib 2022-05-12 13:51:24.000000000 +0000 @@ -2,9 +2,9 @@ # Wrapper for Microsoft lib.exe me=ar-lib -scriptversion=2012-03-01.08; # UTC +scriptversion=2019-07-04.01; # UTC -# Copyright (C) 2010-2018 Free Software Foundation, Inc. +# Copyright (C) 2010-2020 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -65,7 +65,7 @@ mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin) + cygwin | msys) file=`cygpath -m "$file" || echo "$file"` ;; wine) @@ -224,10 +224,11 @@ esac done else - $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member - do - $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? - done + $AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \ + | while read member + do + $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? + done fi elif test -n "$quick$replace"; then diff -Nru libcgroup-2.0/build-aux/compile libcgroup-2.0.2/build-aux/compile --- libcgroup-2.0/build-aux/compile 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/compile 2022-05-12 13:51:24.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -Nru libcgroup-2.0/build-aux/config.guess libcgroup-2.0.2/build-aux/config.guess --- libcgroup-2.0/build-aux/config.guess 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/config.guess 2022-05-12 13:51:24.000000000 +0000 @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-02-24' +timestamp='2018-08-29' # 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 @@ -84,8 +84,6 @@ exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,39 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 +trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -138,7 +141,7 @@ # We could probably try harder. LIBC=gnu - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) @@ -199,7 +202,7 @@ os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -237,7 +240,7 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -389,20 +392,15 @@ echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -482,7 +480,7 @@ echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -579,7 +577,7 @@ exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -660,7 +658,7 @@ esac fi if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -700,7 +698,7 @@ esac if [ "$HP_ARCH" = hppa2.0w ] then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -726,7 +724,7 @@ echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -840,6 +838,17 @@ *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in @@ -894,8 +903,8 @@ # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -922,7 +931,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -971,7 +980,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} @@ -1046,11 +1055,7 @@ echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - fi + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1289,7 +1294,7 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi @@ -1362,6 +1367,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else @@ -1473,7 +1479,7 @@ exit 1 # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff -Nru libcgroup-2.0/build-aux/config.sub libcgroup-2.0.2/build-aux/config.sub --- libcgroup-2.0/build-aux/config.sub 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/config.sub 2022-05-12 13:51:24.000000000 +0000 @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-02-22' +timestamp='2018-08-29' # 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 @@ -110,1223 +110,1159 @@ exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 +# Split fields of configuration type +IFS="-" read -r field1 field2 field3 field4 <&2 + exit 1 ;; - -lynx*) - os=-lynxos + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac ;; - -psos*) - os=-psos + *-*) + # A lone config we happen to match not fitting any patern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + op50n) + cpu=hppa1.1 + vendor=oki ;; - ms1) - basic_machine=mt-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none + orion105) + cpu=clipper + vendor=highlevel ;; - xscaleeb) - basic_machine=armeb-unknown + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - - xscaleel) - basic_machine=armel-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=we32k + vendor=att ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec + cpu=powerpc + vendor=ibm + os=cnk ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx + cpu=m68k + vendor=motorola ;; dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd + cpu=m68k + vendor=bull + os=sysv3 ;; encore | umax | mmax) - basic_machine=ns32k-encore + cpu=ns32k + vendor=encore ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 + cpu=ns32k + vendor=ns ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm + cpu=hppa1.0 + vendor=hp ;; i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 ;; i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 ;; i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv ;; i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} ;; iris | iris4d) - basic_machine=mips-sgi + cpu=mips + vendor=sgi case $os in - -irix*) + irix*) ;; *) - os=-irix4 + os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos + cpu=m68000 + vendor=convergent ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv + cpu=mips + vendor=sony + os=newsos ;; next | m*-next) - basic_machine=m68k-next + cpu=m68k + vendor=next case $os in - -nextstep* ) + nextstep* ) ;; - -ns2*) - os=-nextstep2 + ns2*) + os=nextstep2 ;; *) - os=-nextstep3 + os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem + cpu=np1 + vendor=gould ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k + cpu=hppa1.1 + vendor=oki + os=proelf ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti + cpu=m68k + vendor=tti ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + pc532) + cpu=ns32k + vendor=pc532 ;; - pc98) - basic_machine=i386-pc + pn) + cpu=pn + vendor=gould ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + power) + cpu=power + vendor=ibm ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc + ps2) + cpu=i386 + vendor=ibm ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc + rm[46]00) + cpu=mips + vendor=siemens ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + rtpc | rtpc-*) + cpu=romp + vendor=ibm ;; - pentium4) - basic_machine=i786-pc + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + tower | tower-32) + cpu=m68k + vendor=ncr ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + w65) + cpu=w65 + vendor=wdc ;; - pn) - basic_machine=pn-gould + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf ;; - power) basic_machine=power-ibm + none) + cpu=none + vendor=none ;; - ppc | ppcbe) basic_machine=powerpc-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + + *-*) + IFS="-" read -r cpu vendor <&2 - exit 1 + # Recognize the cannonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | wasm32 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1334,199 +1270,245 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in # First match some system type aliases that might get confused # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux ;; - -solaris1 | -solaris1.*) + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - -solaris) - os=-solaris2 + solaris) + os=solaris2 ;; - -unixware*) - os=-sysv4.2uw + unixware*) + os=sysv4.2uw ;; - -gnu/linux*) + gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) + nto-qnx*) + ;; + nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + ;; + linux-dietlibc) + os=linux-dietlibc ;; - -mac*) + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; - -linux-dietlibc) - os=-linux-dietlibc + opened*) + os=openedition ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` + os400*) + os=os400 ;; - -sunos5*) + sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -sunos6*) + sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince + wince*) + os=wince ;; - -utek*) - os=-bsd + utek*) + os=bsd ;; - -dynix*) - os=-bsd + dynix*) + os=bsd ;; - -acis*) - os=-aos + acis*) + os=aos ;; - -atheos*) - os=-atheos + atheos*) + os=atheos ;; - -syllable*) - os=-syllable + syllable*) + os=syllable ;; - -386bsd) - os=-bsd + 386bsd) + os=bsd ;; - -ctix* | -uts*) - os=-sysv + ctix* | uts*) + os=sysv ;; - -nova*) - os=-rtmk-nova + nova*) + os=rtmk-nova ;; - -ns2) - os=-nextstep2 + ns2) + os=nextstep2 ;; - -nsk*) - os=-nsk + nsk*) + os=nsk ;; # Preserve the version number of sinix5. - -sinix5.*) + sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - -sinix*) - os=-sysv4 + sinix*) + os=sysv4 ;; - -tpf*) - os=-tpf + tpf*) + os=tpf ;; - -triton*) - os=-sysv3 + triton*) + os=sysv3 ;; - -oss*) - os=-sysv3 + oss*) + os=sysv3 ;; - -svr4*) - os=-sysv4 + svr4*) + os=sysv4 ;; - -svr3) - os=-sysv3 + svr3) + os=sysv3 ;; - -sysvr4) - os=-sysv4 + sysvr4) + os=sysv4 ;; - # This must come after -sysvr4. - -sysv*) + # This must come after sysvr4. + sysv*) ;; - -ose*) - os=-ose + ose*) + os=ose ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint ;; - -zvmoe) - os=-zvmoe + zvmoe) + os=zvmoe ;; - -dicos*) - os=-dicos + dicos*) + os=dicos ;; - -pikeos*) + pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $basic_machine in + case $cpu in arm*) - os=-eabi + os=eabi ;; *) - os=-elf + os=elf ;; esac ;; - -nacl*) + nacl*) + ;; + ios) ;; - -ios) + none) ;; - -none) + *-eabi) ;; *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; @@ -1543,258 +1525,265 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + os=linux ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf + ;; + clipper-intergraph) + os=clix ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os=elf ;; *-be) - os=-beos + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; *-next) - os=-nextstep + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in - -riscix*) + riscix*) vendor=acorn ;; - -sunos*) + sunos*) vendor=sun ;; - -cnk*|-aix*) + cnk*|-aix*) vendor=ibm ;; - -beos*) + beos*) vendor=be ;; - -hpux*) + hpux*) vendor=hp ;; - -mpeix*) + mpeix*) vendor=hp ;; - -hiux*) + hiux*) vendor=hitachi ;; - -unos*) + unos*) vendor=crds ;; - -dgux*) + dgux*) vendor=dg ;; - -luna*) + luna*) vendor=omron ;; - -genix*) + genix*) vendor=ns ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + mvs* | opened*) vendor=ibm ;; - -os400*) + os400*) vendor=ibm ;; - -ptx*) + ptx*) vendor=sequent ;; - -tpf*) + tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - -aux*) + aux*) vendor=apple ;; - -hms*) + hms*) vendor=hitachi ;; - -mpw* | -macos*) + mpw* | macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - -vos*) + vos*) vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo "$cpu-$vendor-$os" exit # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff -Nru libcgroup-2.0/build-aux/depcomp libcgroup-2.0.2/build-aux/depcomp --- libcgroup-2.0/build-aux/depcomp 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/depcomp 2022-05-12 13:51:24.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 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 diff -Nru libcgroup-2.0/build-aux/install-sh libcgroup-2.0.2/build-aux/install-sh --- libcgroup-2.0/build-aux/install-sh 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/install-sh 2022-05-12 13:51:24.000000000 +0000 @@ -451,7 +451,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # diff -Nru libcgroup-2.0/build-aux/ltmain.sh libcgroup-2.0.2/build-aux/ltmain.sh --- libcgroup-2.0/build-aux/ltmain.sh 2021-05-06 14:15:57.000000000 +0000 +++ libcgroup-2.0.2/build-aux/ltmain.sh 2022-05-12 13:51:21.000000000 +0000 @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-14" +VERSION=2.4.6 package_revision=2.4.6 @@ -387,7 +387,7 @@ # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # -# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: @@ -1370,7 +1370,7 @@ #! /bin/sh # Set a version string for this script. -scriptversion=2015-10-07.11; # UTC +scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,8 +1530,6 @@ { $debug_cmd - _G_rc_run_hooks=false - case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1540,16 +1538,16 @@ eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - if eval $_G_hook '"$@"'; then - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - _G_rc_run_hooks=: - fi + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift done - $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result } @@ -1559,16 +1557,10 @@ ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, you may remove/edit -# any options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. In this case you also must return $EXIT_SUCCESS to let the -# hook's caller know that it should pay attention to -# '_result'. Returning $EXIT_FAILURE signalizes that -# arguments are left untouched by the hook and therefore caller will ignore the -# result variable. -# -# Like this: +# 'eval'. Like this: # # my_options_prep () # { @@ -1578,11 +1570,9 @@ # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# # No change in '$@' (ignored completely by this hook). There is -# # no need to do the equivalent (but slower) action: -# # func_quote_for_eval ${1+"$@"} -# # my_options_prep_result=$func_quote_for_eval_result -# false +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # @@ -1591,37 +1581,25 @@ # { # $debug_cmd # -# args_changed=false -# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: -# args_changed=: -# ;; +# --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift -# args_changed=: # ;; -# *) # Make sure the first unrecognised option "$_G_opt" -# # is added back to "$@", we could need that later -# # if $args_changed is true. -# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # -# if $args_changed; then -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# fi -# -# $args_changed +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # @@ -1633,32 +1611,16 @@ # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# false +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll also need to manually amend $usage_message to reflect the extra +# You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. -# func_options_finish [ARG]... -# ---------------------------- -# Finishing the option parse loop (call 'func_options' hooks ATM). -func_options_finish () -{ - $debug_cmd - - _G_func_options_finish_exit=false - if func_run_hooks func_options ${1+"$@"}; then - func_options_finish_result=$func_run_hooks_result - _G_func_options_finish_exit=: - fi - - $_G_func_options_finish_exit -} - - # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1668,28 +1630,17 @@ { $debug_cmd - _G_rc_options=false + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} - for my_func in options_prep parse_options validate_options options_finish - do - if eval func_$my_func '${1+"$@"}'; then - eval _G_res_var='$'"func_${my_func}_result" - eval set dummy "$_G_res_var" ; shift - _G_rc_options=: - fi - done + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} - # Save modified positional parameters for caller. As a top-level - # options-parser function we always need to set the 'func_options_result' - # variable (regardless the $_G_rc_options value). - if $_G_rc_options; then - func_options_result=$_G_res_var - else - func_quote_for_eval ${1+"$@"} - func_options_result=$func_quote_for_eval_result - fi - - $_G_rc_options + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result } @@ -1698,9 +1649,9 @@ # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propagate that back to rest of this script, then the complete +# needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). +# returning. func_hookable func_options_prep func_options_prep () { @@ -1710,14 +1661,10 @@ opt_verbose=false opt_warning_types= - _G_rc_options_prep=false - if func_run_hooks func_options_prep ${1+"$@"}; then - _G_rc_options_prep=: - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result - fi + func_run_hooks func_options_prep ${1+"$@"} - $_G_rc_options_prep + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result } @@ -1731,20 +1678,18 @@ func_parse_options_result= - _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - if func_run_hooks func_parse_options ${1+"$@"}; then - eval set dummy "$func_run_hooks_result"; shift - _G_rc_parse_options=: - fi + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break - _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1759,10 +1704,7 @@ ;; --warnings|--warning|-W) - if test $# = 0 && func_missing_arg $_G_opt; then - _G_rc_parse_options=: - break - fi + test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1815,25 +1757,15 @@ shift ;; - --) _G_rc_parse_options=: ; break ;; + --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift - _G_match_parse_options=false - break - ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - - $_G_match_parse_options && _G_rc_parse_options=: done - - if $_G_rc_parse_options; then - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result - fi - - $_G_rc_parse_options + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result } @@ -1846,21 +1778,16 @@ { $debug_cmd - _G_rc_validate_options=false - # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - if func_run_hooks func_validate_options ${1+"$@"}; then - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result - _G_rc_validate_options=: - fi + func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - $_G_rc_validate_options + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result } @@ -2141,12 +2068,12 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-14 + version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . -GNU libtool home page: . +GNU libtool home page: . General help using GNU software: ." exit 0 } @@ -2343,8 +2270,6 @@ nonopt= preserve_args= - _G_rc_lt_options_prep=: - # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2368,18 +2293,11 @@ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; - *) - _G_rc_lt_options_prep=false - ;; esac - if $_G_rc_lt_options_prep; then - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result - fi - - $_G_rc_lt_options_prep + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep @@ -2391,12 +2309,9 @@ { $debug_cmd - _G_rc_lt_parse_options=false - # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do - _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2471,22 +2386,15 @@ func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"} ; shift - _G_match_lt_parse_options=false - break - ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - if $_G_rc_lt_parse_options; then - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result - fi - $_G_rc_lt_parse_options + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options @@ -2507,17 +2415,10 @@ # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac + # Keeping compiler generated duplicates in $postdeps and $predeps is not + # harmful, and is necessary in a majority of systems that use it to satisfy + # symbol dependencies. + opt_duplicate_compiler_generated_deps=: $opt_help || { # Sanity checks first: @@ -7364,16 +7265,10 @@ # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer - # -fuse-ld=* Linker select flags for GCC - # -static-* direct GCC to link specific libraries statically - # -fcilkplus Cilk Plus language extension features for C/C++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" @@ -7666,10 +7561,7 @@ case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then @@ -7988,19 +7880,19 @@ # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done continue fi # $pass = conv @@ -8924,9 +8816,6 @@ revision=$number_minor lt_irix_increment=no ;; - *) - func_fatal_configuration "$modename: unknown library version type '$version_type'" - ;; esac ;; no) diff -Nru libcgroup-2.0/build-aux/missing libcgroup-2.0.2/build-aux/missing --- libcgroup-2.0/build-aux/missing 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/missing 2022-05-12 13:51:24.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru libcgroup-2.0/build-aux/test-driver libcgroup-2.0.2/build-aux/test-driver --- libcgroup-2.0/build-aux/test-driver 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/test-driver 2022-05-12 13:51:24.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 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 diff -Nru libcgroup-2.0/build-aux/ylwrap libcgroup-2.0.2/build-aux/ylwrap --- libcgroup-2.0/build-aux/ylwrap 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/build-aux/ylwrap 2022-05-12 13:51:24.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # Written by Tom Tromey . # diff -Nru libcgroup-2.0/configure libcgroup-2.0.2/configure --- libcgroup-2.0/configure 2021-05-06 14:15:58.000000000 +0000 +++ libcgroup-2.0.2/configure 2022-05-12 13:51:23.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libcgroup 2.0. +# Generated by GNU Autoconf 2.69 for libcgroup 2.0.2. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='libcgroup' PACKAGE_TARNAME='libcgroup' -PACKAGE_VERSION='2.0' -PACKAGE_STRING='libcgroup 2.0' +PACKAGE_VERSION='2.0.2' +PACKAGE_STRING='libcgroup 2.0.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1376,7 +1376,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 libcgroup 2.0 to adapt to many kinds of systems. +\`configure' configures libcgroup 2.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1447,7 +1447,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libcgroup 2.0:";; + short | recursive ) echo "Configuration of libcgroup 2.0.2:";; esac cat <<\_ACEOF @@ -1583,7 +1583,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libcgroup configure 2.0 +libcgroup configure 2.0.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2199,7 +2199,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libcgroup $as_me 2.0, which was +It was created by libcgroup $as_me 2.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3065,7 +3065,7 @@ # Define the identity of the package. PACKAGE='libcgroup' - VERSION='2.0' + VERSION='2.0.2' cat >>confdefs.h <<_ACEOF @@ -3200,11 +3200,11 @@ # set library version, soname is libcgroup.so.MAJOR -LIBRARY_VERSION_MAJOR=1 +LIBRARY_VERSION_MAJOR=2 LIBRARY_VERSION_MINOR=0 -LIBRARY_VERSION_RELEASE=42 +LIBRARY_VERSION_RELEASE=2 # we do not want static libraries @@ -5730,7 +5730,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -6092,7 +6092,7 @@ fi : ${AR=ar} -: ${AR_FLAGS=cr} +: ${AR_FLAGS=cru} @@ -6593,8 +6593,11 @@ test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7813,8 +7816,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cr libconftest.a conftest.o" >&5 - $AR cr libconftest.a conftest.o 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -8943,12 +8946,6 @@ lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -9425,9 +9422,6 @@ openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; esac ld_shlibs=yes @@ -9682,7 +9676,7 @@ fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -10352,7 +10346,6 @@ if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -10374,7 +10367,7 @@ esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -11469,6 +11462,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -11477,7 +11473,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -11489,18 +11485,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -12523,7 +12507,7 @@ fi else - with_bindings = false + with_bindings=false fi if test x$with_bindings = xtrue; then @@ -13474,7 +13458,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -13966,7 +13950,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -14031,7 +14015,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -14370,7 +14354,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -14454,7 +14438,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -14465,7 +14449,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' @@ -14978,7 +14962,7 @@ ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -15353,9 +15337,6 @@ ;; esac ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs_CXX=no - ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -16029,6 +16010,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -16037,7 +16021,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -16049,18 +16033,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -18307,6 +18279,65 @@ done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fts_open" >&5 +$as_echo_n "checking for library containing fts_open... " >&6; } +if ${ac_cv_search_fts_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char fts_open (); +int +main () +{ +return fts_open (); + ; + return 0; +} +_ACEOF +for ac_lib in '' fts; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_fts_open=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_fts_open+:} false; then : + break +fi +done +if ${ac_cv_search_fts_open+:} false; then : + +else + ac_cv_search_fts_open=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fts_open" >&5 +$as_echo "$ac_cv_search_fts_open" >&6; } +ac_res=$ac_cv_search_fts_open +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + as_fn_error $? "Unable to find the fts_open() function" "$LINENO" 5 +fi + + if test x$with_pam = xtrue; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_syslog in -lpam" >&5 $as_echo_n "checking for pam_syslog in -lpam... " >&6; } @@ -19309,7 +19340,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libcgroup $as_me 2.0, which was +This file was extended by libcgroup $as_me 2.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19375,7 +19406,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libcgroup config.status 2.0 +libcgroup config.status 2.0.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20590,7 +20621,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } @@ -20617,6 +20650,7 @@ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. diff -Nru libcgroup-2.0/configure.ac libcgroup-2.0.2/configure.ac --- libcgroup-2.0/configure.ac 2021-05-06 14:14:25.000000000 +0000 +++ libcgroup-2.0.2/configure.ac 2022-05-12 13:49:35.000000000 +0000 @@ -15,7 +15,7 @@ AC_PREREQ([2.69]) # In following section update all occurences of version, including soname -AC_INIT([libcgroup],[2.0]) +AC_INIT([libcgroup],[2.0.2]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIRS([m4]) @@ -25,9 +25,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # set library version, soname is libcgroup.so.MAJOR -AC_SUBST(LIBRARY_VERSION_MAJOR, 1) +AC_SUBST(LIBRARY_VERSION_MAJOR, 2) AC_SUBST(LIBRARY_VERSION_MINOR, 0) -AC_SUBST(LIBRARY_VERSION_RELEASE, 42) +AC_SUBST(LIBRARY_VERSION_RELEASE, 2) # we do not want static libraries #AC_DISABLE_STATIC @@ -47,7 +47,7 @@ with_bindings=true fi ], - [with_bindings = false]) + [with_bindings=false]) AM_CONDITIONAL([WITH_BINDINGS], [test x$with_bindings = xtrue]) # Process command line options @@ -174,6 +174,12 @@ AC_FUNC_STAT AC_CHECK_FUNCS([getmntent hasmntopt memset mkdir rmdir strdup]) +AC_SEARCH_LIBS( + [fts_open], + [fts], + [], + [AC_MSG_ERROR([Unable to find the fts_open() function])]) + if test x$with_pam = xtrue; then AC_CHECK_LIB( [pam], diff -Nru libcgroup-2.0/debian/changelog libcgroup-2.0.2/debian/changelog --- libcgroup-2.0/debian/changelog 2021-08-27 13:45:11.000000000 +0000 +++ libcgroup-2.0.2/debian/changelog 2022-07-25 15:16:51.000000000 +0000 @@ -1,3 +1,27 @@ +libcgroup (2.0.2-2) unstable; urgency=medium + + * Upload to unstable + + -- Santiago Ruano Rincón Mon, 25 Jul 2022 17:16:51 +0200 + +libcgroup (2.0.2-1) experimental; urgency=medium + + * New upstream version 2.0.2 + + -- Santiago Ruano Rincón Wed, 18 May 2022 11:19:48 +0200 + +libcgroup (2.0.1-1) experimental; urgency=medium + + * Fix src/paches.{c,h} and debian/patches/* copyright information + (Closes: #996884) + * New upstream version 2.0.1 + * Update d/patches/cgrulesengd-_GNU_SOURCE.patch + * Update d/rules: no need anymore to rename pam_cgroup.so file + * Bump SONAME: libcgroup2 + * Bump Standards-Version to 4.6.1.0. No changes needed + + -- Santiago Ruano Rincón Thu, 12 May 2022 22:57:25 +0200 + libcgroup (2.0-2) unstable; urgency=low * Upload to unstable diff -Nru libcgroup-2.0/debian/control libcgroup-2.0.2/debian/control --- libcgroup-2.0/debian/control 2021-08-27 13:41:26.000000000 +0000 +++ libcgroup-2.0.2/debian/control 2022-05-16 12:08:22.000000000 +0000 @@ -8,7 +8,7 @@ flex, libpam-dev, Rules-Requires-Root: no -Standards-Version: 4.6.0 +Standards-Version: 4.6.1.0 Homepage: http://libcg.sourceforge.net/ Vcs-Git: https://salsa.debian.org/debian/libcgroup.git Vcs-Browser: https://salsa.debian.org/debian/libcgroup @@ -32,7 +32,7 @@ . This package contains the command-line tools. -Package: libcgroup1 +Package: libcgroup2 Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} @@ -55,7 +55,7 @@ Multi-Arch: same Depends: ${misc:Depends}, - libcgroup1 (= ${binary:Version}), + libcgroup2 (= ${binary:Version}), Description: control and monitor control groups (development) Control Groups (cgroups) provide a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with diff -Nru libcgroup-2.0/debian/copyright libcgroup-2.0.2/debian/copyright --- libcgroup-2.0/debian/copyright 2021-08-27 13:45:11.000000000 +0000 +++ libcgroup-2.0.2/debian/copyright 2021-10-20 11:36:18.000000000 +0000 @@ -14,6 +14,11 @@ 2014-2016, Christian Kastner License: GPL-3 +Files: debian/patches/* +Copyright: 2007-2009 IBM Corporation + Copyright (C) 2008-2009 RedHat Inc. +License: LGPL-2.1 + Files: googletest/* debian/missing-sources/googletest/* Copyright: 2008, Google Inc. License: BSD-3-clause-google @@ -23,6 +28,10 @@ 2008 Vivek Goyal License: BSD-3-clause or GPL-2, and LGPL-2.1 +Files: src/parse.c src/parse.h +Copyright: 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. +License: GPL-3+ + License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff -Nru libcgroup-2.0/debian/libcgroup1.install libcgroup-2.0.2/debian/libcgroup1.install --- libcgroup-2.0/debian/libcgroup1.install 2021-08-26 19:26:10.000000000 +0000 +++ libcgroup-2.0.2/debian/libcgroup1.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lib/*/libcgroup.so.* diff -Nru libcgroup-2.0/debian/libcgroup1.symbols libcgroup-2.0.2/debian/libcgroup1.symbols --- libcgroup-2.0/debian/libcgroup1.symbols 2021-08-26 20:34:19.000000000 +0000 +++ libcgroup-2.0.2/debian/libcgroup1.symbols 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -libcgroup.so.1 libcgroup1 #MINVER# -* Build-Depends-Package: libcgroup-dev - CGROUP_0.32.1@CGROUP_0.32.1 0.36.2 - CGROUP_0.32@CGROUP_0.32 0.36.2 - CGROUP_0.33@CGROUP_0.33 0.36.2 - CGROUP_0.34@CGROUP_0.34 0.36.2 - CGROUP_0.35@CGROUP_0.35 0.36.2 - CGROUP_0.36@CGROUP_0.36 0.37.1 - CGROUP_0.37@CGROUP_0.37 0.37.1 - CGROUP_0.38@CGROUP_0.38 0.38 - CGROUP_0.39@CGROUP_0.39 0.40~rc1 - CGROUP_0.40@CGROUP_0.40 0.42.2 - CGROUP_0.41@CGROUP_0.41 0.42.2 - CGROUP_0.42@CGROUP_0.42 0.42.2 - CGROUP_2.0@CGROUP_2.0 2.0 - cg_build_path_locked@CGROUP_2.0 2.0 - cg_chmod_recursive@CGROUP_0.37 0.37.1 - cg_mount_table@CGROUP_2.0 2.0 - cg_mount_table_lock@CGROUP_2.0 2.0 - cgroup_add_all_controllers@CGROUP_0.42 0.42.2 - cgroup_add_controller@CGROUP_0.32 0.36.2 - cgroup_add_value_bool@CGROUP_0.32 0.36.2 - cgroup_add_value_int64@CGROUP_0.32 0.36.2 - cgroup_add_value_string@CGROUP_0.32 0.36.2 - cgroup_add_value_uint64@CGROUP_0.32 0.36.2 - cgroup_attach_task@CGROUP_0.32 0.36.2 - cgroup_attach_task_pid@CGROUP_0.32 0.36.2 - cgroup_build_tasks_procs_path@CGROUP_2.0 2.0 - cgroup_change_all_cgroups@CGROUP_0.39 0.40~rc1 - cgroup_change_cgroup_flags@CGROUP_0.34 0.36.2 - cgroup_change_cgroup_path@CGROUP_0.32 0.36.2 - cgroup_change_cgroup_uid_gid@CGROUP_0.32 0.36.2 - cgroup_change_cgroup_uid_gid_flags@CGROUP_0.32 0.36.2 - cgroup_compare_cgroup@CGROUP_0.32 0.36.2 - cgroup_compare_controllers@CGROUP_0.32 0.36.2 - cgroup_config_create_template_group@CGROUP_0.39 0.40~rc1 - cgroup_config_load_config@CGROUP_0.32 0.36.2 - cgroup_config_set_default@CGROUP_0.38 0.38 - cgroup_config_unload_config@CGROUP_0.38 0.38 - cgroup_copy_cgroup@CGROUP_0.32 0.36.2 - cgroup_create_cgroup@CGROUP_0.32 0.36.2 - cgroup_create_cgroup_from_parent@CGROUP_0.32 0.36.2 - cgroup_delete_cgroup@CGROUP_0.32 0.36.2 - cgroup_delete_cgroup_ext@CGROUP_0.35 0.36.2 - cgroup_fill_cgc@CGROUP_2.0 2.0 - cgroup_free@CGROUP_0.32 0.36.2 - cgroup_free_controllers@CGROUP_0.32 0.36.2 - cgroup_get_all_controller_begin@CGROUP_0.35 0.36.2 - cgroup_get_all_controller_end@CGROUP_0.35 0.36.2 - cgroup_get_all_controller_next@CGROUP_0.35 0.36.2 - cgroup_get_cgroup@CGROUP_0.32 0.36.2 - cgroup_get_controller@CGROUP_0.34 0.36.2 - cgroup_get_controller_begin@CGROUP_0.34 0.36.2 - cgroup_get_controller_end@CGROUP_0.34 0.36.2 - cgroup_get_controller_next@CGROUP_0.34 0.36.2 - cgroup_get_controller_version@CGROUP_2.0 2.0 - cgroup_get_current_controller_path@CGROUP_0.32 0.36.2 - cgroup_get_last_errno@CGROUP_0.33 0.36.2 - cgroup_get_procname_from_procfs@CGROUP_0.34 0.36.2 - cgroup_get_procs@CGROUP_0.37 0.37.1 - cgroup_get_subsys_mount_point@CGROUP_0.34 0.36.2 - cgroup_get_subsys_mount_point_begin@CGROUP_0.38 0.38 - cgroup_get_subsys_mount_point_end@CGROUP_0.38 0.38 - cgroup_get_subsys_mount_point_next@CGROUP_0.38 0.38 - cgroup_get_task_begin@CGROUP_0.34 0.36.2 - cgroup_get_task_end@CGROUP_0.34 0.36.2 - cgroup_get_task_next@CGROUP_0.34 0.36.2 - cgroup_get_uid_gid@CGROUP_0.32 0.36.2 - cgroup_get_uid_gid_from_procfs@CGROUP_0.34 0.36.2 - cgroup_get_value_bool@CGROUP_0.32 0.36.2 - cgroup_get_value_int64@CGROUP_0.32 0.36.2 - cgroup_get_value_name@CGROUP_0.35 0.36.2 - cgroup_get_value_name_count@CGROUP_0.35 0.36.2 - cgroup_get_value_string@CGROUP_0.32 0.36.2 - cgroup_get_value_uint64@CGROUP_0.32 0.36.2 - cgroup_init@CGROUP_0.32 0.36.2 - cgroup_init_rules_cache@CGROUP_0.32 0.36.2 - cgroup_init_templates_cache@CGROUP_0.39 0.40~rc1 - cgroup_load_templates_cache_from_files@CGROUP_0.40 0.42.2 - cgroup_log@CGROUP_0.39 0.40~rc1 - cgroup_modify_cgroup@CGROUP_0.32 0.36.2 - cgroup_new_cgroup@CGROUP_0.32 0.36.2 - cgroup_parse_log_level_str@CGROUP_0.39 0.40~rc - cgroup_print_rules_config@CGROUP_0.32 0.36.2 - cgroup_read_stats_begin@CGROUP_0.34 0.36.2 - cgroup_read_stats_end@CGROUP_0.34 0.36.2 - cgroup_read_stats_next@CGROUP_0.34 0.36.2 - cgroup_read_value_begin@CGROUP_0.37 0.37.1 - cgroup_read_value_end@CGROUP_0.37 0.37.1 - cgroup_read_value_next@CGROUP_0.37 0.37.1 - cgroup_register_unchanged_process@CGROUP_0.34 0.36.2 - cgroup_reload_cached_rules@CGROUP_0.32 0.36.2 - cgroup_reload_cached_templates@CGROUP_0.39 0.40~rc1 - cgroup_set_default_logger@CGROUP_0.39 0.40~rc1 - cgroup_set_logger@CGROUP_0.39 0.40~rc1 - cgroup_set_loglevel@CGROUP_0.39 0.40~rc1 - cgroup_set_permissions@CGROUP_0.38 0.38 - cgroup_set_uid_gid@CGROUP_0.32 0.36.2 - cgroup_set_value_bool@CGROUP_0.32 0.36.2 - cgroup_set_value_int64@CGROUP_0.32 0.36.2 - cgroup_set_value_string@CGROUP_0.32 0.36.2 - cgroup_set_value_uint64@CGROUP_0.32 0.36.2 - cgroup_strerror@CGROUP_0.32.1 0.36.2 - cgroup_templates_cache_set_source_files@CGROUP_0.40 0.42.2 - cgroup_test_subsys_mounted@CGROUP_2.0 2.0 - cgroup_unload_cgroups@CGROUP_0.34 0.36.2 - cgroup_walk_tree_begin@CGROUP_0.33 0.36.2 - cgroup_walk_tree_end@CGROUP_0.33 0.36.2 - cgroup_walk_tree_next@CGROUP_0.33 0.36.2 - cgroup_walk_tree_set_flags@CGROUP_0.34 0.36.2 - create_cgroup_from_name_value_pairs@CGROUP_0.35 0.36.2 diff -Nru libcgroup-2.0/debian/libcgroup2.install libcgroup-2.0.2/debian/libcgroup2.install --- libcgroup-2.0/debian/libcgroup2.install 1970-01-01 00:00:00.000000000 +0000 +++ libcgroup-2.0.2/debian/libcgroup2.install 2022-05-16 12:08:22.000000000 +0000 @@ -0,0 +1 @@ +lib/*/libcgroup.so.* diff -Nru libcgroup-2.0/debian/libcgroup2.symbols libcgroup-2.0.2/debian/libcgroup2.symbols --- libcgroup-2.0/debian/libcgroup2.symbols 1970-01-01 00:00:00.000000000 +0000 +++ libcgroup-2.0.2/debian/libcgroup2.symbols 2022-05-16 12:08:22.000000000 +0000 @@ -0,0 +1,110 @@ +libcgroup.so.2 libcgroup2 #MINVER# + CGROUP_0.32.1@CGROUP_0.32.1 2.0.1 + CGROUP_0.32@CGROUP_0.32 2.0.1 + CGROUP_0.33@CGROUP_0.33 2.0.1 + CGROUP_0.34@CGROUP_0.34 2.0.1 + CGROUP_0.35@CGROUP_0.35 2.0.1 + CGROUP_0.36@CGROUP_0.36 2.0.1 + CGROUP_0.37@CGROUP_0.37 2.0.1 + CGROUP_0.38@CGROUP_0.38 2.0.1 + CGROUP_0.39@CGROUP_0.39 2.0.1 + CGROUP_0.40@CGROUP_0.40 2.0.1 + CGROUP_0.41@CGROUP_0.41 2.0.1 + CGROUP_0.42@CGROUP_0.42 2.0.1 + CGROUP_2.0@CGROUP_2.0 2.0.1 + cg_build_path_locked@CGROUP_2.0 2.0.1 + cg_chmod_recursive@CGROUP_0.37 2.0.1 + cg_mount_table@CGROUP_2.0 2.0.1 + cg_mount_table_lock@CGROUP_2.0 2.0.1 + cgroup_add_all_controllers@CGROUP_0.42 2.0.1 + cgroup_add_controller@CGROUP_0.32 2.0.1 + cgroup_add_value_bool@CGROUP_0.32 2.0.1 + cgroup_add_value_int64@CGROUP_0.32 2.0.1 + cgroup_add_value_string@CGROUP_0.32 2.0.1 + cgroup_add_value_uint64@CGROUP_0.32 2.0.1 + cgroup_attach_task@CGROUP_0.32 2.0.1 + cgroup_attach_task_pid@CGROUP_0.32 2.0.1 + cgroup_build_tasks_procs_path@CGROUP_2.0 2.0.1 + cgroup_change_all_cgroups@CGROUP_0.39 2.0.1 + cgroup_change_cgroup_flags@CGROUP_0.34 2.0.1 + cgroup_change_cgroup_path@CGROUP_0.32 2.0.1 + cgroup_change_cgroup_uid_gid@CGROUP_0.32 2.0.1 + cgroup_change_cgroup_uid_gid_flags@CGROUP_0.32 2.0.1 + cgroup_compare_cgroup@CGROUP_0.32 2.0.1 + cgroup_compare_controllers@CGROUP_0.32 2.0.1 + cgroup_config_create_template_group@CGROUP_0.39 2.0.1 + cgroup_config_load_config@CGROUP_0.32 2.0.1 + cgroup_config_set_default@CGROUP_0.38 2.0.1 + cgroup_config_unload_config@CGROUP_0.38 2.0.1 + cgroup_copy_cgroup@CGROUP_0.32 2.0.1 + cgroup_create_cgroup@CGROUP_0.32 2.0.1 + cgroup_create_cgroup_from_parent@CGROUP_0.32 2.0.1 + cgroup_delete_cgroup@CGROUP_0.32 2.0.1 + cgroup_delete_cgroup_ext@CGROUP_0.35 2.0.1 + cgroup_fill_cgc@CGROUP_2.0 2.0.1 + cgroup_free@CGROUP_0.32 2.0.1 + cgroup_free_controllers@CGROUP_0.32 2.0.1 + cgroup_get_all_controller_begin@CGROUP_0.35 2.0.1 + cgroup_get_all_controller_end@CGROUP_0.35 2.0.1 + cgroup_get_all_controller_next@CGROUP_0.35 2.0.1 + cgroup_get_cgroup@CGROUP_0.32 2.0.1 + cgroup_get_controller@CGROUP_0.34 2.0.1 + cgroup_get_controller_begin@CGROUP_0.34 2.0.1 + cgroup_get_controller_end@CGROUP_0.34 2.0.1 + cgroup_get_controller_next@CGROUP_0.34 2.0.1 + cgroup_get_controller_version@CGROUP_2.0 2.0.1 + cgroup_get_current_controller_path@CGROUP_0.32 2.0.1 + cgroup_get_last_errno@CGROUP_0.33 2.0.1 + cgroup_get_procname_from_procfs@CGROUP_0.34 2.0.1 + cgroup_get_procs@CGROUP_0.37 2.0.1 + cgroup_get_subsys_mount_point@CGROUP_0.34 2.0.1 + cgroup_get_subsys_mount_point_begin@CGROUP_0.38 2.0.1 + cgroup_get_subsys_mount_point_end@CGROUP_0.38 2.0.1 + cgroup_get_subsys_mount_point_next@CGROUP_0.38 2.0.1 + cgroup_get_task_begin@CGROUP_0.34 2.0.1 + cgroup_get_task_end@CGROUP_0.34 2.0.1 + cgroup_get_task_next@CGROUP_0.34 2.0.1 + cgroup_get_uid_gid@CGROUP_0.32 2.0.1 + cgroup_get_uid_gid_from_procfs@CGROUP_0.34 2.0.1 + cgroup_get_value_bool@CGROUP_0.32 2.0.1 + cgroup_get_value_int64@CGROUP_0.32 2.0.1 + cgroup_get_value_name@CGROUP_0.35 2.0.1 + cgroup_get_value_name_count@CGROUP_0.35 2.0.1 + cgroup_get_value_string@CGROUP_0.32 2.0.1 + cgroup_get_value_uint64@CGROUP_0.32 2.0.1 + cgroup_init@CGROUP_0.32 2.0.1 + cgroup_init_rules_cache@CGROUP_0.32 2.0.1 + cgroup_init_templates_cache@CGROUP_0.39 2.0.1 + cgroup_load_templates_cache_from_files@CGROUP_0.40 2.0.1 + cgroup_log@CGROUP_0.39 2.0.1 + cgroup_modify_cgroup@CGROUP_0.32 2.0.1 + cgroup_new_cgroup@CGROUP_0.32 2.0.1 + cgroup_parse_log_level_str@CGROUP_0.39 2.0.1 + cgroup_print_rules_config@CGROUP_0.32 2.0.1 + cgroup_read_stats_begin@CGROUP_0.34 2.0.1 + cgroup_read_stats_end@CGROUP_0.34 2.0.1 + cgroup_read_stats_next@CGROUP_0.34 2.0.1 + cgroup_read_value_begin@CGROUP_0.37 2.0.1 + cgroup_read_value_end@CGROUP_0.37 2.0.1 + cgroup_read_value_next@CGROUP_0.37 2.0.1 + cgroup_register_unchanged_process@CGROUP_0.34 2.0.1 + cgroup_reload_cached_rules@CGROUP_0.32 2.0.1 + cgroup_reload_cached_templates@CGROUP_0.39 2.0.1 + cgroup_set_default_logger@CGROUP_0.39 2.0.1 + cgroup_set_logger@CGROUP_0.39 2.0.1 + cgroup_set_loglevel@CGROUP_0.39 2.0.1 + cgroup_set_permissions@CGROUP_0.38 2.0.1 + cgroup_set_uid_gid@CGROUP_0.32 2.0.1 + cgroup_set_value_bool@CGROUP_0.32 2.0.1 + cgroup_set_value_int64@CGROUP_0.32 2.0.1 + cgroup_set_value_string@CGROUP_0.32 2.0.1 + cgroup_set_value_uint64@CGROUP_0.32 2.0.1 + cgroup_strerror@CGROUP_0.32.1 2.0.1 + cgroup_templates_cache_set_source_files@CGROUP_0.40 2.0.1 + cgroup_test_subsys_mounted@CGROUP_2.0 2.0.1 + cgroup_unload_cgroups@CGROUP_0.34 2.0.1 + cgroup_walk_tree_begin@CGROUP_0.33 2.0.1 + cgroup_walk_tree_end@CGROUP_0.33 2.0.1 + cgroup_walk_tree_next@CGROUP_0.33 2.0.1 + cgroup_walk_tree_set_flags@CGROUP_0.34 2.0.1 + create_cgroup_from_name_value_pairs@CGROUP_0.35 2.0.1 diff -Nru libcgroup-2.0/debian/patches/cgrulesengd-_GNU_SOURCE.patch libcgroup-2.0.2/debian/patches/cgrulesengd-_GNU_SOURCE.patch --- libcgroup-2.0/debian/patches/cgrulesengd-_GNU_SOURCE.patch 2021-04-13 14:08:22.000000000 +0000 +++ libcgroup-2.0.2/debian/patches/cgrulesengd-_GNU_SOURCE.patch 2022-05-11 09:27:17.000000000 +0000 @@ -12,10 +12,12 @@ is untested elsewhere. Bug-Debian: https://bugs.debian.org/886744 -Last-Update: 2019-02-22 +Last-Update: 2022-05-11 ---- a/src/daemon/cgrulesengd.c -+++ b/src/daemon/cgrulesengd.c +Index: libcgroup/src/daemon/cgrulesengd.c +=================================================================== +--- libcgroup.orig/src/daemon/cgrulesengd.c ++++ libcgroup/src/daemon/cgrulesengd.c @@ -31,6 +31,10 @@ * TODO Stop using netlink for communication (or at least rewrite that part). */ @@ -27,18 +29,20 @@ #include "libcgroup.h" #include "cgrulesengd.h" #include "../libcgroup-internal.h" ---- a/src/daemon/cgrulesengd.h -+++ b/src/daemon/cgrulesengd.h +Index: libcgroup/src/daemon/cgrulesengd.h +=================================================================== +--- libcgroup.orig/src/daemon/cgrulesengd.h ++++ libcgroup/src/daemon/cgrulesengd.h @@ -15,8 +15,6 @@ #ifndef _CGRULESENGD_H #define _CGRULESENGD_H -#include - - __BEGIN_DECLS - - #include "config.h" -@@ -24,14 +22,6 @@ __BEGIN_DECLS + #ifdef __cplusplus + extern "C" { + #endif +@@ -26,14 +24,6 @@ extern "C" { #include #include diff -Nru libcgroup-2.0/debian/rules libcgroup-2.0.2/debian/rules --- libcgroup-2.0/debian/rules 2021-08-26 20:44:07.000000000 +0000 +++ libcgroup-2.0.2/debian/rules 2022-05-11 13:22:01.000000000 +0000 @@ -43,12 +43,6 @@ mv ../../../lib/$(DEB_HOST_MULTIARCH)/pkgconfig . && \ ln -s ../../../lib/$(DEB_HOST_MULTIARCH)/libcgroup.so.*.*.* libcgroup.so - # libpam-cgroup: - # Rename the PAM module to pam_cgroup.so - cd debian/tmp/lib/$(DEB_HOST_MULTIARCH)/security && \ - rm -f pam_cgroup.so && \ - mv pam_cgroup.so.*.*.* pam_cgroup.so - # Remove unwanted/unused files (because of --fail-missing) cd debian/tmp/lib/$(DEB_HOST_MULTIARCH) && \ rm -f *.so security/pam_cgroup.so.* *.la security/*.la security/*.a \ diff -Nru libcgroup-2.0/debian/source/lintian-overrides libcgroup-2.0.2/debian/source/lintian-overrides --- libcgroup-2.0/debian/source/lintian-overrides 2021-08-27 13:25:26.000000000 +0000 +++ libcgroup-2.0.2/debian/source/lintian-overrides 2022-07-25 15:14:04.000000000 +0000 @@ -2,5 +2,5 @@ # and we have included the related full source code in d/missing-sources. # lintian is unable to identify the source code, so we are overriding the # error: -libcgroup: source-is-missing googletest/googletest/libgtest.so -libcgroup: source-is-missing googletest/googletest/libgtest_main.so +libcgroup source: source-is-missing [googletest/googletest/libgtest.so] +libcgroup source: source-is-missing [googletest/googletest/libgtest_main.so] diff -Nru libcgroup-2.0/dist/libcgroup.spec libcgroup-2.0.2/dist/libcgroup.spec --- libcgroup-2.0/dist/libcgroup.spec 2021-05-06 14:16:19.000000000 +0000 +++ libcgroup-2.0.2/dist/libcgroup.spec 2022-05-12 13:53:14.000000000 +0000 @@ -1,10 +1,10 @@ -%define soversion 1.0.42 -%define soversion_major 1 +%define soversion 2.0.2 +%define soversion_major 2 Name: libcgroup Summary: Tools and libraries to control and monitor control groups Group: System Environment/Libraries -Version: 2.0 +Version: 2.0.2 Release: 1%{?dist} License: LGPLv2+ URL: http://libcg.sourceforge.net/ diff -Nru libcgroup-2.0/dist/Makefile.in libcgroup-2.0.2/dist/Makefile.in --- libcgroup-2.0/dist/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/dist/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/doc/Makefile.in libcgroup-2.0.2/doc/Makefile.in --- libcgroup-2.0/doc/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/doc/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/doc/man/Makefile.in libcgroup-2.0.2/doc/man/Makefile.in --- libcgroup-2.0/doc/man/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/doc/man/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, Binary files /tmp/tmpb5s60fgz/45YmmoreV1/libcgroup-2.0/googletest/googletest/libgtest_main.so and /tmp/tmpb5s60fgz/7iteloYfSy/libcgroup-2.0.2/googletest/googletest/libgtest_main.so differ Binary files /tmp/tmpb5s60fgz/45YmmoreV1/libcgroup-2.0/googletest/googletest/libgtest.so and /tmp/tmpb5s60fgz/7iteloYfSy/libcgroup-2.0.2/googletest/googletest/libgtest.so differ diff -Nru libcgroup-2.0/include/libcgroup/config.h libcgroup-2.0.2/include/libcgroup/config.h --- libcgroup-2.0/include/libcgroup/config.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/include/libcgroup/config.h 2022-05-12 13:49:26.000000000 +0000 @@ -9,7 +9,9 @@ #include #endif -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /** * @defgroup group_config 5. Configuration @@ -128,6 +130,8 @@ * @} * @} */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /*_LIBCGROUP_CONFIG_H*/ diff -Nru libcgroup-2.0/include/libcgroup/error.h libcgroup-2.0.2/include/libcgroup/error.h --- libcgroup-2.0/include/libcgroup/error.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/include/libcgroup/error.h 2022-05-12 13:49:26.000000000 +0000 @@ -9,7 +9,9 @@ #include #endif -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /** * @defgroup group_errors 6. Error handling @@ -28,50 +30,50 @@ enum { ECGROUPNOTCOMPILED = 50000, - ECGROUPNOTMOUNTED, - ECGROUPNOTEXIST, - ECGROUPNOTCREATED, - ECGROUPSUBSYSNOTMOUNTED, - ECGROUPNOTOWNER, + ECGROUPNOTMOUNTED, /* 50001 */ + ECGROUPNOTEXIST, /* 50002 */ + ECGROUPNOTCREATED, /* 50003 */ + ECGROUPSUBSYSNOTMOUNTED, /* 50004 */ + ECGROUPNOTOWNER, /* 50005 */ /** Controllers bound to different mount points */ - ECGROUPMULTIMOUNTED, + ECGROUPMULTIMOUNTED, /* 50006 */ /* This is the stock error. Default error. @todo really? */ - ECGROUPNOTALLOWED, - ECGMAXVALUESEXCEEDED, - ECGCONTROLLEREXISTS, - ECGVALUEEXISTS, - ECGINVAL, - ECGCONTROLLERCREATEFAILED, - ECGFAIL, - ECGROUPNOTINITIALIZED, - ECGROUPVALUENOTEXIST, + ECGROUPNOTALLOWED, /* 50007 */ + ECGMAXVALUESEXCEEDED, /* 50008 */ + ECGCONTROLLEREXISTS, /* 50009 */ + ECGVALUEEXISTS, /* 50010 */ + ECGINVAL, /* 50011 */ + ECGCONTROLLERCREATEFAILED, /* 50012 */ + ECGFAIL, /* 50013 */ + ECGROUPNOTINITIALIZED, /* 50014 */ + ECGROUPVALUENOTEXIST, /* 50015 */ /** * Represents error coming from other libraries like glibc. @c libcgroup * users need to check cgroup_get_last_errno() upon encountering this * error. */ - ECGOTHER, - ECGROUPNOTEQUAL, - ECGCONTROLLERNOTEQUAL, + ECGOTHER, /* 50016 */ + ECGROUPNOTEQUAL, /* 50017 */ + ECGCONTROLLERNOTEQUAL, /* 50018 */ /** Failed to parse rules configuration file. */ - ECGROUPPARSEFAIL, + ECGROUPPARSEFAIL, /* 50019 */ /** Rules list does not exist. */ - ECGROUPNORULES, - ECGMOUNTFAIL, + ECGROUPNORULES, /* 50020 */ + ECGMOUNTFAIL, /* 50021 */ /** * Not an real error, it just indicates that iterator has come to end * of sequence and no more items are left. */ ECGEOF = 50023, /** Failed to parse config file (cgconfig.conf). */ - ECGCONFIGPARSEFAIL, - ECGNAMESPACEPATHS, - ECGNAMESPACECONTROLLER, - ECGMOUNTNAMESPACE, - ECGROUPUNSUPP, - ECGCANTSETVALUE, + ECGCONFIGPARSEFAIL, /* 50024 */ + ECGNAMESPACEPATHS, /* 50025 */ + ECGNAMESPACECONTROLLER, /* 50026 */ + ECGMOUNTNAMESPACE, /* 50027 */ + ECGROUPUNSUPP, /* 50028 */ + ECGCANTSETVALUE, /* 50029 */ /** Removing of a group failed because it was not empty. */ - ECGNONEMPTY, + ECGNONEMPTY, /* 50030 */ }; /** @@ -99,6 +101,8 @@ * @} * @} */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* _LIBCGROUP_INIT_H */ diff -Nru libcgroup-2.0/include/libcgroup/groups.h libcgroup-2.0.2/include/libcgroup/groups.h --- libcgroup-2.0/include/libcgroup/groups.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/include/libcgroup/groups.h 2022-05-12 13:49:26.000000000 +0000 @@ -11,7 +11,9 @@ #include #endif -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /** * Flags for cgroup_delete_cgroup_ext(). @@ -587,6 +589,8 @@ */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* _LIBCGROUP_GROUPS_H */ diff -Nru libcgroup-2.0/include/libcgroup/init.h libcgroup-2.0.2/include/libcgroup/init.h --- libcgroup-2.0/include/libcgroup/init.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/include/libcgroup/init.h 2022-05-12 13:49:26.000000000 +0000 @@ -9,7 +9,9 @@ #include #endif -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /** * @defgroup group_init 1. Initialization @@ -58,6 +60,8 @@ * @} * @} */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* _LIBCGROUP_INIT_H */ diff -Nru libcgroup-2.0/include/libcgroup/iterators.h libcgroup-2.0.2/include/libcgroup/iterators.h --- libcgroup-2.0/include/libcgroup/iterators.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/include/libcgroup/iterators.h 2022-05-12 13:49:26.000000000 +0000 @@ -11,7 +11,9 @@ #include #endif -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /** * @defgroup group_iterators 3. Iterators @@ -423,6 +425,8 @@ * @} */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* _LIBCGROUP_ITERATORS_H */ diff -Nru libcgroup-2.0/include/libcgroup/log.h libcgroup-2.0.2/include/libcgroup/log.h --- libcgroup-2.0/include/libcgroup/log.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/include/libcgroup/log.h 2022-05-12 13:49:26.000000000 +0000 @@ -11,7 +11,9 @@ #include -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /** * @defgroup group_log 7. Logging @@ -142,6 +144,8 @@ * @} * @} */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* _LIBCGROUP_LOG_H */ diff -Nru libcgroup-2.0/include/libcgroup/tasks.h libcgroup-2.0.2/include/libcgroup/tasks.h --- libcgroup-2.0/include/libcgroup/tasks.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/include/libcgroup/tasks.h 2022-05-12 13:49:26.000000000 +0000 @@ -12,7 +12,9 @@ #include #endif -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /** Flags for cgroup_change_cgroup_uid_gid(). */ enum cgflags { @@ -204,6 +206,8 @@ * @} * @} */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* _LIBCGROUP_TASKS_H */ diff -Nru libcgroup-2.0/include/Makefile.in libcgroup-2.0.2/include/Makefile.in --- libcgroup-2.0/include/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/include/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/m4/libtool.m4 libcgroup-2.0.2/m4/libtool.m4 --- libcgroup-2.0/m4/libtool.m4 2021-05-06 14:15:57.000000000 +0000 +++ libcgroup-2.0.2/m4/libtool.m4 2022-05-12 13:51:21.000000000 +0000 @@ -728,6 +728,7 @@ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -1041,8 +1042,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1492,7 +1493,7 @@ m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cr} +: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -2866,6 +2867,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -2874,7 +2878,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2886,18 +2890,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -3557,7 +3549,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4063,8 +4055,7 @@ if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4436,7 +4427,7 @@ ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4704,12 +4695,6 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -4954,9 +4939,6 @@ ;; esac ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -5019,9 +5001,6 @@ openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -5276,7 +5255,7 @@ fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5797,7 +5776,6 @@ if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -5819,7 +5797,7 @@ esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -6445,7 +6423,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -6820,7 +6798,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6885,7 +6863,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7224,7 +7202,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -7308,7 +7286,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7319,7 +7297,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff -Nru libcgroup-2.0/Makefile.in libcgroup-2.0.2/Makefile.in --- libcgroup-2.0/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -169,8 +169,8 @@ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -669,6 +669,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -711,6 +715,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -891,18 +897,19 @@ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-pkgconfigDATA + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-pkgconfigDATA .PRECIOUS: Makefile diff -Nru libcgroup-2.0/README libcgroup-2.0.2/README --- libcgroup-2.0/README 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/README 2022-05-11 21:33:42.000000000 +0000 @@ -3,7 +3,7 @@ After cgroup system has taken shape, its time to have some basic tools in user space which can enable a user to use the resource management -functionality effictively. +functionality effectively. One of the needed functionality is rule based placement of a task. In general, there can be either uid or gid or exec based rules. Admin/root will @@ -142,7 +142,7 @@ your rules). - Run cgrulesengd. - ./cgrulesengd -- Launch some task or login as a user to the sytem. Daemon should automatically +- Launch some task or login as a user to the system. Daemon should automatically place the task in right cgroup. FAQ @@ -170,14 +170,14 @@ admin will not be able to control that. [Note: user2 will control what tasks can be added in /container/database/user2 - and will contol what further subdirs can be created under user2 dir. Root + and will control what further subdirs can be created under user2 dir. Root should not restrict the control to root only for practical purposes. Its - something like that till /container/databse, admin controls the resources + something like that till /container/database, admin controls the resources and below that how resources are further subdivided among various projects should be controlled by respective user]. In the light of above, it seems to make more sense that admin should enforce rules only based on uid and gid. Probably later we can have a per user exec -based rules config file (~/.cgrules.conf), which can be parsed by cgrulesd +based rules config file (~/.cgrules.conf), which can be parsed by cgrulesengd and then jobs launched by user will be placed in right cgroup based on combination of rules in /etc/cgrules.conf and ~/cgrules.conf. diff -Nru libcgroup-2.0/samples/Makefile.in libcgroup-2.0.2/samples/Makefile.in --- libcgroup-2.0/samples/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/samples/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/scripts/Makefile.in libcgroup-2.0.2/scripts/Makefile.in --- libcgroup-2.0/scripts/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/scripts/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/src/api.c libcgroup-2.0.2/src/api.c --- libcgroup-2.0/src/api.c 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/api.c 2022-05-12 13:49:26.000000000 +0000 @@ -396,6 +396,17 @@ pthread_rwlock_unlock(&cg_mount_table_lock); return 1; } + + /* The user has likely requested a file like cgroup.type or + * cgroup.procs. Allow this request as long as there's a + * cgroup v2 controller mounted. + */ + if (strncmp(name, CGROUP_FILE_PREFIX, + strlen(CGROUP_FILE_PREFIX)) == 0 && + cg_mount_table[i].version == CGROUP_V2) { + pthread_rwlock_unlock(&cg_mount_table_lock); + return 1; + } } pthread_rwlock_unlock(&cg_mount_table_lock); return 0; @@ -1105,6 +1116,9 @@ cgroup_dbg("Found cgroup option %s, count %d\n", ent->mnt_opts, *mnt_tbl_idx); (*mnt_tbl_idx)++; + + if (*mnt_tbl_idx >= CG_CONTROLLER_MAX) + goto out; } /* @@ -1153,6 +1167,7 @@ ent->mnt_dir, FILENAME_MAX); cg_mount_table[*mnt_tbl_idx].mount.path[FILENAME_MAX-1] = '\0'; + cg_mount_table[*mnt_tbl_idx].version = CGROUP_V1; cg_mount_table[*mnt_tbl_idx].mount.next = NULL; cgroup_dbg("Found cgroup option %s, count %d\n", ent->mnt_opts, *mnt_tbl_idx); @@ -1160,6 +1175,11 @@ } out: + if (*mnt_tbl_idx >= CG_CONTROLLER_MAX) { + cgroup_err("Error: Mount points exceeds CG_CONTROLLER_MAX\n"); + ret = ECGMAXVALUESEXCEEDED; + } + return ret; } @@ -1239,12 +1259,21 @@ cgroup_dbg("Found cgroup option %s, count %d\n", controller, *mnt_tbl_idx); (*mnt_tbl_idx)++; + + if (*mnt_tbl_idx >= CG_CONTROLLER_MAX) + break; + } while ((controller = strtok_r(NULL, " ", &stok_buff))); out: if (fp) fclose(fp); + if (*mnt_tbl_idx >= CG_CONTROLLER_MAX) { + cgroup_err("Error: Mount points exceeds CG_CONTROLLER_MAX\n"); + ret = ECGMAXVALUESEXCEEDED; + } + return ret; } @@ -1469,7 +1498,15 @@ { int i, ret; for (i = 0; cg_mount_table[i].name[0] != '\0'; i++) { - if (strcmp(cg_mount_table[i].name, type) == 0) { + /* Two ways to successfully move forward here: + * 1. The "type" controller matches the name of a mounted + * controller + * 2. The "type" controller requested is "cgroup" and there's + * a "real" controller mounted as cgroup v2 + */ + if ((strcmp(cg_mount_table[i].name, type) == 0) || + (strcmp(type, CGROUP_FILE_PREFIX) == 0 && + cg_mount_table[i].version == CGROUP_V2)) { if (cg_namespace_table[i]) { ret = snprintf(path, FILENAME_MAX, "%s/%s/", cg_mount_table[i].mount.path, @@ -1514,11 +1551,72 @@ return path; } +static int cgroup_get_cg_type(const char * const path, char * const type, + size_t type_sz) +{ + char cg_type_path[FILENAME_MAX]; + char cg_type[LL_MAX]; + int len, err = 0; + FILE *fp = NULL; + struct stat st; + int stat_ret; + + snprintf(cg_type_path, FILENAME_MAX, "%scgroup.type", path); + /* file cgroup.type, doesn't exist for root cgroup. */ + stat_ret = stat(cg_type_path, &st); + if (stat_ret != 0) { + snprintf(type, type_sz, "cgroup.procs"); + goto out; + } + + fp = fopen(cg_type_path, "re"); + if (!fp) { + cgroup_warn("Warning: failed to open file %s: %s\n", + cg_type_path, strerror(errno)); + err = ECGOTHER; + goto out; + } + + if (fgets(cg_type, LL_MAX, fp) == NULL) { + cgroup_warn("Warning: failed to read file %s: %s\n", + cg_type_path, strerror(errno)); + err = ECGOTHER; + goto out; + } + + len = strlen(cg_type) - 1; + /* + * Append cgroup.threads to the path, if the cgroup.type is + * threaded and cgroup.procs for type domain, domain threaded. + * domain type is used for regular cgroup and domain threaded + * for root of threaded cgroup v2 subtree. Another possible + * type is domain invalid, it's an invalid state, under the + * threaded subtree. + */ + if (strncmp(cg_type, "domain", len) == 0 || + strncmp(cg_type, "domain threaded", len) == 0) { + snprintf(type, type_sz, "cgroup.procs"); + } else if (strncmp(cg_type, "threaded", len) == 0) { + snprintf(type, type_sz, "cgroup.threads"); + } else { + cgroup_warn("Warning: invalid %scgroup.type: %s\n", + path, cg_type); + err = ECGOTHER; + } + +out: + if (fp) + fclose(fp); + + return err; +} + int cgroup_build_tasks_procs_path(char * const path, size_t path_sz, const char * const cg_name, const char * const ctrl_name) { enum cg_version_t version; + char cg_type[LL_MAX]; int err = ECGOTHER; if (!cg_build_path(cg_name, path, ctrl_name)) @@ -1534,8 +1632,11 @@ err = 0; break; case CGROUP_V2: - strncat(path, "cgroup.procs", path_sz - strlen(path)); - err = 0; + err = cgroup_get_cg_type(path, cg_type, sizeof(cg_type)); + if (err) + goto error; + + strncat(path, cg_type , path_sz - strlen(path)); break; default: err = ECGOTHER; @@ -1546,6 +1647,8 @@ if (err) path[0] = '\0'; + cgroup_dbg("cgroup build procs path: %s\n", path); + return err; } @@ -3857,6 +3960,20 @@ } /* + * User had asked to find the matching rule (if one exist) in the + * cached rules but the list might be empty due to the inactive + * cgrulesengd. Lets emulate its behaviour of caching the rules + * by reloading the rules from the configuration file. + */ + if ((flags & CGFLAG_USECACHE) && (rl.head == NULL)) { + cgroup_warn("Warning: no cached rules found, trying to reload " + " from %s.\n", CGRULES_CONF_FILE); + ret = cgroup_reload_cached_rules(); + if (ret != 0) + goto finished; + } + + /* * If the user did not ask for cached rules, we must parse the * configuration to find a matching rule (if one exists). Else, we'll * find the first match in the cached list (rl). @@ -5411,11 +5528,16 @@ cg_build_path(name, cgroup_path, controller); strncat(cgroup_path, "/cgroup.procs", FILENAME_MAX-strlen(cgroup_path)); - /* - * This kernel does have support for cgroup.procs - */ - if (access(cgroup_path, F_OK)) - return ECGROUPUNSUPP; + procs = fopen(cgroup_path, "r"); + if (!procs) { + last_errno = errno; + *pids = NULL; + *size = 0; + if (errno == ENOENT) + return ECGROUPUNSUPP; + else + return ECGOTHER; + } /* * Keep doubling the memory allocated if needed @@ -5423,15 +5545,7 @@ tmp_list= malloc(sizeof(pid_t) * tot_procs); if (!tmp_list) { last_errno = errno; - return ECGOTHER; - } - - procs = fopen(cgroup_path, "r"); - if (!procs) { - last_errno = errno; - free(tmp_list); - *pids = NULL; - *size = 0; + fclose(procs); return ECGOTHER; } diff -Nru libcgroup-2.0/src/bindings/libcgroup.c libcgroup-2.0.2/src/bindings/libcgroup.c --- libcgroup-2.0/src/bindings/libcgroup.c 2021-05-06 14:19:57.000000000 +0000 +++ libcgroup-2.0.2/src/bindings/libcgroup.c 2022-05-12 13:53:19.000000000 +0000 @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.1 + * Version 4.0.2 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -784,15 +784,19 @@ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { -#if PY_VERSION_HEX >= 0x03000000 +#if PY_VERSION_HEX >= 0x03030000 + return (char *)PyUnicode_AsUTF8(str); +#elif PY_VERSION_HEX >= 0x03000000 char *newstr = 0; str = PyUnicode_AsUTF8String(str); if (str) { char *cstr; Py_ssize_t len; - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); + if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) { + newstr = (char *) malloc(len+1); + if (newstr) + memcpy(newstr, cstr, len+1); + } Py_XDECREF(str); } return newstr; @@ -801,10 +805,10 @@ #endif } -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000 +# define SWIG_Python_str_DelForPy3(x) #else -# define SWIG_Python_str_DelForPy3(x) +# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #endif @@ -1219,6 +1223,19 @@ } } +SWIGINTERN int +SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { + int no_kwargs = 1; + if (kwargs) { + assert(PyDict_Check(kwargs)); + if (PyDict_Size(kwargs) > 0) { + PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name); + no_kwargs = 0; + } + } + return no_kwargs; +} + /* A functor is a function object with one single object argument */ #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); @@ -1732,6 +1749,12 @@ #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1893,6 +1916,12 @@ #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2219,8 +2248,10 @@ } } #else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } #endif } } else { @@ -2232,8 +2263,12 @@ inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs); Py_DECREF(empty_kwargs); if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + Py_DECREF(inst); + inst = 0; + } else { + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + } } } Py_DECREF(empty_args); @@ -2250,25 +2285,21 @@ return inst; } -SWIGRUNTIME void +SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { - PyObject *dict; #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, "__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + return PyDict_SetItem(dict, SWIG_This(), swig_this); + } +#endif + return PyObject_SetAttr(inst, SWIG_This(), swig_this); } @@ -2282,7 +2313,8 @@ if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); + if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) + return NULL; } return SWIG_Py_Void(); } @@ -2680,7 +2712,7 @@ #endif #define SWIG_name "_libcgroup" -#define SWIGVERSION 0x040001 +#define SWIGVERSION 0x040002 #define SWIG_VERSION SWIGVERSION @@ -2945,9 +2977,11 @@ if (alloc) *alloc = SWIG_NEWOBJ; #endif - PyBytes_AsStringAndSize(obj, &cstr, &len); + if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; #else - PyString_AsStringAndSize(obj, &cstr, &len); + if (PyString_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; #endif if (cptr) { if (alloc) { @@ -7908,6 +7942,12 @@ #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ diff -Nru libcgroup-2.0/src/bindings/Makefile.am libcgroup-2.0.2/src/bindings/Makefile.am --- libcgroup-2.0/src/bindings/Makefile.am 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/bindings/Makefile.am 2022-05-12 13:49:26.000000000 +0000 @@ -1,5 +1,5 @@ SUBDIRS = . -INCLUDES = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include lib_LTLIBRARIES = _libcgroup.la _libcgroup_la_SOURCES = libcgroup.c diff -Nru libcgroup-2.0/src/bindings/Makefile.in libcgroup-2.0.2/src/bindings/Makefile.in --- libcgroup-2.0/src/bindings/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/src/bindings/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -387,7 +387,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = . -INCLUDES = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include lib_LTLIBRARIES = _libcgroup.la _libcgroup_la_SOURCES = libcgroup.c _libcgroup_la_LDFLAGS = $(shell python-config --ldflags) -module -avoid-version diff -Nru libcgroup-2.0/src/daemon/cgrulesengd.h libcgroup-2.0.2/src/daemon/cgrulesengd.h --- libcgroup-2.0/src/daemon/cgrulesengd.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/daemon/cgrulesengd.h 2022-05-12 13:49:26.000000000 +0000 @@ -17,7 +17,9 @@ #include -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif #include "config.h" #include "libcgroup.h" @@ -119,7 +121,9 @@ */ void cgre_catch_term(int signum); -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* _CGRULESENGD_H */ diff -Nru libcgroup-2.0/src/daemon/Makefile.am libcgroup-2.0.2/src/daemon/Makefile.am --- libcgroup-2.0/src/daemon/Makefile.am 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/daemon/Makefile.am 2022-05-12 13:49:26.000000000 +0000 @@ -1,6 +1,6 @@ @CODE_COVERAGE_RULES@ -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include if WITH_DAEMON diff -Nru libcgroup-2.0/src/daemon/Makefile.in libcgroup-2.0.2/src/daemon/Makefile.in --- libcgroup-2.0/src/daemon/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/src/daemon/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -325,7 +325,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include @WITH_DAEMON_TRUE@cgrulesengd_SOURCES = cgrulesengd.c cgrulesengd.h ../tools/tools-common.h ../tools/tools-common.c @WITH_DAEMON_TRUE@cgrulesengd_LIBS = $(CODE_COVERAGE_LIBS) @WITH_DAEMON_TRUE@cgrulesengd_CFLAGS = $(CODE_COVERAGE_CFLAGS) diff -Nru libcgroup-2.0/src/lex.c libcgroup-2.0.2/src/lex.c --- libcgroup-2.0/src/lex.c 2021-05-06 14:16:24.000000000 +0000 +++ libcgroup-2.0.2/src/lex.c 2022-05-12 13:53:19.000000000 +0000 @@ -1,5 +1,5 @@ -#line 3 "lex.c" +#line 2 "lex.c" #define YY_INT_ALIGNED short int @@ -510,9 +510,9 @@ fprintf(stderr, "%s\n", msg); \ longjmp(parser_error_env, 1); \ } while(0); -#line 514 "lex.c" +#line 513 "lex.c" #define YY_NO_INPUT 1 -#line 516 "lex.c" +#line 515 "lex.c" #define INITIAL 0 @@ -732,7 +732,7 @@ { #line 33 "lex.l" -#line 736 "lex.c" +#line 735 "lex.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -872,7 +872,7 @@ #line 49 "lex.l" ECHO; YY_BREAK -#line 876 "lex.c" +#line 875 "lex.c" case YY_STATE_EOF(INITIAL): yyterminate(); diff -Nru libcgroup-2.0/src/libcgroup-internal.h libcgroup-2.0.2/src/libcgroup-internal.h --- libcgroup-2.0/src/libcgroup-internal.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/libcgroup-internal.h 2022-05-12 13:49:26.000000000 +0000 @@ -16,7 +16,9 @@ #define __LIBCG_INTERNAL -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif #include "config.h" #include @@ -73,6 +75,8 @@ #define CGROUP_RULE_MAXLINE (FILENAME_MAX + CGROUP_RULE_MAXKEY + \ CG_CONTROLLER_MAX + 3) +#define CGROUP_FILE_PREFIX "cgroup" + #define cgroup_err(x...) cgroup_log(CGROUP_LOG_ERROR, x) #define cgroup_warn(x...) cgroup_log(CGROUP_LOG_WARNING, x) #define cgroup_info(x...) cgroup_log(CGROUP_LOG_INFO, x) @@ -407,6 +411,8 @@ #endif /* UNIT_TEST */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif diff -Nru libcgroup-2.0/src/Makefile.am libcgroup-2.0.2/src/Makefile.am --- libcgroup-2.0/src/Makefile.am 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/Makefile.am 2022-05-12 13:49:26.000000000 +0000 @@ -13,14 +13,16 @@ CLEANFILES = lex.c parse.c parse.h -INCLUDES = -I$(top_srcdir)/include -lib_LTLIBRARIES = libcgroup.la libcgroupfortesting.la +AM_CPPFLAGS = -I$(top_srcdir)/include + +lib_LTLIBRARIES = libcgroup.la libcgroup_la_SOURCES = parse.h parse.y lex.l api.c config.c libcgroup-internal.h libcgroup.map wrapper.c log.c libcgroup_la_LIBADD = -lpthread $(CODE_COVERAGE_LIBS) libcgroup_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC=static libcgroup_la_LDFLAGS = -Wl,--version-script,$(srcdir)/libcgroup.map \ -version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE) +noinst_LTLIBRARIES = libcgroupfortesting.la libcgroupfortesting_la_SOURCES = $(libcgroup_la_SOURCES) libcgroupfortesting_la_LIBADD = -lpthread $(CODE_COVERAGE_LIBS) libcgroupfortesting_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC= -DUNIT_TEST diff -Nru libcgroup-2.0/src/Makefile.in libcgroup-2.0.2/src/Makefile.in --- libcgroup-2.0/src/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/src/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -129,7 +129,7 @@ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libcgroup_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libcgroup_la_OBJECTS = libcgroup_la-parse.lo libcgroup_la-lex.lo \ @@ -438,14 +438,15 @@ # generate parse.h from parse.y AM_YFLAGS = -d CLEANFILES = lex.c parse.c parse.h -INCLUDES = -I$(top_srcdir)/include -lib_LTLIBRARIES = libcgroup.la libcgroupfortesting.la +AM_CPPFLAGS = -I$(top_srcdir)/include +lib_LTLIBRARIES = libcgroup.la libcgroup_la_SOURCES = parse.h parse.y lex.l api.c config.c libcgroup-internal.h libcgroup.map wrapper.c log.c libcgroup_la_LIBADD = -lpthread $(CODE_COVERAGE_LIBS) libcgroup_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC=static libcgroup_la_LDFLAGS = -Wl,--version-script,$(srcdir)/libcgroup.map \ -version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE) +noinst_LTLIBRARIES = libcgroupfortesting.la libcgroupfortesting_la_SOURCES = $(libcgroup_la_SOURCES) libcgroupfortesting_la_LIBADD = -lpthread $(CODE_COVERAGE_LIBS) libcgroupfortesting_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC= -DUNIT_TEST @@ -521,6 +522,17 @@ echo rm -f $${locs}; \ rm -f $${locs}; \ } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } parse.h: parse.c @if test ! -f $@; then rm -f parse.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parse.c; else :; fi @@ -529,7 +541,7 @@ $(AM_V_CCLD)$(libcgroup_la_LINK) -rpath $(libdir) $(libcgroup_la_OBJECTS) $(libcgroup_la_LIBADD) $(LIBS) libcgroupfortesting.la: $(libcgroupfortesting_la_OBJECTS) $(libcgroupfortesting_la_DEPENDENCIES) $(EXTRA_libcgroupfortesting_la_DEPENDENCIES) - $(AM_V_CCLD)$(libcgroupfortesting_la_LINK) -rpath $(libdir) $(libcgroupfortesting_la_OBJECTS) $(libcgroupfortesting_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libcgroupfortesting_la_LINK) $(libcgroupfortesting_la_OBJECTS) $(libcgroupfortesting_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -881,7 +893,7 @@ clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/libcgroup_la-api.Plo @@ -976,19 +988,19 @@ .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-libLTLIBRARIES + clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile diff -Nru libcgroup-2.0/src/pam/Makefile.am libcgroup-2.0.2/src/pam/Makefile.am --- libcgroup-2.0/src/pam/Makefile.am 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/pam/Makefile.am 2022-05-11 21:33:42.000000000 +0000 @@ -1,10 +1,10 @@ -INCLUDES = -I $(top_srcdir)/include +AM_CPPFLAGS = -I $(top_srcdir)/include if WITH_PAM pamlib_LTLIBRARIES = pam_cgroup.la pam_cgroup_la_SOURCES = pam_cgroup.c -pam_cgroup_la_LDFLAGS = -module +pam_cgroup_la_LDFLAGS = -module -avoid-version pam_cgroup_la_LIBADD = $(top_builddir)/src/libcgroup.la -lpam endif diff -Nru libcgroup-2.0/src/pam/Makefile.in libcgroup-2.0.2/src/pam/Makefile.in --- libcgroup-2.0/src/pam/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/src/pam/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -347,10 +347,10 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -INCLUDES = -I $(top_srcdir)/include +AM_CPPFLAGS = -I $(top_srcdir)/include @WITH_PAM_TRUE@pamlib_LTLIBRARIES = pam_cgroup.la @WITH_PAM_TRUE@pam_cgroup_la_SOURCES = pam_cgroup.c -@WITH_PAM_TRUE@pam_cgroup_la_LDFLAGS = -module +@WITH_PAM_TRUE@pam_cgroup_la_LDFLAGS = -module -avoid-version @WITH_PAM_TRUE@pam_cgroup_la_LIBADD = $(top_builddir)/src/libcgroup.la -lpam all: all-am diff -Nru libcgroup-2.0/src/parse.c libcgroup-2.0.2/src/parse.c --- libcgroup-2.0/src/parse.c 2021-05-06 14:16:24.000000000 +0000 +++ libcgroup-2.0.2/src/parse.c 2022-05-12 13:53:19.000000000 +0000 @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.5.1. */ +/* A Bison parser, made by GNU Bison 3.7.6. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ 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 . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -34,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -41,14 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ - -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30706 -/* Bison version. */ -#define YYBISON_VERSION "3.5.1" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.6" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -90,7 +91,7 @@ } -#line 94 "parse.c" +#line 95 "parse.c" # ifndef YY_CAST # ifdef __cplusplus @@ -113,14 +114,6 @@ # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - /* Use api.header.include to #include this header instead of duplicating it here. */ #ifndef YY_YY_PARSE_H_INCLUDED @@ -133,23 +126,32 @@ extern int yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - ID = 258, - MOUNT = 259, - GROUP = 260, - PERM = 261, - TASK = 262, - ADMIN = 263, - NAMESPACE = 264, - DEFAULT = 265, - TEMPLATE = 266 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + ID = 258, /* ID */ + MOUNT = 259, /* MOUNT */ + GROUP = 260, /* GROUP */ + PERM = 261, /* PERM */ + TASK = 262, /* TASK */ + ADMIN = 263, /* ADMIN */ + NAMESPACE = 264, /* NAMESPACE */ + DEFAULT = 265, /* DEFAULT */ + TEMPLATE = 266 /* TEMPLATE */ }; + typedef enum yytokentype yytoken_kind_t; #endif -/* Tokens. */ +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 #define ID 258 #define MOUNT 259 #define GROUP 260 @@ -171,7 +173,7 @@ int val; struct cgroup_dictionary *values; -#line 175 "parse.c" +#line 177 "parse.c" }; typedef union YYSTYPE YYSTYPE; @@ -185,6 +187,53 @@ int yyparse (void); #endif /* !YY_YY_PARSE_H_INCLUDED */ +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_ID = 3, /* ID */ + YYSYMBOL_MOUNT = 4, /* MOUNT */ + YYSYMBOL_GROUP = 5, /* GROUP */ + YYSYMBOL_PERM = 6, /* PERM */ + YYSYMBOL_TASK = 7, /* TASK */ + YYSYMBOL_ADMIN = 8, /* ADMIN */ + YYSYMBOL_NAMESPACE = 9, /* NAMESPACE */ + YYSYMBOL_DEFAULT = 10, /* DEFAULT */ + YYSYMBOL_TEMPLATE = 11, /* TEMPLATE */ + YYSYMBOL_12_ = 12, /* '{' */ + YYSYMBOL_13_ = 13, /* '}' */ + YYSYMBOL_14_ = 14, /* '=' */ + YYSYMBOL_15_ = 15, /* ';' */ + YYSYMBOL_YYACCEPT = 16, /* $accept */ + YYSYMBOL_start = 17, /* start */ + YYSYMBOL_default = 18, /* default */ + YYSYMBOL_default_conf = 19, /* default_conf */ + YYSYMBOL_group = 20, /* group */ + YYSYMBOL_group_name = 21, /* group_name */ + YYSYMBOL_group_conf = 22, /* group_conf */ + YYSYMBOL_template = 23, /* template */ + YYSYMBOL_template_conf = 24, /* template_conf */ + YYSYMBOL_template_task_or_admin = 25, /* template_task_or_admin */ + YYSYMBOL_namevalue_conf = 26, /* namevalue_conf */ + YYSYMBOL_task_namevalue_conf = 27, /* task_namevalue_conf */ + YYSYMBOL_admin_namevalue_conf = 28, /* admin_namevalue_conf */ + YYSYMBOL_template_task_namevalue_conf = 29, /* template_task_namevalue_conf */ + YYSYMBOL_template_admin_namevalue_conf = 30, /* template_admin_namevalue_conf */ + YYSYMBOL_task_or_admin = 31, /* task_or_admin */ + YYSYMBOL_admin_conf = 32, /* admin_conf */ + YYSYMBOL_task_conf = 33, /* task_conf */ + YYSYMBOL_template_admin_conf = 34, /* template_admin_conf */ + YYSYMBOL_template_task_conf = 35, /* template_task_conf */ + YYSYMBOL_mountvalue_conf = 36, /* mountvalue_conf */ + YYSYMBOL_mount = 37, /* mount */ + YYSYMBOL_namespace_conf = 38, /* namespace_conf */ + YYSYMBOL_namespace = 39 /* namespace */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + @@ -225,6 +274,18 @@ typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -284,6 +345,7 @@ #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + /* Stored state numbers (used for stacks). */ typedef yytype_uint8 yy_state_t; @@ -302,6 +364,7 @@ # endif #endif + #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) @@ -320,9 +383,9 @@ /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -359,7 +422,7 @@ #define YY_ASSERT(E) ((void) (0 && (E))) -#if ! defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -424,8 +487,7 @@ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -501,14 +563,16 @@ /* YYNSTATES -- Number of states. */ #define YYNSTATES 152 -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 266 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ @@ -555,24 +619,37 @@ }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "ID", "MOUNT", "GROUP", "PERM", "TASK", - "ADMIN", "NAMESPACE", "DEFAULT", "TEMPLATE", "'{'", "'}'", "'='", "';'", - "$accept", "start", "default", "default_conf", "group", "group_name", - "group_conf", "template", "template_conf", "template_task_or_admin", - "namevalue_conf", "task_namevalue_conf", "admin_namevalue_conf", - "template_task_namevalue_conf", "template_admin_namevalue_conf", - "task_or_admin", "admin_conf", "task_conf", "template_admin_conf", - "template_task_conf", "mountvalue_conf", "mount", "namespace_conf", - "namespace", YY_NULLPTR + "\"end of file\"", "error", "\"invalid token\"", "ID", "MOUNT", "GROUP", + "PERM", "TASK", "ADMIN", "NAMESPACE", "DEFAULT", "TEMPLATE", "'{'", + "'}'", "'='", "';'", "$accept", "start", "default", "default_conf", + "group", "group_name", "group_conf", "template", "template_conf", + "template_task_or_admin", "namevalue_conf", "task_namevalue_conf", + "admin_namevalue_conf", "template_task_namevalue_conf", + "template_admin_namevalue_conf", "task_or_admin", "admin_conf", + "task_conf", "template_admin_conf", "template_task_conf", + "mountvalue_conf", "mount", "namespace_conf", "namespace", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# ifdef YYPRINT +#ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_int16 yytoknum[] = @@ -580,7 +657,7 @@ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 123, 125, 61, 59 }; -# endif +#endif #define YYPACT_NINF (-67) @@ -646,9 +723,9 @@ }; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = +static const yytype_uint8 yydefgoto[] = { - -1, 1, 8, 26, 9, 16, 33, 10, 41, 71, + 0, 1, 8, 26, 9, 16, 33, 10, 41, 71, 60, 81, 83, 99, 101, 52, 108, 112, 129, 133, 21, 11, 24, 12 }; @@ -743,10 +820,10 @@ }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -772,10 +849,9 @@ } \ while (0) -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* Enable debugging if requested. */ @@ -793,18 +869,18 @@ } while (0) /* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value); \ + Kind, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -815,18 +891,19 @@ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YYUSE (yyoutput); + YY_USE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -836,12 +913,13 @@ `---------------------------*/ static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyo, yytype, yyvaluep); + yy_symbol_value_print (yyo, yykind, yyvaluep); YYFPRINTF (yyo, ")"); } @@ -874,7 +952,8 @@ `------------------------------------------------*/ static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; @@ -886,9 +965,8 @@ { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[+yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] - ); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); YYFPRINTF (stderr, "\n"); } } @@ -903,8 +981,8 @@ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -927,259 +1005,30 @@ #endif -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else -/* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) -{ - YYPTRDIFF_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (yyres) - return yystpcpy (yyres, yystr) - yyres; - else - return yystrlen (yystr); -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - yy_state_t *yyssp, int yytoken) -{ - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat: reported tokens (one for the "unexpected", - one per "expected"). */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Actual size of YYARG. */ - int yycount = 0; - /* Cumulated lengths of YYARG. */ - YYPTRDIFF_T yysize = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[+*yyssp]; - YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - yysize = yysize0; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - { - /* Don't count the "%s"s in the final size, but reserve room for - the terminator. */ - YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YYUSE (yyvaluep); + YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ @@ -1188,6 +1037,8 @@ int yynerrs; + + /*----------. | yyparse. | `----------*/ @@ -1195,43 +1046,36 @@ int yyparse (void) { - yy_state_fast_t yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + int yyerrstatus = 0; - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; + + /* The state stack: array, bottom, top. */ yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss; - yy_state_t *yyssp; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack. */ + /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYPTRDIFF_T yystacksize; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#endif + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1239,15 +1083,8 @@ Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; @@ -1270,6 +1107,7 @@ YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1315,7 +1153,7 @@ goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -1354,18 +1192,29 @@ /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -1434,55 +1283,55 @@ YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: + case 2: /* start: start group */ #line 61 "parse.y" { (yyval.val) = (yyvsp[-1].val); } -#line 1443 "parse.c" +#line 1292 "parse.c" break; - case 3: + case 3: /* start: start mount */ #line 65 "parse.y" { (yyval.val) = (yyvsp[-1].val); } -#line 1451 "parse.c" +#line 1300 "parse.c" break; - case 4: + case 4: /* start: start default */ #line 69 "parse.y" { (yyval.val) = (yyvsp[-1].val); } -#line 1459 "parse.c" +#line 1308 "parse.c" break; - case 5: + case 5: /* start: start namespace */ #line 73 "parse.y" { (yyval.val) = (yyvsp[-1].val); } -#line 1467 "parse.c" +#line 1316 "parse.c" break; - case 6: + case 6: /* start: start template */ #line 77 "parse.y" { (yyval.val) = (yyvsp[-1].val); } -#line 1475 "parse.c" +#line 1324 "parse.c" break; - case 7: + case 7: /* start: %empty */ #line 81 "parse.y" { (yyval.val) = 1; } -#line 1483 "parse.c" +#line 1332 "parse.c" break; - case 8: + case 8: /* default: DEFAULT '{' default_conf '}' */ #line 87 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1490,18 +1339,18 @@ cgroup_config_define_default(); } } -#line 1494 "parse.c" +#line 1343 "parse.c" break; - case 9: + case 9: /* default_conf: PERM '{' task_or_admin '}' */ #line 97 "parse.y" { (yyval.val) = (yyvsp[-1].val); } -#line 1502 "parse.c" +#line 1351 "parse.c" break; - case 10: + case 10: /* group: GROUP group_name '{' group_conf '}' */ #line 103 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1520,26 +1369,26 @@ return (yyval.val); } } -#line 1524 "parse.c" +#line 1373 "parse.c" break; - case 11: + case 11: /* group_name: ID */ #line 124 "parse.y" { (yyval.name) = (yyvsp[0].name); } -#line 1532 "parse.c" +#line 1381 "parse.c" break; - case 12: + case 12: /* group_name: DEFAULT */ #line 128 "parse.y" { (yyval.name) = (yyvsp[0].name); } -#line 1540 "parse.c" +#line 1389 "parse.c" break; - case 13: + case 13: /* group_conf: ID '{' namevalue_conf '}' */ #line 134 "parse.y" { (yyval.val) = cgroup_config_parse_controller_options((yyvsp[-3].name), (yyvsp[-1].values)); @@ -1551,10 +1400,10 @@ return (yyval.val); } } -#line 1555 "parse.c" +#line 1404 "parse.c" break; - case 14: + case 14: /* group_conf: group_conf ID '{' namevalue_conf '}' */ #line 145 "parse.y" { (yyval.val) = cgroup_config_parse_controller_options((yyvsp[-3].name), (yyvsp[-1].values)); @@ -1566,10 +1415,10 @@ return (yyval.val); } } -#line 1570 "parse.c" +#line 1419 "parse.c" break; - case 15: + case 15: /* group_conf: PERM '{' task_or_admin '}' */ #line 156 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1580,10 +1429,10 @@ return (yyval.val); } } -#line 1584 "parse.c" +#line 1433 "parse.c" break; - case 16: + case 16: /* template: TEMPLATE ID '{' template_conf '}' */ #line 168 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1602,10 +1451,10 @@ return (yyval.val); } } -#line 1606 "parse.c" +#line 1455 "parse.c" break; - case 17: + case 17: /* template_conf: ID '{' namevalue_conf '}' */ #line 190 "parse.y" { (yyval.val) = template_config_parse_controller_options((yyvsp[-3].name), (yyvsp[-1].values)); @@ -1617,10 +1466,10 @@ return (yyval.val); } } -#line 1621 "parse.c" +#line 1470 "parse.c" break; - case 18: + case 18: /* template_conf: template_conf ID '{' namevalue_conf '}' */ #line 201 "parse.y" { (yyval.val) = template_config_parse_controller_options((yyvsp[-3].name), (yyvsp[-1].values)); @@ -1632,10 +1481,10 @@ return (yyval.val); } } -#line 1636 "parse.c" +#line 1485 "parse.c" break; - case 19: + case 19: /* template_conf: PERM '{' template_task_or_admin '}' */ #line 212 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1646,10 +1495,10 @@ return (yyval.val); } } -#line 1650 "parse.c" +#line 1499 "parse.c" break; - case 20: + case 20: /* template_task_or_admin: TASK '{' template_task_namevalue_conf '}' template_admin_conf */ #line 225 "parse.y" { (yyval.val) = (yyvsp[-2].val) && (yyvsp[0].val); @@ -1660,10 +1509,10 @@ return (yyval.val); } } -#line 1664 "parse.c" +#line 1513 "parse.c" break; - case 21: + case 21: /* template_task_or_admin: ADMIN '{' template_admin_namevalue_conf '}' template_task_conf */ #line 235 "parse.y" { (yyval.val) = (yyvsp[-2].val) && (yyvsp[0].val); @@ -1674,10 +1523,10 @@ return (yyval.val); } } -#line 1678 "parse.c" +#line 1527 "parse.c" break; - case 22: + case 22: /* namevalue_conf: ID '=' ID ';' */ #line 249 "parse.y" { struct cgroup_dictionary *dict; @@ -1694,10 +1543,10 @@ } (yyval.values) = dict; } -#line 1698 "parse.c" +#line 1547 "parse.c" break; - case 23: + case 23: /* namevalue_conf: namevalue_conf ID '=' ID ';' */ #line 265 "parse.y" { int ret = 0; @@ -1710,18 +1559,18 @@ } (yyval.values) = (yyvsp[-4].values); } -#line 1714 "parse.c" +#line 1563 "parse.c" break; - case 24: + case 24: /* namevalue_conf: %empty */ #line 277 "parse.y" { (yyval.values) = NULL; } -#line 1722 "parse.c" +#line 1571 "parse.c" break; - case 25: + case 25: /* task_namevalue_conf: ID '=' ID ';' */ #line 284 "parse.y" { (yyval.val) = cgroup_config_group_task_perm((yyvsp[-3].name), (yyvsp[-1].name)); @@ -1732,10 +1581,10 @@ return (yyval.val); } } -#line 1736 "parse.c" +#line 1585 "parse.c" break; - case 26: + case 26: /* task_namevalue_conf: task_namevalue_conf ID '=' ID ';' */ #line 294 "parse.y" { (yyval.val) = (yyvsp[-4].val) && cgroup_config_group_task_perm((yyvsp[-3].name), (yyvsp[-1].name)); @@ -1746,10 +1595,10 @@ return (yyval.val); } } -#line 1750 "parse.c" +#line 1599 "parse.c" break; - case 27: + case 27: /* admin_namevalue_conf: ID '=' ID ';' */ #line 307 "parse.y" { (yyval.val) = cgroup_config_group_admin_perm((yyvsp[-3].name), (yyvsp[-1].name)); @@ -1760,10 +1609,10 @@ return (yyval.val); } } -#line 1764 "parse.c" +#line 1613 "parse.c" break; - case 28: + case 28: /* admin_namevalue_conf: admin_namevalue_conf ID '=' ID ';' */ #line 317 "parse.y" { (yyval.val) = (yyvsp[-4].val) && cgroup_config_group_admin_perm((yyvsp[-3].name), (yyvsp[-1].name)); @@ -1774,10 +1623,10 @@ return (yyval.val); } } -#line 1778 "parse.c" +#line 1627 "parse.c" break; - case 29: + case 29: /* template_task_namevalue_conf: ID '=' ID ';' */ #line 330 "parse.y" { (yyval.val) = template_config_group_task_perm((yyvsp[-3].name), (yyvsp[-1].name)); @@ -1788,10 +1637,10 @@ return (yyval.val); } } -#line 1792 "parse.c" +#line 1641 "parse.c" break; - case 30: + case 30: /* template_task_namevalue_conf: template_task_namevalue_conf ID '=' ID ';' */ #line 340 "parse.y" { (yyval.val) = (yyvsp[-4].val) && template_config_group_task_perm((yyvsp[-3].name), (yyvsp[-1].name)); @@ -1802,10 +1651,10 @@ return (yyval.val); } } -#line 1806 "parse.c" +#line 1655 "parse.c" break; - case 31: + case 31: /* template_admin_namevalue_conf: ID '=' ID ';' */ #line 353 "parse.y" { (yyval.val) = template_config_group_admin_perm((yyvsp[-3].name), (yyvsp[-1].name)); @@ -1816,10 +1665,10 @@ return (yyval.val); } } -#line 1820 "parse.c" +#line 1669 "parse.c" break; - case 32: + case 32: /* template_admin_namevalue_conf: template_admin_namevalue_conf ID '=' ID ';' */ #line 363 "parse.y" { (yyval.val) = (yyvsp[-4].val) && template_config_group_admin_perm((yyvsp[-3].name), (yyvsp[-1].name)); @@ -1830,10 +1679,10 @@ return (yyval.val); } } -#line 1834 "parse.c" +#line 1683 "parse.c" break; - case 33: + case 33: /* task_or_admin: TASK '{' task_namevalue_conf '}' admin_conf */ #line 377 "parse.y" { (yyval.val) = (yyvsp[-2].val) && (yyvsp[0].val); @@ -1844,10 +1693,10 @@ return (yyval.val); } } -#line 1848 "parse.c" +#line 1697 "parse.c" break; - case 34: + case 34: /* task_or_admin: ADMIN '{' admin_namevalue_conf '}' task_conf */ #line 387 "parse.y" { (yyval.val) = (yyvsp[-2].val) && (yyvsp[0].val); @@ -1858,10 +1707,10 @@ return (yyval.val); } } -#line 1862 "parse.c" +#line 1711 "parse.c" break; - case 35: + case 35: /* admin_conf: ADMIN '{' admin_namevalue_conf '}' */ #line 399 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1872,10 +1721,10 @@ return (yyval.val); } } -#line 1876 "parse.c" +#line 1725 "parse.c" break; - case 36: + case 36: /* task_conf: TASK '{' task_namevalue_conf '}' */ #line 411 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1886,10 +1735,10 @@ return (yyval.val); } } -#line 1890 "parse.c" +#line 1739 "parse.c" break; - case 37: + case 37: /* template_admin_conf: ADMIN '{' template_admin_namevalue_conf '}' */ #line 423 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1900,10 +1749,10 @@ return (yyval.val); } } -#line 1904 "parse.c" +#line 1753 "parse.c" break; - case 38: + case 38: /* template_task_conf: TASK '{' template_task_namevalue_conf '}' */ #line 435 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1914,10 +1763,10 @@ return (yyval.val); } } -#line 1918 "parse.c" +#line 1767 "parse.c" break; - case 39: + case 39: /* mountvalue_conf: ID '=' ID ';' */ #line 448 "parse.y" { if (!cgroup_config_insert_into_mount_table((yyvsp[-3].name), (yyvsp[-1].name))) { @@ -1927,10 +1776,10 @@ } (yyval.val) = 1; } -#line 1931 "parse.c" +#line 1780 "parse.c" break; - case 40: + case 40: /* mountvalue_conf: mountvalue_conf ID '=' ID ';' */ #line 457 "parse.y" { if (!cgroup_config_insert_into_mount_table((yyvsp[-3].name), (yyvsp[-1].name))) { @@ -1940,10 +1789,10 @@ } (yyval.val) = 1; } -#line 1944 "parse.c" +#line 1793 "parse.c" break; - case 41: + case 41: /* mount: MOUNT '{' mountvalue_conf '}' */ #line 468 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1954,10 +1803,10 @@ return (yyval.val); } } -#line 1958 "parse.c" +#line 1807 "parse.c" break; - case 42: + case 42: /* namespace_conf: ID '=' ID ';' */ #line 481 "parse.y" { if (!cgroup_config_insert_into_namespace_table((yyvsp[-3].name), (yyvsp[-1].name))) { @@ -1967,10 +1816,10 @@ } (yyval.val) = 1; } -#line 1971 "parse.c" +#line 1820 "parse.c" break; - case 43: + case 43: /* namespace_conf: namespace_conf ID '=' ID ';' */ #line 490 "parse.y" { if (!cgroup_config_insert_into_namespace_table((yyvsp[-3].name), (yyvsp[-1].name))) { @@ -1980,10 +1829,10 @@ } (yyval.val) = 1; } -#line 1984 "parse.c" +#line 1833 "parse.c" break; - case 44: + case 44: /* namespace: NAMESPACE '{' namespace_conf '}' */ #line 501 "parse.y" { (yyval.val) = (yyvsp[-1].val); @@ -1994,11 +1843,11 @@ return (yyval.val); } } -#line 1998 "parse.c" +#line 1847 "parse.c" break; -#line 2002 "parse.c" +#line 1851 "parse.c" default: break; } @@ -2013,11 +1862,10 @@ case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -2041,50 +1889,14 @@ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif } - - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -2133,13 +1945,14 @@ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -2153,7 +1966,7 @@ yydestruct ("Error: popping", - yystos[yystate], yyvsp); + YY_ACCESSING_SYMBOL (yystate), yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2165,7 +1978,7 @@ /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -2187,20 +2000,20 @@ goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ + goto yyreturn; #endif -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2217,18 +2030,16 @@ while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[+*yyssp], yyvsp); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif + return yyresult; } + #line 512 "parse.y" diff -Nru libcgroup-2.0/src/parse.h libcgroup-2.0.2/src/parse.h --- libcgroup-2.0/src/parse.h 2021-05-06 14:16:24.000000000 +0000 +++ libcgroup-2.0.2/src/parse.h 2022-05-12 13:53:19.000000000 +0000 @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.5.1. */ +/* A Bison parser, made by GNU Bison 3.7.6. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ 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 . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -31,8 +31,9 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ #ifndef YY_YY_PARSE_H_INCLUDED # define YY_YY_PARSE_H_INCLUDED @@ -44,23 +45,32 @@ extern int yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - ID = 258, - MOUNT = 259, - GROUP = 260, - PERM = 261, - TASK = 262, - ADMIN = 263, - NAMESPACE = 264, - DEFAULT = 265, - TEMPLATE = 266 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + ID = 258, /* ID */ + MOUNT = 259, /* MOUNT */ + GROUP = 260, /* GROUP */ + PERM = 261, /* PERM */ + TASK = 262, /* TASK */ + ADMIN = 263, /* ADMIN */ + NAMESPACE = 264, /* NAMESPACE */ + DEFAULT = 265, /* DEFAULT */ + TEMPLATE = 266 /* TEMPLATE */ }; + typedef enum yytokentype yytoken_kind_t; #endif -/* Tokens. */ +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 #define ID 258 #define MOUNT 259 #define GROUP 260 @@ -82,7 +92,7 @@ int val; struct cgroup_dictionary *values; -#line 86 "parse.h" +#line 96 "parse.h" }; typedef union YYSTYPE YYSTYPE; diff -Nru libcgroup-2.0/src/tools/cgclassify.c libcgroup-2.0.2/src/tools/cgclassify.c --- libcgroup-2.0/src/tools/cgclassify.c 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/tools/cgclassify.c 2022-05-12 13:49:26.000000000 +0000 @@ -146,7 +146,7 @@ ret = parse_cgroup_spec(cgroup_list, optarg, CG_HIER_MAX); if (ret) { - fprintf(stderr, "cgroup controller and path" + fprintf(stderr, "cgroup controller and path " "parsing failed\n"); return -1; } diff -Nru libcgroup-2.0/src/tools/cgset.c libcgroup-2.0.2/src/tools/cgset.c --- libcgroup-2.0/src/tools/cgset.c 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/tools/cgset.c 2022-05-12 13:49:26.000000000 +0000 @@ -16,6 +16,7 @@ COPY_FROM_OPTION = CHAR_MAX + 1 }; +#ifndef UNIT_TEST static struct option const long_options[] = { {"rule", required_argument, NULL, 'r'}, @@ -72,6 +73,7 @@ printf(" --copy-from Control group whose "\ "parameters will be copied\n"); } +#endif /* !UNIT_TEST */ STATIC int parse_r_flag(const char * const program_name, const char * const name_value_str, @@ -124,6 +126,7 @@ return ret; } +#ifndef UNIT_TEST int main(int argc, char *argv[]) { int ret = 0; @@ -278,3 +281,4 @@ free(name_value); return ret; } +#endif /* !UNIT_TEST */ diff -Nru libcgroup-2.0/src/tools/Makefile.am libcgroup-2.0.2/src/tools/Makefile.am --- libcgroup-2.0/src/tools/Makefile.am 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/tools/Makefile.am 2022-05-12 13:49:26.000000000 +0000 @@ -1,6 +1,6 @@ @CODE_COVERAGE_RULES@ -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include LDADD = $(top_builddir)/src/libcgroup.la -lpthread if WITH_TOOLS @@ -10,7 +10,7 @@ sbin_PROGRAMS = cgconfigparser cgclear -lib_LTLIBRARIES = libcgset.la +noinst_LTLIBRARIES = libcgset.la cgexec_SOURCES = cgexec.c tools-common.c tools-common.h cgexec_LIBS = $(CODE_COVERAGE_LIBS) @@ -27,6 +27,7 @@ libcgset_la_SOURCES = cgset.c tools-common.c tools-common.h libcgset_la_LIBADD = $(CODE_COVERAGE_LIBS) libcgset_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC= -DUNIT_TEST +libcgset_la_LDFLAGS = -Wl,--no-undefined $(LDADD) cgset_SOURCES = cgset.c tools-common.c tools-common.h cgset_LIBS = $(CODE_COVERAGE_LIBS) diff -Nru libcgroup-2.0/src/tools/Makefile.in libcgroup-2.0.2/src/tools/Makefile.in --- libcgroup-2.0/src/tools/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/src/tools/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -109,37 +109,9 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \ - "$(DESTDIR)$(libdir)" +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -LTLIBRARIES = $(lib_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = @WITH_TOOLS_TRUE@libcgset_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libcgset_la_SOURCES_DIST = cgset.c tools-common.c tools-common.h @@ -152,8 +124,8 @@ am__v_lt_1 = libcgset_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcgset_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -@WITH_TOOLS_TRUE@am_libcgset_la_rpath = -rpath $(libdir) + $(CFLAGS) $(libcgset_la_LDFLAGS) $(LDFLAGS) -o $@ +@WITH_TOOLS_TRUE@am_libcgset_la_rpath = am__cgclassify_SOURCES_DIST = cgclassify.c tools-common.c \ tools-common.h @WITH_TOOLS_TRUE@am_cgclassify_OBJECTS = \ @@ -491,9 +463,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include LDADD = $(top_builddir)/src/libcgroup.la -lpthread -@WITH_TOOLS_TRUE@lib_LTLIBRARIES = libcgset.la +@WITH_TOOLS_TRUE@noinst_LTLIBRARIES = libcgset.la @WITH_TOOLS_TRUE@cgexec_SOURCES = cgexec.c tools-common.c tools-common.h @WITH_TOOLS_TRUE@cgexec_LIBS = $(CODE_COVERAGE_LIBS) @WITH_TOOLS_TRUE@cgexec_CFLAGS = $(CODE_COVERAGE_CFLAGS) @@ -506,6 +478,7 @@ @WITH_TOOLS_TRUE@libcgset_la_SOURCES = cgset.c tools-common.c tools-common.h @WITH_TOOLS_TRUE@libcgset_la_LIBADD = $(CODE_COVERAGE_LIBS) @WITH_TOOLS_TRUE@libcgset_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC= -DUNIT_TEST +@WITH_TOOLS_TRUE@libcgset_la_LDFLAGS = -Wl,--no-undefined $(LDADD) @WITH_TOOLS_TRUE@cgset_SOURCES = cgset.c tools-common.c tools-common.h @WITH_TOOLS_TRUE@cgset_LIBS = $(CODE_COVERAGE_LIBS) @WITH_TOOLS_TRUE@cgset_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC=static @@ -662,33 +635,9 @@ echo " rm -f" $$list; \ rm -f $$list -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ @@ -1191,10 +1140,8 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) -install-binPROGRAMS: install-libLTLIBRARIES - installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(libdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1230,8 +1177,8 @@ @WITH_TOOLS_FALSE@install-exec-hook: clean: clean-am -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-sbinPROGRAMS mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/cgclassify-cgclassify.Po @@ -1278,8 +1225,7 @@ install-dvi-am: -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ - install-sbinPROGRAMS +install-exec-am: install-binPROGRAMS install-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am @@ -1341,27 +1287,26 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ - uninstall-sbinPROGRAMS +uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS .MAKE: install-am install-exec-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic \ + clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-sbinPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-sbinPROGRAMS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sbinPROGRAMS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-libLTLIBRARIES uninstall-sbinPROGRAMS + uninstall-sbinPROGRAMS .PRECIOUS: Makefile diff -Nru libcgroup-2.0/src/tools/tools-common.h libcgroup-2.0.2/src/tools/tools-common.h --- libcgroup-2.0/src/tools/tools-common.h 2021-05-06 14:13:56.000000000 +0000 +++ libcgroup-2.0.2/src/tools/tools-common.h 2022-05-12 13:49:26.000000000 +0000 @@ -18,7 +18,9 @@ #define __TOOLS_COMMON -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif #include "config.h" #include #include "../libcgroup-internal.h" @@ -136,6 +138,8 @@ #endif /* UNIT_TEST */ -__END_DECLS +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* TOOLS_COMMON */ diff -Nru libcgroup-2.0/tests/ftests/034-cgexec-basic_cgexec.py libcgroup-2.0.2/tests/ftests/034-cgexec-basic_cgexec.py --- libcgroup-2.0/tests/ftests/034-cgexec-basic_cgexec.py 1970-01-01 00:00:00.000000000 +0000 +++ libcgroup-2.0.2/tests/ftests/034-cgexec-basic_cgexec.py 2022-05-12 13:51:15.000000000 +0000 @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +# +# Cgroup cgexec test +# +# Copyright (c) 2021 Oracle and/or its affiliates. +# Author: Tom Hromatka +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +from cgroup import Cgroup, CgroupVersion +import consts +import ftests +import os +from process import Process +from run import Run +import sys + +import time + +CONTROLLER = 'cpuset' +CGNAME = '034cgexec' + +def prereqs(config): + if not config.args.container: + result = consts.TEST_SKIPPED + cause = "This test must be run within a container" + return result, cause + + return consts.TEST_PASSED, None + +def setup(config): + Cgroup.create(config, CONTROLLER, CGNAME) + +def test(config): + config.process.create_process_in_cgroup(config, CONTROLLER, CGNAME, + cgclassify=False) + + pids = Cgroup.get_pids_in_cgroup(config, CGNAME, CONTROLLER) + if pids is None: + result = consts.TEST_FAILED + cause = "No processes were found in cgroup {}".format(CGNAME) + return result, cause + + # run cgexec -h + ret = Cgroup.cgexec(config, controller=CONTROLLER, cgname=CGNAME, + cmdline=None, cghelp=True) + if not "Run the task in given control group(s)" in ret: + result = consts.TEST_FAILED + cause = "Failed to print cgexec help text: {}".format(ret) + return result, cause + + return consts.TEST_PASSED, None + +def teardown(config): + pids = Cgroup.get_pids_in_cgroup(config, CGNAME, CONTROLLER) + if pids: + for p in pids.splitlines(): + if config.args.container: + config.container.run(['kill', '-9', p]) + else: + Run.run(['sudo', 'kill', '-9', p]) + + Cgroup.delete(config, CONTROLLER, CGNAME) + +def main(config): + [result, cause] = prereqs(config) + if result != consts.TEST_PASSED: + return [result, cause] + + setup(config) + [result, cause] = test(config) + teardown(config) + + return [result, cause] + +if __name__ == '__main__': + config = ftests.parse_args() + # this test was invoked directly. run only it + config.args.num = int(os.path.basename(__file__).split('-')[0]) + sys.exit(ftests.main(config)) diff -Nru libcgroup-2.0/tests/ftests/035-cgset-set_cgroup_type.py libcgroup-2.0.2/tests/ftests/035-cgset-set_cgroup_type.py --- libcgroup-2.0/tests/ftests/035-cgset-set_cgroup_type.py 1970-01-01 00:00:00.000000000 +0000 +++ libcgroup-2.0.2/tests/ftests/035-cgset-set_cgroup_type.py 2022-05-12 13:51:15.000000000 +0000 @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +# +# cgget/cgset cgroup.type functionality test +# +# Copyright (c) 2021 Oracle and/or its affiliates. +# Author: Tom Hromatka +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +from cgroup import Cgroup, CgroupVersion +import consts +import ftests +import os +import sys + +# Which controller isn't all that important, but it is important that we +# have a cgroup v2 controller +CONTROLLER = 'cpu' +CGNAME = "035cgset" + +SETTING = 'cgroup.type' +BEFORE = 'domain' +AFTER = 'threaded' + +def prereqs(config): + result = consts.TEST_PASSED + cause = None + + if config.args.container: + result = consts.TEST_SKIPPED + cause = "This test cannot be run within a container" + return result, cause + + if CgroupVersion.get_version(CONTROLLER) != CgroupVersion.CGROUP_V2: + result = consts.TEST_SKIPPED + cause = "This test requires cgroup v2" + + return result, cause + +def setup(config): + result = consts.TEST_PASSED + cause = None + + Cgroup.create(config, CONTROLLER, CGNAME) + + + before = Cgroup.get(config, controller=None, cgname=CGNAME, + setting=SETTING, print_headers=False, + values_only=True) + if before != BEFORE: + result = consts.TEST_SKIPPED + cause = "Skipping test. Unexpected value in {}: {}".format(SETTING, + before) + + return result, cause + +def test(config): + result = consts.TEST_PASSED + cause = None + + Cgroup.set(config, CGNAME, SETTING, AFTER) + + after = Cgroup.get(config, controller=None, cgname=CGNAME, + setting=SETTING, print_headers=False, + values_only=True) + + if after != AFTER: + result = consts.TEST_FAILED + cause = "cgget expected {} but received {}".format(AFTER, after) + + return result, cause + +def teardown(config): + Cgroup.delete(config, CONTROLLER, CGNAME) + +def main(config): + [result, cause] = prereqs(config) + if result != consts.TEST_PASSED: + return [result, cause] + + setup(config) + if result != consts.TEST_PASSED: + return [result, cause] + + [result, cause] = test(config) + teardown(config) + + return [result, cause] + +if __name__ == '__main__': + config = ftests.parse_args() + # this test was invoked directly. run only it + config.args.num = int(os.path.basename(__file__).split('-')[0]) + sys.exit(ftests.main(config)) diff -Nru libcgroup-2.0/tests/ftests/cgroup.py libcgroup-2.0.2/tests/ftests/cgroup.py --- libcgroup-2.0/tests/ftests/cgroup.py 2021-05-06 14:15:46.000000000 +0000 +++ libcgroup-2.0.2/tests/ftests/cgroup.py 2022-05-12 13:51:15.000000000 +0000 @@ -783,3 +783,50 @@ raise re return ret + + # exec is a keyword in python, so let's name this function cgexec + @staticmethod + def cgexec(config, controller, cgname, cmdline, sticky=False, + cghelp=False): + """cgexec equivalent method + """ + cmd = list() + + if not config.args.container: + cmd.append('sudo') + cmd.append(Cgroup.build_cmd_path('cgexec')) + cmd.append('-g') + cmd.append('{}:{}'.format(controller, cgname)) + + if sticky: + cmd.append('--sticky') + + if isinstance(cmdline, str): + cmd.append(cmdline) + elif isinstance(cmdline, list): + for entry in cmdline: + cmd.append(entry) + + if cghelp: + cmd.append('-h') + + if config.args.container: + return config.container.run(cmd, shell_bool=True) + else: + return Run.run(cmd, shell_bool=True) + + @staticmethod + def get_pids_in_cgroup(config, cgroup, controller): + mounts = Cgroup.get_cgroup_mounts(config) + + for mount in mounts: + if mount.controller == controller: + proc_file = os.path.join(mount.mount_point, cgroup, "cgroup.procs") + cmd = ['cat', proc_file] + + if config.args.container: + return config.container.run(cmd, shell_bool=True) + else: + return Run.run(cmd, shell_bool=True) + + return None diff -Nru libcgroup-2.0/tests/ftests/ftests.py libcgroup-2.0.2/tests/ftests/ftests.py --- libcgroup-2.0/tests/ftests/ftests.py 2021-05-06 14:15:46.000000000 +0000 +++ libcgroup-2.0.2/tests/ftests/ftests.py 2022-05-12 13:51:15.000000000 +0000 @@ -191,6 +191,7 @@ passed_tests = [] failed_tests = [] skipped_tests = [] + filename_max = 0 for root, dirs, filenames in os.walk(config.ftest_dir): for filename in filenames: @@ -224,6 +225,9 @@ if filenum_int in config.skip_list: continue + if len(filename) > filename_max: + filename_max = len(filename) + test = __import__(os.path.splitext(filename)[0]) failure_cause = None @@ -279,18 +283,18 @@ global teardown_time if config.args.verbose: print("Timing Results:") - print('\t{}{}'.format('{0: <35}'.format("Test"), '{0: >15}'.format("Time (sec)"))) - print("\t---------------------------------------------------------") + print('\t{}{}'.format('{0: <{1}}'.format("Test", filename_max), '{0: >15}'.format("Time (sec)"))) + print('\t{}'.format('-' * (filename_max + 15))) # 15 is padding space of "Time (sec)" time_str = "{0: 2.2f}".format(setup_time) - print('\t{}{}'.format('{0: <35}'.format('setup'), '{0: >15}'.format(time_str))) + print('\t{}{}'.format('{0: <{1}}'.format('setup', filename_max), '{0: >15}'.format(time_str))) all_tests = passed_tests + skipped_tests + failed_tests all_tests.sort() for test in all_tests: time_str = "{0: 2.2f}".format(test[1]) - print('\t{}{}'.format('{0: <35}'.format(test[0]), '{0: >15}'.format(time_str))) + print('\t{}{}'.format('{0: <{1}}'.format(test[0], filename_max), '{0: >15}'.format(time_str))) time_str = "{0: 2.2f}".format(teardown_time) - print('\t{}{}'.format('{0: <35}'.format('teardown'), '{0: >15}'.format(time_str))) + print('\t{}{}'.format('{0: <{1}}'.format('teardown', filename_max), '{0: >15}'.format(time_str))) total_run_time = setup_time + teardown_time for test in passed_tests: @@ -298,8 +302,8 @@ for test in failed_tests: total_run_time += test[1] total_str = "{0: 5.2f}".format(total_run_time) - print("\t---------------------------------------------------------") - print('\t{}{}'.format('{0: <35}'.format("Total Run Time"), '{0: >15}'.format(total_str))) + print('\t{}'.format('-' * (filename_max + 15))) + print('\t{}{}'.format('{0: <{1}}'.format("Total Run Time", filename_max), '{0: >15}'.format(total_str))) return [passed_cnt, failed_cnt, skipped_cnt] diff -Nru libcgroup-2.0/tests/ftests/Makefile.in libcgroup-2.0.2/tests/ftests/Makefile.in --- libcgroup-2.0/tests/ftests/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/tests/ftests/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/tests/ftests/process.py libcgroup-2.0.2/tests/ftests/process.py --- libcgroup-2.0/tests/ftests/process.py 2021-05-06 14:15:46.000000000 +0000 +++ libcgroup-2.0.2/tests/ftests/process.py 2022-05-12 13:51:15.000000000 +0000 @@ -52,22 +52,21 @@ # catch and suppress it pass - def create_process(self, config): - # To allow for multiple processes to be created, each new process - # sleeps for a different amount of time. This lets us uniquely find - # each process later in this function - sleep_time = len(self.children) + 1 - - p = mp.Process(target=Process.__infinite_loop, - args=(config, sleep_time, )) - p.start() - - # wait for the process to start. If we don't wait, then the getpid - # logic below may not find the process - time.sleep(2) + @staticmethod + def __cgexec_infinite_loop(config, controller, cgname, sleep_time=1): + cmd = ['/usr/bin/perl', '-e', '\'while(1){{sleep({})}};\''.format(sleep_time)] + + try: + Cgroup.cgexec(config, controller, cgname, cmd) + except RunError as re: + # When this process is killed, it will throw a run error. + # Ignore it. + pass + def __save_child_pid(self, config, sleep_time): # get the PID of the newly spawned infinite loop cmd = 'ps x | grep perl | grep "sleep({})" | awk \'{{print $1}}\''.format(sleep_time) + if config.args.container: pid = config.container.run(cmd, shell_bool=True) else: @@ -83,13 +82,46 @@ if pid == "" or int(pid) <= 0: raise ValueError('Failed to get the pid of the child process: {}'.format(pid)) + return pid + + def create_process(self, config): + # To allow for multiple processes to be created, each new process + # sleeps for a different amount of time. This lets us uniquely find + # each process later in this function + sleep_time = len(self.children) + 1 + + p = mp.Process(target=Process.__infinite_loop, + args=(config, sleep_time, )) + p.start() + + # wait for the process to start. If we don't wait, then the getpid + # logic below may not find the process + time.sleep(2) + + pid = self.__save_child_pid(config, sleep_time) self.children.append(p) + return pid # Create a simple process in the requested cgroup - def create_process_in_cgroup(self, config, controller, cgname): - child_pid = self.create_process(config) - Cgroup.classify(config, controller, cgname, child_pid) + def create_process_in_cgroup(self, config, controller, cgname, + cgclassify=True): + if cgclassify: + child_pid = self.create_process(config) + Cgroup.classify(config, controller, cgname, child_pid) + else: + # use cgexec + + # To allow for multiple processes to be created, each new process + # sleeps for a different amount of time. This lets us uniquely find + # each process later in this function + sleep_time = len(self.children) + 1 + + p = mp.Process(target=Process.__cgexec_infinite_loop, + args=(config, controller, cgname, sleep_time, )) + p.start() + + self.children.append(p) # The caller will block until all children are stopped. def join_children(self, config): diff -Nru libcgroup-2.0/tests/gunit/Makefile.in libcgroup-2.0.2/tests/gunit/Makefile.in --- libcgroup-2.0/tests/gunit/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/tests/gunit/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/tests/Makefile.in libcgroup-2.0.2/tests/Makefile.in --- libcgroup-2.0/tests/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/tests/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/tests/runlibcgrouptest.sh libcgroup-2.0.2/tests/runlibcgrouptest.sh --- libcgroup-2.0/tests/runlibcgrouptest.sh 2021-05-06 14:16:19.000000000 +0000 +++ libcgroup-2.0.2/tests/runlibcgrouptest.sh 2022-05-12 13:53:14.000000000 +0000 @@ -16,7 +16,7 @@ # # TODO path to config.h have to be set properly -OPAQUE_HIERARCHY=`grep "OPAQUE_HIERARCHY" /home/elrey/git/20210426-libcg-rel/libcgroup/config.h |\ +OPAQUE_HIERARCHY=`grep "OPAQUE_HIERARCHY" /home/thromatka/git/20220511-libcg-rel/upcg/config.h |\ cut -d" " -f3 | sed 's|\"||g'` DEBUG=false; # for debug messages FS_MOUNTED=0; # 0 for not mounted, 1 for mounted, 2 for multimounted diff -Nru libcgroup-2.0/tests/tools/cgclassify/Makefile.in libcgroup-2.0.2/tests/tools/cgclassify/Makefile.in --- libcgroup-2.0/tests/tools/cgclassify/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/tests/tools/cgclassify/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/tests/tools/cgconfigparser/Makefile.in libcgroup-2.0.2/tests/tools/cgconfigparser/Makefile.in --- libcgroup-2.0/tests/tools/cgconfigparser/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/tests/tools/cgconfigparser/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/tests/tools/Makefile.in libcgroup-2.0.2/tests/tools/Makefile.in --- libcgroup-2.0/tests/tools/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/tests/tools/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru libcgroup-2.0/tests/tools/multimount/Makefile.in libcgroup-2.0.2/tests/tools/multimount/Makefile.in --- libcgroup-2.0/tests/tools/multimount/Makefile.in 2021-05-06 14:15:59.000000000 +0000 +++ libcgroup-2.0.2/tests/tools/multimount/Makefile.in 2022-05-12 13:51:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it,