[Ocfs2-commits] smushran commits r3063 - in branches/ocfs2-1.2: .
vendor/rhel4
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Sep 28 10:48:14 PDT 2007
Author: smushran
Date: 2007-09-28 10:48:13 -0700 (Fri, 28 Sep 2007)
New Revision: 3063
Modified:
branches/ocfs2-1.2/Config.make.in
branches/ocfs2-1.2/vendor/rhel4/Vendor.make
branches/ocfs2-1.2/vendor/rhel4/ocfs2.spec-generic.in
Log:
ocfs2: Spec file strips debug symbols from the modules
Authored-by: jlbec
Signed-off-by: smushran
Signed-off-by: mfasheh
Modified: branches/ocfs2-1.2/Config.make.in
===================================================================
--- branches/ocfs2-1.2/Config.make.in 2007-09-28 17:43:53 UTC (rev 3062)
+++ branches/ocfs2-1.2/Config.make.in 2007-09-28 17:48:13 UTC (rev 3063)
@@ -44,7 +44,15 @@
KERNELINC = $(KERNELDIR)/include
ARCH_XEN = @ARCH_XEN@
+
+ifneq (@OCFS_DEBUG@,)
+DONT_STRIP = 1
else
+DONT_STRIP = 0
+endif
+
+else
+
MAKEBO_VERSION = @VERSION@
EXTRA_CFLAGS += @KAPI_COMPAT_CFLAGS@
Modified: branches/ocfs2-1.2/vendor/rhel4/Vendor.make
===================================================================
--- branches/ocfs2-1.2/vendor/rhel4/Vendor.make 2007-09-28 17:43:53 UTC (rev 3062)
+++ branches/ocfs2-1.2/vendor/rhel4/Vendor.make 2007-09-28 17:48:13 UTC (rev 3063)
@@ -17,7 +17,7 @@
else \
LARGESMP=1; \
fi; \
- sed -e 's/@@KVER@@/'$${SPECVER}'/' -e 's/@@PKG_VERSION@@/'$(PKG_VERSION)'/' -e 's/@@LARGESMP@@/'$${LARGESMP}'/' < $< > $@
+ sed -e 's/@@KVER@@/'$${SPECVER}'/' -e 's/@@PKG_VERSION@@/'$(PKG_VERSION)'/' -e 's/@@LARGESMP@@/'$${LARGESMP}'/' -e 's/@@DONT_STRIP@@/'$(DONT_STRIP)'/' < $< > $@
rhel4_%_srpm: dist $(TOPDIR)/vendor/rhel4/ocfs2-%.spec
rpmbuild -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/vendor/rhel4/ocfs2-$(patsubst rhel4_%_srpm,%,$@).spec
Modified: branches/ocfs2-1.2/vendor/rhel4/ocfs2.spec-generic.in
===================================================================
--- branches/ocfs2-1.2/vendor/rhel4/ocfs2.spec-generic.in 2007-09-28 17:43:53 UTC (rev 3062)
+++ branches/ocfs2-1.2/vendor/rhel4/ocfs2.spec-generic.in 2007-09-28 17:48:13 UTC (rev 3063)
@@ -40,6 +40,7 @@
%define karch s390x
%endif
+%define dont_strip @@DONT_STRIP@@
%define kver @@KVER@@
# The minimum tools package required for the kernel bits.
@@ -144,6 +145,17 @@
--with-vendorkernel="$1"
}
+strip_modules()
+{
+%if %{dont_strip}
+ return
+%endif
+
+ # Mark modules executable so that brp-strip can strip them.
+ # This requires the <percent>install section to exist.
+ find "$1" -name "*.ko" -type f | xargs chmod u+x
+}
+
%if %{buildup}
local_configure "%{kver}"
@@ -161,6 +173,8 @@
mv "${EXTRA_MODLIB}"/debugfs.ko "${INST_MODLIB}/fs/debugfs/"
rm "${EXTRA_MODLIB}"/*.ko
+strip_modules "${INST_MODLIB}"
+
make clean
%endif
@@ -181,6 +195,8 @@
mv "${EXTRA_MODLIB}"/debugfs.ko "${INST_MODLIB}/fs/debugfs/"
rm "${EXTRA_MODLIB}"/*.ko
+strip_modules "${INST_MODLIB}"
+
make clean
%endif
@@ -201,6 +217,8 @@
mv "${EXTRA_MODLIB}"/debugfs.ko "${INST_MODLIB}/fs/debugfs/"
rm "${EXTRA_MODLIB}"/*.ko
+strip_modules "${INST_MODLIB}"
+
make clean
%endif
@@ -221,10 +239,16 @@
mv "${EXTRA_MODLIB}"/debugfs.ko "${INST_MODLIB}/fs/debugfs/"
rm "${EXTRA_MODLIB}"/*.ko
+strip_modules "${INST_MODLIB}"
+
make clean
%endif
+%install
+# We don't do anything here, but it is required to force RPM
+# magic behaviors ... thanks guys.
+
%clean
rm -rf "$RPM_BUILD_ROOT"
More information about the Ocfs2-commits
mailing list