Browse Source

sane-backends: bump to 1.0.27

Fixes CVE-2017-6318

Patches where refreshed and the following removed:
- 020-fix_pieusb.patch: fixed upstream
- 030-musl.patch: accepted upstream

PS: there was no sane-backends 1.0.26

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
lilik-openwrt-22.03
Luiz Angelo Daros de Luca 8 years ago
parent
commit
275bc8edcf
6 changed files with 27 additions and 123 deletions
  1. +5
    -9
      utils/sane-backends/Makefile
  2. +1
    -1
      utils/sane-backends/patches/002-remove-uneeded.patch
  3. +0
    -16
      utils/sane-backends/patches/020-fix_pieusb.patch
  4. +0
    -73
      utils/sane-backends/patches/030-musl.patch
  5. +6
    -20
      utils/sane-backends/patches/031-fix_uclibc.patch
  6. +15
    -4
      utils/sane-backends/patches/050-remove_linked_libs_for_unused_preload.patch

+ 5
- 9
utils/sane-backends/Makefile View File

@ -1,5 +1,6 @@
# #
# Copyright (C) 2006-2016 OpenWrt.org # Copyright (C) 2006-2016 OpenWrt.org
# Copyright (C) 2017 Luiz Angelo Daros de Luca <luizluca@gmail.com>
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -8,19 +9,16 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=sane-backends PKG_NAME:=sane-backends
PKG_VERSION:=1.0.25
PKG_RELEASE:=2
PKG_VERSION:=1.0.27
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fossies.org/linux/misc \ PKG_SOURCE_URL:=http://fossies.org/linux/misc \
https://alioth.debian.org/frs/download.php/file/4146/ https://alioth.debian.org/frs/download.php/file/4146/
PKG_MD5SUM:=f9ed5405b3c12f07c6ca51ee60225fe7
PKG_HASH:=293747bf37275c424ebb2c833f8588601a60b2f9653945d5a3194875355e36c9
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com> PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=COPYING LICENSE PKG_LICENSE_FILES:=COPYING LICENSE
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4
PKG_INSTALL:=1 PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -167,8 +165,6 @@ TARGET_LDFLAGS += \
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= \
--enable-shared \ --enable-shared \
--enable-static \ --enable-static \
--disable-translations \
--disable-latex \
--without-gphoto2 \ --without-gphoto2 \
--without-snmp --without-snmp
@ -352,7 +348,7 @@ $(eval $(call SaneBackend,umax,UMAX scanners))
$(eval $(call SaneBackend,umax1220u,the UMAX Astra 1220U and similar scanners)) $(eval $(call SaneBackend,umax1220u,the UMAX Astra 1220U and similar scanners))
$(eval $(call SaneBackend,umax_pp,Umax Astra parallel port flatbed scanners)) $(eval $(call SaneBackend,umax_pp,Umax Astra parallel port flatbed scanners))
$(eval $(call SaneBackend,v4l,Video for Linux API,+libv4l +libjpeg)) $(eval $(call SaneBackend,v4l,Video for Linux API,+libv4l +libjpeg))
$(eval $(call SaneBackend,xerox_mfp,Xerox Phaser 3200MFP device))
$(eval $(call SaneBackend,xerox_mfp,Xerox Phaser 3200MFP device,+libjpeg))
$(eval $(call BuildPackage,sane-backends)) $(eval $(call BuildPackage,sane-backends))
$(eval $(call BuildPackage,sane-backends-all)) $(eval $(call BuildPackage,sane-backends-all))
$(eval $(call BuildPackage,sane-frontends)) $(eval $(call BuildPackage,sane-frontends))

+ 1
- 1
utils/sane-backends/patches/002-remove-uneeded.patch View File

@ -1,6 +1,6 @@
--- a/Makefile.in --- a/Makefile.in
+++ b/Makefile.in +++ b/Makefile.in
@@ -400,7 +400,7 @@ target_alias = @target_alias@
@@ -423,7 +423,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@


+ 0
- 16
utils/sane-backends/patches/020-fix_pieusb.patch View File

@ -1,16 +0,0 @@
--- a/backend/pieusb_buffer.c
+++ b/backend/pieusb_buffer.c
@@ -104,11 +104,13 @@
/* When creating the release backend, make complains about unresolved external
* le16toh, although it finds the include <endian.h> */
+#ifndef le16toh
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define le16toh(x) (x)
#else
#define le16toh(x) __bswap_16 (x)
#endif
+#endif
static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment);

+ 0
- 73
utils/sane-backends/patches/030-musl.patch View File

