[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipcop-svn
Subject:    [Ipcop-svn] SF.net SVN: ipcop:[6199] ipcop/trunk
From:       gespinasse () users ! sourceforge ! net
Date:       2011-12-27 22:13:18
Message-ID: E1RffGo-00011m-Pc () sfp-svn-1 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 6199
          http://ipcop.svn.sourceforge.net/ipcop/?rev=6199&view=rev
Author:   gespinasse
Date:     2011-12-27 22:13:18 +0000 (Tue, 27 Dec 2011)
Log Message:
-----------
Remove packages_list cruft and do better stripping and checking files

Strip ELF code using xargs strip as this faster than running strip for each file 

Integrate package_list (pass 1 and 2) on lf/cdrom
For pass-1 packages-list file creation :
- hide -pass and 'stage|adjust-toolchain|strip' words that mean nothing outside of \
                our build
- sort packages for the file include in cdrom and sort -u to remove duplicate.

For pass-2, list of all files creation :
- it is faster to create the list from the fs with find, than to tar tzf the final \
package  there is one difference with no consequence on the produced all-files.txt
  tar tzf extract non empty directories names with a final /, find never have a final \
/

Add a comment why we create a tar, that we expand and suppress

Stop keeping ROOTFILES.txt in doc, we already have all-files.txt
I created an all-no-dir.txt, variant from all-files (without directories this time) \
for md5sum and scanelf usage. I don't feel we need both, so all-no-dir.txt is deleted \
after usage.

Modified Paths:
--------------
    ipcop/trunk/lfs/cdrom
    ipcop/trunk/make.sh

Removed Paths:
-------------
    ipcop/trunk/lfs/packages_list

Modified: ipcop/trunk/lfs/cdrom
===================================================================
--- ipcop/trunk/lfs/cdrom	2011-12-27 13:28:12 UTC (rev 6198)
+++ ipcop/trunk/lfs/cdrom	2011-12-27 22:13:18 UTC (rev 6199)
@@ -44,6 +44,8 @@
 # A common name for the ISO on all architectures
 IPCOP_ISO = $(SNAME)-$(VERSION)-install-cd.$(MACHINE).iso
 
+PACKAGE_LIST := $(LFS_BASEDIR)/doc/$(NAME)-$(VERSION)-packages-list.$(MACHINE).txt
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -108,6 +110,13 @@
 	rm -rf /$(INSTALLER_DIR)/cdrom /tmp/*
 	mkdir -p /$(INSTALLER_DIR)/cdrom/{doc,dosutils,images}
 
+	# Create list of packages include in cdrom doc
+	# Add title on top
+	echo "List of software packages used to build $(NAME) Version: $(VERSION) for \
$(MACHINE)" > $(PACKAGE_LIST) +	# Then add content with filter for strings without \
mean outside of our build system +	for i in `ls -1tr $(DIR_INFO)/0{1,2,3,4}*/* | sed \
's/-pass.*$$//' | egrep -v 'stage|adjust-toolchain|strip'`; do \ +		echo " * \
`basename $$i`"; done | sort -u >> $(PACKAGE_LIST) +
 	# Create the global include list from each package rootfile
 	find $(DIR_SRC)/config/rootfiles/common -maxdepth 1 -type f | grep -v SKIP | xargs \
cat >> /tmp/ROOTFILES  find $(DIR_SRC)/config/rootfiles/arch_$(MACHINE) -maxdepth 1 \
-type f | grep -v SKIP | xargs cat >>/tmp/ROOTFILES @@ -122,23 +131,29 @@
 			--exclude=tmp/$(SNAME).tar \
 			-f /tmp/$(SNAME).tar
 
-	mv /tmp/ROOTFILES /usr/src/doc/ROOTFILES.txt
+	# A file may be include more than once in tar (directly by file name and by \
directory inclusion) +	# Avoid that, creating again tar from fs
 	tar -x -C /tmp -f /tmp/$(SNAME).tar
-	rm -f /tmp/$(SNAME).tar
+	rm -f /tmp/$(SNAME).tar /tmp/ROOTFILES
 
+	# Build list of everything include, removing '.' line, './' prefix for all-files to \
stay the same +	cd /tmp && find . | sed -e '/^\.$$/d' -e 's|^\./||' | sort > \
${ALLFILES} +	# Create a list of files only (no directories) for md5sum and scanelf \
usage later +	# Keep '/' prefix as that's what we need for md5sum and scanelf
+	cd /tmp && find . -type f | sed -e '/^\.$$/d' -e 's|^\.||' | sort >${ALL_NODIR}
+
 	# These used to be done in the installer - no more....
 	cd /tmp/lib/modules/$(KVER) && touch modules.dep
 
 	# We do the stripping here because we don't want to destroy our development tree by \
                stripping all symbols
-	# Instead we strip all binaries and libraries as we create the ISO.  It's quite \
                safe to do strip --strip-all
-	# on libraries if they will not be used for development.
-	# kernel modules are compressed, so no risk actually to strip them
-	cd /tmp && find ./{bin,sbin}				-type f -exec /$(TOOLS_DIR)/bin/strip --strip-all \
                {} \;
-	cd /tmp && find ./lib/{.,iptables,udev}	-maxdepth 1	-type f -exec \
                /$(TOOLS_DIR)/bin/strip --strip-all {} \;
-	cd /tmp && find ./usr/{bin,lib,libexec,local,sbin}	-type f -exec \
                /$(TOOLS_DIR)/bin/strip --strip-all {} \;
-ifeq "$(MACHINE)" "i486"
-	cd /tmp && find ./etc/Conexant				-type f -exec /$(TOOLS_DIR)/bin/strip --strip-all \
                {} \;
-endif
+	# Instead we strip all binaries and libraries as we create the ISO.
+	# It's safe to do strip --strip-all even on libraries as those files will not be \
used for compilation. +	# kernel modules are compressed, strip does not yet no to \
handle that +	# Using xargs strip, we need to allow failure that happen with non elf \
files +	# Filter non elf files error
+	# Similar code is in lfs/update
+	cd /tmp && find ${EXEC_PATH} -type f | xargs /$(TOOLS_DIR)/bin/strip --strip-all \
2>&1 | \ +		grep -v 'File format not recognized' || true
 
 	# Create a tmp directory
 	cd /tmp && mkdir -p tmp

Deleted: ipcop/trunk/lfs/packages_list
===================================================================
--- ipcop/trunk/lfs/packages_list	2011-12-27 13:28:12 UTC (rev 6198)
+++ ipcop/trunk/lfs/packages_list	2011-12-27 22:13:18 UTC (rev 6199)
@@ -1,80 +0,0 @@
-###############################################################################
-# This file is part of the IPCop Firewall.                                    #
-#                                                                             #
-# IPCop is free software; you can redistribute it and/or modify               #
-# it under the terms of the GNU General Public License as published by        #
-# the Free Software Foundation; either version 2 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# IPCop is distributed in the hope that it will be useful,                    #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
-# GNU General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with IPCop; if not, write to the Free Software                        #
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA    #
-#                                                                             #
-# Makefiles are based on LFSMake, which is                                    #
-# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
-#                                                                             #
-# Modifications by:                                                           #
-# ??-12-2003 Mark Wormgoor < mark@wormgoor.com>                               #
-#          - Modified Makefile for IPCop build                                #
-#                                                                             #
-# $Id$
-#                                                                             #
-###############################################################################
-
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-PKG_NAME   = packages_list
-HOST_ARCH  = all
-
-THISAPP    = packages_list
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-check :
-
-download :
-
-md5 :
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-install :
-
-ifeq "$(PASS)" "1"
-	# this is include in cdrom doc
-	echo "Generating list of packages needed to compile ipcop." >> $(LOGFILE)
-	-rm -f $(LFS_BASEDIR)/doc/$(NAME)-$(VERSION)-packages-list.$(MACHINE).txt
-	for i in `ls -1tr $(DIR_INFO)/0{2,3,4}*/*`; do \
-		if [ -n $$i ]; then \
-			echo " * `basename $$i`" >> \
                $(LFS_BASEDIR)/doc/$(NAME)-$(VERSION)-packages-list.$(MACHINE).txt; \
-		fi \
-	done
-endif
-
-ifeq "$(PASS)" "2"
-	echo "List of software packages used to build $(NAME) Version: $(VERSION) for \
                $(MACHINE)" \
-		> $(LFS_BASEDIR)/doc/$(NAME)-$(VERSION)-packages-list.$(MACHINE).tmp
-	cat $(LFS_BASEDIR)/doc/$(NAME)-$(VERSION)-packages-list.$(MACHINE).txt  | sort \
-		>> $(LFS_BASEDIR)/doc/$(NAME)-$(VERSION)-packages-list.$(MACHINE).tmp
-	mv $(LFS_BASEDIR)/doc/$(NAME)-$(VERSION)-packages-list.$(MACHINE).tmp \
-		$(LFS_BASEDIR)/doc/$(NAME)-$(VERSION)-packages-list.$(MACHINE).txt
-	# packages-list is ready to be displayed for Trac wiki page
-
-	# ROOTFILES.txt does not allow to refer to files include by directory
-	echo "Generating files list from logs" >> $(LOGFILE)
-	tar tzf /installer/cdrom/ipcop-$(VERSION).tar.gz | \
-		sed -e 's|^\.\/||' -e '/^$$/d' | sort > \
                $(LFS_BASEDIR)/doc/${NAME}-${VERSION}-all-files-list.${MACHINE}.txt
-endif

Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh	2011-12-27 13:28:12 UTC (rev 6198)
+++ ipcop/trunk/make.sh	2011-12-27 22:13:18 UTC (rev 6199)
@@ -1953,8 +1953,6 @@
 		echo "Skip avm drivers"
 	fi
 
-	PASS=1
-	chroot_make packages_list
 	if [ "${VERSIONSTEP}" ]; then
 		PASS="${VERSIONSTEP}"
 		chroot_make update
@@ -1964,15 +1962,28 @@
 	PASS=""
 	chroot_make cdrom
 	chroot_make netboot
-	PASS=2
-	chroot_make packages_list
-	PASS=""
+	chroot_make check_files
 
 	if [ x"${SKIP_USB_IMAGES}" != x"yes" ]; then
 		chroot_make usb-key
 	else
 		echo "Skip usb images to save time"
 	fi
+
+	# Our tools directory is not mounted inside chroot, so done outside
+	if [ ! -f ${BASEDIR}/doc/${NAME}-${PREVIOUSVERSION}-all-files-list.${MACHINE}.txt.md5 \
]; then +		beautify message INFO "No MD5 all-files-list for ${PREVIOUSVERSION} found, \
no comparison." +	else
+		echo -ne "Running MD5 compare"
+		${BASEDIR}/tools/comp_md5.pl ${BASEDIR} ${VERSION} ${PREVIOUSVERSION} ${MACHINE} \
${KVER} ${PERLVER} ${VERSIONSTEP} +		if [ $? -ne 0 ]; then
+			beautify message FAIL
+		else
+			beautify message DONE
+			echo "See ${BASEDIR}/doc/${NAME}-${VERSION}-diff-list.${MACHINE}.txt for result"
+		fi
+	fi
+
 } # End of packages_build()
 
 

This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic