Revision: 6162 http://ipcop.svn.sourceforge.net/ipcop/?rev=6162&view=rev Author: gespinasse Date: 2011-12-12 08:07:35 +0000 (Mon, 12 Dec 2011) Log Message: ----------- Add checksec.sh script, helping us to check how our binaries are build
Modified Paths: -------------- ipcop/trunk/make.sh Added Paths: ----------- ipcop/trunk/config/rootfiles/common/checksec ipcop/trunk/lfs/checksec Added: ipcop/trunk/config/rootfiles/common/checksec =================================================================== --- ipcop/trunk/config/rootfiles/common/checksec (rev 0) +++ ipcop/trunk/config/rootfiles/common/checksec 2011-12-12 08:07:35 UTC (rev 6162) @@ -0,0 +1 @@ +#usr/sbin/checksec.sh Added: ipcop/trunk/lfs/checksec =================================================================== --- ipcop/trunk/lfs/checksec (rev 0) +++ ipcop/trunk/lfs/checksec 2011-12-12 08:07:35 UTC (rev 6162) @@ -0,0 +1,101 @@ +############################################################################### +# 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 <r...@sunsetsystems.com> # +# # +# Modifications by: # +# ??-12-2003 Mark Wormgoor < m...@wormgoor.com> # +# - Modified Makefile for IPCop build # +# # +# $Id: iana-etc 5207 2010-12-04 20:06:25Z gespinasse $ +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +PKG_NAME = checksec +VER = 1.5 +HOST_ARCH = all +OTHER_SRC = yes + +THISAPP = $(PKG_NAME).sh-$(VER) +DL_FILE = $(PKG_NAME).sh +DL_FROM = http://www.trapkit.de/tools +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) + +# make implicit rules had a bad effect here as a target + .sh SUFFIXE equal another target +# In details : +# 'checksec' lfs file name is the primary target +# 'checksec.sh' should be a secondary target as DL_FILE +# That will trigger a make implicit rule '%: %.sh', and run 'cat $< >$@ ', that you could translate to 'cat checksec.sh >checksec' +# There is no checksec.sh file in lfs directory, so the result is to empty lfs/checksec. Not good! +# You would see make implicit suffixes with make -p | grep SUFFIXES + +# In this makefile, this is too late to disable implicit rules with MAKEFLAGS += -r +# If done in make.sh, that would break other packages +# So we cheat, adding VER et end of loaded file name, so using THISAPP instead of DL_FILE + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(THISAPP) + +$(THISAPP) = $(DL_FROM)/$(DL_FILE) + +$(THISAPP)_MD5 = 075996be339ab16ad7b94d6de3ee07bd + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + echo checking $(PKG_NAME) + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + echo loading $(PKG_NAME) + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + + # For now, only for our build chroot testing (require readelf) + install -p -m 0755 $(DIR_DL)/$(THISAPP) /usr/sbin/$(DL_FILE) + + @$(POSTBUILD) Modified: ipcop/trunk/make.sh =================================================================== --- ipcop/trunk/make.sh 2011-12-11 22:37:31 UTC (rev 6161) +++ ipcop/trunk/make.sh 2011-12-12 08:07:35 UTC (rev 6162) @@ -1804,6 +1804,7 @@ chroot_make arping chroot_make beep chroot_make bind + chroot_make checksec # to check the way binaries are build chroot_make capi4k-utils chroot_make db # squidGuard chroot_make dhcpcd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn