tools/snapsync.git
6 years agoImprove submit tag generation 70/128270/6 master
Maciej Wereski [Mon, 8 May 2017 08:38:00 +0000 (10:38 +0200)]
Improve submit tag generation

Some projects use version in their name. Unfortunately there may be some
differences in branch name and project name on dowload server (e.g.
tizen_3.0_common branch and 3.0-common directory). Because of that all
dashes needs to be replaced with underscores when generating submit tag.

Change-Id: I72be4d8c2f1d41a1ed68902da189900c32cccdfb
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoRelease version 1.0.0 49/117849/9
Maciej Wereski [Tue, 7 Mar 2017 15:02:21 +0000 (16:02 +0100)]
Release version 1.0.0

Change-Id: If0aaae41a035d5f44c1e2689a1711092fcfbac52
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoAdd README 48/117848/8
Maciej Wereski [Tue, 7 Mar 2017 14:50:26 +0000 (15:50 +0100)]
Add README

Change-Id: Iecc1bdf8ffd6400f26b382b4b8f95e28a848f4ce
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoImplement pushing SR tags 47/117847/8
Maciej Wereski [Tue, 7 Mar 2017 14:47:45 +0000 (15:47 +0100)]
Implement pushing SR tags

Push utilizes ssh-agent to authenticate with server, so agent must be
running and have appropriate key added.

Change-Id: I0a0a0db618f40f84aa51a8137a5fcd1ee99bfc6b
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoImplement tagging 46/117846/8
Maciej Wereski [Tue, 7 Mar 2017 14:20:39 +0000 (15:20 +0100)]
Implement tagging

Tags were changed from lighweight to annotated tags, as SR tags must be
annotated. User name and e-mail is taken from git config. Also snapsync
is generating proper SR tag string if user hasn't given -tag option.

Change-Id: If6a5f053c200ec93658545d0c0c68007ef3e5530
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoAdd ssh username setting 45/117845/7
Maciej Wereski [Tue, 7 Mar 2017 13:38:51 +0000 (14:38 +0100)]
Add ssh username setting

Change-Id: I054d46a99f841c252387f1cf3a2f88d2674a904f
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoImplement "Add Remote" job 44/117844/7
Maciej Wereski [Tue, 7 Mar 2017 12:10:32 +0000 (13:10 +0100)]
Implement "Add Remote" job

Change-Id: Ib2867c3e36bf1acd7783aa0fb955a4b9dcfdb54a
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoAdd reporting, editing and ask user about actions 43/117843/7
Maciej Wereski [Tue, 7 Mar 2017 11:31:57 +0000 (12:31 +0100)]
Add reporting, editing and ask user about actions

Show report after doing comparison step. Ask user about proceeding.
User may also choose option to edit list of repositories to be
submitted. Editor setting from configuration file is used or $EDITOR if
setting is missing. Only repositories that may be synchronized (new and
outdated repositories) are shown in editor. User should only delete
unwanted repositories.

Change-Id: I17c0b6cc11c8fd2ab6f098c2a8ca4032178a8523
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoAdd support for ignoring blacklisted repositories 42/117842/7
Maciej Wereski [Tue, 7 Mar 2017 10:27:38 +0000 (11:27 +0100)]
Add support for ignoring blacklisted repositories

This change allows user to use blacklist file (default provided). Such
file is a list of regular expressions that describe git repositories
(one per line). Default blacklist file makes snapsync ignore profile
repositories.

Change-Id: I9c82ae82d7b17a4aeeccb18d1c3379a0a08cb37b
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoImplement comparison of commits 41/117841/7
Maciej Wereski [Fri, 3 Mar 2017 11:48:41 +0000 (12:48 +0100)]
Implement comparison of commits

Compare chronogically in terms of commit parent-child relation
between source and target commit. Result is saved in GitRepo.Status.
This information will be used to choose which repositories and
commits should be synchronized.

Change-Id: I08a8c4f26a2644712f72d9062055157349953425
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoUse configuration file 40/117840/6
Maciej Wereski [Fri, 3 Mar 2017 11:16:02 +0000 (12:16 +0100)]
Use configuration file

Snapsync will use ini-style configuration (with use of
go-ini package). Settings are divided in two sections:
* Repos - all settings for RPM and git repositories - i.e. addresses,
  profiles
* General - other settings (currently git manager settings)

Snapsync looks for config file in standard places (/etc/snapsync and
~/.snapsync/). Also user may use -config flag to point to other file.
Examplary file is provided.

Change-Id: I239aa3925f02b7aec6fe0f1e6887e2179ec3f7c1
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoAdd git job manager 39/117839/5
Maciej Wereski [Thu, 2 Mar 2017 14:57:05 +0000 (15:57 +0100)]
Add git job manager

gitManager will be used to run tasks on git repositories. It provides
few job types:
* verify - chronologically compares source and target commits
* add remote - adds requested remote to local git repository
* tag - applies requested tag on requested commit
* push - pushes requested tag to remote

All those tasks are run by set number of workers (by default equal to
number of available CPUs) in parallel. Communication is done via job and
error channels and method to cancel pending jobs is available.

Change-Id: I90c315747a4882f9e01f8428cf11d677236297da
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoAdd git repository data structures 38/117838/4
Maciej Wereski [Thu, 2 Mar 2017 12:17:39 +0000 (13:17 +0100)]
Add git repository data structures

These structures describe git repositories available in source/target
profiles and how HEADS in those profile relate to each other.

Change-Id: I26bb0711c85c997b8c609cfffe219b28c999ac38
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoDownload and parse profile XMLs 37/117837/3
Maciej Wereski [Wed, 1 Mar 2017 14:42:00 +0000 (15:42 +0100)]
Download and parse profile XMLs

With every snapshot few XML manifests are published. build.xml provides
information about published RPM repositories. Every RPM repository has
own XML manifest which contain information about git repositories and
respective commits used to build RPM packages.

Change-Id: I1cac5134c2551b53ce7595e4ed2dca7fd363d588
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
6 years agoAdd Apache 2.0 license 36/117836/3
Maciej Wereski [Tue, 21 Feb 2017 15:00:31 +0000 (16:00 +0100)]
Add Apache 2.0 license

Change-Id: Ibda4b62adbd06f4fa049b047af0f16abd686d0c1
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
8 years agoInitial empty repository
seonil kim [Thu, 21 Jan 2016 04:24:29 +0000 (20:24 -0800)]
Initial empty repository