From 0d13d326fc90b272de32f0cea6e096a378788849 Mon Sep 17 00:00:00 2001 From: JF Ding Date: Tue, 6 Dec 2011 18:58:20 +0800 Subject: [PATCH] rename project name to "gbs" git-build-system --- Makefile | 8 ++++---- README.rst | 14 +++++++------- data/build.sh | 14 +++++++------- data/packaging.sh | 10 +++++----- distfiles/debian/control | 4 ++-- distfiles/debian/copyright | 2 +- distfiles/debian/rules | 10 +++++----- distfiles/{tizenpkg.conf => gbs.conf} | 0 distfiles/{tizenpkg.dsc => gbs.dsc} | 4 ++-- distfiles/{tizenpkg.spec => gbs.spec} | 4 ++-- distfiles/{tizenpkg.yaml => gbs.yaml} | 2 +- {tizenpkg => gitbuildsys}/__init__.py | 2 +- {tizenpkg => gitbuildsys}/cmd_build.py | 0 {tizenpkg => gitbuildsys}/cmdln.py | 0 {tizenpkg => gitbuildsys}/conf.py | 2 +- {tizenpkg => gitbuildsys}/errors.py | 0 {tizenpkg => gitbuildsys}/git.py | 0 {tizenpkg => gitbuildsys}/msger.py | 0 {tizenpkg => gitbuildsys}/runner.py | 0 {tizenpkg => gitbuildsys}/srcserver.py | 0 {tizenpkg => gitbuildsys}/utils.py | 2 +- setup.py | 12 ++++++------ tools/{tizenpkg => gbs} | 30 +++++++++++++++--------------- 23 files changed, 60 insertions(+), 60 deletions(-) rename distfiles/{tizenpkg.conf => gbs.conf} (100%) rename distfiles/{tizenpkg.dsc => gbs.dsc} (83%) rename distfiles/{tizenpkg.spec => gbs.spec} (96%) rename distfiles/{tizenpkg.yaml => gbs.yaml} (96%) rename {tizenpkg => gitbuildsys}/__init__.py (96%) rename {tizenpkg => gitbuildsys}/cmd_build.py (100%) rename {tizenpkg => gitbuildsys}/cmdln.py (100%) rename {tizenpkg => gitbuildsys}/conf.py (99%) rename {tizenpkg => gitbuildsys}/errors.py (100%) rename {tizenpkg => gitbuildsys}/git.py (100%) rename {tizenpkg => gitbuildsys}/msger.py (100%) rename {tizenpkg => gitbuildsys}/runner.py (100%) rename {tizenpkg => gitbuildsys}/srcserver.py (100%) rename {tizenpkg => gitbuildsys}/utils.py (97%) rename tools/{tizenpkg => gbs} (86%) diff --git a/Makefile b/Makefile index c138cdd..8dec517 100644 --- a/Makefile +++ b/Makefile @@ -18,12 +18,12 @@ tag: git tag $(VERSION) dist-bz2: - git archive --format=tar --prefix=tizenpkg-$(TAGVER)/ $(TAG) | \ - bzip2 > tizenpkg-$(TAGVER).tar.bz2 + git archive --format=tar --prefix=gbs-$(TAGVER)/ $(TAG) | \ + bzip2 > gbs-$(TAGVER).tar.bz2 dist-gz: - git archive --format=tar --prefix=tizenpkg-$(TAGVER)/ $(TAG) | \ - gzip > tizenpkg-$(TAGVER).tar.gz + git archive --format=tar --prefix=gbs-$(TAGVER)/ $(TAG) | \ + gzip > gbs-$(TAGVER).tar.gz install: all python setup.py install --prefix=${PREFIX} diff --git a/README.rst b/README.rst index 1db3181..b3899f7 100644 --- a/README.rst +++ b/README.rst @@ -1,12 +1,12 @@ -======== -tizenpkg -======== ---------------------------------------------------- -The command line tools for Tizen package developers ---------------------------------------------------- +=== +gbs +=== +--------------------------------------------------------------------- +git-build-system: the command line tools for Tizen package developers +--------------------------------------------------------------------- :Copyright: GPLv2 :Manual section: 1 Overview ======== -The command line tools for Tizen package developers +git-build-system: the command line tools for Tizen package developers diff --git a/data/build.sh b/data/build.sh index 546afcd..83ba3e7 100644 --- a/data/build.sh +++ b/data/build.sh @@ -1,6 +1,6 @@ #!/bin/bash USAGE="usage: - tizenpkg build [target OBS project] + gbs build [target OBS project] Build package at remote build server, the default target OBS project is home::branches:Trunk @@ -50,11 +50,11 @@ fi # tar the local changes tar jcf package.tar.bz2 `git ls-files` -# get user name/passwd from tizenpkg.conf -user=$(tizenpkg cfg user) -passwd=$(tizenpkg cfg passwd) -HUDSON_SERVER=$(tizenpkg cfg src_server) -passwdx=$(tizenpkg cfg passwdx) +# get user name/passwd from gbs.conf +user=$(gbs cfg user) +passwd=$(gbs cfg passwd) +HUDSON_SERVER=$(gbs cfg src_server) +passwdx=$(gbs cfg passwdx) echo "Submiting your changes to build server" ret_string=$(curl -i -s -u$user:$passwd -Fname=package.tar.bz2 -Ffile0=@package.tar.bz2 -Fjson='{"parameter": [{"name": "package.tar.bz2", "file": "file0"},{"name":"pkg", "value":"'$prj_name'"},{"name":"parameters","value":"obsproject='$target_obsproject';passwdx='$passwdx'"}]}' -FSubmit=Build "$HUDSON_SERVER/job/build/build") @@ -63,7 +63,7 @@ echo $ret_string|grep '302' > /dev/null if [ $? != 0 ]; then echo $ret_string - die "Server Error, please check your tizenpkg configuration" + die "Server Error, please check your gbs configuration" fi sleep 2 diff --git a/data/packaging.sh b/data/packaging.sh index 0d4b6d9..96d326e 100644 --- a/data/packaging.sh +++ b/data/packaging.sh @@ -1,7 +1,7 @@ #!/bin/bash USAGE="Usage: - tizenpkg packaging [-s] [git-tag/commit-id] [-t release-tag] [-f specfile] + gbs packaging [-s] [git-tag/commit-id] [-t release-tag] [-f specfile] Packaging master branch, convert the files to release branch from the given tag or commit-id, by default using HEAD. @@ -209,7 +209,7 @@ get_srctar_md5sum() echo $string|grep '302' > /dev/null if [ $? != 0 ]; then echo $string - die "Server Error, please check your tizenpkg configuration." + die "Server Error, please check your gbs configuration." fi last_id=`curl -s -u$user:$passwd "$HUDSON_SERVER/job/srctar_md5sum/lastBuild/buildNumber"` @@ -315,9 +315,9 @@ if [ -z "$tag" ];then tag=$(git describe $git_obj --abbrev=0 --tags) fi -user=$(tizenpkg cfg user) -passwd=$(tizenpkg cfg passwd) -HUDSON_SERVER=$(tizenpkg cfg src_server) +user=$(gbs cfg user) +passwd=$(gbs cfg passwd) +HUDSON_SERVER=$(gbs cfg src_server) git_url=`git config remote.origin.url` echo $git_url|grep ^ssh > /dev/null diff --git a/distfiles/debian/control b/distfiles/debian/control index 6ad04b9..9207604 100644 --- a/distfiles/debian/control +++ b/distfiles/debian/control @@ -1,4 +1,4 @@ -Source: tizenpkg +Source: gbs Section: devel Priority: extra Maintainer: Jian-feng Ding @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 7.0.15), python-dev Standards-Version: 3.8.0 Homepage: http://www.tizen.org -Package: tizenpkg +Package: gbs Architecture: all Depends: ${misc:Depends}, ${python:Depends}, git-core, diff --git a/distfiles/debian/copyright b/distfiles/debian/copyright index e116bcd..6f4f4b5 100644 --- a/distfiles/debian/copyright +++ b/distfiles/debian/copyright @@ -14,7 +14,7 @@ Copyright: Copyright (C) 2011 Intel Inc. -Copyright for tizenpkg/cmdln.py: +Copyright for gitbuildsys/cmdln.py: Copyright (C) 2002-2005 ActiveState Corp. Copyright (C) Trent Mick diff --git a/distfiles/debian/rules b/distfiles/debian/rules index de8fc68..f45ef94 100755 --- a/distfiles/debian/rules +++ b/distfiles/debian/rules @@ -20,11 +20,11 @@ install: build dh_clean -k dh_installdirs # Installing package - mkdir -p $(CURDIR)/debian/tizenpkg /usr/bin - #make DESTDIR=$(CURDIR)/debian/tizenpkg installman - #make DESTDIR=$(CURDIR)/debian/tizenpkg installconf - #make DESTDIR=$(CURDIR)/debian/tizenpkg installsymlinks - python setup.py install --root=$(CURDIR)/debian/tizenpkg --prefix=/usr --install-layout=deb + mkdir -p $(CURDIR)/debian/gbs /usr/bin + #make DESTDIR=$(CURDIR)/debian/gbs installman + #make DESTDIR=$(CURDIR)/debian/gbs installconf + #make DESTDIR=$(CURDIR)/debian/gbs installsymlinks + python setup.py install --root=$(CURDIR)/debian/gbs --prefix=/usr --install-layout=deb binary-indep: build install dh_testdir diff --git a/distfiles/tizenpkg.conf b/distfiles/gbs.conf similarity index 100% rename from distfiles/tizenpkg.conf rename to distfiles/gbs.conf diff --git a/distfiles/tizenpkg.dsc b/distfiles/gbs.dsc similarity index 83% rename from distfiles/tizenpkg.dsc rename to distfiles/gbs.dsc index 3eedeba..4ded30e 100644 --- a/distfiles/tizenpkg.dsc +++ b/distfiles/gbs.dsc @@ -1,7 +1,7 @@ Format: 1.0 -Source: tizenpkg +Source: gbs Version: 0.1 -Binary: tizenpkg +Binary: gbs Maintainer: Jian-feng Ding Architecture: all Standards-Version: 3.7.1 diff --git a/distfiles/tizenpkg.spec b/distfiles/gbs.spec similarity index 96% rename from distfiles/tizenpkg.spec rename to distfiles/gbs.spec index fca94f0..269fa65 100644 --- a/distfiles/tizenpkg.spec +++ b/distfiles/gbs.spec @@ -6,7 +6,7 @@ # << macros %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -Name: tizenpkg +Name: gbs Summary: The command line tools for Tizen package developers Version: 0.1 Release: 1 @@ -15,7 +15,7 @@ License: GPLv2 BuildArch: noarch URL: http://www.tizen.org Source0: %{name}-%{version}.tar.gz -Source100: tizenpkg.yaml +Source100: gbs.yaml Requires: python >= 2.5 Requires: git-core Requires: curl diff --git a/distfiles/tizenpkg.yaml b/distfiles/gbs.yaml similarity index 96% rename from distfiles/tizenpkg.yaml rename to distfiles/gbs.yaml index ee04947..29ed354 100644 --- a/distfiles/tizenpkg.yaml +++ b/distfiles/gbs.yaml @@ -1,4 +1,4 @@ -Name: tizenpkg +Name: gbs Summary: The command line tools for Tizen package developers Version: 0.1 Release: 1 diff --git a/tizenpkg/__init__.py b/gitbuildsys/__init__.py similarity index 96% rename from tizenpkg/__init__.py rename to gitbuildsys/__init__.py index 4e3bbfa..d1433f5 100644 --- a/tizenpkg/__init__.py +++ b/gitbuildsys/__init__.py @@ -17,6 +17,6 @@ # Temple Place - Suite 330, Boston, MA 02111-1307, USA. """ -module for tizenpkg tool +module for gbs tool """ diff --git a/tizenpkg/cmd_build.py b/gitbuildsys/cmd_build.py similarity index 100% rename from tizenpkg/cmd_build.py rename to gitbuildsys/cmd_build.py diff --git a/tizenpkg/cmdln.py b/gitbuildsys/cmdln.py similarity index 100% rename from tizenpkg/cmdln.py rename to gitbuildsys/cmdln.py diff --git a/tizenpkg/conf.py b/gitbuildsys/conf.py similarity index 99% rename from tizenpkg/conf.py rename to gitbuildsys/conf.py index e407c52..eb6a921 100644 --- a/tizenpkg/conf.py +++ b/gitbuildsys/conf.py @@ -242,7 +242,7 @@ passwdx = $passwdx if not fpath: # use the default path - fpath = os.path.expanduser('~/.tizenpkg.conf') + fpath = os.path.expanduser('~/.gbs.conf') if not os.path.exists(fpath): if not self._new_conf(fpath): diff --git a/tizenpkg/errors.py b/gitbuildsys/errors.py similarity index 100% rename from tizenpkg/errors.py rename to gitbuildsys/errors.py diff --git a/tizenpkg/git.py b/gitbuildsys/git.py similarity index 100% rename from tizenpkg/git.py rename to gitbuildsys/git.py diff --git a/tizenpkg/msger.py b/gitbuildsys/msger.py similarity index 100% rename from tizenpkg/msger.py rename to gitbuildsys/msger.py diff --git a/tizenpkg/runner.py b/gitbuildsys/runner.py similarity index 100% rename from tizenpkg/runner.py rename to gitbuildsys/runner.py diff --git a/tizenpkg/srcserver.py b/gitbuildsys/srcserver.py similarity index 100% rename from tizenpkg/srcserver.py rename to gitbuildsys/srcserver.py diff --git a/tizenpkg/utils.py b/gitbuildsys/utils.py similarity index 97% rename from tizenpkg/utils.py rename to gitbuildsys/utils.py index 662e49e..a8824a3 100644 --- a/tizenpkg/utils.py +++ b/gitbuildsys/utils.py @@ -48,4 +48,4 @@ def strip_end(text, suffix): def get_share_dir(): # TODO need to be better - return '/usr/share/tizenpkg/' + return '/usr/share/gbs/' diff --git a/setup.py b/setup.py index f8e4e79..03bc551 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ try: except ImportError: pass -MOD_NAME = 'tizenpkg' +MOD_NAME = 'gitbuildsys' version_path = 'VERSION' if not os.path.isfile(version_path): @@ -43,14 +43,14 @@ if sys.version_info[:2] > (2, 5): except: pass -setup(name='tizenpkg', +setup(name='gbs', version = version, description='The command line tools for Tizen package developers', author='Jian-feng Ding, Huaxu Wan', author_email='jian-feng.ding@intel.com, huaxu.wan@intel.com', - url='http://git.tizen.org/', - scripts=['tools/tizenpkg'], - packages=['tizenpkg'], - data_files = [('/usr/share/tizenpkg', glob.glob('data/*'))], + url='https://git.tizen.org/', + scripts=['tools/gbs'], + packages=[MOD_NAME], + data_files = [('/usr/share/gbs', glob.glob('data/*'))], ) diff --git a/tools/tizenpkg b/tools/gbs similarity index 86% rename from tools/tizenpkg rename to tools/gbs index aa78bc5..d59ae9b 100755 --- a/tools/tizenpkg +++ b/tools/gbs @@ -20,9 +20,9 @@ import os, sys import io import ConfigParser -from tizenpkg.__version__ import VERSION -from tizenpkg import msger, cmdln, errors, utils, runner -from tizenpkg.conf import configmgr +from gitbuildsys.__version__ import VERSION +from gitbuildsys import msger, cmdln, errors, utils, runner +from gitbuildsys.conf import configmgr def _fall_to_shell(cmdname): def raw_wrapper(f): @@ -40,7 +40,7 @@ def _fall_to_shell(cmdname): runner.embed(cmdlist + list(argv)[1:]) return _run_embed_sh - cmdmod = 'tizenpkg.cmd_' + cmdname + cmdmod = 'gitbuildsys.cmd_' + cmdname try: __import__(cmdmod) return raw_wrapper @@ -49,17 +49,17 @@ def _fall_to_shell(cmdname): class TizenPkg(cmdln.Cmdln): """ - Usage: tizenpkg [GLOBAL-OPTS] SUBCOMMAND [OPTS] [ARGS...] + Usage: gbs [GLOBAL-OPTS] SUBCOMMAND [OPTS] [ARGS...] - tizenpkg - the command line tool for Tizen package developers - Try 'tizenpkg help SUBCOMAND' for help on a specific subcommand. + gbs - the command line tool for Tizen package developers + Try 'gbs help SUBCOMAND' for help on a specific subcommand. ${command_list} global ${option_list} ${help_list} """ - name = 'tizenpkg' + name = 'gbs' version = VERSION def get_optparser(self): @@ -85,12 +85,12 @@ class TizenPkg(cmdln.Cmdln): """${cmd_name}: test building for current pkg Usage: - tizenpkg build [OBS_project] + gbs build [OBS_project] ${cmd_option_list} """ - from tizenpkg import cmd_build as cmd + from gitbuildsys import cmd_build as cmd cmd.do(opts, args) @cmdln.alias("pk") @@ -101,12 +101,12 @@ class TizenPkg(cmdln.Cmdln): """${cmd_name}: prepare packaging files for current pkg Usage: - tizenpkg packaging + gbs packaging ${cmd_option_list} """ - from tizenpkg import cmd_packaging as cmd + from gitbuildsys import cmd_packaging as cmd cmd.do(opts, args) @_fall_to_shell('import') @@ -114,12 +114,12 @@ class TizenPkg(cmdln.Cmdln): """${cmd_name}: import new tarballs for current pkg Usage: - tizenpkg import + gbs import ${cmd_option_list} """ - from tizenpkg import cmd_import as cmd + from gitbuildsys import cmd_import as cmd cmd.do(opts, args) @cmdln.alias("cfg") @@ -129,7 +129,7 @@ class TizenPkg(cmdln.Cmdln): """${cmd_name}: query values of config file Usage: - tizenpkg getconfig [ ...] + gbs getconfig [ ...] ${cmd_option_list} """ -- 2.7.4