diff options
author | Thomas Haller <thaller@redhat.com> | 2018-10-22 13:21:36 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-10-22 13:21:36 +0200 |
commit | 31f13acdc994470cf57ab3fc722ae23539be8c0c (patch) | |
tree | ee8f580825f4baff71b3ad8cc99f3589024a6aca /contrib | |
parent | 1913a4d2590d42413b04c0cf86321286bb2e2dbd (diff) | |
parent | a0a082456496aefc5fee4e24d31c171f0b7645c0 (diff) | |
download | NetworkManager-31f13acdc994470cf57ab3fc722ae23539be8c0c.tar.gz |
gitlab: merge branch 'th/gitlab-ci'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/25
Diffstat (limited to 'contrib')
-rwxr-xr-x[-rw-r--r--] | contrib/fedora/REQUIRED_PACKAGES | 23 | ||||
-rw-r--r-- | contrib/fedora/rpm/README | 2 | ||||
-rwxr-xr-x | contrib/scripts/checkpatch-feature-branch.sh | 31 | ||||
-rwxr-xr-x | contrib/scripts/checkpatch.pl | 8 |
4 files changed, 60 insertions, 4 deletions
diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES index 2efe95ce95..4a0ee4452d 100644..100755 --- a/contrib/fedora/REQUIRED_PACKAGES +++ b/contrib/fedora/REQUIRED_PACKAGES @@ -1,3 +1,5 @@ +#!/bin/bash + # A list of packages useful/needed to build and develop # NetworkManager on Fedora and RHEL. # @@ -8,7 +10,16 @@ # Not all of these packages are strictly speaking necessary. # This is a generous list of related packages. -yum install \ +install() { + if [ "$NM_INSTALL" != "" ]; then + $NM_INSTALL "$@" + else + sudo "$(which dnf &>/dev/null && echo dnf || echo yum)" install -y "$@" + fi +} + +install \ + \ ModemManager-devel \ ModemManager-glib-devel \ audit-libs-devel \ @@ -21,6 +32,7 @@ yum install \ dbus-python \ dbus-x11 \ dhclient \ + gcc-c++ \ gettext-devel \ git \ gnutls-devel \ @@ -35,11 +47,15 @@ yum install \ libselinux-devel \ libtool \ libuuid-devel \ + make \ + meson \ newt-devel \ nss-devel \ polkit-devel \ ppp-devel \ pygobject3-base \ + python3-dbus \ + qt-devel \ readline-devel \ rpm-build \ systemd-devel \ @@ -47,5 +63,6 @@ yum install \ vala-devel \ vala-tools \ valgrind \ - wireless-tools-devel - + wireless-tools-devel \ + \ + #end diff --git a/contrib/fedora/rpm/README b/contrib/fedora/rpm/README index 8cc9c6f0a0..7982a1ef5b 100644 --- a/contrib/fedora/rpm/README +++ b/contrib/fedora/rpm/README @@ -7,7 +7,7 @@ git clone https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git cd NetworkManager git checkout $WHATEVER -sudo sh ./contrib/fedora/REQUIRED_PACKAGES +./contrib/fedora/REQUIRED_PACKAGES # diff --git a/contrib/scripts/checkpatch-feature-branch.sh b/contrib/scripts/checkpatch-feature-branch.sh new file mode 100755 index 0000000000..6741317be2 --- /dev/null +++ b/contrib/scripts/checkpatch-feature-branch.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +die() { + printf "%s\n" "$@" + exit 1 +} + +HEAD="${1:-HEAD}" + +BASE_DIR="$(dirname "$0")" + +BASE_REF="refs/remotes/origin/" + +RANGES=( $(git show-ref | sed 's#^\(.*\) '"$BASE_REF"'\(master\|nm-1-[0-9]\+\)$#\1..'"$HEAD"'#p' -n) ) + +[ "${#RANGES[@]}" != 0 ] || die "cannot detect git-ranges (HEAD is $(git rev-parse HEAD))" + +REFS=( $(git log --reverse --format='%H' "${RANGES[@]}") ) + +[ "${#REFS[@]}" != 0 ] || die "no refs detected (HEAD is $(git rev-parse HEAD))" + +SUCCESS=0 +for H in ${REFS[@]}; do + export NM_CHECKPATCH_HEADER=$'\n'">>> VALIDATE \"$(git log --oneline -n1 "$H")\"" + git format-patch -U65535 --stdout -1 "$H" | "$BASE_DIR/checkpatch.pl" + if [ $? != 0 ]; then + SUCCESS=1 + fi +done + +exit $SUCCESS diff --git a/contrib/scripts/checkpatch.pl b/contrib/scripts/checkpatch.pl index 0769273bcb..67ffbc4256 100755 --- a/contrib/scripts/checkpatch.pl +++ b/contrib/scripts/checkpatch.pl @@ -72,11 +72,19 @@ sub new_file @functions_seen = (); } +my $header = $ENV{'NM_CHECKPATCH_HEADER'}; + sub complain { my $message = shift; return unless $check_line; + + if (defined($header)) { + warn "$header\n"; + undef $header; + } + warn "$filename:$line_no: $message:\n"; warn "> $line\n\n"; $seen_error = 1; |