From nobody Sat Dec 21 18:32:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1694439876; cv=none; d=zohomail.com; s=zohoarc; b=emR74DbvnmdJPnuKgunwvRr+guBolihf3VuB8QaAftVhyNivmFOft4g1k589jfONh3TrInzDOyAvMPWuQjI2QlYFYbxQbMpoOluyApMGNXomZPLYqnCVkiJOtz5RNB2OV1YaPWOSHJuN3+OI+uMMPIql7a+uzKz4u3Eu/rLdbOg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694439876; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bTYckOtKdE6Na66xmrIPHmFzskedcFR50+3EnPTTnfM=; b=CrFGkm8Z4GXyg4A+gvxbJHWSxU0+EvjMI1yqFz59bEG5OcCM4csnEqbNzETJTPD6/EKRXaXTVgdA9zitmRhlkhR9uTrqdEi0IxUpJ5rjW7sdOfdItbxi0AwQS5xYNXOBmH9L94hOQ+H3CbjUBuaU40Zta6q7QU6mgU96ESoAdLw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1694439876931945.2027782622018; Mon, 11 Sep 2023 06:44:36 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-552-zfA19mJzN7K0nD6jDINQeA-1; Mon, 11 Sep 2023 09:44:32 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6E1811C11817; Mon, 11 Sep 2023 13:44:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A4FF40C2064; Mon, 11 Sep 2023 13:44:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EC480194E127; Mon, 11 Sep 2023 13:44:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EB372194E125 for ; Mon, 11 Sep 2023 13:44:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DDC052024CD5; Mon, 11 Sep 2023 13:44:07 +0000 (UTC) Received: from orca.home.lan (unknown [10.45.225.151]) by smtp.corp.redhat.com (Postfix) with ESMTP id 454C12027046; Mon, 11 Sep 2023 13:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694439875; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=bTYckOtKdE6Na66xmrIPHmFzskedcFR50+3EnPTTnfM=; b=QFYmS2RJ8Dlh7wC4jL7TKA3p/GBFVVInIHvMMgRcKKlSoltgaiWndu3HkRPS/XFKB40u6i DLSJd1aOeoUUUZD5vAzoDSm3LEn3Yx4FrHDBFZfdooBydOtxuH1rdGpRyfewpIq/rOmdId JfK6rGXGfARuVhAhX+wwLzDCjKmzvYQ= X-MC-Unique: zfA19mJzN7K0nD6jDINQeA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 35/35] ci: Drop the now unused Makefile Date: Mon, 11 Sep 2023 15:43:36 +0200 Message-ID: <81c09e016029f5f2bcfdb76791f8bf788780f5ce.1694439815.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erik Skultety Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1694439877240100017 All the functionality this script provided has been incorporated either in the Python ci/helper tool or lcitool directly. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrang=C3=A9 Erik Skultety : --- ci/Makefile | 245 ---------------------------------------------------- 1 file changed, 245 deletions(-) delete mode 100644 ci/Makefile diff --git a/ci/Makefile b/ci/Makefile deleted file mode 100644 index 8f1be4318d..0000000000 --- a/ci/Makefile +++ /dev/null @@ -1,245 +0,0 @@ -# -*- makefile -*- -# vim: filetype=3Dmake - -# The root directory of the libvirt.git checkout -CI_GIT_ROOT =3D $(shell git rev-parse --show-toplevel) - -# The root directory for all CI-related contents -CI_ROOTDIR =3D $(CI_GIT_ROOT)/ci - -# The directory holding content on the host that we will -# expose to the container. -CI_SCRATCHDIR =3D $(CI_ROOTDIR)/scratch - -# The directory holding the clone of the git repo that -# we will expose to the container -CI_HOST_SRCDIR =3D $(CI_SCRATCHDIR)/src - -# The directory holding the source inside the -# container, i.e. where we want to expose -# the $(CI_HOST_SRCDIR) directory from the host -CI_CONT_SRCDIR =3D $(CI_USER_HOME)/libvirt - -# Script containing build instructions -CI_BUILD_SCRIPT =3D $(CI_ROOTDIR)/build.sh - -# Location of the container images we're going to pull -# Can be useful to override to use a locally built -# image instead -CI_IMAGE_PREFIX =3D registry.gitlab.com/libvirt/libvirt/ci- - -# The default tag is ':latest' but if the container -# repo above uses different conventions this can override it -CI_IMAGE_TAG =3D :latest - -# We delete the virtual root after completion, set -# to 0 if you need to keep it around for debugging -CI_CLEAN =3D 1 - -# We'll always freshly clone the virtual root each -# time in case it was not cleaned up before. Set -# to 1 if you want to try restarting a previously -# preserved env -CI_REUSE =3D 0 - -# We need the user's login and home directory to prepare the -# environment the way some programs expect it -CI_USER_LOGIN =3D $(shell whoami) -CI_USER_HOME =3D $(shell eval echo "~$(CI_USER_LOGIN)") - -# We also need the container process to run with current host IDs -# so that it can access the passed in build directory -CI_UID =3D $(shell id -u "$(CI_USER_LOGIN)") -CI_GID =3D $(shell id -g "$(CI_USER_LOGIN)") - -CI_ENGINE =3D auto -# Container engine we are going to use, can be overridden per make -# invocation, if it is not we try podman and then default to docker. -ifeq ($(CI_ENGINE),auto) - override CI_ENGINE =3D $(shell podman version >/dev/null 2>&1 && echo pod= man || echo docker) -endif - -# IDs you run as do not need to exist in -# the container's /etc/passwd & /etc/group files, but -# if they do not, then libvirt's 'ninja test' will fail -# many tests. - -# We do not directly mount /etc/{passwd,group} as Docker -# is liable to mess with SELinux labelling which will -# then prevent the host accessing them. And podman cannot -# relabel the files due to it running rootless. So -# copying them first is safer and less error-prone. -CI_PWDB_MOUNTS =3D \ - --volume $(CI_SCRATCHDIR)/group:/etc/group:ro,z \ - --volume $(CI_SCRATCHDIR)/passwd:/etc/passwd:ro,z \ - $(NULL) - -CI_HOME_MOUNTS =3D \ - --volume $(CI_SCRATCHDIR)/home:$(CI_USER_HOME):z \ - $(NULL) - -CI_SCRIPT_MOUNTS =3D \ - --volume $(CI_SCRATCHDIR)/build:$(CI_USER_HOME)/build:z \ - $(NULL) - -# Docker containers can have very large ulimits -# for nofiles - as much as 1048576. This makes -# libvirt very slow at exec'ing programs. -CI_ULIMIT_FILES =3D 1024 - -ifeq ($(CI_ENGINE),podman) - # Podman cannot reuse host namespace when running non-root - # containers. Until support for --keep-uid is added we can - # just create another mapping that will do that for us. - # Beware, that in {uid,git}map=3Dcontainer_id:host_id:range, the - # host_id does actually refer to the uid in the first mapping - # where 0 (root) is mapped to the current user and rest is - # offset. - # - # In order to set up this mapping, we need to keep all the - # user IDs to prevent possible errors as some images might - # expect UIDs up to 90000 (looking at you fedora), so we don't - # want the overflowuid to be used for them. For mapping all - # the other users properly, some math needs to be done. - # Don't worry, it's just addition and subtraction. - # - # 65536 ought to be enough (tm), but for really rare cases the - # maximums might need to be higher, but that only happens when - # your /etc/sub{u,g}id allow users to have more IDs. Unless - # --keep-uid is supported, let's do this in a way that should - # work for everyone. - CI_MAX_UID =3D $(shell sed -n "s/^$(CI_USER_LOGIN):[^:]\+://p" /etc/subui= d) - CI_MAX_GID =3D $(shell sed -n "s/^$(CI_USER_LOGIN):[^:]\+://p" /etc/subgi= d) - ifeq ($(CI_MAX_UID),) - CI_MAX_UID =3D 65536 - endif - ifeq ($(CI_MAX_GID),) - CI_MAX_GID =3D 65536 - endif - CI_UID_OTHER =3D $(shell echo $$(($(CI_UID)+1))) - CI_GID_OTHER =3D $(shell echo $$(($(CI_GID)+1))) - CI_UID_OTHER_RANGE =3D $(shell echo $$(($(CI_MAX_UID)-$(CI_UID)))) - CI_GID_OTHER_RANGE =3D $(shell echo $$(($(CI_MAX_GID)-$(CI_GID)))) - - ifneq ($(CI_UID), 0) - CI_PODMAN_ARGS =3D \ - --uidmap 0:1:$(CI_UID) \ - --uidmap $(CI_UID):0:1 \ - --uidmap $(CI_UID_OTHER):$(CI_UID_OTHER):$(CI_UID_OTHER_RANGE) \ - --gidmap 0:1:$(CI_GID) \ - --gidmap $(CI_GID):0:1 \ - --gidmap $(CI_GID_OTHER):$(CI_GID_OTHER):$(CI_GID_OTHER_RANGE) \ - $(NULL) - endif -endif - -# Args to use when cloning a git repo. -# -c stop it complaining about checking out a random hash -# -q stop it displaying progress info for local clone -# --local ensure we don't actually copy files -CI_GIT_ARGS =3D \ - -c advice.detachedHead=3Dfalse \ - -q \ - --local \ - $(NULL) - -# Args to use when running the container -# --rm stop inactive containers getting left behind -# --user we execute as the same user & group account -# as dev so that file ownership matches host -# instead of root:root -# --workdir we change to user's home dir in the container -# before running the workload -# --volume to pass in the cloned git repo & config -# --ulimit lower files limit for performance reasons -# --interactive -# --tty Ensure we have ability to Ctrl-C the build -CI_ENGINE_ARGS =3D \ - --rm \ - --interactive \ - --tty \ - --user "$(CI_UID)":"$(CI_GID)" \ - --workdir "$(CI_USER_HOME)" \ - --env CI_CONT_SRCDIR=3D"$(CI_CONT_SRCDIR)" \ - --env MESON_ARGS=3D"$(MESON_ARGS)" \ - --env NINJA_ARGS=3D"$(NINJA_ARGS)" \ - $(CI_PODMAN_ARGS) \ - $(CI_PWDB_MOUNTS) \ - $(CI_HOME_MOUNTS) \ - $(CI_SCRIPT_MOUNTS) \ - --volume $(CI_HOST_SRCDIR):$(CI_CONT_SRCDIR):z \ - --ulimit nofile=3D$(CI_ULIMIT_FILES):$(CI_ULIMIT_FILES) \ - --cap-add=3DSYS_PTRACE \ - $(NULL) - -ci-check-engine: - @echo -n "Checking if $(CI_ENGINE) is available..." && \ - $(CI_ENGINE) version 1>/dev/null && echo "yes" - -ci-prepare-tree: ci-check-engine - @test "$(CI_REUSE)" !=3D "1" && rm -rf $(CI_SCRATCHDIR) || : - @if ! test -d $(CI_SCRATCHDIR) ; then \ - mkdir -p $(CI_SCRATCHDIR); \ - cp /etc/passwd $(CI_SCRATCHDIR); \ - cp /etc/group $(CI_SCRATCHDIR); \ - mkdir -p $(CI_SCRATCHDIR)/home; \ - cp "$(CI_BUILD_SCRIPT)" $(CI_SCRATCHDIR)/build; \ - chmod +x "$(CI_SCRATCHDIR)/build"; \ - echo "Cloning $(CI_GIT_ROOT) to $(CI_HOST_SRCDIR)"; \ - git clone $(CI_GIT_ARGS) $(CI_GIT_ROOT) $(CI_HOST_SRCDIR) || exit 1; \ - for mod in $$(git submodule | awk '{ print $$2 }' | sed -E 's,^../,,g') = ; \ - do \ - test -f $(CI_GIT_ROOT)/$$mod/.git || continue ; \ - echo "Cloning $(CI_GIT_ROOT)/$$mod to $(CI_HOST_SRCDIR)/$$mod"; \ - git clone $(CI_GIT_ARGS) $(CI_GIT_ROOT)/$$mod $(CI_HOST_SRCDIR)/$$mod |= | exit 1; \ - done ; \ - fi - -ci-run-command@%: ci-prepare-tree - $(CI_ENGINE) run \ - $(CI_ENGINE_ARGS) \ - $(CI_IMAGE_PREFIX)$*$(CI_IMAGE_TAG) \ - $(CI_COMMAND) - @test "$(CI_CLEAN)" =3D "1" && rm -rf $(CI_SCRATCHDIR) || : - -ci-shell@%: - $(MAKE) -C $(CI_ROOTDIR) ci-run-command@$* CI_COMMAND=3D"/bin/bash" - -ci-build@%: - $(MAKE) -C $(CI_ROOTDIR) ci-run-command@$* CI_COMMAND=3D"$(CI_USER_HOME)/= build" - -ci-test@%: - $(MAKE) -C $(CI_ROOTDIR) ci-build@$* CI_NINJA_ARGS=3Dtest - -ci-help: - @echo - @echo - @echo - @echo " !!! PLEASE DON'T USE THIS DIRECTLY !!!" - @echo - @echo " Use the ci/helper script instead" - @echo - @echo " !!! PLEASE DON'T USE THIS DIRECTLY !!!" - @echo - @echo - @echo - @echo "Build libvirt inside containers used for CI" - @echo - @echo "Available targets:" - @echo - @echo " ci-build@\$$IMAGE - run a default 'ninja' build" - @echo " ci-test@\$$IMAGE - run a 'ninja test'" - @echo " ci-shell@\$$IMAGE - run an interactive shell" - @echo " ci-help - show this help message" - @echo - @echo "Available make variables:" - @echo - @echo " CI_CLEAN=3D0 - do not delete '$(CI_SCRATCHDIR)' a= fter completion" - @echo " CI_REUSE=3D1 - re-use existing '$(CI_SCRATCHDIR)'= content" - @echo " CI_ENGINE=3Dauto - container engine to use (podman, d= ocker)" - @echo " CI_USER_LOGIN=3D - which user should run in the conta= iner (default is $$USER)" - @echo " CI_IMAGE_PREFIX=3D - override to prefer a locally built= image, (default is $(CI_IMAGE_PREFIX))" - @echo " CI_IMAGE_TAG=3D:latest - optionally use in conjunction with= 'CI_IMAGE_PREFIX'" - @echo " CI_MESON_ARGS=3D - extra arguments passed to meson" - @echo " CI_NINJA_ARGS=3D - extra arguments passed to ninja" - @echo --=20 2.41.0