From nobody Thu May 16 06:13:33 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=1586443233; cv=none; d=zohomail.com; s=zohoarc; b=nTgX/pB69fUZ3WkxvvKzJwawrAkwZKyfCJgS1NbKuk4X/IOqsfwTlWw7NLNPkmHiqUnOFw7S9CVA+u2sWkIpweDcB5W2jERlVbZImb2ODg79VmEffQlauv+s/1Qj7pPPWnXy2GbzKXlv38wb+HNUOJTZ7krIWO7PHdy/jmX86rU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586443233; 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=DN/hehu9WtR79uwoHBrNWxKmoJTh+bgYrTlgWoU0Wno=; b=D0Xfr/zvFQ6ZjxTCoU0k+VQrPf8LhzHOHL6R/TtuiZq5pOk+dsNBoL0cfFVzQAYn3M3fvtLFzZvFBMBunVmoqR7sq1ksK8sg4o8MAsBWIEBVP3e8EwPqIIWlasKIM257cyleGHUqx0cPZoiBCddZHFtXfhTedQxBI3VuiNZzWE4= 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 1586443233753326.6284739192565; Thu, 9 Apr 2020 07:40:33 -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-380-7LHG08LxMcWTAbfMBl6noA-1; Thu, 09 Apr 2020 10:40:29 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6E768DB6C; Thu, 9 Apr 2020 14:40:23 +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 4477B5E001; Thu, 9 Apr 2020 14:40:23 +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 DE41393072; Thu, 9 Apr 2020 14:40:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 039EeLr5003738 for ; Thu, 9 Apr 2020 10:40:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id BCA5B272CC; Thu, 9 Apr 2020 14:40:21 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2729C391; Thu, 9 Apr 2020 14:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586443232; 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=DN/hehu9WtR79uwoHBrNWxKmoJTh+bgYrTlgWoU0Wno=; b=Y1jrksEDLv2KMIvdC61Faikr+RdIzqz4JzBKztCiFGcmkiIGaAi0r5yQsilT/EVhsOhQtL 9sthRH92mVsKEu9TUDoIDRcFsCI7+SDvx9w0jCG3qFl6lBIVxlBEymvnI/mhFBAWbcmWRf cTpLLo7Nph3dQI7FwDas2Q6w0Nphe/c= X-MC-Unique: 7LHG08LxMcWTAbfMBl6noA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH v2] docs: list settings required in creating a new git repo Date: Thu, 9 Apr 2020 15:40:15 +0100 Message-Id: <20200409144015.1316958-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.79 on 10.5.11.15 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 --- In v2: - Apply all Andrea's suggestions docs/docs.html.in | 3 + docs/newreposetup.rst | 137 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 140 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..7da13830c0 --- /dev/null +++ b/docs/newreposetup.rst @@ -0,0 +1,137 @@ +=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 the ``@committers`` team with the role "Write", which + grants ``libvirtmirror`` access to sync from gitlab. + + * **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' exam= ple + +* Setup mirroring + :: + + $ sudo su - gitmirror + # ./newrepo.sh /data/git/$repo.git + # cd mirrors + # $HOME/sync-one.sh $repo.git --=20 2.24.1