Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37480313
en ru br
Репозитории ALT
S:1.5.14-alt1
5.1: 1.5.2-alt1
4.1: 1.1.3-alt1
4.0: 1.1.3-alt1
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: girar-utils

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

pax_global_header00006660000000000000000000000064113020045260014503gustar00rootroot0000000000000052 comment=1f8b0f7988f76a40bb52e2f73bb7080e48df8471
girar-utils-1.5.3/000075500000000000000000000000001130200452600137515ustar00rootroot00000000000000girar-utils-1.5.3/.gear/000075500000000000000000000000001130200452600147455ustar00rootroot00000000000000girar-utils-1.5.3/.gear/rules000064400000000000000000000000071130200452600160170ustar00rootroot00000000000000tar: .
girar-utils-1.5.3/.gitignore000064400000000000000000000000041130200452600157330ustar00rootroot00000000000000*.1
girar-utils-1.5.3/Makefile000064400000000000000000000037641130200452600154230ustar00rootroot00000000000000#
# Copyright (C) 2006 Dmitry V. Levin <ldv@altlinux.org>
# Copyright (C) 2006 Alexey Gladkov <legion@altlinux.org>
# Copyright (C) 2006 Sir Raorn <raorn@altlinux.org>
# Copyright (C) 2006 Sergey Vlasov <vsu@altlinux.org>
#
# Makefile for the girar-utils project.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

PROJECT = girar-utils
VERSION = $(shell sed '/^Version: */!d;s///;q' girar-utils.spec)
PROGRAMS = girar-upload girar-find-package girar-remote girar-remote-uri girar-clone girar-import
auto_PROGRAMS = girar-client-sh-functions
MAN1PAGES = $(PROGRAMS:=.1)
TARGETS = $(MAN1PAGES) $(auto_PROGRAMS)

bindir = /usr/bin
datadir = /usr/share
mandir = $(datadir)/man
man1dir = $(mandir)/man1
DESTDIR =

HELP2MAN1 = env PATH=":$$PATH" help2man -N -s1 -S '$(PROJECT) $(VERSION)'
INSTALL = install
LN_S = ln -s
MKDIR_P = mkdir -p
TOUCH_R = touch -r
CP = cp -a

.PHONY: all install clean

all: $(TARGETS)

$(MAN1PAGES): $(auto_PROGRAMS)

%: %.in
sed \
-e 's,@VERSION@,$(VERSION),g' \
<$< >$@
$(TOUCH_R) $< $@
chmod --reference=$< $@

%.1: % %.1.inc
$(HELP2MAN1) -i $@.inc ./$< >$@

install: all
$(MKDIR_P) -m755 $(DESTDIR)$(bindir)
$(INSTALL) -p -m755 $(PROGRAMS) $(DESTDIR)$(bindir)/
$(INSTALL) -p -m644 $(auto_PROGRAMS) $(DESTDIR)$(bindir)/
$(MKDIR_P) -m755 $(DESTDIR)$(man1dir)
$(INSTALL) -p -m644 $(MAN1PAGES) $(DESTDIR)$(man1dir)/

clean:
$(RM) $(TARGETS) *~
girar-utils-1.5.3/girar-client-sh-functions.in000064400000000000000000000044471130200452600213100ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2008-2009 Alexey I. Froloff <raorn@altlinux.org>
#
# girar-client common shell functions.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

. shell-error
. shell-quote
. shell-args

PROG="${0##*/}"
PROG_VERSION='@VERSION@'

girar_config_option()
{
local var_name="$1" opt_name="$2" def_val="$3"
local val

val="$(git config --get "girar.$opt_name")" ||
val="$def_val"

eval "$var_name=\"$(quote_shell "$val")\""
}

girar_config_option girar_remote remote 'git.alt'
girar_config_option default_date_format date-format '--rfc-3339=date'

project_name_regexp='^[A-Za-z0-9][-A-Za-z0-9_.]+$'
user_name_regexp='^[a-z][a-z_0-9]+$'

prefix_packages()
{
local fmt='%s' dirname="${1%/*}"
[ "$dirname" != "$1" ] ||
fmt='packages/%s'
printf "$fmt" "$1"
}

add_git_suffix()
{
local arg="$1"
[ -z "${arg##*.git}" ] ||
arg="$arg.git"
printf %s "$arg"
}

