rpmbuild vmod-header woes

Mike Bailey Mike.Bailey at apn.co.nz
Fri May 9 02:36:21 CEST 2014


Hi Jason,

Thx for you reply.


·         Following your suggestion I updated the spec file to call configure as a macro rather than from the command line

·         The rpmbuild pkgs were in place

·         To kludge my way around the issue with the missing lib64 directory tree I slung a few shell commands under the %install macro to create the directory tree and then move the libraries into place

o    mkdir -p %{buildroot}/usr/lib64/varnish/vmods %{buildroot}/usr/share/doc/vmod-header

o    mv  %{buildroot}/usr/local/lib/varnish/vmods/libvmod_header.a  %{buildroot}/usr/lib64/varnish/vmods/

o    mv  %{buildroot}/usr/local/lib/varnish/vmods/libvmod_header.la %{buildroot}/usr/lib64/varnish/vmods/

o    mv  %{buildroot}/usr/local/lib/varnish/vmods/libvmod_header.so %{buildroot}/usr/lib64/varnish/vmods/

Still have to test the rpm pkg to see if it works with our varnish development environment

Thx again !

[APN NZ Media]<http://www.apn.co.nz/>

Mike Bailey
Senior Linux Administrator
P: 09 373 9554 M: 022 040 2787
E: mike.bailey at apn.co.nz<mailto:%20christine.thorpe at apn.co.nz>



From: Jason Woods [mailto:devel at jasonwoods.me.uk]
Sent: Wednesday, 7 May 2014 5:58 p.m.
To: Mike Bailey
Subject: Re: rpmbuild vmod-header woes

Hi Mike

On 7 May 2014, at 04:19, Mike Bailey <Mike.Bailey at apn.co.nz<mailto:Mike.Bailey at apn.co.nz>> wrote:
Hi,

We have been tasked with compiling/supporting several VMods. Among them is vmod-header https://github.com/varnish/libvmod-header

We will be deploying these VMods across a number of varnish servers [Red Hat Enterprise Linux Server release 6.5 (Santiago)]

Because of the number of servers; we are using rpmbuild to create a binary pkg for deployment. However the compilation has been a real effort. I have rpmbuild compiling the VMod code itself, but now there seems to be problems with creating the 64bit libraries or at least the of a 64bit library path.

The VMod code is somewhat dated (Oct 2012) so I thought perhaps there is something changes/dependencies that I am missing ?  I am finding it difficult to google any links for “ VMod” and  “rpmbuild”. A simple compile of the code works fine no issues. I was able to rpmbuild vmod-curl earlier today with virtually no issues. I really think this is primarily an rpmbuild issue, but perhaps someone reading this maillist might have some suggestions.

Thx in advance, I have listed the rpmbuild spec file and a tail of the rpmbuild output

Summary: Header VMOD for Varnish %{VARNISHVER}
Name: vmod-header
Version: 0.1
Release: 1%{?dist}
License: BSD
Group: System Environment/Daemons
Source0: ./libvmod-header.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: varnish > 3.0
BuildRequires: make, autoconf, automake, libtool, python-docutils

%description
Header VMOD for Varnish %{VARNISHVER}.

%prep
%setup -n libvmod-header

%build
# this assumes that VARNISHSRC is defined on the rpmbuild command line, like this:
# rpmbuild -bb --define 'VARNISHSRC /home/user/rpmbuild/BUILD/varnish-3.0.3' redhat/*spec
./configure VARNISHSRC=%{VARNISHSRC} VMODDIR="$(PKG_CONFIG_PATH=%{VARNISHSRC} pkg-config --variable=vmoddir varnishapi)" --prefix=/usr/ --docdir='${datarootdir}/doc/%{name}'

You aren't passing full path info here so libraries may end up in /lib instead of /lib64 etc

Usually the minimum is --prefix and --libdir but it all depends on the program's defaults.

