Changeset 5273


Ignore:
Timestamp:
Aug 26, 2011, 10:34:48 AM (9 years ago)
Author:
pmmf
Message:

Fix bashism... cm16 uses dash as default and not bash so arrays are not POSIX friend..

Location:
packages/cm16/apt
Files:
3 added
3 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • packages/cm16/apt/cmiffy/cmiffy

    r5007 r5273  
    4545#Use this var we if want to hardcode the version
    4646#If you hardcode the version please add the xcm tag
    47 VERSION="0.8.13.2xcm4.2"
     47VERSION="0.8.13.2xcm4.3"
    4848
    4949# debdiff old.dsc new.dsc > cmiffy/debdiff.patch
     
    5151
    5252#Changelog stuff
    53 AUTHOR='Flávio Moringa <flavio.moringa@caixamagica.pt>'
     53AUTHOR='Pedro Fragoso <pedro.fragoso@caixamagica.pt>'
    5454DISTRO=""
    5555URGE="low"
    5656
    5757#CHANGE="""  * Add horn as valid distro\n  * New version  """
    58 CHANGE="""  * Add rollback support\n  * Fix apt-key on update  """
     58CHANGE="""  * Add rollback support\n  * Really apt-key on update  """
    5959
    6060#If we need to change the package source to caixamagica
  • packages/cm16/apt/cmiffy/debdiff.patch

    r5007 r5273  
    1 diff -Naur apt-0.8.13.2ubuntu4.1.orig//cmdline/apt-key apt-0.8.13.2ubuntu4.1//cmdline/apt-key
    2 --- apt-0.8.13.2ubuntu4.1.orig//cmdline/apt-key 2011-06-21 17:11:32.000000000 +0100
    3 +++ apt-0.8.13.2ubuntu4.1//cmdline/apt-key      2011-08-10 17:11:31.000000000 +0100
     1diff -Naur apt-0.8.13.2ubuntu4.1.orig/cmdline/apt-key apt-0.8.13.2ubuntu4.1/cmdline/apt-key
     2--- apt-0.8.13.2ubuntu4.1.orig/cmdline/apt-key  2011-08-26 10:27:04.756413466 +0100
     3+++ apt-0.8.13.2ubuntu4.1/cmdline/apt-key       2011-08-26 10:29:18.466413440 +0100
    44@@ -15,11 +15,16 @@
    55 
     
    4646+    if [ -e $caixamagica_keyring ]; then
    4747+       caixamagica_old_mtime=$(stat -c %Y $caixamagica_keyring)
    48      fi
    49 -    (cd  /var/lib/apt/keyrings; wget --timeout=90 -q -N $ARCHIVE_KEYRING_URI)
    50 -    if [ ! -e $keyring ]; then
     48+    fi
    5149+    (cd  /var/lib/apt/keyrings; wget --timeout=90 -q -N $CAIXAMAGICA_ARCHIVE_KEYRING_URI)
    5250+    if [ ! -e $caixamagica_keyring ]; then
    53         return
    54      fi
    55 -    new_mtime=$(stat -c %Y $keyring)
    56 -    if [ $new_mtime -ne $old_mtime ]; then
     51+       return
     52+    fi
    5753+    caixamagica_new_mtime=$(stat -c %Y $caixamagica_keyring)
    5854+    if [ $caixamagica_new_mtime -ne $caixamagica_old_mtime ]; then
    59         echo "Checking for new archive signing keys now"
    60 -       add_keys_with_verify_against_master_keyring $keyring $MASTER_KEYRING
     55+       echo "Checking for new archive signing keys now"
    6156+       add_keys_with_verify_against_master_keyring $caixamagica_keyring $CAIXAMAGICA_MASTER_KEYRING
    6257+    fi
     
    6661+    if [ -e $ubuntu_keyring ]; then
    6762+       ubuntu_old_mtime=$(stat -c %Y $ubuntu_keyring)
    68 +    fi
     63     fi
     64-    (cd  /var/lib/apt/keyrings; wget --timeout=90 -q -N $ARCHIVE_KEYRING_URI)
     65-    if [ ! -e $keyring ]; then
    6966+    (cd  /var/lib/apt/keyrings; wget --timeout=90 -q -N $UBUNTU_ARCHIVE_KEYRING_URI)
    7067+    if [ ! -e $ubuntu_keyring ]; then
    71 +       return
    72 +    fi
     68        return
     69     fi
     70-    new_mtime=$(stat -c %Y $keyring)
     71-    if [ $new_mtime -ne $old_mtime ]; then
    7372+    ubuntu_new_mtime=$(stat -c %Y $ubuntu_keyring)
    7473+    if [ $ubuntu_new_mtime -ne $ubuntu_old_mtime ]; then
    75 +       echo "Checking for new archive signing keys now"
     74        echo "Checking for new archive signing keys now"
     75-       add_keys_with_verify_against_master_keyring $keyring $MASTER_KEYRING
    7676+       add_keys_with_verify_against_master_keyring $ubuntu_keyring $UBUNTU_MASTER_KEYRING
    7777     fi
     
    101101-           fi
    102102+       # GLOBAL
    103 +       local LIST_ARCHIVE_KEYRING=( $CAIXAMAGICA_ARCHIVE_KEYRING $UBUNTU_ARCHIVE_KEYRING )
    104 +       local LIST_REMOVED_KEYRING=( $CAIXAMAGICA_REMOVED_KEYS $UBUNTU_REMOVED_KEYS )
    105 +
    106 +       for ((i=0; i<${#LIST_ARCHIVE_KEYRING[@]}; i++))
     103+       local LIST_ARCHIVE_KEYRING="$CAIXAMAGICA_ARCHIVE_KEYRING $UBUNTU_ARCHIVE_KEYRING"
     104+
     105+       for LIST in $LIST_ARCHIVE_KEYRING
    107106+       do
    108 +               $GPG_CMD --quiet --batch --keyring ${LIST_ARCHIVE_KEYRING[$i]} --export | $GPG --import
    109 +
    110 +               if [[ -r ${LIST_REMOVED_KEYRING[$i]} ]]
     107+               $GPG_CMD --quiet --batch --keyring ${LIST} --export | $GPG --import
     108+
     109+               REMOVED_KEYRING=$(echo $LIST | sed 's/archive-keyring/archive-removed-keys/')
     110+               if [ -r $REMOVED_KEYRING ]
    111111+               then
    112 +                       keys=$($GPG_CMD --keyring ${LIST_REMOVED_KEYRING[$i]} --with-colons --list-keys | grep ^pub | cut -d: -f5)
     112+                       keys=$($GPG_CMD --keyring $REMOVED_KEYRING --with-colons --list-keys | grep ^pub | cut -d: -f5)
    113113+                       
    114114+                       for key in $keys
    115115+                       do
    116116+                       
    117 +                               if [[ $($GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key) ]]
     117+                               if [ $($GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key) ]
    118118+                               then
    119119+                                       $GPG --quiet --batch --delete-key --yes ${key}
     
    122122+               
    123123+               else
    124 +                       echo "Warning: removed keys keyring ${LIST_ARCHIVE_KEYRING[$i]} missing or not readable" >&2
     124+                       echo "Warning: removed keys keyring $LIST_ARCHIVE_KEYRING missing or not readable" >&2
    125125+               fi
    126126        done
     
    134134     echo "Usage: apt-key [--keyring file] [command] [arguments]"
    135135     echo
    136 diff -Naur apt-0.8.13.2ubuntu4.1.orig//configure apt-0.8.13.2ubuntu4.1//configure
    137 --- apt-0.8.13.2ubuntu4.1.orig//configure       2011-07-07 13:27:52.000000000 +0100
    138 +++ apt-0.8.13.2ubuntu4.1//configure    2011-08-11 11:15:01.736412843 +0100
     136diff -Naur apt-0.8.13.2ubuntu4.1.orig/configure apt-0.8.13.2ubuntu4.1/configure
     137--- apt-0.8.13.2ubuntu4.1.orig/configure        2011-08-26 10:27:04.756413466 +0100
     138+++ apt-0.8.13.2ubuntu4.1/configure     2011-08-26 10:27:09.646413465 +0100
    139139@@ -2457,7 +2457,7 @@
    140140 
     
    142142 cat >>confdefs.h <<_ACEOF
    143143-#define VERSION "0.8.13.2ubuntu4.1"
    144 +#define VERSION "0.8.13.2xcm4.1"
     144+#define VERSION "0.8.13.2xcm4.3"
    145145 _ACEOF
    146146 
    147147 PACKAGE="apt"
    148 diff -Naur apt-0.8.13.2ubuntu4.1.orig//configure.in apt-0.8.13.2ubuntu4.1//configure.in
    149 --- apt-0.8.13.2ubuntu4.1.orig//configure.in    2011-07-07 13:27:51.000000000 +0100
    150 +++ apt-0.8.13.2ubuntu4.1//configure.in 2011-08-11 11:15:01.736412843 +0100
     148diff -Naur apt-0.8.13.2ubuntu4.1.orig/configure.in apt-0.8.13.2ubuntu4.1/configure.in
     149--- apt-0.8.13.2ubuntu4.1.orig/configure.in     2011-08-26 10:27:04.756413466 +0100
     150+++ apt-0.8.13.2ubuntu4.1/configure.in  2011-08-26 10:30:31.946413426 +0100
    151151@@ -18,7 +18,7 @@
    152152 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
     
    154154 dnl -- SET THIS TO THE RELEASE VERSION --
    155155-AC_DEFINE_UNQUOTED(VERSION,"0.8.13.2ubuntu4.1")
    156 +AC_DEFINE_UNQUOTED(VERSION,"0.8.13.2xcm4.1")
     156+AC_DEFINE_UNQUOTED(VERSION,"0.8.13.2xcm4.3")
    157157 PACKAGE="apt"
    158158 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
    159159 AC_SUBST(PACKAGE)
    160 diff -Naur apt-0.8.13.2ubuntu4.1.orig//debian/apt.postinst apt-0.8.13.2ubuntu4.1//debian/apt.postinst
    161 --- apt-0.8.13.2ubuntu4.1.orig//debian/apt.postinst     2011-06-21 17:11:32.000000000 +0100
    162 +++ apt-0.8.13.2ubuntu4.1//debian/apt.postinst  2011-08-11 11:15:01.736412843 +0100
     160diff -Naur apt-0.8.13.2ubuntu4.1.orig/debian/apt.postinst apt-0.8.13.2ubuntu4.1/debian/apt.postinst
     161--- apt-0.8.13.2ubuntu4.1.orig/debian/apt.postinst      2011-08-26 10:27:04.766413466 +0100
     162+++ apt-0.8.13.2ubuntu4.1/debian/apt.postinst   2011-08-26 10:27:09.646413465 +0100
    163163@@ -16,7 +16,7 @@
    164164 case "$1" in
     
    170170        apt-key update || true
    171171     ;;
    172 diff -Naur apt-0.8.13.2ubuntu4.1.orig//debian/control apt-0.8.13.2ubuntu4.1//debian/control
    173 --- apt-0.8.13.2ubuntu4.1.orig//debian/control  2011-06-21 17:11:32.000000000 +0100
    174 +++ apt-0.8.13.2ubuntu4.1//debian/control       2011-08-11 11:15:01.736412843 +0100
     172diff -Naur apt-0.8.13.2ubuntu4.1.orig/debian/control apt-0.8.13.2ubuntu4.1/debian/control
     173--- apt-0.8.13.2ubuntu4.1.orig/debian/control   2011-08-26 10:27:04.766413466 +0100
     174+++ apt-0.8.13.2ubuntu4.1/debian/control        2011-08-26 10:27:09.646413465 +0100
    175175@@ -7,7 +7,7 @@
    176176  Christian Perrier <bubulle@debian.org>, Daniel Burrows <dburrows@debian.org>,
     
    191191 Suggests: aptitude | synaptic | wajig, dpkg-dev, apt-doc, bzip2, lzma, python-apt
    192192 Description: Advanced front-end for dpkg
    193 diff -Naur apt-0.8.13.2ubuntu4.1.orig//debian/rules apt-0.8.13.2ubuntu4.1//debian/rules
    194 --- apt-0.8.13.2ubuntu4.1.orig//debian/rules    2011-06-21 17:11:32.000000000 +0100
    195 +++ apt-0.8.13.2ubuntu4.1//debian/rules 2011-08-11 11:15:01.736412843 +0100
     193diff -Naur apt-0.8.13.2ubuntu4.1.orig/debian/rules apt-0.8.13.2ubuntu4.1/debian/rules
     194--- apt-0.8.13.2ubuntu4.1.orig/debian/rules     2011-08-26 10:27:04.766413466 +0100
     195+++ apt-0.8.13.2ubuntu4.1/debian/rules  2011-08-26 10:27:09.646413465 +0100
    196196@@ -26,6 +26,32 @@
    197197   endif
Note: See TracChangeset for help on using the changeset viewer.