Modify

Opened 5 years ago

Closed 2 weeks ago

Last modified 2 weeks ago

#6887 closed defect (fixed)

GitHub out of date

Reported by: simon04 Owned by: team
Priority: normal Milestone:
Component: unspecified Version:
Keywords: github mirror Cc: bastiK, wiktorn

Description

JOSM's GitHub mirror is out of date and hasn't been updated since Sept, 19, 2011.

Attachments (0)

Change History (17)

comment:1 Changed 5 years ago by olejorgenb

Any word on this?

comment:2 Changed 5 years ago by stoecker

This is no official part of JOSM. The responsible persons need to be contacted directly (whoever they are).

comment:3 Changed 5 years ago by stoecker

  • Cc bastiK added

comment:4 Changed 5 years ago by simon04

comment:5 Changed 5 years ago by bastiK

It is run by Ævar Arnfjörð Bjarmason, I also contacted him 2 days ago.

comment:6 Changed 5 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 3 years ago by akks

  • Resolution fixed deleted
  • Status changed from closed to reopened

The mirror is outdated again.

If we had fast-updating github mirror, we could also use Travis CI (automatic building and testing after each commit) and detect broken commits.

comment:9 Changed 3 years ago by simon04

Ticket #9483 has been marked as a duplicate of this ticket.

comment:10 Changed 3 years ago by simon04

  • Resolution set to fixed
  • Status changed from reopened to closed

Brought GitHub mirror back to life. Now, it runs on my personal VPS.

This git-svn thing isn't always easy, especially to reattach a Git clone to a SVN repository. Approximately, this is what I did (with the help of http://stackoverflow.com/a/13105418/205629):

git clone https://github.com/openstreetmap/josm.git
git fetch --all
git checkout master
git config svn-remote.svn.url http://josm.openstreetmap.de/svn/trunk
git config svn-remote.svn.fetch :refs/remotes/trunk
git update-ref refs/remotes/trunk c96225bf2118bd2bd4692b155e5f4575172f828c # corresponding to the latest commit of branch master
git svn fetch
git svn rebase

Now, I run the syncing in a cronjob

*/5 * * * * bash /home/simon/mirrors/openstreetmap-mirror/josm-mirror.sh >/dev/null 2>/dev/null

where josm-mirror.sh is from https://github.com/openstreetmap/openstreetmap-mirror with this modifications

  • josm-mirror.sh

    diff --git a/josm-mirror.sh b/josm-mirror.sh
    index 26e373e..b2c167f 100644
    a b  
    11#!/bin/bash -e
    22
     3cd ~/mirrors/josm/
     4
    35# Changes already pulled, merge them to the mirror branch
    46git branch mirror || :
    57git checkout mirror
    git config user.email "openstreetmap@v.nix.is" 
    1820git add .
    1921git commit -m"josm-mirror: bumped externals" || :
    2022
    21 # Evil revision hack
    22 perl -pi -e 's[<arg value="."/>][<arg value="http://josm.openstreetmap.de/svn/trunk"/>]g' build.xml
    23 git commit -m"josm-mirror: evil build.xml revision hack" build.xml || :
    24 
    2523# Push the mirror to GitHub
    26 git remote add mirror git@github.com:openstreetmap/josm.git || :
     24git remote add mirror git@github.com-josm:openstreetmap/josm.git || :
    2725
    2826# Push to our mirrors
    2927git push -v mirror master

comment:11 Changed 3 years ago by bastiK

This is great, thanks Simon!

comment:12 Changed 3 years ago by Don-vip

Thanks!

comment:13 Changed 3 years ago by simon04

