Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 4edeb46676d2e1b8cee3dfcd2cca422c > files > 10

lvm2-2.02.33-3mnb2.src.rpm

%define	name	lvm2
%define	version	2.02.33
%define	release	%manbo_mkrel 3

%ifarch %{ix86} x86_64 ppc ppc64 %{sunsparc}
%define	use_dietlibc 1
%else
%define	use_dietlibc 0
%endif

%define	build_lvm2cmd 0
%define	build_cluster 0
%define	build_dmeventd 0

%{?_with_lvm2cmd: %{expand: %%global build_lvm2cmd 1}}
%{?_without_lvm2cmd: %{expand: %%global build_lvm2cmd 0}}
%{?_with_cluster: %{expand: %%global build_cluster 1}}
%{?_without_cluster: %{expand: %%global build_cluster 0}}
%{?_with_dietlibc: %{expand: %%global use_dietlibc 1}}
%{?_without_dietlibc: %{expand: %%global use_dietlibc 0}}
%{?_with_dmeventd: %{expand: %%global build_dmeventd 1}}
%{?_without_dmeventd: %{expand: %%global build_dmeventd 0}}

%if %build_lvm2cmd
%define	libname	%mklibname lvm2cmd 2
%define develname %mklibname -d lvm2cmd
%endif

Summary:	Logical Volume Manager administration tools
Name:		%{name}
Version:	%{version}
Release:	%{release}
Source0:	ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
Source1:	clvmd.init.bz2
Patch0:		lvm2-2.02.27-alternatives.patch
Patch1:		lvm2-2.02.27-diet.patch
Patch2:		lvm2-2.01.15-stdint.patch
Patch4:		lvm2-ignorelock.patch
Patch5:		lvm2-fdlog.patch
# fixes a 'conflicting types for '__daddr_t'' error caused by it also
# being declared in dietlibc - AdamW 2007/08
Patch6:		lvm2-2.02.27-types.patch
Patch7:		LVM2.2.02.31-uint64_max.patch
License:	GPL
Group:		System/Kernel and hardware
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
URL:		http://sources.redhat.com/lvm2/
BuildRequires:	device-mapper-devel >= 1.02.23
BuildRequires:	readline-devel
BuildRequires:	ncurses-devel
BuildRequires:	autoconf
Conflicts:	lvm
Conflicts:	lvm1
%if %{use_dietlibc}
BuildRequires:	dietlibc-devel
%else
BuildRequires:	glibc-static-devel
%endif
%if %{build_dmeventd}
BuildRequires:	device-mapper-event-devel >= 1.02
%endif

%description
LVM includes all of the support for handling read/write operations on
physical volumes (hard disks, RAID-Systems, magneto optical, etc.,
multiple devices (MD), see mdadm(8) or even loop devices, see losetup(8)),
creating volume groups (kind of virtual disks) from one or more physical
volumes and creating one or more logical volumes (kind of logical partitions)
in volume groups.

%if %build_lvm2cmd
%package -n	%{libname}
Summary:	LVM2 command line library
Group:		System/Kernel and hardware

%description -n	%{libname}
The lvm2 command line library allows building programs that manage
lvm devices without invoking a separate program.

%package -n	%{develname}
Summary:	Development files for LVM2 command line library
Group:		System/Kernel and hardware
Requires:	%{libname} = %{version}-%{release}
Provides:	lvm2cmd-devel = %{version}-%{release}
Obsoletes:	%{mklibname lvm2cmd 2 -d}

%description -n	%{develname}
The lvm2 command line library allows building programs that manage
lvm devices without invoking a separate program.
This package contains the header files for building with lvm2cmd.
%endif

%if %build_cluster
%package -n	clvmd
Summary:	cluster LVM daemon
Group:		System/Kernel and hardware
BuildRequires:	cluster-devel

%description -n	clvmd
clvmd is the daemon that distributes LVM metadata updates around a
cluster. It must be running on all nodes in the cluster and will give
an error if a node in the cluster does not have this daemon running.
%endif

