Skip to content

Commit

Permalink
Merge branch 'master' into mysql_detect_mysqldump
Browse files Browse the repository at this point in the history
  • Loading branch information
RincewindsHat committed Sep 18, 2023
2 parents ce355c8 + 2ddc75e commit 0e70e81
Show file tree
Hide file tree
Showing 567 changed files with 46,595 additions and 25,649 deletions.
5 changes: 3 additions & 2 deletions .github/NPTest.cache
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
'NP_HOST_TCP_POP' => 'pop.web.de',
'NP_HOST_TCP_PROXY' => 'localhost',
'NP_HOST_TCP_SMTP' => 'localhost',
'NP_HOST_TCP_SMTP_NOTLS' => '',
'NP_HOST_TCP_SMTP_TLS' => '',
'NP_HOST_TCP_SMTP_NOSTARTTLS' => '',
'NP_HOST_TCP_SMTP_STARTTLS' => 'localhost',
'NP_HOST_TCP_SMTP_TLS' => 'localhost',
'NP_HOST_TLS_CERT' => 'localhost',
'NP_HOST_TLS_HTTP' => 'localhost',
'NP_HOST_UDP_TIME' => 'none',
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "04:00"
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 10
92 changes: 63 additions & 29 deletions .github/prepare_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,63 @@ set -e

export DEBIAN_FRONTEND=noninteractive

apt-get update
apt-get -y install software-properties-common
if [ $(lsb_release -is) = "Debian" ]; then
apt-add-repository non-free
apt-get update
source /etc/os-release

if [ ${ID} = "debian" ]; then
if [ -f /etc/apt/sources.list.d/debian.sources ]; then
sed "s/main/non-free contrib/g" /etc/apt/sources.list.d/debian.sources > /etc/apt/sources.list.d/debian-nonfree.sources
else
apt-get update
apt-get -y install software-properties-common
apt-add-repository non-free
fi
fi
apt-get -y install perl autotools-dev libdbi-dev libldap2-dev libpq-dev libradcli-dev libnet-snmp-perl procps
apt-get -y install libdbi0-dev libdbd-sqlite3 libssl-dev dnsutils snmp-mibs-downloader libsnmp-perl snmpd
apt-get -y install fping snmp netcat-openbsd smbclient vsftpd apache2 ssl-cert postfix libhttp-daemon-ssl-perl
apt-get -y install libdbd-sybase-perl libnet-dns-perl
apt-get -y install slapd ldap-utils
apt-get -y install gcc make autoconf automake gettext
apt-get -y install faketime
apt-get -y install libmonitoring-plugin-perl
apt-get -y install libcurl4-openssl-dev
apt-get -y install liburiparser-dev
apt-get -y install squid
apt-get -y install openssh-server
apt-get -y install mariadb-server mariadb-client libmariadb-dev
apt-get -y install cron iputils-ping
apt-get -y install iproute2
apt-get update
apt-get -y install perl \
autotools-dev \
libdbi-dev \
libldap2-dev \
libpq-dev \
libradcli-dev \
libnet-snmp-perl \
procps \
libdbi0-dev \
libdbd-sqlite3 \
libssl-dev \
dnsutils \
snmp-mibs-downloader \
libsnmp-perl \
snmpd \
fping \
snmp \
netcat-openbsd \
smbclient \
vsftpd \
apache2 \
ssl-cert \
postfix \
libhttp-daemon-ssl-perl \
libdbd-sybase-perl \
libnet-dns-perl \
slapd \
ldap-utils \
gcc \
make \
autoconf \
automake \
gettext \
faketime \
libmonitoring-plugin-perl \
libcurl4-openssl-dev \
liburiparser-dev \
squid \
openssh-server \
mariadb-server \
mariadb-client \
libmariadb-dev \
cron \
iputils-ping \
iproute2

# remove ipv6 interface from hosts
if [ $(ip addr show | grep "inet6 ::1" | wc -l) -eq "0" ]; then
Expand All @@ -37,7 +73,6 @@ ip addr show

cat /etc/hosts


# apache
a2enmod ssl
a2ensite default-ssl
Expand All @@ -53,7 +88,7 @@ cp tools/squid.conf /etc/squid/squid.conf
service squid start

# mariadb
service mariadb start
service mariadb start || service mysql start
mysql -e "create database IF NOT EXISTS test;" -uroot

# ldap
Expand All @@ -73,20 +108,19 @@ ssh -tt localhost </dev/null >/dev/null 2>/dev/null &
disown %1

# snmpd
for DIR in /usr/share/snmp/mibs /usr/share/mibs; do
rm -f $DIR/ietf/SNMPv2-PDU \
$DIR/ietf/IPSEC-SPD-MIB \
$DIR/ietf/IPATM-IPMC-MIB \
$DIR/iana/IANA-IPPM-METRICS-REGISTRY-MIB
done
service snmpd stop
mkdir -p /var/lib/snmp/mib_indexes
sed -e 's/^agentaddress.*/agentaddress 127.0.0.1/' -i /etc/snmp/snmpd.conf
service snmpd start

