~awstools-dev/ubuntu/raring/elbcli/raring

« back to all changes in this revision

Viewing changes to debian/patches/replace-commands.patch

  • Committer: Scott Moser
  • Date: 2012-05-22 14:26:36 UTC
  • mfrom: (19.1.2 precise)
  • Revision ID: smoser@ubuntu.com-20120522142636-99vqvf73e66tk2h7
merge changes from Jim Browne

Keep the packaging fixes similar to the rds package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Subject: re-write the wrapper commands from original source
2
 
This patch just rewrites the wrapper commands that are provided
3
 
in the zip file with one more tailored for installation.
 
1
Description: re-write the wrapper commands from original source
 
2
 This patch just rewrites the wrapper commands that are provided
 
3
 in the zip file with one more tailored for installation.
4
4
 
5
5
To regenerate this patch:
6
 
  files=$(for f in bin/*; do 
7
 
     case "${f##*/}" in (*.cmd|service|elb-cmd) continue;; esac
8
 
     echo $f; done)
9
 
  # the only program that has a different argument to 'elb-cmd'
10
 
  # than its filename is 'elb-version'.  That has to be shortened to
11
 
  # 'version'
12
 
  quilt delete replace-commands.patch
13
 
  rm debian/patches/replace-commands.patch
14
 
  quilt new replace-commands.patch
15
 
  quilt add ${files}
16
 
  for f in ${files}; do
17
 
     [ "${f}" = "bin/elb-version" ] && cmd="version" || cmd="${f#*/}"
18
 
     cat debian/wrapper-header > "${f}" && \
19
 
        printf 'exec "$service" %s "$@"\n' "$cmd" >> "${f}"
20
 
  done
21
 
  quilt refresh
22
 
 
23
 
To verify that each command called 'elb-cmd' with its command name, without
24
 
this patch applied, you can do something like:
25
 
  for f in $files; do 
26
 
    cmd=$(awk '$1 ~ /elb-cmd$/ { print $2 }' $f); 
27
 
    [ "${f#*/}" != "$cmd" ] && echo -n "DIFFERENT: "
28
 
    echo $f: $cmd
29
 
  done
30
 
 
 
6
   files=$(for f in bin/*; do
 
7
      case "${f##*/}" in (*.cmd|service|elb-cmd) continue;; esac
 
8
      echo $f; done)
 
9
   # the only program that has a different argument to 'elb-cmd'
 
10
   # than its filename is 'elb-version'.  That has to be shortened to
 
11
   # 'version'
 
12
   patch=debian/patches/replace-commands.patch
 
13
   quilt header ${patch##*/} > header.tmp
 
14
   quilt delete ${patch##*/}
 
15
   rm $patch
 
16
   quilt new ${patch##*/}
 
17
   quilt add ${files}
 
18
   for f in ${files}; do
 
19
      [ "${f}" = "bin/elb-version" ] && cmd="version" || cmd="${f#*/}"
 
20
      cat debian/wrapper-header > "${f}" && \
 
21
         printf 'exec "$service" %s "$@"\n' "$cmd" >> "${f}"
 
22
   done
 
23
   quilt refresh
 
24
   # replace header
 
25
   quilt header ${patch##*/} -r < header.tmp
 
26
   rm -f header.tmp
31
27
Origin: Scott Moser <smoser@ubuntu.com>
32
28
Last-Update: 2011-12-13
 
29
 
33
30
--- a/bin/elb-apply-security-groups-to-lb
34
31
+++ b/bin/elb-apply-security-groups-to-lb
35
32
@@ -1,7 +1,5 @@