Modify

Opened 13 years ago

Closed 3 years ago

#6887 closed defect (fixed)

GitHub out of date

Reported by: simon04 Owned by: team
Priority: normal Milestone:
Component: Git mirror Version:
Keywords: github mirror hack-weekend-2018-10 Cc: bastiK, wiktorn, bafonins

Description

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

Attachments (0)

Change History (53)

comment:1 by olejorgenb, 13 years ago

Any word on this?

comment:2 by stoecker, 13 years ago

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

comment:3 by stoecker, 13 years ago

Cc: bastiK added

comment:5 by bastiK, 13 years ago

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

comment:6 by stoecker, 13 years ago

Resolution: fixed
Status: newclosed

comment:7 by akks, 10 years ago

Resolution: fixed
Status: closedreopened

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 by simon04, 10 years ago

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

comment:10 by simon04, 10 years ago

Resolution: fixed
Status: reopenedclosed

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 by bastiK, 10 years ago

This is great, thanks Simon!

comment:12 by Don-vip, 10 years ago

Thanks!

comment:13 by simon04, 10 years ago

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 by Don-vip, 10 years ago

The mirror is broken again :(

comment:15 by simon04, 7 years ago

Cc: wiktorn added
Resolution: fixed
Status: closedreopened
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 by simon04, 7 years ago

Resolution: fixed
Status: reopenedclosed

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

in reply to:  16 comment:17 by wiktorn, 7 years ago

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)

comment:18 by wiktorn, 7 years ago

Resolution: fixed
Status: closedreopened

Once again synchronization stopped working :-/

comment:19 by stoecker, 7 years ago

Maybe we should move the mirror script to JOSM server?

comment:20 by Don-vip, 7 years ago

Simon, is there something we can do to help?

comment:21 by simon04, 7 years ago

Resolution: fixed
Status: reopenedclosed

Sorry, for the long delay. I haven't had time to read through all JOSM Trac mails. Feel free to mail me personally.

The mirror should be up again. I wouldn't mind getting rid of the mirroring process. IMO it will always remain hacky unless we get rid of all SVN externals (and obtain build dependencies using Apache Ivy or similar) or switch to Git completely.

in reply to:  21 comment:22 by wiktorn, 7 years ago

It looks like some externals are missing in Git mirror:
e.g:
https://github.com/openstreetmap/josm/tree/mirror/src/org/apache/commons/compress/

Is missing utils. Maybe it's worth to review all externals.

Replying to simon04:

switch to Git completely.

+1 for switching to Git from me :-)

comment:23 by michael2402, 7 years ago

Resolution: fixed
Status: closedreopened

Last github sync was on April 11.

And by the way, +1 for getting rid of the build dependencies (which would probably start a new which-depencency-management-system-is-best war)

comment:24 by simon04, 7 years ago

Resolution: fixed
Status: reopenedclosed

I brought the mirror back to life, again. Did not investigate what caused the problem. I strongly hope that we can get rid of this hacky mirroring process, eventually.

comment:25 by simon04, 7 years ago

Cc: bafonins added
Resolution: fixed
Status: closedreopened

Via mail from bafonins:

I prefer using git instead of svn and till this moment it worked fine, but after the latest merge from the main repository to my fork I am not able to build the project. This is what I get :

