another attempt at fixing to work with new version of rpm
This commit is contained in:
parent
7ffba3cde9
commit
979b520f29
244
lvm2-config.patch
Normal file
244
lvm2-config.patch
Normal file
@ -0,0 +1,244 @@
|
||||
--- LVM2.2.02.39-5/configure 2008-06-27 20:57:27.000000000 +0100
|
||||
+++ LVM2.2.02.39/configure 2008-10-07 16:38:03.000000000 +0100
|
||||
@@ -731,6 +731,8 @@
|
||||
STATICDIR
|
||||
STATIC_LINK
|
||||
LIB_PTHREAD
|
||||
+usrlibdir
|
||||
+usrsbindir
|
||||
LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
ac_precious_vars='build_alias
|
||||
@@ -1353,6 +1355,8 @@
|
||||
--with-confdir=DIR Configuration files in DIR /etc
|
||||
--with-staticdir=DIR Static binary in DIR EXEC_PREFIX/sbin
|
||||
--with-dmdir=DIR Build against device-mapper source tree in DIR
|
||||
+ --with-usrlibdir=DIR
|
||||
+ --with-usrsbindir=DIR
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
@@ -9770,6 +9774,24 @@
|
||||
*) DMDIR="`pwd`/$DMDIR" ;;
|
||||
esac
|
||||
|
||||
+
|
||||
+# Check whether --with-usrlibdir was given.
|
||||
+if test "${with_usrlibdir+set}" = set; then
|
||||
+ withval=$with_usrlibdir; usrlibdir="$withval"
|
||||
+else
|
||||
+ usrlibdir='${prefix}/lib'
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
+# Check whether --with-usrsbindir was given.
|
||||
+if test "${with_usrsbindir+set}" = set; then
|
||||
+ withval=$with_usrsbindir; usrsbindir="$withval"
|
||||
+else
|
||||
+ usrsbindir='${prefix}/sbin'
|
||||
+fi
|
||||
+
|
||||
+
|
||||
################################################################################
|
||||
if test x$READLINE = xyes; then
|
||||
|
||||
@@ -11435,6 +11457,8 @@
|
||||
|
||||
|
||||
|
||||
+
|
||||
+
|
||||
################################################################################
|
||||
ac_config_files="$ac_config_files Makefile make.tmpl include/Makefile lib/Makefile man/Makefile po/Makefile dmeventd/Makefile daemons/Makefile daemons/clvmd/Makefile dmeventd/mirror/Makefile dmeventd/snapshot/Makefile doc/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/snapshot/Makefile test/Makefile scripts/Makefile tools/Makefile tools/version.h"
|
||||
|
||||
@@ -12233,10 +12257,12 @@
|
||||
STATICDIR!$STATICDIR$ac_delim
|
||||
STATIC_LINK!$STATIC_LINK$ac_delim
|
||||
LIB_PTHREAD!$LIB_PTHREAD$ac_delim
|
||||
+usrlibdir!$usrlibdir$ac_delim
|
||||
+usrsbindir!$usrsbindir$ac_delim
|
||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
|
||||
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
--- LVM2.2.02.39-5/configure.in 2008-06-27 20:57:27.000000000 +0100
|
||||
+++ LVM2.2.02.39/configure.in 2008-10-07 16:37:57.000000000 +0100
|
||||
@@ -568,6 +568,16 @@
|
||||
*) DMDIR="`pwd`/$DMDIR" ;;
|
||||
esac
|
||||
|
||||
+AC_ARG_WITH(usrlibdir,
|
||||
+ [ --with-usrlibdir=DIR],
|
||||
+ [ usrlibdir="$withval"],
|
||||
+ [ usrlibdir='${prefix}/lib' ])
|
||||
+
|
||||
+AC_ARG_WITH(usrsbindir,
|
||||
+ [ --with-usrsbindir=DIR],
|
||||
+ [ usrsbindir="$withval"],
|
||||
+ [ usrsbindir='${prefix}/sbin' ])
|
||||
+
|
||||
################################################################################
|
||||
dnl -- Ensure additional headers required
|
||||
if test x$READLINE = xyes; then
|
||||
@@ -660,6 +670,8 @@
|
||||
AC_SUBST(STATICDIR)
|
||||
AC_SUBST(STATIC_LINK)
|
||||
AC_SUBST([LIB_PTHREAD])
|
||||
+AC_SUBST(usrlibdir)
|
||||
+AC_SUBST(usrsbindir)
|
||||
|
||||
################################################################################
|
||||
dnl -- First and last lines should not contain files to generate in order to
|
||||
--- LVM2.2.02.39-5/daemons/clvmd/Makefile.in 2008-05-19 21:06:33.000000000 +0100
|
||||
+++ LVM2.2.02.39/daemons/clvmd/Makefile.in 2008-10-07 16:37:57.000000000 +0100
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
install_clvmd: $(TARGETS)
|
||||
$(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) clvmd \
|
||||
- $(sbindir)/clvmd
|
||||
+ $(usrsbindir)/clvmd
|
||||
|
||||
install: $(INSTALL_TARGETS)
|
||||
|
||||
--- LVM2.2.02.39-5/device-mapper.1.02.27/configure 2008-06-06 21:44:35.000000000 +0100
|
||||
+++ LVM2.2.02.39/device-mapper.1.02.27/configure 2008-10-07 16:38:08.000000000 +0100
|
||||
@@ -732,6 +732,7 @@
|
||||
kernelvsn
|
||||
tmpdir
|
||||
usrlibdir
|
||||
+usrsbindir
|
||||
LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
ac_precious_vars='build_alias
|
||||
@@ -1336,6 +1337,8 @@
|
||||
--with-device-mode=MODE Set the mode used for new device nodes [MODE=0600]
|
||||
--with-optimisation=OPT C optimisation flag [OPT=-O2]
|
||||
--with-localedir=DIR Translation files in DIR [PREFIX/share/locale]
|
||||
+ --with-usrlibdir=DIR
|
||||
+ --with-usrsbindir=DIR
|
||||
--with-kernel-dir=DIR linux kernel source in DIR
|
||||
--with-kernel-version=VERSION linux kernel version
|
||||
--with-tmp-dir=DIR temp dir to make kernel patches [/tmp/kerndiff]
|
||||
@@ -1974,9 +1977,6 @@
|
||||
esac
|
||||
|
||||
################################################################################
|
||||
-usrlibdir='${prefix}/lib'
|
||||
-
|
||||
-################################################################################
|
||||
for ac_prog in gawk mawk nawk awk
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
@@ -8766,6 +8766,25 @@
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
+
|
||||
+# Check whether --with-usrlibdir was given.
|
||||
+if test "${with_usrlibdir+set}" = set; then
|
||||
+ withval=$with_usrlibdir; usrlibdir="$withval"
|
||||
+else
|
||||
+ usrlibdir='${prefix}/lib'
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
+# Check whether --with-usrsbindir was given.
|
||||
+if test "${with_usrsbindir+set}" = set; then
|
||||
+ withval=$with_usrsbindir; usrsbindir="$withval"
|
||||
+else
|
||||
+ usrsbindir='${prefix}/sbin'
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+################################################################################
|
||||
{ echo "$as_me:$LINENO: checking for kernel directory" >&5
|
||||
echo $ECHO_N "checking for kernel directory... $ECHO_C" >&6; }
|
||||
|
||||
@@ -8975,6 +8994,7 @@
|
||||
|
||||
|
||||
|
||||
+
|
||||
################################################################################
|
||||
ac_config_files="$ac_config_files Makefile make.tmpl include/Makefile dmsetup/Makefile lib/Makefile lib/libdevmapper.pc dmeventd/Makefile dmeventd/libdevmapper-event.pc kernel/Makefile man/Makefile po/Makefile"
|
||||
|
||||
@@ -9763,10 +9783,11 @@
|
||||
kernelvsn!$kernelvsn$ac_delim
|
||||
tmpdir!$tmpdir$ac_delim
|
||||
usrlibdir!$usrlibdir$ac_delim
|
||||
+usrsbindir!$usrsbindir$ac_delim
|
||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
|
||||
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
--- LVM2.2.02.39-5/device-mapper.1.02.27/configure.in 2008-06-06 21:44:35.000000000 +0100
|
||||
+++ LVM2.2.02.39/device-mapper.1.02.27/configure.in 2008-10-07 16:37:57.000000000 +0100
|
||||
@@ -62,10 +62,6 @@
|
||||
esac
|
||||
|
||||
################################################################################
|
||||
-dnl -- Additional library location
|
||||
-usrlibdir='${prefix}/lib'
|
||||
-
|
||||
-################################################################################
|
||||
dnl -- Check for programs.
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CC
|
||||
@@ -332,6 +328,17 @@
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
+AC_ARG_WITH(usrlibdir,
|
||||
+ [ --with-usrlibdir=DIR],
|
||||
+ [ usrlibdir="$withval"],
|
||||
+ [ usrlibdir='${prefix}/lib' ])
|
||||
+
|
||||
+AC_ARG_WITH(usrsbindir,
|
||||
+ [ --with-usrsbindir=DIR],
|
||||
+ [ usrsbindir="$withval"],
|
||||
+ [ usrsbindir='${prefix}/sbin' ])
|
||||
+
|
||||
+################################################################################
|
||||
dnl -- Where the linux src tree is
|
||||
AC_MSG_CHECKING(for kernel directory)
|
||||
AC_ARG_WITH(kerneldir,
|
||||
@@ -495,6 +502,7 @@
|
||||
AC_SUBST(kernelvsn)
|
||||
AC_SUBST(tmpdir)
|
||||
AC_SUBST(usrlibdir)
|
||||
+AC_SUBST(usrsbindir)
|
||||
|
||||
################################################################################
|
||||
dnl -- First and last lines should not contain files to generate in order to
|
||||
--- LVM2.2.02.39-5/device-mapper.1.02.27/make.tmpl.in 2008-06-06 21:44:35.000000000 +0100
|
||||
+++ LVM2.2.02.39/device-mapper.1.02.27/make.tmpl.in 2008-10-07 16:37:57.000000000 +0100
|
||||
@@ -39,6 +39,7 @@
|
||||
libdir = $(DESTDIR)@libdir@
|
||||
usrlibdir = $(DESTDIR)@usrlibdir@
|
||||
sbindir = $(DESTDIR)@sbindir@
|
||||
+usrsbindir = $(DESTDIR)@usrsbindir@
|
||||
infodir = $(DESTDIR)@infodir@
|
||||
mandir = $(DESTDIR)@mandir@
|
||||
localedir = $(DESTDIR)@LOCALEDIR@
|
||||
--- LVM2.2.02.39-5/make.tmpl.in 2008-06-27 20:24:17.000000000 +0100
|
||||
+++ LVM2.2.02.39/make.tmpl.in 2008-10-07 16:37:57.000000000 +0100
|
||||
@@ -41,7 +41,9 @@
|
||||
confdir = $(DESTDIR)@CONFDIR@/lvm
|
||||
includedir = $(DESTDIR)@includedir@
|
||||
libdir = $(DESTDIR)@libdir@
|
||||
+usrlibdir = $(DESTDIR)@usrlibdir@
|
||||
sbindir = $(DESTDIR)@sbindir@
|
||||
+usrsbindir = $(DESTDIR)@usrsbindir@
|
||||
infodir = $(DESTDIR)@infodir@
|
||||
mandir = $(DESTDIR)@mandir@
|
||||
localedir = $(DESTDIR)@LOCALEDIR@
|
34
lvm2.spec
34
lvm2.spec
@ -6,7 +6,7 @@
|
||||
Summary: Userland logical volume management tools
|
||||
Name: lvm2
|
||||
Version: 2.02.39
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
URL: http://sources.redhat.com/lvm2
|
||||
@ -15,6 +15,7 @@ Source1: device-mapper.%{device_mapper_version}.tgz
|
||||
|
||||
# Customise lvmconf.sh for built-in clustered locking in Fedora
|
||||
Patch0: cluster-locking-built-in.patch
|
||||
Patch1: lvm2-config.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
|
||||
@ -39,22 +40,26 @@ or more physical volumes and creating one or more logical volumes
|
||||
%setup -q -n LVM2.%{version}
|
||||
%setup -q -T -D -a 1 -n LVM2.%{version}
|
||||
%patch0 -p1 -b .locking
|
||||
%patch1 -p0 -b .config
|
||||
|
||||
%build
|
||||
cd device-mapper.%{device_mapper_version}
|
||||
%define _exec_prefix ""
|
||||
%configure --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig
|
||||
make
|
||||
cd ..
|
||||
%configure --enable-lvm1_fallback --enable-fsadm --with-clvmd=cman --with-cluster=internal --with-pool=internal --with-user= --with-group= --with-dmdir=device-mapper.%{device_mapper_version}
|
||||
make DESTDIR=$RPM_BUILD_ROOT
|
||||
%define _exec_prefix /
|
||||
|
||||
cd device-mapper.%{device_mapper_version}
|
||||
%configure --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --with-usrlibdir=/usr/%{_lib} --with-usrsbindir=/usr/sbin
|
||||
|
||||
cd ..
|
||||
%configure --enable-lvm1_fallback --enable-fsadm --with-clvmd=cman --with-cluster=internal --with-pool=internal --with-user= --with-group= --with-dmdir=device-mapper.%{device_mapper_version} --with-usrlibdir=/usr/%{_lib} --with-usrsbindir=/usr/sbin
|
||||
|
||||
cd device-mapper.%{device_mapper_version}
|
||||
make DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
cd ..
|
||||
make DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
rm -f $RPM_BUILD_ROOT/sbin/clvmd
|
||||
make install_cluster DESTDIR=$RPM_BUILD_ROOT sbindir=$RPM_BUILD_ROOT/usr/sbin
|
||||
install -m 0700 -d $RPM_BUILD_ROOT/etc/lvm/archive
|
||||
install -m 0700 -d $RPM_BUILD_ROOT/etc/lvm/backup
|
||||
install -m 0700 -d $RPM_BUILD_ROOT/etc/lvm/cache
|
||||
@ -62,11 +67,10 @@ install -m 0700 -d $RPM_BUILD_ROOT/var/lock/lvm
|
||||
install -m 0600 /dev/null $RPM_BUILD_ROOT/etc/lvm/cache/.cache
|
||||
mkdir -p -m755 $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
install scripts/clvmd_init_rhel4 $RPM_BUILD_ROOT/etc/rc.d/init.d/clvmd
|
||||
mkdir -p -m755 $RPM_BUILD_ROOT/sbin
|
||||
install -m 0755 scripts/lvmconf.sh $RPM_BUILD_ROOT/sbin/lvmconf
|
||||
|
||||
cd device-mapper.%{device_mapper_version}
|
||||
make install DESTDIR=$RPM_BUILD_ROOT usrlibdir=$RPM_BUILD_ROOT/usr/%{_lib} exec_prefix=
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -271,6 +275,9 @@ This package contains the device-mapper shared library, libdevmapper.
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Oct 7 2008 Alasdair Kergon <agk@redhat.com>> - 2.02.39-6
|
||||
- Only set exec_prefix once and add usrsbindir to work with new version of RPM.
|
||||
|
||||
* Fri Sep 26 2008 Fabio M. Di Nitto <fdinitto@redhat.cm> - 2.02.39-5
|
||||
- Add BuildRequires on cmanlib-devel. This is required after libcman split
|
||||
from cman and cman-devel into cmanlib and cmanlib-devel.
|
||||
@ -280,9 +287,6 @@ This package contains the device-mapper shared library, libdevmapper.
|
||||
* Thu Sep 25 2008 Fabio M. Di Nitto <fdinitto@redhat.cm> - 2.02.39-5
|
||||
- Add versioned BuildRequires on new cman-devel.
|
||||
|
||||
* Wed Sep 24 2008 Alasdair Kergon <agk@redhat.com>> - 2.02.39-5
|
||||
- Explicitly create /sbin in the build root.
|
||||
|
||||
* Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 2.02.39-5
|
||||
- Change %%patch to %%patch0 to match Patch0 as required by RPM package update.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user