[arch-commits] Commit in netpbm/trunk (PKGBUILD netpbm-security-code.patch)

Eric Bélanger eric at nymeria.archlinux.org
Wed Jul 9 02:03:52 UTC 2014


    Date: Wednesday, July 9, 2014 @ 04:03:52
  Author: eric
Revision: 216733

upgpkg: netpbm 10.67.00-1

Upstream update, Update patch, Simplify PKGBUILD maintenance, Add jbigkit makedepends

Modified:
  netpbm/trunk/PKGBUILD
  netpbm/trunk/netpbm-security-code.patch

----------------------------+
 PKGBUILD                   |   26 ++++++--------
 netpbm-security-code.patch |   76 ++++++++++++++++++++-----------------------
 2 files changed, 48 insertions(+), 54 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-07-08 19:24:37 UTC (rev 216732)
+++ PKGBUILD	2014-07-09 02:03:52 UTC (rev 216733)
@@ -2,7 +2,7 @@
 # Maintainer: 
 
 pkgname=netpbm
-pkgver=10.66.03
+pkgver=10.67.00
 pkgrel=1
 pkgdesc="A toolkit for manipulation of graphic images"
 arch=('i686' 'x86_64')
@@ -9,27 +9,22 @@
 license=('custom' 'BSD' 'GPL' 'LGPL')
 url="http://netpbm.sourceforge.net/"
 depends=('perl' 'libpng' 'libtiff' 'libxml2')
-makedepends=('python2')
+makedepends=('python2' 'jbigkit')
 options=('!makeflags')
