Page MenuHome GnuPG

GitHub mirror out of date
Closed, ResolvedPublic

Description

Hi,

I use GitHub mirror in vcpkg ports (GnuPG, LibGcrypt, lib-gpgerror), however they seem out of sync since about June. Is this on purpose?

Event Timeline

No, our admin left us and took all scripts and docs with him. We need to set it up again. You better use this system anyway, patches etc on GitHib are not used.

werner triaged this task as Normal priority.Nov 15 2021, 7:43 AM
werner edited projects, added dev.gnupg.org, Feature Request; removed Bug Report.
werner claimed this task.
werner added a subscriber: jukivili.

@jukivili was so kind and does the mirroring now.

Here's mirroring script that is in place currently:

#!/bin/bash -e

###
### Setup:
###  - Local mirrors setup to "$HOME/mirrors/<repo>.git" directories.
###  - Each local mirror has remote 'origin' as source repository.
###  - Each local mirror has remote 'github' as destination repository.
###    - For example, project 'abc' from "git://somewhere/abc.git":
###      $ cd "$HOME/mirrors"
###      $ git clone --bare --mirror git://somewhere/abc.git abc.git
###      $ cd abc.git
###      $ git remote add github git@github.com:<project>/abc.git
###  - Optionally local mirror can have remote 'local' as addition local
###    repository (for caching purposes, to reduce network load, etc).
###  - Run this script from cronjob daily/weekly/etc to mirror source
###    'origin' repositories to destination 'github' repositories.
###

pushd "$HOME/mirrors" > /dev/null

for mirror_dir in *.git; do
  mirror="${mirror_dir/.git/}"

  echo "Processing $mirror_dir ..."

  pushd "$mirror_dir" > /dev/null

  ### fetch local repo if configured
  if git remote show local > /dev/null 2>&1 ; then
    git fetch -q local > /dev/null
  fi

  ### mirror fetch
  git fetch -q -p origin > /dev/null

  ### mirror push
  if git remote show github > /dev/null 2>&1 ; then
    git push -q --mirror github > /dev/null
  fi

  popd > /dev/null
done

popd > /dev/null