Package: zensols.grsync
GRSync: Persist create build out environmentsThis program captures your home directory and synchronize it with another host
using Git repo metadata, symbolic links and persisted files.I wrote this because I couldn't find anything that creates repositories with
the idea of having a portable and easy to recreate your home directory on
another host.  If I've reinvented the wheel, please let me know :)More specifically: it persists and creates build out environments in a nascent
account.  The programmemorizinga users home directory and building it out
on another system (seeoverview).  This is done by:Copying files, directories and git repos configuration.Creating a distribution compressed file.Uncompress on the destination system and create repos.A future release will also synchronize and manage multiple GitHub repositories.Autility scriptalso provided to do operations on all configured local git
repositories.DocumentationSee thefull documentation.  TheAPI referenceis also available.ObtainingThe easist way to install the command line program is via thepipinstaller:pipinstallzensols.grsyncBinaries are also available onpypi.OverviewNot only is the aim to create a repproducable development (or like)
environment, it is also to create acleanenvironment.  This means we have
temporary directories we might expect to exist for our process(es), and of
course repositories cloned in their nascent state.  These steps are summarized
below:Freeze: This process captures the current host's setup and
configuration (specified in theconfiguration file) and includes:Empty directories.Git repository meta data.Locations of files to copy, top level directories of files to recursively
copy, where symlinks are considered files as well and currently not
followed.  Seecaveat.A sub-step of this process isdiscover, which reads the file system as
indicated by the configuration file.  This includes reading git repostiory
metadata, identifying file metadata (i.e. permissions) etc.Bootstraping: create an Python virtual environment on the target machine
that can be loaded with this program and depenedencies.  This is not a
necessary step as the program is available as apipinstall.  However, if
this step can be used to help automate new environments, after which, you
could futher add/install software with tools such asPuppet.Thaw: This includes two steps:File Extraction: extracts the files from the distribution zip created
in thefreezestep.Repo Cloning: this step recursively clones all repositories.UsageThe program has two phases:freezeandthaw(seeoverview).
The command line program is used twice: first on thefreezeon the source
system and thenthawon the target machine.Seeusagefor more information.ConfigurationThe configuration is used thefreezephase to create the distribution file.
This fil contains all git repositories, files, empty directory paths on the
current file system that is stored to bethawedon the target system.Seeconfigurationfor detailed documentation on
configurationtest case yaml filefor an
example of a simple configuration file to capture a set of git repositories and
small set of files.  The freeze/thaw/move test case usesthis configuration
file, which is more comprehensive and up to date.Symbolic LinksAs mentioned in theusagesection, symbolic links pointing to any
file in a repository arefroozen, which means that integrity at thaw time is
ensured.  However, linksnotpointing to a repository are persisted, but
the files and directories they point to are not.A future release might have afollow symbolic linkstype functionality that
allows this.  However, for now, you must include both the link and the data it
points to get this integrity.ChangelogAn extensive changelog is availablehere.CommunityPlease star this repository and let me know how and where you use this API.
Contributions as pull requests, feedback and any input is welcome.LicenseMIT LicenseCopyright (c) 2020 - 2023 Paul Landes