-
Notifications
You must be signed in to change notification settings - Fork 0
cinolt/cyos
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
THIS SOFTWARE IS VERY INCOMPLETE INTRODUCTION - CYOS is a thin layer of package management for GNU/Linux with a focus on Git. - Some degree of intimacy with the usage of GNU/Linux and Git is assumed. - Instructions are provided to build a "core" set of packages and introduce the underlying concepts of CYOS. PREPARING CORE - Boot into an existing GNU/Linux host system. - The host must have reasonably recent versions of the packages listed in the file "core". - Prepare a reasonably large (20GiB+) filesystem. - Export the shell variable CYOSROOT to the absolute path of this filesystem. # cd "$CYOSROOT/" # git clone git://github.com/cinolt/cyos.git # cd cyos/ # mkdir git/ && cd git/ # for url in $(cat ../core-clone); do git clone --bare --depth 1 "$url"; done - "core-clone" contains URL's for the "core" packages with Git repositories. # cd .. # mkdir tar/ && cd tar/ # wget -i ../core-get - "core-get" contains URL's for the "core" packages with only release tarballs. # cd .. # mkdir work/ && cd work/ # for tar in ../tar/*; do tar xf "$tar" --no-same-owner; done # for work in *; do ../init.sh "$work"; done - "init.sh" initializes Git repositories from working directories. # cd ../git/ # for git in *; do ../apply.sh "$git"; done - "apply.sh" creates CYOS branches and applies diff's in the given repository. # cd .. # ./pkgio.sh - "pkgio.sh" builds and installs "pkgio/" into "$CYOSROOT/cyos/". # ./hier.sh - "hier.sh" creates essential directories and symlinks in "$CYOSROOT/". BUILDING CORE - We build "core" with "--prefix=$CYOSROOT/usr". - We chroot into "$CYOSROOT/" - We rebuild "core" with "--prefix=/usr". - We build binutils+gcc that do not search for libraries and headers belonging to the host. - We build the rest of the "core" using the built binutils+gcc. # TODO: set PATH # TODO: must make sure that host gcc uses host ld and as # for pkg in $(cat core); do ./pkg.sh "$pkg"; done - "pkg.sh" builds and installs the given package. - You may need to rebuild pkgio, binutils, or gcc if there are .so version mismatches between the host and CYOS, otherwise it is not necessary. - The CYOS filesystem now contains enough packages to rebuild itself when chroot'd into. - However the packages expect to be found in "$CYOSROOT/usr", which will appear as "/usr" post-chroot. - We rename "$CYOSROOT/usr" to "$CYOSROOT$CYOSROOT/usr" so the original "$CYOSROOT/usr" will appear the same. # mkdir "$CYOSROOT$CYOSROOT" # mv "$CYOSROOT/usr" "$CYOSROOT$CYOSROOT" # ./chroot.sh - "chroot.sh" does ... TODO - Leave the shell variable CYOSROOT unset. # TODO: set PATH # TODO: rebuild core - The "$CYOSROOT" directory (the variable as was set pre-chroot, but now in post-chroot) is no longer needed. - You should now prepare and build packages as appropriate for your new CYOS system. POST-CORE CONSIDERATIONS - For a bootable system you need to install a kernel, an init system, and configure a boot-loader as appropriate. INTERNALS - "pkgio/" contains 3 utilities: "pkgin", "pkgck" and "pkgout". - "pkgin" recursively link(2)'s all files in the source directory to the destination directory, mkdir(2)'ing along the way. - "pkgck" does the same as "pkgin" except it unlink(2)'s any successful link(2) and eventually rmdir(2)'s any successful mkdir(2), serving as a no-op to check for any obvious errors "pkgin" might encounter. - "pkgout" unlink(2)'s files in the destination directory for each file in the source directory recursively, rmdir(2)'ing along the way. - Every Git repository is to contain one or more "cyos-*" branches which alter the "master" branch as necessary. - The script "diff.sh" produces diff's between each "cyos-*" branch and the "master" branch in the given repository into corresponding subdirectories of "$CYOSROOT/cyos/diff/". - The script "apply.sh" applies these diffs into the corresponding repository. - Every "cyos-*" branch is to contain the script ".cyos/build.sh" which builds and installs the package into the corresponding subdirectory of "$CYOSROOT/cyos/pkg/". - "update.sh" updates a repository with a remote. - "update-tar.sh" updates a repository without a remote but with a release tarball. - Both update scripts rebase all "cyos-*" branches which can cause merge conflicts but should be seldom. - "work/" and "diff/" can be regenerated from data intrinsically stored in "git/". - "git/" can be backed up as is for future instances of CYOS.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published