From nobody Thu May 16 07:38:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1586364104; cv=none; d=zohomail.com; s=zohoarc; b=Uw/dTmtujou4/cGqIdxy9YEirHzfe3t7kU+ZKGr+QvxFJnFyLaUnJ89buRMFXRmQpPhRgeZXMdWtIltWo4tXGhL/sKTFPbDvNURajILgZwYvrp41K6uJepl7btYynqOsOutdDHMGT28ERf/qDYepa2+FKe35znd0MEiLS6T/tBY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586364104; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Yd1xdAAakCdkMvgHvhBo1BFEE2D9+miwH7AG5oi1Q+M=; b=lz942UZkWTSPKJ1y6nyvG09h9tmODcMhfleqf3K3GsrZJKQiLROs+N2j1T9tmAhaU8oQptr+y5NY4t9FZYv4IA9LFrJ38iB7XkDOXAlbKPXYeYvCUmr38MzHVIof23xV/K8DoZKzGJpfdxsflWQmaX3LSEoxNXKOrAn9TdrPL6M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1586364104152456.4831988059982; Wed, 8 Apr 2020 09:41:44 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-464-9xtZDOKSNE--emyePyJeeg-1; Wed, 08 Apr 2020 12:41:39 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7640F800D5C; Wed, 8 Apr 2020 16:41:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2CEF61000337; Wed, 8 Apr 2020 16:41:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AA1F593A92; Wed, 8 Apr 2020 16:41:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 038GfWB5024750 for ; Wed, 8 Apr 2020 12:41:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 79AA65DA81; Wed, 8 Apr 2020 16:41:32 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A47B5D9CA; Wed, 8 Apr 2020 16:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586364102; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Yd1xdAAakCdkMvgHvhBo1BFEE2D9+miwH7AG5oi1Q+M=; b=iroRwwBGNOXjYD0YfEVf3hg/ZVZ2PTh1Sc2LzXiJsq9uvHKo9HyKkL8CCDPff10ciiKwCW 9EhP5U6Vwo2ZrWSaX9LwP+53v9Nkar/GOY7tBR9N4PTRJSHsr2XbK37Vogk1v1zcnSije2 NvBiRxcPEJwR6Ad9MEHdnBXK2SfKM54= X-MC-Unique: 9xtZDOKSNE--emyePyJeeg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] docs: list settings required in creating a new git repo Date: Wed, 8 Apr 2020 17:41:25 +0100 Message-Id: <20200408164125.1190843-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The libvirt project has alot of git repositories, and they must all be configured in the same way, more or less. This page documents the settings changes that I have made in GitLab and GitHub when configuring projects, both as a reminder for myself, and to help anyone else doing the same in future. Also included is info about the repo mirroring on the libvirt.org server. Signed-off-by: Daniel P. Berrang=C3=A9 --- docs/docs.html.in | 3 + docs/newreposetup.rst | 136 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 docs/newreposetup.rst diff --git a/docs/docs.html.in b/docs/docs.html.in index 142c79bfa9..6bdf0c32b8 100644 --- a/docs/docs.html.in +++ b/docs/docs.html.in @@ -172,6 +172,9 @@
Functional testing
Testing libvirt with TCK test suite and Libvirt-test-API
+ +
New repo setup
+
Procedure for configuring new git repositories for libvirt
=20 diff --git a/docs/newreposetup.rst b/docs/newreposetup.rst new file mode 100644 index 0000000000..897caaa1ec --- /dev/null +++ b/docs/newreposetup.rst @@ -0,0 +1,136 @@ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D +Repository infrastructure setup +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D + +GitLab Configuration +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The `GitLab organization `_ hosts the master c= opy +of all the libvirt Git repositories. + +When creating a new repository the following changes to the defaults are +required under the ``Settings`` page + +* **General** + + * **Naming, topics, avatar** + + * *Project avatar*: upload ``docs/logos/logo-square-256.png`` + + * **Visibility, project features, permissions** + + * *Packages*: disabled + + * *Wiki*: disabled + + * *Snippets*: disabled + + * **Merge Requests** + + * *Merge method*: Fast-forward merge + + * *Merge options*: Enable 'delete source branch' option by default + + * *Merge checks*: Pipelines must succeed + + * **Merge request approvals** + + * *Any eligible user*: Num approvals required =3D=3D 1 + +* **Integrations** + + * **Pipelines emails** + + * *Recipients*: ``libvirt-ci@redhat.com`` + +* **Repository** + + * **Push rules** + + * *Do not allow users to remove git tags with git push*: enabled + + * *Commit message*: ``Signed-off-by:`` + + * *Branch name*: ``^(master|v.*-maint)$`` + + * **Mirroring repositories** + + * *Git repository URL*: ``https://libvirtmirror@github.com/libvirt/$re= po.git`` + + * *Mirror direction*: push + + * *Password*: see ``/root/libvirt-mirror-github-api-token.txt`` on ``= libvirt.org`` + + * **Protected branches** + + * *Branch*: ``master`` + + * *Allowed to merge*: Developers + Maintainers + + * *Allowed to push*: None (or Developers + Maintainers if MRs not used) + + * *Require approval from code owners*: disabled + +GitHub configuration +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The `GitHub organization `_ hosts read-only +mirrors of all the libvirt Git repositories. + +When creating a new repository the following changes to the defaults are +required under the ``Settings`` page + +* **Options** + + * **Features** + + * *Wikis*: disabled + + * *Sponsorships*: disabled + + * *Projects*: disabled + + * **Manage access** + + * Add @committers with role "Write" + + * **Integrations** + + * Check for *Repo Lockdown* (should be set automatically for all proj= ects) + +In the master git repository create a file `.github/lockdown.yml` to restr= ict +use of issue tracker and pull requests. + + +libvirt.org +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The `Libvirt project server `_ hosts read-only mirror= s of +all the libvirt Git repositories in the directory ``/data/git``. + +When creating a new repository the following steps are required + +* Create repo with + :: + + $ sudo su - + # cd /data/git + # mkdir repo.git + # cd repo.git + # git init --bare + # touch export + # touch git-daemon-export-ok + # cd .. + # chown -R gitmirror.gitmirror repo.git + # chmod -R g+w repo.git + # find -type d repo.git | xargs chmod g+s + +* Set the ``description`` and ``config`` files following other repos examp= le + +* Setup mirroring + :: + + $ sudo su - gitmirror + # ./newrepo.sh /data/git/repo.git + # cd mirrors + # $HOME/sync-one.sh repo.git --=20 2.24.1