[lxc-devel] [PATCH 3/3] lxc-rpm-build

Stéphane Graber stgraber at ubuntu.com
Tue Sep 11 18:41:46 UTC 2012


On 12-09-11 02:30 PM, Dwight Engen wrote:
> On Mon, 10 Sep 2012 13:53:50 -0400
> Stéphane Graber <stgraber at ubuntu.com> wrote:
> 
> [...]
>>> The reason I changed them to expand was so the docs would be right
>>> (they had SUBST paths with ${var} still in them) but obviously I
>>> don't want to break code just to make the docs right :)
>>
>> I'm not actually expending breakage but I'm expecting some dead code.
>> For example @LXCPATH@ is used in most scripts using some workarounds
>> as the value wasn't expanded, like:
>> libdir=@LIBDIR@
>> libexecdir=@LIBEXECDIR@
>> localstatedir=@LOCALSTATEDIR@
>>
>> Once we apply your change, we'd have to check for such dead code and
>> clean it up.
> 
> Fixing the rpm build can be done without fixing the variable expand
> problem by using DESTDIR, so this is a split out of fixing the rpm
> build.
> 
> ---
> 
> 
> Fix rpm build, package templates.
> 
> Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
> ---
> diff --git a/lxc.spec.in b/lxc.spec.in
> index da7339a..e830305 100644
> --- a/lxc.spec.in
> +++ b/lxc.spec.in
> @@ -68,9 +68,9 @@ PATH=$PATH:/usr/sbin:/sbin %configure $args --disable-rpath
>  make %{?_smp_mflags}
>  
>  %install
> -%makeinstall
> -
> -find $RPM_BUILD_ROOT -type f -name '*.la' -exec rm -f {} ';'  
> +rm -rf %{buildroot}
> +make install DESTDIR=%{buildroot}
> +find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'  
>  
>  %clean
>  rm -rf %{buildroot}
> @@ -92,20 +92,26 @@ rm -rf %{buildroot}
>  %attr(4111,root,root) %{_bindir}/lxc-restart
>  %{_mandir}/*
>  %{_datadir}/doc/*
> +%{_datadir}/lxc/*
>  
>  %files libs
>  %defattr(-,root,root)
>  %{_libdir}/*.so.*
>  %{_libdir}/%{name}
> -%attr(4555,root,root) %{_libdir}/%{name}/lxc-init
> +%attr(4555,root,root) %{_libexecdir}/%{name}/lxc-init
>  
>  %files devel
>  %defattr(-,root,root)
>  %{_includedir}/%{name}/*
>  %{_libdir}/*.so
> -%{_datadir}/pkgconfig/*
> +%{_libdir}/pkgconfig/*
>  
>  %changelog
> +* Mon Sep 10 2012 Dwight Engen <dwight.engen at oracle.com> - Version 0.8.0
> +- fix lxc-init moved to libexec
> +- .pc moved to _libdir
> +- package template files /usr/share/lxc/templates
> +
>  * Thu Sep  8 2011 Greg Kurz <gkurz at fr.ibm.com> - Version 0.7.5.1
>  - fix installed files for rpmbuild
>  - introduce lxc-libs package

Thanks.

Pushed to staging tree, just removed a trailing space on the find line
and used the commit message from your initial patch minus the part of
variable expansion.


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20120911/34f18c2c/attachment.pgp>


More information about the lxc-devel mailing list