List:Packagers« Previous MessageNext Message »
From:Tinni Date:April 10 2005 9:50pm
Subject:How to create rpm from source
View as plain text  

For my project, I  was trying to create the 'rpm' from source mysql but
the error is  coming when i am executing the .spec file..

I have executed the .spec file with,

$:\rpmbuild -ba mysql-4.1.11-1.spec

Here is the spec file::
Summary: A program for mysql Standard installatin.
Name: mysql
Version: 4.1
Release: 11
Copyright: GPL
Group: System Environment/Base
BuildRoot: /local/rh9/%{name}-buildroot

BuildRoot: /local/rh9/%{name}-buildroot

This is mysql server ,creating for testing

%setup -n mysql-standard-4.1.11-unknown-linux-gnu-ia64-glibc23
./configure --prefix=/local/rh9/mysql

rm -rf ${buildroot}
mkdir -p ${buildroot}
mkdir -p ${buildroot}
make install prefix=%{buildroot}

rm -rf ${buildroot}

%attr(0755, root, bin) /usr/local/bin/mysql
%attr(0644, root, bin) /usr/local/bin/man1/mysql.1

HEre is the last few lines of the errors::


___+ cd /usr/src/redhat/BUILD
+ cd mysql-standard-4.1.11-unknown-linux-gnu-ia64-glibc23
+ export LANG
+ ./configure --prefix=/local/rh9/mysql
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble,
consult the MySQL manual, that you can find in the Docs directory.

./scripts/mysql_install_db: line 1: ./bin/my_print_defaults: cannot
execute binary file
Neither host 'datta.localdomain' nor 'localhost' could be looked up
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.23972
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd mysql-standard-4.1.11-unknown-linux-gnu-ia64-glibc23
+ export LANG
+ rm -rf
+ mkdir -p
mkdir: too few arguments
Try `mkdir --help' for more information.
error: Bad exit status from /var/tmp/rpm-tmp.23972 (%install)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.23972 (%install)

I am creating  the binary from the source first time. I am not sure
though of the .spec file.  Any pointer is highly appreciated.


Yahoo! India Matrimony: Find your life partner online
Go to:
How to create rpm from sourceTinni10 Apr
  • Re: How to create rpm from sourceMichael Shigorin11 Apr
  • Re: How to create rpm from sourceLenz Grimmer12 Apr