0

Following all the random guides on the net and even on here: What is the minimum I have to do to create an RPM file?

Nothing seems to work with Centos 7 (surprise!)

It seems if you leave %prep in your spec file, rpmbuild will try its hardest to ./configure and make something. what I'm not sure. here is a super basic .spec file I'm trying to make an rpm to just copy in a file.

$more newpackage.spec 

Name: hello
Version: 1.2
Release: 1%{?dist}
Summary: Testing testing 1 2 3
License: Beer
URL: No
#so apparently now you have to have version numbers everywhere, even the tar files, uhg
Source0: hello-1.2.tar.gz
#and the breaking begins :-( why everything broke with you centos 7?
# BuildRoot: %{_tmppath}/%{name}-%{version}-root
# BuildRequires:
# Requires:
%description
nothing to see here folks


#well here is some of the confusion
#%prep
%setup -q

# ./configure missing? um yeahhhh
# %build
# %configure
# make %{?_smp_mflags}

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}


%files
#/usr/bin/hello.sh
%{_bindir}/hello.sh

# %doc


# %changelog

in side the tar file is /usr/bin/hello.sh which is shell script that just runs echo "hello world"

if i comment %prep rpmbuild complains about ./configure not being found.

rpmbuild -v -bb newpackage.spec
Community
  • 1
  • 1

1 Answers1

0

Looks like commenting out %build dosen't actully stop rpmbuild from trying to build the sources... so if i DELETE out %build and %configure and that make line. things work

  • This is a real PITA bug with RPM. The `%build` is "commented out" but it still expands, so you actually only commented out the first line of the macro! To comment it out, you need to make it: `# %%build` to escape out the `%`. – Aaron D. Marasco Feb 28 '15 at 13:18