]> TLD Linux GIT Repositories - packages/rpm-build-tools.git/blobdiff - builder
- changelog fix
[packages/rpm-build-tools.git] / builder
diff --git a/builder b/builder
index f634e610db43a24a848f2983a10728aa5252b113..10508500a333cb326bb62f112e2fd7537a65aee8 100755 (executable)
--- a/builder
+++ b/builder
@@ -97,7 +97,7 @@ BCOND=""
 GROUP_BCONDS="no"
 
 # create symlinks for tools in PACKAGE_DIR, see get_spec()
-SYMLINK_TOOLS="no"
+SYMLINK_TOOLS="yes"
 
 PATCHES=""
 SOURCES=""
@@ -118,8 +118,8 @@ WGET_RETRIES=${MAX_WGET_RETRIES:-0}
 CVS_FORCE=""
 CVSIGNORE_DF="yes"
 CVSTAG=""
-GIT_SERVER="git://git.pld-linux.org"
-GIT_PUSH="git@git.pld-linux.org"
+GIT_SERVER="git://git.tld-linux.org"
+GIT_PUSH="git@git.tld-linux.org"
 PACKAGES_DIR="packages"
 HEAD_DETACHED=""
 DEPTH=""
@@ -129,7 +129,7 @@ NEW_REPO=""
 
 RES_FILE=""
 
-DISTFILES_SERVER="://distfiles.pld-linux.org"
+DISTFILES_SERVER="://df.tld-linux.org"
 ATTICDISTFILES_SERVER="://attic-distfiles.pld-linux.org"
 
 DEF_NICE_LEVEL=19
@@ -452,7 +452,7 @@ insert_gitlog() {
        # * 1265749244 +0000 Random Hacker <nikt@pld-linux.org> 9370900
        git rev-list -${log_entries:-20} HEAD | while read sha1; do
                local logfmt='%B%n'
-               git notes list $sha1 &> /dev/null && logfmt=%N
+               git notes list $sha1 1>/dev/null 2>&1 && logfmt=%N
                git log -n 1 $sha1 --format=format:"* %ad %an <%ae> %h%n${logfmt}%n" --date=raw | sed '/^$/q'
        done > $gitlog
        LC_ALL=C gawk '/^\* /{printf("* %s %s\n", strftime("%a %b %d %Y", $2), substr($0, length($1)+length($2)+length($3)+4)); next}{print}' $gitlog > $speclog
@@ -943,7 +943,7 @@ find_mirror() {
        cd "$REPO_DIR"
        local url="$1"
        if [ ! -f "mirrors"  ] ; then
-               ln -s rpm-build-tools/mirrors .
+               ln -s scripts/mirrors .
        fi
 
        IFS="|"
@@ -2037,11 +2037,11 @@ init_rpm_dir() {
        mkdir -p $TOP_DIR $rpmdir $buildir $srpmdir
 
        cd "$TOP_DIR"
-       if [ ! -e ../rpm-build-tools ]; then
-               git clone  ${GIT_SERVER}/${PACKAGES_DIR}/rpm-build-tools.git ../rpm-build-tools
+       if [ ! -e ../scripts ]; then
+               git clone  ${GIT_SERVER}/${PACKAGES_DIR}/scripts.git ../scripts
        fi
        for a in adapter builder; do
-               ln -s ../rpm-build-tools/${a}.sh $a
+               ln -s ../scripts/${a}.sh $a
        done
        init_builder
 }
@@ -2365,6 +2365,16 @@ while [ $# -gt 0 ]; do
        esac
 done
 
+# Check if given package is available in TLD git
+if ! git ls-remote --heads ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME} 1>/dev/null 2>&1; then
+  # Nope, we don't have it in TLD, switch for PLD repositories
+  GIT_SERVER="git://git.pld-linux.org"
+  GIT_PUSH="git@git.pld-linux.org"
+  PACKAGES_DIR="packages"
+  DISTFILES_SERVER="://distfiles.pld-linux.org"
+  ATTICDISTFILES_SERVER="://attic-distfiles.pld-linux.org"
+fi
+
 if [ "$CVSTAG" ]; then
        # pass $CVSTAG used by builder to rpmbuild too, so specs could use it
        RPMOPTS="$RPMOPTS --define \"_cvstag $CVSTAG\""