aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/iptables
AgeCommit message (Expand)Author
2010-10-25iptables: update package LICENSEChase Maupin
2010-08-25iptables 1.4.9.1: DEPENDS on libnfnetlinkRoman I Khimov
2010-08-22iptables: dont fail do_install if there is no /xtables/*Martin Jansa
2010-08-22iptables: add 1.4.9.1 versionRoman I Khimov
2010-06-10recipes: bump PR/INC_PR for packages changed in RDEPENDS/RRECOMMENDS/RSUGGEST...Martin Jansa
2010-06-03recipes: conform to OE packaging guidelines with RDEPENDS/RRECOMMENDSMartin Jansa
2010-05-25Make the do_patch apply=yes param implicit if extension is .diff/.patchChris Larson
2010-05-25Rename url params patch=<ignored>/pnum=<n> to apply={yes,no}/striplevel=<n>Chris Larson
2010-04-12recipes: move checksums to recipes from checksums.iniMartin Jansa
2010-03-25iptables: update to version 1.4.7Roman I Khimov
2010-01-22iptables: unbork the 1.3.8 build, merge iptables-utils into iptables.Chris Larson
2009-12-30iptables: fix packaging of ${libexec}/xtables modulesJeremy Lainé
2009-12-16iptables_1.4.6.bb: Recipe for version 1.4.6.Khem Raj
2009-08-27iptables: Add patch to use cross ar and ranlib.Jeremy Puhlman
2009-03-17rename packages/ to recipes/ per earlier agreementDenys Dmytriyenko
bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/bin/bash
#
# Copyright (c) 2010-2011,  Intel Corporation.
# All Rights Reserved
# 
# This program 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.
#
# This program 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 this program;  if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

#
# This script is intended to be used to send a patch series prepared by the
# create-pull-request script to Open Embedded and The Yocto Project, as well
# as to related projects and layers.
#

AUTO=0
AUTO_CL=0
GITSOBCC="--suppress-cc=all"

# Prevent environment leakage to these vars.
unset TO
unset CC
unset AUTO_CC

usage()
{
cat <<EOM
Usage: $(basename $0) [-h] [-a] [-c] [[-t email]...] -p pull-dir 
  -a           Send the cover letter to every recipient listed in Cc and
               Signed-off-by lines found in the cover letter and the patches.
	       This option implies -c.
  -c           Expand the Cc list for the individual patches using the Cc and
               Signed-off-by lines from the same patch.
  -p pull-dir  Directory containing summary and patch files
  -t email     Explicitly add email to the recipients
EOM
}

# Collect addresses from a patch into AUTO_CC
# $1: a patch file
harvest_recipients()
{
	PATCH=$1
	export IFS=$',\n'
	for REGX in "^[Cc][Cc]: *" "^[Ss]igned-[Oo]ff-[Bb]y: *"; do
		for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do
			if [ "${AUTO_CC/$EMAIL/}" == "$AUTO_CC" ] && [ -n "$EMAIL" ]; then
				if [ -z "$AUTO_CC" ]; then
					AUTO_CC=$EMAIL;
				else
					AUTO_CC="$AUTO_CC,$EMAIL";
				fi
			fi
		done
	done
	unset IFS
}

# Parse and verify arguments
while getopts "achp:t:" OPT; do
	case $OPT in
	a)
		AUTO=1
		GITSOBCC="--signed-off-by-cc"
		AUTO_CL=1
		;;
	c)
		AUTO=1
		GITSOBCC="--signed-off-by-cc"
		;;
	h)
		usage
		exit 0
		;;
	p)
		PDIR=${OPTARG%/}
		if [ ! -d $PDIR ]; then
			echo "ERROR: pull-dir \"$PDIR\" does not exist."
			usage
			exit 1
		fi
		;;
	t)
		if [ -n "$TO" ]; then
			TO="$TO,$OPTARG"
		else
			TO="$OPTARG"
		fi
		;;
	esac
done

if [ -z "$PDIR" ]; then
	echo "ERROR: you must specify a pull-dir."
	usage
	exit 1
fi


# Verify the cover letter is complete and free of tokens
if [ -e $PDIR/0000-cover-letter.patch ]; then
	CL="$PDIR/0000-cover-letter.patch"
	for TOKEN in SUBJECT BLURB; do
		grep -q "*** $TOKEN HERE ***" "$CL"
		if [ $? -eq 0 ]; then
			echo "ERROR: Please edit $CL and try again (Look for '*** $TOKEN HERE ***')."
			exit 1
		fi
	done
else
	echo "WARNING: No cover letter will be sent."
fi

# Harvest emails from the generated patches and populate AUTO_CC.
if [ $AUTO_CL -eq 1 ]; then
	for PATCH in $PDIR/*.patch; do
		harvest_recipients $PATCH
	done
fi

AUTO_TO="$(git config sendemail.to)"
if [ -n "$AUTO_TO" ]; then
	if [ -n "$TO" ]; then
		TO="$TO,$AUTO_TO"
	else
		TO="$AUTO_TO"
	fi
fi

if [ -z "$TO" ] && [ -z "$AUTO_CC" ]; then
	echo "ERROR: you have not specified any recipients."
	usage
	exit 1
fi


# Convert the collected addresses into git-send-email argument strings
export IFS=$','
GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done)
GIT_CC=$(for R in $AUTO_CC; do echo -n "--cc='$R' "; done)
unset IFS


# Handoff to git-send-email. It will perform the send confirmation.
PATCHES=$(echo $PDIR/*.patch)
if [ $AUTO_CL -eq 1 ]; then
	# Send the cover letter to every recipient, both specified as well as
	# harvested. Then remove it from the patches list.
	eval "git send-email $GIT_TO $GIT_CC --confirm=always --no-chain-reply-to --suppress-cc=all $CL"
	if [ $? -eq 1 ]; then
		echo "ERROR: failed to send cover-letter with automatic recipients."
		exit 1
	fi
	PATCHES=${PATCHES/"$CL"/}
fi

# Send the patch to the specified recipients and, if -c was specified, those git
# finds in this specific patch.
eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to $GITSOBCC $PATCHES"
if [ $? -eq 1 ]; then
	echo "ERROR: failed to send patches."
	exit 1
fi