validate_packages_dir()
{
local dir0 dirname dir
dir0="$(prefix_packages "$1")"; shift
dirname="${dir0%/*}"
[ "$dirname" = 'packages' -o "$dirname" = 'private' -o "$dirname" = 'public' ] ||
fatal "$dir0: invalid directory name"
dir="$(printf %s "${dir0##*/}" |sed -e 's,/\+$,,' -e 's,\.git$,,')"
printf %s "$dir" |egrep -qs "$project_name_regexp" ||
fatal "$dir0: invalid directory name"
printf %s\\n "$dirname/$dir"
}

remote_repo_path()
{
local path="$1" && shift
local user="${1-}"

path="$(validate_packages_dir "$path")"
path="$(add_git_suffix "$path")"

if [ -n "$user" ]; then
printf %s "$user" |egrep -qs "$user_name_regexp" ||
fatal "$user: invalid user name"

path="/people/$user/$path"
fi

printf %s\\n "$path"
}

run_remote_command()
{
ssh "$girar_remote" "$@"
}

girar-utils-1.5.3/girar-clone000075500000000000000000000056511130200452600161100ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

. girar-client-sh-functions

show_help()
{
cat <<EOF
Usage: $PROG [Options] <user>[,<user>...] <repository> [<directory>]

$PROG clones package from others' repository and sets up remotes for every
USERs.

$PROG uses the git configuration file. The following variables are read:

* girar.remote, corresponding to --remote;

Options:
-R,--remote=NAME girar server alias, defaults to git.alt;

-q,--quiet try to be more quiet;
-v,--verbose print a message for each action;
-V,--version print program version and exit;
-h,--help show this text and exit.

Report bugs to http://bugs.altlinux.ru/

EOF
exit
}

print_version()
{
cat <<EOF
$PROG version $PROG_VERSION
Written by Alexey I. Froloff <raorn@altlinux.org>

Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
exit
}

TEMP=`getopt -n $PROG -o R:,q,v,V,h \
-l remote:,quiet,verbose,version,help -- "$@"` ||
show_usage
eval set -- "$TEMP"

while :; do
case "$1" in
-R|--remote) shift; girar_remote="$1";;
-q|--quiet) quiet=-q;;
-v|--verbose) verbose=-v;;
-V|--version) print_version;;
-h|--help) show_help;;
--) shift; break;;
*) fatal "unrecognized option: $1";;
esac
shift
done

[ $# -eq 2 -o $# -eq 3 ] || show_usage

remote_users="$1" && shift
remote_path="$1" && shift
local_path="${1-}"

remote_path="$(remote_repo_path "$remote_path")"

[ -n "${remote_path##/*}" ] ||
fatal "\`$remote_path' is absolute"

if [ -z "$local_path" ]; then
local_path="${remote_path##*/}"
local_path="${local_path%.git}"
fi

[ ! -e "$local_path" ] ||
fatal "\`$local_path' already exists"

remote_user="${remote_users%%,*}"

path0="$(remote_repo_path "$remote_path" "$remote_user")"
run_remote_command clone "$path0" ||
fatal "Unable to clone remote package \`$path0'"

git clone "$girar_remote:$remote_path" "$local_path" ||
fatal "Unable to clone \`$girar_remote:$remote_path'"

cd "$local_path"
(IFS=,
for u in $remote_users; do
git remote add -f "$u" "$girar_remote:$(remote_repo_path "$remote_path" "$u")"
done)
girar-utils-1.5.3/girar-clone.1.inc000064400000000000000000000016561130200452600170150ustar00rootroot00000000000000.\" Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
.\"
.\" This file is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

[NAME]
girar-clone \- clone package from others' repository and set up remotes.

[SEE ALSO]
.BR git-config (1),
.BR git-remote (1),
.BR git-clone (1).
girar-utils-1.5.3/girar-find-package000075500000000000000000000054221130200452600173150ustar00rootroot00000000000000#!/bin/sh -fu
#
# Copyright (C) 2008 Mikhail Gusarov <dottedmag@dottedmag.net>
# Based on girar-upload (C) 2006 Alexey Gladkov <legion@altlinux.org>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

. gear-sh-functions
. girar-client-sh-functions

show_help()
{
cat <<EOF
Usage: $PROG [options] <pattern> [<date format>]

$PROG searches for a git repositories matching given pattern on
git.alt. Optional date format may be supplied to format "last update"
timestamps.

Date format should be in form understandable by date(1) and defaults to RFC 3339
'date' format.

$PROG uses the git configuration file. The following variables are read:

* girar.remote, corresponding to --remote;
* girar.date-format, corresponding to second argument;

Arguments and options take higher priority over the configuration file values.

Options:
-R,--remote=NAME girar server alias, defaults to git.alt;

-V,--version print program version and exit;
-h,--help show this text and exit.

Report bugs to http://bugzilla.altlinux.org/

EOF
exit
}

print_version()
{
cat <<EOF
$PROG version $PROG_VERSION
Written by Mikhail Gusarov <dottedmag@dottedmag.net>

Copyright (C) 2008 Mikhail Gusarov <dottedmag@dottedmag.net>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
exit
}

TEMP=`getopt -n $PROG -o R:,V,h \
-l remote:,version,help -- "$@"` ||
show_usage
eval set -- "$TEMP"

while :; do
case "$1" in
-R|--remote) shift; girar_remote="$1"
;;
-V|--version) print_version
;;
-h|--help) show_help
;;
--) shift; break
;;
*) fatal "unrecognized option: $1"
;;
esac
shift
done

pattern="${1-}" && shift && [ -n "$pattern" ] ||
fatal "No pattern given"

if [ -n "${1-}" ]; then
date_format="$1"
fi

if [ -n "${date_format-}" ]; then
date_format="+$date_format"
else
date_format="$default_date_format"
fi

run_remote_command find-package "$pattern" | while read repo date; do
printf '%s\t%s\n' "$repo" "$(date -d "@$date" "$date_format")"
done
girar-utils-1.5.3/girar-find-package.1.inc000064400000000000000000000016411130200452600202200ustar00rootroot00000000000000.\" Copyright (C) 2008 Mikhail Gusarov <dottedmag@dottedmag.net>
.\"
.\" This file is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

[NAME]
girar-find-package \- show repositories matching given pattern on
git.alt server.

[SEE ALSO]
.BR git-config (1),
.BR date (1).
girar-utils-1.5.3/girar-import000075500000000000000000000065361130200452600163250ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

. girar-client-sh-functions

show_help()
{
cat <<EOF
Usage: $PROG [Options] <repository> <package> [<target branch>]

$PROG imports package from girar server archive.

$PROG uses the git configuration file. The following variables are read:

* girar.remote, corresponding to --remote;

Options:
-R,--remote=NAME girar server alias, defaults to git.alt;
-G,--gears only try /gears/ hierarchy;
-S,--srpms only try /srpms/ hierarchy;
-u,--update update into current repository;

-q,--quiet try to be more quiet;
-v,--verbose print a message for each action;
-V,--version print program version and exit;
-h,--help show this text and exit.

Report bugs to http://bugs.altlinux.ru/

EOF
exit
}

print_version()
{
cat <<EOF
$PROG version $PROG_VERSION
Written by Alexey I. Froloff <raorn@altlinux.org>

Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
exit
}

TEMP=`getopt -n $PROG -o R:,G,S,u,q,v,V,h \
-l remote:,gears,srpms,update,quiet,verbose,version,help -- "$@"` ||
show_usage
eval set -- "$TEMP"

update=
gears=1
srpms=1
while :; do
case "$1" in
-R|--remote) shift; girar_remote="$1";;
-G|--gears) srpms=;;
-S|--srpms) gears=;;
-u|--update) update=1;;
-q|--quiet) quiet=-q;;
-v|--verbose) verbose=-v;;
-V|--version) print_version;;
-h|--help) show_help;;
--) shift; break;;
*) fatal "unrecognized option: $1";;
esac
shift
done

