Lines Matching +full:write +full:- +full:assist

7 #                     default is openbmc/ubuntu-unit-test
9 # FORCE_DOCKER_BUILD: <optional, a non-zero value with force all Docker
35 # typing.Dict is used for type-hints.
61 def __init_subclass__(cls, **kwargs: Any) -> None:
75 # url [optional]: lambda function to create URL: (package, rev) -> url.
105 lambda pkg, rev: f"https://github.com/boostorg/{pkg}/releases/download/{pkg}-{rev}/{pkg}-{rev}-cmake.tar.gz"
111 f" --prefix={prefix} --with-libraries=atomic,context,coroutine,filesystem,process,url"
114 f"./b2 install --prefix={prefix} valgrind=on",
120 build_steps=[f"cp -a include/cereal/ {prefix}/include/"],
143 f"-DARCH={arch_mapping.get(__import__('platform').machine(), 'x64')}",
144 "-DTOOLCHAIN=GCC",
145 "-DTARGET=Release",
146 "-DCRYPTO=openssl",
147 "-DBUILD_LINUX_SHARED_LIB=ON",
148 "-DENABLE_BINARY_BUILD=1",
149 "-DDISABLE_TESTS=1",
150 f"-DCOMPILED_LIBCRYPTO_PATH={prefix}/lib",
151 f"-DCOMPILED_LIBSSL_PATH={prefix}/lib",
160 "-DBUILD_TESTING=OFF",
161 "-DCLI11_BUILD_DOCS=OFF",
162 "-DCLI11_BUILD_EXAMPLES=OFF",
169 "-DFMT_DOC=OFF",
170 "-DFMT_TEST=OFF",
184 config_env=["CXXFLAGS=-std=c++20"],
185 config_flags=["-DTHREADS_PREFER_PTHREAD_FLAG=ON"],
190 config_env=["CXXFLAGS=-std=c++20"],
192 "-DENABLE_LIB_ONLY=ON",
193 "-DENABLE_STATIC_LIB=ON",
199 config_flags=["-DJSON_BuildTests=OFF"],
202 f"ln -s {prefix}/include/nlohmann/json.hpp"
207 "json-c/json-c": PackageDef(
208 rev="json-c-0.18-20240915",
212 rev="LibVNCServer-0.9.14",
223 "-Dvalijson_BUILD_TESTS=0",
224 "-Dvalijson_INSTALL_HEADERS=1",
230 lambda pkg, rev: f"https://git.kernel.org/pub/scm/libs/{pkg}/{pkg}.git/snapshot/{pkg}-{rev}.tar.gz"
233 config_flags=["--enable-bindings-cxx"],
235 "open-power/pdbg": PackageDef(build_type="autoconf"),
239 "-Dexamples=false",
240 "-Dtests=disabled",
243 "openbmc/phosphor-dbus-interfaces": PackageDef(
246 config_flags=["-Dgenerate_md=false"],
248 "openbmc/phosphor-logging": PackageDef(
251 "openbmc/phosphor-dbus-interfaces",
257 "-Dlibonly=true",
258 "-Dtests=disabled",
261 "openbmc/phosphor-objmgr": PackageDef(
266 "openbmc/phosphor-dbus-interfaces",
267 "openbmc/phosphor-logging",
272 "-Dtests=disabled",
278 "-Draw-peci=disabled",
284 "-Dabi=deprecated,stable",
285 "-Dtests=false",
286 "-Dabi-compliance-check=false",
296 "python3 -m pip install --break-system-packages --root-user-action ignore .",
300 "-Dexamples=disabled",
301 "-Dtests=disabled",
310 "-Dexamples=false",
311 "-Dtests=disabled",
322 "-Dexamples=false",
323 "-Dtests=disabled",
324 "-Dgtest=enabled",
332 f"--prefix={prefix}",
337 "-DBUILD_SHARED_LIBS=ON",
338 "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
339 f"-DCMAKE_INSTALL_PREFIX:PATH={prefix}",
340 "-GNinja",
341 "-DCMAKE_MAKE_PROGRAM=ninja",
346 "--wrap-mode=nodownload",
347 f"-Dprefix={prefix}",
362 # Lock used for thread-safety.
366 """pkg - The name of this package (ex. foo/bar )"""
376 def run(self) -> None:
419 def generate_all(cls) -> None:
448 def df_all_copycmds() -> str:
455 def depcache(cls) -> str:
457 This file is a comma-separated list of "<pkg>:<rev>".
466 def _check_gerrit_topic(self) -> bool:
483 .splitlines()[-1]
502 .splitlines()[-1]
520 def _update_rev(self) -> None:
540 "ls-remote", "--heads", f"https://github.com/{self.package}"
556 def _stagename(self) -> str:
558 return self.package.replace("/", "-").lower()
560 def _url(self) -> str:
571 def _cmd_download(self) -> str:
580 cmd = f"curl -L {url} | tar -x"
593 def _cmd_cd_srcdir(self) -> str:
595 return f"cd {self.package.split('/')[-1]}*"
597 def _df_copycmds(self) -> str:
605 def df_copycmds_set(pkgs: Iterable[str]) -> str:
615 copy_cmds += f"COPY --from={tag} {prefix} {prefix}\n"
622 def _df_build(self) -> str:
661 def _cmd_build_autoconf(self) -> str:
666 result += f"make -j{proc_count} && make install"
669 def _cmd_build_autogen(self) -> str:
676 def _cmd_build_cmake(self) -> str:
681 result += "cmake --build . --target all && "
682 result += "cmake --build . --target install && "
686 def _cmd_build_custom(self) -> str:
689 def _cmd_build_make(self) -> str:
690 return f"make -j{proc_count} && make install"
692 def _cmd_build_meson(self) -> str:
696 result += "ninja -C builddir && ninja -C builddir install"
701 """Class to assist with Docker interactions. All methods are static."""
704 def timestamp() -> str:
707 return f"{today[0]}-W{today[1]:02}"
710 def tagname(pkgname: Optional[str], dockerfile: str) -> str:
714 result += "-" + pkgname
717 result += "-" + sha256(dockerfile.encode()).hexdigest()[0:16]
722 def build(pkg: str, tag: str, dockerfile: str) -> None:
728 tag, "--format", '"{{.Repository}}:{{.Tag}}"'
742 # --no-cache: Bypass the Docker cache if 'force_build'.
743 # --force-rm: Clean up Docker processes if they fail.
746 "--network=host",
747 "--force-rm",
748 "--no-cache=true" if force_build else "--no-cache=false",
749 "-t",
751 "-",
764 "DOCKER_IMAGE_NAME", "openbmc/ubuntu-unit-test"
788 # Use well-known constants if user is root
799 $(. /etc/os-release && echo $VERSION_CODENAME) \
802 $(. /etc/os-release && echo $VERSION_CODENAME)-updates \
805 $(. /etc/os-release && echo $VERSION_CODENAME)-security \
808 $(. /etc/os-release && echo $VERSION_CODENAME)-proposed \
811 $(. /etc/os-release && echo $VERSION_CODENAME)-backports \
829 proxy_keyserver = f"--keyserver-options http-proxy={http_proxy}"
833 "--build-arg",
835 "--build-arg",
848 ENV PYTHONPATH "/usr/local/lib/python3.10/site-packages/"
851 # of the apt-get commands for the dbgsym-keyring. When this happens we see
855 RUN echo "ubuntu keyserver rev as of 2025-06-25"
860 # Known issue with gpg to get keys via proxy -
863 RUN apt-get update && apt-get dist-upgrade -yy && \
864 ( apt-get install -yy gpgv ubuntu-dbgsym-keyring || \
865 ( apt-get install -yy dirmngr curl && \
866 curl -sSL \
868 | apt-key add - ))
871 RUN sed -n '/^deb /s,^deb [^ ]* ,deb http://ddebs.ubuntu.com ,p' \
874 # Remove non-existent debug repos
875 RUN sed -i '/-\\(backports\\|security\\) /d' /etc/apt/sources.list.d/debug.list
879 RUN apt-get update && apt-get dist-upgrade -yy && apt-get install -yy \
880 abi-compliance-checker \
881 abi-dumper \
883 autoconf-archive \
888 device-tree-compiler \
891 g++-15 \
892 gcc-15 \
894 glib-2.0 \
897 iputils-ping \
898 libaudit-dev \
899 libc6-dbg \
900 libc6-dev \
901 libcjson-dev \
902 libconfig++-dev \
903 libcryptsetup-dev \
904 libcurl4-openssl-dev \
905 libdbus-1-dev \
906 libevdev-dev \
907 libi2c-dev \
908 libjpeg-dev \
909 libjson-perl \
910 libldap2-dev \
911 libmimetic-dev \
912 libmpfr-dev \
913 libnl-3-dev \
914 libnl-genl-3-dev \
915 libpam0g-dev \
916 libpciaccess-dev \
917 libperlio-gzip-perl \
918 libpng-dev \
919 libprotobuf-dev \
920 libsnmp-dev \
921 libssl-dev \
922 libsystemd-dev \
924 liburing-dev \
925 libxml2-utils \
926 libxml-simple-perl \
927 lsb-release \
928 ninja-build \
930 pkg-config \
931 protobuf-compiler \
933 python3-dev\
934 python3-git \
935 python3-mako \
936 python3-pip \
937 python3-protobuf \
938 python3-setuptools \
939 python3-socks \
940 python3-yaml \
944 software-properties-common \
947 systemd-dev \
953 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 15 \
954 --slave /usr/bin/g++ g++ /usr/bin/g++-15 \
955 --slave /usr/bin/gcov gcov /usr/bin/gcov-15 \
956 --slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-15 \
957 --slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-15
958 RUN update-alternatives --remove cpp /usr/bin/cpp && \
959 update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-15 15
962 RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" -- 21
965 RUN apt-get install -y \
966 clang-21 \
967 clang-format-21 \
968 clang-tidy-21 \
969 lld-21
971 RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 1000 \
972 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-21 \
973 --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-21 \
974 --slave /usr/bin/clang-apply-replacements clang-apply-replacements \
975 /usr/bin/clang-apply-replacements-21 \
976 --slave /usr/bin/clang-format clang-format /usr/bin/clang-format-21 \
977 --slave /usr/bin/run-clang-tidy run-clang-tidy.py \
978 /usr/bin/run-clang-tidy-21 \
979 --slave /usr/bin/scan-build scan-build /usr/bin/scan-build-21 \
980 --slave /usr/bin/lld lld /usr/bin/lld-21
987 # to re-run `apt-get update` daily.
989 RUN apt-get update && apt-get dist-upgrade -yy
994 RUN pip3 install --break-system-packages \
1009 RUN npm install -g \
1010 eslint@v8.56.0 eslint-plugin-json@v3.1.0 \
1011 markdownlint-cli@latest \
1033 RUN if grep -q ":{gid}:" /etc/group ; then \
1034 groupmod -n {username} $(awk -F : '{{ if ($3 == {gid}) {{ print $1 }} }}' /etc/group) ; \
1036 groupadd -f -g {gid} {username} ; \
1038 RUN mkdir -p "{os.path.dirname(homedir)}"
1039 RUN if grep -q ":{uid}:" /etc/passwd ; then \
1040 usermod -l {username} -d {homedir} -m $(awk -F : '{{ if ($3 == {uid}) {{ print $1 }} }}' /etc/passwd) ; \
1042 useradd -d {homedir} -m -u {uid} -g {gid} {username} ; \
1044 RUN sed -i '1iDefaults umask=000' /etc/sudoers
1047 # Ensure user has ability to write to /usr/local for different tool
1049 RUN chown -R {username}:{username} /usr/local/share