%prep
%setup -q -n LVM2.%{version}
%patch0 -p1 -b .alternatives
%if %{use_dietlibc}
%patch1 -p1 -b .diet
%patch2 -p1 -b .stdint
%patch6 -p1 -b .types
%patch7 -p1 -b .uint64_max
%endif
%patch4 -p1 -b .ignorelock
%patch5 -p1 -b .fdlog

%build
autoconf # required by dietlibc patch
export ac_cv_lib_dl_dlopen=no
%if %{use_dietlibc}
# build fails with stack-protector enabled - 2007/08
export CFLAGS="%{optflags} -fno-stack-protector"
%endif
%configure --with-user=`id -un` --with-group=`id -gn` \
	--enable-static_link --disable-readline \
	--disable-selinux --with-cluster=none --with-pool=none
unset ac_cv_lib_dl_dlopen
%if %{use_dietlibc}
CC="diet gcc -DWRAPPER -D_BSD_SOURCE"
LVMLIBS="-llvm -ldevmapper-diet"
%else
CC="gcc -DWRAPPER"
LVMLIBS="-static -llvm -ldevmapper"
%endif
%make CC="$CC" LVMLIBS="$LVMLIBS"
cd tools
$CC -o lvm-static lvm.o lvmcmdline.o vgchange.o vgscan.o toollib.o vgmknodes.o pvmove.o polldaemon.o -L ../lib $LVMLIBS
cd ..
%make clean
%configure --with-user=`id -un` --with-group=`id -gn` \
	--disable-static_link --enable-readline \
	--disable-selinux  --enable-fsadm \
	--enable-nls --with-pool=internal \
%if %build_lvm2cmd
	--enable-cmdlib \
%endif
%if %build_cluster
	--with-clvmd=all --with-cluster=shared \
%endif
%if %{build_dmeventd}
	--enable-dmeventd \
%endif
# end of configure options
%make

%install
rm -rf %{buildroot}
%makeinstall sbindir=%{buildroot}/sbin confdir=%{buildroot}%{_sysconfdir}/lvm

install tools/lvm-static %{buildroot}/sbin/lvm.static
#compatibility links
ln %{buildroot}/sbin/lvm %{buildroot}/sbin/lvm2
ln %{buildroot}/sbin/lvm.static %{buildroot}/sbin/lvm2-static

%find_lang %name

%pre
if [ -L /sbin/lvm -a -L /etc/alternatives/lvm ]; then
	update-alternatives --remove lvm /sbin/lvm2
fi

%if %build_lvm2cmd
%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif
%endif

%clean
rm -rf %{buildroot}