[ $# -eq 2 -o $# -eq 3 ] || show_usage
[ -n "$gears$srpms" ] ||
fatal "--gears and --srpms are mutually exclusive"

repo="$1" && shift
package="$1" && shift
branch="${1-master}"

ackage="${package#?}"
p="${package%$ackage}"

if [ -z "$update" ]; then
if git rev-parse --git-dir >/dev/null 2>&1; then
message "You are already inside git repository, maybe you wish to use --update?"
sleep 3
fi

mkdir "$package" ||
fatal "Unable to create directory \`$package'"

cd "$package" ||
fatal "Unable to change directory to \`$package'"

git init ||
fatal "Unable to initialize git repository"
fi

rc=1
if [ -n "$gears" ]; then
rc=0
git fetch $verbose $quiet -u "$girar_remote:/gears/$p/$package.git" "$repo:$branch" ||
rc=1
fi

if [ $rc != 0 -a -n "$srpms" ]; then
rc=0
git fetch $verbose $quiet -u "$girar_remote:/srpms/$p/$package.git" "$repo:$branch" ||
rc=1
fi

[ rc = 0 ] ||
fatal "Unable to fetch branch \`$repo' from archive"

git checkout $quiet "$branch" ||
fatal "Unable to checkout branch \`$repo'"
girar-utils-1.5.3/girar-import.1.inc000064400000000000000000000024461130200452600172250ustar00rootroot00000000000000.\" Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
.\"
.\" This file is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

[NAME]
girar-import \- import package from archive.

/imports package from girar server archive/
First it will try to fetch branch, that corresponds to binary repository
from \fB/gears/p/package.git\fR into \fI<target\ branch>\fR (defaults to \fBmaster\fR).
If that fails, \fB/srpms/p/package.git\fR is tried.
.PP
It is possible to update existing git repository with \-\-update option.
.PP
List of valid binary repositories may be obtained by command:
.PP
.RS 4
girar\-remote acl \-\-list
.RE

[SEE ALSO]
.BR git\-config (1).
girar-utils-1.5.3/girar-remote000075500000000000000000000035321130200452600162770ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

. girar-client-sh-functions

show_help()
{
cat <<EOF
Usage: $PROG [Options] <command> [<arguments>...]

$PROG execute command on git.alt server.

$PROG uses the git configuration file. The following variables are read:

* girar.remote, corresponding to --remote;

Options:
-R,--remote=NAME girar server alias, defaults to git.alt;

-V,--version print program version and exit;
-h,--help show this text and exit.

Report bugs to http://bugs.altlinux.ru/

EOF
exit
}

print_version()
{
cat <<EOF
$PROG version $PROG_VERSION
Written by Alexey I. Froloff <raorn@altlinux.org>

Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
exit
}

[ $# -gt 0 ] ||
show_usage

case "$1" in
-R|--remote)
shift
girar_remote="$1"
shift
;;
-R=*|--remote=*)
girar_remote="${1#*=}"
shift
;;
-h|--help)
show_help
;;
-V|--version)
print_version
;;
esac

run_remote_command "$@"
girar-utils-1.5.3/girar-remote-uri000075500000000000000000000041341130200452600170730ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

. girar-client-sh-functions

show_help()
{
cat <<EOF
Usage: $PROG [Options] <REPOSITORY> [<USER>]

$PROG shows full git URI for a given repository and user.

$PROG uses the git configuration file. The following variables are read:

* girar.remote, corresponding to --remote;

Options:
-R,--remote=NAME girar server alias, defaults to git.alt;

-V,--version print program version and exit;
-h,--help show this text and exit.

Report bugs to http://bugs.altlinux.ru/

EOF
exit
}

print_version()
{
cat <<EOF
$PROG version $PROG_VERSION
Written by Alexey I. Froloff <legion@altlinux.org>

Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
exit
}

TEMP=`getopt -n $PROG -o R:,V,h \
-l remote:,version,help -- "$@"` ||
show_usage
eval set -- "$TEMP"

while :; do
case "$1" in
-R|--remote) shift; girar_remote="$1";;
-V|--version) print_version;;
-h|--help) show_help;;
--) shift; break;;
*) fatal "unrecognized option: $1";;
esac
shift
done

[ "$#" -eq 1 -o "$#" -eq 2 ] ||
show_usage

remote_path="$1" && shift
user="${1-}"
remote_path="$(remote_repo_path "$remote_path" "$user")"

printf %s:%s\\n "$girar_remote" "$remote_path"
girar-utils-1.5.3/girar-remote-uri.1.inc000064400000000000000000000016251130200452600200010ustar00rootroot00000000000000.\" Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
.\"
.\" This file is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

[NAME]
girar-remote-uri \- show git URI for a given repository and user.

[SEE ALSO]
.BR git-config (1),
.BR git-ls-tags (1).
girar-utils-1.5.3/girar-remote.1.inc000064400000000000000000000015301130200452600171770ustar00rootroot00000000000000.\" Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
.\"
.\" This file is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

[NAME]
girar-remote \- execute command on remote git.alt server.
girar-utils-1.5.3/girar-upload000075500000000000000000000061431130200452600162710ustar00rootroot00000000000000#!/bin/sh -efu
#
# Copyright (C) 2006 Alexey Gladkov <legion@altlinux.org>
# Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

. gear-sh-functions
. girar-client-sh-functions

show_help()
{
cat <<EOF
Usage: $PROG [Options] [<repository> [<refspec>...]]

$PROG upload a new git repository to git.alt server.

$PROG uses the git configuration file. The following variables are read:

* girar.remote, corresponding to --remote;

Options:
-R,--remote=NAME girar server alias, defaults to git.alt;
-o,--origin=NAME use NAME instead of 'origin' to set up git remote;

-q,--quiet try to be more quiet;
-v,--verbose print a message for each action;
-V,--version print program version and exit;
-h,--help show this text and exit.

Report bugs to http://bugs.altlinux.ru/

EOF
exit
}

print_version()
{
cat <<EOF
$PROG version $PROG_VERSION
Written by Alexey Gladkov <legion@altlinux.org>

Copyright (C) 2006 Alexey Gladkov <legion@altlinux.org>
Copyright (C) 2009 Alexey I. Froloff <raorn@altlinux.org>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
exit
}

TEMP=`getopt -n $PROG -o R:,o:,q,v,V,h \
-l remote:,origin:,quiet,verbose,version,help -- "$@"` ||
show_usage
eval set -- "$TEMP"

origin="origin"
while :; do
case "$1" in
-R|--remote) shift; girar_remote="$1";;
-o|--origin) shift; origin="$1";;
-q|--quiet) quiet=-q;;
-v|--verbose) verbose=-v;;
-V|--version) print_version;;
-h|--help) show_help;;
--) shift; break;;
*) fatal "unrecognized option: $1";;
esac
shift
done

GIT_DIR="$(git rev-parse --git-dir)"
GIT_DIR="$(readlink -ev "$GIT_DIR")"
export GIT_DIR

if [ "$#" -gt 0 ]; then
remote_path="$1" && shift
else
# Poor man's basename(dirname())
remote_path="${GIT_DIR%.git}"
remote_path="${remote_path%/}"
remote_path="${remote_path##*/}"
fi

remote_path="$(remote_repo_path "$remote_path")"

run_remote_command init-db "$remote_path"||
fatal "unable to initialize remote repository \`$remote_path'"

remote="$girar_remote:$remote_path"

args=--all
refspec=
if [ "$#" -gt 0 ]; then
args=
refspec=1
fi

if ! git push $verbose $args "$remote" ${refspec+"$@"}; then
run_remote_command rm-db "$remote_path"
exit 1
fi

if ! git config "remote.$origin.url" >/dev/null; then
git remote add "$origin" "$remote"
fi

message "package uploaded to $remote"
girar-utils-1.5.3/girar-upload.1.inc000064400000000000000000000020661130200452600171750ustar00rootroot00000000000000.\" Copyright (C) 2006 Alexey Gladkov <legion@altlinux.org>
.\"
.\" This file is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

[NAME]
girar-upload \- upload a new git repository to git.alt

[ENVIRONMENT]
.TP
.B GIT_DIR
If the
.B GIT_DIR
environment variable is set then it specifies a path to use instead of
the default for the base of the repository.

[SEE ALSO]
.BR git-config (1),
.BR gear (1),
.BR git-push (1).
girar-utils-1.5.3/girar-utils.spec000064400000000000000000000116661130200452600171010ustar00rootroot00000000000000Name: girar-utils
Version: 1.5.3
Release: alt1

Summary: git.alt client utilities
License: GPL
Group: Development/Other
Packager: Dmitry V. Levin <ldv@altlinux.org>
BuildArch: noarch

Source: %name-%version.tar

BuildPreReq: gear, help2man

%description
This package contains client utilities for git.alt.

%prep
%setup

%build
%make_build

%install
%make_install install DESTDIR=%buildroot