Easiest way is make sure rpm-build-macro package is installed (I think it's called that) - it contains all the RedHat specific stuff.
Then use %configure instead of ./configure.
It will expand to a large ./configure containing all necessary paths.

Regards,

Jason


make
make check

%install
make install DESTDIR=%{buildroot}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_libdir}/varnish/vmods/
%doc /usr/share/doc/%{name}/*
%{_mandir}/man?/*

%changelog
* Wed Oct 03 2012 Lasse Karstensen <lasse at varnish-software.com<mailto:lasse at varnish-software.com>> - 0.1-0.20120918
- Initial version.

..................

Making install in src
make[1]: Entering directory `/home/mrbuild/rpmbuild/BUILD/libvmod-header/src'
make[2]: Entering directory `/home/mrbuild/rpmbuild/BUILD/libvmod-header/src'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/varnish/vmods" || /bin/mkdir -p "/home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/local/lib/varnish/vmods"
/bin/sh ../libtool   --mode=install /usr/bin/install -c   libvmod_header.la '/home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/local/lib/varnish/vmods'
libtool: install: /usr/bin/install -c .libs/libvmod_header.so /home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/local/lib/varnish/vmods/libvmod_header.so
libtool: install: /usr/bin/install -c .libs/libvmod_header.lai /home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/local/lib/varnish/vmods/libvmod_header.la
libtool: install: /usr/bin/install -c .libs/libvmod_header.a /home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/local/lib/varnish/vmods/libvmod_header.a
libtool: install: chmod 644 /home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/local/lib/varnish/vmods/libvmod_header.a
libtool: install: ranlib /home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/local/lib/varnish/vmods/libvmod_header.a
libtool: install: warning: remember to run `libtool --finish /usr/local/lib/varnish/vmods'
make[2]: Leaving directory `/home/mrbuild/rpmbuild/BUILD/libvmod-header/src'
make[1]: Leaving directory `/home/mrbuild/rpmbuild/BUILD/libvmod-header/src'
make[1]: Entering directory `/home/mrbuild/rpmbuild/BUILD/libvmod-header'
make[2]: Entering directory `/home/mrbuild/rpmbuild/BUILD/libvmod-header'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/share/doc/vmod-header" || /bin/mkdir -p "/home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/share/doc/vmod-header"
/usr/bin/install -c -m 644 README.rst LICENSE '/home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/share/doc/vmod-header'
test -z "/usr/share/man/man3" || /bin/mkdir -p "/home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/share/man/man3"
/usr/bin/install -c -m 644 vmod_header.3 '/home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/share/man/man3'
make[2]: Leaving directory `/home/mrbuild/rpmbuild/BUILD/libvmod-header'
make[1]: Leaving directory `/home/mrbuild/rpmbuild/BUILD/libvmod-header'
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id /home/mrbuild/rpmbuild/BUILD/libvmod-header
extracting debug info from /home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/local/lib/varnish/vmods/libvmod_header.so
133 blocks
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: vmod-header-0.1-1.el6.x86_64
error: File not found: /home/mrbuild/rpmbuild/BUILDROOT/vmod-header-0.1-1.el6.x86_64/usr/lib64/varnish/vmods

-mike


<image001.jpg><http://www.apn.co.nz/>

Mike Bailey
Senior Linux Administrator
P: 09 373 9554 M: 022 040 2787
E: mike.bailey at apn.co.nz<mailto:%20christine.thorpe at apn.co.nz>




______________________________________________________________________
NOTICE
This email and any attachments are strictly confidential and subject to copyright. They may contain privileged information. If you are not the intended recipient please delete the message and notify the sender. You should not read, copy, use, change, alter or disclose this email or its attachments without authorisation. The company and any related or associated companies do not accept any liability in connection with this email and any attachments including in connection with computer viruses, data corruption, delay, interruption, unauthorised access or unauthorised amendment. Any views expressed in this email and any attachments do not necessarily reflect the views of the company or the views of any of our related or associated companies.
______________________________________________________________________
_______________________________________________
varnish-misc mailing list
varnish-misc at varnish-cache.org<mailto:varnish-misc at varnish-cache.org>
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

______________________________________________________________________
NOTICE
This email and any attachments are strictly confidential and subject to copyright. They may contain privileged information. If you are not the intended recipient please delete the message and notify the sender. You should not read, copy, use, change, alter or disclose this email or its attachments without authorisation. The company and any related or associated companies do not accept any liability in connection with this email and any attachments including in connection with computer viruses, data corruption, delay, interruption, unauthorised access or unauthorised amendment. Any views expressed in this email and any attachments do not necessarily reflect the views of the company or the views of any of our related or associated companies.
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140509/3a36ab59/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2963 bytes
Desc: image001.jpg
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140509/3a36ab59/attachment-0001.jpg>


More information about the varnish-misc mailing list