Re: can't compile sfs from src.rpm

Matias Lopez Bergero <[email protected]> Tue, 30 May 2006 15:51:23 -0300
Newsgroups gmane.comp.file-systems.sfs.general
Message-ID <[email protected]>
Jaakko Niemi wrote:
> On Mon, 29 May 2006, Matias Lopez Bergero wrote:
> 
>>I'm trying to create the rpm file from the src.rpm due to a compile
>>error :-P
>>[...]
>>Here is the error message:
> [...]
>>Installing sfs-0.7.2-1.src.rpm
>>[...]
>>cc1plus: warnings being treated as errors
> [...]
>  Most of those warnings have been addressed in cvs. You can easily
>  work around those with for example turning off -Werror by giving
>  "WFLAGS=-Wall" to build enviroment. 

Many Thanks Jaakko!
That solved the problem. But I end in a new one:


...
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires: /bin/sh config(sfs-servers) = 0.7.2-1 libc.so.6
libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.3) libcrypt.so.1
libcrypt.so.1(GLIBC_2.0) libgcc_s.so.1 libgcc_s.so.1(GCC_3.0)
libgcc_s.so.1(GLIBC_2.0) libm.so.6 libnsl.so.1 libresolv.so.2
libresolv.so.2(GLIBC_2.0) libresolv.so.2(GLIBC_2.2) libstdc++.so.5
libstdc++.so.5(CXXABI_1.2) libstdc++.so.5(GLIBCPP_3.2) libutil.so.1
libutil.so.1(GLIBC_2.0) nfs-server
Processing files: sfs-debuginfo-0.7.2-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/sfs-0.7.2-buildroot
error: Installed (but unpackaged) file(s) found:
   /usr/info/dir


RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/info/dir

I solved this by issuing a remove command in at the end of the %install
step in the spec file like this:

%install
rm -rf $RPM_BUILD_ROOT
make install-strip DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/var/sfs $RPM_BUILD_ROOT/etc/sfs $RPM_BUILD_ROOT/sfs
install -D -m 755 etc/sfscd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sfscd
install -D -m 755 etc/sfssd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sfssd
rm -rf $RPM_BUILD_ROOT/usr/info/dir

After that, I issue the rpmbuild command to use that spec file to make
the rpm files :)

# WFLAGS=-Wall rpmbuild -bb /usr/src/redhat/SPECS/sfs-0.7.2.spec

HTH someone.

BR,
Matias.