SCCS Source Code Control System version control Installation
This is the first article in a series of articles. In the first article, we’ll provide an overview of SCCS and how we can install it on a Linux system. In next articles, we’ll share some examples to exemplify the different features provided by SCCS. SCCS – Source Code Control System is the first version control system, originally written in 1972 by Marc J. Rochkind at Bell Labs.
Overview of SCCS
SCCS is an acronym for Source Code Control System, a version control system whose purpose is to track changes made to application source code and other related text files.
For those unfamiliar with version control or source code control systems, we have a brief definition written below:
“A version control system is a software that is used to track changes made to software programs or scripts, documents and other collections of information.”
SCCS is perhaps the oldest version control system available today, having been developed in 1972 and has been a mainstay in UNIX based operating systems through the ages.
It may lack the advanced capabilities of newer version control systems like git and subversion but it can be used to maintain projects that are not too complex.
SCCS does not have a steep learning curve and is easy to understand and use for individuals who are just beginning to understand the concept of version control and would like to implement it on some simple projects.
There are essentially two major guiding principles which lay the foundation for the need for version control systems:
- The ability to keep multiple versions of the file data or files.
- Ensure that multiple people don’t edit files simultaneously and corrupt them.
SCCS has the following features
- Maintain and retrieve multiple versions of the same file.
- Lock a file while it is being edited to ensure that one user does not discard or overwrite updates made by another user.
- Maintain a summary of changes made to the file or project with each revision or update.
- Track changes between different versions of the file.
- Revert to a previous version of the file.
With a basic understanding of what SCCS is, we’ll now proceed to its installation and setup on a virtual machine running the Centos 6.8 operating system.
SCCS Source Code Control System Installation steps
Step1: Download the software.
You can download SCCS as a compressed archive from sourceforge.
Step2: Extract the archive.
I’ve downloaded and copied the SCCS compressed archive into a directory on my Centos system and will now extract it.
root@sahil-centos SCCS]# ls sccs-5.08.tar.bz2 [root@sahil-centos SCCS]# tar jxvf sccs-5.08.tar.bz2 sccs-5.08/ sccs-5.08/cmd/ -----------------------------output truncated for brevity
Step3: Compile the code.
In this step, we will compile the source code using gmake or GNU make.
Please note that you need to have the GCC compiler installed on the system or this step to work.
We change directory to sccs-5.08 and run the gmake command specifying the INS_BASE attribute to indicate that we’ll be installing the software in /usr/sccs directory.
[root@sahil-centos SCCS]# cd sccs-5.08 [root@sahil-centos sccs-5.08]# ls [root@sahil-centos sccs-5.08]# ls AN-0.1 AN-0.5 AN-5.03 AN-5.06 bins Changelog configure DEFAULTS_ENG inc lib libschily patch READMEs sccs tests AN-0.2 AN-1.0 AN-5.03b AN-5.07 BUILD cmd CONTRIBUTING Gmake include libfind Makefile pkgdefs README.SCCS tags TODO AN-0.3 AN-5.01 AN-5.04 AN-5.08 CDDL.Schily.txt COMPILE COPYING Gmake.linux incs libgetopt man PORTING README.SSPM TARGETS TODO_V6 AN-0.4 AN-5.02 AN-5.05 autoconf CDDL.Sun.txt conf DEFAULTS GPL-2.0.txt INSTALL libs MKLINKS README.compile RULES TEMPLATES root@sahil-centos sccs-5.08]# gmake INS_BASE=/usr/sccs RULES/rules.top:47: RULES/ldummy.lnk: No such file or directory W A R N I N G Messages like: gmake[2]: Entering directory `/tmp/cdrtools-2.01/libschily' ../RULES/r-gmake.dep:76: OBJ/<arch-dir>/cvmod.d: No such file or directory .... are caused by a GNU make bug and not by the Schily makefile system. The related bug has been reported to the GNU make maintainers in 1998 but as the bug has not yet been fixed, it seems that GNU make is unmaintained :-( A working highly portable make program is at https://sourceforge.net/projects/s-make/files/ --------------------------------------------------output truncated for brevity gmake[3]: Leaving directory `/root/SCCS/sccs-5.08/man/man4' gmake[2]: Leaving directory `/root/SCCS/sccs-5.08/man/man4' gmake[1]: Leaving directory `/root/SCCS/sccs-5.08/man'
Step4: Install the software
Once the source code has compiled successfully we’ll now use gmake to install SCCS and it’s related files in the /usr/sccs directory as shown below.
[root@sahil-centos sccs-5.08]# gmake INS_BASE=/usr/sccs install W A R N I N G Messages like: gmake[2]: Entering directory `/tmp/cdrtools-2.01/libschily' ../RULES/r-gmake.dep:76: OBJ/<arch-dir>/cvmod.d: No such file or directory .... are caused by a GNU make bug and not by the Schily makefile system. The related bug has been reported to the GNU make maintainers in 1998 but as the bug has not yet been fixed, it seems that GNU make is unmaintained :-( A working highly portable make program is at https://sourceforge.net/projects/s-make/files/ You may switch off this warning by calling "gmake GMAKE_NOWARN=true ..." ==> MAKING "install" ON SUBDIRECTORY "SRCROOT/conf" gmake[1]: Entering directory `/root/SCCS/sccs-5.08/conf' ==> MAKING DIRECTORY "/usr/sccs/include/schily/x86_64-linux-cc" ==> INSTALLING "/usr/sccs/include/schily/x86_64-linux-cc/xconfig.h" ==> MAKING "install" ON SUBCOMPONENT "SRCROOT/conf/xconfig.mk" ------------------------------------------------output truncated for brevity
Step5: Verify that SCCS has been installed
While compiling and installing sccs we specified that sccs should be installed in the /usr/sccs directory.
If we change directory to this path and look under the bin directory, we’ll find the sccs binary.
[root@sahil-centos bin]# pwd /usr/sccs/bin [root@sahil-centos bin]#
We can run sccs without any options and it will give show us the options and flags available with the command.
[root@sahil-centos bin]# ./sccs Usage: sccs [ -R ][ -r ][ -drootprefix ][ -p subdir ] subcommand [ option ...] [ filename ...] basic sub-commands: sccs admin create or administer SCCS history files sccs diffs compare edited file with a version of an SCCS file sccs edit get files for editing sccs get retrieve a version of an SCCS file sccs help print help for SCCS commands and error messages sccs log create a changelog using SCCS delta comments basic project oriented sub-commands: sccs add add specified files on next commit sccs commit commit changes to project repository sccs init initialize empty project repository sccs remove remove specified files on next commit sccs rename rename specified files on next commit sccs status show changed files in the project
Step 6: Add the path /usr/sccs to the PATH variable
The path /usr/sccs has not been added to the environment variable PATH.
So to ensure that we do not have to type the full path each and every time we use the command, we’ll add this location to the PATH variable.
[root@sahil-centos ~]# export PATH=$PATH:/usr/sccs/bin
After we have exported the PATH variable we’ll be able to use the sccs command directly.
[root@sahil-centos ~]# sccs Usage: sccs [ -R ][ -r ][ -drootprefix ][ -p subdir ] subcommand [ option ...] [ filename ...] basic sub-commands: sccsadmin create or administer SCCS history files sccsdiffs compare edited file with a version of an SCCS file sccsedit get files for editing sccsget retrieve a version of an SCCS file sccshelp print help for SCCS commands and error messages sccslog create a changelog using SCCS delta comments basic project oriented sub-commands: sccsadd add specified files on next commit sccscommit commit changes to project repository sccsinit initialize empty project repository sccsremove remove specified files on next commit sccsrename rename specified files on next commit sccsstatus show changed files in the project
Conclusion
In this article, we gave an overview of SCCS (Source Code Control System) and version control in general and we showed you how to install it on your system.
In the next article, we’ll demonstrate how to use SCCS and implement versioning on our files.
Related Articles
Jenkins Installation and Configuration
Thanks for your wonderful Support and Encouragement