%files -f %name.lang
%defattr(644,root,root,755)
%attr(755,root,root) /sbin/fsadm
%attr(755,root,root) /sbin/lv*
%attr(755,root,root) /sbin/pv*
%attr(755,root,root) /sbin/vg*
#{_libdir}/liblvm2format1.so*
#{_libdir}/liblvm2formatpool.so*
#{_libdir}/liblvm2mirror.so*
#{_libdir}/liblvm2snapshot.so*
%dir %{_sysconfdir}/lvm/
%config(noreplace) %{_sysconfdir}/lvm/lvm.conf
%{_mandir}/man5/*
%{_mandir}/man8/*
%doc INSTALL README VERSION WHATS_NEW

%if %build_lvm2cmd
%files -n %{libname}
%defattr(644,root,root,755)
%{_libdir}/liblvm2cmd.so*

%files -n %{develname}
%defattr(644,root,root,755)
%{_includedir}/lvm2cmd.h
%attr(755,root,root) %{_libdir}/liblvm2cmd.so
%endif
%if %build_cluster
%files -n clvmd
%defattr(755, root,root)
%config(noreplace) %{_initrddir}/clvmd
%{_sbindir}/clvmd
%{_libdir}/liblvm2clusterlock.so*
%attr(644,root,root) %{_mandir}/man8/clvmd.8*
%endif



%changelog
* Wed Aug 06 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.02.33-3mnb2
+ Revision: 265035
- rebuild early 2009.0 package (before pixel changes)

* Tue Jun 10 2008 Oden Eriksson <oeriksson@mandriva.com> 2.02.33-2mnb2
+ Revision: 217575
- rebuilt against dietlibc-devel-0.32

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Mon Feb 18 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.02.33-1mnb1
+ Revision: 170654
- replace %%mkrel with %%manbo_mkrel for Manbo Core 1

* Wed Feb 06 2008 Olivier Blin <oblin@mandriva.com> 2.02.33-1mdv2008.1
+ Revision: 163060
- 2.02.33

* Tue Feb 05 2008 Olivier Blin <oblin@mandriva.com> 2.02.31-2mdv2008.1
+ Revision: 162814
- build with ncurses instead of deprecated termcap

* Wed Jan 23 2008 Olivier Blin <oblin@mandriva.com> 2.02.31-1mdv2008.1
+ Revision: 157141
- do not install fsadm manually (now done by Makefile)
- define UINT64_MAX when building with dietlibc
- buildrequire device-mapper-devel >= 1.02.23 (for readahead support)
- 2.02.31

* Tue Jan 15 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.02.27-3mdv2008.1
+ Revision: 152884
- rebuild

* Tue Jan 15 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.02.27-2mdv2008.1
+ Revision: 152882
- rebuild
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Wed Aug 22 2007 Adam Williamson <awilliamson@mandriva.com> 2.02.27-1mdv2008.0
+ Revision: 69193
- fix typo
- disable stack protector (build fails if enabled)
- update buildrequires for dmeventd build (still disabled by default)
- add patch6 to fix a conflicting types error when building with dietlibc
- rediff and update patch0 and patch1
- new devel policy
- new release 2.02.27


* Mon Sep 11 2006 Luca Berra <bluca@comedia.it>
+ 2006-09-11 11:06:54 (60771)
New release 2.02.09

* Tue Jul 11 2006 Luca Berra <bluca@comedia.it>
+ 2006-07-11 22:16:08 (38858)
remove alternatives, but still keep lvm2 and lvm2-static links for compatibility with existing tools

* Tue Jul 11 2006 Luca Berra <bluca@comedia.it>
+ 2006-07-11 20:55:25 (38791)
create backup file when applying p6

* Tue Jul 11 2006 Pixel <pixel@mandriva.com>
+ 2006-07-11 13:01:44 (38772)
really apply patch6

* Tue Jul 11 2006 Pixel <pixel@mandriva.com>
+ 2006-07-11 12:30:34 (38771)
release fixed vgs for DrakX

* Tue Jul 11 2006 Pixel <pixel@mandriva.com>
+ 2006-07-11 12:29:14 (38770)
fix exit code for VG not found (bug #22968)

* Wed Jul 05 2006 Luca Berra <bluca@comedia.it>
+ 2006-07-05 09:11:45 (38381)
import lvm2-2.02.06-1mdv2007.0

* Sun May 28 2006 Luca Berra <bluca@vodka.it> 2.02.06-1mdv2007.0
- New release 2.02.06
- build against dietlibc on ppc64
- add an option for dietlibc build
- require new device-mapper

* Thu Apr 20 2006 Per Øyvind Karlsen <pkarlsen@mandriva.com> 2.01.15-4mdk
- build against dietlibc on sparc too

* Sun Jan 29 2006 Olivier Blin <oblin@mandriva.com> 2.01.15-3mdk
- fix 2.01.09-2mdk changelog date to match current lvm2 package in main i586

* Fri Jan 27 2006 Luca Berra <bluca@vodka.it> 2.01.15-2mdk
- Rebuild

* Sat Jan 21 2006 Luca Berra <bluca@vodka.it> 2.01.15-1mdk
- New release 2.01.15
- update p1 (diet)
- add missing defines in dietlibc (p2)

* Sun Jan 01 2006 Mandriva Linux Team <http://www.mandrivaexpert.com/> 2.01.09-2mdk
- Rebuild

* Sun Apr 17 2005 Luca Berra <bluca@vodka.it> 2.01.09-1mdk 
- 2.01.09
- part of p4 (ignorelockingfailure) was merged
- rediffed p5 (File descriptor left open)
- added support for GFS pool format
- added cluster build option and clvmd subpackage

* Tue Apr 05 2005 Luca Berra <bluca@vodka.it> 2.00.33-4mdk 
- add --ignorelockingfailure to vgmknodes (p4)
- silence annoyng "File descriptor left open" messages (p5)

* Sat Mar 05 2005 Luca Berra <bluca@vodka.it> 2.00.33-3mdk 
- remove require for libdevmapper1.00

* Sat Mar 05 2005 Luca Berra <bluca@vodka.it> 2.00.33-2mdk 
- rebuild for new libdevmapper

* Sat Jan 29 2005 Luca Berra <bluca@vodka.it> 2.00.33-1mdk 
- 2.00.33

* Thu Jan 20 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.00.32-2mdk
- rebuild for new readline

* Sat Jan 15 2005 Luca Berra <bluca@vodka.it> 2.00.32-1mdk 
- 2.0.32
- do not link static binary with libdl

* Fri Dec 24 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.00.31-1mdk
- 2.00.31
- cosmetics

* Sun Nov 28 2004 Luca Berra <bluca@vodka.it> 2.00.27-1mdk 
- 2.0.27

* Sun Nov 14 2004 Luca Berra <bluca@vodka.it> 2.00.25-1mdk 
- 2.0.25
- added fsadm
- enabled nls
- added support for building the command line library

* Tue Sep 07 2004 Luca Berra <bluca@mandrakesoft.com> 2.00.22-1mdk
- 2.00.22
- define _BSD_SOURCE when building with dietlibc
- drop p4 no longer needed

* Sun Aug 01 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.00.20-2mdk
- use dietlibc for static build on ppc as well
- add BuildRequires: glibc-static-devel for other archs

* Thu Jul 22 2004 Luca Berra <bluca@vodka.it> 2.00.20-1mdk 
- 2.00.20
- disabled selinux build
- added workaround for including fs.h with glibc 2.3.3 (p4)

* Tue Jun 29 2004 Luca Berra <bluca@vodka.it> 2.00.19-2mdk 
- really fix alternatives patch

* Tue Jun 29 2004 Luca Berra <bluca@vodka.it> 2.00.19-1mdk 
- 2.00.19
- rediffed p0 (alternatives) and p1 (diet)

* Mon May 24 2004 Luca Berra <bluca@vodka.it> 2.00.16-1mdk 
- 2.00.16

* Sat Apr 17 2004 Luca Berra <bluca@vodka.it> 2.00.14-1mdk 
- 2.00.14
- rediffed p0, p1, p3
- removed p2, p4, p5 merged upstream

* Sun Jan 25 2004 Luca Berra <bluca@vodka.it> 2.00.08-8mdk 
- patch to ignore devices that have an md superblock on them

* Fri Jan 23 2004 Luca Berra <bluca@vodka.it> 2.00.08-7mdk
- patch to fix uidless PVs created during 9.2 installation

* Sun Jan 04 2004 Luca Berra <bluca@vodka.it> 2.00.08-6mdk
- DIRM: /etc/lvm
- build vs termcap, not ncurses

* Mon Dec 29 2003 Stefan van der Eijk <stefan@eijk.nu> 2.00.08-5mdk
- BuildRequires

* Sat Dec 20 2003 Luca Berra <bluca@vodka.it> 2.00.08-4mdk
- fix annoying "setlocale failed" message in dietlibc version

* Sun Dec 14 2003 Luca Berra <bluca@vodka.it> 2.00.08-3mdk
- added vgmknodes to static/diet binary
- imported blksize64 patch from fedora
- use %%post -f for alternatives script
- lvm.conf is a config file

* Sat Nov 22 2003 Luca Berra <bluca@vodka.it> 2.00.08-2mdk
- built against device-mapper 1.00.07

* Thu Nov 20 2003 Luca Berra <bluca@vodka.it> 2.00.08-1mdk
- 2.0.08 stable
- added static/dietlibc version for initrd

* Tue Sep 16 2003 Luca Berra <bluca@vodka.it> 2.00.07-1mdk
- 2.00.07 stable