From 35c121d1b3c7989e1598b659469d215c29849399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertu=C4=9Frul=20Erata?= Date: Sun, 2 Aug 2015 22:36:35 +0300 Subject: [PATCH 1/2] work for sane-backends 1 --- hardware/misc/libgphoto2/actions.py | 67 +++++++++ hardware/misc/libgphoto2/comar/package.py | 9 ++ .../files/gphoto2-device-return.patch | 32 +++++ .../misc/libgphoto2/files/gphoto2-ixany.patch | 14 ++ .../libgphoto2/files/gphoto2-pkgcfg.patch | 74 ++++++++++ hardware/misc/libgphoto2/pspec.xml | 113 +++++++++++++++ hardware/misc/libgphoto2/translations.xml | 20 +++ hardware/misc/libieee1284/actions.py | 23 ++++ .../files/libieee1284-strict-aliasing.patch | 60 ++++++++ hardware/misc/libieee1284/pspec.xml | 84 ++++++++++++ hardware/misc/libieee1284/translations.xml | 20 +++ hardware/scannner/component.xml | 3 + hardware/scannner/sane-backends/actions.py | 50 +++++++ hardware/scannner/sane-backends/files/30sane | 1 + .../files/archlinux/network.patch | 42 ++++++ .../segfault-avahi-fix-kodakio.patch | 98 +++++++++++++ .../files/fix-buffer-overflow.patch | 24 ++++ .../sane-backends-1.0.20-open-macro.patch | 66 +++++++++ ...-backends-1.0.21-epson-expression800.patch | 47 +++++++ ...backends-1.0.23-sane-config-multilib.patch | 36 +++++ .../files/sane-backends-1.0.23-soname.patch | 49 +++++++ .../files/sane-backends-1.0.23-udev.patch | 64 +++++++++ .../scannner/sane-backends/files/sane.png | Bin 0 -> 2587 bytes .../files/suse/fix-mustek_pp_ccd300.c.patch | 33 +++++ hardware/scannner/sane-backends/pspec.xml | 129 ++++++++++++++++++ .../scannner/sane-backends/translations.xml | 18 +++ multimedia/misc/gd/actions.py | 29 ++++ .../misc/gd/files/gd-2.1.1-libvpx-1.4.0.patch | 37 +++++ multimedia/misc/gd/pspec.xml | 99 ++++++++++++++ multimedia/misc/gd/translations.xml | 18 +++ 30 files changed, 1359 insertions(+) create mode 100644 hardware/misc/libgphoto2/actions.py create mode 100644 hardware/misc/libgphoto2/comar/package.py create mode 100644 hardware/misc/libgphoto2/files/gphoto2-device-return.patch create mode 100644 hardware/misc/libgphoto2/files/gphoto2-ixany.patch create mode 100644 hardware/misc/libgphoto2/files/gphoto2-pkgcfg.patch create mode 100644 hardware/misc/libgphoto2/pspec.xml create mode 100644 hardware/misc/libgphoto2/translations.xml create mode 100644 hardware/misc/libieee1284/actions.py create mode 100644 hardware/misc/libieee1284/files/libieee1284-strict-aliasing.patch create mode 100644 hardware/misc/libieee1284/pspec.xml create mode 100644 hardware/misc/libieee1284/translations.xml create mode 100644 hardware/scannner/component.xml create mode 100644 hardware/scannner/sane-backends/actions.py create mode 100644 hardware/scannner/sane-backends/files/30sane create mode 100644 hardware/scannner/sane-backends/files/archlinux/network.patch create mode 100644 hardware/scannner/sane-backends/files/archlinux/segfault-avahi-fix-kodakio.patch create mode 100644 hardware/scannner/sane-backends/files/fix-buffer-overflow.patch create mode 100644 hardware/scannner/sane-backends/files/sane-backends-1.0.20-open-macro.patch create mode 100644 hardware/scannner/sane-backends/files/sane-backends-1.0.21-epson-expression800.patch create mode 100644 hardware/scannner/sane-backends/files/sane-backends-1.0.23-sane-config-multilib.patch create mode 100644 hardware/scannner/sane-backends/files/sane-backends-1.0.23-soname.patch create mode 100644 hardware/scannner/sane-backends/files/sane-backends-1.0.23-udev.patch create mode 100644 hardware/scannner/sane-backends/files/sane.png create mode 100644 hardware/scannner/sane-backends/files/suse/fix-mustek_pp_ccd300.c.patch create mode 100644 hardware/scannner/sane-backends/pspec.xml create mode 100644 hardware/scannner/sane-backends/translations.xml create mode 100644 multimedia/misc/gd/actions.py create mode 100644 multimedia/misc/gd/files/gd-2.1.1-libvpx-1.4.0.patch create mode 100644 multimedia/misc/gd/pspec.xml create mode 100644 multimedia/misc/gd/translations.xml diff --git a/hardware/misc/libgphoto2/actions.py b/hardware/misc/libgphoto2/actions.py new file mode 100644 index 0000000000..96333c4012 --- /dev/null +++ b/hardware/misc/libgphoto2/actions.py @@ -0,0 +1,67 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import shelltools +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import get + +import os + +def setup(): + shelltools.export("AUTOPOINT", "true") + autotools.autoreconf("-fi") + autotools.configure("--with-rpmbuild=/bin/false \ + --with-drivers=all \ + --enable-nls \ + --without-aalib \ + --disable-rpath \ + --disable-lockdev \ + --disable-resmgr \ + --disable-ttylock \ + --disable-baudboy \ + --disable-static") + + pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ") + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s \ + udevscriptdir=/lib/udev" % get.installDIR()) + + HAL_FDI="usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi" + UDEV_RULES="lib/udev/rules.d/40-libgphoto2.rules" + CAM_LIST="usr/lib/libgphoto2/print-camera-list" + CAM_LIBS="usr/lib/libgphoto2/%s" % get.srcVERSION() + + # Create hal directory + pisitools.dodir(shelltools.dirName(HAL_FDI)) + + # Export the necessary env variables + shelltools.export("CAMLIBS", "%s/%s" % (get.installDIR(), CAM_LIBS)) + shelltools.export("LIBDIR", "%s/usr/lib/" % get.installDIR()) + shelltools.export("LD_LIBRARY_PATH", "%s/usr/lib/" % get.installDIR()) + + # Generate HAL FDI file + f = open(os.path.join(get.installDIR(), HAL_FDI), "w") + f.write(os.popen("%s/%s hal-fdi" % (get.installDIR(), CAM_LIST)).read()) + f.close() + + # Generate UDEV rule which will replace the HAL FDI when HAL is deprecated + pisitools.dodir("/lib/udev/rules.d") + f = open(os.path.join(get.installDIR(), UDEV_RULES), "w") + f.write(os.popen("%s/%s udev-rules version 136" % (get.installDIR(), CAM_LIST)).read()) + f.close() + + pisitools.removeDir("/usr/share/doc/libgphoto2_port") + + # Remove circular symlink + pisitools.remove("/usr/include/gphoto2/gphoto2") + + pisitools.dodoc("ChangeLog", "NEWS*", "README", "AUTHORS", "TESTERS", "MAINTAINERS", "HACKING") + diff --git a/hardware/misc/libgphoto2/comar/package.py b/hardware/misc/libgphoto2/comar/package.py new file mode 100644 index 0000000000..b958b301e7 --- /dev/null +++ b/hardware/misc/libgphoto2/comar/package.py @@ -0,0 +1,9 @@ +import os + +def postInstall(fromVersion, fromRelease, toVersion, toRelease): + stale_files = ["/usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2-device.fdi", + "/etc/udev/rules.d/60-libgphoto2.rules"] + + for f in stale_files: + if os.path.exists(f): + os.unlink(f) diff --git a/hardware/misc/libgphoto2/files/gphoto2-device-return.patch b/hardware/misc/libgphoto2/files/gphoto2-device-return.patch new file mode 100644 index 0000000000..456c2d4425 --- /dev/null +++ b/hardware/misc/libgphoto2/files/gphoto2-device-return.patch @@ -0,0 +1,32 @@ +From 242878ac1cefd1ef99c2e5d84a794f72e49e28be Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 23 Oct 2009 13:12:16 +0200 +Subject: [PATCH] Repair reattach of kernel driver if it was unbound + +Drah in the header for USBDEVFS_CONNECT. + +Signed-off-by: Lubomir Rintel +--- + libgphoto2_port/usb/libusb.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/libgphoto2_port/usb/libusb.c b/libgphoto2_port/usb/libusb.c +index d1535a5..c8a63f1 100644 +--- a/libgphoto2_port/usb/libusb.c ++++ b/libgphoto2_port/usb/libusb.c +@@ -38,6 +38,12 @@ + #include + #include + ++#if defined(LIBUSB_HAS_GET_DRIVER_NP) && defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP) ++/* Pull in USBDEVFS_CONNECT */ ++#include ++#include ++#endif ++ + #ifdef ENABLE_NLS + # include + # undef _ +-- +1.6.5.rc2 + diff --git a/hardware/misc/libgphoto2/files/gphoto2-ixany.patch b/hardware/misc/libgphoto2/files/gphoto2-ixany.patch new file mode 100644 index 0000000000..09d9d904b3 --- /dev/null +++ b/hardware/misc/libgphoto2/files/gphoto2-ixany.patch @@ -0,0 +1,14 @@ +diff -up gphoto2-2.4.0/libgphoto2-2.4.0/libgphoto2_port/serial/unix.c.ixany gphoto2-2.4.0/libgphoto2-2.4.0/libgphoto2_port/serial/unix.c +--- libgphoto2-2.4.0/libgphoto2_port/serial/unix.c.ixany 2007-07-27 02:36:13.000000000 +0200 ++++ libgphoto2-2.4.0/libgphoto2_port/serial/unix.c 2008-02-25 06:40:40.000000000 +0100 +@@ -98,6 +98,10 @@ + + #define CHECK(result) {int r=(result); if (r<0) return (r);} + ++#ifndef IXANY ++#define IXANY 0004000 ++#endif ++ + /* Linux */ + #ifdef __linux__ + /* devfs is accounted for in the implementation */ diff --git a/hardware/misc/libgphoto2/files/gphoto2-pkgcfg.patch b/hardware/misc/libgphoto2/files/gphoto2-pkgcfg.patch new file mode 100644 index 0000000000..e108a95770 --- /dev/null +++ b/hardware/misc/libgphoto2/files/gphoto2-pkgcfg.patch @@ -0,0 +1,74 @@ +--- libgphoto2-2.4.1/gphoto2-config.in.pkgcfg 2007-07-27 02:36:23.000000000 +0200 ++++ libgphoto2-2.4.1/gphoto2-config.in 2007-07-31 12:21:14.000000000 +0200 +@@ -1,11 +1,5 @@ + #! /bin/sh + +-# leave these definitions here +-# they are required for correct interpolation of +-# @libdir@ and @includedir@ later on +-prefix="@prefix@" +-exec_prefix="@exec_prefix@" +- + usage() + { + cat < + + + + libgphoto2 + http://www.gphoto.org/ + + PisiLinux Community + admins@pisilinux.org + + GPLv2 + library + Library that implements support for numerous digital cameras + libgphoto2 is the core library designed to allow access to digital camera by external programs. + mirrors://sourceforge/gphoto/libgphoto2-2.5.8.tar.bz2 + + doxygen + gd-devel + tiff-devel + fontconfig-devel + libjpeg-turbo-devel + libexif-devel + + + + + libgphoto2 + + zlib + libxml2 + libtool-ltdl + gd + tiff + libvpx + libexif + fontconfig + libjpeg-turbo + + + /usr/bin + /lib/udev + /usr/share/doc/libgphoto2/README + /usr/share/doc/libgphoto2/COPYING + /usr/lib + /usr/share/libgphoto2 + /usr/share/hal/fdi + /lib/udev/rules.d + /usr/share/locale + /usr/share/man + + + System.Package + + + + + libgphoto2-docs + Documentation for libgphoto2 + + /usr/share/doc/libgphoto2 + /usr/share/doc/libgphoto2/camlibs + /usr/share/doc/libgphoto2/apidocs.html + /usr/share/doc/libgphoto2/linux-hotplug + + + + + libgphoto2-devel + Development files for libgphoto2 + + libexif-devel + libgphoto2 + + + /usr/bin/gphoto2-config* + /usr/bin/gphoto2-port-config + /usr/include/gphoto2 + /usr/lib/pkgconfig + /usr/share/man/man3 + + + + + + 2015-08-02 + 2.5.8 + Version bump. + ErtuÄŸrul Erata + ertugrulerata@gmail.com + + + 2014-05-15 + 2.5.4 + Version bump. + Stefan Gronewold(groni) + groni@pisilinux.org + + + 2014-01-30 + 2.5.3.1 + Version bump. + Stefan Gronewold(groni) + groni@pisilinux.org + + + 2012-11-16 + 2.5.0 + First release + PisiLinux Community + namso-01qhotmail.it + + + diff --git a/hardware/misc/libgphoto2/translations.xml b/hardware/misc/libgphoto2/translations.xml new file mode 100644 index 0000000000..0dcd00b4bb --- /dev/null +++ b/hardware/misc/libgphoto2/translations.xml @@ -0,0 +1,20 @@ + + + + libgphoto2 + Sayısal kamera ve müzik çalarlara eriÅŸim saÄŸlayan kütüphane + libgphoto2, harici uygulamalar tarafından sayısal kameralara ve müzik çalarlara eriÅŸim için kullanılan bir programlama kütüphanesidir. + Libgphoto2 est une librairie centrale conçue pour permettre aux programmes extérieurs d'accéder aux appareils photos numériques. + Libgphoto2 es la librería núcleo (core) que permite a programas externos acceder a camaras digitales. + + + + libgphoto2-docs + libgphoto2 için detaylı belgelendirme + + + + libgphoto2-devel + libgphoto2 için geliÅŸtirme dosyaları + + diff --git a/hardware/misc/libieee1284/actions.py b/hardware/misc/libieee1284/actions.py new file mode 100644 index 0000000000..0a75feedb2 --- /dev/null +++ b/hardware/misc/libieee1284/actions.py @@ -0,0 +1,23 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +def setup(): + autotools.autoreconf("-fi") + autotools.configure("--disable-static") + +def configure(): + autotools.make() + +def install(): + autotools.install() + + shelltools.system("chrpath --delete %s/usr/lib/python2.7/site-packages/ieee1284module.so" % get.installDIR()) + pisitools.dodoc("AUTHORS", "NEWS", "TODO", "README", "doc/interface*") diff --git a/hardware/misc/libieee1284/files/libieee1284-strict-aliasing.patch b/hardware/misc/libieee1284/files/libieee1284-strict-aliasing.patch new file mode 100644 index 0000000000..fda890a50b --- /dev/null +++ b/hardware/misc/libieee1284/files/libieee1284-strict-aliasing.patch @@ -0,0 +1,60 @@ +diff -up libieee1284-0.2.11/src/ieee1284module.c.strict-aliasing libieee1284-0.2.11/src/ieee1284module.c +--- libieee1284-0.2.11/src/ieee1284module.c.strict-aliasing 2004-02-03 11:50:57.000000000 +0000 ++++ libieee1284-0.2.11/src/ieee1284module.c 2010-06-23 12:36:05.093026807 +0100 +@@ -28,6 +28,17 @@ typedef struct { + struct parport *port; + } ParportObject; + ++static PyObject * ++Parport_new (PyTypeObject *type, PyObject *args, PyObject *kwds) ++{ ++ ParportObject *self; ++ self = (ParportObject *) type->tp_alloc (type, 0); ++ if (self != NULL) ++ self->port = NULL; ++ ++ return (PyObject *) self; ++} ++ + static int + Parport_init (ParportObject *self, PyObject *args, PyObject *kwds) + { +@@ -562,6 +573,23 @@ static PyTypeObject ParportType = { + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + "parallel port object", /* tp_doc */ ++ 0, /* tp_traverse */ ++ 0, /* tp_clear */ ++ 0, /* tp_richcompare */ ++ 0, /* tp_weaklistoffset */ ++ 0, /* tp_iter */ ++ 0, /* tp_iternext */ ++ Parport_methods, /* tp_methods */ ++ 0, /* tp_members */ ++ Parport_getseters, /* tp_getset */ ++ 0, /* tp_base */ ++ 0, /* tp_dict */ ++ 0, /* tp_descr_get */ ++ 0, /* tp_descr_set */ ++ 0, /* tp_dictoffset */ ++ (initproc)Parport_init, /* tp_init */ ++ 0, /* tp_alloc */ ++ Parport_new, /* tp_new */ + }; + + static PyObject * +@@ -625,14 +653,9 @@ initieee1284 (void) + PyObject *d = PyModule_GetDict (m); + PyObject *c; + +- ParportType.tp_new = PyType_GenericNew; +- ParportType.tp_init = (initproc) Parport_init; +- ParportType.tp_getset = Parport_getseters; +- ParportType.tp_methods = Parport_methods; + if (PyType_Ready (&ParportType) < 0) + return; + +- Py_INCREF (&ParportType); + PyModule_AddObject (m, "Parport", (PyObject *) &ParportType); + + pyieee1284_error = PyErr_NewException("ieee1284.error", NULL, NULL); diff --git a/hardware/misc/libieee1284/pspec.xml b/hardware/misc/libieee1284/pspec.xml new file mode 100644 index 0000000000..9126d09125 --- /dev/null +++ b/hardware/misc/libieee1284/pspec.xml @@ -0,0 +1,84 @@ + + + + + libieee1284 + http://cyberelk.net/tim/libieee1284/ + + PisiLinux Community + admins@pisilinux.org + + GPLv2 + library + Library to query devices using IEEE1284 + Library is intended to be used by applications that need to communicate with (or at least identify) devices that are attached via a parallel port. + mirrors://sourceforge/libieee1284/libieee1284-0.2.11.tar.bz2 + + libieee1284-strict-aliasing.patch + + + + + libieee1284 + + /usr/bin + /usr/lib + /usr/share/doc + /usr/share/man + + + + + python-libieee1284 + Python bindings for libieee1284 + + libieee1284 + + + /usr/lib/python* + + + + + libieee1284-devel + Development files for libieee1284 + + libieee1284 + + + /usr/include + /usr/share/man/man3 + + + + + + 2014-03-10 + 0.2.11 + Fix rpath + Varol MaksutoÄŸlu + waroi@pisilinux.org + + + 2014-03-09 + 0.2.11 + Rebuild. + Kamil Atlı + suvarice@gmail.com + + + 2013-07-28 + 0.2.11 + Dep Fixed + PisiLinux Community + admins@pisilinux.org + + + 2010-10-13 + 0.2.11 + First release + Pisi Linux Admins + admins@pisilinux.org + + + diff --git a/hardware/misc/libieee1284/translations.xml b/hardware/misc/libieee1284/translations.xml new file mode 100644 index 0000000000..983fe76105 --- /dev/null +++ b/hardware/misc/libieee1284/translations.xml @@ -0,0 +1,20 @@ + + + + libieee1284 + IEEE1284 kullanarak donanımların sorgulanması için bir kütüphane + Paralel portlar aracılığı ile baÄŸlanmış araçlarla iletiÅŸimi (en azından tanımlanmasını) gerçekleÅŸtiren uygulamalar için gerekli olan kütüphanedir. + Cette librairie est à destination des applications qui ont besoins de communiquer avec (ou au moins identifier) des périphériques liés au système par le port parallèle. + La librería usado por aplicaciones que necesitan comunicarse con (,o al menos necesitan identificar) dispositivos conectados al puerto paralelo. + + + + python-libieee1284 + libieee1284 için Python baÄŸlayıcıları + + + + libieee1284-devel + libieee1284 için geliÅŸtirme dosyaları + + diff --git a/hardware/scannner/component.xml b/hardware/scannner/component.xml new file mode 100644 index 0000000000..55cacc7328 --- /dev/null +++ b/hardware/scannner/component.xml @@ -0,0 +1,3 @@ + + hardware.scanner + diff --git a/hardware/scannner/sane-backends/actions.py b/hardware/scannner/sane-backends/actions.py new file mode 100644 index 0000000000..4330f577c3 --- /dev/null +++ b/hardware/scannner/sane-backends/actions.py @@ -0,0 +1,50 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +def setup(): + # Those are in gentoo ebuild too, but what are they for? + # I couldn't find in docs, some comment would be helpful here -gurer + shelltools.export("SANEI_JPEG", "sanei_jpeg.o") + shelltools.export("SANEI_JPEG_LO", "sanei_jpeg.lo") + + autotools.autoreconf("-fi") + + autotools.configure("--enable-ipv6 \ + --enable-avahi \ + --enable-libusb \ + --disable-rpath \ + --disable-locking \ + --disable-latex \ + --with-docdir=/usr/share/doc/%s \ + --with-gphoto2" % get.srcNAME()) +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + + # Install udev rule + pisitools.insinto("/lib/udev/rules.d", "tools/udev/libsane.rules", "65-libsane.rules") + + # Add epson epkowa and brother2 backends also + shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(), + "# Epson 'epkowa' backend\n" + + "# See http://www.sane-project.org/cgi-bin/driver.pl?manu=Epson&bus=any for supported scanners\n" + + "# In order to use this backend, you have to install iscan package\nepkowa") + + shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(), + "\n# Brother backend\n" + + "# See http://en.pardus-wiki.org/Brother_scanner_support_for_DCP_and_MFC_models for installation\n" + + "brother\nbrother2\nbrother3") + + shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(), "\n# Added for Xerox Phaser 3100 MFP\nXeroxPhaser3100\n") + + diff --git a/hardware/scannner/sane-backends/files/30sane b/hardware/scannner/sane-backends/files/30sane new file mode 100644 index 0000000000..6711d3c783 --- /dev/null +++ b/hardware/scannner/sane-backends/files/30sane @@ -0,0 +1 @@ +SANE_CONFIG_DIR=/etc/sane.d diff --git a/hardware/scannner/sane-backends/files/archlinux/network.patch b/hardware/scannner/sane-backends/files/archlinux/network.patch new file mode 100644 index 0000000000..2605ea8357 --- /dev/null +++ b/hardware/scannner/sane-backends/files/archlinux/network.patch @@ -0,0 +1,42 @@ +diff --git a/sanei/sanei_tcp.c b/sanei/sanei_tcp.c +index a57d7c7..d0a1e92 100644 +--- a/sanei/sanei_tcp.c ++++ b/sanei/sanei_tcp.c +@@ -45,6 +45,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_WINSOCK2_H + #include +@@ -123,14 +124,27 @@ sanei_tcp_write(int fd, const u_char * buf, int count) + ssize_t + sanei_tcp_read(int fd, u_char * buf, int count) + { +- ssize_t bytes_recv = 0, rc = 1; ++ ssize_t bytes_recv = 0, rc = 1; ++ int retry = 5; + + while (bytes_recv < count && rc > 0) + { + rc = recv(fd, buf+bytes_recv, count-bytes_recv, 0); ++ DBG(1, "%s: bytes received %d\n", __FUNCTION__, rc); + if (rc > 0) + bytes_recv += rc; +- ++ else { ++ if ( errno == EAGAIN && retry-- ) { ++ DBG(1, "%s: waiting %d\n", __FUNCTION__, retry); ++ /* wait for max 1s */ ++ struct timespec req; ++ struct timespec rem; ++ req.tv_sec = 0; ++ req.tv_nsec= 100000000; ++ nanosleep(&req, &rem); ++ rc = 1; ++ } ++ } + } + return bytes_recv; + } diff --git a/hardware/scannner/sane-backends/files/archlinux/segfault-avahi-fix-kodakio.patch b/hardware/scannner/sane-backends/files/archlinux/segfault-avahi-fix-kodakio.patch new file mode 100644 index 0000000000..23f9d1ca9e --- /dev/null +++ b/hardware/scannner/sane-backends/files/archlinux/segfault-avahi-fix-kodakio.patch @@ -0,0 +1,98 @@ +From 37523b867d411c2f82d08128246be7e38bc9812c Mon Sep 17 00:00:00 2001 +From: Paul Newall +Date: Mon, 14 Oct 2013 22:22:53 +0100 +Subject: [PATCH] Bugfix in kodakaio.c to fix segfault when non kodak scanners + return unexpected data via avahi auto discovery + +--- + backend/kodakaio.c | 43 ++++++++++++++++++++++++++++++---------- + doc/descriptions/kodakaio.desc | 2 +- + 3 files changed, 37 insertions(+), 12 deletions(-) + +diff --git a/backend/kodakaio.c b/backend/kodakaio.c +index 8c4583a..b442e50 100644 +--- a/backend/kodakaio.c ++++ b/backend/kodakaio.c +@@ -127,7 +127,7 @@ for ubuntu 12.10 + + #define KODAKAIO_VERSION 02 + #define KODAKAIO_REVISION 4 +-#define KODAKAIO_BUILD 6 ++#define KODAKAIO_BUILD 7 + + /* for usb (but also used for net though it's not required). */ + #define MAX_BLOCK_SIZE 32768 +@@ -2184,6 +2184,7 @@ static void resolve_callback( + AvahiLookupResultFlags flags, + AVAHI_GCC_UNUSED void* userdata) { + ++ AvahiStringList *vid_pair_list = NULL, *pid_pair_list = NULL; + char *pidkey, *pidvalue; + char *vidkey, *vidvalue; + size_t valuesize; +@@ -2204,20 +2205,40 @@ static void resolve_callback( + avahi_address_snprint(a, sizeof(a), address); + + /* Output short for Kodak ESP */ +- DBG(min(10,DBG_AUTO), "%s:%u %s ", a,port,host_name); +- avahi_string_list_get_pair(avahi_string_list_find(txt, "vid"), +- &vidkey, &vidvalue, &valuesize); +- DBG(min(10,DBG_AUTO), "%s=%s ", vidkey, vidvalue); +- avahi_string_list_get_pair(avahi_string_list_find(txt, "pid"), +- &pidkey, &pidvalue, &valuesize); +- DBG(min(10,DBG_AUTO), "%s=%s\n", pidkey, pidvalue); ++ DBG(min(10,DBG_AUTO), "%s:%u %s\n", a,port,host_name); + ++ vid_pair_list = avahi_string_list_find(txt, "vid"); ++ if(vid_pair_list != NULL) { ++ avahi_string_list_get_pair(vid_pair_list, &vidkey, &vidvalue, &valuesize); ++ DBG(min(10,DBG_AUTO), "%s=%s ", vidkey, vidvalue); ++ } ++ else DBG(min(10,DBG_AUTO), "failed to find key vid\n"); ++ ++ pid_pair_list = avahi_string_list_find(txt, "pid"); ++ if(pid_pair_list != NULL) { ++ avahi_string_list_get_pair(pid_pair_list, &pidkey, &pidvalue, &valuesize); ++ DBG(min(10,DBG_AUTO), "%s=%s\n", pidkey, pidvalue); ++ } ++ else DBG(min(10,DBG_AUTO), "failed to find key pid\n"); ++ ++ if(pid_pair_list != NULL && vid_pair_list != NULL) { + ProcessAvahiDevice(name, vidvalue, pidvalue, a); +- avahi_free(vidkey); avahi_free(vidvalue); +- avahi_free(pidkey); avahi_free(pidvalue); ++ } ++ else DBG(min(10,DBG_AUTO), "didn't call ProcessAvahiDevice\n"); ++ ++ if(vid_pair_list != NULL) { ++ avahi_free(vidkey); ++ avahi_free(vidvalue); ++ DBG(min(15,DBG_AUTO), "vidkey and vidvalue freed\n"); ++ } ++ if(pid_pair_list != NULL) { ++ avahi_free(pidkey); ++ avahi_free(pidvalue); ++ DBG(min(15,DBG_AUTO), "pidkey and pidvalue freed\n"); ++ } + } + } +- ++ DBG(min(10,DBG_AUTO), "ending resolve_callback\n"); + avahi_service_resolver_free(r); + } + +diff --git a/doc/descriptions/kodakaio.desc b/doc/descriptions/kodakaio.desc +index 7882513..5fb18ed 100644 +--- a/doc/descriptions/kodakaio.desc ++++ b/doc/descriptions/kodakaio.desc +@@ -1,6 +1,6 @@ + :backend "kodakaio" + :url "http://sourceforge.net/projects/cupsdriverkodak/" +-:version "2.4.6" ++:version "2.4.7" + :manpage "sane-kodakaio" + :comment "Backend for Kodak AiO ESP and Hero printers. Also possibly Advent AWL10" + :devicetype :scanner +-- +1.7.10.4 + diff --git a/hardware/scannner/sane-backends/files/fix-buffer-overflow.patch b/hardware/scannner/sane-backends/files/fix-buffer-overflow.patch new file mode 100644 index 0000000000..6820c6a1b2 --- /dev/null +++ b/hardware/scannner/sane-backends/files/fix-buffer-overflow.patch @@ -0,0 +1,24 @@ +--- backend/niash.c.orig 2006-02-04 12:34:28.000000000 +0100 ++++ backend/niash.c 2007-02-21 15:38:12.000000000 +0100 +@@ -89,7 +89,9 @@ typedef enum + optLamp, + + optCalibrate, +- optGamma /* analog gamma = single number */ ++ optGamma, /* analog gamma = single number */ ++/* have optEndOfList only to define arrays with sufficient size */ ++ optEndOfList + } EOptionIndex; + + +@@ -105,8 +107,8 @@ typedef union + + typedef struct + { +- SANE_Option_Descriptor aOptions[optLast]; +- TOptionValue aValues[optLast]; ++ SANE_Option_Descriptor aOptions[optEndOfList]; ++ TOptionValue aValues[optEndOfList]; + + TScanParams ScanParams; + THWParams HWParams; diff --git a/hardware/scannner/sane-backends/files/sane-backends-1.0.20-open-macro.patch b/hardware/scannner/sane-backends/files/sane-backends-1.0.20-open-macro.patch new file mode 100644 index 0000000000..197c042806 --- /dev/null +++ b/hardware/scannner/sane-backends/files/sane-backends-1.0.20-open-macro.patch @@ -0,0 +1,66 @@ +commit 7987b0332e6b660ac7992176daeede40cab98390 +Author: Nils Philippsen +Date: Tue Jun 16 17:02:49 2009 +0200 + + patch: open-macro + + Squashed commit of the following: + + commit ab8fe801c4f82017988cb44cb79d82d286aa0de4 + Author: Nils Philippsen + Date: Tue Jun 9 17:57:45 2009 +0200 + + don't inadvertently use glibc open() macro + +diff --git a/backend/mustek_pp.c b/backend/mustek_pp.c +index 8c3f06a..7e9d094 100644 +--- a/backend/mustek_pp.c ++++ b/backend/mustek_pp.c +@@ -1152,7 +1152,7 @@ sane_open (SANE_String_Const devicename, SANE_Handle * handle) + + } + +- if ((status = dev->func->open (dev->port, dev->caps, &fd)) != SANE_STATUS_GOOD) { ++ if ((status = (dev->func->open) (dev->port, dev->caps, &fd)) != SANE_STATUS_GOOD) { + + DBG (1, "sane_open: could not open device (%s)\n", + sane_strstatus (status)); +diff --git a/backend/pixma_common.c b/backend/pixma_common.c +index 2bcb3c1..c5e1e96 100644 +--- a/backend/pixma_common.c ++++ b/backend/pixma_common.c +@@ -511,7 +511,7 @@ pixma_open (unsigned devnr, pixma_t ** handle) + strncpy (s->id, pixma_get_device_id (devnr), sizeof (s->id) - 1); + s->ops = s->cfg->ops; + s->scanning = 0; +- error = s->ops->open (s); ++ error = (s->ops->open) (s); + if (error < 0) + goto rollback; + error = pixma_deactivate (s->io); +diff --git a/backend/plustek_pp.c b/backend/plustek_pp.c +index 13d1443..629e238 100644 +--- a/backend/plustek_pp.c ++++ b/backend/plustek_pp.c +@@ -258,7 +258,7 @@ static int drvopen( Plustek_Device *dev ) + + DBG( _DBG_INFO, "drvopen()\n" ); + +- handle = dev->open((const char*)dev->name, (void *)dev ); ++ handle = (dev->open)((const char*)dev->name, (void *)dev ); + + tsecs = 0; + +diff --git a/sanei/sanei_scsi.c b/sanei/sanei_scsi.c +index 69d5859..a594aba 100644 +--- a/sanei/sanei_scsi.c ++++ b/sanei/sanei_scsi.c +@@ -5328,7 +5328,7 @@ sanei_scsi_find_devices (const char *findvendor, const char *findmodel, + (*plugInInterface)->Release (plugInInterface); + IOObjectRelease (scsiDevice); + +- ioReturnValue = (*scsiDeviceInterface)->open (scsiDeviceInterface); ++ ioReturnValue = ((*scsiDeviceInterface)->open) (scsiDeviceInterface); + if (ioReturnValue != kIOReturnSuccess) + { + DBG (5, "Error opening SCSI interface (0x%08x)\n", ioReturnValue); diff --git a/hardware/scannner/sane-backends/files/sane-backends-1.0.21-epson-expression800.patch b/hardware/scannner/sane-backends/files/sane-backends-1.0.21-epson-expression800.patch new file mode 100644 index 0000000000..8a6fb5da31 --- /dev/null +++ b/hardware/scannner/sane-backends/files/sane-backends-1.0.21-epson-expression800.patch @@ -0,0 +1,47 @@ +From 305535e303032814b65bf6d889a95f00f08a9071 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Wed, 5 May 2010 12:49:02 +0200 +Subject: [PATCH] patch: epson-expression800 + +Squashed commit of the following: + +commit 3b501d7499357438a1fbd63fefb2f977ae3051f5 +Author: Nils Philippsen +Date: Wed May 5 12:14:23 2010 +0200 + + Improve Epson Expression 800 + + Epson Expression 800 models announce themselves as "processor", not + "scanner". +--- + doc/descriptions/epson.desc | 1 + + doc/descriptions/epson2.desc | 1 + + 2 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/doc/descriptions/epson.desc b/doc/descriptions/epson.desc +index a22325c..55a0136 100644 +--- a/doc/descriptions/epson.desc ++++ b/doc/descriptions/epson.desc +@@ -174,6 +174,7 @@ + :model "Expression 800" + :interface "SCSI" + :status :complete ++:scsi "EPSON" "Expression800" "processor" + + :model "Expression 1600" + :interface "SCSI USB IEEE-1394" +diff --git a/doc/descriptions/epson2.desc b/doc/descriptions/epson2.desc +index 9a14f4f..56cabcd 100644 +--- a/doc/descriptions/epson2.desc ++++ b/doc/descriptions/epson2.desc +@@ -241,6 +241,7 @@ + :model "Expression 800" ; command spec + :interface "SCSI" + :status :complete ++:scsi "EPSON" "Expression800" "processor" + :comment "overseas version of the GT-9600" + + :model "Expression 836XL" ; command spec +-- +1.6.6.1 + diff --git a/hardware/scannner/sane-backends/files/sane-backends-1.0.23-sane-config-multilib.patch b/hardware/scannner/sane-backends/files/sane-backends-1.0.23-sane-config-multilib.patch new file mode 100644 index 0000000000..2f28835e65 --- /dev/null +++ b/hardware/scannner/sane-backends/files/sane-backends-1.0.23-sane-config-multilib.patch @@ -0,0 +1,36 @@ +From d0c61e7e9b13185f424dff1f4ac697ec53089d69 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Tue, 4 Sep 2012 16:45:14 +0200 +Subject: [PATCH] patch: sane-config-multilib + +Squashed commit of the following: + +commit 81aa4f41bf102b08258c8e1de1c0476835329ec5 +Author: Nils Philippsen +Date: Tue Sep 4 16:43:34 2012 +0200 + + make installed sane-config multi-lib aware again + + This partially reverts commit 77c4ea1a7aa680fb1c3ee4daa1404f21439b2c9b. +--- + tools/sane-config.in | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/tools/sane-config.in b/tools/sane-config.in +index 8e4b52a..1fae2e5 100644 +--- a/tools/sane-config.in ++++ b/tools/sane-config.in +@@ -10,10 +10,6 @@ scriptname="sane-config" + prefix="@prefix@" + exec_prefix="@exec_prefix@" + +-# using our installed *.pc only - neither default nor user paths +-export PKG_CONFIG_LIBDIR="@libdir@/pkgconfig" +-export PKG_CONFIG_PATH="" +- + pkgconfig_package=sane-backends + + usage () +-- +1.7.11.4 + diff --git a/hardware/scannner/sane-backends/files/sane-backends-1.0.23-soname.patch b/hardware/scannner/sane-backends/files/sane-backends-1.0.23-soname.patch new file mode 100644 index 0000000000..04ad829608 --- /dev/null +++ b/hardware/scannner/sane-backends/files/sane-backends-1.0.23-soname.patch @@ -0,0 +1,49 @@ +From 031cd8dd376ed6537afd06ca5aec5e67f5da0489 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Fri, 31 Aug 2012 16:14:49 +0200 +Subject: [PATCH] patch: soname + +Squashed commit of the following: + +commit 2035ced803168210a70c4946814440764e5d0186 +Author: Nils Philippsen +Date: Fri Aug 31 16:13:51 2012 +0200 + + don't use the same SONAME for backend libs and main lib +--- + ltmain.sh | 19 ------------------- + 1 file changed, 19 deletions(-) + +diff --git a/ltmain.sh b/ltmain.sh +index f3eb4c8..17d1508 100755 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -8101,25 +8101,6 @@ EOF + dlname=$soname + fi + +- # Local change for sane-backends: internal name for every lib +- # is "libsane" not "libsane-backendname". So linking to each +- # backend is possible. Also the following test was moved to this +- # location. +- # If -module or -export-dynamic was specified, set the dlname +- if test "$module" = yes || test "$export_dynamic" = yes; then +- # On all known operating systems, these are identical. +- dlname="$soname" +- fi +- case $host in +- *mingw*) +- ;; +- *aix*) +- ;; +- *) +- soname=`echo $soname | sed -e "s/libsane-[A-Za-z_0-9]*/libsane/g"` +- esac +- # End of local change +- + lib="$output_objdir/$realname" + linknames= + for link +-- +1.7.11.4 + diff --git a/hardware/scannner/sane-backends/files/sane-backends-1.0.23-udev.patch b/hardware/scannner/sane-backends/files/sane-backends-1.0.23-udev.patch new file mode 100644 index 0000000000..f7529984ad --- /dev/null +++ b/hardware/scannner/sane-backends/files/sane-backends-1.0.23-udev.patch @@ -0,0 +1,64 @@ +From c7f5126447ed5335a54d9333ac37f35c2189fbf4 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 10 Sep 2012 12:25:33 +0200 +Subject: [PATCH] patch: udev + +Squashed commit of the following: + +commit 3d19b3eaf91fa8c3c2a78956f570d3e0f4c3f342 +Author: Nils Philippsen +Date: Mon Sep 10 12:25:16 2012 +0200 + + adapt generated udev rules for Fedora + +commit 7017c3ad1dadc27edd2c47ceec04f8648c839d53 +Author: Nils Philippsen +Date: Mon Sep 10 12:20:43 2012 +0200 + + use group and mode macros consistently +--- + tools/sane-desc.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/tools/sane-desc.c b/tools/sane-desc.c +index 7bbd012..5c5bbe9 100644 +--- a/tools/sane-desc.c ++++ b/tools/sane-desc.c +@@ -56,9 +56,9 @@ + #define COLOR_NEW "\"#F00000\"" + #define COLOR_UNKNOWN "\"#000000\"" + +-#define DEVMODE "0664" ++#define DEVMODE "0644" + #define DEVOWNER "root" +-#define DEVGROUP "scanner" ++#define DEVGROUP "root" + + #ifndef PATH_MAX + # define PATH_MAX 1024 +@@ -3543,7 +3543,8 @@ print_udev (void) + } + + printf("\n# The following rule will disable USB autosuspend for the device\n"); +- printf("ENV{libsane_matched}==\"yes\", RUN+=\"/bin/sh -c 'if test -e /sys/$env{DEVPATH}/power/control; then echo on > /sys/$env{DEVPATH}/power/control; elif test -e /sys/$env{DEVPATH}/power/level; then echo on > /sys/$env{DEVPATH}/power/level; fi'\"\n"); ++ printf("ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n"); ++ printf("ENV{libsane_matched}==\"yes\", TEST!=\"power/control\", TEST==\"power/level\", ATTR{power/level}=\"on\"\n"); + + printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n"); + +@@ -3619,10 +3620,8 @@ print_udev (void) + } + printf ("LABEL=\"libsane_scsi_rules_end\"\n"); + +- if (mode == output_mode_udevacl) +- printf("\nENV{libsane_matched}==\"yes\", RUN+=\"/bin/setfacl -m g:%s:rw $env{DEVNAME}\"\n", DEVGROUP); +- else +- printf ("\nENV{libsane_matched}==\"yes\", MODE=\"664\", GROUP=\"scanner\"\n"); ++ if (mode != output_mode_udevacl) ++ printf ("\nENV{libsane_matched}==\"yes\", MODE=\"%s\", GROUP=\"%s\"\n", DEVMODE, DEVGROUP); + + printf ("\nLABEL=\"libsane_rules_end\"\n"); + } +-- +1.7.11.4 + diff --git a/hardware/scannner/sane-backends/files/sane.png b/hardware/scannner/sane-backends/files/sane.png new file mode 100644 index 0000000000000000000000000000000000000000..64c78e855fe5117f2c35c787d6261e7417266055 GIT binary patch literal 2587 zcmV+$3gq>PP)R?qytd2U)2#ySn<1*v8B5sszkjfy)R#|GXtqBwIDyO_dtr*X@96h+`V4y9rS-Kawr;Q9`Vp@J(Y z+a*HLD8lzqj0VxzxSEF6H8d_`RaHR6%4bl3SaTDuT|re8B*UPP$sj8-iG~DK$3vAhWE~3G90Hm81qoco zLsK<;-)ACaaoH6cS+;WRNh0!lgF@~w>9MyN?eC$GodIe%wu8VY5{-~46c|a4;rjto z=`6x=h(sfJUKQJ#MM&V-6+B-M2}SU!;#w{eHD)U%6ciS>gxUJSy=;GVvzViRT^<+5 z`u@(uct5(NA)6XytB3$JMZ+f`Z0Ha`&%hAju!ilrR0=jV6?9Zked-epG$!iN!x188 z2w9UUTQ))tFeHsCH9W_qr+1JWKmRK_K5&_&0_4+2aGV^5W}vD%A_P)i2DOF}Hc1^l zM(@BNN0Vt9n^&;%{B^8ac_E=_jAiXB5t2l1Ce37O6x$l%=%H>_uUbl?sTt%FvM&*8 zs>dtji6mmIyJRhoKX@-459~M*1*5}z$WD$Cjz{qASqu>(6pt`GIKaz0yZGR`Pjma% z9;IXLrDqPURi}oo>xk|HFHv(2603`16^fMe1+rF=mW6S`dWf;{0pQ&*Y;IaeP%Tro z(tt|f1O$Pg```#a|Lt~Gu6qAj#q@hH3{zUS{uVLP=QDD67iPQ;Q&I@815pFp%HswK@NN`TN@>ya=I;^q)Vx_Lvs0+3_=-e0)P`vo96!2?TFoaCTSWbW z)kG7`lBVg>C$8H__x@)^-=Cl3?jL{SlnLI$p?97V$>BZJst!X(hI!>*Z*l$2-{#JZ z_h6b~sgO&GN+F3oJBIJ%$!DghRvi>srRIa8LlEfHw_ZXm2pB*5DykF^3NK^%g;&$o zej)|$+r34szx+mN9s%F4itW#TpUqD^!NMi$`N5ALA{L8N$P8o6bYnYtGGl|-6&DD| z7xU<7#OtHDk|3spQB9MnOp1yf;>u5di>@~}(NG_zn4hIsjdH^+-z6N0pETpVYM44c zB$DIftY800$+nVW-|lC4ediWtvLzNYE~Z))G_)+HA>Kp)Ac29zL~0n*kg!W>%DG8G zF@s3recbu2pV9N$?@?4iv21a0V3Iq&^AL$d^Lz#7cyDe@jEx>5o;Zhd&Rspn@d|}w zV(iEsj`Z#$olWxoj*k#YtmOk2UvqL@Z`WS&`p#$h%&m7IRWpnazf7@|!*`&6WQOnk z=(+z*;7m9+v{O8?>8CvKXfs;;8Z^!1oQ6SezJ5PVOV{#+4L><;lpN{&i%6yVk?|NF zPSVhREjQlu6-hqb;xoZ@GUAai&#jvYH++a|Z@BHWjso{+qp7v=IW+2aRD4)Ak;$=dK4u>i7XvMJ7NY zVwf0_5V9#znXI5SG_a`kJisIrYr@oG3=QnY@qNy1TMnv+YZrks6UoC=?JBXRD0aog zP!)oj;JGa?lbn!w>V*TCW_T_E->-@tTkj(^vWK>|b|hT}w}xh#2;oq%W{K3t&@l*9 zFvA+cg>pHM8mU8Z!4(xWS;zBziguA$ID}sf7@e5l>A$_gl{b8yyYKnU9MjHA#l4+7 z#lF`b#GB32ys&{tB#wlPu4$;IM#ZwI0frJHPy$p{#ZXkNQi;I#G0hO3sNy?5!$*_+ zWBVJdT5}b5eeXWbXXr`dm_yK|>_d+!#k>?rBU5f(3ANPVmx$M-P}nRqmTC#r;` z5LMY{dSVL8Dv{3S7&$ggOY8Y`TzoCJeeP={5)01$ae6wqt|OA8!yG%@MWL7`mzhL0 xOhgR=e0;}4H^S66wsKL&hgr3H%~`i?{{}IK%RkWe4ebB`002ovPDHLkV1h}_%ohLv literal 0 HcmV?d00001 diff --git a/hardware/scannner/sane-backends/files/suse/fix-mustek_pp_ccd300.c.patch b/hardware/scannner/sane-backends/files/suse/fix-mustek_pp_ccd300.c.patch new file mode 100644 index 0000000000..388d525070 --- /dev/null +++ b/hardware/scannner/sane-backends/files/suse/fix-mustek_pp_ccd300.c.patch @@ -0,0 +1,33 @@ +--- a/backend/mustek_pp_ccd300.c.orig 2003-12-01 12:52:19.000000000 +0100 ++++ b/backend/mustek_pp_ccd300.c 2009-07-29 16:29:54.000000000 +0200 +@@ -940,10 +940,10 @@ get_color_line_101x (Mustek_pp_Handle * + wait_bank_change (dev, priv->bank_count, 1); + reset_bank_count (dev); + if (priv->ccd_line >= (priv->line_step >> SANE_FIXED_SCALE_SHIFT)) +- priv->redline = ++priv->redline % priv->green_offs; ++ priv->redline = (priv->redline + 1) % priv->green_offs; + if (priv->ccd_line >= + priv->blue_offs + (priv->line_step >> SANE_FIXED_SCALE_SHIFT)) +- priv->blueline = ++priv->blueline % priv->blue_offs; ++ priv->blueline = (priv->blueline + 1) % priv->blue_offs; + continue; + } + +@@ -979,7 +979,7 @@ get_color_line_101x (Mustek_pp_Handle * + + } + +- priv->redline = ++priv->redline % priv->green_offs; ++ priv->redline = (priv->redline + 1) % priv->green_offs; + + if (priv->ccd_line >= priv->green_offs && gogreen) + { +@@ -1013,7 +1013,7 @@ get_color_line_101x (Mustek_pp_Handle * + + if (priv->ccd_line >= + priv->blue_offs + (priv->line_step >> SANE_FIXED_SCALE_SHIFT)) +- priv->blueline = ++priv->blueline % priv->blue_offs; ++ priv->blueline = (priv->blueline + 1) % priv->blue_offs; + + if (gogreen) + { diff --git a/hardware/scannner/sane-backends/pspec.xml b/hardware/scannner/sane-backends/pspec.xml new file mode 100644 index 0000000000..17bae71d23 --- /dev/null +++ b/hardware/scannner/sane-backends/pspec.xml @@ -0,0 +1,129 @@ + + + + + sane-backends + http://www.sane-project.org + + PisiLinux Community + admins@pisilinux.org + + GPLv2 + sane + app:console + library + Scanner access software + Scanner Access Now Easy (SANE) is a universal scanner interface. The SANE application programming interface provides standardized access to any raster image scanner hardware. + ftp://ftp.archlinux.org/other/sane/sane-backends-1.0.24.tar.gz + + libieee1284-devel + libgphoto2-devel + libv4l-devel + avahi-devel + libjpeg-turbo-devel + tiff-devel + net-snmp-devel + + + + fix-buffer-overflow.patch + sane-backends-1.0.20-open-macro.patch + sane-backends-1.0.23-sane-config-multilib.patch + sane-backends-1.0.23-soname.patch + sane-backends-1.0.21-epson-expression800.patch + sane-backends-1.0.23-udev.patch + + + suse/fix-mustek_pp_ccd300.c.patch + + archlinux/network.patch + archlinux/segfault-avahi-fix-kodakio.patch + + + + + sane-backends + + libieee1284 + avahi-libs + libgphoto2 + libv4l + tiff + libjpeg-turbo + net-snmp + cups + libexif + + + /etc/sane.d/dll.d + /etc/env.d + /etc/sane.d + /usr/bin + /usr/share/locale + /usr/sbin + /usr/libexec + /usr/lib + /usr/share/doc/sane-backends/README + /usr/share/doc/sane-backends/COPYING + /usr/share/man + /usr/share/pixmaps + /lib/udev/rules.d + /usr/share/sane + + + sane.png + 30sane + + + + + sane-backends-devel + Development files for sane-backends + + sane-backends + + + /usr/include + /usr/lib/pkgconfig + + + + + sane-backends-docs + Documentation for SANE backends + + /usr/share/doc + + + + + + 2014-02-15 + 1.0.24 + Version bump. + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + 2013-12-21 + 1.0.23 + Move devel files fix to paths + Burak Fazıl Ertürk + burakerturk@pisilinux.org + + + 2013-07-28 + 1.0.23 + Dep Fixed + PisiLinux Community + admins@pisilinux.org + + + 2012-10-25 + 1.0.23 + First release + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + diff --git a/hardware/scannner/sane-backends/translations.xml b/hardware/scannner/sane-backends/translations.xml new file mode 100644 index 0000000000..bad8de904f --- /dev/null +++ b/hardware/scannner/sane-backends/translations.xml @@ -0,0 +1,18 @@ + + + + sane-backends + SANE (Scanner Access Now Easy) döküman ve resim tarayıcı sistemi araçları + SANE ve uygulama programlama arayüzü (API) ile herhangi bir görüntü tarayıcı donanımına standartlaÅŸtırlmış eriÅŸim saÄŸlar. + + + + sane-backends-devel + sane-backends için geliÅŸtirme dosyaları + + + + sane-backends-docs + sane-backends için belgelendirme dosyaları + + diff --git a/multimedia/misc/gd/actions.py b/multimedia/misc/gd/actions.py new file mode 100644 index 0000000000..941499b607 --- /dev/null +++ b/multimedia/misc/gd/actions.py @@ -0,0 +1,29 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +def setup(): + shelltools.system("./bootstrap.sh") + + autotools.configure("--disable-static \ + --with-fontconfig \ + --with-png \ + --with-freetype \ + --with-jpeg \ + --without-xpm") + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + + pisitools.dohtml(".") + pisitools.dodoc("COPYING", "NEWS", "ChangeLog") diff --git a/multimedia/misc/gd/files/gd-2.1.1-libvpx-1.4.0.patch b/multimedia/misc/gd/files/gd-2.1.1-libvpx-1.4.0.patch new file mode 100644 index 0000000000..c698972539 --- /dev/null +++ b/multimedia/misc/gd/files/gd-2.1.1-libvpx-1.4.0.patch @@ -0,0 +1,37 @@ +From d41eb72cd4545c394578332e5c102dee69e02ee8 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 7 Apr 2015 13:11:03 +0200 +Subject: [PATCH] Fix build with latest libvpx 1.4.0 + +These new constants exist at least since 1.0.0 +Compatibility ones have been droped in 1.4.0 +--- + src/webpimg.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/webpimg.c b/src/webpimg.c +index cf73d64..e49fcc6 100644 +--- a/src/webpimg.c ++++ b/src/webpimg.c +@@ -711,14 +711,14 @@ static WebPResult VPXEncode(const uint8* Y, + codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0); + codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2); + +- vpx_img_wrap(&img, IMG_FMT_I420, ++ vpx_img_wrap(&img, VPX_IMG_FMT_I420, + y_width, y_height, 16, (uint8*)(Y)); +- img.planes[PLANE_Y] = (uint8*)(Y); +- img.planes[PLANE_U] = (uint8*)(U); +- img.planes[PLANE_V] = (uint8*)(V); +- img.stride[PLANE_Y] = y_stride; +- img.stride[PLANE_U] = uv_stride; +- img.stride[PLANE_V] = uv_stride; ++ img.planes[VPX_PLANE_Y] = (uint8*)(Y); ++ img.planes[VPX_PLANE_U] = (uint8*)(U); ++ img.planes[VPX_PLANE_V] = (uint8*)(V); ++ img.stride[VPX_PLANE_Y] = y_stride; ++ img.stride[VPX_PLANE_U] = uv_stride; ++ img.stride[VPX_PLANE_V] = uv_stride; + + res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY); + diff --git a/multimedia/misc/gd/pspec.xml b/multimedia/misc/gd/pspec.xml new file mode 100644 index 0000000000..6ed32a2298 --- /dev/null +++ b/multimedia/misc/gd/pspec.xml @@ -0,0 +1,99 @@ + + + + + gd + http://www.libgd.org + + PisiLinux Community + admins@pisilinux.org + + as-is + BSD + library + A fast library for creating graphic images + The gd graphics library allows your code to quickly draw images complete with lines, arcs, text, multiple colors, cut and paste from other images, and flood fills, and to write out the result as a PNG or JPEG file. This is particularly useful in Web applications, where PNG and JPEG are two of the formats accepted for inline images by most browsers. Note that gd is not a paint program. + https://github.com/libgd/libgd/archive/gd-2.1.1.tar.gz + fontconfig-devel + zlib-devel + freetype-devel + libpng-devel + libjpeg-turbo-devel + tiff-devel + libvpx-devel + + + gd-2.1.1-libvpx-1.4.0.patch + + + + + gd + + fontconfig + tiff + libvpx + libjpeg-turbo + zlib + freetype + libpng + + + /usr/bin + /usr/lib + /usr/share/doc/gd + + + + + gd-devel + Development files for gd + + gd + + + /usr/include + /usr/lib/pkgconfig + /usr/bin/gdlib-config + + + + + gd-docs + Documents for gd + + /usr/share/doc/gd/html + + + + + + 2014-08-02 + 2.1.1 + Version bump. + ErtuÄŸrul Erata + ertugrulerata@gmail.com + + + 2014-05-24 + 2.1.0 + Version bump. + Alihan Öztürk + alihan@pisilinux.org + + + 2014-01-25 + 2.0.35 + Rebuild + Stefan Gronewold(groni) + groni@pisilinux.org + + + 2010-10-12 + 2.0.35 + First release + Pisi Linux Admins + admins@pisilinux.org + + + diff --git a/multimedia/misc/gd/translations.xml b/multimedia/misc/gd/translations.xml new file mode 100644 index 0000000000..8ac9b73cc8 --- /dev/null +++ b/multimedia/misc/gd/translations.xml @@ -0,0 +1,18 @@ + + + + gd + Hızlı bir ÅŸekilde resim oluÅŸturmak için bir kütüphane + Une librairie rapide pour créer des graphiques en images. + + + + gd-devel + gd için geliÅŸtirme dosyaları + + + + gd-docs + gd için geliÅŸtirme belgeleri + + From 759a675e5e73e80ae8996304fe97445e87b7138b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertu=C4=9Frul=20Erata?= Date: Mon, 3 Aug 2015 00:36:21 +0300 Subject: [PATCH 2/2] sane-backends fixed in main --- hardware/misc/libgphoto2/pspec.xml | 8 +- hardware/misc/libieee1284/pspec.xml | 3 + hardware/scannner/sane-backends/actions.py | 3 + hardware/scannner/sane-backends/pspec.xml | 7 + network/monitor/component.xml | 3 + network/monitor/net-snmp/actions.py | 70 +++ network/monitor/net-snmp/comar/snmpd.py | 23 + network/monitor/net-snmp/comar/snmptrapd.py | 23 + .../monitor/net-snmp/files/confd-snmpd.conf | 13 + .../net-snmp/files/confd-snmptrapd.conf | 12 + network/monitor/net-snmp/files/locale.patch | 43 ++ .../files/net-snmp-5.5-apsl-copying.patch | 354 ++++++++++++++ .../net-snmp/files/net-snmp-5.5-dir-fix.patch | 14 + network/monitor/net-snmp/files/net-snmpd.conf | 462 ++++++++++++++++++ .../monitor/net-snmp/files/net-snmptrapd.conf | 6 + network/monitor/net-snmp/pspec.xml | 140 ++++++ network/monitor/net-snmp/translations.xml | 16 + 17 files changed, 1195 insertions(+), 5 deletions(-) create mode 100644 network/monitor/component.xml create mode 100644 network/monitor/net-snmp/actions.py create mode 100644 network/monitor/net-snmp/comar/snmpd.py create mode 100644 network/monitor/net-snmp/comar/snmptrapd.py create mode 100644 network/monitor/net-snmp/files/confd-snmpd.conf create mode 100644 network/monitor/net-snmp/files/confd-snmptrapd.conf create mode 100644 network/monitor/net-snmp/files/locale.patch create mode 100644 network/monitor/net-snmp/files/net-snmp-5.5-apsl-copying.patch create mode 100644 network/monitor/net-snmp/files/net-snmp-5.5-dir-fix.patch create mode 100644 network/monitor/net-snmp/files/net-snmpd.conf create mode 100644 network/monitor/net-snmp/files/net-snmptrapd.conf create mode 100644 network/monitor/net-snmp/pspec.xml create mode 100644 network/monitor/net-snmp/translations.xml diff --git a/hardware/misc/libgphoto2/pspec.xml b/hardware/misc/libgphoto2/pspec.xml index 2d7082fbfc..b237001350 100644 --- a/hardware/misc/libgphoto2/pspec.xml +++ b/hardware/misc/libgphoto2/pspec.xml @@ -15,25 +15,23 @@ mirrors://sourceforge/gphoto/libgphoto2-2.5.8.tar.bz2 doxygen + libxml2-devel gd-devel tiff-devel - fontconfig-devel libjpeg-turbo-devel libexif-devel + libusb-devel libgphoto2 - zlib libxml2 libtool-ltdl + libusb gd - tiff - libvpx libexif - fontconfig libjpeg-turbo diff --git a/hardware/misc/libieee1284/pspec.xml b/hardware/misc/libieee1284/pspec.xml index 9126d09125..161519625b 100644 --- a/hardware/misc/libieee1284/pspec.xml +++ b/hardware/misc/libieee1284/pspec.xml @@ -13,6 +13,9 @@ Library to query devices using IEEE1284 Library is intended to be used by applications that need to communicate with (or at least identify) devices that are attached via a parallel port. mirrors://sourceforge/libieee1284/libieee1284-0.2.11.tar.bz2 + + python-devel + libieee1284-strict-aliasing.patch diff --git a/hardware/scannner/sane-backends/actions.py b/hardware/scannner/sane-backends/actions.py index 4330f577c3..6a188d7c27 100644 --- a/hardware/scannner/sane-backends/actions.py +++ b/hardware/scannner/sane-backends/actions.py @@ -25,6 +25,9 @@ def setup(): --disable-latex \ --with-docdir=/usr/share/doc/%s \ --with-gphoto2" % get.srcNAME()) + + pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ") + def build(): autotools.make() diff --git a/hardware/scannner/sane-backends/pspec.xml b/hardware/scannner/sane-backends/pspec.xml index 17bae71d23..dfa70f3f6b 100644 --- a/hardware/scannner/sane-backends/pspec.xml +++ b/hardware/scannner/sane-backends/pspec.xml @@ -17,6 +17,10 @@ ftp://ftp.archlinux.org/other/sane/sane-backends-1.0.24.tar.gz libieee1284-devel + libusb-compat-devel + libnl-devel + openssl-devel + cups-devel libgphoto2-devel libv4l-devel avahi-devel @@ -44,6 +48,9 @@ sane-backends + libnl + openssl + libusb-compat libieee1284 avahi-libs libgphoto2 diff --git a/network/monitor/component.xml b/network/monitor/component.xml new file mode 100644 index 0000000000..f54b271b64 --- /dev/null +++ b/network/monitor/component.xml @@ -0,0 +1,3 @@ + + network.monitor + diff --git a/network/monitor/net-snmp/actions.py b/network/monitor/net-snmp/actions.py new file mode 100644 index 0000000000..36caf9b684 --- /dev/null +++ b/network/monitor/net-snmp/actions.py @@ -0,0 +1,70 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import pythonmodules +from pisi.actionsapi import perlmodules +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +shelltools.export("PYTHONDONTWRITEBYTECODE", "1") + +MIBS = "host agentx smux \ + ucd-snmp/diskio tcp-mib udp-mib mibII/mta_sendmail \ + ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable \ + ip-mib/ipAddressPrefixTable/ipAddressPrefixTable \ + ip-mib/ipDefaultRouterTable/ipDefaultRouterTable \ + ip-mib/ipv6ScopeZoneIndexTable ip-mib/ipIfStatsTable \ + sctp-mib rmon-mib etherlike-mib" + +def setup(): + autotools.autoreconf("-vfi") + autotools.configure('--enable-shared \ + --disable-static \ + --without-rpm \ + --with-sys-location=Unknown \ + --with-sys-contact=root@Unknown \ + --with-default-snmp-version=3 \ + --with-logfile=/var/log/snmpd.log \ + --with-persistent-directory=/var/lib/net-snmp \ + --with-mib-modules="%s" \ + --enable-ipv6 \ + --enable-ucd-snmp-compatibility \ + --with-openssl \ + --with-pic \ + --enable-embedded-perl \ + --with-libwrap \ + --enable-as-needed \ + --without-root-access \ + --enable-mfd-rewrites \ + --with-temp-file-pattern="/run/net-snmp/snmp-tmp-XXXXXX" \ + --enable-local-smux' % MIBS) + + pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ") + +def build(): + autotools.make("-j1") + + shelltools.cd("python") + pythonmodules.compile("--basedir=..") + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + + shelltools.cd("python") + pythonmodules.install('--skip-build --basedir=..') + shelltools.cd("..") + + pisitools.insinto("/etc/snmp/", "EXAMPLE.conf", "snmpd.conf.example") + + pisitools.dodir("/var/lib/net-snmp") + pisitools.dodir("/etc/snmp") + + pisitools.dodoc("AGENT.txt", "ChangeLog", "FAQ", "NEWS", "PORTING", "README", "TODO") + + perlmodules.removePacklist() + perlmodules.removePodfiles() diff --git a/network/monitor/net-snmp/comar/snmpd.py b/network/monitor/net-snmp/comar/snmpd.py new file mode 100644 index 0000000000..54676dee5e --- /dev/null +++ b/network/monitor/net-snmp/comar/snmpd.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +from comar.service import * + +serviceType = "server" +serviceDesc = _({"en": "Simple Network Management Protocol (SNMP) Daemon", + "tr": "Simple Network Management Protocol (SNMP) Servisi"}) +serviceConf = "snmpd" + +pidfile = "/run/snmpd.pid" + +@synchronized +def start(): + startService(command="/usr/sbin/snmpd", + args="-p %s %s" % (pidfile, config.get("SNMPD_FLAGS", "")), + pidfile=pidfile, + donotify=True) + +@synchronized +def stop(): + stopService(pidfile=pidfile, donotify=True) + +def status(): + return isServiceRunning(pidfile) diff --git a/network/monitor/net-snmp/comar/snmptrapd.py b/network/monitor/net-snmp/comar/snmptrapd.py new file mode 100644 index 0000000000..e35ad3f1a3 --- /dev/null +++ b/network/monitor/net-snmp/comar/snmptrapd.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +from comar.service import * + +serviceType = "server" +serviceDesc = _({"en": "Simple Network Management Protocol (SNMP) Trap Daemon", + "tr": "Simple Network Management Protocol (SNMP) Trap Servisi"}) +serviceConf = "snmptrapd" + +pidfile = "/run/snmptrapd.pid" + +@synchronized +def start(): + startService(command="/usr/sbin/snmptrapd", + args="-p %s %s" % (pidfile, config.get("SNMPTRAPD_FLAGS", "")), + pidfile=pidfile, + donotify=True) + +@synchronized +def stop(): + stopService(pidfile=pidfile, donotify=True) + +def status(): + return isServiceRunning(pidfile) diff --git a/network/monitor/net-snmp/files/confd-snmpd.conf b/network/monitor/net-snmp/files/confd-snmpd.conf new file mode 100644 index 0000000000..3d0e10a46b --- /dev/null +++ b/network/monitor/net-snmp/files/confd-snmpd.conf @@ -0,0 +1,13 @@ +# Initial (empty) options. +SNMPD_FLAGS="" + +# Enable connection logging. +#SNMPD_FLAGS="${SNMPD_FLAGS} -a" + +# Enable syslog and disable file log. +#SNMPD_FLAGS="${SNMPD_FLAGS} -Lsd -Lf /dev/null" + +# Enable agentx socket as /var/agentx/master +# *NOTE* Before uncommenting this, make sure +# the /var/agentx directory exists. +#SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master" diff --git a/network/monitor/net-snmp/files/confd-snmptrapd.conf b/network/monitor/net-snmp/files/confd-snmptrapd.conf new file mode 100644 index 0000000000..6753685148 --- /dev/null +++ b/network/monitor/net-snmp/files/confd-snmptrapd.conf @@ -0,0 +1,12 @@ +# extra flags to pass to snmptrapd +SNMPTRAPD_FLAGS="" + +# ignore authentication failure traps +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -a" + +# log messages to specified file +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Lf /var/log/snmptrapd.log" + +# log messages to syslog with the specified facility +# where facility is: 'd' = LOG_DAEMON, 'u' = LOG_USER, [0-7] = LOG_LOCAL[0-7] +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Ls d" diff --git a/network/monitor/net-snmp/files/locale.patch b/network/monitor/net-snmp/files/locale.patch new file mode 100644 index 0000000000..254338521a --- /dev/null +++ b/network/monitor/net-snmp/files/locale.patch @@ -0,0 +1,43 @@ +Index: net-snmp-5.5/snmplib/parse.c +=================================================================== +--- net-snmp-5.5.orig/snmplib/parse.c ++++ net-snmp-5.5/snmplib/parse.c +@@ -101,6 +101,7 @@ SOFTWARE. + #endif + + #include ++#include + + #include + #include +@@ -4785,6 +4786,8 @@ add_mibdir(const char *dirname) + char newline; + struct stat dir_stat, idx_stat; + char tmpstr1[300]; ++ char *locale_data = setlocale(LC_CTYPE, ""); ++ setlocale(LC_CTYPE, "C"); + #endif + + DEBUGMSGTL(("parse-mibs", "Scanning directory %s\n", dirname)); +@@ -4817,6 +4820,7 @@ add_mibdir(const char *dirname) + count++; + } + fclose(ip); ++ setlocale(LC_CTYPE, locale_data); + return count; + } else + DEBUGMSGTL(("parse-mibs", "Can't read index\n")); +@@ -4858,11 +4862,13 @@ add_mibdir(const char *dirname) + closedir(dir); + if (ip) + fclose(ip); ++ setlocale(LC_CTYPE, locale_data); + return (count); + } + else + DEBUGMSGTL(("parse-mibs","cannot open MIB directory %s\n", dirname)); + ++ setlocale(LC_CTYPE, locale_data); + return (-1); + } + diff --git a/network/monitor/net-snmp/files/net-snmp-5.5-apsl-copying.patch b/network/monitor/net-snmp/files/net-snmp-5.5-apsl-copying.patch new file mode 100644 index 0000000000..43b85b6093 --- /dev/null +++ b/network/monitor/net-snmp/files/net-snmp-5.5-apsl-copying.patch @@ -0,0 +1,354 @@ +Add APSL 2.0 license to the COPYING file. + +There is only one file covered by this license: +net-snmp-5.5/agent/mibgroup/host/data_access/swrun_darwin.c + +This file is not used on Linux at all, it's only present in source +tarball and net-snmp.src.rpm. + +In addition, it's licensed under APSL 1.1, but it allows to relicense +the code to 'any subsequent version of this License published by Apple'. +According to http://fedoraproject.org/wiki/Licensing, APSL ver. 2.0 is +better for us. + +diff -up net-snmp-5.5/COPYING.apsl net-snmp-5.5/COPYING +--- net-snmp-5.5/COPYING.apsl 2010-08-04 12:40:27.494479126 +0200 ++++ net-snmp-5.5/COPYING 2010-08-04 12:45:47.713684755 +0200 +@@ -292,3 +292,337 @@ ON ANY THEORY OF LIABILITY, WHETHER IN C + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. ++ ++---- Part 10: APPLE PUBLIC SOURCE LICENSE (APSL 2.0) ---- ++ ++Version 2.0 - August 6, 2003 ++ ++Please read this License carefully before downloading this software. By ++downloading or using this software, you are agreeing to be bound by the terms ++of this License. If you do not or cannot agree to the terms of this License, ++please do not download or use the software. ++ ++Apple Note: In January 2007, Apple changed its corporate name from "Apple ++Computer, Inc." to "Apple Inc." This change has been reflected below and ++copyright years updated, but no other changes have been made to the APSL 2.0. ++ ++1. General; Definitions. This License applies to any program or other ++work which Apple Inc. ("Apple") makes publicly available and which contains a ++notice placed by Apple identifying such program or work as "Original Code" and ++stating that it is subject to the terms of this Apple Public Source License ++version 2.0 ("License"). As used in this License: ++ ++1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the ++grantor of rights, (i) claims of patents that are now or hereafter acquired, ++owned by or assigned to Apple and (ii) that cover subject matter contained in ++the Original Code, but only to the extent necessary to use, reproduce and/or ++distribute the Original Code without infringement; and (b) in the case where ++You are the grantor of rights, (i) claims of patents that are now or hereafter ++acquired, owned by or assigned to You and (ii) that cover subject matter in ++Your Modifications, taken alone or in combination with Original Code. ++ ++1.2 "Contributor" means any person or entity that creates or contributes to ++the creation of Modifications. ++ ++1.3 "Covered Code" means the Original Code, Modifications, the combination ++of Original Code and any Modifications, and/or any respective portions thereof. ++ ++1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise ++make Covered Code available, directly or indirectly, to anyone other than You; ++and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way ++to provide a service, including but not limited to delivery of content, through ++electronic communication with a client other than You. ++ ++1.5 "Larger Work" means a work which combines Covered Code or portions ++thereof with code not governed by the terms of this License. ++ ++1.6 "Modifications" mean any addition to, deletion from, and/or change to, ++the substance and/or structure of the Original Code, any previous ++Modifications, the combination of Original Code and any previous Modifications, ++and/or any respective portions thereof. When code is released as a series of ++files, a Modification is: (a) any addition to or deletion from the contents of ++a file containing Covered Code; and/or (b) any new file or other representation ++of computer program statements that contains any part of Covered Code. ++ ++1.7 "Original Code" means (a) the Source Code of a program or other work as ++originally made available by Apple under this License, including the Source ++Code of any updates or upgrades to such programs or works made available by ++Apple under this License, and that has been expressly identified by Apple as ++such in the header file(s) of such work; and (b) the object code compiled from ++such Source Code and originally made available by Apple under this License ++ ++1.8 "Source Code" means the human readable form of a program or other work ++that is suitable for making modifications to it, including all modules it ++contains, plus any associated interface definition files, scripts used to ++control compilation and installation of an executable (object code). ++ ++1.9 "You" or "Your" means an individual or a legal entity exercising rights ++under this License. For legal entities, "You" or "Your" includes any entity ++which controls, is controlled by, or is under common control with, You, where ++"control" means (a) the power, direct or indirect, to cause the direction or ++management of such entity, whether by contract or otherwise, or (b) ownership ++of fifty percent (50%) or more of the outstanding shares or beneficial ++ownership of such entity. ++ ++2. Permitted Uses; Conditions & Restrictions. Subject to the terms and ++conditions of this License, Apple hereby grants You, effective on the date You ++accept this License and download the Original Code, a world-wide, royalty-free, ++non-exclusive license, to the extent of Apple's Applicable Patent Rights and ++copyrights covering the Original Code, to do the following: ++ ++2.1 Unmodified Code. You may use, reproduce, display, perform, internally ++distribute within Your organization, and Externally Deploy verbatim, unmodified ++copies of the Original Code, for commercial or non-commercial purposes, ++provided that in each instance: ++ ++(a) You must retain and reproduce in all copies of Original Code the ++copyright and other proprietary notices and disclaimers of Apple as they appear ++in the Original Code, and keep intact all notices in the Original Code that ++refer to this License; and ++ ++(b) You must include a copy of this License with every copy of Source Code ++of Covered Code and documentation You distribute or Externally Deploy, and You ++may not offer or impose any terms on such Source Code that alter or restrict ++this License or the recipients' rights hereunder, except as permitted under ++Section 6. ++ ++2.2 Modified Code. You may modify Covered Code and use, reproduce, ++display, perform, internally distribute within Your organization, and ++Externally Deploy Your Modifications and Covered Code, for commercial or ++non-commercial purposes, provided that in each instance You also meet all of ++these conditions: ++ ++(a) You must satisfy all the conditions of Section 2.1 with respect to the ++Source Code of the Covered Code; ++ ++(b) You must duplicate, to the extent it does not already exist, the notice ++in Exhibit A in each file of the Source Code of all Your Modifications, and ++cause the modified files to carry prominent notices stating that You changed ++the files and the date of any change; and ++ ++(c) If You Externally Deploy Your Modifications, You must make Source Code ++of all Your Externally Deployed Modifications either available to those to whom ++You have Externally Deployed Your Modifications, or publicly available. Source ++Code of Your Externally Deployed Modifications must be released under the terms ++set forth in this License, including the license grants set forth in Section 3 ++below, for as long as you Externally Deploy the Covered Code or twelve (12) ++months from the date of initial External Deployment, whichever is longer. You ++should preferably distribute the Source Code of Your Externally Deployed ++Modifications electronically (e.g. download from a web site). ++ ++2.3 Distribution of Executable Versions. In addition, if You Externally ++Deploy Covered Code (Original Code and/or Modifications) in object code, ++executable form only, You must include a prominent notice, in the code itself ++as well as in related documentation, stating that Source Code of the Covered ++Code is available under the terms of this License with information on how and ++where to obtain such Source Code. ++ ++2.4 Third Party Rights. You expressly acknowledge and agree that although ++Apple and each Contributor grants the licenses to their respective portions of ++the Covered Code set forth herein, no assurances are provided by Apple or any ++Contributor that the Covered Code does not infringe the patent or other ++intellectual property rights of any other entity. Apple and each Contributor ++disclaim any liability to You for claims brought by any other entity based on ++infringement of intellectual property rights or otherwise. As a condition to ++exercising the rights and licenses granted hereunder, You hereby assume sole ++responsibility to secure any other intellectual property rights needed, if any. ++For example, if a third party patent license is required to allow You to ++distribute the Covered Code, it is Your responsibility to acquire that license ++before distributing the Covered Code. ++ ++3. Your Grants. In consideration of, and as a condition to, the licenses ++granted to You under this License, You hereby grant to any person or entity ++receiving or distributing Covered Code under this License a non-exclusive, ++royalty-free, perpetual, irrevocable license, under Your Applicable Patent ++Rights and other intellectual property rights (other than patent) owned or ++controlled by You, to use, reproduce, display, perform, modify, sublicense, ++distribute and Externally Deploy Your Modifications of the same scope and ++extent as Apple's licenses under Sections 2.1 and 2.2 above. ++ ++4. Larger Works. You may create a Larger Work by combining Covered Code ++with other code not governed by the terms of this License and distribute the ++Larger Work as a single product. In each such instance, You must make sure the ++requirements of this License are fulfilled for the Covered Code or any portion ++thereof. ++ ++5. Limitations on Patent License. Except as expressly stated in Section ++2, no other patent rights, express or implied, are granted by Apple herein. ++Modifications and/or Larger Works may require additional patent licenses from ++Apple which Apple may grant in its sole discretion. ++ ++6. Additional Terms. You may choose to offer, and to charge a fee for, ++warranty, support, indemnity or liability obligations and/or other rights ++consistent with the scope of the license granted herein ("Additional Terms") to ++one or more recipients of Covered Code. However, You may do so only on Your own ++behalf and as Your sole responsibility, and not on behalf of Apple or any ++Contributor. You must obtain the recipient's agreement that any such Additional ++Terms are offered by You alone, and You hereby agree to indemnify, defend and ++hold Apple and every Contributor harmless for any liability incurred by or ++claims asserted against Apple or such Contributor by reason of any such ++Additional Terms. ++ ++7. Versions of the License. Apple may publish revised and/or new versions ++of this License from time to time. Each version will be given a distinguishing ++version number. Once Original Code has been published under a particular ++version of this License, You may continue to use it under the terms of that ++version. You may also choose to use such Original Code under the terms of any ++subsequent version of this License published by Apple. No one other than Apple ++has the right to modify the terms applicable to Covered Code created under this ++License. ++ ++8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in ++part pre-release, untested, or not fully tested works. The Covered Code may ++contain errors that could cause failures or loss of data, and may be incomplete ++or contain inaccuracies. You expressly acknowledge and agree that use of the ++Covered Code, or any portion thereof, is at Your sole and entire risk. THE ++COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ++ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" ++FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM ++ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT ++LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF ++SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF ++QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH ++CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE ++COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR ++REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ++ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR ++WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED ++REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge ++that the Covered Code is not intended for use in the operation of nuclear ++facilities, aircraft navigation, communication systems, or air traffic control ++machines in which case the failure of the Covered Code could lead to death, ++personal injury, or severe physical or environmental damage. ++ ++9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO ++EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, ++INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR ++YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER ++UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS ++LIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF ++THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL ++PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF ++LIABILITY OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT ++APPLY TO YOU. In no event shall Apple's total liability to You for all damages ++(other than as may be required by applicable law) under this License exceed the ++amount of fifty dollars ($50.00). ++ ++10. Trademarks. This License does not grant any rights to use the ++trademarks or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime ++Streaming Server" or any other trademarks, service marks, logos or trade names ++belonging to Apple (collectively "Apple Marks") or to any trademark, service ++mark, logo or trade name belonging to any Contributor. You agree not to use ++any Apple Marks in or as part of the name of products derived from the Original ++Code or to endorse or promote products derived from the Original Code other ++than as expressly permitted by and in strict compliance at all times with ++Apple's third party trademark usage guidelines which are posted at ++http://www.apple.com/legal/guidelinesfor3rdparties.html. ++ ++11. Ownership. Subject to the licenses granted under this License, each ++Contributor retains all rights, title and interest in and to any Modifications ++made by such Contributor. Apple retains all rights, title and interest in and ++to the Original Code and any Modifications made by or on behalf of Apple ++("Apple Modifications"), and such Apple Modifications will not be automatically ++subject to this License. Apple may, at its sole discretion, choose to license ++such Apple Modifications under this License, or on different terms from those ++contained in this License or may choose not to license them at all. ++ ++12. Termination. ++ ++12.1 Termination. This License and the rights granted hereunder will ++terminate: ++ ++(a) automatically without notice from Apple if You fail to comply with any ++term(s) of this License and fail to cure such breach within 30 days of becoming ++aware of such breach; (b) immediately in the event of the circumstances ++described in Section 13.5(b); or (c) automatically without notice from Apple ++if You, at any time during the term of this License, commence an action for ++patent infringement against Apple; provided that Apple did not first commence ++an action for patent infringement against You in that instance. ++ ++12.2 Effect of Termination. Upon termination, You agree to immediately stop ++any further use, reproduction, modification, sublicensing and distribution of ++the Covered Code. All sublicenses to the Covered Code which have been properly ++granted prior to termination shall survive any termination of this License. ++Provisions which, by their nature, should remain in effect beyond the ++termination of this License shall survive, including but not limited to ++Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other ++for compensation, indemnity or damages of any sort solely as a result of ++terminating this License in accordance with its terms, and termination of this ++License will be without prejudice to any other right or remedy of any party. ++ ++13. Miscellaneous. ++ ++13.1 Government End Users. The Covered Code is a "commercial item" as ++defined in FAR 2.101. Government software and technical data rights in the ++Covered Code include only those rights customarily provided to the public as ++defined in this License. This customary commercial license in technical data ++and software is provided in accordance with FAR 12.211 (Technical Data) and ++12.212 (Computer Software) and, for Department of Defense purchases, DFAR ++252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in ++Commercial Computer Software or Computer Software Documentation). Accordingly, ++all U.S. Government End Users acquire Covered Code with only those rights set ++forth herein. ++ ++13.2 Relationship of Parties. This License will not be construed as ++creating an agency, partnership, joint venture or any other form of legal ++association between or among You, Apple or any Contributor, and You will not ++represent to the contrary, whether expressly, by implication, appearance or ++otherwise. ++ ++13.3 Independent Development. Nothing in this License will impair Apple's ++right to acquire, license, develop, have others develop for it, market and/or ++distribute technology or products that perform the same or similar functions ++as, or otherwise compete with, Modifications, Larger Works, technology or ++products that You may develop, produce, market or distribute. ++ ++13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce ++any provision of this License will not be deemed a waiver of future enforcement ++of that or any other provision. Any law or regulation which provides that the ++language of a contract shall be construed against the drafter will not apply to ++this License. ++ ++13.5 Severability. (a) If for any reason a court of competent jurisdiction ++finds any provision of this License, or portion thereof, to be unenforceable, ++that provision of the License will be enforced to the maximum extent ++permissible so as to effect the economic benefits and intent of the parties, ++and the remainder of this License will continue in full force and effect. (b) ++Notwithstanding the foregoing, if applicable law prohibits or restricts You ++from fully and/or specifically complying with Sections 2 and/or 3 or prevents ++the enforceability of either of those Sections, this License will immediately ++terminate and You must immediately discontinue any use of the Covered Code and ++destroy all copies of it that are in your possession or control. ++ ++13.6 Dispute Resolution. Any litigation or other dispute resolution between ++You and Apple relating to this License shall take place in the Northern ++District of California, and You and Apple hereby consent to the personal ++jurisdiction of, and venue in, the state and federal courts within that ++District with respect to this License. The application of the United Nations ++Convention on Contracts for the International Sale of Goods is expressly ++excluded. ++ ++13.7 Entire Agreement; Governing Law. This License constitutes the entire ++agreement between the parties with respect to the subject matter hereof. This ++License shall be governed by the laws of the United States and the State of ++California, except that body of California law concerning conflicts of law. ++ ++Where You are located in the province of Quebec, Canada, the following clause ++applies: The parties hereby confirm that they have requested that this License ++and all related documents be drafted in English. Les parties ont exigé que le ++présent contrat et tous les documents connexes soient rédigés en anglais. ++ ++EXHIBIT A. ++ ++"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. ++ ++This file contains Original Code and/or Modifications of Original Code as ++defined in and that are subject to the Apple Public Source License Version 2.0 ++(the 'License'). You may not use this file except in compliance with the ++License. Please obtain a copy of the License at ++http://www.opensource.apple.com/apsl/ and read it before using this file. ++ ++The Original Code and all software distributed under the License are ++distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS ++OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT ++LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR ++PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the ++specific language governing rights and limitations under the License." diff --git a/network/monitor/net-snmp/files/net-snmp-5.5-dir-fix.patch b/network/monitor/net-snmp/files/net-snmp-5.5-dir-fix.patch new file mode 100644 index 0000000000..b726c47138 --- /dev/null +++ b/network/monitor/net-snmp/files/net-snmp-5.5-dir-fix.patch @@ -0,0 +1,14 @@ +Let net-snmp-create-v3-user save settings into /etc/ instead of /usr/ + +diff -up net-snmp-5.5/net-snmp-create-v3-user.in.orig net-snmp-5.5/net-snmp-create-v3-user.in +--- net-snmp-5.5/net-snmp-create-v3-user.in.orig 2008-07-22 16:33:25.000000000 +0200 ++++ net-snmp-5.5/net-snmp-create-v3-user.in 2009-09-29 16:30:36.000000000 +0200 +@@ -158,7 +158,7 @@ if test ! -d $outfile ; then + touch $outfile + fi + echo $line >> $outfile +-outfile="@datadir@/snmp/snmpd.conf" ++outfile="/etc/snmp/snmpd.conf" + line="$token $user" + echo "adding the following line to $outfile:" + echo " " $line diff --git a/network/monitor/net-snmp/files/net-snmpd.conf b/network/monitor/net-snmp/files/net-snmpd.conf new file mode 100644 index 0000000000..ee19ab8873 --- /dev/null +++ b/network/monitor/net-snmp/files/net-snmpd.conf @@ -0,0 +1,462 @@ +############################################################################### +# +# snmpd.conf: +# An example configuration file for configuring the ucd-snmp snmpd agent. +# +############################################################################### +# +# This file is intended to only be as a starting point. Many more +# configuration directives exist than are mentioned in this file. For +# full details, see the snmpd.conf(5) manual page. +# +# All lines beginning with a '#' are comments and are intended for you +# to read. All other lines are configuration commands for the agent. + +############################################################################### +# Access Control +############################################################################### + +# As shipped, the snmpd demon will only respond to queries on the +# system mib group until this file is replaced or modified for +# security purposes. Examples are shown below about how to increase the +# level of access. + +# By far, the most common question I get about the agent is "why won't +# it work?", when really it should be "how do I configure the agent to +# allow me to access it?" +# +# By default, the agent responds to the "public" community for read +# only access, if run out of the box without any configuration file in +# place. The following examples show you other ways of configuring +# the agent so that you can change the community names, and give +# yourself write access to the mib tree as well. +# +# For more information, read the FAQ as well as the snmpd.conf(5) +# manual page. + +#### +# First, map the community name "public" into a "security name" + +# sec.name source community +com2sec notConfigUser default public + +#### +# Second, map the security name into a group name: + +# groupName securityModel securityName +group notConfigGroup v1 notConfigUser +group notConfigGroup v2c notConfigUser + +#### +# Third, create a view for us to let the group have rights to: + +# Make at least snmpwalk -v 1 localhost -c public system fast again. +# name incl/excl subtree mask(optional) +view systemview included .1.3.6.1.2.1.1 +view systemview included .1.3.6.1.2.1.25.1.1 + +#### +# Finally, grant the group read-only access to the systemview view. + +# group context sec.model sec.level prefix read write notif +access notConfigGroup "" any noauth exact systemview none none + +# ----------------------------------------------------------------------------- + +# Here is a commented out example configuration that allows less +# restrictive access. + +# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY +# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO +# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE. + +## sec.name source community +#com2sec local localhost COMMUNITY +#com2sec mynetwork NETWORK/24 COMMUNITY + +## group.name sec.model sec.name +#group MyRWGroup any local +#group MyROGroup any mynetwork +# +#group MyRWGroup any otherv3user +#... + +## incl/excl subtree mask +#view all included .1 80 + +## -or just the mib2 tree- + +#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc + + +## context sec.model sec.level prefix read write notif +#access MyROGroup "" any noauth 0 all none none +#access MyRWGroup "" any noauth 0 all all all + + +############################################################################### +# Sample configuration to make net-snmpd RFC 1213. +# Unfortunately v1 and v2c don't allow any user based authentification, so +# opening up the default config is not an option from a security point. +# +# WARNING: If you uncomment the following lines you allow write access to your +# snmpd daemon from any source! To avoid this use different names for your +# community or split out the write access to a different community and +# restrict it to your local network. +# Also remember to comment the syslocation and syscontact parameters later as +# otherwise they are still read only (see FAQ for net-snmp). +# + +# First, map the community name "public" into a "security name" +# sec.name source community +#com2sec notConfigUser default public + +# Second, map the security name into a group name: +# groupName securityModel securityName +#group notConfigGroup v1 notConfigUser +#group notConfigGroup v2c notConfigUser + +# Third, create a view for us to let the group have rights to: +# Open up the whole tree for ro, make the RFC 1213 required ones rw. +# name incl/excl subtree mask(optional) +#view roview included .1 +#view rwview included system.sysContact +#view rwview included system.sysName +#view rwview included system.sysLocation +#view rwview included interfaces.ifTable.ifEntry.ifAdminStatus +#view rwview included at.atTable.atEntry.atPhysAddress +#view rwview included at.atTable.atEntry.atNetAddress +#view rwview included ip.ipForwarding +#view rwview included ip.ipDefaultTTL +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteDest +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteIfIndex +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric1 +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric2 +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric3 +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric4 +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteType +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteAge +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMask +#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric5 +#view rwview included ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex +#view rwview included ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaPhysAddress +#view rwview included ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaNetAddress +#view rwview included ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaType +#view rwview included tcp.tcpConnTable.tcpConnEntry.tcpConnState +#view rwview included egp.egpNeighTable.egpNeighEntry.egpNeighEventTrigger +#view rwview included snmp.snmpEnableAuthenTraps + +# Finally, grant the group read-only access to the systemview view. +# group context sec.model sec.level prefix read write notif +#access notConfigGroup "" any noauth exact roview rwview none + + + +############################################################################### +# System contact information +# + +# It is also possible to set the sysContact and sysLocation system +# variables through the snmpd.conf file: + +syslocation Unknown (edit /etc/snmp/snmpd.conf) +syscontact Root (configure /etc/snmp/snmp.local.conf) + +# Example output of snmpwalk: +# % snmpwalk -v 1 localhost -c public system +# system.sysDescr.0 = "SunOS name sun4c" +# system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4 +# system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55 +# system.sysContact.0 = "Me " +# system.sysName.0 = "name" +# system.sysLocation.0 = "Right here, right now." +# system.sysServices.0 = 72 + + +############################################################################### +# Logging +# + +# We do not want annoying "Connection from UDP: " messages in syslog. +# If the following option is commented out, snmpd will print each incoming +# connection, which can be useful for debugging. + +dontLogTCPWrappersConnects yes + +# ----------------------------------------------------------------------------- + + +############################################################################### +# Process checks. +# +# The following are examples of how to use the agent to check for +# processes running on the host. The syntax looks something like: +# +# proc NAME [MAX=0] [MIN=0] +# +# NAME: the name of the process to check for. It must match +# exactly (ie, http will not find httpd processes). +# MAX: the maximum number allowed to be running. Defaults to 0. +# MIN: the minimum number to be running. Defaults to 0. + +# +# Examples (commented out by default): +# + +# Make sure mountd is running +#proc mountd + +# Make sure there are no more than 4 ntalkds running, but 0 is ok too. +#proc ntalkd 4 + +# Make sure at least one sendmail, but less than or equal to 10 are running. +#proc sendmail 10 1 + +# A snmpwalk of the process mib tree would look something like this: +# +# % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.2 +# enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1 +# enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2 +# enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3 +# enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd" +# enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd" +# enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail" +# enterprises.ucdavis.procTable.prEntry.prMin.1 = 0 +# enterprises.ucdavis.procTable.prEntry.prMin.2 = 0 +# enterprises.ucdavis.procTable.prEntry.prMin.3 = 1 +# enterprises.ucdavis.procTable.prEntry.prMax.1 = 0 +# enterprises.ucdavis.procTable.prEntry.prMax.2 = 4 +# enterprises.ucdavis.procTable.prEntry.prMax.3 = 10 +# enterprises.ucdavis.procTable.prEntry.prCount.1 = 0 +# enterprises.ucdavis.procTable.prEntry.prCount.2 = 0 +# enterprises.ucdavis.procTable.prEntry.prCount.3 = 1 +# enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1 +# enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0 +# enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0 +# enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd process running." +# enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = "" +# enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = "" +# enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0 +# enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0 +# enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0 +# +# Note that the errorFlag for mountd is set to 1 because one is not +# running (in this case an rpc.mountd is, but thats not good enough), +# and the ErrMessage tells you what's wrong. The configuration +# imposed in the snmpd.conf file is also shown. +# +# Special Case: When the min and max numbers are both 0, it assumes +# you want a max of infinity and a min of 1. +# + + +# ----------------------------------------------------------------------------- + + +############################################################################### +# Executables/scripts +# + +# +# You can also have programs run by the agent that return a single +# line of output and an exit code. Here are two examples. +# +# exec NAME PROGRAM [ARGS ...] +# +# NAME: A generic name. The name must be unique for each exec statement. +# PROGRAM: The program to run. Include the path! +# ARGS: optional arguments to be passed to the program + +# a simple hello world + +#exec echotest /bin/echo hello world + +# Run a shell script containing: +# +# #!/bin/sh +# echo hello world +# echo hi there +# exit 35 +# +# Note: this has been specifically commented out to prevent +# accidental security holes due to someone else on your system writing +# a /tmp/shtest before you do. Uncomment to use it. +# +#exec shelltest /bin/sh /tmp/shtest + +# Then, +# % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.8 +# enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1 +# enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2 +# enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest" +# enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest" +# enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello world" +# enterprises.ucdavis.extTable.extEntry.extCommand.2 = "/bin/sh /tmp/shtest" +# enterprises.ucdavis.extTable.extEntry.extResult.1 = 0 +# enterprises.ucdavis.extTable.extEntry.extResult.2 = 35 +# enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world." +# enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world." +# enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0 +# enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0 + +# Note that the second line of the /tmp/shtest shell script is cut +# off. Also note that the exit status of 35 was returned. + +# ----------------------------------------------------------------------------- + + +############################################################################### +# disk checks +# + +# The agent can check the amount of available disk space, and make +# sure it is above a set limit. + +# disk PATH [MIN=100000] +# +# PATH: mount path to the disk in question. +# MIN: Disks with space below this value will have the Mib's errorFlag set. +# Default value = 100000. + +# Check the / partition and make sure it contains at least 10 megs. + +#disk / 10000 + +# % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.9 +# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0 +# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F +# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0" +# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000 +# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130 +# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325 +# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092 +# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58 +# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0 +# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = "" + +# ----------------------------------------------------------------------------- + + +############################################################################### +# load average checks +# + +# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0] +# +# 1MAX: If the 1 minute load average is above this limit at query +# time, the errorFlag will be set. +# 5MAX: Similar, but for 5 min average. +# 15MAX: Similar, but for 15 min average. + +# Check for loads: +#load 12 14 14 + +# % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.10 +# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1 +# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2 +# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3 +# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1" +# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5" +# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15" +# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39 +# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31 +# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36 +# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00" +# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00" +# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00" +# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0 +# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0 +# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0 +# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = "" +# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = "" +# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = "" + +# ----------------------------------------------------------------------------- + + +############################################################################### +# Extensible sections. +# + +# This alleviates the multiple line output problem found in the +# previous executable mib by placing each mib in its own mib table: + +# Run a shell script containing: +# +# #!/bin/sh +# echo hello world +# echo hi there +# exit 35 +# +# Note: this has been specifically commented out to prevent +# accidental security holes due to someone else on your system writing +# a /tmp/shtest before you do. Uncomment to use it. +# +# exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest + +# % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.50 +# enterprises.ucdavis.50.1.1 = 1 +# enterprises.ucdavis.50.2.1 = "shelltest" +# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest" +# enterprises.ucdavis.50.100.1 = 35 +# enterprises.ucdavis.50.101.1 = "hello world." +# enterprises.ucdavis.50.101.2 = "hi there." +# enterprises.ucdavis.50.102.1 = 0 + +# Now the Output has grown to two lines, and we can see the 'hi +# there.' output as the second line from our shell script. +# +# Note that you must alter the mib.txt file to be correct if you want +# the .50.* outputs above to change to reasonable text descriptions. + +# Other ideas: +# +# exec .1.3.6.1.4.1.2021.51 ps /bin/ps +# exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top +# exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq + +# ----------------------------------------------------------------------------- + + +############################################################################### +# Pass through control. +# + +# Usage: +# pass MIBOID EXEC-COMMAND +# +# This will pass total control of the mib underneath the MIBOID +# portion of the mib to the EXEC-COMMAND. +# +# Note: You'll have to change the path of the passtest script to your +# source directory or install it in the given location. +# +# Example: (see the script for details) +# (commented out here since it requires that you place the +# script in the right location. (its not installed by default)) + +# pass .1.3.6.1.4.1.2021.255 /bin/sh /usr/local/local/passtest + +# % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.255 +# enterprises.ucdavis.255.1 = "life the universe and everything" +# enterprises.ucdavis.255.2.1 = 42 +# enterprises.ucdavis.255.2.2 = OID: 42.42.42 +# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42 +# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1 +# enterprises.ucdavis.255.5 = 42 +# enterprises.ucdavis.255.6 = Gauge: 42 +# +# % snmpget -v 1 localhost public .1.3.6.1.4.1.2021.255.5 +# enterprises.ucdavis.255.5 = 42 +# +# % snmpset -v 1 localhost public .1.3.6.1.4.1.2021.255.1 s "New string" +# enterprises.ucdavis.255.1 = "New string" +# + +# For specific usage information, see the man/snmpd.conf.5 manual page +# as well as the local/passtest script used in the above example. + +############################################################################### +# Further Information +# +# See the snmpd.conf manual page, and the output of "snmpd -H". diff --git a/network/monitor/net-snmp/files/net-snmptrapd.conf b/network/monitor/net-snmp/files/net-snmptrapd.conf new file mode 100644 index 0000000000..72ce1ccca4 --- /dev/null +++ b/network/monitor/net-snmp/files/net-snmptrapd.conf @@ -0,0 +1,6 @@ +# Example configuration file for snmptrapd +# +# No traps are handled by default, you must edit this file! +# +# authCommunity log,execute,net public +# traphandle SNMPv2-MIB::coldStart /usr/bin/bin/my_great_script cold diff --git a/network/monitor/net-snmp/pspec.xml b/network/monitor/net-snmp/pspec.xml new file mode 100644 index 0000000000..e67f7c121f --- /dev/null +++ b/network/monitor/net-snmp/pspec.xml @@ -0,0 +1,140 @@ + + + + + net-snmp + http://net-snmp.sourceforge.net/ + + PisiLinux Community + admins@pisilinux.org + + BSD + library + app:console + A collection of SNMP protocol tools and libraries + Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment (eg. routers), computer equipment and even devices like UPSs. Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6. + mirrors://sourceforge/net-snmp/net-snmp-5.7.3.tar.gz + + libnl-devel + python-setuptools + openssl-devel + python-devel + perl + pciutils-devel + tcp-wrappers-devel + + + + locale.patch + + + + + net-snmp + + libnl + openssl + python + perl + pciutils + tcp-wrappers + + + /etc/snmp + /usr/bin + /usr/sbin/snmpd + /etc/conf.d/snmpd + /usr/lib + /usr/share/snmp + /var/lib + /usr/share/man + /usr/share/doc + + + confd-snmpd.conf + net-snmpd.conf + + + System.Service + + + + + net-snmptrap + + net-snmp + tcp-wrappers + + + /etc/conf.d/snmptrapd + /etc/snmp/snmptrapd.conf + /usr/sbin/snmptrapd + + + confd-snmptrapd.conf + net-snmptrapd.conf + + + System.Service + + + + + net-snmp-devel + Development files for net-snmp + + net-snmp + + + /usr/include + /usr/lib/pkgconfig + /usr/share/man/man3 + + + + + + 2015-08-02 + 5.7.3 + Version bump. + ErtuÄŸrul Erata + ertugrulerata@gmail.com + + + 2014-09-13 + 5.7.2.1 + Version bump. + Stefan Gronewold(groni) + groni@pisilinux.org + + + 2014-02-19 + 5.7.2 + Rebuild Unused + Varol MaksutoÄŸlu + waroi@pisilinux.org + + + 2013-12-01 + 5.7.2 + Rebuild for new perl. + PisiLinux Community + admins@pisilinux.org + + + 2013-07-28 + 5.7.2 + Dep Fixed + PisiLinux Community + admins@pisilinux.org + + + 2012-11-09 + 5.7.2 + First release + Marcin Bojara + marcin@pisilinux.org + + + diff --git a/network/monitor/net-snmp/translations.xml b/network/monitor/net-snmp/translations.xml new file mode 100644 index 0000000000..aa2eabdcbb --- /dev/null +++ b/network/monitor/net-snmp/translations.xml @@ -0,0 +1,16 @@ + + + + net-snmp + SNMP protokol araçları ve kitaplıkları + Kolekcja narzÄ™dzi do obsÅ‚ugi protokoÅ‚u SNMP + net-snmp, çeÅŸitli aÄŸ ekipmanlarının saÄŸlığını ve iÅŸleyiÅŸini izlemek için SNMP protokolünü kullanan araçları içerir. + SNMP (Simple Network Management Protocol) jest protokoÅ‚em używanym do zarzÄ…dzania sieciami. Pakiet zawiera narzÄ™dzia: rozbudowywalnego agenta, bibliotekÄ™ SNMP, narzÄ™dzia do odpytywania oraz ustawiania informacji poprzez agentów SNMP, narzÄ™dzia do generowania i obsÅ‚ugi puÅ‚apek SNMP, wersjÄ™ komendy netstat używajÄ…cÄ… SNMP, przeglÄ…darkÄ™ mib w Tk/Perl, demona, dokumentacjÄ™ itp. + + + + net-snmp-devel + net-snmp için geliÅŸtirme dosyaları + Pliki naglowkowe do net-snmp + +