Here’s a script I came up with to extract any project’s CVS repository from Sourceforge and convert it into a Git repository. To run it you’ll need Git and Subversion installed on your machine.
#!/bin/bash
set +e
set +u
DEST=$PWD
PROJECT=$1
WORKSPACE=/tmp/sf-cvs2git.$$
ORIG=$PROJECT-orig
CVS=$PROJECT-cvs
GIT=$PROJECT
# Trap ctrl-c, etc
trap "rm -rf $WORKSPACE; exit" INT TERM EXIT
# Create a workspace for ourselves
mkdir $WORKSPACE
cd $WORKSPACE
# Copy the whole CVS repository
rsync -av rsync://$PROJECT.cvs.sourceforge.net/cvsroot/$PROJECT/ $ORIG
# Overlay all of the CVS modules on top of each other
mkdir -p $CVS/all
mv $ORIG/CVSROOT $CVS
mv $ORIG/* $CVS/all
# Get the cvs2git tool
svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn
# Extract the CVS repository into the fast-export format
./cvs2svn/cvs2git --blobfile $PROJECT.blob --dumpfile $PROJECT.dump --username '(no author)' --fallback-encoding utf-8 $CVS/all
# Build a new Git repository from the extracted export
mkdir $GIT
cd $GIT
git init
cat ../$PROJECT.{blob,dump} | git fast-import
git gc --aggressive
# Clone to the original location we started in
cd $DEST
git clone --mirror $WORKSPACE/$GIT
# Clean up after ourselves
rm -rf $WORKSPACE
# Cancel the trap
trap - INT TERM EXIT
exit 0
Now simply upload your new repository to GitHub, or wherever else you feel is appropriate.
Pete Woods
[Remote] Java/C++ Engineer into DevOps, universally interested in technology
There are plenty of examples of basic Dockerfile based builds out there, but a production
application requires a bunch of different things, such as reproducibility, hardening,
health checks, static analysis - and ideally still be quick to build.
Using Git on macOS is largely a positive experience, other than (in my opinion) the
out of the box experience with merge tools. With my recent
merge
to Homebrew Cask you can use p4merge with no extra work.
Modern containerised 12 factor applications are expected to derive their configuration from environment variables.
While Spring Boot does import its
common properties from environment variables,
sometimes you need to interpolate several variables together, e.g. to form a URL.
An oft-repeated and sensible principle in software engineering is DRY, or
“don’t repeat yourself”. Here we will apply this principle to Docker compose
files.
To package our application, we’re going to be using Docker. The natural
build language for Docker images are Dockerfiles, so we will use
Spotify’s Dockerfile Maven plugin.
Spring Boot is a very popular Java framework for creating standalone, production
ready web applications. In this series of blog posts, we are going to walk through using Spring
Boot 2.0 to build and deploy a simple CRUD REST application.
It’s pretty common when doing Java development to need mutiple versions installed alongside each other.
With Brew and Jenv, switching Java versions between projects becomes easy.
I was recently given the task of modernising a simple internal site’s front-end. It was built using plain hand-written
HTML, CSS and JavaScript, with all layouts being done using HTML tables.