1
1
Jeff Squyres 72e202a432 Fix two problems:
* OFED bug 249 (http://openib.org/bugzilla/show_bug.cgi?id=249) where
   Suse systems automatically add "-D_FORTIFY_SOURCE=2" to the
   RPM_OPT_FLAGS, which works fine when you're compiling with gcc.
   But not so much when using other compilers (_FORTIFY source
   silently changes the names of functions like memcpy() in an attempt
   to protect against buffer overflows, and uses a gcc __builtin
   thingy that results in undefined symbols when you compile/link with
   other compilers, such as icc -- as of 6 Oct 2006).  So do some
   horrid huersitics to see if we're using gcc, and if so, sed out any
   FORTIFY_SOURCE stuff in RPM_OPT_FLAGS.
 * If we're building a single rpm, don't bother creating the
   runtime.files and devel.files files.  And if we are making multiple
   RPMs, then ensure to end the pipe chain with /bin/true so that if
   the user specified --enable-static --disable-shared and the egrep
   for *.so files fails, the return status from egrep (1) doesn't
   cause RPM to barf.  Specifically, do this so that /bin/true's
   return value of 0 is always what rpmbuild sees, regardless of the
   return status of egrep:
{{{
find $RPM_BUILD_ROOT -type f -o -type l | \
   sed -e "s@$RPM_BUILD_ROOT@@" | \
   egrep "lib.*\.a|lib.*\.la" > devel.files | /bin/true
}}}

This commit was SVN r12051.
2006-10-06 19:26:44 +00:00
..
2006-04-27 03:33:08 +00:00
2006-10-06 19:26:44 +00:00

Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
                        University Research and Technology
                        Corporation.  All rights reserved.
Copyright (c) 2004-2006 The University of Tennessee and The University
                        of Tennessee Research Foundation.  All rights
                        reserved.
Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, 
                        University of Stuttgart.  All rights reserved.
Copyright (c) 2004-2006 The Regents of the University of California.
                        All rights reserved.
Copyright (c) 2006      Cisco Systems, Inc.  All rights reserved.
$COPYRIGHT$

Additional copyrights may follow

$HEADER$

===========================================================================

The buildrpm.sh script takes a single argument -- a filename pointing
to an Open MPI tarball (may be either .gz or .bz2).  It will create
one or more RPMs from this tarball:

1. Source RPM
2. "All in one" RPM, where all of Open MPI is put into a single RPM.
3. "Multiple" RPM, where Open MPI is split into several sub-package
   RPMs:
   - openmpi-runtime
   - openmpi-devel
   - openmpi-docs (not currently generated because we have no docs; to
     be rectified soon!)

The prefix, target architecture, and choice of RPM(s) to build are all
currently hard-coded in the beginning of the buildrpm.sh script.

Alternatively, you can build directly from the openmpi.spec spec file
or SRPM directly.  The following options are permissable on the
"rpmbuild" command line via the --define option:

- lanl: 0 or 1 (default: 0)
  A shortcut for several Los Alamos-specific options (see specfile for
  current list of values -- look for "%if %{lanl}").  

- install_in_opt: 0 or 1 (default: 0)
  If 1, use a prefix of /opt/openmpi/<version>-<release>.

- install_profile_d_scripts: 0 or 1 (default: 0)
  If 1, and install_in_opt is 1, then install the /etc/profile.d
  scripts.

- install_modulefile: 0 or 1 (default: 0)
  If 1 and if install_in_opt is 1, then install a modulefile in
  %{modulefile_path}/%{modulefile_subdir}/%{modulefile_name}

- modulefile_path: string (default: "/etc/modulefiles")
  Defaults to /etc/modulefiles

- modulefile_subdir: string (default: "openmpi")
  Defaults to openmpi

- modulefile_name: string (default: "%{version}")
  Defaults to %{version}

- modules_rpm_name: string ("modules")
  Name of the environment modules RPM to "require".

- build_debuginfo_rpm: 0 or 1 (default: 0)
  If 1, builds a corresponding debuginfo rpm.

- _prefix (etc.): string (default: supplied by rpmbuild)
  Prefix directory (all other standard names are also supported, such
  as _libdir, _sysconfdir, _includedir, etc.).

- configure_options: string (default: "")
  String to pass directly to the ./configure script.

- _packager: string (default: supplied by rpmbuild)
  Name of the packager

- _vendor: string (default: supplied by rpmbuild)
  Name of the vendor

- cflags: string (default: supplied by rpmbuild: $RPM_OPT_FLAGS)
  CFLAGS value to use

- cxxflags: string (default: supplied by rpmbuild: $RPM_OPT_FLAGS)
  CXXFLAGS value to use

- f77flags: string (default: supplied by rpmbuild: $RPM_OPT_FLAGS)
  F77FLAGS value to use

- fcflags: string (default: supplied by rpmbuild: $RPM_OPT_FLAGS)
  F90FLAGS value to use

- mflags: string (default: "")
  Flags to pass to the "make" [default] target during %build

- mflags_install: string (default: "")
  Flags to pass to the "make install" target during %install

- build_all_in_one_rpm: 0 or 1 (default: 1)
  If 1 (the default), make a single RPM that contains all of the Open
  MPI software.  If 0, build multiple sub-package RPMs to split up the
  Open MPI code into separate functional areas.  See the spec file for
  the exact division and subpackage definitions.

- name: string (default "openmpi")
  If set, used as the name of the RPM (useful if you want to add a
  compiler name -- or some other qualifier -- to the RPM name).