LCFG Source Profiles
In December 2020 the LCFG source profiles for Informatics machines moved from
rfe into the LCFG subversion repository. Instructions on how to access and update the profiles are given below:
Fetch the repository
It's fairly likely that you will already have some or all of the LCFG subversion repository checked out as a working copy. The profiles are found in a new directory under the
live section alongside
include and
packages.
If you need to fetch the
live section of the repository you can run the following:
mkdir ~/lcfg
cd ~/lcfg
svn checkout https://svn.lcfg.org/svn/lcfg/live
You will then have a
~/lcfg/live/profiles
directory
Modifying a profile
Before modifying a profile you first need to ensure your working copy is up-to-date:
cd ~/lcfg/live/profiles
svn update
You can then edit the relevant file with an editor of your choice, e.g.
emacs example1 &
Finally commit the change:
svn commit -m "A useful message explaining the change" example1
Creating a new profile
There are two options for creating a new profile:
1. Create a new file using your favourite editor and then add it.
emacs example2 &
svn add example2
svn commit -m "New profile for example2" example2
2. Copy and modify an existing profile. The copy is done using the standard unix cp command, you might think it makes sense to do an "svn copy" here but that will retain all the history of the template file which is probably not what you want to do.
cp example1 example3
emacs example3 &
svn add example3
svn commit -m "New profile for example3" example3
Renaming a profile
In the rare situation you need to rename a profile (maybe it was created with the wrong name?) you can simply move the file:
svn mv example1 example4
svn commit -m "Renamed example1 as example4"
Deleting a profile
Usually we want to archive the old profiles which gives us the option to examine the history at some later date if needed. In that case just move it into the
profiles-archive
directory. Note that this is at the same level as the
profiles
directory in the
live
tree (it's not a sub-directory of
profiles
).
cd ~/lcfg/live
svn mv profiles/example2 profiles-archive
svn commit -m "Archived profile for example2" profiles profiles-archive
If you really want to delete the profile (maybe you created it with the wrong name), in that case remove it completely:
svn rm example3
svn commit -m "Archived profile for example3" example3
Change History
You can view the change history for a profile like this:
svn log example4
All the change history from rfe has been preserved but note that all changes prior to the profiles being imported into subversion are owned by squinney. The log entries look like:
------------------------------------------------------------------------
r237723 | squinney@INF.ED.AC.UK | 2021-01-01 07:35:34 +0000 (Fri, 01 Jan 2021) | 1 line
Imported more profiles
------------------------------------------------------------------------
r237483 | squinney@INF.ED.AC.UK | 2020-12-10 10:18:51 +0000 (Thu, 10 Dec 2020) | 3 lines
# on 2020/12/10 10:18:51 (UTC), squinney did:
testing switch back to dhcp
Note how the original author and timestamp are preserved in the log entry.
--
StephenQuinney - 16 Dec 2020