# start cron, will be used by check_nagios
cron

# start postfix
# postfix
cat <<EOD >> /etc/postfix/master.cf
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
EOD
service postfix start

# start ftpd
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '15 18 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['cpp']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Install packages
run: |
sudo apt update
sudo apt-get install -y --no-install-recommends m4 gettext automake autoconf make build-essential
sudo apt-get install -y --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev \
libmysqlclient-dev libradcli-dev libkrb5-dev libdbi0-dev \
libdbd-sqlite3 libssl-dev libcurl4-openssl-dev liburiparser-dev
- name: Configure build
run: |
./tools/setup
./configure --enable-libtap
- name: Build
run: |
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
41 changes: 39 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
---
name: Test

on:
push:
branches:
- '*'
# Run test for any PRs
pull_request:

jobs:
codespell:
name: codespell
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
with:
skip: "./.git,./.gitignore,./ABOUT-NLS,*.po,./gl,./po,./tools/squid.conf,./build-aux/ltmain.sh"
ignore_words_list: allright,gord,didi,hda,nd,alis,clen,scrit,ser,fot,te,parm,isnt,consol,oneliners
check_filenames: true
check_hidden: true
# super-linter:
# name: super-linter
# strategy:
# fail-fast: false
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Lint Code Base
# uses: github/[email protected]
# env:
# DEFAULT_BRANCH: master
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# macos:
# ...
linux:
needs:
- codespell
# - super-linter
runs-on: ubuntu-latest
name: Running tests on ${{ matrix.distro }}
strategy:
Expand All @@ -24,7 +57,7 @@ jobs:
#...
steps:
- name: Git clone repository
uses: actions/checkout@v2
uses: actions/checkout@v4
#- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
# uses: mxschmitt/action-tmate@v3
- name: Run the tests on ${{ matrix.distro }}
Expand All @@ -40,7 +73,11 @@ jobs:
${{ matrix.distro }} \
/bin/sh -c '${{ matrix.prepare }} && \
tools/setup && \
./configure --enable-libtap --with-ipv6=no && \
./configure --enable-libtap --with-ipv6=no && \
set -x && \
tmp_dir=$(mktemp -d -t test-XXXX) && cp -a po/ $tmp_dir/ && \
cd po && make update-po && cd .. && \
diff -Nur $tmp_dir/po/*.po po/*.po | tee -a /tmp/po.diff && diff -Nur $tmp_dir/po/*.pot po/*.pot | tee -a /tmp/po.diff && if [ $(wc -l /tmp/po.diff | cut -f 1 -d" ") -gt 0 ]; then echo "Error: Translations needs to be updated with make update-po!" && exit 1; fi && \
make && \
make test'
docker container prune -f
Expand Down
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ NP-VERSION-FILE
# /gl/
/gl/.deps
/gl/alloca.h
/gl/arg-nonnull.h
/gl/arpa
/gl/arpa_inet.h
/gl/c++defs.h
/gl/charset.alias
/gl/configmake.h
/gl/errno.h
Expand All @@ -70,6 +68,8 @@ NP-VERSION-FILE
/gl/locale.h
/gl/Makefile
/gl/Makefile.in
/gl/malloc/.dirstamp
/gl/malloc/.deps
/gl/math.h
/gl/netdb.h
/gl/netinet_in.h
Expand All @@ -88,9 +88,13 @@ NP-VERSION-FILE
/gl/sys
/gl/time.h
/gl/unistd.h
/gl/warn-on-use.h
/gl/wchar.h
/gl/wctype.h
/gl/inttypes.h
/gl/limits.h
/gl/malloc/dynarray-skeleton.gl.h
/gl/malloc/dynarray.gl.h
/gl/stdckdint.

# /lib/
/lib/.deps
Expand Down Expand Up @@ -242,6 +246,7 @@ NP-VERSION-FILE
/plugins-scripts/check_ircd
/plugins-scripts/check_log
/plugins-scripts/check_mailq
/plugins-scripts/check_mssql
/plugins-scripts/check_ntp
/plugins-scripts/check_oracle
/plugins-scripts/check_rpc
Expand Down
2 changes: 1 addition & 1 deletion ACKNOWLEDGEMENTS
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Using the DLPI support on SysV systems to get the host MAC address in check_dhcp
Stenberg, Daniel
Copyright (c) 1996 - 2004, Daniel Stenberg, <[email protected]>
http://curl.haxx.se/
Use of duplication of macros in m4/np_curl.m4 (slighly adapted for m4/uriparser.m4 too)
Use of duplication of macros in m4/np_curl.m4 (slightly adapted for m4/uriparser.m4 too)

Coreutils team
Copyright (C) 91, 1995-2004 Free Software Foundation, Inc.
Expand Down
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Jan Wagner
Holger Weiss
Michael Wirtgen
Oliver Skibbe
Andreas Baumann
Lorenz Kästle
Loading

0 comments on commit 0e70e81

Please sign in to comment.