Tags:
create new tag
view all tags

LCFG Source Subversion Repository

Repository Location

The LCFG source repository is located at https://svn.lcfg.org/svn/source/, it can also be browsed via websvn

Repository Layout

The LCFG source repository is laid out like this:

source/trunk
source/tags
source/branches

This is the standard layout supported by the LCFG build tools and must be copied if you want to manage your own source code repositories using the LCFG build tools.

Read access to the LCFG subversion repository

Anyone can have read access to the LCFG source code subversion repository. The repository is available via https and the authentication is done with Kerberos. If you have an account in the INF.ED.AC.UK, ED.AC.UK or EASE.ED.AC.UK realms you will be able to access the repository using your normal Kerberos credentials (if you don't already have a cached ticket you will asked for a password). If you do not have an account in one of these realms you can use the self-service iFriend for Visitors registration system provided by the School of Informatics.

You checkout the trunk of the repository like this:

svn checkout --username your_username https://svn.lcfg.org/svn/source/trunk lcfg_source

You might not need to specify your username. For iFriend users your_username is the email address you registered, for example: fred@example.org

You may be prompted to accept a certificate, after that you should be prompted to enter your password.

It is important to note that Subversion caches the username/password combination in the file ~/.subversion/auth in plaintext.

Write access to the LCFG subversion repository

Anyone who maintains LCFG components or other utilities can have write access to the LCFG subversion repository. You will need to request write access from the lcfg team.

If you wish to gain write access to existing parts of the repository you will need to get the current maintainer to place a request, this is done via the LCFG bugzilla using the "New Users" component.

It is possible to allow groups to "own" projects and this is the preferred approach so that there is less risk of code becoming abandoned when people move on to new roles. Often the best strategy is to have all components authored within a school/unit owned by all Computing Officers even if you don't expect them to require write access under normal circumstances.

If you wish to add new components to the repository you can submit a request via the LCFG bugzilla using the "New Components" component.

When a new project is added to the repository (e.g. lcfg-foo) you will have a layout like this:

source/trunk/lcfg-foo
source/tags/lcfg-foo
source/branches/lcfg-foo

and you will have write access to all 3 areas to use as required for your project.

Note that LCFG components must always be named like lcfg-foo, for other utilities any reasonable name is acceptable. For LCFG components the name may only use alpha-numerics and the underscore character, also the name must start with an alphabetical character. The Perl regular expression which the name must match is ^lcfg-[a-zA-Z][a-zA-Z0-9_]+$

LCFG Build Tools

The most common project administration tasks (e.g. tagging, making tar files, building packages) are normally done using the LCFG build tools, the main command is lcfg-reltool which supports sub-commands in a similar way to the svn command-line program.

Tagging Releases

Once you have committed your changes to a project in trunk you will want to tag the release for building. This is done using the LCFG buildtools and one of the commands: majorversion, minorversion or microversion (which can be abbreviated to their shortest unique name). For example:

lcfg-reltool micro

This is based around the lcfg version string which has three parts (e.g. 1.2.3 which is major.minor.micro). The use of these commands is entirely up to the maintainer but the generally accepted approach is that majorversion is only used when large-scale incompatible changes are made, minorversion is used when new features are added and microversion is for bug fixes and packaging changes.

When a new tag is created using the LCFG build tools it will be named like lcfg_foo_1_2_3 and the path is then source/tags/lcfg-foo/lcfg_foo_1_2_3. Note that hyphens are all replaced with underscores. If you do not use the build tools then you can name tags anything you like but that standard format must be used when you want to build packages with the LCFG build tools.

Packing Tar Files

You can package a tagged release using the following command:

lcfg-reltool pack

If this is run within the project directory in trunk it will pack the version specified in lcfg.yml (which is probably the most recent tag). If you want to pack the files in trunk, including any uncommitted changes, then you should instead use the devpack command. Note that you must add any new files using svn add before they will be included into your tar file, they do not however need to be committed to the repository.

Building RPMs

You can build an RPM from a tagged release using the following command:

lcfg-reltool rpm

If this is run within the project directory in trunk it will build an RPM for the version specified in lcfg.yml (which is probably the most recent tag). If you want to build a package using the files in trunk, including any uncommitted changes, then you should instead use the devrpm command. Note that you must add any new files using svn add before they will be included into your RPM, they do not however need to be committed to the repository.

Branching in the LCFG svn repository

The LCFG build tools does not support making branches. It's fairly easy to create branches in svn and then use the lcfg buildtools.

If a top-level branches directory for your project does not already exist then you will need to request that it be created, this is normally done when a new project directory has been created.

svn mkdir -m "Created branches directory for lcfg-testsjq" \
         https://svn.lcfg.org/svn/source/branches/lcfg-testsjq

To branch from the trunk:

svn cp -m "New devel branch for lcfg-testsjq" \
       https://svn.lcfg.org/svn/source/trunk/lcfg-testsjq \
       https://svn.lcfg.org/svn/source/branches/lcfg-testsjq/branch1

To branch from a particular tag:

svn cp -m "New devel branch for lcfg-testsjq" \
       https://svn.lcfg.org/svn/source/tags/lcfg-testsjq/lcfg_testsjq_0_0_1 \
       https://svn.lcfg.org/svn/source/branches/lcfg-testsjq/branch2

Note that tags are based on the project name and version but have all hyphens replaced with underscores.

The easiest way to find the current set of tags is to use the websvn interface

If you want, you can copy from checked-out copies of the tags or trunk tree but, particularly for the tags directory, you probably don't want to do such a large checkout.

When you have made a branch from trunk you need to choose a new major or minor version for either the branch or the trunk to avoid tag collisions. So, your first step should be either of:

lcfg-reltool major

or

lcfg-reltool minor

in the trunk or branch. After that just use the LCFG buildtools as normal, there are no differences.

When working from a tag you will need to do something similar but you will need to be even more careful when choosing your new version to avoid collisions with trunk and all the existing tags.

-- Main.squinney - 2013-02-05

Topic revision: r2 - 2013-02-05 - squinney
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback