Revision: 6932
http://ipcop.svn.sourceforge.net/ipcop/?rev=6932&view=rev
Author: gespinasse
Date: 2013-02-17 17:32:42 +0000 (Sun, 17 Feb 2013)
Log Message:
-----------
Warn if the host is running SElinux in Enforcing mode, gnupg compilation will
fail with
../g10/gpg: error while loading shared libraries: cannot restore segment prot
after reloc: Permission denied
Suggest to compile with SElinux in Permissive mode
I am open for a better proposal.
Rewrite my running module detection code to be less ugly.
Do not warn if not running test
Show the name of the modules eventually not found
Inform that only less test could run.
Modified Paths:
--------------
ipcop/trunk/make.sh
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2013-02-16 15:51:35 UTC (rev 6931)
+++ ipcop/trunk/make.sh 2013-02-17 17:32:42 UTC (rev 6932)
@@ -411,6 +411,9 @@
RM="`bash +h -c "type rm" | cut -d" " -f3` -fr"
UMOUNT=`bash +h -c "type umount" | cut -d" " -f3`
+# Just to warn on SElinux enabled host
+GETENFORCE=`bash +h -c "type getenforce" | cut -d" " -f3`
+
# Who's running this script?
CURRENT_USER=`id -un`
CURRENT_USER_GROUP=`id -gn`
@@ -1092,24 +1095,42 @@
# Remove pre-install list of installed files in case user erase some
files before to build again
${SUDO} ${RM} ${LFS}/usr/src/lsalr 2>/dev/null
+ # Warn that compilation of gnupg may fail in enforcing mode
+ if ([ -n "${GETENFORCE}" ] && [ x"$(${GETENFORCE})" == xEnforcing ]);
then
+ beautify message WARN "gnupg compilation fail in SElinux
Enforcing mode, at least on Centos-5.9."
+ beautify message WARN "You may retry, disabling SElinux
temporary by running 'setenforce 0'."
+ # or say us how to really fix that
+ fi
+
+ # If not running test, do not warn for running kernel modules used
during tests
+ [ "${RUNNING_TEST}" == 'yes' ] || return 0
+
# Copy host kernel modules required to run some tests in util-linux,
mdadm, parted
- # Less tests could run if running kernel is the same as compiled kernel
version
- # do not bet on compatibility between different kernel config
+ # Less tests could run if running kernel version name is exactly the
same as compiled kernel version
+ # as nobody would bet on compatibility between host and build kernel
config
[ ${KVER} == $(uname -r) ] && [ "${RUNNING_TEST}" == 'yes' ] \
- && beautify message INFO "Skip copying running modules for
testing, to avoid conflict with compiled kernel (same version)" \
+ && beautify message INFO "Skip copying running modules for
testing, to avoid conflict with compiled kernel (same version name)" \
&& return 0
for flavor in lib/modules/$(uname -r) lib64/modules/$(uname -r); do
[ -d /${flavor} ] || continue
- M_LIST=$(find /${flavor} \( -name 'scsi_debug.ko*' -o -name
'crc?t10dif.ko*' -o -name 'scsi_mod.ko*' -o -name 'md-mod.ko*' \) )
${SUDO} ${MKDIR} ${LFS}/${flavor}
${SUDO} ${CHMOD} 0777 ${LFS}/${flavor}
- cp ${M_LIST} ${LFS}/${flavor}
+ NOT_FOUND=
+ for module in scsi_debug crc-t10dif scsi_mod md-mod; do
+ M_FOUND=$(find /${flavor} -name "${module}.ko*" )
+ if [ -z ${M_FOUND} ]; then
+ NOT_FOUND="${NOT_FOUND} ${module}.ko"
+ else
+ cp ${M_FOUND} ${LFS}/${flavor}
+ fi
+ done
# Uncompress modules if needed, names are hardcoded in .dep
because that easier
find ${LFS}/${flavor} -name '*.ko.gz' -exec gzip -fd {} \;
- # Warn if not every needed module has been found
- M_FOUND=$(ls -1 ${LFS}/${flavor}/*.ko | wc -l)
- [ ${M_FOUND} -eq 4 ] || \
- beautify message WARN "Found only ${M_FOUND}/4 modules
from running kernel to run the tests in util-linux, mdadm, parted"
+
+ if [ -n "${NOT_FOUND}" ]; then
+ beautify message WARN "Less tests will run in
util-linux, mdadm, parted"
+ beautify message WARN "Those kernel modules, needed for
the tests have not been found:${NOT_FOUND}"
+ fi
echo -e 'alias block-major-9-* md_mod\nalias md md_mod'
>${LFS}/${flavor}/modules.alias
echo -e
'crc-t10dif.ko:\nscsi_mod.ko:\nmd-mod.ko:\nscsi_debug.ko: scsi_mod.ko
crc-t10dif.ko' >${LFS}/${flavor}/modules.dep
${SUDO} ${CHMOD} 0666 ${LFS}/${flavor}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn