vision-dbms / vision

The master repository for the Vision database system.
https://vision-dbms.com
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

Branch Managed Release 8.0 #12

Closed MichaelJCaruso closed 7 years ago

MichaelJCaruso commented 7 years ago

This pull request -- the first of two -- begins the process of consolidating the files contained in software/src/8.0 and software/src/8.1 into a single directory managed using git branches.

While the changes described here primarily alter the organization and use of this repository's software subtree, the workflow changes associated with git branches provide benefits beyond managing just that subtree. Because branches apply to the entire repository, we also gain the important ability to couple changes to the test deck, application protocol, and builder to the version of the source to which they apply.

This request builds on (and incorporates) the changes introduced in pull request #10 (the Mac port and working versions of the Vision editor on all of our 'nix/'nux platforms).

Because the goal of this pull request is branch managed versions, once accepted, a new branch, presumably named release-8.0, should be immediately created referencing the merge commit generated by this pull.

Structurally, this request adds a new directory to the repository - software/src/master - initialized to a git generated "copy" of software/src/8.0. How that git generated copy was created is described in more detail below.

Going forward, this repository should be used by checking out a branch to be used or modified. Although release specific 8.0 and 8.1 directories remain in the software subtree for now, changes should be made and builds run in the master directory. While making changes and running builds in the release specific directories remains possible, making changes in those directories in particular should be avoided. Because of how the master directory was initialized, it is possible to migrate and merge changes among these directories exclusively using git commands; however, that should not be considered an everyday workflow.

In addition to the structural changes introduced by this pull request, several smaller specific changes are also made here:

  1. Commit 8df8690 adds source control specific AUDIT information to all executables and libraries (e.g., AUDITINFO:Source:git:work-tree=...Vision/vision,branch=release-8.1,commit=edcf7e2).
  2. Commits 0376b6c and e1d2539 extend visionBuilder to give it the ability to include the output of arbitrary shell scripts in the make definitions used to build a target or group of targets. Intended to address a very unreliable version of shell based macro definitions in Solaris make, this machinery can be used to do platform specific feature testing during a build. See the file _software/src/master/src/frontend/MSunOS/make.defs.3.gen for an example of doing this on Solaris to test for the availability of ncurses.
  3. Commit a542338 attempts to reduce the large number of format warnings that occur during builds of the showsizes utility.

Creating software/src/master

As noted above, the changes described here were made with the goal of maximizing the utility obtained from the tools git has to offer. That goal extends to the creation of software/src/master and, more importantly, to the process of merging our software subtrees.

While it would have been possible to simply copy software/src/8.0 to software/src/master and add the result to the repository as new content, doing so would have largely bypassed git and left virtually no audit trail of what was done.

In contrast, using git to relocate and merge the 8.0 and 8.1 source trees requires the following:

  1. git needs to be convinced to align the 8.0 and 8.1 source trees so that they appear to be different versions of the same directory tree.
  2. git needs to be convinced that the revision histories of these two trees share a common ancestor upon which to base a 3-way diff recursive merge of their histories.
  3. git needs to be able to re-materialize those results as branched versions of a new master directory.

Of these three requirements, only the first and third need to be satisfied to implement this pull request. Both are addressed by git subtree.

Abstractly, git subtree maps the root directory of one repository into a sub-directory (subtree) of another repository in a way that supports the bi-directional transfer of content and revision history between the two repositories. For a good, in-depth discussion of its use, theory of operation, and alternatives see Mastering Git subtrees.

As used here, git subtree was used by first creating a new, empty, github repository -- vision-software-src-master; referencing that new repository from a working clone of this repository:

git remote add vision-software-src-master https://github.com/.../vision-software-src-master

and invoking:

git subtree push --prefix=software/src/8.0 vision-software-src-master master

to initialize its content and history to the content and directory specific history of software/src/8.0:

* 8e7b695 Add feature test to build Solaris frontend with ncurses if available.
* e6e4a8e Changes that build the frontend with ncurses on Solaris.
* 519f56b Localize <curses.h> inclusion for easier curses version switching.
* a840da6 'strndup' not available of Solaris 10, use 'strdup' instead.
.
.
.
* 1d43ef3 Define 'struct sigvec' properly for the Vision editor.
*   acdb588 Merge branch 'master' of https://github.com/vision-dbms/vision
|\  
| * b1d30fb Define 'struct sigvec' only when __USE_BSD isn't defined.
| * 9d2ab6e Newer versions of g++ (e.g, g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609) no longer expose a definition 'struct sigvec' by default.  Adjust our feature test to allow builds on newer Linux releases to succeed.
| * be156f5 Remove '-g' compiler option from Linux 'release' builds.
| * e5ac745 Remove execute permission from a number of source (e.g. *.cpp, *.h), configuration (e.g., make.plist), and test input and data files.
* | 63f5328 -xarch=v9 and -m64 together work in all environments.  Let's go with that for now!
* | d18b639 I modified testtools/td/scripts/Test so that it works in the directory tree as released. batchvision passes all pieces of the testdeck, except the final component <U+0096> truncate.S.
|/  
* fa70933 Initialize Repository for github

For the purposes of this pull request, all that remains is running:

git subtree add --squash --prefix=software/src/master software-src-master master

to materialize the new software/src/master directory:

git fetch software-src-master master
From github.com:MichaelJCaruso/vision-software-src-master
 * branch            master     -> FETCH_HEAD
Added dir 'software/src/master'

with a squashed version of its original history:

*   00ec2b4 Merge commit 'c445976916870b2137fc7494b86235a558e0b17f' as 'software/src/master'
|\  
| * c445976 Squashed 'software/src/master/' content from commit 8e7b695
* 34223b7 Delete 'bin' sub-directory from software/src/8.1.
.
.
.

Note that the use of the --squash option is important. Without it, the entire history of the software/src/8.0 subtree will be copied back to this repository resulting in two almost identical, virtually indistinguishable copies of every commit that affected any file in software/src/8.0.

With the exception of commands to create named branches like release-8.0 in these repositories, the commands described above fulfill the needs of this pull request and lay the groundwork for the now almost trivial branch based merge of software/src/8.1 into software/src/master. That process will be described in the Branched Managed Release 8.1 successor to this pull request.