@ -1,73 +0,0 @@
--- a/include/sane/sanei_udp.h
+++ b/include/sane/sanei_udp.h
@@ -27,6 +27,9 @@
#include <netinet/in.h>
#include <netdb.h>
#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
extern SANE_Status sanei_udp_open(const char *host, int port, int *fdp);
extern SANE_Status sanei_udp_open_broadcast(int *fdp);
--- a/backend/kvs20xx_cmd.h
+++ b/backend/kvs20xx_cmd.h
@@ -9,6 +9,10 @@
Panasonic KV-S20xx USB-SCSI scanners.
*/
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
#define COMMAND_BLOCK 1
#define DATA_BLOCK 2
#define RESPONSE_BLOCK 3
--- a/backend/kvs40xx.h
+++ b/backend/kvs40xx.h
@@ -10,6 +10,9 @@
#include "../include/sane/config.h"
#include <semaphore.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#undef BACKEND_NAME
#define BACKEND_NAME kvs40xx
--- a/backend/hp5400.c
+++ b/backend/hp5400.c
@@ -67,6 +67,9 @@
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memcpy */
#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#define HP5400_CONFIG_FILE "hp5400.conf"
--- a/backend/hp5590.c
+++ b/backend/hp5590.c
@@ -48,6 +48,9 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#include "../include/sane/sane.h"
#define BACKEND_NAME hp5590
--- a/backend/epsonds-io.c
+++ b/backend/epsonds-io.c
@@ -16,6 +16,9 @@
#include "sane/config.h"
#include <ctype.h>
#include <unistd.h> /* sleep */
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#include "epsonds.h"
#include "epsonds-io.h"

+ 6
- 20
utils/sane-backends/patches/031-fix_uclibc.patch View File

@ -1,8 +1,8 @@
--- a/configure.in
+++ b/configure.in
@@ -279,6 +279,9 @@ dnl ************************************
dnl Checks for library functions
dnl ***********************************************************************
--- a/configure.ac
+++ b/configure.ac
@@ -280,6 +280,9 @@ AS_IF([test x != x$ALLOCA],
[LTALLOCA=`echo "$ALLOCA" | sed 's/\.o$//; s/\.obj$//'`.lo])
AC_SUBST(LTALLOCA)
+dnl Check mkostemp (missing in uclibc) +dnl Check mkostemp (missing in uclibc)
+AC_CHECK_FUNC(mkostemp) +AC_CHECK_FUNC(mkostemp)
@ -12,7 +12,7 @@
AC_CHECK_FUNC(gethostbyaddr,, [AC_CHECK_LIB(bind, gethostbyaddr, BIND_LIB="-lbind")]) AC_CHECK_FUNC(gethostbyaddr,, [AC_CHECK_LIB(bind, gethostbyaddr, BIND_LIB="-lbind")])
--- a/include/sane/config.h.in --- a/include/sane/config.h.in
+++ b/include/sane/config.h.in +++ b/include/sane/config.h.in
@@ -207,6 +207,9 @@
@@ -229,6 +229,9 @@
/* Define to 1 if you have the `mkdir' function. */ /* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR #undef HAVE_MKDIR
@ -22,17 +22,3 @@
/* Define to 1 if you have a working `mmap' system call. */ /* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP #undef HAVE_MMAP
--- a/backend/pieusb_buffer.c
+++ b/backend/pieusb_buffer.c
@@ -112,6 +112,11 @@
#endif
#endif
+#ifndef HAVE_MKOSTEMP
+/* uclibc might not implement mkostemp GNU extension */
+#define mkostemp(template, flags) mkstemp(template)
+#endif
+
static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment);
/* READER */

+ 15
- 4
utils/sane-backends/patches/050-remove_linked_libs_for_unused_preload.patch View File

@ -1,11 +1,22 @@
--- a/backend/Makefile.am --- a/backend/Makefile.am
+++ b/backend/Makefile.am +++ b/backend/Makefile.am
@@ -1142,7 +1142,7 @@ EXTRA_DIST += dll.aliases
@@ -1122,7 +1122,7 @@ EXTRA_DIST += dll.aliases
nodist_libsane_la_SOURCES = dll-s.c nodist_libsane_la_SOURCES = dll-s.c
libsane_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll libsane_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll
libsane_la_LDFLAGS = $(DIST_LIBS_LDFLAGS) libsane_la_LDFLAGS = $(DIST_LIBS_LDFLAGS)
-libsane_la_LIBADD = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(LIBV4L_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(GPHOTO2_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(AVAHI_LIBS) $(SCSI_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
+libsane_la_LIBADD = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
-libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(LIBV4L_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(GPHOTO2_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(AVAHI_LIBS) $(SCSI_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
+libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
# WARNING: Automake is getting this wrong so have to do it ourselves. # WARNING: Automake is getting this wrong so have to do it ourselves.
libsane_la_DEPENDENCIES = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo @SANEI_SANEI_JPEG_LO@
libsane_la_DEPENDENCIES = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(SANEI_SANEI_JPEG_LO)
--- a/backend/Makefile.in
+++ b/backend/Makefile.in
@@ -2757,7 +2757,7 @@ libsane_dll_la_LIBADD = $(COMMON_LIBS) l
nodist_libsane_la_SOURCES = dll-s.c
libsane_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll
libsane_la_LDFLAGS = $(DIST_LIBS_LDFLAGS)
-libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(LIBV4L_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(GPHOTO2_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(AVAHI_LIBS) $(SCSI_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
+libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
# WARNING: Automake is getting this wrong so have to do it ourselves.
libsane_la_DEPENDENCIES = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(SANEI_SANEI_JPEG_LO)

Loading…
Cancel
Save