-source=(ftp://ftp.archlinux.org/other/packages/netpbm/${pkgname}-${pkgver}.tar.xz{,.sig} \
-        ftp://ftp.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig} \
+# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
+source=(svn://svn.code.sf.net/p/netpbm/code/advanced
+        ftp://ftp.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
         netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch)
-sha1sums=('b396dfde402b6979a8b551cf60ba1030278a233d'
-          'SKIP'
+sha1sums=('SKIP'
           '25a58975bd8cd383238b4ae31f4405c60914faac'
           'SKIP'
           'b79cf9d42488fea065ba16262ed97694c47af08d'
-          '4213468c44a63c0575896f6781987a09cfcc2d30'
+          '4e9d91516d79d2099ba4bd47434e6bb12c52bcc4'
           'c67a63c010353de3ecac3ad72ba76bbb85e4ed4c')
 
-# source PKGBUILD && mksource
-mksource() {
-# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
-  svn checkout svn://svn.code.sf.net/p/netpbm/code/advanced advanced
-  _pkgver=$(grep MAJOR advanced/version.mk |cut -d ' ' -f 3).$(grep MINOR advanced/version.mk |cut -d ' ' -f 3).0$(grep POINT advanced/version.mk |cut -d ' ' -f 3)
-  tar -cf ${pkgname}-${_pkgver}.tar.xz advanced
-  gpg --detach-sign --use-agent -u ${GPGKEY} ${pkgname}-${_pkgver}.tar.xz
-  rm -r advanced
+pkgver() {
+  cd advanced
+  echo $(grep MAJOR version.mk |cut -d ' ' -f 3).$(grep MINOR version.mk |cut -d ' ' -f 3).0$(grep POINT version.mk |cut -d ' ' -f 3)
 }
 
 prepare() {
@@ -48,6 +43,7 @@
   echo 'JPEGLIB = libjpeg.so' >> config.mk
   echo 'PNGLIB = libpng.so' >> config.mk
   echo 'ZLIB = libz.so' >> config.mk
+  echo 'JBIGLIB = /usr/lib/libjbig.a' >> config.mk
 
   sed -i 's|misc|share/netpbm|' common.mk
   sed -i 's|/link|/lib|' lib/Makefile

Modified: netpbm-security-code.patch
===================================================================
--- netpbm-security-code.patch	2014-07-08 19:24:37 UTC (rev 216732)
+++ netpbm-security-code.patch	2014-07-09 02:03:52 UTC (rev 216733)
@@ -151,26 +151,6 @@
   */
  /*
   * pnmtorle - A program which will convert pbmplus (ppm or pgm) images
-diff -up netpbm-10.58.01/converter/other/pnmtosgi.c.security-code netpbm-10.58.01/converter/other/pnmtosgi.c
---- netpbm-10.58.01/converter/other/pnmtosgi.c.security-code	2012-04-09 15:31:42.000000000 +0200
-+++ netpbm-10.58.01/converter/other/pnmtosgi.c	2012-04-09 15:40:03.188619976 +0200
-@@ -254,6 +254,7 @@ build_channels(FILE * const ifp, int con
- #endif
- 
-     if( storage != STORAGE_VERBATIM ) {
-+        overflow2(channels, rows);
-         MALLOCARRAY_NOFAIL(table, channels * rows);
-         MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols));
-     }
-@@ -306,6 +307,8 @@ compress(ScanElem * temp,
-             break;
-         case STORAGE_RLE:
-             tabrow = chan_no * rows + row;
-+            overflow2(chan_no, rows);
-+            overflow_add(chan_no* rows, row);
-             len = rle_compress(temp, cols);    /* writes result into rletemp */
-             channel[chan_no][row].length = len;
-             MALLOCARRAY(p, len);
 diff -up netpbm-10.58.01/converter/other/rletopnm.c.security-code netpbm-10.58.01/converter/other/rletopnm.c
 --- netpbm-10.58.01/converter/other/rletopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
 +++ netpbm-10.58.01/converter/other/rletopnm.c	2012-04-09 15:40:03.189619963 +0200
@@ -183,25 +163,6 @@
   */
  /*
   * rletopnm - A conversion program to convert from Utah's "rle" image format
-diff -up netpbm-10.58.01/converter/other/sgitopnm.c.security-code netpbm-10.58.01/converter/other/sgitopnm.c
---- netpbm-10.58.01/converter/other/sgitopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
-+++ netpbm-10.58.01/converter/other/sgitopnm.c	2012-04-09 15:40:03.189619963 +0200
-@@ -359,10 +359,14 @@ readChannels(FILE *       const ifP,
-         MALLOCARRAY_NOFAIL(image, head->ysize);
-     } else {
-         maxchannel = MIN(3, head->zsize);
-+        overflow2(head->ysize, maxchannel);
-         MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
-     }
--    if (table) 
-+    if (table) {
-+        overflow2(head->xsize, 2);
-+        overflow_add(head->xsize*2, 2);
-         MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize));
-+    }
- 
-     for (channel = 0; channel < maxchannel; ++channel) {
-         unsigned int row;
 diff -up netpbm-10.58.01/converter/other/sirtopnm.c.security-code netpbm-10.58.01/converter/other/sirtopnm.c
 --- netpbm-10.58.01/converter/other/sirtopnm.c.security-code	2012-04-09 15:31:42.000000000 +0200
 +++ netpbm-10.58.01/converter/other/sirtopnm.c	2012-04-09 15:40:03.190619951 +0200
@@ -1658,3 +1619,40 @@
      MALLOCARRAY_NOFAIL(table, oldmaxval + 1);
      for (i = 0; i <= oldmaxval; ++i)
          table[i] = ROUNDDIV(i * newmaxval, oldmaxval);
+--- netpbm-10.58.01/converter/other/sgitopnm.c.orig	2014-07-08 16:57:30.878754976 -0400
++++ netpbm-10.58.01/converter/other/sgitopnm.c	2014-07-08 17:07:52.727745725 -0400
+@@ -372,10 +372,14 @@
+         MALLOCARRAY_NOFAIL(image, head->ysize);
+     } else {
+         maxchannel = 3;
++	overflow2(head->ysize, maxchannel);
+         MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
+     }
+-    if (table)
++    if (table) {
++        overflow2(head->xsize, 2);
++        overflow_add(head->xsize*2, 2);
+         MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize));
++    }
+ 
+     for (channel = 0; channel < maxchannel; ++channel) {
+         unsigned int row;
+--- netpbm-10.58.01/converter/other/pnmtosgi.c.orig	2014-07-08 16:57:30.878754976 -0400
++++ netpbm-10.58.01/converter/other/pnmtosgi.c	2014-07-08 17:11:55.164018919 -0400
+@@ -176,6 +176,8 @@
+         break;
+     case STORAGE_RLE: {
+         unsigned int const tabrow = chanNum * rows + row;
++	overflow2(chanNum, rows);
++	overflow_add(chanNum* rows, row);
+         unsigned int const len = rleCompress(tempArg, cols);
+             /* writes result into rletemp */
+         unsigned int i;
+@@ -212,6 +214,7 @@
+     ScanElem * temp;
+ 
+     if (storage != STORAGE_VERBATIM) {
++        overflow2(channels, rows);
+         MALLOCARRAY_NOFAIL(table, channels * rows);
+         MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols));
+     } else




More information about the arch-commits mailing list