From e7372d18a1a661d8c3dba9f51e1f17b5f94171a7 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Wed, 10 Jan 2024 11:17:08 +0100 Subject: New upstream version 3.3.0 --- .github/dependabot.yml | 9 +++ .github/workflows/build_release.yml | 2 +- .github/workflows/ci.yml | 100 ++++++++++++++++++++++------------ .github/workflows/codeql-analysis.yml | 49 +++++++++++++++++ .github/workflows/htoprc | 71 ++++++++++++++++++++++++ 5 files changed, 196 insertions(+), 35 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/htoprc (limited to '.github') diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5516fd6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +--- + +version: 2 + +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 8c87915..2bdf443 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -11,7 +11,7 @@ jobs: name: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af8ed88..0582e05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,13 +11,13 @@ jobs: build-ubuntu-latest-minimal-gcc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Dependencies run: sudo apt-get install --no-install-recommends libncursesw5-dev - name: Bootstrap run: ./autogen.sh - name: Configure - run: ./configure --enable-werror --enable-affinity --disable-unicode --disable-sensors + run: ./configure --enable-werror --enable-affinity --disable-unicode --disable-sensors || (cat config.log; exit 1) - name: Enable compatibility modes run: | sed -i 's/#define HAVE_FSTATAT 1/#undef HAVE_FSTATAT/g' config.h @@ -31,20 +31,20 @@ jobs: build-ubuntu-latest-minimal-clang: runs-on: ubuntu-latest env: - CC: clang-12 + CC: clang-16 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: install clang repo run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' -y + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' -y sudo apt-get update -q - name: Install Dependencies - run: sudo apt-get install --no-install-recommends clang-12 libncursesw5-dev + run: sudo apt-get install --no-install-recommends clang-16 libncursesw5-dev - name: Bootstrap run: ./autogen.sh - name: Configure - run: ./configure --enable-werror --enable-affinity --disable-unicode --disable-sensors + run: ./configure --enable-werror --enable-affinity --disable-unicode --disable-sensors || ( cat config.log; exit 1; ) - name: Build run: make -k - name: Distcheck @@ -57,13 +57,13 @@ jobs: CFLAGS: -O3 -g -flto LDFLAGS: -O3 -g -flto -Wl,--as-needed steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Dependencies run: sudo apt-get install --no-install-recommends libncursesw5-dev libhwloc-dev libnl-3-dev libnl-genl-3-dev libsensors4-dev libcap-dev - name: Bootstrap run: ./autogen.sh - name: Configure - run: ./configure --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --enable-hwloc --enable-delayacct --enable-sensors --enable-capabilities + run: ./configure --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --enable-hwloc --enable-delayacct --enable-sensors --enable-capabilities || ( cat config.log; exit 1; ) - name: Build run: make -k - name: Distcheck @@ -72,20 +72,20 @@ jobs: build-ubuntu-latest-full-featured-clang: runs-on: ubuntu-latest env: - CC: clang-12 + CC: clang-16 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: install clang repo run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' -y + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' -y sudo apt-get update -q - name: Install Dependencies - run: sudo apt-get install --no-install-recommends clang-12 libncursesw5-dev libhwloc-dev libnl-3-dev libnl-genl-3-dev libsensors4-dev libcap-dev + run: sudo apt-get install --no-install-recommends clang-16 libncursesw5-dev libhwloc-dev libnl-3-dev libnl-genl-3-dev libsensors4-dev libcap-dev - name: Bootstrap run: ./autogen.sh - name: Configure - run: ./configure --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --enable-hwloc --enable-delayacct --enable-sensors --enable-capabilities + run: ./configure --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --enable-hwloc --enable-delayacct --enable-sensors --enable-capabilities || ( cat config.log; exit 1; ) - name: Build run: make -k - name: Distcheck @@ -98,68 +98,100 @@ jobs: CFLAGS: -O3 -g -flto LDFLAGS: -O3 -g -flto steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Dependencies run: sudo apt-get install --no-install-recommends libncursesw5-dev libtinfo-dev libgpm-dev libsensors4-dev libcap-dev - name: Bootstrap run: ./autogen.sh - name: Configure - run: ./configure --enable-static --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --disable-hwloc --disable-delayacct --enable-sensors --enable-capabilities + run: ./configure --enable-static --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --disable-hwloc --disable-delayacct --enable-sensors --enable-capabilities || ( cat config.log; exit 1; ) - name: Build run: make -k - name: Distcheck run: make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-static --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --disable-hwloc --disable-delayacct --enable-sensors --enable-capabilities' build-ubuntu-latest-pcp: - # Turns out 'ubuntu-latest' can be older than 20.04, we want PCP v5+ - runs-on: ubuntu-20.04 - env: - # Until Ubuntu catches up with pcp-5.2.3+: - # pcp/Platform.c:309:45: warning: passing argument 2 of ‘pmLookupName’ from incompatible pointer type [-Wincompatible-pointer-types] - CFLAGS: -Wno-error=incompatible-pointer-types + # we want PCP v5.2.3+ + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Dependencies run: sudo apt-get install --no-install-recommends libpcp3-dev libncursesw5-dev libtinfo-dev libgpm-dev - name: Bootstrap run: ./autogen.sh - name: Configure - run: ./configure --enable-werror --enable-pcp --enable-unicode + run: ./configure --enable-werror --enable-pcp --enable-unicode || ( cat config.log; exit 1; ) - name: Build run: make -k build-ubuntu-latest-clang-analyzer: runs-on: ubuntu-latest env: - CC: clang-12 + CC: clang-16 + steps: + - uses: actions/checkout@v4 + - name: install clang repo + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' -y + sudo apt-get update -q + - name: Install Dependencies + run: sudo apt-get install --no-install-recommends clang-16 clang-tools-16 libncursesw5-dev libnl-3-dev libnl-genl-3-dev libsensors4-dev libcap-dev + - name: Bootstrap + run: ./autogen.sh + - name: Configure + run: scan-build-16 -analyze-headers --status-bugs ./configure --enable-debug --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --enable-delayacct --enable-sensors --enable-capabilities || ( cat config.log; exit 1; ) + - name: Build + run: scan-build-16 -analyze-headers --status-bugs make -j"$(nproc)" + + build-ubuntu-latest-clang-sanitizer: + runs-on: ubuntu-latest + env: + CC: clang-16 + CFLAGS: '-O1 -g -ftrivial-auto-var-init=pattern -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-address-use-after-return=always -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=nullability -fsanitize=implicit-conversion -fsanitize=integer -fsanitize=float-divide-by-zero -fsanitize=local-bounds' + LDFLAGS: '-ftrivial-auto-var-init=pattern -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-address-use-after-return=always -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=nullability -fsanitize=implicit-conversion -fsanitize=integer -fsanitize=float-divide-by-zero -fsanitize=local-bounds' + ASAN_OPTIONS: strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 + UBSAN_OPTIONS: print_stacktrace=1:print_summary=1:halt_on_error=1 + TERM: xterm-color + HTOPRC: .github/workflows/htoprc steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: install clang repo run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' -y + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' -y sudo apt-get update -q + - name: Install LLVM Toolchain + run: sudo apt-get install --no-install-recommends clang-16 libclang-rt-16-dev llvm-16 - name: Install Dependencies - run: sudo apt-get install --no-install-recommends clang-12 clang-tools-12 libncursesw5-dev libnl-3-dev libnl-genl-3-dev libsensors4-dev libcap-dev + run: sudo apt-get install --no-install-recommends libncursesw5-dev libhwloc-dev libnl-3-dev libnl-genl-3-dev libsensors4-dev libcap-dev - name: Bootstrap run: ./autogen.sh - name: Configure - run: scan-build-12 -analyze-headers --status-bugs ./configure --enable-debug --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --enable-delayacct --enable-sensors --enable-capabilities + run: ./configure --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --enable-hwloc --enable-delayacct --enable-sensors --enable-capabilities || ( cat config.log; exit 1; ) - name: Build - run: scan-build-12 -analyze-headers --status-bugs make -j"$(nproc)" + run: make -k + - name: Run sanitized htop (1) + run: ./htop -h + - name: Run sanitized htop (2) + run: ./htop -n 5 + - name: Run sanitized htop (3) + run: ./htop -n 5 -t + - name: Run sanitized htop (4) + run: ./htop -d 1 -n 50 build-macos-latest-clang: runs-on: macOS-latest env: CC: clang steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Dependencies - run: brew install automake + run: brew install automake pkg-config - name: Bootstrap run: ./autogen.sh - name: Configure - run: ./configure --enable-werror + run: ./configure --enable-werror || ( cat config.log; exit 1; ) - name: Build run: make -k - name: Distcheck @@ -168,6 +200,6 @@ jobs: whitespace_check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: check-whitespaces run: git diff-tree --check $(git hash-object -t tree /dev/null) HEAD diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..47383a7 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,49 @@ +name: "CodeQL" + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '0 1 * * 0' + +permissions: + contents: read + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + security-events: write + + env: + # Enable format attributes in ncurses headers + # Enable fortified memory/string handling + CPPFLAGS: -DGCC_PRINTF -DGCC_SCANF -D_FORTIFY_SOURCE=2 + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: cpp + + - name: Install Dependencies + run: sudo apt-get install --no-install-recommends libncursesw5-dev libhwloc-dev libnl-3-dev libnl-genl-3-dev libsensors4-dev libcap-dev + + - name: Bootstrap + run: ./autogen.sh + + - name: Configure + run: ./configure --enable-werror --enable-openvz --enable-vserver --enable-ancient-vserver --enable-unicode --enable-hwloc --enable-delayacct --enable-sensors --enable-capabilities + + - name: Build + run: make + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/htoprc b/.github/workflows/htoprc new file mode 100644 index 0000000..6c058ec --- /dev/null +++ b/.github/workflows/htoprc @@ -0,0 +1,71 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +htop_version=3.3.0-dev +config_reader_min_version=3 +fields=0 48 17 18 38 39 40 2 46 47 49 1 +hide_kernel_threads=1 +hide_userland_threads=0 +hide_running_in_container=0 +shadow_other_users=1 +show_thread_names=1 +show_program_path=1 +highlight_base_name=1 +highlight_deleted_exe=1 +shadow_distribution_path_prefix=1 +highlight_megabytes=1 +highlight_threads=1 +highlight_changes=1 +highlight_changes_delay_secs=5 +find_comm_in_cmdline=1 +strip_exe_from_cmdline=1 +show_merged_command=1 +header_margin=1 +screen_tabs=1 +detailed_cpu_time=1 +cpu_count_from_one=0 +show_cpu_usage=1 +show_cpu_frequency=1 +show_cpu_temperature=1 +degree_fahrenheit=0 +update_process_names=1 +account_guest_in_cpu_meter=1 +color_scheme=0 +enable_mouse=1 +delay=15 +hide_function_bar=0 +header_layout=two_50_50 +column_meters_0=LeftCPUs4 CPU Memory Swap MemorySwap Zram Clock Date DateTime ZFSARC ZFSCARC SELinux SystemdUser FileDescriptors +column_meter_modes_0=1 1 1 1 1 1 2 2 2 2 2 2 2 2 +column_meters_1=RightCPUs4 Tasks LoadAverage Load Uptime Battery System HugePages Hostname Blank PressureStallCPUSome PressureStallIOSome PressureStallIOFull PressureStallIRQFull PressureStallMemorySome PressureStallMemoryFull DiskIO NetworkIO +column_meter_modes_1=1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 +tree_view=0 +sort_key=46 +tree_sort_key=0 +sort_direction=-1 +tree_sort_direction=1 +tree_view_always_by_pid=0 +all_branches_collapsed=0 +screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command +.sort_key=PERCENT_CPU +.tree_sort_key=PID +.tree_view_always_by_pid=0 +.tree_view=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command +.sort_key=IO_RATE +.tree_sort_key=PID +.tree_view_always_by_pid=0 +.tree_view=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 +screen:Dump=PID SCHEDULERPOLICY SYSCR CGROUP CCGROUP OOM IO_PRIORITY PERCENT_CPU_DELAY CTXT SECATTR CWD AUTOGROUP_ID Command +.sort_key=PID +.tree_sort_key=PID +.tree_view_always_by_pid=0 +.tree_view=0 +.sort_direction=1 +.tree_sort_direction=1 +.all_branches_collapsed=0 -- cgit v1.2.3