c-util,nettools: merge branch 'th/gitlab-ci-subtrees'

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1303
This commit is contained in:
Thomas Haller 2022-07-25 10:28:04 +02:00
commit 7450daa609
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
16 changed files with 72 additions and 20 deletions

View file

@ -23,6 +23,9 @@ do_clean() {
# "make -C update-po", run on "make dist" has a silly habit of
# modifying files in-tree. Lets undo that.
git checkout -- po/
git status
git diff
}
uname -a
@ -61,4 +64,37 @@ if [ "$NM_BUILD_TARBALL" = 1 ]; then
mv /tmp/NetworkManager-1*.tar.xz /tmp/NetworkManager-1*.src.rpm ./
fi
###############################################################################
test_subtree() {
local d="$1"
local cc="$2"
if meson --version | grep -q '^0\.[0-5][0-9]\.' ; then
# These subprojects require a newer meson than NetworkManager. Skip the test.
return 0
fi
do_clean
pushd ./src/$d
ARGS=()
if [ "$d" = n-acd ]; then
ARGS+=('-Debpf=false')
fi
CC="$cc" CFLAGS="-Werror -Wall" meson build "${ARGS[@]}"
ninja -v -C build test
popd
}
for d in c-list c-rbtree c-siphash c-stdaux n-acd n-dhcp4 ; do
for cc in gcc clang; do
test_subtree "$d" "$cc"
done
done
###############################################################################
echo "BUILD SUCCESSFUL!!"

View file

@ -1,6 +1,6 @@
#!/bin/bash
set -ex
set -e
cd "$(dirname "$(readlink -f "$0")")/../.."
@ -17,17 +17,38 @@ reimport() {
branch=master
fi
git subtree pull --prefix "src/$d" "git@github.com:$project/$d.git" "$branch" --squash -m \
CMD=( git subtree pull --prefix "src/$d" "git@github.com:$project/$d.git" "$branch" --squash -m \
"$d: re-import git-subtree for 'src/$d'
git subtree pull --prefix src/$d git@github.com:$project/$d.git $branch --squash
"
" )
printf '\n>>>> %s >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n' "$d"
printf '>>>'
for c in "${CMD[@]}"; do
printf ' %q' "$c"
done
printf '\n'
"${CMD[@]}" 2>&1
local REMOTE_COMMIT="$(git rev-parse FETCH_HEAD)"
echo ">>>>> RESULT:"
printf ">>> git diff %s: HEAD:src/%s\n" "$REMOTE_COMMIT" "$d"
GIT_PAGER=cat git diff --color=always "$REMOTE_COMMIT:" "HEAD:src/$d"
}
reimport_all() {
for d in c-list c-rbtree c-siphash c-stdaux n-acd n-dhcp4 ; do
local ARGS
ARGS=( "$@" )
if [ "${#ARGS[@]}" = 0 ]; then
ARGS=( c-list c-rbtree c-siphash c-stdaux n-acd n-dhcp4 )
fi
for d in "${ARGS[@]}" ; do
reimport "$d"
done
}
reimport_all
reimport_all "$@"

View file

@ -0,0 +1 @@
../../c-stdaux

View file

@ -1,3 +0,0 @@
[wrap-git]
url = https://github.com/c-util/c-stdaux.git
revision = v1

View file

@ -0,0 +1 @@
../../c-stdaux

View file

@ -1,3 +0,0 @@
[wrap-git]
url = https://github.com/c-util/c-stdaux.git
revision = v1

View file

@ -15,7 +15,7 @@ mod_pkgconfig = import('pkgconfig')
sub_clist = subproject('c-list')
sub_crbtree = subproject('c-rbtree')
sub_csiphash = subproject('c-siphash')
sub_cstdaux = subproject('c-stdaux')
sub_cstdaux = subproject('libcstdaux-1')
dep_clist = sub_clist.get_variable('libclist_dep')
dep_crbtree = sub_crbtree.get_variable('libcrbtree_dep')

@ -1 +0,0 @@
Subproject commit 6c53ef1c0066a3b0d82e9e181e90114eacb7c4aa

View file

@ -0,0 +1 @@
../../c-list

@ -1 +0,0 @@
Subproject commit c8cf175278452686cc5993e154d472d0a64d7fac

View file

@ -0,0 +1 @@
../../c-rbtree

@ -1 +0,0 @@
Subproject commit 2d159c7da1d542f2b1fcbbefea6931bce242b943

View file

@ -0,0 +1 @@
../../c-siphash

@ -1 +0,0 @@
Subproject commit 8b8f941c57a790c277f49b099e73ed9f8ea141af

View file

@ -0,0 +1 @@
../../c-stdaux

View file

@ -14,7 +14,7 @@ mod_pkgconfig = import('pkgconfig')
sub_clist = subproject('c-list')
sub_csiphash = subproject('c-siphash')
sub_cstdaux = subproject('c-stdaux')
sub_cstdaux = subproject('libcstdaux-1')
dep_clist = sub_clist.get_variable('libclist_dep')
dep_csiphash = sub_csiphash.get_variable('libcsiphash_dep')

@ -1 +0,0 @@
Subproject commit 6c53ef1c0066a3b0d82e9e181e90114eacb7c4aa

View file

@ -0,0 +1 @@
../../c-list

@ -1 +0,0 @@
Subproject commit 2d159c7da1d542f2b1fcbbefea6931bce242b943

View file

@ -0,0 +1 @@
../../c-siphash

@ -1 +0,0 @@
Subproject commit 8b8f941c57a790c277f49b099e73ed9f8ea141af