This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "theslinux-buildsystem". The branch, _utils has been updated via 5762862c6b5e0362708062b85412f9adfbe7eddd (commit) via e5c81c2705ef90288071433d9f9cba1e71c9d455 (commit) via 0e460b32d31288141f15a4c9f18b96bb6510d578 (commit) via 1a8091d015c7b382ff33e465c998cdab296cf576 (commit) from 47e65c539d37d47bcc29681545dc33fc06d04429 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5762862c6b5e0362708062b85412f9adfbe7eddd Author: Ky-Anh Huynh <kyanh@xxxxxxxxxxxxx> Date: Sat Aug 3 23:17:01 2013 +0700 Auto. check out :TheSmallBang to local dir. This branch is important to start/build package, and we can help developers to check it out automatically commit e5c81c2705ef90288071433d9f9cba1e71c9d455 Author: Ky-Anh Huynh <kyanh@xxxxxxxxxxxxx> Date: Sat Aug 3 23:08:21 2013 +0700 Use :TheSmallBang as default :TheBigBang is quite big, and we because it is big, it may make users confused. TheSmallBang is really simple, and its rules will never be out-of-date, and we do not need to merge/rebase. TheSmallBang is freeze, it should never be updated in any situation, while :TheBigBang is developed and it is used to provide the latest development guides. I do not why people call it the :Big. The space is too small, it can not be big. Let us give it a new name :) commit 0e460b32d31288141f15a4c9f18b96bb6510d578 Author: Ky-Anh Huynh <kyanh@xxxxxxxxxxxxx> Date: Sat Aug 3 22:50:16 2013 +0700 Clean up code to avoid nested block commit 1a8091d015c7b382ff33e465c998cdab296cf576 Author: Ky-Anh Huynh <kyanh@xxxxxxxxxxxxx> Date: Sat Aug 3 22:45:34 2013 +0700 _import_package: + notes and helps for newbie ----------------------------------------------------------------------- Summary of changes: _utils/run.sh | 136 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 78 insertions(+), 58 deletions(-) diff --git a/_utils/run.sh b/_utils/run.sh index 3938008..b77b4c4 100755 --- a/_utils/run.sh +++ b/_utils/run.sh @@ -42,11 +42,21 @@ _linecount() { # This is because ABS is in SVN structure, and the most # development stuff is in the directory `/trunk/` # -# ./ : where to import new package +# b/ : Similar to `a/`, but for :community packages +# +# ./ : where to import new package; this is often the root +# directory of the :builssystem. +# +# If you are new to our buildsystem, please try as below +# +# $ git clone https://github.com/TheSLinux/buildsystem.git +# $ cd buildsystem +# $ svn checkout --depth=empty svn://svn.archlinux.org/community b +# $ svn checkout --depth=empty svn://svn.archlinux.org/packages a +# +# You may use the "ABS" environment to specify list of directories +# where our script looks up for the Arch packages information. # - -_D_ABS="${ABS:-$PWD/a/ $PWD/b/}" # where to store ABS system - _import_package() { local _pkg="$1" # package name local _ds="" # path to package/trunk @@ -54,6 +64,7 @@ _import_package() { local _rev= # package revision (SVN) local _f_readme="$_dd/README.md" # the reade file local _pkgver= + local _D_ABS="${ABS:-$PWD/a/ $PWD/b/}" _msg ">> Trying to import package $_pkg <<" @@ -95,59 +106,58 @@ _import_package() { # We nee to be on the master before creating new branch git co master \ - && git co -b "$_pkg" "TheBigBang" \ - && { - cp -r "$_ds/" "$_dd/" - - # Generate the README.md - [[ -f "$_f_readme" ]] \ - || { - pushd "$PWD" - - cd "$_ds/" \ - && { - # Test if svn return any error - svn info >/dev/null 2>&1 \ - || { - _err "svn info failed to run in $_ds" - popd; return 1 - } - - svn update >/dev/null 2>&1 \ - || { - _err "svn update failed to run in $_ds" - popd; return 1 - } - - # Get the revision information - _rev="$(svn info | grep ^Revision: | head -1 | awk '{print $NF}')" - - # Readmin contents - { - echo "Import from ArchLinux's ABS" - echo "" - svn info \ - | grep -E "^(URL|Revision):" - } \ - > "$_f_readme" + && git co -b "$_pkg" "TheSmallBang" \ + || { + _err "Failed to switch to 'master' or to create new branch $_pkg" + return 1 + } + + cp -r "$_ds/" "$_dd/" + + # Generate the README.md + [[ -f "$_f_readme" ]] \ + || { + pushd "$PWD" + + cd "$_ds/" \ + && { + # Test if svn return any error + svn info >/dev/null 2>&1 \ + || { + _err "svn info failed to run in $_ds" + popd; return 1 } - popd + svn update >/dev/null 2>&1 \ + || { + _err "svn update failed to run in $_ds" + popd; return 1 + } + + # Get the revision information + _rev="$(svn info | grep ^Revision: | head -1 | awk '{print $NF}')" + + # Readmin contents + { + echo "Import from ArchLinux's ABS" + echo "" + svn info \ + | grep -E "^(URL|Revision):" + } \ + > "$_f_readme" } - # Genereate git commit - git add "$_dd" \ - && git commit "$_pkg/" -m"$_pkg: Import from ABS @ $_rev" \ - && git push origin "$_pkg" \ - && git branch --set-upstream-to="origin/$_pkg" \ - && git co master \ - && _fix_the_1st_tag_on_package_branch "$_pkg" \ - || { _err "Something wrong with git repository"; return 1; } - } \ - || { - _err "Failed to switch to 'master' or to create new branch $_pkg" - return 1 + popd } + + # Genereate git commit + git add "$_dd" \ + && git commit "$_pkg/" -m"$_pkg: Import from ABS @ $_rev" \ + && git push origin "$_pkg" \ + && git branch --set-upstream-to="origin/$_pkg" \ + && git co master \ + && _fix_the_1st_tag_on_package_branch "$_pkg" \ + || { _err "Something wrong with git repository"; return 1; } } # Import all packages provided in the arguments @@ -217,7 +227,7 @@ convert() { local _subject= # subject of a commit local _blacklist=" linux-g1 m17n-db m17n-db-vi " # some special packages as mentioned above - local _bigbang="TheBigBang" + local _bigbang="TheSmallBang" # This is where we create new branch for new package # Using a branch name is better here. local _f_tmp= # a temporary patch file. This won't hurt! @@ -349,7 +359,7 @@ _get_git_branch() { # Get the package name/feature from the working directory / branch. # -# The common rules (TheBigBang) says that the package branch would be +# The common rules (TheSmallBang) says that the package branch would be # the package name, and it's the same as the working directory. The work- # ing directory will play the main role. It is used to test if the branch # is the package branch or a feature branch of the package. @@ -490,7 +500,7 @@ _get_number_of_git_commits_between_two_points() { # # Note, on the branch `PACKAGE_BASE` we may have different kinds of tags: # temporary tag, release tag,...; we will list all tags and get one. To -# do that, we will (1) list all commits since `TheBigBang`, and (2) get +# do that, we will (1) list all commits since `TheSmallBang`, and (2) get # every tags associcated with those commit, and (3) find the good tag. # # The `good tag` matches the pattern `PACKAGE_BASE-x.y.z(-release)?` @@ -566,7 +576,7 @@ _get_git_tag_on_package_branch() { )" [[ -z "$_tag" ]] || { echo "$_tag"; return 0 ; } done < \ - <(_get_git_commits_between_two_points "TheBigBang" "$_br" --until="$_ref_time") + <(_get_git_commits_between_two_points "TheSmallBang" "$_br" --until="$_ref_time") _err "Failed to get tag from package branch '$_br'" } @@ -725,13 +735,13 @@ _fix_the_1st_tag_on_package_branch() { return 1 } _commit="$( \ - git log --pretty="format:%H" "TheBigBang".."$_br" -- | tail -1 ;\ + git log --pretty="format:%H" "TheSmallBang".."$_br" -- | tail -1 ;\ [[ ${PIPESTATUS[0]} -eq 0 && ${PIPESTATUS[1]} -eq 0 ]] || exit 1 \ )" \ || return 1 # Because the file `PKGBUILD` does exist in the branch, there is - # no way that `_commit` is empty (as `TheBigBang` and our branch + # no way that `_commit` is empty (as `TheSmallBang` and our branch # have a the same current commit. if _tag="$(git describe --tags --exact-match "$_commit" 2>/dev/null)"; then @@ -793,6 +803,15 @@ s-makepkg() { makepkg "$@" } +# Check out The{Small,Big}Bang to local working directory +# that is required to start and build new packages +# +# NOTE: TheBigBang should not be used for new package -- 2013 Aug 3rd +_git_bang_bang() { + { git branch | grep -q 'TheSmallBang' ; } \ + || git branch "TheSmallBang" "origin/TheSmallBang" +} + # `_s_env` will # # 1. Detect the package name from working environment @@ -840,6 +859,7 @@ _s_env() { local _pkg_feature= local _type="--reference" + _git_bang_bang || return 1 _pkg="$(_get_package_name)" || return 1 _pkg_feature="$(_get_package_feature)" || return 1 hooks/post-receive -- theslinux-buildsystem -- Purpose: Store commits, feeds from other projects Post: mailto:theslinux-phantom@xxxxxxxxxxxxx Archive, Gmane: http://theslinux.org/lists/phantom/ Subscribe: mailto:theslinux-phantom-request@xxxxxxxxxxxxx?Subject=subscribe Unsubscribe: mailto:theslinux-phantom-request@xxxxxxxxxxxxx?Subject=unsubscribe Other information: http://theslinux.org/lists (vi) or http://theslinux.org/lists/en (en) Support: mailto:theslinux-questions@xxxxxxxxxxxxx