Добавление ebuild из старого оверлея
This commit is contained in:
15
media-gfx/splashutils/Manifest
Normal file
15
media-gfx/splashutils/Manifest
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
AUX splashutils-1.5.4.4-freetype-bz2.patch 515 BLAKE2B a0df29a4078c4a0dddf6114cabdf4cf29764b3e29c94390e818d732e72ea87285046a7a4f6dc6c0f1721b664c832c03d0804338699420e807722bdc9398ba51b SHA512 880cc0703de76c3c145680f1e85e461473df3dd41817757878bd18dc4c0d10484d1f93f995e6818ddcf3309e6b9febc1447ce7880006df8e08626bac5aae2e5c
|
||||||
|
AUX splashutils-1.5.4.4-ft25.patch 1221 BLAKE2B d4fd828b1e8f64463e1d2eec45335ea9e2fe6d0cc4b5c2c39e262bc2eaa01ee500a61d982efc771421698360070e21a557f95f05bc4a943e2f81f53867f5b630 SHA512 5a6d80ed51c7c57ff9ab5930bdbb50d8c594076c0a8a5e72d2d1014f32d2413a2c5b366a777da2cd4292d4e8246caa05c69892930a7a17719e989edd7b749051
|
||||||
|
AUX splashutils-1.5.4.4-gentoo-typo-fix.patch 567 BLAKE2B 651afa1f81c8f132c47faa3ae77b4cc2d41ac99707750c4690c5b8641882f431057f826bc457cfeb6d30da296fa5d511183902beb9b5e20006a459839b2a8a19 SHA512 f5d5fd222b5dea9906e5a7541ad2ab1ff161061c6bb5e013929767d3f6aa9fe245092e201b8d42a086938be3320b77384301c22bc307cf7872daac33184127f2
|
||||||
|
AUX splashutils-1.5.4.4-multi-keyboard.patch 10158 BLAKE2B 4aa0e5887fddd85ef8c3e9aee353df8365915051e97459d9ae670242e4e21017d0b51306cf601031e41971172cee29692e0bf1d440320d36455304b5b55dbf2c SHA512 71056d599f4465ef424444d717ce1597295e0228f548c69cb36ef617075af430b1ac50f5be27bca65a50ed9e7d0169ceb256dbc66cf4b635fd9f8310d32baeae
|
||||||
|
AUX splashutils-1.5.4.4-no-la.patch 504 BLAKE2B 990b328d84b2fa95102c541deddf86410003fd28bd8a12f1ba6ac74b5b5bfb89870274c21905a57817c25e6db7b603bbcd24256973b3106c413bcd4f83f3a9d9 SHA512 e513e0440fa3383dd368c777ac96717ffe94b8dd2b87c36d0dc0daf890b0f7082234ff5086b4c34144c0589a2c45137ec43158605ce50e58879646cd2a68e1c0
|
||||||
|
AUX splashutils-1.5.4.4-sys-queue.patch 233 BLAKE2B 392d4ef1bc0590c1896062c4cbd8f85fcd926c22e9ae1879c055c43c6ace7ee072db45ef7df9d5ffaa2e64c69ef0369258a98a2dbb48008c63503eb3ebabdf9a SHA512 27181754bffb312360cc5834587a6cb68154cdac3a771956f3d4165db0cd079e884a7af5ee1910003882ad7b8835f8947ba9fc7dcc14800635206ac8bd7ada76
|
||||||
|
AUX splashutils-1.5.4.4-sysmacros.patch 301 BLAKE2B 1d0cc9bff34dcd176255e0003cc61876f9c4023d8788d05570abaa64412d1c2d2335f17d354edebe198b40c1d3d4cb0f943641e16f65f81feaf38124122b2d56 SHA512 9b9ab646bec87373bed75fd44395819fb03d19b47457cd7e12de71705c3a1023e031906e4a0d67381301d4d2b322caab2723c30c620e64415724b8c204b6599a
|
||||||
|
DIST freetype-2.3.12.tar.bz2 1453034 BLAKE2B f0b0da50ecd6685a5c0b645252f99399ddcdcf823b4ce712e861899dab41009308473f149646101ca59f597f99b8e7659a8605475d7c6c912a941cb76d9d65fd SHA512 becb0f138ee13181513d3f03b943f0a474e492cab151992fa78d0c84127819dc91ec6d2bd1528af7e111ab150b3a29104f2f7ab79650cebc35ce4d966b19f34b
|
||||||
|
DIST jpegsrc.v8a.tar.gz 962018 BLAKE2B 6f776ca7cbe6b4d8095914f95f968cfef14e91f2b888fe92376d72c36b5b4fa72e9f1089611e2ad257bac5e77262e0523dde596f12305ccde35e51cfdea2d513 SHA512 4020e82e16b99189b1a50bad18b09616775559740b94a988692aa33f9302d4b5abe3ccaa30895b49e6950fb3d9a830deeb7df750d128ec5c7e1844583db4524d
|
||||||
|
DIST libpng-1.4.3.tar.bz2 658335 BLAKE2B 21c6e134a4f0877543ae1b229a3d26348b4b8dcc7ea17a5874399c8736220969c726d64a07a8954fa9c948e4aa57802bf58a41c42a44003f4ac50ec5154198fb SHA512 aaa137ebc2312805d58caf19702d24a34ee81593d4250c4e807ce66ba7edb829926919cd0a2b0e5975421451c8eb6674798c06dbaf745175b16c9d3c92b63f61
|
||||||
|
DIST miscsplashutils-0.1.8.tar.bz2 91997 BLAKE2B f0b47b51b7270ce8ba57fd989f289a940f4dfbab406cfdab9e2ad1e770a00928e169b75acb80e7525295483224e9cdcba0646f61630f1ef4875af392d078c674 SHA512 fa017e264249feda45839030728e90c82f775354c3f2c29a88362938c4a31b19e6d61f967512305642f8b96575f4d756ba197e672a361760e40080c23ec0442a
|
||||||
|
DIST splashutils-gentoo-1.0.17.tar.bz2 15814 BLAKE2B 8c6e2fea3825e5821ab2a20d0f95dc7050438544b9cdc31dc972e3792050dc7d1687842bfda69f93a721103ced5c7168391f53c0f18906a7def2df4a6fb6127c SHA512 75f1fbfdf165f571b0bf09235235827f370e1b940f1717c4faf5b223caba0b80f853a910ba492c776512aecfafa6e74fd964239bbc6cf412620143d5ffc74167
|
||||||
|
DIST splashutils-lite-1.5.4.4.tar.bz2 441340 BLAKE2B a2b348fe675a45d54b25ab60b20f5d4f92e673f5639b674027d0e78496c06948026670e2073c9257a3a0134a18752cc1381b2ba2be2d89d66b711cc7ad68ee2b SHA512 1a78216a1de1fdccff514494d7301640e447c65466e1fe02428e5114485507f67fe4394094880d927d074a8ab2d9c786ba03f9fb0371eb7ab6ef4e3b01aa4613
|
||||||
|
DIST zlib-1.2.3.tar.bz2 425209 BLAKE2B e4226371cbb4219d5f287bbb48a7bf6f8195b9b8de05c168238f39d82f53727f9a2090ceaac45032c6bbece9f839882cf0cd59c783d38be285eae0c02a30b895 SHA512 edae735960279d92acf58e1f4095c6392a7c2059b8f1d2c46648fc608a0fb06b392db2d073f4973f5762c034ea66596e769b95b3d26ad963a086b9b2d09825f2
|
||||||
|
EBUILD splashutils-1.5.4.4-r9.ebuild 6970 BLAKE2B eb9a8537184a3d09841988204393e9fbc80dcd0d44162d4e629b1dbdd98b38d3a14665c7d4d0eba5b45ae2daff42388d79f69736a53ea2f4778cca1bb91a4629 SHA512 ff4cd2753d0ace2f72ac1e70169c0d2a35d21ad0daa120aae1594379956f53b63bf7a8eafd2911263b7206bf9e28a62fd34207365b262751a23c203b99b4b8d3
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
=== modified file 'fbtruetype/Makefile'
|
||||||
|
--- fbtruetype/Makefile 2011-10-01 14:10:17 +0000
|
||||||
|
+++ fbtruetype/Makefile 2011-10-01 14:15:02 +0000
|
||||||
|
@@ -23,8 +23,8 @@
|
||||||
|
OBJECTS = fbtruetype.o messages.o console.o ttf.o luxisri.o
|
||||||
|
|
||||||
|
LDFLAGS += -L$(LIBDIR)
|
||||||
|
-LIBSS = $(LIBDIR)/libfreetype.a $(LIBDIR)/libz.a -lm
|
||||||
|
-LIBSD = -lfreetype -lm
|
||||||
|
+LIBSS = $(shell pkg-config freetype2 --libs --static) -lm
|
||||||
|
+LIBSD = $(shell pkg-config freetype2 --libs) -lm
|
||||||
|
|
||||||
|
CFLAGS += -I/usr/include/freetype2
|
||||||
|
COMPILE = $(CC) $(CFLAGS)
|
||||||
|
|
||||||
42
media-gfx/splashutils/files/splashutils-1.5.4.4-ft25.patch
Normal file
42
media-gfx/splashutils/files/splashutils-1.5.4.4-ft25.patch
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
Gentoo-bug: https://bugs.gentoo.org/506124
|
||||||
|
Signed-off-by: Lars Wendler (Polynomial-C)
|
||||||
|
Modified-by: Sergey Popov (Pinkbyte)
|
||||||
|
--- miscsplashutils-0.1.8/fbtruetype/ttf.c
|
||||||
|
+++ miscsplashutils-0.1.8/fbtruetype/ttf.c
|
||||||
|
@@ -13,8 +13,8 @@
|
||||||
|
#include <ft2build.h>
|
||||||
|
#include FT_FREETYPE_H
|
||||||
|
/* #include <freetype/freetype.h> */
|
||||||
|
-#include <freetype/ftoutln.h>
|
||||||
|
-#include <freetype/ttnameid.h>
|
||||||
|
+#include FT_OUTLINE_H
|
||||||
|
+#include FT_TRUETYPE_IDS_H
|
||||||
|
|
||||||
|
#include "ttf.h"
|
||||||
|
|
||||||
|
--- splashutils-1.5.4.4/src/ttf.c 2015-02-01 11:35:04.330595381 +0300
|
||||||
|
+++ splashutils-1.5.4.4/src/ttf.c 2015-02-01 11:35:24.287596342 +0300
|
||||||
|
@@ -25,8 +25,8 @@
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include <ft2build.h>
|
||||||
|
-#include <freetype/ftoutln.h>
|
||||||
|
-#include <freetype/ttnameid.h>
|
||||||
|
+#include FT_OUTLINE_H
|
||||||
|
+#include FT_TRUETYPE_IDS_H
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "render.h"
|
||||||
|
--- splashutils-1.5.4.4/src/ttf.h 2015-02-01 11:38:33.852605470 +0300
|
||||||
|
+++ splashutils-1.5.4.4/src/ttf.h 2015-02-01 11:38:52.504606368 +0300
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
#ifndef _TTF_H
|
||||||
|
#define _TTF_H
|
||||||
|
#include <ft2build.h>
|
||||||
|
-#include <freetype/ftoutln.h>
|
||||||
|
-#include <freetype/ttnameid.h>
|
||||||
|
+#include FT_OUTLINE_H
|
||||||
|
+#include FT_TRUETYPE_IDS_H
|
||||||
|
|
||||||
|
#define CACHED_METRICS 0x10
|
||||||
|
#define CACHED_BITMAP 0x01
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
commit 74dda8291efae78f00bb781148c8fd4fccaeb764
|
||||||
|
Author: Michał Januszewski <spock@gentoo.org>
|
||||||
|
Date: Tue Jun 14 23:23:33 2011 +0200
|
||||||
|
|
||||||
|
Fix typo in the Gentoo initscript.
|
||||||
|
|
||||||
|
diff --git a/gentoo/init-fbcondecor b/gentoo/init-fbcondecor
|
||||||
|
index b66f40a..ce921b6 100755
|
||||||
|
--- a/gentoo/init-fbcondecor
|
||||||
|
+++ b/gentoo/init-fbcondecor
|
||||||
|
@@ -12,7 +12,7 @@ start() {
|
||||||
|
splash_setup
|
||||||
|
|
||||||
|
if [ -z "${FBCONDECOR_TTYS}" ]; then
|
||||||
|
- FBCONDECOR_TTYS=$(seq 1 "${rc_tty_number:-${RC_TTY_NUMBER}:-12}")
|
||||||
|
+ FBCONDECOR_TTYS=$(seq 1 "${rc_tty_number:-${RC_TTY_NUMBER:-12}}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
local err=0
|
||||||
@@ -0,0 +1,381 @@
|
|||||||
|
diff -ru a/core/src/common.h b/core/src/common.h
|
||||||
|
--- a/core/src/common.h 2013-01-11 06:35:35.000000000 +0200
|
||||||
|
+++ b/core/src/common.h 2013-01-11 06:34:08.000000000 +0200
|
||||||
|
@@ -34,6 +34,10 @@
|
||||||
|
#define PATH_PROC FBSPLASH_DIR"/proc"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/* Maximum number of keyboard connected to a machine.
|
||||||
|
+ * The number is big (8) to be on the safe side */
|
||||||
|
+#define MAX_KBDS 8
|
||||||
|
+
|
||||||
|
/* Useful short-named types */
|
||||||
|
typedef u_int8_t u8;
|
||||||
|
typedef u_int16_t u16;
|
||||||
|
diff -ru a/core/src/daemon.c b/core/src/daemon.c
|
||||||
|
--- a/core/src/daemon.c 2013-01-11 06:35:35.000000000 +0200
|
||||||
|
+++ b/core/src/daemon.c 2013-01-11 06:34:08.000000000 +0200
|
||||||
|
@@ -20,6 +20,7 @@
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
+#include <sys/select.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
@@ -29,6 +30,8 @@
|
||||||
|
#include "common.h"
|
||||||
|
#include "daemon.h"
|
||||||
|
|
||||||
|
+#define EV_BUF_SIZE 8
|
||||||
|
+
|
||||||
|
/* Threading structures */
|
||||||
|
pthread_mutex_t mtx_tty = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
pthread_mutex_t mtx_paint = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
@@ -41,7 +44,8 @@
|
||||||
|
int ctty = CTTY_VERBOSE;
|
||||||
|
|
||||||
|
/* File descriptors */
|
||||||
|
-int fd_evdev = -1;
|
||||||
|
+int fd_evdevs[MAX_KBDS];
|
||||||
|
+int evdev_count = 0;
|
||||||
|
#ifdef CONFIG_GPM
|
||||||
|
int fd_gpm = -1;
|
||||||
|
#endif
|
||||||
|
@@ -51,7 +55,6 @@
|
||||||
|
|
||||||
|
/* Misc settings */
|
||||||
|
char *notify[2];
|
||||||
|
-char *evdev = NULL;
|
||||||
|
|
||||||
|
/* Service list */
|
||||||
|
list svcs = { NULL, NULL };
|
||||||
|
@@ -400,56 +403,83 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+__u16 get_ev_key_pressed(int fd_evdev, int ev_buf_size,
|
||||||
|
+ struct input_event *ev_buf) {
|
||||||
|
+ size_t rb;
|
||||||
|
+ int i;
|
||||||
|
+ rb = read(fd_evdev, ev_buf, sizeof(struct input_event) * ev_buf_size);
|
||||||
|
+ if (rb < (int) sizeof(struct input_event))
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < (int) (rb / sizeof(struct input_event)); i++) {
|
||||||
|
+ if (ev_buf[i].type != EV_KEY || ev_buf[i].value != 0)
|
||||||
|
+ continue;
|
||||||
|
+ return ev_buf[i].code;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Event device monitor thread.
|
||||||
|
*/
|
||||||
|
void* thf_switch_evdev(void *unused)
|
||||||
|
{
|
||||||
|
- int i, h, oldstate;
|
||||||
|
- size_t rb;
|
||||||
|
- struct input_event ev[8];
|
||||||
|
+ int i, h, oldstate, nfds, retval, fd_evdev;
|
||||||
|
+ fd_set rfds;
|
||||||
|
+ struct input_event ev_buf[EV_BUF_SIZE];
|
||||||
|
+ __u16 key_pressed = 0;
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
- rb = read(fd_evdev, ev, sizeof(struct input_event)*8);
|
||||||
|
- if (rb < (int) sizeof(struct input_event))
|
||||||
|
- continue;
|
||||||
|
+ nfds = 0, fd_evdev = -1;
|
||||||
|
+ FD_ZERO(&rfds);
|
||||||
|
+ for (i = 0;i < evdev_count;i++) {
|
||||||
|
+ FD_SET(fd_evdevs[i], &rfds);
|
||||||
|
+ nfds = max(nfds, fd_evdevs[i]);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- for (i = 0; i < (int) (rb / sizeof(struct input_event)); i++) {
|
||||||
|
- if (ev[i].type != EV_KEY || ev[i].value != 0)
|
||||||
|
- continue;
|
||||||
|
+ nfds++;
|
||||||
|
|
||||||
|
- switch (ev[i].code) {
|
||||||
|
- case KEY_F2:
|
||||||
|
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
|
||||||
|
- pthread_mutex_lock(&mtx_paint);
|
||||||
|
- if (ctty == CTTY_SILENT) {
|
||||||
|
- h = config.tty_v;
|
||||||
|
- } else {
|
||||||
|
- h = config.tty_s;
|
||||||
|
+ retval = select(nfds, &rfds, NULL, NULL, NULL);
|
||||||
|
+ if (retval == -1)
|
||||||
|
+ perror("select()");
|
||||||
|
+ else if (retval) {
|
||||||
|
+ for (i = 0;i < evdev_count;i++) {
|
||||||
|
+ if (FD_ISSET(fd_evdevs[i], &rfds)) {
|
||||||
|
+ fd_evdev = fd_evdevs[i];
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
- pthread_mutex_unlock(&mtx_paint);
|
||||||
|
- pthread_setcancelstate(oldstate, NULL);
|
||||||
|
+ }
|
||||||
|
+ key_pressed = get_ev_key_pressed(fd_evdev, EV_BUF_SIZE, ev_buf);
|
||||||
|
+ if (key_pressed == -1)
|
||||||
|
+ continue;
|
||||||
|
+ switch (key_pressed) {
|
||||||
|
+ case KEY_F2:
|
||||||
|
+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
|
||||||
|
+ pthread_mutex_lock(&mtx_paint);
|
||||||
|
+ h = (ctty == CTTY_SILENT) ? config.tty_v : config.tty_s;
|
||||||
|
+ pthread_mutex_unlock(&mtx_paint);
|
||||||
|
+ pthread_setcancelstate(oldstate, NULL);
|
||||||
|
+
|
||||||
|
+ /* Switch to the new tty. This ioctl has to be done on
|
||||||
|
+ * the silent tty. Sometimes init will mess with the
|
||||||
|
+ * settings of the verbose console which will prevent
|
||||||
|
+ * console switching from working properly.
|
||||||
|
+ *
|
||||||
|
+ * Don't worry about fd_tty[config.tty_s]
|
||||||
|
+ * not being protected by a mutex --
|
||||||
|
+ * this thread is always killed before any changes
|
||||||
|
+ * are made to fd_tty[config.tty_s].
|
||||||
|
+ */
|
||||||
|
+ ioctl(fd_tty[config.tty_s], VT_ACTIVATE, h);
|
||||||
|
+ break;
|
||||||
|
|
||||||
|
- /* Switch to the new tty. This ioctl has to be done on
|
||||||
|
- * the silent tty. Sometimes init will mess with the
|
||||||
|
- * settings of the verbose console which will prevent
|
||||||
|
- * console switching from working properly.
|
||||||
|
- *
|
||||||
|
- * Don't worry about fd_tty[config.tty_s] not being protected by a
|
||||||
|
- * mutex -- this thread is always killed before any changes
|
||||||
|
- * are made to fd_tty[config.tty_s].
|
||||||
|
- */
|
||||||
|
- ioctl(fd_tty[config.tty_s], VT_ACTIVATE, h);
|
||||||
|
- break;
|
||||||
|
-
|
||||||
|
- case KEY_F3:
|
||||||
|
- config.textbox_visible = !config.textbox_visible;
|
||||||
|
- invalidate_textbox(theme, config.textbox_visible);
|
||||||
|
- cmd_paint(NULL);
|
||||||
|
- break;
|
||||||
|
+ case KEY_F3:
|
||||||
|
+ config.textbox_visible = !config.textbox_visible;
|
||||||
|
+ invalidate_textbox(theme, config.textbox_visible);
|
||||||
|
+ cmd_paint(NULL);
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ } /* end of else if (retval) */
|
||||||
|
+ } /* end of while(1) */
|
||||||
|
|
||||||
|
pthread_exit(NULL);
|
||||||
|
}
|
||||||
|
@@ -519,7 +549,7 @@
|
||||||
|
|
||||||
|
/* Do we have to start a monitor thread? */
|
||||||
|
if (update & UPD_MON) {
|
||||||
|
- if (fd_evdev != -1) {
|
||||||
|
+ if (evdev_count >= 0) {
|
||||||
|
if (pthread_create(&th_switchmon, NULL, &thf_switch_evdev, NULL)) {
|
||||||
|
iprint(MSG_ERROR, "Evdev monitor thread creation failed.\n");
|
||||||
|
exit(3);
|
||||||
|
diff -ru a/core/src/daemon.h b/core/src/daemon.h
|
||||||
|
--- a/core/src/daemon.h 2013-01-11 06:35:35.000000000 +0200
|
||||||
|
+++ b/core/src/daemon.h 2013-01-11 06:34:08.000000000 +0200
|
||||||
|
@@ -40,13 +40,13 @@
|
||||||
|
extern int fd_tty_s, fd_tty1, fd_tty0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * Event device on which the daemon listens for F2 keypresses.
|
||||||
|
- * The proper device has to be detected by an external program and
|
||||||
|
+ * Event devices on which the daemon listens for F2 keypresses.
|
||||||
|
+ * The proper devices have to be detected by an external program and
|
||||||
|
* then enabled by sending an appropriate command to the splash
|
||||||
|
* daemon.
|
||||||
|
*/
|
||||||
|
-extern int fd_evdev;
|
||||||
|
-extern char *evdev;
|
||||||
|
+extern int fd_evdevs[];
|
||||||
|
+extern int evdev_count;
|
||||||
|
|
||||||
|
#ifdef CONFIG_GPM
|
||||||
|
#include <gpm.h>
|
||||||
|
diff -ru a/core/src/daemon_cmd.c b/core/src/daemon_cmd.c
|
||||||
|
--- a/core/src/daemon_cmd.c 2013-01-11 06:35:35.000000000 +0200
|
||||||
|
+++ b/core/src/daemon_cmd.c 2013-01-11 06:34:08.000000000 +0200
|
||||||
|
@@ -239,18 +239,35 @@
|
||||||
|
*/
|
||||||
|
int cmd_set_event_dev(void **args)
|
||||||
|
{
|
||||||
|
- if (evdev)
|
||||||
|
- free(evdev);
|
||||||
|
-
|
||||||
|
- evdev = strdup(args[0]);
|
||||||
|
+ char *evdevs;
|
||||||
|
+ char *evdev;
|
||||||
|
+ int i, j, fd_evdev = -1;
|
||||||
|
|
||||||
|
pthread_cancel(th_switchmon);
|
||||||
|
+ for (i = 0;i < evdev_count;i++) {
|
||||||
|
+ close(fd_evdevs[i]);
|
||||||
|
+ }
|
||||||
|
+ evdevs = strdup(args[1]);
|
||||||
|
+ evdev_count = *(int*)args[0];
|
||||||
|
+ j = 0;
|
||||||
|
+ for (i = 0;i < evdev_count;i++, evdevs = NULL) {
|
||||||
|
+ evdev = strtok(evdevs, ",");
|
||||||
|
+ fd_evdev = open(evdev, O_RDONLY);
|
||||||
|
+ if (fd_evdev != -1) {
|
||||||
|
+ fd_evdevs[j] = fd_evdev;
|
||||||
|
+ j++;
|
||||||
|
+ } else {
|
||||||
|
+ perror("failed to open event device");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (j == 0) { /* all input devices failed to open */
|
||||||
|
+ evdev_count = -1;
|
||||||
|
+ free(evdevs);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (fd_evdev != -1)
|
||||||
|
- close(fd_evdev);
|
||||||
|
-
|
||||||
|
- fd_evdev = open(evdev, O_RDONLY);
|
||||||
|
-
|
||||||
|
+ evdev_count = j;
|
||||||
|
+ free(evdevs);
|
||||||
|
switchmon_start(UPD_MON, config.tty_s);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
@@ -524,8 +541,8 @@
|
||||||
|
|
||||||
|
{ .cmd = "set event dev",
|
||||||
|
.handler = cmd_set_event_dev,
|
||||||
|
- .args = 1,
|
||||||
|
- .specs = "s"
|
||||||
|
+ .args = 2,
|
||||||
|
+ .specs = "ds"
|
||||||
|
},
|
||||||
|
|
||||||
|
{ .cmd = "set message",
|
||||||
|
@@ -628,7 +645,7 @@
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (j = 0; j < known_cmds[i].args; j++) {
|
||||||
|
- for (; buf[k] == ' '; buf[k] = 0, k++);
|
||||||
|
+ for (; buf[k] == ' '; buf[k] = '\0', k++);
|
||||||
|
if (!buf[k]) {
|
||||||
|
args[j] = NULL;
|
||||||
|
continue;
|
||||||
|
diff -ru a/core/src/libfbsplash.c b/core/src/libfbsplash.c
|
||||||
|
--- a/core/src/libfbsplash.c 2013-01-11 06:35:35.000000000 +0200
|
||||||
|
+++ b/core/src/libfbsplash.c 2013-01-11 06:34:08.000000000 +0200
|
||||||
|
@@ -588,6 +588,8 @@
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#define EVDV_BUF_LEN 128
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Try to set the event device for the splash daemon.
|
||||||
|
*
|
||||||
|
@@ -595,10 +597,14 @@
|
||||||
|
*/
|
||||||
|
int fbsplash_set_evdev(void)
|
||||||
|
{
|
||||||
|
- char buf[128];
|
||||||
|
+ char buf[EVDV_BUF_LEN];
|
||||||
|
+ char evdev_devs[EVDV_BUF_LEN * MAX_KBDS];
|
||||||
|
FILE *fp;
|
||||||
|
int i, j;
|
||||||
|
-
|
||||||
|
+ int kbd_count;
|
||||||
|
+ int max_chars, chars_left, dev_path_len;
|
||||||
|
+ char dev_path[] = PATH_DEV "/input/";
|
||||||
|
+ dev_path_len = strlen(dev_path);
|
||||||
|
char *evdev_cmds[] = {
|
||||||
|
"/bin/grep -Hsi keyboard " PATH_SYS "/class/input/input*/name | /bin/sed -e 's#.*input\\([0-9]*\\)/name.*#event\\1#'",
|
||||||
|
"/bin/grep -Hsi keyboard " PATH_SYS "/class/input/event*/device/driver/description | /bin/grep -o 'event[0-9]\\+'",
|
||||||
|
@@ -608,22 +614,43 @@
|
||||||
|
|
||||||
|
/* Try to activate the event device interface so that F2 can
|
||||||
|
* be used to switch from verbose to silent. */
|
||||||
|
- buf[0] = 0;
|
||||||
|
- for (i = 0; i < sizeof(evdev_cmds)/sizeof(char*); i++) {
|
||||||
|
+ buf[0] = '\0';
|
||||||
|
+ kbd_count = 0;
|
||||||
|
+ max_chars = sizeof(evdev_devs) / sizeof(char*);
|
||||||
|
+ chars_left = max_chars - 1;
|
||||||
|
+ evdev_devs[0] = '\0';
|
||||||
|
+ for (i = 0; i < sizeof(evdev_cmds) / sizeof(char*); i++) {
|
||||||
|
fp = popen(evdev_cmds[i], "r");
|
||||||
|
if (fp) {
|
||||||
|
- fgets(buf, 128, fp);
|
||||||
|
- if ((j = strlen(buf)) > 0) {
|
||||||
|
- if (buf[j-1] == '\n')
|
||||||
|
- buf[j-1] = 0;
|
||||||
|
- break;
|
||||||
|
+ while (fgets(buf, 128, fp) && kbd_count < MAX_KBDS) {
|
||||||
|
+ if ((j = strlen(buf)) > 0) {
|
||||||
|
+ if (buf[j-1] == '\n')
|
||||||
|
+ buf[j-1] = ',';
|
||||||
|
+ if (chars_left < (j + dev_path_len)) {
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ kbd_count++;
|
||||||
|
+ strncat(evdev_devs, dev_path, chars_left);
|
||||||
|
+ chars_left -= dev_path_len;
|
||||||
|
+ strncat(evdev_devs, buf, chars_left);
|
||||||
|
+ chars_left -= j;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /* replace the last ',' with '\n' */
|
||||||
|
+ if (chars_left > 0 && evdev_devs[0] != '\0') {
|
||||||
|
+ j = strlen(evdev_devs);
|
||||||
|
+ if (j > 2) {
|
||||||
|
+ evdev_devs[j - 1] = '\n';
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
pclose(fp);
|
||||||
|
}
|
||||||
|
+ if (kbd_count > 0)
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (buf[0] != 0) {
|
||||||
|
- fbsplash_send("set event dev " PATH_DEV "/input/%s\n", buf);
|
||||||
|
+ if (evdev_devs[0] != '\0') {
|
||||||
|
+ fbsplash_send("set event dev %d %s", kbd_count, evdev_devs);
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return -1;
|
||||||
|
@@ -661,6 +688,8 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#define MAX_CMD 2048
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Send stuff to the splash daemon using the splash FIFO.
|
||||||
|
*
|
||||||
|
@@ -668,7 +697,7 @@
|
||||||
|
*/
|
||||||
|
int fbsplash_send(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- char cmd[256];
|
||||||
|
+ char cmd[MAX_CMD];
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
if (!fp_fifo) {
|
||||||
|
@@ -690,7 +719,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
- vsnprintf(cmd, 256, fmt, ap);
|
||||||
|
+ vsnprintf(cmd, MAX_CMD, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
fprintf(fp_fifo, cmd);
|
||||||
12
media-gfx/splashutils/files/splashutils-1.5.4.4-no-la.patch
Normal file
12
media-gfx/splashutils/files/splashutils-1.5.4.4-no-la.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
--- splashutils-1.5.4.4/src/Makefile.am.orig 2011-06-13 01:43:39.000000000 +0400
|
||||||
|
+++ splashutils-1.5.4.4/src/Makefile.am 2015-08-09 23:37:23.191078543 +0300
|
||||||
|
@@ -119,7 +119,7 @@
|
||||||
|
fbsplash.h
|
||||||
|
libfbsplashrender_la_CFLAGS = $(AM_CFLAGS)
|
||||||
|
libfbsplashrender_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(libfbsplashrender_version)
|
||||||
|
-libfbsplashrender_la_LIBADD = libfbsplash.la
|
||||||
|
+libfbsplashrender_la_LIBADD =
|
||||||
|
|
||||||
|
libfbsplashrender_la_CFLAGS += $(JPEG_CFLAGS)
|
||||||
|
libfbsplashrender_la_LIBADD += $(JPEG_LIBS)
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
--- splash.c 2011-06-13 04:45:59.000000000 +0700
|
||||||
|
+++ splash.c 2014-11-14 20:04:43.000000000 +0700
|
||||||
|
@@ -21,4 +21,5 @@
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
+#include <sys/queue.h>
|
||||||
|
#include <linux/kd.h>
|
||||||
|
#include <linux/fb.h>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- src/common.c.old 2018-02-25 22:23:32.382369471 +0800
|
||||||
|
+++ src/common.c 2018-02-25 22:23:02.236854316 +0800
|
||||||
|
@@ -19,6 +19,7 @@
|
||||||
|
#include <termios.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
+#include <sys/sysmacros.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
241
media-gfx/splashutils/splashutils-1.5.4.4-r9.ebuild
Normal file
241
media-gfx/splashutils/splashutils-1.5.4.4-r9.ebuild
Normal file
@@ -0,0 +1,241 @@
|
|||||||
|
# Copyright 1999-2016 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=5
|
||||||
|
inherit autotools eutils multilib toolchain-funcs
|
||||||
|
|
||||||
|
MISCSPLASH="miscsplashutils-0.1.8"
|
||||||
|
GENTOOSPLASH="splashutils-gentoo-1.0.17"
|
||||||
|
V_JPEG="8a"
|
||||||
|
V_PNG="1.4.3"
|
||||||
|
V_ZLIB="1.2.3"
|
||||||
|
V_FT="2.3.12"
|
||||||
|
|
||||||
|
ZLIBSRC="libs/zlib-${V_ZLIB}"
|
||||||
|
LPNGSRC="libs/libpng-${V_PNG}"
|
||||||
|
JPEGSRC="libs/jpeg-${V_JPEG}"
|
||||||
|
FT2SRC="libs/freetype-${V_FT}"
|
||||||
|
|
||||||
|
RESTRICT="test"
|
||||||
|
IUSE="hardened klibc +png +truetype gpm fbcondecor"
|
||||||
|
|
||||||
|
DESCRIPTION="Framebuffer splash utilities"
|
||||||
|
HOMEPAGE="https://sourceforge.net/projects/fbsplash.berlios/"
|
||||||
|
SRC_URI="
|
||||||
|
mirror://sourceforge/fbsplash.berlios/${PN}-lite-${PV}.tar.bz2
|
||||||
|
mirror://sourceforge/fbsplash.berlios/${GENTOOSPLASH}.tar.bz2
|
||||||
|
mirror://gentoo/${MISCSPLASH}.tar.bz2
|
||||||
|
mirror://sourceforge/libpng/libpng-${V_PNG}.tar.bz2
|
||||||
|
https://www.ijg.org/files/jpegsrc.v${V_JPEG}.tar.gz
|
||||||
|
mirror://sourceforge/freetype/freetype-${V_FT}.tar.bz2
|
||||||
|
http://www.gzip.org/zlib/zlib-${V_ZLIB}.tar.bz2
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
gpm? ( sys-libs/gpm[static-libs(+)] )
|
||||||
|
truetype? (
|
||||||
|
>=media-libs/freetype-2[static-libs]
|
||||||
|
app-arch/bzip2[static-libs(+)]
|
||||||
|
sys-libs/zlib[static-libs(+)]
|
||||||
|
)
|
||||||
|
png? (
|
||||||
|
>=media-libs/libpng-1.4.3[static-libs]
|
||||||
|
sys-libs/zlib[static-libs(+)]
|
||||||
|
)
|
||||||
|
virtual/jpeg:0[static-libs]
|
||||||
|
app-arch/cpio
|
||||||
|
media-gfx/fbgrab
|
||||||
|
!sys-apps/lcdsplash
|
||||||
|
sys-apps/openrc"
|
||||||
|
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
klibc? ( >=dev-libs/klibc-1.5 )
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${P/_/-}"
|
||||||
|
SG="${WORKDIR}/${GENTOOSPLASH}"
|
||||||
|
SM="${WORKDIR}/${MISCSPLASH}"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
if use hardened; then
|
||||||
|
ewarn "Due to problems with klibc, it is currently impossible to compile splashutils"
|
||||||
|
ewarn "with 'hardened' GCC flags. As a workaround, the package will be compiled with"
|
||||||
|
ewarn "-fno-stack-protector. Hardened GCC features will not be used while building"
|
||||||
|
ewarn "the splash kernel helper."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
mv "${WORKDIR}"/{libpng-${V_PNG},jpeg-${V_JPEG},zlib-${V_ZLIB},freetype-${V_FT}} "${S}/libs"
|
||||||
|
|
||||||
|
# We need to delete the Makefile and let it be rebuilt when splashutils
|
||||||
|
# is being configured. Either that, or we end up with a segfaulting kernel
|
||||||
|
# helper.
|
||||||
|
rm "${S}/libs/zlib-${V_ZLIB}/Makefile"
|
||||||
|
|
||||||
|
cd "${SG}"
|
||||||
|
epatch "${FILESDIR}/splashutils-1.5.4.4-gentoo-typo-fix.patch"
|
||||||
|
epatch "${FILESDIR}/splashutils-1.5.4.4-sys-queue.patch"
|
||||||
|
|
||||||
|
if use truetype ; then
|
||||||
|
cd "${SM}"
|
||||||
|
epatch "${FILESDIR}/splashutils-1.5.4.4-freetype-bz2.patch"
|
||||||
|
cd "${WORKDIR}"
|
||||||
|
epatch "${FILESDIR}/splashutils-1.5.4.4-ft25.patch"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
ln -sf "${S}/src" "${WORKDIR}/core"
|
||||||
|
|
||||||
|
#epatch "${FILESDIR}/${P}-bzip2.patch"
|
||||||
|
epatch "${FILESDIR}/${P}-multi-keyboard.patch"
|
||||||
|
# Bug #557126
|
||||||
|
epatch "${FILESDIR}/${P}-no-la.patch"
|
||||||
|
|
||||||
|
if ! tc-is-cross-compiler && \
|
||||||
|
has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
|
||||||
|
ewarn "Your GCC was built with the 'vanilla' flag set. If you can't compile"
|
||||||
|
ewarn "splashutils, you're on your own, as this configuration is not supported."
|
||||||
|
else
|
||||||
|
# This should make splashutils compile on systems with hardened GCC.
|
||||||
|
sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i "${S}/Makefile.in"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! use truetype ; then
|
||||||
|
sed -i -e 's/fbtruetype kbd/kbd/' "${SM}/Makefile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Latest version of klibc defined its own version of ferror, so there is
|
||||||
|
# not need for the hack in klibc_compat.h
|
||||||
|
if has_version ">=dev-libs/klibc-1.5.20"; then
|
||||||
|
echo > "libs/klibc_compat.h"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f m4/*
|
||||||
|
epatch_user
|
||||||
|
export PKG_CONFIG="pkg-config --static"
|
||||||
|
eautoreconf
|
||||||
|
epatch "${FILESDIR}"/splashutils-1.5.4.4-sysmacros.patch
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
tc-export CC
|
||||||
|
cd "${SM}"
|
||||||
|
emake CC="${CC}" LIB=$(get_libdir) STRIP=true
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
econf \
|
||||||
|
$(use_with png) \
|
||||||
|
--without-mng \
|
||||||
|
$(use_with klibc) \
|
||||||
|
$(use_with gpm) \
|
||||||
|
$(use_with truetype ttf) \
|
||||||
|
$(use_with truetype ttf-kernel) \
|
||||||
|
$(use_enable fbcondecor) \
|
||||||
|
--docdir=/usr/share/doc/${PF} \
|
||||||
|
--with-freetype2-src=${FT2SRC} \
|
||||||
|
--with-jpeg-src=${JPEGSRC} \
|
||||||
|
--with-lpng-src=${LPNGSRC} \
|
||||||
|
--with-zlib-src=${ZLIBSRC} \
|
||||||
|
--with-essential-libdir=/$(get_libdir)
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
emake CC="${CC}" STRIP="true"
|
||||||
|
|
||||||
|
cd "${SG}"
|
||||||
|
emake LIB=$(get_libdir)
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local LIB=$(get_libdir)
|
||||||
|
|
||||||
|
cd "${SM}"
|
||||||
|
emake DESTDIR="${D}" LIB=${LIB} install
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
emake DESTDIR="${D}" STRIP="true" install
|
||||||
|
|
||||||
|
mv "${D}"/usr/${LIB}/libfbsplash.so* "${D}"/${LIB}/
|
||||||
|
gen_usr_ldscript libfbsplash.so
|
||||||
|
|
||||||
|
echo 'CONFIG_PROTECT_MASK="/etc/splash"' > 99splash
|
||||||
|
doenvd 99splash
|
||||||
|
|
||||||
|
if use fbcondecor ; then
|
||||||
|
newinitd "${SG}"/init-fbcondecor fbcondecor
|
||||||
|
newconfd "${SG}"/fbcondecor.conf fbcondecor
|
||||||
|
fi
|
||||||
|
newconfd "${SG}"/splash.conf splash
|
||||||
|
|
||||||
|
insinto /usr/share/${PN}
|
||||||
|
doins "${SG}"/initrd.splash
|
||||||
|
|
||||||
|
insinto /etc/splash
|
||||||
|
doins "${SM}"/fbtruetype/luxisri.ttf
|
||||||
|
|
||||||
|
cd "${SG}"
|
||||||
|
make DESTDIR="${D}" LIB=${LIB} install
|
||||||
|
prune_libtool_files
|
||||||
|
|
||||||
|
sed -i -e "s#/lib/splash#/${LIB}/splash#" "${D}"/sbin/splash-functions.sh
|
||||||
|
keepdir /${LIB}/splash/{tmp,cache,bin,sys}
|
||||||
|
dosym /${LIB}/splash/bin/fbres /sbin/fbres
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_preinst() {
|
||||||
|
has_version "<${CATEGORY}/${PN}-1.0"
|
||||||
|
previous_less_than_1_0=$?
|
||||||
|
|
||||||
|
has_version "<${CATEGORY}/${PN}-1.5.3"
|
||||||
|
previous_less_than_1_5_3=$?
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if has_version sys-fs/devfsd || ! has_version virtual/udev ; then
|
||||||
|
elog "This package has been designed with udev in mind. Other solutions, such as"
|
||||||
|
elog "devfs or a static /dev tree might work, but are generally discouraged and"
|
||||||
|
elog "not supported. If you decide to switch to udev, you might want to have a"
|
||||||
|
elog "look at 'The Gentoo udev Guide', which can be found at"
|
||||||
|
elog " https://wiki.gentoo.org/wiki/Udev"
|
||||||
|
elog ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $previous_less_than_1_0 = 0 ]] ; then
|
||||||
|
elog "Since you are upgrading from a pre-1.0 version, please make sure that you"
|
||||||
|
elog "rebuild your initrds. You can use the splash_geninitramfs script to do that."
|
||||||
|
elog ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $previous_less_than_1_5_3 = 0 ]] && ! use fbcondecor ; then
|
||||||
|
elog "Starting with splashutils-1.5.3, support for the fbcondecor kernel patch"
|
||||||
|
elog "is optional and dependent on the the 'fbcondecor' USE flag. If you wish"
|
||||||
|
elog "to use fbcondecor, run:"
|
||||||
|
elog " echo \"media-gfx/splashutils fbcondecor\" >> /etc/portage/package.use"
|
||||||
|
elog "and re-emerge splashutils."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! test -f /proc/cmdline ||
|
||||||
|
! egrep -q '(console=tty1|CONSOLE=/dev/tty1)' /proc/cmdline ; then
|
||||||
|
elog "It is required that you add 'console=tty1' to your kernel"
|
||||||
|
elog "command line parameters."
|
||||||
|
elog ""
|
||||||
|
elog "After these modifications, the relevant part of the kernel command"
|
||||||
|
elog "line might look like:"
|
||||||
|
elog " splash=silent,fadein,theme:emergence console=tty1"
|
||||||
|
elog ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! has_version 'media-gfx/splash-themes-livecd' &&
|
||||||
|
! has_version 'media-gfx/splash-themes-gentoo'; then
|
||||||
|
elog "The sample Gentoo themes (emergence, gentoo) have been removed from the"
|
||||||
|
elog "core splashutils package. To get some themes you might want to emerge:"
|
||||||
|
elog " media-gfx/splash-themes-livecd"
|
||||||
|
elog " media-gfx/splash-themes-gentoo"
|
||||||
|
fi
|
||||||
|
}
|
||||||
4
media-gfx/sweethome3d-bin/Manifest
Normal file
4
media-gfx/sweethome3d-bin/Manifest
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
AUX sweethome3d-bin-6.2-javahome.patch 1998 BLAKE2B d4038bbf1a5a1086f056ede79b52a73e2f83b2ecd23f9631ea0457221f377c065280e02bbae65330b85a77fbf0a1472e310065706c04a06ef3cf89d09b4474ed SHA512 e86f75d3872556bd834ad661b5830226f8b8051fb17f86293b3f18b42812a285e680dc46e6525acd7165ef5a6113a768f6c48a87e2a8989a52ccb7ecf5afa915
|
||||||
|
DIST SweetHome3D-6.2-linux-x64.tgz 67508189 BLAKE2B 47c42b5acdd22467216a47260e558d534cf8df9b18062cc9e151052dfc9efef6defd6c7cdcf915341946bdc3d1629f81724aa86fc9dc35e90475849bb57d3e61 SHA512 99d4a93b06adc8fdcf211ccc12223ec346d78e129be3c2ec730c944ea0f4ec936be0fec17f22823cbe8ff9417ad86135c483c6460408c63442b96eeb56ae5313
|
||||||
|
DIST SweetHome3D-6.2-linux-x86.tgz 70795753 BLAKE2B 4ad8c47620fa61ef787beb3fc7b8a0872516100d494ada34488d971f1edef894906d871a96adee61ef5ad11df13da9ff2e102f7bbacb6ca85673d11599744ca2 SHA512 069a6b22f0f283ae46301e2ac1aaf47013dfba485271e706b2cb1b9c40e41c27a1ffb239696d54da91b01dcdecd186cb54529be2b770420bac4417000af5da8d
|
||||||
|
EBUILD sweethome3d-bin-6.2.ebuild 920 BLAKE2B d6238473c3973e0f5cef999e3d1f8adec0e0d9cefd080c9988f1065a2e5a14a4fa953294661cd3f7930f3ed3e2ff95673c5fbffe8ef45181d07090fef3da5ee2 SHA512 e56ef410dfe7e97f9905226b01f28b56bc1c779d0423218d42ccfc01d6ea5ed5822354b75b6df15f164f82784de718b7dbae9fb997f42aa4fd0a50652196a653
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
--- SweetHome3D 2016-09-06 09:45:33.473810692 +0200
|
||||||
|
+++ SweetHome3D 2016-09-06 09:37:53.871836114 +0200
|
||||||
|
@@ -11,4 +11,4 @@
|
||||||
|
PROGRAM_DIR=`dirname "$PROGRAM"`
|
||||||
|
|
||||||
|
# Run Sweet Home 3D
|
||||||
|
-exec "$PROGRAM_DIR"/jre8/bin/java -Xmx2g -classpath "$PROGRAM_DIR"/lib/SweetHome3D.jar:"$PROGRAM_DIR"/lib/Furniture.jar:"$PROGRAM_DIR"/lib/Textures.jar:"$PROGRAM_DIR"/lib/Examples.jar:"$PROGRAM_DIR"/lib/Help.jar:"$PROGRAM_DIR"/lib/batik-svgpathparser-1.7.jar:"$PROGRAM_DIR"/lib/jeksparser-calculator.jar:"$PROGRAM_DIR"/lib/iText-2.1.7.jar:"$PROGRAM_DIR"/lib/freehep-vectorgraphics-svg-2.1.1b.jar:"$PROGRAM_DIR"/lib/sunflow-0.07.3i.jar:"$PROGRAM_DIR"/lib/jmf.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dcore.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dutils.jar:"$PROGRAM_DIR"/lib/java3d-1.6/vecmath.jar:"$PROGRAM_DIR"/lib/java3d-1.6/gluegen-rt.jar:"$PROGRAM_DIR"/lib/java3d-1.6/jogl-java3d.jar:"$PROGRAM_DIR"/jre8/lib/javaws.jar -Djava.library.path="$PROGRAM_DIR"/lib/java3d-1.6 -Djogamp.gluegen.UseTempJarCache=false -Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer com.eteks.sweethome3d.SweetHome3D -open "$1"
|
||||||
|
+exec "$JAVA_HOME"/jre/bin/java -Xmx2g -classpath "$PROGRAM_DIR"/lib/SweetHome3D.jar:"$PROGRAM_DIR"/lib/Furniture.jar:"$PROGRAM_DIR"/lib/Textures.jar:"$PROGRAM_DIR"/lib/Examples.jar:"$PROGRAM_DIR"/lib/Help.jar:"$PROGRAM_DIR"/lib/batik-svgpathparser-1.7.jar:"$PROGRAM_DIR"/lib/jeksparser-calculator.jar:"$PROGRAM_DIR"/lib/iText-2.1.7.jar:"$PROGRAM_DIR"/lib/freehep-vectorgraphics-svg-2.1.1b.jar:"$PROGRAM_DIR"/lib/sunflow-0.07.3i.jar:"$PROGRAM_DIR"/lib/jmf.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dcore.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dutils.jar:"$PROGRAM_DIR"/lib/java3d-1.6/vecmath.jar:"$PROGRAM_DIR"/lib/java3d-1.6/gluegen-rt.jar:"$PROGRAM_DIR"/lib/java3d-1.6/jogl-java3d.jar:/usr/share/jnlp-api/lib/jnlp-api.jar -Djava.library.path="$PROGRAM_DIR"/lib/java3d-1.6 -Djogamp.gluegen.UseTempJarCache=false -Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer com.eteks.sweethome3d.SweetHome3D -open "$1"
|
||||||
40
media-gfx/sweethome3d-bin/sweethome3d-bin-6.2.ebuild
Normal file
40
media-gfx/sweethome3d-bin/sweethome3d-bin-6.2.ebuild
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Copyright 1999-2009 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
# This ebuild is a modified version of ebuild from java overlay.
|
||||||
|
|
||||||
|
EAPI="6"
|
||||||
|
inherit eutils
|
||||||
|
|
||||||
|
MY_PN="SweetHome3D"
|
||||||
|
|
||||||
|
DESCRIPTION="Sweet Home 3D is a free interior design application."
|
||||||
|
HOMEPAGE="http://sweethome3d.sourceforge.net/"
|
||||||
|
SRC_URI="amd64? ( mirror://sourceforge/sweethome3d/${MY_PN}-${PV}-linux-x64.tgz )
|
||||||
|
x86? ( mirror://sourceforge/sweethome3d/${MY_PN}-${PV}-linux-x86.tgz )"
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
IUSE=""
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="amd64 ~x86"
|
||||||
|
|
||||||
|
DEPEND=">=virtual/jre-1.8.0
|
||||||
|
>=dev-java/jnlp-api-6.0"
|
||||||
|
|
||||||
|
RDEPEND=""
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
unpack ${A}
|
||||||
|
cd ${S}
|
||||||
|
rm -rf jre8
|
||||||
|
epatch "${FILESDIR}/${P}-javahome.patch"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dodir /opt/sweethome3d
|
||||||
|
cp -r ${S}/* ${D}/opt/sweethome3d/
|
||||||
|
dosym /opt/sweethome3d/${MY_PN} /usr/bin/${MY_PN}
|
||||||
|
make_desktop_entry ${MY_PN} "${MY_PN}"
|
||||||
|
}
|
||||||
|
|
||||||
8
net-analyzer/zabbix-agent/Manifest
Normal file
8
net-analyzer/zabbix-agent/Manifest
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
AUX zabbix-agent-3.0.30-mysql8.patch 608 BLAKE2B 56e2cb893269cdeefbc6ca7c40e73b9af2012e4075d997369c516253211d6de6266a1f565ecbf39cd4520fe76f65968d43320ea8e5b2cd59d2a0eb9f8febc9f4 SHA512 13e95e0f3fd1aff4f2546ce5b3cb48c59e117984192a2574d799ca062ce763982d2984e5fa94b49f077aaebbbb3442a06a0d9982a38a21f5ea739fd0fed87148
|
||||||
|
AUX zabbix-agent-3.0.30-security-disable-PidFile.patch 1378 BLAKE2B c1efdfd0b223987c9d9bf1a3f7731f0bdfeb42d1641bbf4387d70ece757f5cb2fb88bafb87f6938a5efbec091f73d5fde0450e8aa0edc3143d589df5efbe5d19 SHA512 854b198b980e4b58dc6149e285bfa6361ab2a10b83a6d8f07b46754316d6764669e68da8018b402b59317ed95b50a13d25f68f28c4c33d76f0ef1e8dedc8da99
|
||||||
|
AUX zabbix-agent-3.0.31-fix-cve-2020-15803.patch 3081 BLAKE2B 269b3efedf4f2f4c5365f2119ae166a0bee673841ab0eeae1f3e6311d7015fd35b11330a62c705a567775429319bd440adff48f92c689d35104893eab82a86ec SHA512 950dfe3311dc74fc9068b1c51d22f2a9b2ff20c9011e551151b1aed8212ab26cd5ec369317ec5ad9b52193f59d5f79298205996dd9f2aec48608759769c63c85
|
||||||
|
AUX zabbix-agent-4.0.18-modulepathfix.patch 330 BLAKE2B 99b3f1082e220ff842e4c4c86e8fcf57666443dd1e124412f167548ab886352077e1f0548e49cf77f28a51d20cc37dc980448eb87c9e7814ac73dcbfe43388e0 SHA512 75330dddde2f47553ac6a6f71d6f2383ab34c0d64ac5dbe45dd31707d8797d1400215d698072df3a0f0eaf862f00509791a6a0eaa43a0f686657d885c03465b5
|
||||||
|
AUX zabbix-agentd.init 507 BLAKE2B 6d5f0e631639e766d6857304d205acbdf4d07b59deb43be2735d8caf1b3d9d156dfc3c54236b435383d0182869b8f5eb6cb45499a6dac010f5ea497f4533f80b SHA512 7dbdb94dee4bef1c5771ea02169b7f4d0a21e9d2c4ce44db1376562309e1a24455beb16e65a4bb049a1e713cb51bf38ed39ba48da5cf3c8969b6860bcbe74fc5
|
||||||
|
AUX zabbix-agentd.tmpfiles 35 BLAKE2B 98e917ef03bd6dc5d73e5cbdb140c7e115c7593d5cebf2df9bf3d15713b16c6a44b165a3f68fd36a9119163144a2761457d16ce318bd094ed76ae6040c8b09df SHA512 3c63a2791e6ac77cb3144eb47a275cc8748f5c8943a076052300d6964994b95b18d60f504584fdcb683739dc514261402895e3f30ae2fbdb218acbc42c3d72df
|
||||||
|
DIST zabbix-agent-5.2.1.tar.gz 19869170 BLAKE2B 6f1a22533606eb875e2d2263e29d9882252cf7024c78071a2fe3ec97b691e26497ef8e9dbf032a0c3dbe84c525a46b601baaa2ac3cf30eb05c37062cdd77105c SHA512 74d0407d85e477be2c504f37c8118406acd3cd06d02f72f197d6c8917e3230eab21c328a883860d5ffed2980c8a27d42ba46ec80cd67878ca1771b2db1868db2
|
||||||
|
EBUILD zabbix-agent-5.2.1.ebuild 2707 BLAKE2B c204ea54f9dca6b4e4da3dd596ad1938c0cc936c609fdba974a2490d4d902c71d2e1ac78007b65f30d53f0a4ac902775e1e71f40e03c2cd19b7519a260dc1414 SHA512 83cc2727859c33dd91c855d77e0a27bc536b742ec1689a6ff75ee4dbcfb43b8f628160afa7c5176712dc1b204fc81d196e5309192b7460fb7dd22b16153d77e0
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/src/libs/zbxdb/db.c b/src/libs/zbxdb/db.c
|
||||||
|
index a65b9c4..e011c51 100644
|
||||||
|
--- a/src/libs/zbxdb/db.c
|
||||||
|
+++ b/src/libs/zbxdb/db.c
|
||||||
|
@@ -285,7 +285,11 @@ int zbx_db_connect(char *host, char *user, char *password, char *dbname, char *d
|
||||||
|
#if defined(HAVE_IBM_DB2)
|
||||||
|
char *connect = NULL;
|
||||||
|
#elif defined(HAVE_MYSQL)
|
||||||
|
- my_bool mysql_reconnect = 1;
|
||||||
|
+#if LIBMYSQL_VERSION_ID >= 80000 /* my_bool type is removed in MySQL 8.0 */
|
||||||
|
+ bool mysql_reconnect = 1;
|
||||||
|
+#else
|
||||||
|
+ my_bool mysql_reconnect = 1;
|
||||||
|
+#endif
|
||||||
|
#elif defined(HAVE_ORACLE)
|
||||||
|
char *connect = NULL;
|
||||||
|
sword err = OCI_SUCCESS;
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
diff --git a/conf/zabbix_agentd.conf b/conf/zabbix_agentd.conf
|
||||||
|
index b73bd45..c10daca 100644
|
||||||
|
--- a/conf/zabbix_agentd.conf
|
||||||
|
+++ b/conf/zabbix_agentd.conf
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
|
||||||
|
### Option: PidFile
|
||||||
|
# Name of PID file.
|
||||||
|
+# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884)
|
||||||
|
#
|
||||||
|
# Mandatory: no
|
||||||
|
# Default:
|
||||||
|
diff --git a/conf/zabbix_proxy.conf b/conf/zabbix_proxy.conf
|
||||||
|
index 082f14e..de0284d 100644
|
||||||
|
--- a/conf/zabbix_proxy.conf
|
||||||
|
+++ b/conf/zabbix_proxy.conf
|
||||||
|
@@ -109,6 +109,7 @@ LogFile=/tmp/zabbix_proxy.log
|
||||||
|
|
||||||
|
### Option: PidFile
|
||||||
|
# Name of PID file.
|
||||||
|
+# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884)
|
||||||
|
#
|
||||||
|
# Mandatory: no
|
||||||
|
# Default:
|
||||||
|
diff --git a/conf/zabbix_server.conf b/conf/zabbix_server.conf
|
||||||
|
index 9f754ca..3999196 100644
|
||||||
|
--- a/conf/zabbix_server.conf
|
||||||
|
+++ b/conf/zabbix_server.conf
|
||||||
|
@@ -62,6 +62,7 @@ LogFile=/tmp/zabbix_server.log
|
||||||
|
|
||||||
|
### Option: PidFile
|
||||||
|
# Name of PID file.
|
||||||
|
+# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884)
|
||||||
|
#
|
||||||
|
# Mandatory: no
|
||||||
|
# Default:
|
||||||
|
diff --git a/src/libs/zbxnix/pid.c b/src/libs/zbxnix/pid.c
|
||||||
|
index baa8415..04c7e0c 100644
|
||||||
|
--- a/src/libs/zbxnix/pid.c
|
||||||
|
+++ b/src/libs/zbxnix/pid.c
|
||||||
|
@@ -26,6 +26,8 @@ static int fdpid = -1;
|
||||||
|
|
||||||
|
int create_pid_file(const char *pidfile)
|
||||||
|
{
|
||||||
|
+ return SUCCEED;
|
||||||
|
+
|
||||||
|
int fd;
|
||||||
|
zbx_stat_t buf;
|
||||||
|
struct flock fl;
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
diff --git a/frontends/php/include/classes/screens/CScreenUrl.php b/frontends/php/include/classes/screens/CScreenUrl.php
|
||||||
|
index e35c5f1..1df396e 100644
|
||||||
|
--- a/frontends/php/include/classes/screens/CScreenUrl.php
|
||||||
|
+++ b/frontends/php/include/classes/screens/CScreenUrl.php
|
||||||
|
@@ -29,18 +29,10 @@ class CScreenUrl extends CScreenBase {
|
||||||
|
public function get() {
|
||||||
|
// prevent from resolving macros in configuration page
|
||||||
|
if ($this->mode != SCREEN_MODE_PREVIEW && $this->mode != SCREEN_MODE_SLIDESHOW) {
|
||||||
|
- return $this->getOutput(
|
||||||
|
- CHtmlUrlValidator::validate($this->screenitem['url'], false)
|
||||||
|
- ? new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'],
|
||||||
|
- 'auto')
|
||||||
|
- : makeMessageBox(false, [[
|
||||||
|
- 'type' => 'error',
|
||||||
|
- 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url'])
|
||||||
|
- ]]
|
||||||
|
- )
|
||||||
|
- );
|
||||||
|
+ return $this->getOutput($this->prepareElement());
|
||||||
|
}
|
||||||
|
- elseif ($this->screenitem['dynamic'] == SCREEN_DYNAMIC_ITEM && $this->hostid == 0) {
|
||||||
|
+
|
||||||
|
+ if ($this->screenitem['dynamic'] == SCREEN_DYNAMIC_ITEM && $this->hostid == 0) {
|
||||||
|
return $this->getOutput((new CTableInfo())->setNoDataMessage(_('No host selected.')));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -54,14 +46,28 @@ class CScreenUrl extends CScreenBase {
|
||||||
|
|
||||||
|
$this->screenitem['url'] = $url ? $url : $this->screenitem['url'];
|
||||||
|
|
||||||
|
- return $this->getOutput(
|
||||||
|
- CHtmlUrlValidator::validate($this->screenitem['url'], false)
|
||||||
|
- ? new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'], 'auto')
|
||||||
|
- : makeMessageBox(false, [[
|
||||||
|
- 'type' => 'error',
|
||||||
|
- 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url'])
|
||||||
|
- ]]
|
||||||
|
- )
|
||||||
|
- );
|
||||||
|
+ return $this->getOutput($this->prepareElement());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * @return CTag
|
||||||
|
+ */
|
||||||
|
+ public function prepareElement() {
|
||||||
|
+ if (CHtmlUrlValidator::validate($this->screenitem['url'], false)) {
|
||||||
|
+ $item = new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'],
|
||||||
|
+ 'auto'
|
||||||
|
+ );
|
||||||
|
+
|
||||||
|
+ if (ZBX_IFRAME_SANDBOX !== false) {
|
||||||
|
+ $item->setAttribute('sandbox', ZBX_IFRAME_SANDBOX);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return $item;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return makeMessageBox(false, [[
|
||||||
|
+ 'type' => 'error',
|
||||||
|
+ 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url'])
|
||||||
|
+ ]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
|
||||||
|
index a67a625..c6a437c 100644
|
||||||
|
--- a/frontends/php/include/defines.inc.php
|
||||||
|
+++ b/frontends/php/include/defines.inc.php
|
||||||
|
@@ -1284,6 +1284,14 @@ if (function_exists('bcscale')) {
|
||||||
|
bcscale(7);
|
||||||
|
}
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * The sandbox attribute enables an extra set of restrictions for the content in the iframe. Default is set to empty
|
||||||
|
+ * string, which means all restrictions are applied. To disable, set to FALSE. To set a specific set of restrictions,
|
||||||
|
+ * write a custom string.
|
||||||
|
+ * https://www.w3.org/TR/2010/WD-html5-20100624/the-iframe-element.html#attr-iframe-sandbox
|
||||||
|
+ */
|
||||||
|
+define('ZBX_IFRAME_SANDBOX', '');
|
||||||
|
+
|
||||||
|
// HTTP headers
|
||||||
|
/*
|
||||||
|
* Value of HTTP X-Frame-options header.
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- zabbix-4.0.1/configure 2018-10-29 10:36:05.000000000 -0700
|
||||||
|
+++ zfx/configure 2018-11-07 16:59:28.015968345 -0800
|
||||||
|
@@ -12510,7 +12510,7 @@
|
||||||
|
CURL_SSL_CERT_LOCATION="${datadir}/zabbix/ssl/certs"
|
||||||
|
CURL_SSL_KEY_LOCATION="${datadir}/zabbix/ssl/keys"
|
||||||
|
|
||||||
|
-LOAD_MODULE_PATH="${libdir}/modules"
|
||||||
|
+LOAD_MODULE_PATH="${libdir}/zabbix"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
20
net-analyzer/zabbix-agent/files/zabbix-agentd.init
Normal file
20
net-analyzer/zabbix-agent/files/zabbix-agentd.init
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
command="/usr/sbin/zabbix_agentd"
|
||||||
|
command_args="--foreground --config /etc/zabbix/zabbix_agentd.conf"
|
||||||
|
command_background="true"
|
||||||
|
command_user="zabbix:zabbix"
|
||||||
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
provide zabbix-agent
|
||||||
|
use zabbix-server
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath -q -d -m 0750 -o root:zabbix /etc/zabbix
|
||||||
|
checkpath -q -f -m 0640 -o root:zabbix /etc/zabbix/*.conf
|
||||||
|
}
|
||||||
1
net-analyzer/zabbix-agent/files/zabbix-agentd.tmpfiles
Normal file
1
net-analyzer/zabbix-agent/files/zabbix-agentd.tmpfiles
Normal file
@@ -0,0 +1 @@
|
|||||||
|
d /run/zabbix 0755 zabbix zabbix -
|
||||||
131
net-analyzer/zabbix-agent/zabbix-agent-5.2.1.ebuild
Normal file
131
net-analyzer/zabbix-agent/zabbix-agent-5.2.1.ebuild
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
# needed to make webapp-config dep optional
|
||||||
|
WEBAPP_OPTIONAL="yes"
|
||||||
|
inherit flag-o-matic user toolchain-funcs
|
||||||
|
|
||||||
|
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
|
||||||
|
HOMEPAGE="https://www.zabbix.com/"
|
||||||
|
MY_P=${P/_/}
|
||||||
|
MY_PV=${PV/_/}
|
||||||
|
SRC_URI="http://mirror.imax.name/src/zabbix/${PV}/${P}.tar.gz"
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
WEBAPP_MANUAL_SLOT="yes"
|
||||||
|
KEYWORDS="amd64 x86"
|
||||||
|
IUSE="+agent java curl ipv6 libxml2 ssh ssl snmp static"
|
||||||
|
REQUIRED_USE="|| ( agent )
|
||||||
|
static? ( !snmp )"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
curl? ( net-misc/curl )
|
||||||
|
libxml2? ( dev-libs/libxml2 )
|
||||||
|
snmp? ( net-analyzer/net-snmp )
|
||||||
|
ssh? ( net-libs/libssh2 )
|
||||||
|
ssl? ( dev-libs/openssl:=[-bindist] )
|
||||||
|
"
|
||||||
|
|
||||||
|
DEPEND="${COMMON_DEPEND}
|
||||||
|
static? (
|
||||||
|
curl? ( net-misc/curl[static-libs] )
|
||||||
|
libxml2? ( dev-libs/libxml2[static-libs] )
|
||||||
|
ssh? ( net-libs/libssh2 )
|
||||||
|
)
|
||||||
|
"
|
||||||
|
BDEPEND="
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
|
||||||
|
"${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
S=${WORKDIR}/${MY_P}
|
||||||
|
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
|
||||||
|
enewgroup zabbix
|
||||||
|
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf \
|
||||||
|
$(use_enable agent) \
|
||||||
|
$(use_enable ipv6) \
|
||||||
|
$(use_enable static) \
|
||||||
|
$(use_with curl libcurl) \
|
||||||
|
$(use_with libxml2) \
|
||||||
|
$(use_with snmp net-snmp) \
|
||||||
|
$(use_with ssh ssh2) \
|
||||||
|
$(use_with ssl openssl)
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
|
||||||
|
emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local dirs=(
|
||||||
|
/etc/zabbix
|
||||||
|
/var/log/zabbix
|
||||||
|
)
|
||||||
|
|
||||||
|
for dir in "${dirs[@]}"; do
|
||||||
|
dodir "${dir}"
|
||||||
|
keepdir "${dir}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if use agent; then
|
||||||
|
insinto /etc/zabbix
|
||||||
|
doins "${S}"/conf/zabbix_agentd.conf
|
||||||
|
fperms 0640 /etc/zabbix/zabbix_agentd.conf
|
||||||
|
fowners root:zabbix /etc/zabbix/zabbix_agentd.conf
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd
|
||||||
|
|
||||||
|
dosbin src/zabbix_agent/zabbix_agentd
|
||||||
|
dobin \
|
||||||
|
src/zabbix_sender/zabbix_sender \
|
||||||
|
src/zabbix_get/zabbix_get
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
fowners root:zabbix /etc/zabbix
|
||||||
|
fowners zabbix:zabbix \
|
||||||
|
/var/log/zabbix
|
||||||
|
fperms 0750 \
|
||||||
|
/etc/zabbix \
|
||||||
|
/var/log/zabbix
|
||||||
|
|
||||||
|
dodoc README INSTALL NEWS ChangeLog \
|
||||||
|
conf/zabbix_agentd.conf \
|
||||||
|
conf/zabbix_agentd/userparameter_examples.conf \
|
||||||
|
conf/zabbix_agentd/userparameter_mysql.conf \
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
|
||||||
|
elog "--"
|
||||||
|
elog
|
||||||
|
elog "You may need to add these lines to /etc/services:"
|
||||||
|
elog
|
||||||
|
elog "zabbix-agent 10050/tcp Zabbix Agent"
|
||||||
|
elog "zabbix-agent 10050/udp Zabbix Agent"
|
||||||
|
elog "zabbix-trapper 10051/tcp Zabbix Trapper"
|
||||||
|
elog "zabbix-trapper 10051/udp Zabbix Trapper"
|
||||||
|
elog
|
||||||
|
|
||||||
|
}
|
||||||
14
net-analyzer/zabbix-server/Manifest
Normal file
14
net-analyzer/zabbix-server/Manifest
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
AUX zabbix-jmx-proxy.conf 432 BLAKE2B 188737819d39b9e8ec8913237ff048a68ef19f2ec8849bab6c62bea612ac927d00a6c7042ba87261297ff580ef9976618d6acbd24c7fda8f6eb26b2b3dc891bb SHA512 0d68b9681528256131e35b5115053242f8558f5ad06254e61a16ab14f6530048551f0b777fa81d4afe07cc6282c31a6204fd0ee2e56e0e792ed3252222212250
|
||||||
|
AUX zabbix-jmx-proxy.init 849 BLAKE2B 14a312911a11d765210f3bd86d38c8ce3a2f230c821a03d2dd3b2a2aaf05a86cf64a59ea283ad0f11b62fe17a81936cef03463e5cee6535f1a51558b7bad790a SHA512 79a1966405546899b2e6eb4cb53f0ea1ec70575cbf97ff0f9de16d662c5750f8bf276bf8eadaf00cb69ffa078b79e9144eb9824eec6a23df6b2cd315b79b05d8
|
||||||
|
AUX zabbix-proxy.init 487 BLAKE2B b094521d1ec12ea27f1dec78a858ff3b78acde6a0473a2f8a53cbf46c75c3b0f72a1f44f24dc5294b7157576b06abc631dfed469dcf1a1c7b8c4609a9c81b2b8 SHA512 55f1df96d7d7e6ec16d16162e37a7a494131f4dd53d5988b28663b82a6bbe17b16e901a8f4870f14fd2e1c7dd96a84fe6aa5cd9e6a745462af7b83b3f0455839
|
||||||
|
AUX zabbix-proxy.tmpfiles 35 BLAKE2B 98e917ef03bd6dc5d73e5cbdb140c7e115c7593d5cebf2df9bf3d15713b16c6a44b165a3f68fd36a9119163144a2761457d16ce318bd094ed76ae6040c8b09df SHA512 3c63a2791e6ac77cb3144eb47a275cc8748f5c8943a076052300d6964994b95b18d60f504584fdcb683739dc514261402895e3f30ae2fbdb218acbc42c3d72df
|
||||||
|
AUX zabbix-server-3.0.30-mysql8.patch 608 BLAKE2B 56e2cb893269cdeefbc6ca7c40e73b9af2012e4075d997369c516253211d6de6266a1f565ecbf39cd4520fe76f65968d43320ea8e5b2cd59d2a0eb9f8febc9f4 SHA512 13e95e0f3fd1aff4f2546ce5b3cb48c59e117984192a2574d799ca062ce763982d2984e5fa94b49f077aaebbbb3442a06a0d9982a38a21f5ea739fd0fed87148
|
||||||
|
AUX zabbix-server-3.0.30-security-disable-PidFile.patch 1378 BLAKE2B c1efdfd0b223987c9d9bf1a3f7731f0bdfeb42d1641bbf4387d70ece757f5cb2fb88bafb87f6938a5efbec091f73d5fde0450e8aa0edc3143d589df5efbe5d19 SHA512 854b198b980e4b58dc6149e285bfa6361ab2a10b83a6d8f07b46754316d6764669e68da8018b402b59317ed95b50a13d25f68f28c4c33d76f0ef1e8dedc8da99
|
||||||
|
AUX zabbix-server-3.0.31-fix-cve-2020-15803.patch 3081 BLAKE2B 269b3efedf4f2f4c5365f2119ae166a0bee673841ab0eeae1f3e6311d7015fd35b11330a62c705a567775429319bd440adff48f92c689d35104893eab82a86ec SHA512 950dfe3311dc74fc9068b1c51d22f2a9b2ff20c9011e551151b1aed8212ab26cd5ec369317ec5ad9b52193f59d5f79298205996dd9f2aec48608759769c63c85
|
||||||
|
AUX zabbix-server-4.0.18-modulepathfix.patch 330 BLAKE2B 99b3f1082e220ff842e4c4c86e8fcf57666443dd1e124412f167548ab886352077e1f0548e49cf77f28a51d20cc37dc980448eb87c9e7814ac73dcbfe43388e0 SHA512 75330dddde2f47553ac6a6f71d6f2383ab34c0d64ac5dbe45dd31707d8797d1400215d698072df3a0f0eaf862f00509791a6a0eaa43a0f686657d885c03465b5
|
||||||
|
AUX zabbix-server.init 494 BLAKE2B e58063bfdb0bcb6ea70325d31bff4ffebab2686b7063916619aaabc5b39b1ff5d960b968e382615f84b18531465cf0ad0eab5ffa171c0b4b1797e70d58ed3450 SHA512 7dd55ffe8062bee9104218bf673aeeeea56a4a332ef6a5676b83e7f026a2b6ebc70446c63d6116b684ad16abd95de355cdbdf07c81a51daf1424b3fd8d627c74
|
||||||
|
AUX zabbix-server.tmpfiles 35 BLAKE2B 98e917ef03bd6dc5d73e5cbdb140c7e115c7593d5cebf2df9bf3d15713b16c6a44b165a3f68fd36a9119163144a2761457d16ce318bd094ed76ae6040c8b09df SHA512 3c63a2791e6ac77cb3144eb47a275cc8748f5c8943a076052300d6964994b95b18d60f504584fdcb683739dc514261402895e3f30ae2fbdb218acbc42c3d72df
|
||||||
|
DIST zabbix-server-5.0.4.tar.gz 19315019 BLAKE2B 45a13c835385bb9f039123385ab0512a20167b90e1faf6e79fff76908b2425fe71fefcef37612020200923bb06bec9e65d637ced71e82206953feb6a7e3d3f2e SHA512 8355a416d2f622c0c5c1834a12cc220d1ab4bca3e914f263a4dd11f9aba62dfa3fee6eb716a91e8e7b992cb30cf4fabaf444a3b62e1d261eb332e79ad61a5503
|
||||||
|
DIST zabbix-server-5.2.1.tar.gz 19869073 BLAKE2B 3b0c07aa82183afa3f9760aa878bf3934e75e530b5cb259a393dc893da0e0339237bc286ea4bbf921b3eef1a2fb89e076f165ee3e0eb56e250cfaece76992ecc SHA512 eb45ce3d1209a516424fd0eddfff7cd95442031767b42ee6436bc85f24696452e05142c4b5bb8d004aa2d1079aca7f5eadcc53f9c649466c1637adfa893ced11
|
||||||
|
EBUILD zabbix-server-5.0.4.ebuild 8169 BLAKE2B 2c34211df14cd85e11e05a0c638eeff77f8fbf90b2b4691f785fc7136e24d717a1b2ad05a9b3880c4885c9feee80407aeb3d09dab5a8bb5efba68b1068db01e7 SHA512 9e99c5071d505c99182209996af07bc551684507062f819e0b86ea398323fd6b81960058d12bb88b774c1aa1ae18973a5001949cfedfec429ec9d85072e164ab
|
||||||
|
EBUILD zabbix-server-5.2.1.ebuild 8064 BLAKE2B 41ae48e413a5a8c6ce287ce3454c9cde144eb3b1bc811b39ebb39bcaad4f16a5fdc9be10df18c88772f4c894c011aa06762de4f995bd4e57cfddb86509fef937 SHA512 4e9e540a0efa337207415399713a4619d0627b22336b925d6d08ddd732f3a357e532002a139ae6fd55f98c6632a89b9f8019ef05bff6a7b3c4784a860dac92e6
|
||||||
12
net-analyzer/zabbix-server/files/zabbix-jmx-proxy.conf
Normal file
12
net-analyzer/zabbix-server/files/zabbix-jmx-proxy.conf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Configuration variables for the zabbix jmx proxy
|
||||||
|
|
||||||
|
|
||||||
|
# LISTEN_IP="0.0.0.0"
|
||||||
|
# LISTEN_PORT=10052
|
||||||
|
# START_POLLERS=5
|
||||||
|
# TIMEOUT=3
|
||||||
|
|
||||||
|
# uncomment to enable remote monitoring of the standard JMX objects on the Zabbix Java Gateway itself
|
||||||
|
# JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345
|
||||||
|
# -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
|
||||||
|
|
||||||
33
net-analyzer/zabbix-server/files/zabbix-jmx-proxy.init
Normal file
33
net-analyzer/zabbix-server/files/zabbix-jmx-proxy.init
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
LISTEN_IP=${LISTEN_IP:-127.0.0.1}
|
||||||
|
LISTEN_PORT=${LISTEN_PORT:-10052}
|
||||||
|
START_POLLERS=${START_POLLERS:-5}
|
||||||
|
TIMEOUT=${TIMEOUT:-3}
|
||||||
|
|
||||||
|
PID_FILE="/run/zabbix-jmx-proxy"
|
||||||
|
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ZABBIX_OPTIONS="-Dzabbix.pidFile=$PID_FILE \
|
||||||
|
-Dzabbix.listenIP=$LISTEN_IP \
|
||||||
|
-Dzabbix.listenPort=$LISTEN_PORT \
|
||||||
|
-Dzabbix.startPollers=$START_POLLERS \
|
||||||
|
-Dzabbix.timeout=$TIMEOUT \
|
||||||
|
-Dsun.rmi.transport.tcp.responseTimeout=${TIMEOUT}000"
|
||||||
|
|
||||||
|
JAVA_OPTIONS="-server $JAVA_OPTIONS -Dlogback.configurationFile=logback-console.xml"
|
||||||
|
|
||||||
|
cd /opt/zabbix_java
|
||||||
|
|
||||||
|
CLASSPATH="lib"
|
||||||
|
for jar in lib/*.jar bin/*.jar; do
|
||||||
|
CLASSPATH="$CLASSPATH:$jar"
|
||||||
|
done
|
||||||
|
|
||||||
|
start-stop-daemon -m --background --pidfile $PID_FILE -- java $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
start-stop-daemon --stop --pidfile $PID_FILE
|
||||||
|
}
|
||||||
20
net-analyzer/zabbix-server/files/zabbix-proxy.init
Normal file
20
net-analyzer/zabbix-server/files/zabbix-proxy.init
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
command="/usr/sbin/zabbix_proxy"
|
||||||
|
command_args="--foreground --config /etc/zabbix/zabbix_proxy.conf"
|
||||||
|
command_background="true"
|
||||||
|
command_user="zabbix:zabbix"
|
||||||
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
provide zabbix-proxy
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath -q -d -m 0750 -o root:zabbix /etc/zabbix
|
||||||
|
checkpath -q -f -m 0640 -o root:zabbix /etc/zabbix/*.conf
|
||||||
|
}
|
||||||
|
|
||||||
1
net-analyzer/zabbix-server/files/zabbix-proxy.tmpfiles
Normal file
1
net-analyzer/zabbix-server/files/zabbix-proxy.tmpfiles
Normal file
@@ -0,0 +1 @@
|
|||||||
|
d /run/zabbix 0755 zabbix zabbix -
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/src/libs/zbxdb/db.c b/src/libs/zbxdb/db.c
|
||||||
|
index a65b9c4..e011c51 100644
|
||||||
|
--- a/src/libs/zbxdb/db.c
|
||||||
|
+++ b/src/libs/zbxdb/db.c
|
||||||
|
@@ -285,7 +285,11 @@ int zbx_db_connect(char *host, char *user, char *password, char *dbname, char *d
|
||||||
|
#if defined(HAVE_IBM_DB2)
|
||||||
|
char *connect = NULL;
|
||||||
|
#elif defined(HAVE_MYSQL)
|
||||||
|
- my_bool mysql_reconnect = 1;
|
||||||
|
+#if LIBMYSQL_VERSION_ID >= 80000 /* my_bool type is removed in MySQL 8.0 */
|
||||||
|
+ bool mysql_reconnect = 1;
|
||||||
|
+#else
|
||||||
|
+ my_bool mysql_reconnect = 1;
|
||||||
|
+#endif
|
||||||
|
#elif defined(HAVE_ORACLE)
|
||||||
|
char *connect = NULL;
|
||||||
|
sword err = OCI_SUCCESS;
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
diff --git a/conf/zabbix_agentd.conf b/conf/zabbix_agentd.conf
|
||||||
|
index b73bd45..c10daca 100644
|
||||||
|
--- a/conf/zabbix_agentd.conf
|
||||||
|
+++ b/conf/zabbix_agentd.conf
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
|
||||||
|
### Option: PidFile
|
||||||
|
# Name of PID file.
|
||||||
|
+# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884)
|
||||||
|
#
|
||||||
|
# Mandatory: no
|
||||||
|
# Default:
|
||||||
|
diff --git a/conf/zabbix_proxy.conf b/conf/zabbix_proxy.conf
|
||||||
|
index 082f14e..de0284d 100644
|
||||||
|
--- a/conf/zabbix_proxy.conf
|
||||||
|
+++ b/conf/zabbix_proxy.conf
|
||||||
|
@@ -109,6 +109,7 @@ LogFile=/tmp/zabbix_proxy.log
|
||||||
|
|
||||||
|
### Option: PidFile
|
||||||
|
# Name of PID file.
|
||||||
|
+# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884)
|
||||||
|
#
|
||||||
|
# Mandatory: no
|
||||||
|
# Default:
|
||||||
|
diff --git a/conf/zabbix_server.conf b/conf/zabbix_server.conf
|
||||||
|
index 9f754ca..3999196 100644
|
||||||
|
--- a/conf/zabbix_server.conf
|
||||||
|
+++ b/conf/zabbix_server.conf
|
||||||
|
@@ -62,6 +62,7 @@ LogFile=/tmp/zabbix_server.log
|
||||||
|
|
||||||
|
### Option: PidFile
|
||||||
|
# Name of PID file.
|
||||||
|
+# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884)
|
||||||
|
#
|
||||||
|
# Mandatory: no
|
||||||
|
# Default:
|
||||||
|
diff --git a/src/libs/zbxnix/pid.c b/src/libs/zbxnix/pid.c
|
||||||
|
index baa8415..04c7e0c 100644
|
||||||
|
--- a/src/libs/zbxnix/pid.c
|
||||||
|
+++ b/src/libs/zbxnix/pid.c
|
||||||
|
@@ -26,6 +26,8 @@ static int fdpid = -1;
|
||||||
|
|
||||||
|
int create_pid_file(const char *pidfile)
|
||||||
|
{
|
||||||
|
+ return SUCCEED;
|
||||||
|
+
|
||||||
|
int fd;
|
||||||
|
zbx_stat_t buf;
|
||||||
|
struct flock fl;
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
diff --git a/frontends/php/include/classes/screens/CScreenUrl.php b/frontends/php/include/classes/screens/CScreenUrl.php
|
||||||
|
index e35c5f1..1df396e 100644
|
||||||
|
--- a/frontends/php/include/classes/screens/CScreenUrl.php
|
||||||
|
+++ b/frontends/php/include/classes/screens/CScreenUrl.php
|
||||||
|
@@ -29,18 +29,10 @@ class CScreenUrl extends CScreenBase {
|
||||||
|
public function get() {
|
||||||
|
// prevent from resolving macros in configuration page
|
||||||
|
if ($this->mode != SCREEN_MODE_PREVIEW && $this->mode != SCREEN_MODE_SLIDESHOW) {
|
||||||
|
- return $this->getOutput(
|
||||||
|
- CHtmlUrlValidator::validate($this->screenitem['url'], false)
|
||||||
|
- ? new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'],
|
||||||
|
- 'auto')
|
||||||
|
- : makeMessageBox(false, [[
|
||||||
|
- 'type' => 'error',
|
||||||
|
- 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url'])
|
||||||
|
- ]]
|
||||||
|
- )
|
||||||
|
- );
|
||||||
|
+ return $this->getOutput($this->prepareElement());
|
||||||
|
}
|
||||||
|
- elseif ($this->screenitem['dynamic'] == SCREEN_DYNAMIC_ITEM && $this->hostid == 0) {
|
||||||
|
+
|
||||||
|
+ if ($this->screenitem['dynamic'] == SCREEN_DYNAMIC_ITEM && $this->hostid == 0) {
|
||||||
|
return $this->getOutput((new CTableInfo())->setNoDataMessage(_('No host selected.')));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -54,14 +46,28 @@ class CScreenUrl extends CScreenBase {
|
||||||
|
|
||||||
|
$this->screenitem['url'] = $url ? $url : $this->screenitem['url'];
|
||||||
|
|
||||||
|
- return $this->getOutput(
|
||||||
|
- CHtmlUrlValidator::validate($this->screenitem['url'], false)
|
||||||
|
- ? new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'], 'auto')
|
||||||
|
- : makeMessageBox(false, [[
|
||||||
|
- 'type' => 'error',
|
||||||
|
- 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url'])
|
||||||
|
- ]]
|
||||||
|
- )
|
||||||
|
- );
|
||||||
|
+ return $this->getOutput($this->prepareElement());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * @return CTag
|
||||||
|
+ */
|
||||||
|
+ public function prepareElement() {
|
||||||
|
+ if (CHtmlUrlValidator::validate($this->screenitem['url'], false)) {
|
||||||
|
+ $item = new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'],
|
||||||
|
+ 'auto'
|
||||||
|
+ );
|
||||||
|
+
|
||||||
|
+ if (ZBX_IFRAME_SANDBOX !== false) {
|
||||||
|
+ $item->setAttribute('sandbox', ZBX_IFRAME_SANDBOX);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return $item;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return makeMessageBox(false, [[
|
||||||
|
+ 'type' => 'error',
|
||||||
|
+ 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url'])
|
||||||
|
+ ]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
|
||||||
|
index a67a625..c6a437c 100644
|
||||||
|
--- a/frontends/php/include/defines.inc.php
|
||||||
|
+++ b/frontends/php/include/defines.inc.php
|
||||||
|
@@ -1284,6 +1284,14 @@ if (function_exists('bcscale')) {
|
||||||
|
bcscale(7);
|
||||||
|
}
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * The sandbox attribute enables an extra set of restrictions for the content in the iframe. Default is set to empty
|
||||||
|
+ * string, which means all restrictions are applied. To disable, set to FALSE. To set a specific set of restrictions,
|
||||||
|
+ * write a custom string.
|
||||||
|
+ * https://www.w3.org/TR/2010/WD-html5-20100624/the-iframe-element.html#attr-iframe-sandbox
|
||||||
|
+ */
|
||||||
|
+define('ZBX_IFRAME_SANDBOX', '');
|
||||||
|
+
|
||||||
|
// HTTP headers
|
||||||
|
/*
|
||||||
|
* Value of HTTP X-Frame-options header.
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- zabbix-4.0.1/configure 2018-10-29 10:36:05.000000000 -0700
|
||||||
|
+++ zfx/configure 2018-11-07 16:59:28.015968345 -0800
|
||||||
|
@@ -12510,7 +12510,7 @@
|
||||||
|
CURL_SSL_CERT_LOCATION="${datadir}/zabbix/ssl/certs"
|
||||||
|
CURL_SSL_KEY_LOCATION="${datadir}/zabbix/ssl/keys"
|
||||||
|
|
||||||
|
-LOAD_MODULE_PATH="${libdir}/modules"
|
||||||
|
+LOAD_MODULE_PATH="${libdir}/zabbix"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
19
net-analyzer/zabbix-server/files/zabbix-server.init
Normal file
19
net-analyzer/zabbix-server/files/zabbix-server.init
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
command="/usr/sbin/zabbix_server"
|
||||||
|
command_args="--foreground --config /etc/zabbix/zabbix_server.conf"
|
||||||
|
command_background="true"
|
||||||
|
command_user="zabbix:zabbix"
|
||||||
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
use mysql postgresql
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath -q -d -m 0750 -o root:zabbix /etc/zabbix
|
||||||
|
checkpath -q -f -m 0640 -o root:zabbix /etc/zabbix/*.conf
|
||||||
|
}
|
||||||
1
net-analyzer/zabbix-server/files/zabbix-server.tmpfiles
Normal file
1
net-analyzer/zabbix-server/files/zabbix-server.tmpfiles
Normal file
@@ -0,0 +1 @@
|
|||||||
|
d /run/zabbix 0755 zabbix zabbix -
|
||||||
322
net-analyzer/zabbix-server/zabbix-server-5.0.4.ebuild
Normal file
322
net-analyzer/zabbix-server/zabbix-server-5.0.4.ebuild
Normal file
@@ -0,0 +1,322 @@
|
|||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
# needed to make webapp-config dep optional
|
||||||
|
WEBAPP_OPTIONAL="yes"
|
||||||
|
inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
|
||||||
|
|
||||||
|
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
|
||||||
|
HOMEPAGE="https://www.zabbix.com/"
|
||||||
|
MY_P=${P/_/}
|
||||||
|
MY_PV=${PV/_/}
|
||||||
|
SRC_URI="http://mirror.imax.name/src/zabbix/${PV}/${P}.tar.gz"
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
WEBAPP_MANUAL_SLOT="yes"
|
||||||
|
KEYWORDS="amd64 x86"
|
||||||
|
IUSE="java curl +frontend ipv6 ldap libxml2 mysql openipmi oracle +postgres proxy +server ssh ssl snmp sqlite odbc static"
|
||||||
|
REQUIRED_USE="|| ( frontend proxy server )
|
||||||
|
proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
|
||||||
|
server? ( ^^ ( mysql oracle postgres odbc ) )
|
||||||
|
static? ( !oracle !snmp )"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
curl? ( net-misc/curl )
|
||||||
|
java? ( >=virtual/jdk-1.8:* )
|
||||||
|
ldap? (
|
||||||
|
=dev-libs/cyrus-sasl-2*
|
||||||
|
net-libs/gnutls
|
||||||
|
net-nds/openldap
|
||||||
|
)
|
||||||
|
libxml2? ( dev-libs/libxml2 )
|
||||||
|
mysql? ( dev-db/mysql-connector-c )
|
||||||
|
odbc? ( dev-db/unixODBC )
|
||||||
|
openipmi? ( sys-libs/openipmi )
|
||||||
|
oracle? ( dev-db/oracle-instantclient-basic )
|
||||||
|
postgres? ( dev-db/postgresql:* )
|
||||||
|
proxy? ( sys-libs/zlib )
|
||||||
|
server? (
|
||||||
|
dev-libs/libevent
|
||||||
|
sys-libs/zlib
|
||||||
|
)
|
||||||
|
snmp? ( net-analyzer/net-snmp )
|
||||||
|
sqlite? ( dev-db/sqlite )
|
||||||
|
ssh? ( net-libs/libssh2 )
|
||||||
|
ssl? ( dev-libs/openssl:=[-bindist] )
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="${COMMON_DEPEND}
|
||||||
|
java? ( >=virtual/jre-1.8:* )
|
||||||
|
mysql? ( virtual/mysql )
|
||||||
|
proxy? ( net-analyzer/fping[suid] )
|
||||||
|
server? (
|
||||||
|
app-admin/webapp-config
|
||||||
|
dev-libs/libevent
|
||||||
|
dev-libs/libpcre
|
||||||
|
net-analyzer/fping[suid]
|
||||||
|
)
|
||||||
|
frontend? (
|
||||||
|
app-admin/webapp-config
|
||||||
|
dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
|
||||||
|
media-libs/gd[png]
|
||||||
|
virtual/httpd-php:*
|
||||||
|
mysql? ( dev-lang/php[mysqli] )
|
||||||
|
odbc? ( dev-lang/php[odbc] )
|
||||||
|
oracle? ( dev-lang/php[oci8-instant-client] )
|
||||||
|
postgres? ( dev-lang/php[postgres] )
|
||||||
|
sqlite? ( dev-lang/php[sqlite] )
|
||||||
|
)
|
||||||
|
"
|
||||||
|
DEPEND="${COMMON_DEPEND}
|
||||||
|
static? (
|
||||||
|
curl? ( net-misc/curl[static-libs] )
|
||||||
|
ldap? (
|
||||||
|
=dev-libs/cyrus-sasl-2*[static-libs]
|
||||||
|
net-libs/gnutls[static-libs]
|
||||||
|
net-nds/openldap[static-libs]
|
||||||
|
)
|
||||||
|
libxml2? ( dev-libs/libxml2[static-libs] )
|
||||||
|
mysql? ( dev-db/mysql-connector-c[static-libs] )
|
||||||
|
odbc? ( dev-db/unixODBC[static-libs] )
|
||||||
|
postgres? ( dev-db/postgresql:*[static-libs] )
|
||||||
|
sqlite? ( dev-db/sqlite[static-libs] )
|
||||||
|
ssh? ( net-libs/libssh2 )
|
||||||
|
)
|
||||||
|
"
|
||||||
|
BDEPEND="
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
|
||||||
|
"${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
S=${WORKDIR}/${MY_P}
|
||||||
|
|
||||||
|
ZABBIXJAVA_BASE="opt/zabbix_java"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
if use oracle; then
|
||||||
|
if [ -z "${ORACLE_HOME}" ]; then
|
||||||
|
eerror
|
||||||
|
eerror "The environment variable ORACLE_HOME must be set"
|
||||||
|
eerror "and point to the correct location."
|
||||||
|
eerror "It looks like you don't have Oracle installed."
|
||||||
|
eerror
|
||||||
|
die "Environment variable ORACLE_HOME is not set"
|
||||||
|
fi
|
||||||
|
if has_version 'dev-db/oracle-instantclient-basic'; then
|
||||||
|
ewarn
|
||||||
|
ewarn "Please ensure you have a full install of the Oracle client."
|
||||||
|
ewarn "dev-db/oracle-instantclient* is NOT sufficient."
|
||||||
|
ewarn
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use frontend; then
|
||||||
|
webapp_pkg_setup
|
||||||
|
fi
|
||||||
|
|
||||||
|
enewgroup zabbix
|
||||||
|
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
|
||||||
|
|
||||||
|
java-pkg-opt-2_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf \
|
||||||
|
$(use_enable ipv6) \
|
||||||
|
$(use_enable java) \
|
||||||
|
$(use_enable proxy) \
|
||||||
|
$(use_enable server) \
|
||||||
|
$(use_enable static) \
|
||||||
|
$(use_with curl libcurl) \
|
||||||
|
$(use_with ldap) \
|
||||||
|
$(use_with libxml2) \
|
||||||
|
$(use_with mysql) \
|
||||||
|
$(use_with odbc unixodbc) \
|
||||||
|
$(use_with openipmi openipmi) \
|
||||||
|
$(use_with oracle) \
|
||||||
|
$(use_with postgres postgresql) \
|
||||||
|
$(use_with snmp net-snmp) \
|
||||||
|
$(use_with sqlite sqlite3) \
|
||||||
|
$(use_with ssh ssh2) \
|
||||||
|
$(use_with ssl openssl)
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
|
||||||
|
emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local dirs=(
|
||||||
|
/etc/zabbix
|
||||||
|
/var/lib/zabbix
|
||||||
|
/var/lib/zabbix/home
|
||||||
|
/var/lib/zabbix/scripts
|
||||||
|
/var/lib/zabbix/alertscripts
|
||||||
|
/var/lib/zabbix/externalscripts
|
||||||
|
/var/log/zabbix
|
||||||
|
)
|
||||||
|
|
||||||
|
for dir in "${dirs[@]}"; do
|
||||||
|
dodir "${dir}"
|
||||||
|
keepdir "${dir}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if use server; then
|
||||||
|
insinto /etc/zabbix
|
||||||
|
doins "${S}"/conf/zabbix_server.conf
|
||||||
|
fperms 0640 /etc/zabbix/zabbix_server.conf
|
||||||
|
fowners root:zabbix /etc/zabbix/zabbix_server.conf
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}"/zabbix-server.init zabbix-server
|
||||||
|
|
||||||
|
dosbin src/zabbix_server/zabbix_server
|
||||||
|
|
||||||
|
insinto /usr/share/zabbix
|
||||||
|
doins -r "${S}"/database/
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use proxy; then
|
||||||
|
insinto /etc/zabbix
|
||||||
|
doins "${S}"/conf/zabbix_proxy.conf
|
||||||
|
fperms 0640 /etc/zabbix/zabbix_proxy.conf
|
||||||
|
fowners root:zabbix /etc/zabbix/zabbix_proxy.conf
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy
|
||||||
|
|
||||||
|
dosbin src/zabbix_proxy/zabbix_proxy
|
||||||
|
|
||||||
|
insinto /usr/share/zabbix
|
||||||
|
doins -r "${S}"/database/
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
fowners root:zabbix /etc/zabbix
|
||||||
|
fowners zabbix:zabbix \
|
||||||
|
/var/lib/zabbix \
|
||||||
|
/var/lib/zabbix/home \
|
||||||
|
/var/lib/zabbix/scripts \
|
||||||
|
/var/lib/zabbix/alertscripts \
|
||||||
|
/var/lib/zabbix/externalscripts \
|
||||||
|
/var/log/zabbix
|
||||||
|
fperms 0750 \
|
||||||
|
/etc/zabbix \
|
||||||
|
/var/lib/zabbix \
|
||||||
|
/var/lib/zabbix/home \
|
||||||
|
/var/lib/zabbix/scripts \
|
||||||
|
/var/lib/zabbix/alertscripts \
|
||||||
|
/var/lib/zabbix/externalscripts \
|
||||||
|
/var/log/zabbix
|
||||||
|
|
||||||
|
dodoc README INSTALL NEWS ChangeLog \
|
||||||
|
conf/zabbix_proxy.conf \
|
||||||
|
conf/zabbix_agentd/userparameter_examples.conf \
|
||||||
|
conf/zabbix_agentd/userparameter_mysql.conf \
|
||||||
|
conf/zabbix_server.conf
|
||||||
|
|
||||||
|
if use frontend; then
|
||||||
|
webapp_src_preinst
|
||||||
|
cp -R ui/* "${D}/${MY_HTDOCSDIR}"
|
||||||
|
webapp_configfile \
|
||||||
|
"${MY_HTDOCSDIR}"/include/db.inc.php \
|
||||||
|
"${MY_HTDOCSDIR}"/include/config.inc.php
|
||||||
|
webapp_src_install
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use java; then
|
||||||
|
dodir \
|
||||||
|
/${ZABBIXJAVA_BASE} \
|
||||||
|
/${ZABBIXJAVA_BASE}/bin \
|
||||||
|
/${ZABBIXJAVA_BASE}/lib
|
||||||
|
keepdir /${ZABBIXJAVA_BASE}
|
||||||
|
exeinto /${ZABBIXJAVA_BASE}/bin
|
||||||
|
doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
|
||||||
|
exeinto /${ZABBIXJAVA_BASE}/lib
|
||||||
|
doexe \
|
||||||
|
src/zabbix_java/lib/logback-classic-0.9.27.jar \
|
||||||
|
src/zabbix_java/lib/logback-console.xml \
|
||||||
|
src/zabbix_java/lib/logback-core-0.9.27.jar \
|
||||||
|
src/zabbix_java/lib/logback.xml \
|
||||||
|
src/zabbix_java/lib/android-json-4.3_r3.1.jar \
|
||||||
|
src/zabbix_java/lib/slf4j-api-1.6.1.jar
|
||||||
|
newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy
|
||||||
|
newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if use server || use proxy ; then
|
||||||
|
elog
|
||||||
|
elog "You may need to configure your database for Zabbix"
|
||||||
|
elog "if you have not already done so."
|
||||||
|
elog
|
||||||
|
|
||||||
|
zabbix_homedir=$(egethome zabbix)
|
||||||
|
if [ -n "${zabbix_homedir}" ] && \
|
||||||
|
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
|
||||||
|
ewarn
|
||||||
|
ewarn "The user 'zabbix' should have his homedir changed"
|
||||||
|
ewarn "to /var/lib/zabbix/home if you want to use"
|
||||||
|
ewarn "custom alert scripts."
|
||||||
|
ewarn
|
||||||
|
ewarn "A real homedir might be needed for configfiles"
|
||||||
|
ewarn "for custom alert scripts."
|
||||||
|
ewarn
|
||||||
|
ewarn "To change the homedir use:"
|
||||||
|
ewarn " usermod -d /var/lib/zabbix/home zabbix"
|
||||||
|
ewarn
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use server; then
|
||||||
|
elog
|
||||||
|
elog "For distributed monitoring you have to run:"
|
||||||
|
elog
|
||||||
|
elog "zabbix_server -n <nodeid>"
|
||||||
|
elog
|
||||||
|
elog "This will convert database data for use with Node ID"
|
||||||
|
elog "and also adds a local node."
|
||||||
|
elog
|
||||||
|
fi
|
||||||
|
|
||||||
|
elog "--"
|
||||||
|
elog
|
||||||
|
elog "You may need to add these lines to /etc/services:"
|
||||||
|
elog
|
||||||
|
elog "zabbix-trapper 10051/tcp Zabbix Trapper"
|
||||||
|
elog "zabbix-trapper 10051/udp Zabbix Trapper"
|
||||||
|
elog
|
||||||
|
|
||||||
|
if use server || use proxy ; then
|
||||||
|
# check for fping
|
||||||
|
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
|
||||||
|
case "${fping_perms}" in
|
||||||
|
4[157][157][157])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ewarn
|
||||||
|
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
|
||||||
|
ewarn "you have to make /usr/sbin/fping setuid root and executable"
|
||||||
|
ewarn "by everyone. Run the following command to fix it:"
|
||||||
|
ewarn
|
||||||
|
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
|
||||||
|
ewarn
|
||||||
|
ewarn "Please be aware that this might impose a security risk,"
|
||||||
|
ewarn "depending on the code quality of fping."
|
||||||
|
ewarn
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
320
net-analyzer/zabbix-server/zabbix-server-5.2.1.ebuild
Normal file
320
net-analyzer/zabbix-server/zabbix-server-5.2.1.ebuild
Normal file
@@ -0,0 +1,320 @@
|
|||||||
|
# Copyright 1999-2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
# needed to make webapp-config dep optional
|
||||||
|
WEBAPP_OPTIONAL="yes"
|
||||||
|
inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
|
||||||
|
|
||||||
|
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
|
||||||
|
HOMEPAGE="https://www.zabbix.com/"
|
||||||
|
MY_P=${P/_/}
|
||||||
|
MY_PV=${PV/_/}
|
||||||
|
SRC_URI="http://mirror.imax.name/src/zabbix/${PV}/${P}.tar.gz"
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
WEBAPP_MANUAL_SLOT="yes"
|
||||||
|
KEYWORDS="amd64 x86 arm"
|
||||||
|
IUSE="java curl +frontend ipv6 ldap libxml2 mysql openipmi oracle postgres +server proxy ssh ssl snmp sqlite odbc static"
|
||||||
|
REQUIRED_USE="|| ( frontend proxy server )
|
||||||
|
proxy? ( ^^ ( mysql oracle sqlite odbc ) )
|
||||||
|
server? ( ^^ ( mysql oracle postgres odbc ) )
|
||||||
|
static? ( !oracle !snmp )"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
curl? ( net-misc/curl )
|
||||||
|
java? ( >=virtual/jdk-1.8:* )
|
||||||
|
ldap? (
|
||||||
|
=dev-libs/cyrus-sasl-2*
|
||||||
|
net-libs/gnutls
|
||||||
|
net-nds/openldap
|
||||||
|
)
|
||||||
|
libxml2? ( dev-libs/libxml2 )
|
||||||
|
mysql? ( dev-db/mysql-connector-c )
|
||||||
|
odbc? ( dev-db/unixODBC )
|
||||||
|
openipmi? ( sys-libs/openipmi )
|
||||||
|
oracle? ( dev-db/oracle-instantclient-basic )
|
||||||
|
postgres? ( dev-db/postgresql:* )
|
||||||
|
proxy? ( sys-libs/zlib )
|
||||||
|
server? (
|
||||||
|
dev-libs/libevent
|
||||||
|
sys-libs/zlib
|
||||||
|
)
|
||||||
|
snmp? ( net-analyzer/net-snmp )
|
||||||
|
sqlite? ( dev-db/sqlite )
|
||||||
|
ssh? ( net-libs/libssh2 )
|
||||||
|
ssl? ( dev-libs/openssl:=[-bindist] )
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="${COMMON_DEPEND}
|
||||||
|
java? ( >=virtual/jre-1.8:* )
|
||||||
|
mysql? ( virtual/mysql )
|
||||||
|
proxy? ( net-analyzer/fping[suid] )
|
||||||
|
server? (
|
||||||
|
app-admin/webapp-config
|
||||||
|
dev-libs/libevent
|
||||||
|
dev-libs/libpcre
|
||||||
|
net-analyzer/fping[suid]
|
||||||
|
)
|
||||||
|
frontend? (
|
||||||
|
app-admin/webapp-config
|
||||||
|
dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
|
||||||
|
media-libs/gd[png]
|
||||||
|
virtual/httpd-php:*
|
||||||
|
mysql? ( dev-lang/php[mysqli] )
|
||||||
|
odbc? ( dev-lang/php[odbc] )
|
||||||
|
oracle? ( dev-lang/php[oci8-instant-client] )
|
||||||
|
postgres? ( dev-lang/php[postgres] )
|
||||||
|
sqlite? ( dev-lang/php[sqlite] )
|
||||||
|
)
|
||||||
|
"
|
||||||
|
DEPEND="${COMMON_DEPEND}
|
||||||
|
static? (
|
||||||
|
curl? ( net-misc/curl[static-libs] )
|
||||||
|
ldap? (
|
||||||
|
=dev-libs/cyrus-sasl-2*[static-libs]
|
||||||
|
net-libs/gnutls[static-libs]
|
||||||
|
net-nds/openldap[static-libs]
|
||||||
|
)
|
||||||
|
libxml2? ( dev-libs/libxml2[static-libs] )
|
||||||
|
mysql? ( dev-db/mysql-connector-c[static-libs] )
|
||||||
|
odbc? ( dev-db/unixODBC[static-libs] )
|
||||||
|
postgres? ( dev-db/postgresql:*[static-libs] )
|
||||||
|
sqlite? ( dev-db/sqlite[static-libs] )
|
||||||
|
ssh? ( net-libs/libssh2 )
|
||||||
|
)
|
||||||
|
"
|
||||||
|
BDEPEND="
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
|
||||||
|
"${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
S=${WORKDIR}/${MY_P}
|
||||||
|
|
||||||
|
ZABBIXJAVA_BASE="opt/zabbix_java"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
if use oracle; then
|
||||||
|
if [ -z "${ORACLE_HOME}" ]; then
|
||||||
|
eerror
|
||||||
|
eerror "The environment variable ORACLE_HOME must be set"
|
||||||
|
eerror "and point to the correct location."
|
||||||
|
eerror "It looks like you don't have Oracle installed."
|
||||||
|
eerror
|
||||||
|
die "Environment variable ORACLE_HOME is not set"
|
||||||
|
fi
|
||||||
|
if has_version 'dev-db/oracle-instantclient-basic'; then
|
||||||
|
ewarn
|
||||||
|
ewarn "Please ensure you have a full install of the Oracle client."
|
||||||
|
ewarn "dev-db/oracle-instantclient* is NOT sufficient."
|
||||||
|
ewarn
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use frontend; then
|
||||||
|
webapp_pkg_setup
|
||||||
|
fi
|
||||||
|
|
||||||
|
enewgroup zabbix
|
||||||
|
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
|
||||||
|
|
||||||
|
java-pkg-opt-2_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf \
|
||||||
|
$(use_enable ipv6) \
|
||||||
|
$(use_enable java) \
|
||||||
|
$(use_enable proxy) \
|
||||||
|
$(use_enable server) \
|
||||||
|
$(use_enable static) \
|
||||||
|
$(use_with curl libcurl) \
|
||||||
|
$(use_with ldap) \
|
||||||
|
$(use_with libxml2) \
|
||||||
|
$(use_with mysql) \
|
||||||
|
$(use_with odbc unixodbc) \
|
||||||
|
$(use_with openipmi openipmi) \
|
||||||
|
$(use_with oracle) \
|
||||||
|
$(use_with postgres postgresql) \
|
||||||
|
$(use_with snmp net-snmp) \
|
||||||
|
$(use_with sqlite sqlite3) \
|
||||||
|
$(use_with ssh ssh2) \
|
||||||
|
$(use_with ssl openssl)
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
|
||||||
|
emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
local dirs=(
|
||||||
|
/etc/zabbix
|
||||||
|
/var/lib/zabbix
|
||||||
|
/var/lib/zabbix/home
|
||||||
|
/var/lib/zabbix/scripts
|
||||||
|
/var/lib/zabbix/alertscripts
|
||||||
|
/var/lib/zabbix/externalscripts
|
||||||
|
/var/log/zabbix
|
||||||
|
)
|
||||||
|
|
||||||
|
for dir in "${dirs[@]}"; do
|
||||||
|
dodir "${dir}"
|
||||||
|
keepdir "${dir}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if use server; then
|
||||||
|
insinto /etc/zabbix
|
||||||
|
doins "${S}"/conf/zabbix_server.conf
|
||||||
|
fperms 0640 /etc/zabbix/zabbix_server.conf
|
||||||
|
fowners root:zabbix /etc/zabbix/zabbix_server.conf
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}"/zabbix-server.init zabbix-server
|
||||||
|
|
||||||
|
dosbin src/zabbix_server/zabbix_server
|
||||||
|
|
||||||
|
insinto /usr/share/zabbix
|
||||||
|
doins -r "${S}"/database/
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use proxy; then
|
||||||
|
insinto /etc/zabbix
|
||||||
|
doins "${S}"/conf/zabbix_proxy.conf
|
||||||
|
fperms 0640 /etc/zabbix/zabbix_proxy.conf
|
||||||
|
fowners root:zabbix /etc/zabbix/zabbix_proxy.conf
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy
|
||||||
|
|
||||||
|
dosbin src/zabbix_proxy/zabbix_proxy
|
||||||
|
|
||||||
|
insinto /usr/share/zabbix
|
||||||
|
doins -r "${S}"/database/
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
fowners root:zabbix /etc/zabbix
|
||||||
|
fowners zabbix:zabbix \
|
||||||
|
/var/lib/zabbix \
|
||||||
|
/var/lib/zabbix/home \
|
||||||
|
/var/lib/zabbix/scripts \
|
||||||
|
/var/lib/zabbix/alertscripts \
|
||||||
|
/var/lib/zabbix/externalscripts \
|
||||||
|
/var/log/zabbix
|
||||||
|
fperms 0750 \
|
||||||
|
/etc/zabbix \
|
||||||
|
/var/lib/zabbix \
|
||||||
|
/var/lib/zabbix/home \
|
||||||
|
/var/lib/zabbix/scripts \
|
||||||
|
/var/lib/zabbix/alertscripts \
|
||||||
|
/var/lib/zabbix/externalscripts \
|
||||||
|
/var/log/zabbix
|
||||||
|
|
||||||
|
dodoc README INSTALL NEWS ChangeLog \
|
||||||
|
conf/zabbix_proxy.conf \
|
||||||
|
conf/zabbix_server.conf
|
||||||
|
|
||||||
|
if use frontend; then
|
||||||
|
webapp_src_preinst
|
||||||
|
cp -R ui/* "${D}/${MY_HTDOCSDIR}"
|
||||||
|
webapp_configfile \
|
||||||
|
"${MY_HTDOCSDIR}"/include/db.inc.php \
|
||||||
|
"${MY_HTDOCSDIR}"/include/config.inc.php
|
||||||
|
webapp_src_install
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use java; then
|
||||||
|
dodir \
|
||||||
|
/${ZABBIXJAVA_BASE} \
|
||||||
|
/${ZABBIXJAVA_BASE}/bin \
|
||||||
|
/${ZABBIXJAVA_BASE}/lib
|
||||||
|
keepdir /${ZABBIXJAVA_BASE}
|
||||||
|
exeinto /${ZABBIXJAVA_BASE}/bin
|
||||||
|
doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
|
||||||
|
exeinto /${ZABBIXJAVA_BASE}/lib
|
||||||
|
doexe \
|
||||||
|
src/zabbix_java/lib/logback-classic-0.9.27.jar \
|
||||||
|
src/zabbix_java/lib/logback-console.xml \
|
||||||
|
src/zabbix_java/lib/logback-core-0.9.27.jar \
|
||||||
|
src/zabbix_java/lib/logback.xml \
|
||||||
|
src/zabbix_java/lib/android-json-4.3_r3.1.jar \
|
||||||
|
src/zabbix_java/lib/slf4j-api-1.6.1.jar
|
||||||
|
newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy
|
||||||
|
newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if use server || use proxy ; then
|
||||||
|
elog
|
||||||
|
elog "You may need to configure your database for Zabbix"
|
||||||
|
elog "if you have not already done so."
|
||||||
|
elog
|
||||||
|
|
||||||
|
zabbix_homedir=$(egethome zabbix)
|
||||||
|
if [ -n "${zabbix_homedir}" ] && \
|
||||||
|
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
|
||||||
|
ewarn
|
||||||
|
ewarn "The user 'zabbix' should have his homedir changed"
|
||||||
|
ewarn "to /var/lib/zabbix/home if you want to use"
|
||||||
|
ewarn "custom alert scripts."
|
||||||
|
ewarn
|
||||||
|
ewarn "A real homedir might be needed for configfiles"
|
||||||
|
ewarn "for custom alert scripts."
|
||||||
|
ewarn
|
||||||
|
ewarn "To change the homedir use:"
|
||||||
|
ewarn " usermod -d /var/lib/zabbix/home zabbix"
|
||||||
|
ewarn
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use server; then
|
||||||
|
elog
|
||||||
|
elog "For distributed monitoring you have to run:"
|
||||||
|
elog
|
||||||
|
elog "zabbix_server -n <nodeid>"
|
||||||
|
elog
|
||||||
|
elog "This will convert database data for use with Node ID"
|
||||||
|
elog "and also adds a local node."
|
||||||
|
elog
|
||||||
|
fi
|
||||||
|
|
||||||
|
elog "--"
|
||||||
|
elog
|
||||||
|
elog "You may need to add these lines to /etc/services:"
|
||||||
|
elog
|
||||||
|
elog "zabbix-trapper 10051/tcp Zabbix Trapper"
|
||||||
|
elog "zabbix-trapper 10051/udp Zabbix Trapper"
|
||||||
|
elog
|
||||||
|
|
||||||
|
if use server || use proxy ; then
|
||||||
|
# check for fping
|
||||||
|
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
|
||||||
|
case "${fping_perms}" in
|
||||||
|
4[157][157][157])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ewarn
|
||||||
|
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
|
||||||
|
ewarn "you have to make /usr/sbin/fping setuid root and executable"
|
||||||
|
ewarn "by everyone. Run the following command to fix it:"
|
||||||
|
ewarn
|
||||||
|
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
|
||||||
|
ewarn
|
||||||
|
ewarn "Please be aware that this might impose a security risk,"
|
||||||
|
ewarn "depending on the code quality of fping."
|
||||||
|
ewarn
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
3
sci-electronics/OpenBoardView/Manifest
Normal file
3
sci-electronics/OpenBoardView/Manifest
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
DIST gl.xml 2564178 BLAKE2B c37407f9faaee8677f45ffc615e866ed8d02cb60572deb8af00e8836fee90ab8e45acc237ac5d1324dc116647bac94e6627026c970eb84a09352f40b10536f66 SHA512 665a5a26f78d9f167443be5cac1177f289ce04c6c0043d569eb14a4144f8a4f5918774c6b8492d40b442c8a83a9c0506913e85cba36b085d3783c70bf65918df
|
||||||
|
DIST khrplatform.h 10277 BLAKE2B 76037ff178e55943516d3b9ca8938cc6d8cb80f08fe500491d893f65a48d75c8b861238a8eb71b748fa288d6be4d5a5050dd4af603df75722cace77545c137d6 SHA512 1ce4d1fc797d1b853a5ea9f62fab660e3ac0415e514e94c0cda3fee3c17855ceae6844cdbb67524675e2aebc536e26ef33295199e11ec1fddcb6b279192888ea
|
||||||
|
EBUILD OpenBoardView-7.4_pre1.ebuild 842 BLAKE2B 63bb7655da7592352507d46b558d32b3b7a2e431f98e518bac2b8e045ff341edfe5223bbdaec848a3acc99f1d740714826bbd449e220093db06806826aa5116e SHA512 a6566ad063dcad1f7d9eab5d17efe7f11322360f2bd8008037e0c7f1e97c3fdf3a77383071fd56d3af947595767b734edb3435adc4bb43ce956e1d960b653881
|
||||||
32
sci-electronics/OpenBoardView/OpenBoardView-7.4_pre1.ebuild
Normal file
32
sci-electronics/OpenBoardView/OpenBoardView-7.4_pre1.ebuild
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
inherit eutils cmake-utils git-r3
|
||||||
|
|
||||||
|
DESCRIPTION="Linux SDL/ImGui edition software for viewing .brd files, intended as a drop-in replacement for the \"Test_Link\" software and \"Landrex\""
|
||||||
|
HOMEPAGE="http://openboardview.org/"
|
||||||
|
EGIT_REPO_URI="https://github.com/OpenBoardView/OpenBoardView"
|
||||||
|
EGIT_COMMIT="R${PV/_/-}"
|
||||||
|
SRC_URI="
|
||||||
|
https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml
|
||||||
|
https://www.khronos.org/registry/egl/api/KHR/khrplatform.h"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="amd64 x86"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
x11-libs/gtk+:3
|
||||||
|
media-libs/libsdl2
|
||||||
|
sys-libs/zlib
|
||||||
|
dev-db/sqlite
|
||||||
|
media-libs/fontconfig
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
cp "${DISTDIR}/gl.xml" src/glad/ || die
|
||||||
|
cp "${DISTDIR}/khrplatform.h" src/glad/ || die
|
||||||
|
cmake-utils_src_compile
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user