Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
.ci
 
 
 
 
 
 
 
 
 
 
 
 

mirror-elpa

(To) Mirror Emacs Lisp package archives. Used to create and maintain mirrors under Git repository.

Available mirrors:

Note that currently only GitLab and GitHub are supported out of box as a remote for the mirror. Though you can use mirror-elpa to maintain local mirror or mirror on any other Git hosting. See Usage section for more information.

Prerequisites

The following software must be installed on your system:

  • Git
  • Emacs
  • rsync

Usage

In order to use mirror-elpa script, you need to prepare configuration file. You can do it manually or use configure script provided by this repository. Example of configuration file:

mirror_path="$XDG_CACHE_HOME/elpa-mirror"
mirror_host="github.com"
mirror_owner="d12frosted"
mirror_repo="elpa-mirror"
access_login="$ACCESS_LOGIN"
access_token="$ACCESS_TOKEN"
commit_name="Golem"
commit_email="golem@d12frosted.io"
elpa_clone_path="$XDG_CACHE_HOME/elpa-clone"

function git_config_hook {
  git config commit.gpgsign false
}

Some explanations:

  1. mirror_path is location of mirror repository on your disk.
  2. mirror_host, mirror_owner and mirror_repo used to build url to your remote mirror repository. Repository URL is build like this:
    mirror_url="https://${access_login}:${access_token}@${mirror_host}/${mirror_owner}/${mirror_repo}.git"
        
  3. access_login is user with access to repository.
  4. access_token is password/secret/token that is used for authentication. On GitHub and GitLab you can create access tokens and use them (which is recommended).
  5. commit_name and commit_email used as committer information.
  6. elpa_clone_path is location of elpa_clone script for Emacs.

The configuration wizard is not maintained, but you can give it a try, as it should help you with token creation.

./configure

Using with CRON

$ ./configure
$ make install

You can also specify how often to sync mirror when running make install (defaults to every 4 hours) and location to resulting configuration file (defaults to $XDG_CONFIG_HOME/mirror-elpa.sh:

$ make install SCHEDULE="0 0 * * *" CONFIG_FILE="~/mirror-elpa.sh"

SCHEDULE can be set to any valid CRON expression.

Credits

About

(To) mirror Emacs Lisp Package Archive(s)

Resources

License

Stars

Watchers

Forks

Packages

No packages published