0

I am trying to create rpm through rpm package manager. Following is my spec file:

**# This is a spec file for openldappkg**

%define _topdir /osp/rpmBuildOpenLdap
%define name    openldap
%define release 1
%define version     2.4.30
%define buildroot   %{_topdir}/%{name}-%{version}-root

BuildRoot:  %{buildroot}
Summary:        openldap pkg
License:        GPL
Name:       %{name}
Version:        %{version}
Release:        %{release}
Source:         %{name}-%{version}.tgz
Prefix:         /usr
Group:          

%description
The openldap pkg program downloads files installs openldap for use.

%prep
%setup -q

%build
./configure
make

%install
make install prefix=$RPM_BUILD_ROOT/usr

############################################################

And below is the error I am getting:

{some part of log is skipped}

Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.60752
+ umask 022
+ cd /osp/rpmBuildOpenLdap/BUILD
+ cd openldap-2.4.30
+ LANG=C
+ export LANG
+ unset DISPLAY
+ ./configure
/var/tmp/rpm-tmp.60752: line 30: ./configure: Permission denied
error: Bad exit status from /var/tmp/rpm-tmp.60752 (%build)

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

#

When I have installed the package directly by ./configure -> make -> make install It was sucessfuly installed but when I am trying to create a package through rpm then the problem is coming.

Please give your valuable suggestion.

Thanking you.

2 Answers 2

1

Is it possible the temp directory is mounted noexec?

Just noticed I missed which directory configure was running out of - should be "is it possible some part of /osp/rpmBuildOpenLdap/BUILD is mounted noexec?"

2
  • I will check this out and let you know.
    – Infotechie
    Apr 26, 2012 at 17:05
  • No, it is not mounted noexec as below value is present in etc/fstab file: LABEL=/tmp /tmp ext3 defaults 1 2 Same for /osp/rpmBuildOpenLdap/BUILD directory.
    – Infotechie
    Apr 27, 2012 at 4:18
1

Finally got the problem. Problem lies in the source.

I wanted to replace some files in the source with files modified as per my requirements and for doing so I was unzipping the original source file and putting modified files and then zipping it back.

Now, when I am creating package with this changed source the permission denied error is coming. Though my problem is not resolved but still I found the root cause. Just wanted to share with everyone.

Thanks.

1
  • Did you find the root reason of this? I also have such bugs. Thanks.
    – user151053
    Dec 27, 2012 at 10:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .