[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4055-g4bebce2

Michael Adam obnox at samba.org
Mon Sep 8 12:46:43 GMT 2008


The branch, v3-devel has been updated
       via  4bebce268a430a537215b46947e37a8b0225e49d (commit)
       via  5354e420677eacd62a5297bc38d62cd6b53642b5 (commit)
       via  68ec025d06058bcd1c7050ee5d8f7232a3eb901a (commit)
       via  f1f3d1bef0440f4294f7278c0c38e13a10b6fb48 (commit)
       via  c6ff392778a75cc74db880fa3d657f5879ae55d5 (commit)
       via  cbfd805bd25a23299ef770687370dafebefe58d1 (commit)
       via  ab7575f5d29576518bd5593ec5bd58846b85d23d (commit)
      from  fc1b04df78fc0fb5bc59fa0120c0e29bbb3978a1 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-devel


- Log -----------------------------------------------------------------
commit 4bebce268a430a537215b46947e37a8b0225e49d
Author: Michael Adam <obnox at samba.org>
Date:   Mon Sep 8 14:09:41 2008 +0200

    packaging(RHEL-CTDB): add fix for versions containing "-" signs.
    
    Michael
    (cherry picked from commit 423105e29aaef449dbc40d124900a3f654b7266b)

commit 5354e420677eacd62a5297bc38d62cd6b53642b5
Author: Michael Adam <obnox at samba.org>
Date:   Mon Sep 8 13:11:17 2008 +0200

    packaging(RHEL-CTDB): extend and slightly reformat comment header block
    
    Michael
    (cherry picked from commit 1bfc8cc575cd84f24ceb6f6c5d13c9171c0895a5)

commit 68ec025d06058bcd1c7050ee5d8f7232a3eb901a
Author: Michael Adam <obnox at samba.org>
Date:   Mon Sep 8 13:08:18 2008 +0200

    packaging(RHEL-CTDB): unify and extend (C) header
    
    Michael
    (cherry picked from commit e051c1cbf7a993e3885c4a515e516da3574a1f57)

commit f1f3d1bef0440f4294f7278c0c38e13a10b6fb48
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 4 14:36:29 2008 +0200

    packaging(RHEL-CTDB): autodetect the samba version number from version.h
    
    Generate version.h first.
    Create samba.spec from (new) samba.spec.tmpl, replacing PVERSION
    by the version string. (as is done with update-pkginfo called
    from the create-tarball release script)
    
    Michael

commit c6ff392778a75cc74db880fa3d657f5879ae55d5
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 4 14:10:45 2008 +0200

    packaging(RHEL-CTDB): introduce variable TOPDIR
    
    Michael
    (cherry picked from commit 74e335ebf210c4812b0f790d05b697a183803af7)

commit cbfd805bd25a23299ef770687370dafebefe58d1
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 4 14:09:36 2008 +0200

    packaging(RHEL-CTDB): rename SPECDIR to RPMSPECDIR
    
    Michael
    (cherry picked from commit ac2b09b2274a12c34c446c4536793a33515958cc)

commit ab7575f5d29576518bd5593ec5bd58846b85d23d
Author: Michael Adam <obnox at samba.org>
Date:   Thu Sep 4 14:09:15 2008 +0200

    packaging(RHEL-CTDB): rename SRCDIR to RPMSRCDIR
    
    Michael
    (cherry picked from commit d8a8ea87439315ecf407a866a12e2993343af39c)

-----------------------------------------------------------------------

Summary of changes:
 packaging/RHEL-CTDB/makerpms.sh                    |   60 +++++++++++++++-----
 .../RHEL-CTDB/{samba.spec => samba.spec.tmpl}      |    2 +-
 2 files changed, 46 insertions(+), 16 deletions(-)
 rename packaging/RHEL-CTDB/{samba.spec => samba.spec.tmpl} (99%)


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/makerpms.sh b/packaging/RHEL-CTDB/makerpms.sh
index 485c810..219982f 100755
--- a/packaging/RHEL-CTDB/makerpms.sh
+++ b/packaging/RHEL-CTDB/makerpms.sh
@@ -1,30 +1,34 @@
 #!/bin/sh
 # Copyright (C) John H Terpstra 1998-2002
-#               Gerald (Jerry) Carter 2003
+# Copyright (C) Gerald (Jerry) Carter 2003
+# Copyright (C) Michael Adam 2008
+
+# Script to build RPMs for RHEL from inside a git checkout.
 
 # The following allows environment variables to override the target directories
 #   the alternative is to have a file in your home directory calles .rpmmacros
 #   containing the following:
 #   %_topdir  /home/mylogin/redhat
 #
-# Note: Under this directory rpm expects to find the same directories that are under the
-#   /usr/src/redhat directory
-#
+# Note: Under this directory rpm expects to find the same directories
+# that are under the /usr/src/redhat directory.
 
-# set DOCS_TARBALL to the path to a docs release tarball in .tar.bz2 format
+# Set DOCS_TARBALL to the path to a docs release tarball in .tar.bz2 format.
 
 # extra options passed to rpmbuild
 EXTRA_OPTIONS="$1"
 
-SPECDIR=`rpm --eval %_specdir`
-SRCDIR=`rpm --eval %_sourcedir`
+RPMSPECDIR=`rpm --eval %_specdir`
+RPMSRCDIR=`rpm --eval %_sourcedir`
 
-# At this point the SPECDIR and SRCDIR variables must have a value!
+# At this point the RPMSPECDIR and RPMSRCDIR variables must have a value!
 
 DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../..
+SRCDIR=${TOPDIR}/source
+VERSION_H=${SRCDIR}/include/version.h
 
 SPECFILE="samba.spec"
-VERSION=$(grep ^Version ${DIRNAME}/${SPECFILE} | sed -e 's/^Version:\ \+//')
 DOCS="docs.tar.bz2"
 RPMVER=`rpm --version | awk '{print $3}'`
 RPM="rpmbuild"
@@ -42,9 +46,35 @@ case $RPMVER in
        ;;
 esac
 
-pushd ${DIRNAME}/../..
+##
+## determine the samba version and create the SPEC file
+##
+pushd ${SRCDIR}
+./script/mkversion.sh
+popd
+if [ ! -f ${VERSION_H} ] ; then
+	echo "Error creating version.h"
+	exit 1
+fi
+
+VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING ${VERSION_H} | awk '{print $3}'`
+vendor_version=`grep SAMBA_VERSION_VENDOR_SUFFIX ${VERSION_H} | awk '{print $3}'`
+if test "x${vendor_version}"  != "x" ; then
+	VERSION="${VERSION}-${vendor_version}"
+fi
+VERSION=`echo ${VERSION} | sed 's/-/_/g'`
+VERSION=`echo ${VERSION} | sed 's/\"//g'`
+echo "VERSION: ${VERSION}"
+sed -e s/PVERSION/${VERSION}/g \
+	< ${DIRNAME}/${SPECFILE}.tmpl \
+	> ${DIRNAME}/${SPECFILE}
+
+##
+## create the tarball
+##
+pushd ${TOPDIR}
 echo -n "Creating samba-${VERSION}.tar.bz2 ... "
-git archive --prefix=samba-${VERSION}/ HEAD | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2
+git archive --prefix=samba-${VERSION}/ HEAD | bzip2 > ${RPMSRCDIR}/samba-${VERSION}.tar.bz2
 RC=$?
 popd
 echo "Done."
@@ -58,15 +88,15 @@ fi
 ## copy additional source files
 ##
 if [ "x${DOCS_TARBALL}" != "x" ] && [ -f ${DOCS_TARBALL} ]; then
-    cp ${DOCS_TARBALL} ${SRCDIR}/${DOCS}
+    cp ${DOCS_TARBALL} ${RPMSRCDIR}/${DOCS}
 fi
 
 pushd ${DIRNAME}
 
 chmod 755 setup/filter-requires-samba.sh
-tar --exclude=.svn -jcvf - setup > ${SRCDIR}/setup.tar.bz2
+tar --exclude=.svn -jcvf - setup > ${RPMSRCDIR}/setup.tar.bz2
 
-cp -p ${SPECFILE} ${SPECDIR}
+cp -p ${SPECFILE} ${RPMSPECDIR}
 
 popd
 
@@ -74,7 +104,7 @@ popd
 ## Build
 ##
 echo "$(basename $0): Getting Ready to build release package"
-pushd ${SPECDIR}
+pushd ${RPMSPECDIR}
 ${RPM} -ba $EXTRA_OPTIONS $SPECFILE
 if [ "x$?" = "x0" ] && [ `arch` = "x86_64" ]; then
     echo "Building 32 bit winbind libs"
diff --git a/packaging/RHEL-CTDB/samba.spec b/packaging/RHEL-CTDB/samba.spec.tmpl
similarity index 99%
rename from packaging/RHEL-CTDB/samba.spec
rename to packaging/RHEL-CTDB/samba.spec.tmpl
index 5f5edad..b34f01f 100644
--- a/packaging/RHEL-CTDB/samba.spec
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -5,7 +5,7 @@ Summary: Samba SMB client and server
 Vendor: Samba Team
 Packager: Samba Team <samba at samba.org>
 Name:         samba
-Version:      3.3.0
+Version:      PVERSION
 Release:      ctdb.1
 Epoch:        0
 License: GNU GPL version 3


-- 
Samba Shared Repository


More information about the samba-cvs mailing list