Hello.
I need some help in creating an rpm package for my Fedora boxes. I have never done this before but am following the tutoria at
http://fedoraproject.org/wiki/How_to...e#Introduction
This is what I want to do:
I want to create an rpm installation for Drupal (
http://drupal.org/)
I have gone so far as to create the spec file:
Code:
Name: drupal
Version: 6.25
Release: 1%{?dist}
Summary: Drupal installation RPM
License: GPLv2+
URL: http://drupal.org
Source0: http://ftp.drupal.org/files/projects/%{name}-%{version}.tar.gz
BuildRequires: mysql
Requires: mysql
%description
Installation file for drupal database
%prep
%setup -q -c drupal
%build
pwd
%install
ls $RPM_BUILD_ROOT
cp -rp $RPM_BUILD_DIR/%{name}-%{version}/* /var/www/html
%files
%doc
%changelog
which "compiles" ok:
Code:
$ rpmlint -i drupal.spec
0 packages and 1 specfiles checked; 0 errors, 0 warnings.
Now the idea when installing is to extract the tarball and copy the files into the folder /var/www/html. No making or configuring anything.
This is what I eventually get:
Code:
$ rpmbuild -ba drupal.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.7JAG0X
+ umask 022
+ cd /home/makerpm/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/makerpm/rpmbuild/BUILD
+ rm -rf drupal-6.25
+ /bin/mkdir -p drupal-6.25
+ cd drupal-6.25
+ /usr/bin/gzip -dc /home/makerpm/rpmbuild/SOURCES/drupal-6.25.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.pVDgqG
+ umask 022
+ cd /home/makerpm/rpmbuild/BUILD
+ cd drupal-6.25
+ LANG=C
+ export LANG
+ unset DISPLAY
+ pwd
/home/makerpm/rpmbuild/BUILD/drupal-6.25
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.TupaTo
+ umask 022
+ cd /home/makerpm/rpmbuild/BUILD
+ '[' /home/makerpm/rpmbuild/BUILDROOT/drupal-6.25-1.fc16.i386 '!=' / ']'
+ rm -rf /home/makerpm/rpmbuild/BUILDROOT/drupal-6.25-1.fc16.i386
++ dirname /home/makerpm/rpmbuild/BUILDROOT/drupal-6.25-1.fc16.i386
+ mkdir -p /home/makerpm/rpmbuild/BUILDROOT
+ mkdir /home/makerpm/rpmbuild/BUILDROOT/drupal-6.25-1.fc16.i386
+ cd drupal-6.25
+ LANG=C
+ export LANG
+ unset DISPLAY
+ ls /home/makerpm/rpmbuild/BUILDROOT/drupal-6.25-1.fc16.i386
+ cp -rp /home/makerpm/rpmbuild/BUILD/drupal-6.25/drupal-6.25 /var/www/html
cp: cannot create directory `/var/www/html/drupal-6.25': Permission denied
error: Bad exit status from /var/tmp/rpm-tmp.TupaTo (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.TupaTo (%install)
Help please