public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-misc/beep/files/
@ 2020-06-27 20:51 Aaron Bauman
  0 siblings, 0 replies; only message in thread
From: Aaron Bauman @ 2020-06-27 20:51 UTC (permalink / raw
  To: gentoo-commits

commit:     908e453722584ffd4fc12188903477c191be9a0f
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Fri Jun 26 06:49:36 2020 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Sat Jun 27 20:49:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=908e4537

app-misc/beep: remove unused patch(es)

Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16426
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 app-misc/beep/files/beep-1.3-CVE-2018-0492.patch | 106 -----------------------
 app-misc/beep/files/beep-1.3-Makefile.patch      |  26 ------
 2 files changed, 132 deletions(-)

diff --git a/app-misc/beep/files/beep-1.3-CVE-2018-0492.patch b/app-misc/beep/files/beep-1.3-CVE-2018-0492.patch
deleted file mode 100644
index f4894b51fc8..00000000000
--- a/app-misc/beep/files/beep-1.3-CVE-2018-0492.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-diff --git a/beep.c b/beep.c
-index 7da2e70..4323d31 100644
---- beep.c
-+++ beep.c
-@@ -109,6 +109,7 @@ void do_beep(int freq) {
-      /* BEEP_TYPE_EVDEV */
-      struct input_event e;
- 
-+     memset(&e, 0, sizeof(e));
-      e.type = EV_SND;
-      e.code = SND_TONE;
-      e.value = freq;
-@@ -124,10 +125,6 @@ void do_beep(int freq) {
- /* If we get interrupted, it would be nice to not leave the speaker beeping in
-    perpetuity. */
- void handle_signal(int signum) {
--
--  if(console_device)
--    free(console_device);
--
-   switch(signum) {
-   case SIGINT:
-   case SIGTERM:
-@@ -257,7 +254,7 @@ void parse_command_line(int argc, char **argv, beep_parms_t *result) {
-       result->verbose = 1;
-       break;
-     case 'e' : /* also --device */
--      console_device = strdup(optarg);
-+      console_device = optarg;
-       break;
-     case 'h' : /* notice that this is also --help */
-     default :
-@@ -276,26 +273,6 @@ void play_beep(beep_parms_t parms) {
- 	"%d delay after) @ %.2f Hz\n",
- 	parms.reps, parms.length, parms.delay, parms.end_delay, parms.freq);
- 
--  /* try to snag the console */
--  if(console_device)
--    console_fd = open(console_device, O_WRONLY);
--  else
--    if((console_fd = open("/dev/tty0", O_WRONLY)) == -1)
--      console_fd = open("/dev/vc/0", O_WRONLY);
--
--  if(console_fd == -1) {
--    fprintf(stderr, "Could not open %s for writing\n",
--      console_device != NULL ? console_device : "/dev/tty0 or /dev/vc/0");
--    printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
--    perror("open");
--    exit(1);
--  }
--
--  if (ioctl(console_fd, EVIOCGSND(0)) != -1)
--    console_type = BEEP_TYPE_EVDEV;
--  else
--    console_type = BEEP_TYPE_CONSOLE;
--  
-   /* Beep */
-   for (i = 0; i < parms.reps; i++) {                    /* start beep */
-     do_beep(parms.freq);
-@@ -305,8 +282,6 @@ void play_beep(beep_parms_t parms) {
-     if(parms.end_delay || (i+1 < parms.reps))
-        usleep(1000*parms.delay);                        /* wait...    */
-   }                                                     /* repeat.    */
--
--  close(console_fd);
- }
- 
- 
-@@ -328,6 +303,26 @@ int main(int argc, char **argv) {
-   signal(SIGTERM, handle_signal);
-   parse_command_line(argc, argv, parms);
- 
-+  /* try to snag the console */
-+  if(console_device)
-+    console_fd = open(console_device, O_WRONLY);
-+  else
-+    if((console_fd = open("/dev/tty0", O_WRONLY)) == -1)
-+      console_fd = open("/dev/vc/0", O_WRONLY);
-+
-+  if(console_fd == -1) {
-+    fprintf(stderr, "Could not open %s for writing\n",
-+      console_device != NULL ? console_device : "/dev/tty0 or /dev/vc/0");
-+    printf("\a");  /* Output the only beep we can, in an effort to fall back on usefulness */
-+    perror("open");
-+    exit(1);
-+  }
-+
-+  if (ioctl(console_fd, EVIOCGSND(0)) != -1)
-+    console_type = BEEP_TYPE_EVDEV;
-+  else
-+    console_type = BEEP_TYPE_CONSOLE;
-+
-   /* this outermost while loop handles the possibility that -n/--new has been
-      used, i.e. that we have multiple beeps specified. Each iteration will
-      play, then free() one parms instance. */
-@@ -365,8 +360,8 @@ int main(int argc, char **argv) {
-     parms = next;
-   }
- 
--  if(console_device)
--    free(console_device);
-+  close(console_fd);
-+  console_fd = -1;
- 
-   return EXIT_SUCCESS;
- }

diff --git a/app-misc/beep/files/beep-1.3-Makefile.patch b/app-misc/beep/files/beep-1.3-Makefile.patch
deleted file mode 100644
index f4b891e8b82..00000000000
--- a/app-misc/beep/files/beep-1.3-Makefile.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/Makefile	2002-03-29 09:37:22.000000000 -0800
-+++ b/Makefile	2009-03-27 22:19:18.000000000 -0700
-@@ -1,17 +1,18 @@
--CC=gcc
--FLAGS=-Wall
-+CC ?= gcc
-+LDFLAGS ?=
-+CFLAGS ?= -Wall
- EXEC_NAME=beep
- INSTALL_DIR=/usr/bin
- MAN_FILE=beep.1.gz
--MAN_DIR=/usr/man/man1
-+MAN_DIR=/usr/share/man/man1
- 
- default : beep
- 
- clean : 
--	rm ${EXEC_NAME}
-+	rm -f ${EXEC_NAME}
- 
- beep : beep.c
--	${CC} ${FLAGS} -o ${EXEC_NAME} beep.c
-+	${CC} ${CFLAGS} ${LDFLAGS} -o ${EXEC_NAME} beep.c
- 
- install : 
- 	cp ${EXEC_NAME} ${INSTALL_DIR}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-27 20:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-27 20:51 [gentoo-commits] repo/gentoo:master commit in: app-misc/beep/files/ Aaron Bauman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox