Re: Converting CGEN from CVS to git

Andrew Burgess <[email protected]> Sun, 21 Apr 2019 22:32:26 +0100
Newsgroups gmane.comp.tools.cgen.devel
Message-ID <[email protected]>
* Frank Ch. Eigler <[email protected]> [2019-03-27 16:09:46 -0400]:

> Hi, Andrew -
> 
> > > The mail is here, this describes the process I went through and
> > > some of the choices I made.
> > >   https://www.sourceware.org/ml/cgen/2019-q1/msg00000.html
> > > The link to my conversion is here:
> > >   [email protected]:T-J-Teru/cgen.git
> > >   [email protected]:T-J-Teru/cgen-2-git.git
> 
> OK, those look OK.  With respect to email addresses, retaining
> <[email protected]> as a fallback is fine.
> 
> > How would you feel if I reached out to the sourceware overseers list
> > to get an empty git repository setup (I guess that's the right place
> > to ask)?
> 
> I set up this for us/you now, and have given you cgen group membership.
> You should be able to commit your work to ssh://sourceware.org/git/cgen.git/
> and take it forward.  Thanks for taking the initiative!

I have now pushed both the master and 1.1 branch (the only remaining
branches) to the new git repository.

This was based on a conversion I just performed, but as the last
change I see in CVS was Alan's update of the copyright dates in
January, this new conversion is mostly unchanged from my original
proposal - I did update some of the email addresses used.

What I think needs to happen next:

  - Maybe someone can confirm that they can checkout the new
    repository, and even better test it.  Instructions for how I've
    been testing this against binutils-gdb are below.  Then,

  - If this is possible it would be great to make the old CVS
    read-only so nobody accidentally commits anything there.  I don't
    have permissions to do anything like this, finally

  - Update the web pages to point at the new git repository.  I have a
    patch for this below, and I _might_ even be able to commit it.  I
    wont know until I try I guess.

Thanks,
Andrew

---

How to test with binutils-gdb
=============================

There are two methods for using cgen with binutils-gdb, I call these
in-tree and out-of-tree.

The in-tree is the old-school way, and should probably be discouraged;
this involves checking out cgen into the binutils-gdb source tree,
something like:

  mkdir -p cgen-test/build
  cd cgen-test
  git clone git://sourceware.org/git/binutils-gdb.git
  cd binutils-gdb
  git clone git://sourceware.org/git/cgen.git
  cd ../build
  ../binutils-gdb/configure --enable-cgen-maint=yes --enable-targets=all
  make all-opcodes all-sim

This should work fine, with the only drawback being that the cgen
repository is living in the middle of our binutils-gdb checkout.

The (IMHO) better way to make use of cgen is out-of-tree; this
involves checking out cgen into a separate directory then telling
binutils-gdb where to find it at configure time, something like this:

  mkdir -p cgen-test/build
  cd cgen-test
  git clone git://sourceware.org/git/binutils-gdb.git
  git clone git://sourceware.org/git/cgen.git
  cd build
  ../binutils-gdb/configure --enable-cgen-maint=$(cd ../cgen && pwd) --enable-targets=all
  make all-opcodes all-sim

This should give identical results to the first method, but with the
benefit that binutils-gdb and cgen are now separate source trees.

If anyone sees anything unexpected then please let me know.

---

Below is the patch for the htdocs CVS repository for review:

-

Update repository details from CVS to git

Updates the details of how to find the repository from CVS to git.
I've also removed reference to the snapshots as these no longer seem
to be generated.

2019-04-21  Andrew Burgess  <[email protected]>

	* index.html: Update repository details from CVS to git.

Index: index.html
===================================================================
RCS file: /cvs/cgen/htdocs/index.html,v
retrieving revision 1.27
diff -u -p -r1.27 index.html
--- index.html	29 Aug 2011 17:34:25 -0000	1.27
+++ index.html	21 Apr 2019 21:05:28 -0000
@@ -68,28 +68,26 @@ connecting.
 
 <p>You can access the development source tree a couple of different ways.
 <dl>
-<dt><b>Anonymous CVS read-only access</b></dt>
+<dt><b>Read-only git access</b></dt>
 <dd>
   <pre>
-  cvs -z 9 -d :pserver:[email protected]:/cvs/src login
-  {enter "anoncvs" as the password}
-  cvs -z 9 -d :pserver:[email protected]:/cvs/src co cgen
+    git clone git://sourceware.org/git/cgen.git
   </pre>
 </dd>
 
-<dt><b>Read-only web-based CVS access</b></dt>
+<dt><b>Read-write git access (CGEN developers only)</b></dt>
 <dd>
-  You can browse the source code using the <a
-  href="/cgi-bin/cvsweb.cgi/src/cgen?cvsroot=cgen">cvsweb
-  interface</a>.
+  <pre>
+    git clone ssh://sourceware.org/git/cgen.git
+  </pre>
 </dd>
 
-<dt><b>CVS snapshots</b></dt>
+<dt><b>Read-only web-based git access</b></dt>
 <dd>
-  Periodically, snapshots of a complete anonymous CVS working tree are
-  <a href="ftp://sourceware.org/pub/cgen/snapshots/">archived here</a>.
+  You can browse the source code using the <a
+  href="https://sourceware.org/git/gitweb.cgi?p=cgen.git">gitweb
+  interface</a>.
 </dd>
-
 </dl>
 
 <h2>Bug reports and patches</h2>