[Ocfs2-tools-commits] jlbec commits r1349 - in trunk: . vendor
vendor/common vendor/rhel4 vendor/rhel5 vendor/sles10 vendor/sles9
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed May 2 15:02:17 PDT 2007
Author: jlbec
Date: 2007-05-02 15:02:12 -0700 (Wed, 02 May 2007)
New Revision: 1349
Added:
trunk/Vendor.make
trunk/mbvendor.m4
trunk/svnrev.guess
trunk/vendor.guess
trunk/vendor/common/Vendor.make
trunk/vendor/common/ocfs2-tools.spec-generic.in
trunk/vendor/rhel4/
trunk/vendor/rhel4/Makefile
trunk/vendor/rhel4/Vendor.make
trunk/vendor/rhel4/rpmarch.guess
trunk/vendor/rhel4/vendor.guess
trunk/vendor/rhel5/
trunk/vendor/rhel5/Makefile
trunk/vendor/rhel5/Vendor.make
trunk/vendor/rhel5/rpmarch.guess
trunk/vendor/rhel5/vendor.guess
trunk/vendor/sles10/
trunk/vendor/sles10/Makefile
trunk/vendor/sles10/Vendor.make
trunk/vendor/sles10/rpmarch.guess
trunk/vendor/sles10/vendor.guess
trunk/vendor/sles9/
trunk/vendor/sles9/Makefile
trunk/vendor/sles9/Vendor.make
trunk/vendor/sles9/rpmarch.guess
trunk/vendor/sles9/vendor.guess
Removed:
trunk/vendor/common/ocfs2-tools.spec.in
Modified:
trunk/
trunk/Config.make.in
trunk/Makefile
trunk/aclocal.m4
trunk/configure.in
trunk/vendor/Makefile
trunk/vendor/common/
trunk/vendor/common/Makefile
Log:
Introduce the vendor tree code to ocfs2-tools. This allows us to build on
multiple vendors with properly defined SRPMs. You don't have to --define
some switches anymore.
"make rpm" and "make packages" now work.
Also include the VENDOR_EXTENSION with the RPM release number.
Signed-off-by: smushran
Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
- cscope.*
*.a
stamp-md5
configure
Config.make
config.*
autom4te.cache
aclocal.m4
ocfs2-tools-*.src.rpm
ocfs2-tools-*.tar.gz
build-stamp
*.pc
+ cscope.*
*.a
stamp-md5
configure
Config.make
config.*
autom4te.cache
aclocal.m4
ocfs2-tools-*.src.rpm
ocfs2-tools-*.tar.gz
build-stamp
*.pc
.*.sw?
Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/Config.make.in 2007-05-02 22:02:12 UTC (rev 1349)
@@ -2,7 +2,6 @@
VERSION = @VERSION@
DIST_VERSION = @DIST_VERSION@
-RPM_VERSION = @RPM_VERSION@
MAJOR_VERSION = @MAJOR_VERSION@
MINOR_VERSION = @MINOR_VERSION@
@@ -48,6 +47,8 @@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
+VENDOR = @VENDOR@
+
COM_ERR_CFLAGS = @COM_ERR_CFLAGS@
COM_ERR_LIBS = @COM_ERR_LIBS@
UUID_LIBS = @UUID_LIBS@
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/Makefile 2007-05-02 22:02:12 UTC (rev 1349)
@@ -20,12 +20,6 @@
COMPILE_PY = 1
endif
-TOOLSARCH = $(shell $(TOPDIR)/rpmarch.guess tools $(TOPDIR))
-
-ifeq ($(TOOLSARCH),error)
-$(error could not detect architecture for tools)
-endif
-
SUBDIRS = libo2dlm libo2cb libocfs2 fsck.ocfs2 mkfs.ocfs2 mounted.ocfs2 tunefs.ocfs2 debugfs.ocfs2 o2cb_ctl ocfs2_hb_ctl mount.ocfs2 listuuid sizetest extras patches
ifdef BUILD_OCFS2CDSL
@@ -76,6 +70,7 @@
aclocal.m4 \
blkid.m4 \
glib-2.0.m4 \
+ mbvendor.m4 \
python.m4 \
pythondev.m4 \
runlog.m4 \
@@ -86,6 +81,9 @@
install-sh \
mkinstalldirs \
rpmarch.guess \
+ svnrev.guess \
+ Vendor.make \
+ vendor.guess \
documentation/ocfs2_faq.txt \
documentation/users_guide.txt \
documentation/samples/cluster.conf \
@@ -121,11 +119,8 @@
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/$$p; \
done
-srpm: dist
- $(RPMBUILD) -bs --define "_sourcedir $(RPM_TOPDIR)" --define "_srcrpmdir $(RPM_TOPDIR)" --define "pygtk_name $(PYGTK_NAME)" --define "pyversion $(PYVERSION)" --define "chkconfig_dep $(CHKCONFIG_DEP)" --define "compile_py $(COMPILE_PY)" $(TOPDIR)/vendor/common/ocfs2-tools.spec
-rpm: srpm
- $(RPMBUILD) --rebuild --define "pygtk_name $(PYGTK_NAME)" --define "pyversion $(PYVERSION)" --define "chkconfig_dep $(CHKCONFIG_DEP)" --define "compile_py $(COMPILE_PY)" $(TOOLSARCH) "ocfs2-tools-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
+include Vendor.make
def:
@echo $(TOOLSARCH)
Added: trunk/Vendor.make
===================================================================
--- trunk/Vendor.make 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/Vendor.make 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+
+#
+# This Makefile snippet is to be included in Makebo Makefiles that
+# use the mbvendor infrastructure
+#
+
+PKG_VERSION = $(shell $(TOPDIR)/svnrev.guess $(PACKAGE))
+
+-include $(TOPDIR)/vendor/$(shell ./vendor.guess)/Vendor.make
+
Modified: trunk/aclocal.m4
===================================================================
--- trunk/aclocal.m4 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/aclocal.m4 2007-05-02 22:02:12 UTC (rev 1349)
@@ -4,3 +4,4 @@
m4_include([python.m4])
m4_include([pythondev.m4])
m4_include([blkid.m4])
+m4_include([mbvendor.m4])
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/configure.in 2007-05-02 22:02:12 UTC (rev 1349)
@@ -12,9 +12,6 @@
MICRO_VERSION=5
EXTRA_VERSION=
-# Adjust this only to bump the RPM packaging version
-RPM_VERSION=1
-
DIST_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
if test -z "$EXTRA_VERSION"; then
VERSION=$DIST_VERSION
@@ -29,7 +26,6 @@
AC_SUBST(DIST_VERSION)
AC_SUBST(VERSION)
-AC_SUBST(RPM_VERSION)
AC_CANONICAL_HOST
@@ -53,6 +49,8 @@
AC_HEADER_STDC
AC_C_CONST
+MB_VENDOR(VENDOR)
+
if test "x$GCC" != "xyes"; then
AC_MSG_ERROR(GCC is required)
fi
@@ -218,7 +216,7 @@
ocfs2cdsl/ocfs2cdsl.8
ocfs2console/ocfs2console.8
tunefs.ocfs2/tunefs.ocfs2.8
-vendor/common/ocfs2-tools.spec
+vendor/common/ocfs2-tools.spec-generic
])
AC_OUTPUT
Added: trunk/mbvendor.m4
===================================================================
--- trunk/mbvendor.m4 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/mbvendor.m4 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,73 @@
+# MB_VENDOR([VARIABLE])
+# ---------------------
+AC_DEFUN([MB_VENDOR],
+ [AC_MSG_CHECKING([for vendor])
+ AC_ARG_WITH(vendor, [ --with-vendor=VENDOR Vendor to tailor build defaults and packages to [common]],[
+ mb_vendor="$withval"
+ if test -x "vendor/${mb_vendor}/vendor.guess"; then
+ if "vendor/${mb_vendor}/vendor.guess" >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+ AC_MSG_RESULT([$mb_vendor])
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([Vendor $mb_vendor not detected])
+ fi
+ else
+ AC_MSG_RESULT([not supported])
+ AC_MSG_ERROR([Vendor $mb_vendor not supported])
+ fi
+ ], [
+ mb_vendor=`./vendor.guess 2>&AS_MESSAGE_LOG_FD`
+ if test -z "$mb_vendor"; then
+ AC_MSG_RESULT([not found])
+ else
+ AC_MSG_RESULT([$mb_vendor])
+ fi
+ ])
+ dnl Use 2.13 safe ifelse()
+ ifelse([$1], [], [], [
+ $1="$mb_vendor"
+ AC_SUBST($1)
+ ])
+]) # MB_VENDOR
+
+# MB_VENDOR_KERNEL([VARIABLE])
+# ---------------------
+AC_DEFUN([MB_VENDOR_KERNEL],
+ [AC_MSG_CHECKING([for vendor kernel])
+ AC_ARG_WITH(vendorkernel, [ --with-vendorkernel=KERNELVERSION Vendor kernel version to compile against [detected]], [
+ mb_vendorkernel="$withval"
+ if test -z "$mb_vendor"; then
+ AC_MSG_RESULT([no vendor])
+ AC_MSG_ERROR([No vendor specified or discovered])
+ fi
+ if test -x "vendor/${mb_vendor}/kernel.guess"; then
+ mb_vkinclude="`vendor/${mb_vendor}/kernel.guess build ${mb_vendorkernel} 2>&AS_MESSAGE_LOG_FD`"
+ if test -z "$mb_vkinclude"; then
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([Vendor kernel $mb_vendorkernel not detected])
+ else
+ AC_MSG_RESULT([$mb_vkinclude])
+ fi
+ else
+ AC_MSG_RESULT([not supported])
+ AC_MSG_ERROR([Vendor $mb_vendor does not support kernel detection])
+ fi
+ ], [
+ if test -x "vendor/${mb_vendor}/kernel.guess"; then
+ mb_vkinclude="`vendor/${mb_vendor}/kernel.guess build 2>&AS_MESSAGE_LOG_FD`"
+ if test -z "$mb_vkinclude"; then
+ AC_MSG_RESULT([not found])
+ else
+ AC_MSG_RESULT([$mb_vkinclude])
+ fi
+ else
+ mb_vkinclude=
+ AC_MSG_RESULT([not supported])
+ fi
+ ])
+ dnl Use 2.13 safe ifelse()
+ ifelse([$1], [], [], [
+ $1="$mb_vkinclude"
+ AC_SUBST($1)
+ ])
+]) # MB_VENDOR_KERNEL
Added: trunk/svnrev.guess
===================================================================
--- trunk/svnrev.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/svnrev.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,144 @@
+#!/bin/sh
+
+#
+# This script creates a package version for packages. The package
+# version is the "release" or other version attached by the packaging
+# software (eg, RPM or Dpkg) after the upstream software version.
+#
+# This software must be invoked like so:
+#
+# svnrev.guess <packagename>
+#
+# and it expects that release tags are of the form:
+#
+# /tags/<packagename>-<version>
+#
+# Note that release tag versioning expects a working connection to
+# the repository (for SVN log), but all other branches don't require it.
+#
+# If there is no .svn directory or it cannot discover the repository
+# version, the script sets a version of 0.local.
+#
+
+if [ $# -lt 1 ]
+then
+ echo "Usage: svnrev.guess <packagename>" >&2
+ exit 1
+fi
+PACKAGE="$1"
+
+getstat()
+{
+ if [ ! -d .svn ]
+ then
+ return
+ fi
+ svn stat -v | awk 'BEGIN{modified = "false";lastrev = 0}
+ /Status against/{next}
+ /^\?/{next}
+ {
+ col1=substr($0, 0, 1);
+ if (col1 != " ") {modified = "true"}
+ sub(/^......../, "");
+ if ($1 > lastrev) { lastrev=$1 }
+ }
+ END{print modified,lastrev}'
+}
+
+#
+# Branches that are not releases get a work-in-progress package version.
+# This is 0.<svn_revision>[m]. The 0. ensures that an upcoming real
+# release, with an package version of 1, will supercede this package.
+# The "m" is added if the working tree has modifications to distinguish
+# it from a committed revision.
+#
+# If there is no repository or there is a problem getting the revision,
+# the package version is 0.local.
+#
+workingrev()
+{
+ STATINFO="$(getstat)"
+ MODIFIED=$(echo "$STATINFO" | cut -f1 -d" ")
+ LASTREV=$(echo "$STATINFO" | cut -f2 -d" ")
+
+ if [ -z "$LASTREV" ]
+ then
+ PKG_VERSION=0.local
+ else
+ PKG_VERSION=0.${LASTREV}
+ if [ "$MODIFIED" = "true" ]
+ then
+ PKG_VERSION="${PKG_VERSION}m"
+ fi
+ fi
+ echo "$PKG_VERSION"
+}
+
+#
+# If the branch is a tag (tags/project-x.y), it needs a release-based
+# package version (-1, -2, etc). Generally, it will be the tip of the
+# branch (package version 1). However, if there is a slight release
+# fixup, that warrants bumping the package version.
+#
+# The logic is pretty simple. Walk the history looking for the
+# creation of the tag (A /tags/project-x.y). For each revsion later
+# than the creation of the tag, bump the package version.
+#
+releaserev()
+{
+ BRANCH="$1"
+ BRANCH_SEARCH="`echo "$BRANCH" | sed -e 's/\//\\\\\//g'`"
+ svn log -v 2>&1 |
+ awk 'BEGIN{rev=0}
+ /^r[0-9]+ \|/{rev += 1}
+ /^ +A \/'"$BRANCH_SEARCH"'$/{exit}
+ /^ +A \/'"$BRANCH_SEARCH"' (.*)$/{exit}
+ END{print rev}'
+}
+
+
+#
+# Tag branches are releases, and need a release-style package version.
+# All other branches are non-release, and get an obviously
+# work-in-progress package version.
+#
+# guessbranch() expects the standard Subversion layout of
+# /trunk
+# /branches/<branchname>
+# /tags/<tagname>
+#
+guessbranch()
+{
+ if [ ! -d .svn ]
+ then
+ return
+ fi
+ svn info | awk '/URL: .*\/trunk\/?$/{print "trunk"; exit 0}
+ /URL: .*\/branches\/[^/]+\/?/{
+ gsub(/\/$/, "", $2);
+ sub(/^.*\/branches\//, "", $2);
+ print "branches/"$2;
+ exit 0;
+ }
+ /URL: .*\/tags\/[^/]+\/?/{
+ gsub(/\/$/, "", $2);
+ sub(/^.*\/tags\//, "", $2);
+ print "tags/"$2;
+ exit 0;
+ }'
+}
+
+if ! which svn 1>/dev/null 2>&1
+then
+ echo "0.local"
+else
+ BRANCH=$(guessbranch)
+ case "$BRANCH" in
+ tags/${PACKAGE}*)
+ releaserev "$BRANCH"
+ ;;
+ *)
+ workingrev
+ ;;
+ esac
+fi
Property changes on: trunk/svnrev.guess
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/vendor/Makefile
===================================================================
--- trunk/vendor/Makefile 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/Makefile 2007-05-02 22:02:12 UTC (rev 1349)
@@ -2,6 +2,6 @@
include $(TOPDIR)/Preamble.make
-SUBDIRS = common #redhat unitedlinux
+SUBDIRS = common rhel5 sles10 rhel4 sles9
include $(TOPDIR)/Postamble.make
Property changes on: trunk/vendor/common
___________________________________________________________________
Name: svn:ignore
- ocfs2-tools.spec
.*.sw?
+ ocfs2-tools.spec
ocfs2-tools.spec-generic
.*.sw?
Modified: trunk/vendor/common/Makefile
===================================================================
--- trunk/vendor/common/Makefile 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/common/Makefile 2007-05-02 22:02:12 UTC (rev 1349)
@@ -2,6 +2,11 @@
include $(TOPDIR)/Preamble.make
-DIST_FILES = o2cb.init o2cb.sysconfig ocfs2.init ocfs2-tools.spec.in
+DIST_FILES = \
+ o2cb.init \
+ o2cb.sysconfig \
+ ocfs2.init \
+ ocfs2-tools.spec-generic.in \
+ Vendor.make
include $(TOPDIR)/Postamble.make
Added: trunk/vendor/common/Vendor.make
===================================================================
--- trunk/vendor/common/Vendor.make 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/common/Vendor.make 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,32 @@
+#
+# Support files
+#
+
+# This Vendor.make expects TOOLSARCH and VENDOR_EXTENSION to be set by an
+# including Makefile.
+
+
+RPMBUILD = $(shell /usr/bin/which rpmbuild 2>/dev/null || /usr/bin/which rpm 2>/dev/null || echo /bin/false)
+RPM_TOPDIR = `pwd`
+
+ifndef VENDOR_EXTENSION
+VENDOR_EXTENSION = common
+endif
+
+$(TOPDIR)/ocfs2-tools-$(DIST_VERSION)-$(PKG_VERSION).$(VENDOR_EXTENSION).src.rpm: dist $(TOPDIR)/vendor/common/ocfs2-tools.spec-generic
+ sed -e 's,@@PKG_VERSION@@,'$(PKG_VERSION)',g' \
+ -e 's,@@VENDOR_EXTENSION@@,'$(VENDOR_EXTENSION)',g' \
+ -e 's,@@PYGTK_NAME@@,'$(PYGTK_NAME)',g' \
+ -e 's,@@PYVERSION@@,'$(PYVERSION)',g' \
+ -e 's,@@COMPILE_PY@@,'$(COMPILE_PY)',g' \
+ -e 's,@@CHKCONFIG_DEP@@,'$(CHKCONFIG_DEP)',g' \
+ < "$(TOPDIR)/vendor/common/ocfs2-tools.spec-generic" \
+ > "$(TOPDIR)/vendor/common/ocfs2-tools.spec"
+ $(RPMBUILD) -bs --define "_sourcedir $(RPM_TOPDIR)" --define "_srcrpmdir $(RPM_TOPDIR)" "$(TOPDIR)/vendor/common/ocfs2-tools.spec"
+ rm "$(TOPDIR)/vendor/common/ocfs2-tools.spec"
+
+srpm: $(TOPDIR)/ocfs2-tools-$(DIST_VERSION)-$(PKG_VERSION).$(VENDOR_EXTENSION).src.rpm
+
+rpm: srpm
+ $(RPMBUILD) --rebuild $(TOOLSARCH) "ocfs2-tools-$(DIST_VERSION)-$(PKG_VERSION).$(VENDOR_EXTENSION).src.rpm"
+
Copied: trunk/vendor/common/ocfs2-tools.spec-generic.in (from rev 1348, trunk/vendor/common/ocfs2-tools.spec.in)
===================================================================
--- trunk/vendor/common/ocfs2-tools.spec.in 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/common/ocfs2-tools.spec-generic.in 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,158 @@
+#
+# Spec file for ocfs-tools
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+# Because RPM is dumb
+%define _unpackaged_files_terminate_build 0
+# Because RH defines lib64 on ppc32 builds
+%ifarch ppc
+%define brokenrhlibdir /usr/lib
+%else
+%define brokenrhlibdir %{_libdir}
+%endif
+
+%define compile_py @@COMPILE_PY@@
+
+Summary: Tools for managing the Oracle Cluster Filesystem 2
+Name: ocfs2-tools
+Version: @DIST_VERSION@
+Release: @@PKG_VERSION@@.@@VENDOR_EXTENSION@@
+License: GPL
+Group: System Environment/Kernel
+Source: ocfs2-tools- at DIST_VERSION@.tar.gz
+URL: http://oss.oracle.com/projects/ocfs2-tools/
+Distribution: Oracle
+Vendor: Oracle
+Packager: nobody <nobody at oracle.com>
+Exclusiveos: Linux
+Requires: bash, coreutils, net-tools, modutils, e2fsprogs, @@CHKCONFIG_DEP@@, glib2 >= 2.2.3
+BuildRequires: e2fsprogs-devel, glib2-devel >= 2.2.3, @@PYGTK_NAME@@ >= 1.99.16, python-devel >= @@PYVERSION@@
+
+BuildRoot: %{_tmppath}/ocfs2-tools-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+%description
+Tools to manage Oracle Cluster Filesystem 2 volumes.
+
+
+%package -n ocfs2console
+Summary: GUI frontend for OCFS2 management
+Group: System Environment/Kernel
+Requires: e2fsprogs, glib2 >= 2.2.3, vte >= 0.11.10, @@PYGTK_NAME@@ >= 1.99.16, python >= @@PYVERSION@@, ocfs2-tools = %{version}
+AutoReqProv: No
+
+
+%description -n ocfs2console
+GUI frontend for management and debugging of Oracle Cluster Filesystem 2
+volumes.
+
+
+
+%package -n ocfs2-tools-devel
+Summary: Headers and static archives for ocfs2-tools
+Group: Development/Libraries
+Requires: e2fsprogs-devel, glib2-devel >= 2.2.3, ocfs2-tools = %{version}
+AutoReqProv: No
+
+%description -n ocfs2-tools-devel
+ocfs2-tools-devel contains the libraries and header files needed to
+develop ocfs2 filesystem-specific programs.
+
+
+
+%prep
+%setup -n ocfs2-tools-%{version}
+
+
+%build
+%configure --disable-debug --prefix=/usr --mandir=/usr/share/man --libdir=%{brokenrhlibdir}
+make
+
+
+%install
+
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
+cp -f vendor/common/o2cb.init $RPM_BUILD_ROOT/etc/init.d/o2cb
+cp -f vendor/common/ocfs2.init $RPM_BUILD_ROOT/etc/init.d/ocfs2
+if [ -f /etc/redhat-release ]
+then
+ # Red Hat chkconfig is completely and utterly broken
+ perl -p -i -e 'BEGIN() { $k=0;} if (/^###/) { $k++ } elsif ($k == 1) { printf "#"};' $RPM_BUILD_ROOT/etc/init.d/o2cb
+ perl -p -i -e 'BEGIN() { $k=0;} if (/^###/) { $k++ } elsif ($k == 1) { printf "#"};' $RPM_BUILD_ROOT/etc/init.d/ocfs2
+fi
+mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
+cp -f vendor/common/o2cb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/o2cb
+
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+%if %{compile_py}
+%{__python} -c "import compileall; compileall.compile_dir('$RPM_BUILD_ROOT/%{brokenrhlibdir}/python@@PYVERSION@@/site-packages/ocfs2interface', ddir='%{brokenrhlibdir}/python@@PYVERSION@@/site-packages/ocfs2interface')"
+%endif
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%post
+/sbin/chkconfig --add o2cb >/dev/null
+/sbin/chkconfig --add ocfs2 >/dev/null
+
+%preun
+if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade
+ /sbin/chkconfig --del ocfs2 >/dev/null
+ /sbin/chkconfig --del o2cb >/dev/null
+fi
+
+%files
+%defattr(-,root,root)
+%doc README.O2CB COPYING CREDITS MAINTAINERS
+%doc documentation/users_guide.txt
+/sbin/fsck.ocfs2
+/sbin/mkfs.ocfs2
+/sbin/mounted.ocfs2
+/sbin/tunefs.ocfs2
+/sbin/debugfs.ocfs2
+/sbin/o2cb_ctl
+/sbin/mount.ocfs2
+/sbin/ocfs2cdsl
+/sbin/ocfs2_hb_ctl
+/etc/init.d/o2cb
+/etc/init.d/ocfs2
+%config /etc/sysconfig/o2cb
+/usr/share/man/man8/debugfs.ocfs2.8.gz
+/usr/share/man/man8/fsck.ocfs2.8.gz
+/usr/share/man/man8/fsck.ocfs2.checks.8.gz
+/usr/share/man/man8/mkfs.ocfs2.8.gz
+/usr/share/man/man8/tunefs.ocfs2.8.gz
+/usr/share/man/man8/mount.ocfs2.8.gz
+/usr/share/man/man8/mounted.ocfs2.8.gz
+/usr/share/man/man8/o2cb_ctl.8.gz
+/usr/share/man/man8/ocfs2_hb_ctl.8.gz
+/usr/share/man/man8/ocfs2cdsl.8.gz
+
+
+%files -n ocfs2console
+%defattr(-,root,root)
+%{brokenrhlibdir}/python@@PYVERSION@@/site-packages/ocfs2interface
+/usr/sbin/ocfs2console
+/usr/share/man/man8/ocfs2console.8.gz
+
+%files -n ocfs2-tools-devel
+%defattr(-,root,root)
+%{brokenrhlibdir}/*.a
+%{brokenrhlibdir}/pkgconfig/*.pc
+%{_includedir}/o2cb
+%{_includedir}/o2dlm
+%{_includedir}/ocfs2
+
+
+
+%changelog
+* Thu Jan 27 2005 Manish Singh <manish.singh at oracle.com>
+- Add ocfs2console
+
+* Fri Jan 21 2005 Manish Singh <manish.singh at oracle.com>
+- Initial rpm spec
Deleted: trunk/vendor/common/ocfs2-tools.spec.in
===================================================================
--- trunk/vendor/common/ocfs2-tools.spec.in 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/common/ocfs2-tools.spec.in 2007-05-02 22:02:12 UTC (rev 1349)
@@ -1,156 +0,0 @@
-#
-# Spec file for ocfs-tools
-#
-
-# Macros
-# This one is hardcoded because, well, it belongs there
-%define _prefix /usr
-# Because RPM is dumb
-%define _unpackaged_files_terminate_build 0
-# Because RH defines lib64 on ppc32 builds
-%ifarch ppc
-%define brokenrhlibdir /usr/lib
-%else
-%define brokenrhlibdir %{_libdir}
-%endif
-
-Summary: Tools for managing the Oracle Cluster Filesystem 2
-Name: ocfs2-tools
-Version: @DIST_VERSION@
-Release: @RPM_VERSION@
-License: GPL
-Group: System Environment/Kernel
-Source: ocfs2-tools- at DIST_VERSION@.tar.gz
-URL: http://oss.oracle.com/projects/ocfs2-tools/
-Distribution: Oracle
-Vendor: Oracle
-Packager: nobody <nobody at oracle.com>
-Exclusiveos: Linux
-Requires: bash, coreutils, net-tools, modutils, e2fsprogs, %{chkconfig_dep}, glib2 >= 2.2.3
-BuildRequires: e2fsprogs-devel, glib2-devel >= 2.2.3, %{pygtk_name} >= 1.99.16, python-devel >= %{pyversion}
-
-BuildRoot: %{_tmppath}/ocfs2-tools-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
-
-%description
-Tools to manage Oracle Cluster Filesystem 2 volumes.
-
-
-%package -n ocfs2console
-Summary: GUI frontend for OCFS2 management
-Group: System Environment/Kernel
-Requires: e2fsprogs, glib2 >= 2.2.3, vte >= 0.11.10, %{pygtk_name} >= 1.99.16, python >= %{pyversion}, ocfs2-tools = %{version}
-AutoReqProv: No
-
-
-%description -n ocfs2console
-GUI frontend for management and debugging of Oracle Cluster Filesystem 2
-volumes.
-
-
-
-%package -n ocfs2-tools-devel
-Summary: Headers and static archives for ocfs2-tools
-Group: Development/Libraries
-Requires: e2fsprogs-devel, glib2-devel >= 2.2.3, ocfs2-tools = %{version}
-AutoReqProv: No
-
-%description -n ocfs2-tools-devel
-ocfs2-tools-devel contains the libraries and header files needed to
-develop ocfs2 filesystem-specific programs.
-
-
-
-%prep
-%setup -n ocfs2-tools-%{version}
-
-
-%build
-%configure --disable-debug --prefix=/usr --mandir=/usr/share/man --libdir=%{brokenrhlibdir}
-make
-
-
-%install
-
-mkdir -p $RPM_BUILD_ROOT/etc/init.d
-cp -f vendor/common/o2cb.init $RPM_BUILD_ROOT/etc/init.d/o2cb
-cp -f vendor/common/ocfs2.init $RPM_BUILD_ROOT/etc/init.d/ocfs2
-if [ -f /etc/redhat-release ]
-then
- # Red Hat chkconfig is completely and utterly broken
- perl -p -i -e 'BEGIN() { $k=0;} if (/^###/) { $k++ } elsif ($k == 1) { printf "#"};' $RPM_BUILD_ROOT/etc/init.d/o2cb
- perl -p -i -e 'BEGIN() { $k=0;} if (/^###/) { $k++ } elsif ($k == 1) { printf "#"};' $RPM_BUILD_ROOT/etc/init.d/ocfs2
-fi
-mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
-cp -f vendor/common/o2cb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/o2cb
-
-make DESTDIR="$RPM_BUILD_ROOT" install
-
-%if %{compile_py}
-%{__python} -c "import compileall; compileall.compile_dir('$RPM_BUILD_ROOT/%{brokenrhlibdir}/python%{pyversion}/site-packages/ocfs2interface', ddir='%{brokenrhlibdir}/python%{pyversion}/site-packages/ocfs2interface')"
-%endif
-
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
-
-
-%post
-/sbin/chkconfig --add o2cb >/dev/null
-/sbin/chkconfig --add ocfs2 >/dev/null
-
-%preun
-if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade
- /sbin/chkconfig --del ocfs2 >/dev/null
- /sbin/chkconfig --del o2cb >/dev/null
-fi
-
-%files
-%defattr(-,root,root)
-%doc README.O2CB COPYING CREDITS MAINTAINERS
-%doc documentation/users_guide.txt
-/sbin/fsck.ocfs2
-/sbin/mkfs.ocfs2
-/sbin/mounted.ocfs2
-/sbin/tunefs.ocfs2
-/sbin/debugfs.ocfs2
-/sbin/o2cb_ctl
-/sbin/mount.ocfs2
-/sbin/ocfs2cdsl
-/sbin/ocfs2_hb_ctl
-/etc/init.d/o2cb
-/etc/init.d/ocfs2
-%config /etc/sysconfig/o2cb
-/usr/share/man/man8/debugfs.ocfs2.8.gz
-/usr/share/man/man8/fsck.ocfs2.8.gz
-/usr/share/man/man8/fsck.ocfs2.checks.8.gz
-/usr/share/man/man8/mkfs.ocfs2.8.gz
-/usr/share/man/man8/tunefs.ocfs2.8.gz
-/usr/share/man/man8/mount.ocfs2.8.gz
-/usr/share/man/man8/mounted.ocfs2.8.gz
-/usr/share/man/man8/o2cb_ctl.8.gz
-/usr/share/man/man8/ocfs2_hb_ctl.8.gz
-/usr/share/man/man8/ocfs2cdsl.8.gz
-
-
-%files -n ocfs2console
-%defattr(-,root,root)
-%{brokenrhlibdir}/python%{pyversion}/site-packages/ocfs2interface
-/usr/sbin/ocfs2console
-/usr/share/man/man8/ocfs2console.8.gz
-
-%files -n ocfs2-tools-devel
-%defattr(-,root,root)
-%{brokenrhlibdir}/*.a
-%{brokenrhlibdir}/pkgconfig/*.pc
-%{_includedir}/o2cb
-%{_includedir}/o2dlm
-%{_includedir}/ocfs2
-
-
-
-%changelog
-* Thu Jan 27 2005 Manish Singh <manish.singh at oracle.com>
-- Add ocfs2console
-
-* Fri Jan 21 2005 Manish Singh <manish.singh at oracle.com>
-- Initial rpm spec
Added: trunk/vendor/rhel4/Makefile
===================================================================
--- trunk/vendor/rhel4/Makefile 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/rhel4/Makefile 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+TOPDIR = ../..
+
+include $(TOPDIR)/Preamble.make
+
+DIST_FILES = \
+ rpmarch.guess \
+ Vendor.make \
+ vendor.guess
+
+include $(TOPDIR)/Postamble.make
Added: trunk/vendor/rhel4/Vendor.make
===================================================================
--- trunk/vendor/rhel4/Vendor.make 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/rhel4/Vendor.make 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+#
+# RHEL 4
+#
+
+TOOLSARCH = $(shell $(TOPDIR)/vendor/rhel4/rpmarch.guess tools $(TOPDIR))
+VENDOR_EXTENSION = el4
+
+include $(TOPDIR)/vendor/common/Vendor.make
+
+packages: rpm
Added: trunk/vendor/rhel4/rpmarch.guess
===================================================================
--- trunk/vendor/rhel4/rpmarch.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/rhel4/rpmarch.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,68 @@
+#! /bin/sh
+
+mode="$1"
+srcdir="$2"
+
+host_cpu=
+
+
+QUERYFILE=/etc/redhat-release
+
+if test -n "$QUERYFILE"; then
+ host_cpu="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`"
+fi
+
+if test -z "$host_cpu" -o "$host_cpu" = "noarch" ; then
+ host_alias=`$srcdir/config.guess`
+ host=`$srcdir/config.sub $host_alias`
+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+fi
+
+case "$host_cpu" in
+ x86_64|ia64|s390x)
+ TOOLSARCH="$host_cpu"
+ ;;
+ i386|i486|i586|i686|i786|k6|k7)
+ TOOLSARCH="i386"
+ ;;
+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ TOOLSARCH="ppc64"
+ ;;
+ *)
+ echo "rpmarch.guess: Warning: unknown RPM CPU architecture: $host_cpu" >&2
+ TOOLSARCH=""
+ ;;
+esac
+
+# Only a few of these need to be overwritten from RPM's default
+case "$host_cpu" in
+ i386|i586)
+ MODULEARCH="i686"
+ ;;
+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ MODULEARCH="ppc64"
+ ;;
+ *)
+ MODULEARCH=""
+ ;;
+esac
+
+case "$mode" in
+ module)
+ if [ -n "$MODULEARCH" ] ; then
+ echo "--target $MODULEARCH"
+ fi
+ ;;
+ tools)
+ if [ -n "$TOOLSARCH" ] ; then
+ echo "--target $TOOLSARCH"
+ fi
+ ;;
+ *)
+ echo "rpmarch.guess: Invalid mode: $mode" >&2
+ echo "error"
+ exit 1
+ ;;
+esac
+
+exit 0
Property changes on: trunk/vendor/rhel4/rpmarch.guess
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/vendor/rhel4/vendor.guess
===================================================================
--- trunk/vendor/rhel4/vendor.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/rhel4/vendor.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ ! -f /etc/redhat-release ]
+then
+ exit 1
+fi
+
+case "`rpm -qf /etc/redhat-release --qf '%{VERSION}' 2>/dev/null`" in
+ 4[AEW]S) ;;
+ 4) ;;
+ *) exit 1 ;;
+esac
+
+exit 0
Property changes on: trunk/vendor/rhel4/vendor.guess
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/vendor/rhel5/Makefile
===================================================================
--- trunk/vendor/rhel5/Makefile 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/rhel5/Makefile 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+TOPDIR = ../..
+
+include $(TOPDIR)/Preamble.make
+
+DIST_FILES = \
+ rpmarch.guess \
+ Vendor.make \
+ vendor.guess
+
+include $(TOPDIR)/Postamble.make
Added: trunk/vendor/rhel5/Vendor.make
===================================================================
--- trunk/vendor/rhel5/Vendor.make 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/rhel5/Vendor.make 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+#
+# RHEL 5
+#
+
+TOOLSARCH = $(shell $(TOPDIR)/vendor/rhel5/rpmarch.guess tools $(TOPDIR))
+VENDOR_EXTENSION = el5
+
+include $(TOPDIR)/vendor/common/Vendor.make
+
+packages: rpm
Added: trunk/vendor/rhel5/rpmarch.guess
===================================================================
--- trunk/vendor/rhel5/rpmarch.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/rhel5/rpmarch.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,68 @@
+#! /bin/sh
+
+mode="$1"
+srcdir="$2"
+
+host_cpu=
+
+
+QUERYFILE=/etc/redhat-release
+
+if test -n "$QUERYFILE"; then
+ host_cpu="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`"
+fi
+
+if test -z "$host_cpu" -o "$host_cpu" = "noarch" ; then
+ host_alias=`$srcdir/config.guess`
+ host=`$srcdir/config.sub $host_alias`
+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+fi
+
+case "$host_cpu" in
+ x86_64|ia64|s390x)
+ TOOLSARCH="$host_cpu"
+ ;;
+ i386|i486|i586|i686|i786|k6|k7)
+ TOOLSARCH="i386"
+ ;;
+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ TOOLSARCH="ppc64"
+ ;;
+ *)
+ echo "rpmarch.guess: Warning: unknown RPM CPU architecture: $host_cpu" >&2
+ TOOLSARCH=""
+ ;;
+esac
+
+# Only a few of these need to be overwritten from RPM's default
+case "$host_cpu" in
+ i386|i586)
+ MODULEARCH="i686"
+ ;;
+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ MODULEARCH="ppc64"
+ ;;
+ *)
+ MODULEARCH=""
+ ;;
+esac
+
+case "$mode" in
+ module)
+ if [ -n "$MODULEARCH" ] ; then
+ echo "--target $MODULEARCH"
+ fi
+ ;;
+ tools)
+ if [ -n "$TOOLSARCH" ] ; then
+ echo "--target $TOOLSARCH"
+ fi
+ ;;
+ *)
+ echo "rpmarch.guess: Invalid mode: $mode" >&2
+ echo "error"
+ exit 1
+ ;;
+esac
+
+exit 0
Property changes on: trunk/vendor/rhel5/rpmarch.guess
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/vendor/rhel5/vendor.guess
===================================================================
--- trunk/vendor/rhel5/vendor.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/rhel5/vendor.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ ! -f /etc/redhat-release ]
+then
+ exit 1
+fi
+
+case "`rpm -qf /etc/redhat-release --qf '%{VERSION}' 2>/dev/null`" in
+ 4.9*) ;;
+ 5*) ;;
+ *) exit 1;;
+esac
+
+exit 0
Property changes on: trunk/vendor/rhel5/vendor.guess
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/vendor/sles10/Makefile
===================================================================
--- trunk/vendor/sles10/Makefile 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/sles10/Makefile 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+TOPDIR = ../..
+
+include $(TOPDIR)/Preamble.make
+
+DIST_FILES = \
+ rpmarch.guess \
+ Vendor.make \
+ vendor.guess
+
+include $(TOPDIR)/Postamble.make
Added: trunk/vendor/sles10/Vendor.make
===================================================================
--- trunk/vendor/sles10/Vendor.make 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/sles10/Vendor.make 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+#
+# SLES 10
+#
+
+TOOLSARCH = $(shell $(TOPDIR)/vendor/sles10/rpmarch.guess tools $(TOPDIR))
+VENDOR_EXTENSION = SLE10
+
+include $(TOPDIR)/vendor/common/Vendor.make
+
+packages: rpm
Added: trunk/vendor/sles10/rpmarch.guess
===================================================================
--- trunk/vendor/sles10/rpmarch.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/sles10/rpmarch.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,70 @@
+#! /bin/sh
+
+mode="$1"
+srcdir="$2"
+
+host_cpu=
+
+QUERYFILE=/etc/SuSE-release
+
+if test -n "$QUERYFILE"; then
+ host_cpu="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`"
+fi
+
+if test -z "$host_cpu" -o "$host_cpu" = "noarch" ; then
+ host_alias=`$srcdir/config.guess`
+ host=`$srcdir/config.sub $host_alias`
+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+fi
+
+case "$host_cpu" in
+ x86_64|ia64|s390x)
+ TOOLSARCH="$host_cpu"
+ ;;
+ i386|i486|i586|i686|i786|k6|k7)
+ TOOLSARCH="i386"
+ ;;
+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ TOOLSARCH="ppc64"
+ ;;
+ *)
+ echo "rpmarch.guess: Warning: unknown RPM CPU architecture: $host_cpu" >&2
+ TOOLSARCH=""
+ ;;
+esac
+
+# Only a few of these need to be overwritten from RPM's default
+case "$host_cpu" in
+ i586)
+ MODULEARCH="$host_cpu"
+ ;;
+ i386|i686)
+ MODULEARCH="i586"
+ ;;
+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ MODULEARCH="ppc64"
+ ;;
+ *)
+ MODULEARCH=""
+ ;;
+esac
+
+case "$mode" in
+ module)
+ if [ -n "$MODULEARCH" ] ; then
+ echo "--target $MODULEARCH"
+ fi
+ ;;
+ tools)
+ if [ -n "$TOOLSARCH" ] ; then
+ echo "--target $TOOLSARCH"
+ fi
+ ;;
+ *)
+ echo "rpmarch.guess: Invalid mode: $mode" >&2
+ echo "error"
+ exit 1
+ ;;
+esac
+
+exit 0
Property changes on: trunk/vendor/sles10/rpmarch.guess
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/vendor/sles10/vendor.guess
===================================================================
--- trunk/vendor/sles10/vendor.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/sles10/vendor.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ ! -f /etc/SuSE-release ]
+then
+ exit 1
+fi
+
+if [ "`rpm -qf /etc/SuSE-release --qf '%{VERSION}' 2>/dev/null`" != "10" ]
+then
+ exit 1
+fi
+
+exit 0
Property changes on: trunk/vendor/sles10/vendor.guess
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/vendor/sles9/Makefile
===================================================================
--- trunk/vendor/sles9/Makefile 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/sles9/Makefile 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+TOPDIR = ../..
+
+include $(TOPDIR)/Preamble.make
+
+DIST_FILES = \
+ rpmarch.guess \
+ Vendor.make \
+ vendor.guess
+
+include $(TOPDIR)/Postamble.make
Added: trunk/vendor/sles9/Vendor.make
===================================================================
--- trunk/vendor/sles9/Vendor.make 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/sles9/Vendor.make 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,10 @@
+#
+# SLES 9
+#
+
+TOOLSARCH = $(shell $(TOPDIR)/vendor/sles9/rpmarch.guess tools $(TOPDIR))
+VENDOR_EXTENSION = SLE9
+
+include $(TOPDIR)/vendor/common/Vendor.make
+
+packages: rpm
Added: trunk/vendor/sles9/rpmarch.guess
===================================================================
--- trunk/vendor/sles9/rpmarch.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/sles9/rpmarch.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,70 @@
+#! /bin/sh
+
+mode="$1"
+srcdir="$2"
+
+host_cpu=
+
+QUERYFILE=/etc/SuSE-release
+
+if test -n "$QUERYFILE"; then
+ host_cpu="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`"
+fi
+
+if test -z "$host_cpu" -o "$host_cpu" = "noarch" ; then
+ host_alias=`$srcdir/config.guess`
+ host=`$srcdir/config.sub $host_alias`
+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+fi
+
+case "$host_cpu" in
+ x86_64|ia64|s390x)
+ TOOLSARCH="$host_cpu"
+ ;;
+ i386|i486|i586|i686|i786|k6|k7)
+ TOOLSARCH="i386"
+ ;;
+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ TOOLSARCH="ppc64"
+ ;;
+ *)
+ echo "rpmarch.guess: Warning: unknown RPM CPU architecture: $host_cpu" >&2
+ TOOLSARCH=""
+ ;;
+esac
+
+# Only a few of these need to be overwritten from RPM's default
+case "$host_cpu" in
+ i586)
+ MODULEARCH="$host_cpu"
+ ;;
+ i386|i686)
+ MODULEARCH="i586"
+ ;;
+ ppc|ppc64|ppciseries|ppcpseries|ppc64iseries|ppc64pseries|powerpc|powerpc64)
+ MODULEARCH="ppc64"
+ ;;
+ *)
+ MODULEARCH=""
+ ;;
+esac
+
+case "$mode" in
+ module)
+ if [ -n "$MODULEARCH" ] ; then
+ echo "--target $MODULEARCH"
+ fi
+ ;;
+ tools)
+ if [ -n "$TOOLSARCH" ] ; then
+ echo "--target $TOOLSARCH"
+ fi
+ ;;
+ *)
+ echo "rpmarch.guess: Invalid mode: $mode" >&2
+ echo "error"
+ exit 1
+ ;;
+esac
+
+exit 0
Property changes on: trunk/vendor/sles9/rpmarch.guess
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/vendor/sles9/vendor.guess
===================================================================
--- trunk/vendor/sles9/vendor.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor/sles9/vendor.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ ! -f /etc/SuSE-release ]
+then
+ exit 1
+fi
+
+if [ "`rpm -qf /etc/SuSE-release --qf '%{VERSION}' 2>/dev/null`" != "9" ]
+then
+ exit 1
+fi
+
+exit 0
Property changes on: trunk/vendor/sles9/vendor.guess
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/vendor.guess
===================================================================
--- trunk/vendor.guess 2007-04-30 21:35:22 UTC (rev 1348)
+++ trunk/vendor.guess 2007-05-02 22:02:12 UTC (rev 1349)
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+list_vendors()
+{
+ ls -1 vendor | while read -r line
+ do
+ if [ "$line" = "common" ]
+ then
+ continue
+ fi
+ if [ ! -d "vendor/$line" ]
+ then
+ continue
+ fi
+ echo $line
+ done
+
+ # Make common last
+ if [ -d "vendor/common" ]
+ then
+ echo "common"
+ fi
+}
+
+list_vendors | while read -r v
+do
+ if [ -x "vendor/${v}/vendor.guess" ]
+ then
+ if "vendor/${v}/vendor.guess" >/dev/null 2>&1
+ then
+ echo "$v"
+ fi
+ fi
+done
Property changes on: trunk/vendor.guess
___________________________________________________________________
Name: svn:executable
+ *
More information about the Ocfs2-tools-commits
mailing list