commit:     d29d35d22c47eed852d95cd7ea5b313d1c51929d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 21 20:50:46 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Mar 21 20:50:46 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=d29d35d2

Fix compilation of dmraid

Fixes: https://bugs.gentoo.org/642988
Fixes: https://bugs.gentoo.org/644094
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_compile.sh                                     | 23 +++++++++++-----------
 .../dmraid-1.0.0.rc16-3-staticlink.patch           |  0
 .../dmraid-1.0.0_rc16-parallel-make.patch          | 11 +++++++++++
 .../dmraid-1.0.0_rc16-return-all-sets.patch        |  0
 .../dmraid-1.0.0_rc16-static-build-fixes.patch     |  0
 .../dmraid-1.0.0_rc16-undo-p-rename.patch          |  0
 patches/dmraid/dmraid-1.0.0_rc16-as-needed2.patch  | 11 -----------
 7 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/gen_compile.sh b/gen_compile.sh
index c4a6665..7c38859 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -653,8 +653,11 @@ compile_mdadm() {
 
 compile_dmraid() {
        compile_device_mapper
-       if [ ! -f "${DMRAID_BINCACHE}" ]
+
+       if [[ -f "${DMRAID_BINCACHE}" && "${DMRAID_BINCACHE}" -nt 
"${LVM_BINCACHE}" ]]
        then
+               print_info 1 "$(getIndent 3)dmraid: >> Using cache"
+       else
                [ -f "${DMRAID_SRCTAR}" ] ||
                        gen_die "Could not find DMRAID source tarball: 
${DMRAID_SRCTAR}! Please place it there, or place another version, changing 
/etc/genkernel.conf as necessary!"
                cd "${TEMP}"
@@ -663,21 +666,19 @@ compile_dmraid() {
                        gen_die 'Could not extract DMRAID source tarball!'
                [ -d "${DMRAID_DIR}" ] ||
                        gen_die "DMRAID directory ${DMRAID_DIR} is invalid!"
+
                rm -rf "${TEMP}/lvm" > /dev/null
                mkdir -p "${TEMP}/lvm"
                /bin/tar -xpf "${LVM_BINCACHE}" -C "${TEMP}/lvm" ||
                        gen_die "Could not extract LVM2 binary cache!";
 
-               cd "${DMRAID_DIR}"
+               print_info 1 "$(getIndent 3)dmraid: >> Patching ..."
+               cd "${DMRAID_DIR}" || gen_die "cannot chdir into 
'${DMRAID_DIR}'"
                apply_patches dmraid ${DMRAID_VER}
-               print_info 1 "$(getIndent 3)dmraid: >> Configuring..."
 
-               LDFLAGS="-L${TEMP}/lvm/lib" \
-               CFLAGS="-I${TEMP}/lvm/include" \
+               print_info 1 "$(getIndent 3)dmraid: >> Configuring..."
                DEVMAPPEREVENT_CFLAGS="-I${TEMP}/lvm/include" \
-               CPPFLAGS="-I${TEMP}/lvm/include" \
-               LIBS="-ldevmapper -lm -lrt -lpthread" \
-               LDFLAGS='-Wl,--no-as-needed' \
+               LIBS="-lm -lrt -lpthread" \
                ./configure --enable-static_link \
                        --with-devmapper-prefix="${TEMP}/lvm" \
                        --prefix=${TEMP}/dmraid >> ${LOGFILE} 2>&1 ||
@@ -689,13 +690,13 @@ compile_dmraid() {
                ###echo "DMRAIDLIBS += -lselinux -lsepol" >> tools/Makefile
                mkdir -p "${TEMP}/dmraid"
                print_info 1 "$(getIndent 3)dmraid: >> Compiling..."
-               # Force dmraid to be built with -j1 for bug #188273
-               MAKEOPTS="${MAKEOPTS} -j1" compile_generic '' utils
+               compile_generic '' utils
                #compile_generic 'install' utils
                mkdir ${TEMP}/dmraid/sbin
                install -m 0755 -s tools/dmraid "${TEMP}/dmraid/sbin/dmraid"
+
                print_info 1 "$(getIndent 3)dmraid: >> Copying to bincache..."
-               cd "${TEMP}/dmraid"
+               cd "${TEMP}/dmraid" || gen_die "cannot chdir into 
'${TEMP}/dmraid'"
                /bin/tar -cjf "${DMRAID_BINCACHE}" sbin/dmraid ||
                        gen_die 'Could not create binary cache'
 

diff --git a/patches/dmraid/dmraid-1.0.0.rc16-3-staticlink.patch 
b/patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0.rc16-3-staticlink.patch
similarity index 100%
rename from patches/dmraid/dmraid-1.0.0.rc16-3-staticlink.patch
rename to patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0.rc16-3-staticlink.patch

diff --git a/patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-parallel-make.patch 
b/patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-parallel-make.patch
new file mode 100644
index 0000000..8c89374
--- /dev/null
+++ b/patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-parallel-make.patch
@@ -0,0 +1,11 @@
+--- dmraid/1.0.0.rc16-3/dmraid/lib/Makefile.in.orig    2016-09-20 
12:54:09.416628404 +0200
++++ dmraid/1.0.0.rc16-3/dmraid/lib/Makefile.in 2016-09-20 12:55:06.343698229 
+0200
+@@ -79,7 +79,7 @@
+               -Wl,-soname,$(notdir $@).$(DMRAID_LIB_MAJOR) \
+               $(DEVMAPPEREVENT_LIBS) $(DEVMAPPER_LIBS) $(DL_LIBS) $(LIBS)
+ 
+-$(LIB_EVENTS_SHARED): $(OBJECTS2)
++$(LIB_EVENTS_SHARED): $(OBJECTS2) $(LIB_SHARED)
+       $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJECTS2) \
+               -shared -Wl,--discard-all -Wl,--no-undefined 
-Wl,-soname,$(notdir $@) \
+               $(LIB_SHARED) $(DEVMAPPEREVENT_LIBS) $(DEVMAPPER_LIBS) 
$(PTHREAD_LIBS) $(LIBS)

diff --git a/patches/dmraid/dmraid-1.0.0_rc16-return-all-sets.patch 
b/patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-return-all-sets.patch
similarity index 100%
rename from patches/dmraid/dmraid-1.0.0_rc16-return-all-sets.patch
rename to patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-return-all-sets.patch

diff --git a/patches/dmraid/dmraid-1.0.0_rc16-static-build-fixes.patch 
b/patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-static-build-fixes.patch
similarity index 100%
rename from patches/dmraid/dmraid-1.0.0_rc16-static-build-fixes.patch
rename to patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-static-build-fixes.patch

diff --git a/patches/dmraid/dmraid-1.0.0_rc16-undo-p-rename.patch 
b/patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-undo-p-rename.patch
similarity index 100%
rename from patches/dmraid/dmraid-1.0.0_rc16-undo-p-rename.patch
rename to patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-undo-p-rename.patch

diff --git a/patches/dmraid/dmraid-1.0.0_rc16-as-needed2.patch 
b/patches/dmraid/dmraid-1.0.0_rc16-as-needed2.patch
deleted file mode 100644
index cf30188..0000000
--- a/patches/dmraid/dmraid-1.0.0_rc16-as-needed2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 1.0.0.rc16/make.tmpl.in    2010-08-16 10:22:32.000000000 -0400
-+++ 1.0.0.rc16/make.tmpl.in    2010-08-16 10:42:49.000000000 -0400
-@@ -136,7 +136,7 @@
- 
- %.so: $(OBJECTS)
-       $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
--      -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event
-+      $(LDFLAGS) -Wl,--version-script,.export.sym $(OBJECTS) -o $@ 
-ldevmapper-event -ldl
- 
- $(LIB_STATIC): $(OBJECTS)
-       $(RM) $@

Reply via email to