{"id":19989666,"url":"https://github.com/wavesoft/cernvm-lite","last_synced_at":"2026-05-08T23:18:32.635Z","repository":{"id":26098866,"uuid":"29542971","full_name":"wavesoft/cernvm-lite","owner":"wavesoft","description":"Utilities for building and bootstrapping CernVM from userland or in restricted environments.","archived":false,"fork":false,"pushed_at":"2015-03-13T14:57:08.000Z","size":628,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T20:02:11.412Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wavesoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-20T17:46:14.000Z","updated_at":"2015-03-13T14:57:08.000Z","dependencies_parsed_at":"2022-09-01T10:10:09.113Z","dependency_job_id":null,"html_url":"https://github.com/wavesoft/cernvm-lite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesoft%2Fcernvm-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesoft%2Fcernvm-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesoft%2Fcernvm-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesoft%2Fcernvm-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wavesoft","download_url":"https://codeload.github.com/wavesoft/cernvm-lite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241430321,"owners_count":19961635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T04:48:54.003Z","updated_at":"2026-05-08T23:18:27.604Z","avatar_url":"https://github.com/wavesoft.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# CernVM Lite\n\n`CernVM Lite` is a set of utilities that allows booting and using a CernVM distribution in environments where AUFS is not available, even in userland!\n\nThere are two kinds of utilities: The **building** scripts and the **booting** scripts. The *building* scripts are used for preparing the configuration file used by the *booting* scripts to boot a CernVM distribution.\n\n# Build Scripts\n\nThe building scripts located in the `build-scripts` folder are used for creating the confiugration file, later used by the boot scripts in order to boot a CernVM distribution.\n\n## Usage\n\nThe script `build-bootconf.py` creates a boot configuration script, using as input a directory structure-hinting ruleset, as described in the next paragraph.\n\nThe script is used like this:\n\n    build-bootconf.py path/to/rules.rules output.boot\n\n## Build Rules\n\nThe build rules found in the `build-scripts/rules` folder, define the attributes of the directory structure that will be applied by the boot scripts during system boot.\n\nThe syntax of the build rules is the following:\n\n```sh\n# Comments start with a hash\n# Each rule is defined like this:\n[pre/post-]\u003cdirective\u003e:\u003cpath\u003e[:\u003coptional additional parameters\u003e]\n```\n\nThe pre/post prefix defines if the rule should be applied before or after the expansion of the files collected with the `copy` directive. By default all directives are assumed to be prefixed with the term `pre-`.\n\n### `copy:\u003cpath\u003e`\n\nThe `copy` directive denotes that the specified path should be copied from the upstream filesystem to the guest filesystem in a writable directory. This is effectively a costly *copy-on-write* operation that should only be used in small directories. \n\nFor optimization purposes, the build script is creating a compressed tarball with all the files that should be eventually copied in the guest filesystem.\n\n### `readonly:\u003cpath\u003e`\n\nThe `readonly` directive denotes that the specified path should be mounted in read-only mode from the upstream filesystem.\n\n### `writable:\u003cpatn\u003e[:\u003cstructure\u003e]`\n\nThe `writable` directive denotes that the specified path should be writable. This means creating a blank directory in the specified location.\n\nThe optional parameter `structure` is a space-separated, wildcard-capable list of sub-paths that should be created inside the base directory. For example, you can create a blank `/usr/local` structure using:\n\n    writable:usr/local:{bin,etc,games,include,lib,lib64,libexec,sbin,src,share/{applications,info,perl5,man/man{1,1x,2,2x,3,3x,4,4x,5,5x,6,6x,7,7x,8,8x,9,9x,n}}}\n\n### `touch:\u003cpath\u003e`\n\nThe `touch` directive creates a blank file in the given path.\n\n### `import:\u003cfile\u003e`\n\nThe `import` directive denotes that the specified file should be copied from the currently running operating system to our isolated environment.\n\n### `set:\u003cparameter\u003e:\u003cvalue\u003e`\n\nThe `set` directive sets the value of an arbitrary parameter used either by the build or by the boot script. Currently the following parameters are used:\n\n * __tag__: This is the identification number for the resulting compressed files tarball. \n\n# Boot Scripts\n\nCurrently there are two versions of build scripts: One used for creating a bootable root filesystem, compatible with `chroot` command, and one for directly booting the CernVM distribution entirely in userlevel using the `pboot` utility.\n\n## cernvm-mkrootfs.sh\n\nThis script is used for creating a bootable filesystem root directory. This is useful when you want to *chroot* or create a *linux container* in the resulting directory.\n\n### Usage\n\nThe script has the following syntax:\n\n    cernvm-mkrootfs.sh \u003ccvmfs base\u003e \u003croot\u003e \u003cboot script\u003e\n\nWhere:\n\n * __cvmfs base__ is the base directory in CVMFS where the root filesystem files are located.\n * __root__ is the root directory where you want to deploy the CernVM filesystem.\n * __boot script__ is the boot script to use for setting-up the root filesystem.\n\n## cernvm-userboot.sh\n\nThis script is used for booting CernVM entirely in userspace using the `proot` utility. This is a compact script, that automatically downloads the proot binary, sets-up and mounts the cvmfs repository and starts a jailed shell.\n\nThe only requirement is for the `cvmfs2` binary to exist in the environment.\n\n### Usage:\n\nThe script has the following syntax:\n\n    cernvm-userboot.sh \u003cboot script\u003e\n\nWhere:\n\n * __boot script__ is the boot script to use for setting-up the root filesystem.\n\n# Configuration File Format\n\nThe configuration file is essentialy a shell script library which consists of a single function called `prepare_root`. For identification and protection against malicious uses, the file begins with the following header:\n\n    #!/bin/false\n    #BOOT_CONFIG=1.0\n\nThe `/bin/false` hashbang is used in order to prevent accidental run of the script, while the second line defines the version of the boot script configuration. Both lines must be present in order to be considered a valid boot script file.\n\nThe function itself is just a sequence of macros, following the same order as in the ruleset file. These macros should be pre-defined before the script file is included. This way, the boot script can define different booting behaviours using the same base ruleset.\n\nThe macros used are the following:\n\n * __MACRO_RO__ `\u003cpath\u003e`: Perform a read-only mount from the `${BASE_DIR}/\u003cpath\u003e` to `${GUEST_DIR}/\u003cpath\u003e`. This is equivalent to either a *symbolic link* or to a *bind-mount* between the two directories.\n * __MACRO_RW__ `\u003cpath\u003e`: Create a blank, writable directory in `${GUEST_DIR}/\u003cpath\u003e`. This is equivalent to *mkdir* or to *bind-mount* to a writable scratch storage.\n * __MACRO_MKDIR__ `\u003cpath\u003e`: Create a new directory. This is called for a directory previous created with `MACRO_RW` in order to create the internal directory structure.\n * __MACRO_EXPAND__ `\u003ctag_id\u003e`: Expand the list of files (collected with the `copy` directive in the rules file) with the specified tag ID. The script could either be located in the same folder with the boot script, or in a particular directory in the CVMFS repository.\n * __MACRO_IMPORT__ `\u003cfilename\u003e`: Import a file from the current operating system into the sandbox. This is particulary useful for adopting network configuration (etc. /etc/resolv.conf)\n\n# License \n\nCernVM Environment Lite Scripts \nCopyright (C) 2015  Ioannis Charalampidis, PH-SFT, CERN\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavesoft%2Fcernvm-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwavesoft%2Fcernvm-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavesoft%2Fcernvm-lite/lists"}