summaryrefslogtreecommitdiffstats
path: root/bitbake/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/contrib')
-rwxr-xr-xbitbake/contrib/b4-wrapper-bitbake.py40
-rw-r--r--bitbake/contrib/hashserv/Dockerfile2
-rw-r--r--bitbake/contrib/vim/ftdetect/bitbake.vim14
3 files changed, 52 insertions, 4 deletions
diff --git a/bitbake/contrib/b4-wrapper-bitbake.py b/bitbake/contrib/b4-wrapper-bitbake.py
new file mode 100755
index 0000000000..87dff2c3a7
--- /dev/null
+++ b/bitbake/contrib/b4-wrapper-bitbake.py
@@ -0,0 +1,40 @@
1#!/usr/bin/env python3
2#
3# Copyright OpenEmbedded Contributors
4#
5# SPDX-License-Identifier: MIT
6#
7# This script is to be called by b4:
8# - through b4.send-auto-cc-cmd with "send-auto-cc-cmd" as first argument,
9#
10# When send-auto-cc-cmd is passed:
11#
12# This returns the list of Cc recipients for a patch.
13#
14# This script takes as stdin a patch.
15
16import subprocess
17import sys
18
19cmd = sys.argv[1]
20if cmd != "send-auto-cc-cmd":
21 sys.exit(-1)
22
23patch = sys.stdin.read()
24
25if subprocess.call(["which", "lsdiff"], stdout=subprocess.DEVNULL) != 0:
26 print("lsdiff missing from host, please install patchutils")
27 sys.exit(-1)
28
29files = subprocess.check_output(["lsdiff", "--strip-match=1", "--strip=1", "--include=doc/*"],
30 input=patch, text=True)
31if len(files):
32 print("docs@lists.yoctoproject.org")
33else:
34# Handle patches made with --no-prefix
35 files = subprocess.check_output(["lsdiff", "--include=doc/*"],
36 input=patch, text=True)
37 if len(files):
38 print("docs@lists.yoctoproject.org")
39
40sys.exit(0)
diff --git a/bitbake/contrib/hashserv/Dockerfile b/bitbake/contrib/hashserv/Dockerfile
index 74b4a3be1d..aec1f86fc9 100644
--- a/bitbake/contrib/hashserv/Dockerfile
+++ b/bitbake/contrib/hashserv/Dockerfile
@@ -11,7 +11,7 @@
11 11
12FROM alpine:3.13.1 12FROM alpine:3.13.1
13 13
14RUN apk add --no-cache python3 14RUN apk add --no-cache python3 libgcc
15 15
16COPY bin/bitbake-hashserv /opt/bbhashserv/bin/ 16COPY bin/bitbake-hashserv /opt/bbhashserv/bin/
17COPY lib/hashserv /opt/bbhashserv/lib/hashserv/ 17COPY lib/hashserv /opt/bbhashserv/lib/hashserv/
diff --git a/bitbake/contrib/vim/ftdetect/bitbake.vim b/bitbake/contrib/vim/ftdetect/bitbake.vim
index 09fc4dc74c..427ab5b987 100644
--- a/bitbake/contrib/vim/ftdetect/bitbake.vim
+++ b/bitbake/contrib/vim/ftdetect/bitbake.vim
@@ -11,10 +11,18 @@ if &compatible || version < 600 || exists("b:loaded_bitbake_plugin")
11endif 11endif
12 12
13" .bb, .bbappend and .bbclass 13" .bb, .bbappend and .bbclass
14au BufNewFile,BufRead *.{bb,bbappend,bbclass} set filetype=bitbake 14au BufNewFile,BufRead *.{bb,bbappend,bbclass} setfiletype bitbake
15 15
16" .inc 16" .inc -- meanwhile included upstream
17au BufNewFile,BufRead *.inc set filetype=bitbake 17if !has("patch-9.0.0055")
18 au BufNewFile,BufRead *.inc call s:BBIncDetect()
19 def s:BBIncDetect()
20 l:lines = getline(1) .. getline(2) .. getline(3)
21 if l:lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= '
22 set filetype bitbake
23 endif
24 enddef
25endif
18 26
19" .conf 27" .conf
20au BufNewFile,BufRead *.conf 28au BufNewFile,BufRead *.conf