%files
%_bindir/*
%_mandir/man?/*

%changelog
* Sat Nov 21 2009 Alexey I. Froloff <raorn@altlinux.org> 1.5.3-alt1
- girar-import: provide options to try import only from /gears/ or
/srpms/ hierarchy
- girar-upload: add --origin option to specify git remote name

* Thu Nov 19 2009 Alexey I. Froloff <raorn@altlinux.org> 1.5.2.1-alt1
- girar-clone, girar-import: -R requires argument
- girar-import: process -u/--update

* Sat Oct 17 2009 Alexey I. Froloff <raorn@altlinux.org> 1.5.2-alt1
- girar-import: reworked to import only one branch, added ability to
update existing repository
- girar-remote: fixed usage (closes: #20890)
- Updated manpage for girar-import (closes: #20823)

* Sat Jul 18 2009 Alexey I. Froloff <raorn@altlinux.org> 1.5.1-alt1
- New utility:
+ girar-import: clone package from girar archive.

* Sat Jun 27 2009 Alexey I. Froloff <raorn@altlinux.org> 1.5.0-alt1
- Global changes:
+ Configured ssh alias is required, dropped -u/-s/-p options
in favor of -R.
+ Use git-config to store utility options.
- New utilites:
+ girar-clone: clone other's repository from git.alt server.
+ girar-find-package: date formatting interfase to girar's
find-package command.
+ girar-remote: execute command on git.alt server.
+ girar-remote-uri: construct git URI out of directory name and
optional user name.

* Mon Apr 23 2007 Dmitry V. Levin <ldv@altlinux.org> 1.1.3-alt1
- girar-upload:
+ Changed to use git-config to save remote origin configuration.
+ Updated for current girar init-db interface.

* Wed Feb 28 2007 Dmitry V. Levin <ldv@altlinux.org> 1.1.2-alt1
- Renamed package: gear -> girar-utils.
This package will contain basic git.alt client utilities.

* Sat Dec 09 2006 Dmitry V. Levin <ldv@altlinux.org> 1.1.1-alt1
- gear-update-tag: Fix temporary directory removal (ldv).
- gear-update-tag: Treat "zip" directive as "tar" (raorn).
- gear: Implement suffix= option for tar-like rules (george).

* Wed Nov 22 2006 Dmitry V. Levin <ldv@altlinux.org> 1.1.0-alt1
- gear, gear-commit, gear-sh-functions.in:
Reworked to implement .gear-rules "tags:" directive and
.gear-tags directory support (vsu, raorn).
- gear-update-tag:
New utility, updates list of stored tags
in the package repository (vsu).
- gear-update-archive:
Avoid loss of source files due to .gitignore (vsu).
- gear-release:
Removed unneeded utility, the idea of release tags
seems to be dead-end (ldv).
- Renamed info() to msg_info() to avoid ambiguity and
unwanted package requirements (ldv).
- QUICKSTART.ru_RU.KOI8-R: Fix typos (#10229).
- gear-srpmimport:
Removed implicit requirement for --branch (ldv, #10274).
- gear:
Added keyword substitution in directory name (ldv, #10091).
Replaced deprecated "git-tar-tree" with "git-archive --format=tar" (ldv).
Implemented zip archive type support (raorn).
- gear-upload:
New utility to ease initial upload of git repositories to git.alt (legion).

* Thu Oct 05 2006 Dmitry V. Levin <ldv@altlinux.org> 1.0.3-alt1
- Update copyright information.
- Add fresh git-core to package requirements.
- gear:
+ Process exclude directives without warnings (vsu).
- gear-sh-functions.in:
+ Fix checks for multiple specfiles (vsu).
- gear-release:
+ Create tags in refs/releases/ directory (ldv).
- gear-update-archive:
+ Fix old source removal (ldv).
+ Fix check for untracked or modified files (legion).
+ Implement top directory update (legion).
+ Fix destination directory validation (legion).
+ Fix typos (vsu).
- gear-hsh-build:
+ more flexible hasher support (raorn).
+ also pass --repo option to hasher (raorn).
+ honor "target" option from hasher config (raorn).
+ use $GIT_DIR/$CWD if no repositories given (raorn).
- Makefile:
+ Specify the program source for man pages (vsu).
+ Remove boldface from the NAME section of man pages (vsu).
- gear.1.inc:
+ Document operating modes of gear (vsu).
+ Document current limitations of gear (vsu).
- gear-commit.1.inc:
+ Fix short description (ldv).
- gear-update-archive.1.inc, gear-update-directory.1.inc:
+ Fix typos (vsu).

* Fri Sep 08 2006 Dmitry V. Levin <ldv@altlinux.org> 1.0.2-alt1
- gear:
+ New option: --update-spec (legion).
- gear-commit:
+ New option: --spec (legion).
- gear-release:
+ New option: --create (legion).
- gear-update:
+ Rename to gear-update-archive (legion).
- gear-hsh-build:
+ New utility (raorn).

* Mon Aug 28 2006 Dmitry V. Levin <ldv@altlinux.org> 1.0.1-alt1
- gear-release: Fix typo in option handling (legion).
- gear-update: New utility (legion, ldv).

* Tue Aug 22 2006 Dmitry V. Levin <ldv@altlinux.org> 1.0.0-alt1
- Initial revision.
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin