Previous: , Up: Package Manager   [Contents]


2.5 Rsync Repositories

Rsync repositories are simple to serve and simple to use. In the repository directory, there needs to be a ’.rsync’ file that points to the remote of the repository. This is used in order to fetch changes from the upstream. ’.rsync’ file looks like this for the core repository:

rsync://carbslinux.org/repo/core

Rsync repositories have some few distinctions when it comes to fetching them. They can be either synced individually or as a “root”. There are 2 important files, those are .rsync and .rsync_root. Here is the Carbs Linux rsync repository structure.

           /
   -----------------
  |                |
.rsync           core/
          ----------------
          |              |
        .rsync      .rsync_root

Unlike git repositories, they don’t have a defined “root” directory. This is both an advantage and a disadvantage. This way, we can sync individual repositories, but that also means we need extra files to define root directories and repository locations. Here is the content for each of these files:

/.rsync:           rsync://carbslinux.org/repo
/core/.rsync:      rsync://carbslinux.org/repo/core
/core/.rsync_root: ..

The .rsync_root file on the core repository points to the upper directory. If a .rsync file exists on the upper directory, this means that is the whole repository and will sync the entire repository instead of each individual repository.

If the upper directory doesn’t have this .rsync file, this means that this is an individual repository, and the package manager will fetch accordingly.