Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have source of webfiles. I need to make a RPM for it. I have placed my source in SOURCES folder and use following spec file. But it is creating noarch rpm with 2MB size, but my source is greater than 2MB size. Its also did not attach files with this. I think i have a problem in spec file.

Summary: my_project rpm script package
Name: my_project
Version: 1
Release: 1
Source0: my_project-1.tar.gz
License: GPL
Group: MyJunk
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-buildroot
Make some relevant package description here
%setup -q
install -m 0755 -d $RPM_BUILD_ROOT/opt/my_project
echo " "
echo "This will display after rpm installs the package!"
%dir /opt/my_project
share|improve this question
Need more info: What do you expect prep, build and install to do? Is this a binary you want to repack into an rpm? What are "webfiles"? – Nils Jan 31 '12 at 21:06

try removoing the %dir tag in the %files section. I.e.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.