Lines Matching +full:download +full:- +full:git +full:- +full:cache

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.
38 from sh import git, nproc # type: ignore
61 def __init_subclass__(cls, **kwargs: Any) -> None:
75 # url [optional]: lambda function to create URL: (package, rev) -> url.
88 # custom_post_dl [optional]: List of steps to run after download, but
105 …mbda pkg, rev: f"https://github.com/boostorg/{pkg}/releases/download/{pkg}-{rev}/{pkg}-{rev}-cmake…
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/"],
130 "-DBUILD_TESTING=OFF",
131 "-DCLI11_BUILD_DOCS=OFF",
132 "-DCLI11_BUILD_EXAMPLES=OFF",
139 "-DFMT_DOC=OFF",
140 "-DFMT_TEST=OFF",
154 config_env=["CXXFLAGS=-std=c++20"],
155 config_flags=["-DTHREADS_PREFER_PTHREAD_FLAG=ON"],
160 config_env=["CXXFLAGS=-std=c++20"],
162 "-DENABLE_LIB_ONLY=ON",
163 "-DENABLE_STATIC_LIB=ON",
169 config_flags=["-DJSON_BuildTests=OFF"],
172 f"ln -s {prefix}/include/nlohmann/json.hpp"
177 "json-c/json-c": PackageDef(
178 rev="json-c-0.17-20230812",
182 rev="LibVNCServer-0.9.14",
193 "-Dvalijson_BUILD_TESTS=0",
194 "-Dvalijson_INSTALL_HEADERS=1",
197 "open-power/pdbg": PackageDef(build_type="autoconf"),
201 "-Dexamples=false",
202 "-Dtests=disabled",
205 "openbmc/phosphor-dbus-interfaces": PackageDef(
208 config_flags=["-Dgenerate_md=false"],
210 "openbmc/phosphor-logging": PackageDef(
213 "openbmc/phosphor-dbus-interfaces",
219 "-Dlibonly=true",
220 "-Dtests=disabled",
223 "openbmc/phosphor-objmgr": PackageDef(
228 "openbmc/phosphor-dbus-interfaces",
229 "openbmc/phosphor-logging",
234 "-Dtests=disabled",
240 "-Draw-peci=disabled",
246 "-Dabi=deprecated,stable",
247 "-Dtests=false",
248 "-Dabi-compliance-check=false",
258 f"./setup.py install --root=/ --prefix={prefix}",
262 "-Dexamples=disabled",
263 "-Dtests=disabled",
272 "-Dexamples=false",
273 "-Dtests=disabled",
284 "-Dexamples=false",
285 "-Dtests=disabled",
286 "-Dgtest=enabled",
294 f"--prefix={prefix}",
299 "-DBUILD_SHARED_LIBS=ON",
300 "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
301 f"-DCMAKE_INSTALL_PREFIX:PATH={prefix}",
302 "-GNinja",
303 "-DCMAKE_MAKE_PROGRAM=ninja",
308 "--wrap-mode=nodownload",
309 f"-Dprefix={prefix}",
324 # Lock used for thread-safety.
328 """pkg - The name of this package (ex. foo/bar )"""
338 def run(self) -> None:
381 def generate_all(cls) -> None:
410 def df_all_copycmds() -> str:
417 def depcache(cls) -> str:
419 This file is a comma-separated list of "<pkg>:<rev>".
428 def _check_gerrit_topic(self) -> bool:
442 .splitlines()[-1]
461 .splitlines()[-1]
479 def _update_rev(self) -> None:
498 lookup = git(
499 "ls-remote", "--heads", f"https://github.com/{self.package}"
515 def _stagename(self) -> str:
517 return self.package.replace("/", "-").lower()
519 def _url(self) -> str:
530 def _cmd_download(self) -> str:
531 """Formulate the command necessary to download and unpack to source."""
536 f"Unhandled download type for {self.package}: {url}"
539 cmd = f"curl -L {url} | tar -x"
552 def _cmd_cd_srcdir(self) -> str:
554 return f"cd {self.package.split('/')[-1]}*"
556 def _df_copycmds(self) -> str:
564 def df_copycmds_set(pkgs: Iterable[str]) -> str:
574 copy_cmds += f"COPY --from={tag} {prefix} {prefix}\n"
581 def _df_build(self) -> str:
582 """Formulate the Dockerfile snippet necessary to download, build, and
586 # Download and extract source.
618 def _cmd_build_autoconf(self) -> str:
623 result += f"make -j{proc_count} && make install"
626 def _cmd_build_cmake(self) -> str:
631 result += "cmake --build . --target all && "
632 result += "cmake --build . --target install && "
636 def _cmd_build_custom(self) -> str:
639 def _cmd_build_make(self) -> str:
640 return f"make -j{proc_count} && make install"
642 def _cmd_build_meson(self) -> str:
646 result += "ninja -C builddir && ninja -C builddir install"
654 def timestamp() -> str:
657 return f"{today[0]}-W{today[1]:02}"
660 def tagname(pkgname: Optional[str], dockerfile: str) -> str:
664 result += "-" + pkgname
667 result += "-" + sha256(dockerfile.encode()).hexdigest()[0:16]
672 def build(pkg: str, tag: str, dockerfile: str) -> None:
678 tag, "--format", '"{{.Repository}}:{{.Tag}}"'
692 # --no-cache: Bypass the Docker cache if 'force_build'.
693 # --force-rm: Clean up Docker processes if they fail.
696 "--network=host",
697 "--force-rm",
698 "--no-cache=true" if force_build else "--no-cache=false",
699 "-t",
701 "-",
714 "DOCKER_IMAGE_NAME", "openbmc/ubuntu-unit-test"
738 # Use well-known constants if user is root
749 $(. /etc/os-release && echo $VERSION_CODENAME) \
752 $(. /etc/os-release && echo $VERSION_CODENAME)-updates \
755 $(. /etc/os-release && echo $VERSION_CODENAME)-security \
758 $(. /etc/os-release && echo $VERSION_CODENAME)-proposed \
761 $(. /etc/os-release && echo $VERSION_CODENAME)-backports \
779 proxy_keyserver = f"--keyserver-options http-proxy={http_proxy}"
783 "--build-arg",
785 "--build-arg",
798 ENV PYTHONPATH "/usr/local/lib/python3.10/site-packages/"
801 # of the apt-get commands for the dbgsym-keyring. When this happens we see
805 RUN echo "ubuntu keyserver rev as of 2021-04-21"
810 # Known issue with gpg to get keys via proxy -
813 RUN apt-get update && apt-get dist-upgrade -yy && \
814 ( apt-get install -yy gpgv ubuntu-dbgsym-keyring || \
815 ( apt-get install -yy dirmngr curl && \
816 curl -sSL \
818 | apt-key add - ))
821 RUN sed -n '/^deb /s,^deb [^ ]* ,deb http://ddebs.ubuntu.com ,p' \
824 # Remove non-existent debug repos
825 RUN sed -i '/-\\(backports\\|security\\) /d' /etc/apt/sources.list.d/debug.list
829 RUN apt-get update && apt-get dist-upgrade -yy && apt-get install -yy \
830 abi-compliance-checker \
831 abi-dumper \
833 autoconf-archive \
838 device-tree-compiler \
840 g++-14 \
841 gcc-14 \
842 git \
843 glib-2.0 \
846 iputils-ping \
847 libaudit-dev \
848 libc6-dbg \
849 libc6-dev \
850 libcjson-dev \
851 libconfig++-dev \
852 libcryptsetup-dev \
853 libcurl4-openssl-dev \
854 libdbus-1-dev \
855 libevdev-dev \
856 libgpiod-dev \
857 libi2c-dev \
858 libjpeg-dev \
859 libjson-perl \
860 libldap2-dev \
861 libmimetic-dev \
862 libmpfr-dev \
863 libnl-3-dev \
864 libnl-genl-3-dev \
865 libpam0g-dev \
866 libpciaccess-dev \
867 libperlio-gzip-perl \
868 libpng-dev \
869 libprotobuf-dev \
870 libsnmp-dev \
871 libssl-dev \
872 libsystemd-dev \
874 liburing-dev \
875 libxml2-utils \
876 libxml-simple-perl \
877 lsb-release \
878 ninja-build \
880 pkg-config \
881 protobuf-compiler \
883 python3-dev\
884 python3-git \
885 python3-mako \
886 python3-pip \
887 python3-protobuf \
888 python3-setuptools \
889 python3-socks \
890 python3-yaml \
894 software-properties-common \
897 systemd-dev \
903 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14 \
904 --slave /usr/bin/g++ g++ /usr/bin/g++-14 \
905 --slave /usr/bin/gcov gcov /usr/bin/gcov-14 \
906 --slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-14 \
907 --slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-14
908 RUN update-alternatives --remove cpp /usr/bin/cpp && \
909 update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-14 14
912 RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" -- 19
915 RUN apt-get install -y \
916 clang-19 \
917 clang-format-19 \
918 clang-tidy-19
920 RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 1000 \
921 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-19 \
922 --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-19 \
923 --slave /usr/bin/clang-format clang-format /usr/bin/clang-format-19 \
924 --slave /usr/bin/run-clang-tidy run-clang-tidy.py \
925 /usr/bin/run-clang-tidy-19 \
926 --slave /usr/bin/scan-build scan-build /usr/bin/scan-build-19
932 # Run an arbitrary command to pollute the docker cache regularly force us
933 # to re-run `apt-get update` daily.
935 RUN apt-get update && apt-get dist-upgrade -yy
940 RUN pip3 install --break-system-packages \
954 RUN npm install -g \
955 eslint@v8.56.0 eslint-plugin-json@v3.1.0 \
956 markdownlint-cli@latest \
978 RUN if grep -q ":{gid}:" /etc/group ; then \
979 groupmod -n {username} $(awk -F : '{{ if ($3 == {gid}) {{ print $1 }} }}' /etc/group) ; \
981 groupadd -f -g {gid} {username} ; \
983 RUN mkdir -p "{os.path.dirname(homedir)}"
984 RUN if grep -q ":{uid}:" /etc/passwd ; then \
985 …usermod -l {username} -d {homedir} -m $(awk -F : '{{ if ($3 == {uid}) {{ print $1 }} }}' /etc/pass…
987 useradd -d {homedir} -m -u {uid} -g {gid} {username} ; \
989 RUN sed -i '1iDefaults umask=000' /etc/sudoers
994 RUN chown -R {username}:{username} /usr/local/share
996 # Update library cache