compile:
    [javac] Compiling 378 source files to /Users/bafonins/Projects/josm2/build
    [javac] Projects/josm2/src/org/apache/commons/compress/compressors/lzw/LZWInputStream.java:25: error: cannot find symbol
    [javac] import org.apache.commons.compress.MemoryLimitException;
    [javac]                                   ^
    [javac]   symbol:   class MemoryLimitException
    [javac]   location: package org.apache.commons.compress
    [javac] Projects/josm2/src/org/apache/commons/compress/compressors/lzw/LZWInputStream.java:124: error: cannot find symbol
    [javac]             throws MemoryLimitException {
    [javac]                    ^
    [javac]   symbol:   class MemoryLimitException
    [javac]   location: class LZWInputStream
    [javac] Projects/josm2/src/org/apache/commons/compress/compressors/lzw/LZWInputStream.java:133: error: cannot find symbol
    [javac]                 throw new MemoryLimitException(memoryUsageInKb, memoryLimitInKb);
    [javac]                           ^
    [javac]   symbol:   class MemoryLimitException
    [javac]   location: class LZWInputStream
    [javac] Note: Projects/josm2/src/oauth/signpost/AbstractOAuthProvider.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 3 errors

comment:26 by simon04, 7 years ago

Resolution: fixed
Status: reopenedclosed

The SVN externals have changed. Updated the mirroring code https://github.com/simon04/josm-mirror/commit/35c2c2e5b7abc0f0463c836e0489983bfbab4a36. Starting with this commit, https://github.com/openstreetmap/josm/commit/2f9a23ea744bce42c33ee52aaf82135732d0950f, the build should be working again.

comment:27 by Don-vip, 7 years ago

Ah sorry, didn't realize it would break the git mirror. I will make a PR if I have to change externals again.

comment:28 by Don-vip, 6 years ago

Resolution: fixed
Status: closedreopened

https://github.com/openstreetmap/josm-plugins is broken (no update since november). Can you please look into it? Or tell me how to solve it :)

comment:29 by Don-vip, 6 years ago

Component: unspecifiedGit mirror

comment:30 by floscher, 6 years ago

https://github.com/openstreetmap/josm is also no longer updated for 8 days now.

comment:31 by stoecker, 6 years ago

Can you make the mirror script available for hostong on JOSM server or whereever necessary?

comment:32 by stoecker, 6 years ago

If we can't get the mirror active again it should be disabled.

Last edited 6 years ago by stoecker (previous) (diff)

in reply to:  31 comment:33 by wiktorn, 6 years ago

Replying to stoecker:

Can you make the mirror script available for hostong on JOSM server or whereever necessary?

Isn't this the mirroring script:
https://github.com/openstreetmap/openstreetmap-mirror/blob/master/josm-mirror.sh

or this:
https://github.com/simon04/josm-mirror/blob/master/josm-mirror.sh

(just by reading the history of this ticket)

comment:34 by stoecker, 6 years ago

Fine. That's a start.

@Vincent: Can we move the mirror from openstreetmap to JOSM organization?

Last edited 6 years ago by stoecker (previous) (diff)

comment:35 by stoecker, 6 years ago

Or maybe recreate it and already name it "josmmirror"?

comment:36 by simon04, 6 years ago

Sorry, I overlooked the notification. Feel free to message me directly next time.

The mirroring broke due to (1) the switch from http://josm.openstreetmap.de/svn/trunk to https://josm.openstreetmap.de/svn/trunk and (2) the inclusion of windows/plugins/stdutils.

I updated the URL following https://stackoverflow.com/a/268767. The JOSM mirror is up again. I'll look into the josm-plugins mirror next.

comment:37 by stoecker, 6 years ago

Could you please make the current mirror script and also the initial setup available (i.e. documentation). I'd still like to make the mirror from JOSM server, so that JOSM admins can fix issues.

comment:38 by simon04, 6 years ago

The scripts plus all documentation I have is here: https://github.com/simon04/josm-mirror. Some additional information can be found in my comment:10.

comment:39 by wiktorn, 6 years ago

Looks like mirror script stopped at [13698]

comment:40 by simon04, 6 years ago

The mirror is up again. Due to an existing .git/index.lock, all mirroring Git commands failed.

comment:41 by Don-vip, 6 years ago

The mirror branch works fine but it seems svn:externals fail for master.

comment:42 by Don-vip, 6 years ago

Keywords: hack-weekend-2018-10 added

When we switch to git this issue will finally be gone :)

comment:43 by Don-vip, 5 years ago

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

comment:44 by Don-vip, 5 years ago

According to #17937 mirror stopped at May 25th.

comment:45 by anonymous, 5 years ago

Hi, this issue is still not solved. The mirror was not updated since May 25th, unless I'm missing something?

comment:46 by mkoniecz, 5 years ago

Hi, this issue is still not solved.

And that is why this issue remains open. All open issues are not solved, JOSM bug tracker has more than 1700 of them - https://josm.openstreetmap.de/query?status=assigned&status=needinfo&status=new&status=reopened&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&col=time&desc=1&order=id&report=4

If you want to help with some it is really welcomed, but useless +1 posts are useless and actually decrease chance of someone deciding to work on it.

The mirror was not updated since May 25th, unless I'm missing something?

See comment above yours.

comment:47 by anonymous, 5 years ago

Thanks for the answer. How can I help working on this issue then? Is there any kind of log or error message I could look at to understand what's going on?

From what I see on https://github.com/openstreetmap/openstreetmap-mirror/blob/master/cronjobs, the josm mirroring is done with the svn-mirror script instead of the josm-mirror script. Is that expected? Also the script doesn't seem to be executable after cloning.

comment:48 by anonymous, 5 years ago

I just found this: https://hub.docker.com/r/crazymax/svn2git-mirror Something like that wouldn't help?

comment:49 by simon04, 4 years ago

Resolution: fixed
Status: reopenedclosed

I fixed the mirror again (the last time?):

Please enjoy and let's dream of a future where JOSM's source code is hosted on Git only.

comment:50 by Don-vip, 4 years ago

Thank you Simon :)

comment:51 by simon04, 4 years ago

With the newly introduced git sparse-checkout one can clone a minimal JOSM git repository:

$ git clone --filter=blob:none --sparse https://github.com/openstreetmap/josm.git
$ cd josm/
$ git sparse-checkout add src nodist resources scripts tools

$ du -sh .; du -sh .git
164M    .
60M     .git

$ ant
...
BUILD SUCCESSFUL

comment:52 by floscher, 4 years ago

Resolution: fixed
Status: closedreopened

comment:53 by simon04, 3 years ago

Resolution: fixed
Status: reopenedclosed

Fixed via #20126.

Modify Ticket

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

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.