The update wasn't running since I forgot the git svn commands … Here's the current diff against the openstreetmap-mirror repo:

  • josm-mirror.sh

    diff --git a/josm-mirror.sh b/josm-mirror.sh
    index 26e373e..31800d6 100644
    a b  
    11#!/bin/bash -e
    22
     3date -Is
     4
     5cd /home/simon/mirrors/josm/
     6
     7# Pull changes from Subversion
     8echo $ git checkout master
     9git checkout master
     10echo $ git svn fetch
     11git svn fetch
     12echo $ git svn rebase
     13git svn rebase
     14
    315# Changes already pulled, merge them to the mirror branch
     16echo $ git branch mirror
    417git branch mirror || :
     18echo $ git checkout mirror
    519git checkout mirror
    6 git merge master
     20echo '$ git merge master -m"Merge branch 'master' into mirror"'
     21git merge master -m"Merge branch 'master' into mirror"
    722
    823# Just do a plain copy of the externals into this repository.
     24echo $ svn export ....
    925svn export --force http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/bzip2                    src/org/apache/tools/bzip2   >/dev/null
    1026svn export --force http://svn.openstreetmap.org/applications/viewer/jmapviewer/src/org/openstreetmap/gui             src/org/openstreetmap/gui    >/dev/null
    1127svn export --force http://svn.openstreetmap.org/applications/share/map-icons/classic.small                           images/styles/standard       >/dev/null
    svn export --force http://svn.apache.org/repos/asf/commons/proper/codec/trunk/sr 
    1531git config user.name "JOSM GitHub mirror"
    1632git config user.email "openstreetmap@v.nix.is"
    1733
     34echo $ git add .
    1835git add .
     36echo '$ git commit -m"josm-mirror: bumped externals"'
    1937git commit -m"josm-mirror: bumped externals" || :
    2038
    21 # Evil revision hack
    22 perl -pi -e 's[<arg value="."/>][<arg value="http://josm.openstreetmap.de/svn/trunk"/>]g' build.xml
    23 git commit -m"josm-mirror: evil build.xml revision hack" build.xml || :
    24 
    2539# Push the mirror to GitHub
    26 git remote add mirror git@github.com:openstreetmap/josm.git || :
     40echo $ git remote add mirror git@github.com-josm:openstreetmap/josm.git
     41git remote add mirror git@github.com-josm:openstreetmap/josm.git || :
    2742
    2843# Push to our mirrors
     44echo $ git push -v mirror master
    2945git push -v mirror master
     46echo $ git push -v mirror mirror
    3047git push -v mirror mirror
     48
     49echo Done ...
     50echo

comment:14 Changed 2 years ago by Don-vip

The mirror is broken again :(

comment:15 Changed 2 weeks ago by simon04

  • Cc wiktorn added
  • Resolution fixed deleted
  • Status changed from closed to reopened
From: wiktorn
Date: Fri, Oct 28, 2016 at 8:32 PM
Subject: Github mirror not updated
To: josm-devel <josm-dev@openstreetmap.org>


Hi,

It looks like GitHub mirror of OSM is not updated any more. Last
update was on 21st of October.

What needs to be done to bring this service up?

Or shall I just setup my own sync service with my JOSM GitHub mirror?


Cheers,

Wiktor

From: simon04
Date: Sat, Oct 29, 2016 at 12:40 AM
Subject: Re: Github mirror not updated
To: wiktorn
Cc: josm-devel <josm-dev@openstreetmap.org>


Hi,

I run the mirror. The script is located here:
https://github.com/simon04/josm-mirror and see
https://josm.openstreetmap.de/ticket/6887 for earlier problems.

The cause for the current broken-ness is:
$ git svn rebase
Checksum mismatch: src/org/openstreetmap/josm/data/coor/EastNorth.java
77fca040915bef6c6fd77e43c35d952c684b9d3d
expected: e3c9169bad42e3154887b60a20bbea8b
     got: da2689e0e3989a6c2bc5b5449ad570eb

I'll try to resolve this asap (tomorrow evening?).

Simon

comment:16 follow-up: Changed 2 weeks ago by simon04

  • Resolution set to fixed
  • Status changed from reopened to closed

I revived the mirror using the commands from comment:10.

@team: In case you want your JOSM commits liked to your GitHub account, follow https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user

comment:17 in reply to: ↑ 16 Changed 2 weeks ago by wiktorn

Replying to simon04:

I revived the mirror using the commands from comment:10.

Great, many thanks.

@team: In case you want your JOSM commits liked to your GitHub account, follow https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user

Just to ease this for everybody. Email to add to GitHub profile is in format:
[username]@0c6e7542-c601-0410-84e7-c038aed88b3b

(for this mirror)

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.