pax_global_header00006660000000000000000000000064106127602570014520gustar00rootroot0000000000000052 comment=4e068add2be913f08d3e51528257d29365ec542d girar-utils-1.1.3/000075500000000000000000000000001061276025700137625ustar00rootroot00000000000000girar-utils-1.1.3/.gear-rules000064400000000000000000000000071061276025700160260ustar00rootroot00000000000000tar: . girar-utils-1.1.3/.gitignore000064400000000000000000000000041061276025700157440ustar00rootroot00000000000000*.1 girar-utils-1.1.3/Makefile000064400000000000000000000034541061276025700154300ustar00rootroot00000000000000# # Copyright (C) 2006 Dmitry V. Levin # Copyright (C) 2006 Alexey Gladkov # Copyright (C) 2006 Sir Raorn # Copyright (C) 2006 Sergey Vlasov # # 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 MAN1PAGES = $(PROGRAMS:=.1) TARGETS = $(MAN1PAGES) 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): $(ALIAS) %: %.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)/ $(MKDIR_P) -m755 $(DESTDIR)$(man1dir) $(INSTALL) -p -m644 $(MAN1PAGES) $(DESTDIR)$(man1dir)/ clean: $(RM) $(TARGETS) *~ girar-utils-1.1.3/girar-upload000075500000000000000000000064231061276025700163030ustar00rootroot00000000000000#!/bin/sh -efu # # Copyright (C) 2006 Alexey Gladkov # # 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 show_help() { cat < [] $PROG upload a new git repository to git.alt. Options: -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 < Copyright (C) 2006 Alexey Gladkov 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 q,v,V,h -l quiet,verbose,version,help -- "$@"` || show_usage eval set -- "$TEMP" while :; do case "$1" in -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 remote="${1-}" && shift && [ -n "$remote" ] || fatal "Where do you want to push ?" case "$remote" in rsync://*|https://*|http://*|ftp://*) fatal "${remote%%://*}: invalid protocol" ;; ssh://|*:*) ;; *) fatal "$remote: invalid repository" ;; esac remote_server="${remote#ssh://}" [ "$remote_server" != "$remote" ] && remote_server="${remote_server%%/*}" || remote_server="${remote_server%%:*}" remote_path="${remote#ssh://}" [ "$remote_path" != "$remote" ] && remote_path="/${remote_path#*/}" || remote_path="${remote_path#*:}" reponame="${remote_path##*/}" reponame="${reponame%.git}" subdir="${remote_path%.git}" subdir="${subdir%/$reponame}" [ "${subdir%.git}" != "$reponame" ] && subdir="${subdir##*/}" || subdir= remote_path="$(ssh "$remote_server" git-init-db "${subdir:+$subdir/}$reponame")" remote_path="$(printf %s "$remote_path" |sed -ne 's/^.*:\t\(.\+\)/\1/p')" [ -n "$remote_path" ] || remote_path="${subdir:+$subdir/}${reponame%.git}.git" args=--all refspec= if [ "$#" -eq 1 ]; then args= refspec="$1" shift fi if ! git-push $args "$remote_server:$remote_path" ${refspec:+"$refspec"}; then ssh "$remote_server" git-rm-db "$reponame.git" exit 1 fi if ! git-config remote.origin.url >/dev/null; then git-config remote.origin.url "$remote_server:$remote_path" git-config remote.origin.push "${refspec:-refs/heads/master:refs/heads/master}" fi girar-utils-1.1.3/girar-upload.1.inc000064400000000000000000000020421061276025700172000ustar00rootroot00000000000000.\" Copyright (C) 2006 Alexey Gladkov .\" .\" 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 gear (1), .BR git-push (1). girar-utils-1.1.3/girar-utils.spec000064400000000000000000000072451061276025700171100ustar00rootroot00000000000000Name: girar-utils Version: 1.1.3 Release: alt1 Summary: git.alt client utilities License: GPL Group: Development/Other Packager: Dmitry V. Levin BuildArch: noarch Source: %name-%version.tar BuildPreReq: gear, help2man %description This package contains client utilities for git.alt. %prep %setup -q %build %make_build %install %make_install install DESTDIR=%buildroot %files %_bindir/* %_mandir/man?/* %changelog * Mon Apr 23 2007 Dmitry V. Levin 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 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 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 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 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 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 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 1.0.0-alt1 - Initial revision.