- update to 2.4
- /etc/minicom.users removed by upstream - add minicom-2.4-config.patch - remove minicom-2.3-getline.patch - fixed in upstream - remove minicom-2.3-drop-privs.patch - permissions handling removed by upstream - remove minicom-2.3-ncurses.patch - deprecated - modify minicom-2.4-rh.patch - wrong doinit checking (#519637)
This commit is contained in:
parent
c01367bac8
commit
5c621cf84d
@ -1 +1 @@
|
|||||||
minicom-2.3.tar.gz
|
minicom-2.4.tar.gz
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
--- minicom-2.2/src/config.c.umask 2006-04-02 11:52:30.000000000 +0200
|
|
||||||
+++ minicom-2.2/src/config.c 2007-03-09 13:09:21.000000000 +0100
|
|
||||||
@@ -1248,6 +1248,7 @@
|
|
||||||
}
|
|
||||||
writepars(fp, 1);
|
|
||||||
fclose(fp);
|
|
||||||
+ chmod( parfile, (mode_t) 0644 );
|
|
||||||
werror(_("Configuration saved"));
|
|
||||||
} else {
|
|
||||||
/* Mortals save their own configuration */
|
|
@ -1,23 +0,0 @@
|
|||||||
diff -urp minicom-2.3.orig/src/minicom.c minicom-2.3/src/minicom.c
|
|
||||||
--- minicom-2.3.orig/src/minicom.c 2008-02-02 23:49:53.000000000 +0100
|
|
||||||
+++ minicom-2.3/src/minicom.c 2008-02-24 20:45:35.000000000 +0100
|
|
||||||
@@ -1132,6 +1132,8 @@ int main(int argc, char **argv)
|
|
||||||
use_status = 1;
|
|
||||||
break;
|
|
||||||
case 'C': /* Capturing */
|
|
||||||
+ setegid(real_gid);
|
|
||||||
+ seteuid(real_uid);
|
|
||||||
capfp = sfopen(optarg, "a");
|
|
||||||
if (capfp == NULL) {
|
|
||||||
werror(_("Cannot open capture file"));
|
|
||||||
@@ -1139,6 +1141,8 @@ int main(int argc, char **argv)
|
|
||||||
}
|
|
||||||
docap = 1;
|
|
||||||
vt_set(addlf, -1, docap, -1, -1, -1, -1);
|
|
||||||
+ seteuid(eff_uid);
|
|
||||||
+ setegid(eff_gid);
|
|
||||||
break;
|
|
||||||
case 'S': /* start Script */
|
|
||||||
strncpy(scr_name, optarg, 33);
|
|
||||||
Only in minicom-2.3/src: minicom.c.orig
|
|
||||||
Only in minicom-2.3/src: minicom.c.rej
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up minicom-2.3/src/vt100.c.esc minicom-2.3/src/vt100.c
|
|
||||||
--- minicom-2.3/src/vt100.c.esc 2007-10-10 22:18:20.000000000 +0200
|
|
||||||
+++ minicom-2.3/src/vt100.c 2008-08-29 12:53:35.000000000 +0200
|
|
||||||
@@ -1040,7 +1040,7 @@ void vt_out(int ch)
|
|
||||||
fputc(P_CONVCAP[0] == 'Y' ? vt_inmap[c] : c, capfp);
|
|
||||||
c = vt_inmap[c]; /* conversion 04.09.97 / jl */
|
|
||||||
#if TRANSLATE
|
|
||||||
- if (vt_type == VT100 && vt_asis == 0)
|
|
||||||
+ if (vt_type == VT100 && vt_trans[vt_charset] && vt_asis == 0)
|
|
||||||
c = vt_trans[vt_charset][c];
|
|
||||||
#endif
|
|
||||||
/* FIXME: This is wrong, but making it right would require
|
|
@ -1,112 +0,0 @@
|
|||||||
diff -up minicom-2.3/src/minicom.c.getline minicom-2.3/src/minicom.c
|
|
||||||
--- minicom-2.3/src/minicom.c.getline 2009-07-16 13:17:04.000000000 +0200
|
|
||||||
+++ minicom-2.3/src/minicom.c 2009-07-16 13:21:55.000000000 +0200
|
|
||||||
@@ -166,7 +166,7 @@ static void shjump(int sig)
|
|
||||||
#endif /*SIGTSTP*/
|
|
||||||
|
|
||||||
/* Get a line from either window or scroll back buffer. */
|
|
||||||
-static ELM *getline(WIN *w, int no)
|
|
||||||
+static ELM *get_line(WIN *w, int no)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
static ELM outofrange[MAXCOLS] = {{0,0,0}};
|
|
||||||
@@ -204,7 +204,7 @@ static void drawhist(WIN *w, int y, int
|
|
||||||
|
|
||||||
w->direct = 0;
|
|
||||||
for (f = 0; f < w->ys; f++)
|
|
||||||
- mc_wdrawelm(w, f, getline(w, y++));
|
|
||||||
+ mc_wdrawelm(w, f, get_line(w, y++));
|
|
||||||
if (r)
|
|
||||||
mc_wredraw(w, 1);
|
|
||||||
w->direct = 1;
|
|
||||||
@@ -226,7 +226,7 @@ void drawhist_look(WIN *w, int y, int r,
|
|
||||||
tmp_line[0]='\0';
|
|
||||||
w->direct = 0;
|
|
||||||
for (f = 0; f < w->ys; f++) {
|
|
||||||
- tmp_e = getline(w, y++);
|
|
||||||
+ tmp_e = get_line(w, y++);
|
|
||||||
|
|
||||||
/* First we "accumulate" the line into a variable */
|
|
||||||
mc_wdrawelm_var(w, tmp_e, tmp_line);
|
|
||||||
@@ -323,7 +323,7 @@ int find_next(WIN *w, WIN *w_hist,
|
|
||||||
|
|
||||||
for (next_line = hit_line; next_line <= all_lines; next_line++) {
|
|
||||||
/* we do 'something' here... :-) */
|
|
||||||
- tmp_e = getline(w_hist, next_line);
|
|
||||||
+ tmp_e = get_line(w_hist, next_line);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* First we "accumulate" the line into a variable.
|
|
||||||
@@ -378,9 +378,9 @@ wchar_t *StrStr(wchar_t *str1, wchar_t *
|
|
||||||
static void drawcite(WIN *w, int y, int citey, int start, int end)
|
|
||||||
{
|
|
||||||
if (y+citey >= start && y+citey <= end)
|
|
||||||
- mc_wdrawelm_inverse(w, y, getline(w, y+citey));
|
|
||||||
+ mc_wdrawelm_inverse(w, y, get_line(w, y+citey));
|
|
||||||
else
|
|
||||||
- mc_wdrawelm(w, y, getline(w, y+citey));
|
|
||||||
+ mc_wdrawelm(w, y, get_line(w, y+citey));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void drawcite_whole(WIN *w, int y, int start, int end)
|
|
||||||
@@ -399,7 +399,7 @@ static void do_cite(WIN *w, int start, i
|
|
||||||
for (y=start; y<=end; y++) {
|
|
||||||
vt_send('>');
|
|
||||||
vt_send(' ');
|
|
||||||
- tmp_e = getline(w, y);
|
|
||||||
+ tmp_e = get_line(w, y);
|
|
||||||
mc_wdrawelm_var(w, tmp_e, tmp_line);
|
|
||||||
tmp_line[w->xs] = 0;
|
|
||||||
for (x = w->xs-1; x >= 0; x--) {
|
|
||||||
@@ -599,7 +599,7 @@ static void scrollback(void)
|
|
||||||
if (citemode) {
|
|
||||||
inverse = (y+cite_y >= cite_ystart && y+cite_y <= cite_yend);
|
|
||||||
} else {
|
|
||||||
- tmp_e = getline(b_us, y);
|
|
||||||
+ tmp_e = get_line(b_us, y);
|
|
||||||
if (wcslen(look_for) > 1) {
|
|
||||||
/* quick scan for pattern match */
|
|
||||||
mc_wdrawelm_var(b_us, tmp_e, tmp_line);
|
|
||||||
@@ -610,9 +610,9 @@ static void scrollback(void)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inverse)
|
|
||||||
- mc_wdrawelm_inverse(b_us, 0, getline(b_us, y));
|
|
||||||
+ mc_wdrawelm_inverse(b_us, 0, get_line(b_us, y));
|
|
||||||
else
|
|
||||||
- mc_wdrawelm(b_us, 0, getline(b_us, y));
|
|
||||||
+ mc_wdrawelm(b_us, 0, get_line(b_us, y));
|
|
||||||
if (citemode)
|
|
||||||
mc_wlocate(b_us, 0, cite_y);
|
|
||||||
mc_wflush();
|
|
||||||
@@ -647,7 +647,7 @@ static void scrollback(void)
|
|
||||||
if (citemode) {
|
|
||||||
inverse = (y+cite_y >= cite_ystart && y+cite_y <= cite_yend);
|
|
||||||
} else {
|
|
||||||
- tmp_e = getline(b_us, y + b_us->ys - 1);
|
|
||||||
+ tmp_e = get_line(b_us, y + b_us->ys - 1);
|
|
||||||
if (wcslen(look_for) > 1) {
|
|
||||||
/* quick scan for pattern match */
|
|
||||||
mc_wdrawelm_var(b_us, tmp_e, tmp_line);
|
|
||||||
@@ -659,10 +659,10 @@ static void scrollback(void)
|
|
||||||
|
|
||||||
if (inverse)
|
|
||||||
mc_wdrawelm_inverse(b_us, b_us->ys - 1,
|
|
||||||
- getline(b_us, y + b_us->ys - 1));
|
|
||||||
+ get_line(b_us, y + b_us->ys - 1));
|
|
||||||
else
|
|
||||||
mc_wdrawelm(b_us, b_us->ys - 1,
|
|
||||||
- getline(b_us, y + b_us->ys - 1));
|
|
||||||
+ get_line(b_us, y + b_us->ys - 1));
|
|
||||||
if (citemode)
|
|
||||||
mc_wlocate(b_us, 0, cite_y);
|
|
||||||
mc_wflush();
|
|
||||||
@@ -752,7 +752,7 @@ static void scrollback(void)
|
|
||||||
mc_wlocate(b_st, 0, 0);
|
|
||||||
mc_wprintf(b_st, hline);
|
|
||||||
mc_wredraw(b_st, 1);
|
|
||||||
- mc_wdrawelm_inverse(b_us, cite_y, getline(b_us, cite_ystart));
|
|
||||||
+ mc_wdrawelm_inverse(b_us, cite_y, get_line(b_us, cite_ystart));
|
|
||||||
mc_wlocate(b_us, 0, cite_y);
|
|
||||||
break;
|
|
||||||
case K_ESC:
|
|
@ -1,28 +0,0 @@
|
|||||||
diff -urp minicom-2.3.orig/configure minicom-2.3/configure
|
|
||||||
--- minicom-2.3.orig/configure 2008-02-24 11:45:38.000000000 +0100
|
|
||||||
+++ minicom-2.3/configure 2008-02-24 20:38:16.000000000 +0100
|
|
||||||
@@ -6718,7 +6718,7 @@ done
|
|
||||||
|
|
||||||
LIBS="$LIBS $TERMLIBS"
|
|
||||||
|
|
||||||
-if test "x$termlib" = xncurses; then
|
|
||||||
+if test "x$termlib" = xncurses || test "x$termlib" = xtinfo; then
|
|
||||||
|
|
||||||
for ac_header in ncurses/termcap.h
|
|
||||||
do
|
|
||||||
diff -urp minicom-2.3.orig/src/window.c minicom-2.3/src/window.c
|
|
||||||
--- minicom-2.3.orig/src/window.c 2008-02-24 21:04:29.000000000 +0100
|
|
||||||
+++ minicom-2.3/src/window.c 2008-02-24 21:05:17.000000000 +0100
|
|
||||||
@@ -28,7 +28,11 @@ RCSID("$Id: window.c,v 1.21 2008-02-06 2
|
|
||||||
#include <limits.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <wchar.h>
|
|
||||||
-#include <termcap.h>
|
|
||||||
+#ifdef HAVE_TERMCAP_H
|
|
||||||
+# include <termcap.h>
|
|
||||||
+#elif defined (HAVE_NCURSES_TERMCAP_H)
|
|
||||||
+# include <ncurses/termcap.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#include "port.h"
|
|
||||||
#include "minicom.h"
|
|
@ -1,170 +0,0 @@
|
|||||||
diff -urp minicom-2.3.orig/src/main.c minicom-2.3/src/main.c
|
|
||||||
--- minicom-2.3.orig/src/main.c 2008-02-02 23:49:53.000000000 +0100
|
|
||||||
+++ minicom-2.3/src/main.c 2008-02-24 21:26:20.000000000 +0100
|
|
||||||
@@ -87,7 +87,7 @@ void leave(const char *s)
|
|
||||||
}
|
|
||||||
set_privs();
|
|
||||||
if (lockfile[0])
|
|
||||||
- unlink(lockfile);
|
|
||||||
+ ttyunlock(lockfile);
|
|
||||||
if (P_CALLIN[0])
|
|
||||||
fastsystem(P_CALLIN, NULL, NULL, NULL);
|
|
||||||
if (real_uid)
|
|
||||||
@@ -161,10 +161,13 @@ void term_socket_close(void)
|
|
||||||
int open_term(int doinit, int show_win_on_error)
|
|
||||||
{
|
|
||||||
struct stat stt;
|
|
||||||
+#ifdef NOTNOW
|
|
||||||
char buf[128];
|
|
||||||
- int fd, n = 0;
|
|
||||||
+ int fd;
|
|
||||||
int pid;
|
|
||||||
int mask;
|
|
||||||
+#endif
|
|
||||||
+ int n = 0;
|
|
||||||
#ifdef HAVE_ERRNO_H
|
|
||||||
int s_errno;
|
|
||||||
#endif
|
|
||||||
@@ -172,6 +175,8 @@ int open_term(int doinit, int show_win_o
|
|
||||||
/* Upgrade our status. */
|
|
||||||
set_privs();
|
|
||||||
|
|
||||||
+#ifdef NOTNOW
|
|
||||||
+
|
|
||||||
/* First see if the lock file directory is present. */
|
|
||||||
if (P_LOCK[0] && stat(P_LOCK, &stt) == 0) {
|
|
||||||
|
|
||||||
@@ -243,6 +248,30 @@ int open_term(int doinit, int show_win_o
|
|
||||||
close(fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#else
|
|
||||||
+ lockfile[0] = 0;
|
|
||||||
+ if (doinit >= 0) {
|
|
||||||
+ int rc = ttylock(dial_tty);
|
|
||||||
+ if (rc < 0) {
|
|
||||||
+ if (access(dial_tty, W_OK) == -1)
|
|
||||||
+ fprintf(stderr, _("Device %s access failed: %s.\n"),
|
|
||||||
+ dial_tty, strerror(errno));
|
|
||||||
+ else
|
|
||||||
+ fprintf(stderr, _("Device %s lock failed: %s.\n"),
|
|
||||||
+ dial_tty, strerror(-rc));
|
|
||||||
+ } else if (rc > 0) {
|
|
||||||
+ fprintf(stderr, _("Device %s is locked.\n"), dial_tty);
|
|
||||||
+ } else if (rc == 0) {
|
|
||||||
+ snprintf(lockfile, sizeof(lockfile), "%s", dial_tty);
|
|
||||||
+ }
|
|
||||||
+ if (rc) {
|
|
||||||
+ if (stdwin) mc_wclose(stdwin, 1);
|
|
||||||
+ drop_privs();
|
|
||||||
+ return(-1);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* Run a special program to disable callin if needed. */
|
|
||||||
if (doinit > 0 && P_CALLOUT[0]) {
|
|
||||||
if (fastsystem(P_CALLOUT, NULL, NULL, NULL) < 0) {
|
|
||||||
@@ -250,7 +279,7 @@ int open_term(int doinit, int show_win_o
|
|
||||||
mc_wclose(stdwin, 1);
|
|
||||||
fprintf(stderr, _("Could not setup for dial out.\n"));
|
|
||||||
if (lockfile[0])
|
|
||||||
- unlink(lockfile);
|
|
||||||
+ ttyunlock(lockfile);
|
|
||||||
drop_privs();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
@@ -310,12 +339,12 @@ int open_term(int doinit, int show_win_o
|
|
||||||
fprintf(stderr, _("minicom: cannot open %s. Sorry.\n"), dial_tty);
|
|
||||||
#endif
|
|
||||||
if (lockfile[0])
|
|
||||||
- unlink(lockfile);
|
|
||||||
+ ttyunlock(lockfile);
|
|
||||||
drop_privs();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (lockfile[0])
|
|
||||||
- unlink(lockfile);
|
|
||||||
+ ttyunlock(lockfile);
|
|
||||||
if (show_win_on_error)
|
|
||||||
werror(_("Cannot open %s!"), dial_tty);
|
|
||||||
drop_privs();
|
|
||||||
Only in minicom-2.3/src: main.c.orig
|
|
||||||
Only in minicom-2.3/src: main.c.rej
|
|
||||||
diff -urp minicom-2.3.orig/src/minicom.c minicom-2.3/src/minicom.c
|
|
||||||
--- minicom-2.3.orig/src/minicom.c 2008-02-24 21:21:30.000000000 +0100
|
|
||||||
+++ minicom-2.3/src/minicom.c 2008-02-24 21:26:07.000000000 +0100
|
|
||||||
@@ -1548,7 +1548,7 @@ dirty_goto:
|
|
||||||
set_privs();
|
|
||||||
keyboard(KUNINSTALL, 0);
|
|
||||||
if (lockfile[0])
|
|
||||||
- unlink(lockfile);
|
|
||||||
+ ttyunlock(lockfile);
|
|
||||||
close(portfd);
|
|
||||||
/* Please - if your system doesn't have uid_t and/or gid_t, define 'em
|
|
||||||
* conditionally in "port.h".
|
|
||||||
Only in minicom-2.3/src: minicom.c.orig
|
|
||||||
diff -urp minicom-2.3.orig/src/minicom.h minicom-2.3/src/minicom.h
|
|
||||||
--- minicom-2.3.orig/src/minicom.h 2008-02-02 23:49:53.000000000 +0100
|
|
||||||
+++ minicom-2.3/src/minicom.h 2008-02-24 21:26:07.000000000 +0100
|
|
||||||
@@ -35,6 +35,8 @@
|
|
||||||
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
+#include <baudboy.h>
|
|
||||||
+
|
|
||||||
#ifdef USE_SOCKET
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
@@ -84,7 +86,7 @@ EXTERN int tempst; /* Status line is tem
|
|
||||||
EXTERN int escape; /* Escape code. */
|
|
||||||
EXTERN int disable_online_time; /* disable online time display */
|
|
||||||
|
|
||||||
-EXTERN char lockfile[128]; /* UUCP lock file of terminal */
|
|
||||||
+EXTERN char lockfile[1024]; /* UUCP lock file of terminal */
|
|
||||||
EXTERN char homedir[256]; /* Home directory of user */
|
|
||||||
EXTERN char logfname[PARS_VAL_LEN]; /* Name of the logfile */
|
|
||||||
EXTERN char username[16]; /* Who is using minicom? */
|
|
||||||
Only in minicom-2.3/src: minicom.h.orig
|
|
||||||
diff -urp minicom-2.3.orig/src/updown.c minicom-2.3/src/updown.c
|
|
||||||
--- minicom-2.3.orig/src/updown.c 2007-10-10 22:18:20.000000000 +0200
|
|
||||||
+++ minicom-2.3/src/updown.c 2008-02-24 21:26:07.000000000 +0100
|
|
||||||
@@ -384,8 +384,10 @@ void kermit(void)
|
|
||||||
{
|
|
||||||
int status;
|
|
||||||
int pid, n;
|
|
||||||
+#ifdef NOTNOW
|
|
||||||
char buf[81];
|
|
||||||
int fd;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Clear screen, set keyboard modes etc. */
|
|
||||||
mc_wleave();
|
|
||||||
@@ -399,7 +401,7 @@ void kermit(void)
|
|
||||||
/* Remove lockfile */
|
|
||||||
set_privs();
|
|
||||||
if (lockfile[0])
|
|
||||||
- unlink(lockfile);
|
|
||||||
+ ttyunlock(lockfile);
|
|
||||||
setgid((gid_t)real_gid);
|
|
||||||
setuid((uid_t)real_uid);
|
|
||||||
|
|
||||||
@@ -420,6 +422,7 @@ void kermit(void)
|
|
||||||
/* Re-create lockfile */
|
|
||||||
if (lockfile[0]) {
|
|
||||||
set_privs();
|
|
||||||
+#ifdef NOTNOW
|
|
||||||
n = umask(022);
|
|
||||||
/* Create lockfile compatible with UUCP-1.2 */
|
|
||||||
if ((fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 0666)) < 0) {
|
|
||||||
@@ -431,6 +434,9 @@ void kermit(void)
|
|
||||||
close(fd);
|
|
||||||
}
|
|
||||||
umask(n);
|
|
||||||
+#else
|
|
||||||
+ ttylock(lockfile);
|
|
||||||
+#endif
|
|
||||||
drop_privs();
|
|
||||||
}
|
|
||||||
m_flush(portfd);
|
|
||||||
Only in minicom-2.3/src: updown.c.orig
|
|
16
minicom-2.4-config.patch
Normal file
16
minicom-2.4-config.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff -up minicom-2.4/src/config.c.orig minicom-2.4/src/config.c
|
||||||
|
--- minicom-2.4/src/config.c.orig 2010-03-10 12:41:42.000000000 +0100
|
||||||
|
+++ minicom-2.4/src/config.c 2010-03-10 13:16:16.233368251 +0100
|
||||||
|
@@ -52,6 +52,12 @@ void read_parms(void)
|
||||||
|
|
||||||
|
/* Read global parameters */
|
||||||
|
if ((fp = fopen(parfile, "r")) == NULL) {
|
||||||
|
+ if (dosetup) {
|
||||||
|
+ fputs(_("minicom: WARNING: configuration file not found, using defaults\n"),stderr);
|
||||||
|
+ sleep(2);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
fprintf(stderr,
|
||||||
|
_("minicom: there is no global configuration file %s\n"), parfile);
|
||||||
|
fputs(_("Ask your sysadmin to create one (with minicom -s).\n"), stderr);
|
12
minicom-2.4-esc.patch
Normal file
12
minicom-2.4-esc.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up minicom-2.4/src/vt100.c.orig minicom-2.4/src/vt100.c
|
||||||
|
--- minicom-2.4/src/vt100.c.orig 2009-12-12 16:47:47.000000000 +0100
|
||||||
|
+++ minicom-2.4/src/vt100.c 2010-03-10 10:53:23.338369299 +0100
|
||||||
|
@@ -1012,7 +1012,7 @@ void vt_out(int ch)
|
||||||
|
if (!using_iconv()) {
|
||||||
|
c = vt_inmap[c]; /* conversion 04.09.97 / jl */
|
||||||
|
#if TRANSLATE
|
||||||
|
- if (vt_type == VT100 && vt_asis == 0)
|
||||||
|
+ if (vt_type == VT100 && vt_trans[vt_charset] && vt_asis == 0)
|
||||||
|
c = vt_trans[vt_charset][c];
|
||||||
|
#endif
|
||||||
|
}
|
113
minicom-2.4-rh.patch
Normal file
113
minicom-2.4-rh.patch
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
diff -up minicom-2.4/src/main.c.orig minicom-2.4/src/main.c
|
||||||
|
--- minicom-2.4/src/main.c.orig 2009-12-12 16:47:47.000000000 +0100
|
||||||
|
+++ minicom-2.4/src/main.c 2010-03-10 11:43:12.588243671 +0100
|
||||||
|
@@ -154,13 +154,18 @@ void term_socket_close(void)
|
||||||
|
int open_term(int doinit, int show_win_on_error)
|
||||||
|
{
|
||||||
|
struct stat stt;
|
||||||
|
+#ifdef NOTNOW
|
||||||
|
char buf[128];
|
||||||
|
- int fd, n = 0;
|
||||||
|
+ int fd;
|
||||||
|
int pid;
|
||||||
|
+#endif
|
||||||
|
+ int n = 0;
|
||||||
|
#ifdef HAVE_ERRNO_H
|
||||||
|
int s_errno;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef NOTNOW
|
||||||
|
+
|
||||||
|
/* First see if the lock file directory is present. */
|
||||||
|
if (P_LOCK[0] && stat(P_LOCK, &stt) == 0) {
|
||||||
|
|
||||||
|
@@ -212,6 +217,29 @@ int open_term(int doinit, int show_win_o
|
||||||
|
if (doinit > 0)
|
||||||
|
lockfile_create();
|
||||||
|
|
||||||
|
+#else
|
||||||
|
+ lockfile[0] = 0;
|
||||||
|
+ if (doinit > 0) {
|
||||||
|
+ int rc = ttylock(dial_tty);
|
||||||
|
+ if (rc < 0) {
|
||||||
|
+ if (access(dial_tty, W_OK) == -1)
|
||||||
|
+ fprintf(stderr, _("Device %s access failed: %s.\n"),
|
||||||
|
+ dial_tty, strerror(errno));
|
||||||
|
+ else
|
||||||
|
+ fprintf(stderr, _("Device %s lock failed: %s.\n"),
|
||||||
|
+ dial_tty, strerror(-rc));
|
||||||
|
+ } else if (rc > 0) {
|
||||||
|
+ fprintf(stderr, _("Device %s is locked.\n"), dial_tty);
|
||||||
|
+ } else if (rc == 0) {
|
||||||
|
+ snprintf(lockfile, sizeof(lockfile), "%s", dial_tty);
|
||||||
|
+ }
|
||||||
|
+ if (rc) {
|
||||||
|
+ if (stdwin) mc_wclose(stdwin, 1);
|
||||||
|
+ return(-1);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* Run a special program to disable callin if needed. */
|
||||||
|
if (doinit > 0 && P_CALLOUT[0]) {
|
||||||
|
if (fastsystem(P_CALLOUT, NULL, NULL, NULL) < 0) {
|
||||||
|
diff -up minicom-2.4/src/minicom.c.orig minicom-2.4/src/minicom.c
|
||||||
|
--- minicom-2.4/src/minicom.c.orig 2009-12-12 16:47:47.000000000 +0100
|
||||||
|
+++ minicom-2.4/src/minicom.c 2010-03-10 11:39:32.406244215 +0100
|
||||||
|
@@ -1555,7 +1555,7 @@ dirty_goto:
|
||||||
|
mc_wclose(stdwin, 1);
|
||||||
|
keyboard(KUNINSTALL, 0);
|
||||||
|
if (lockfile[0])
|
||||||
|
- unlink(lockfile);
|
||||||
|
+ ttyunlock(lockfile);
|
||||||
|
close(portfd);
|
||||||
|
|
||||||
|
if (quit != NORESET && P_CALLIN[0])
|
||||||
|
diff -up minicom-2.4/src/minicom.h.orig minicom-2.4/src/minicom.h
|
||||||
|
--- minicom-2.4/src/minicom.h.orig 2009-12-12 16:47:47.000000000 +0100
|
||||||
|
+++ minicom-2.4/src/minicom.h 2010-03-10 11:39:32.406244215 +0100
|
||||||
|
@@ -35,6 +35,8 @@
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
+#include <baudboy.h>
|
||||||
|
+
|
||||||
|
#ifdef USE_SOCKET
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/un.h>
|
||||||
|
@@ -82,7 +84,7 @@ EXTERN int tempst; /* Status line is tem
|
||||||
|
EXTERN int escape; /* Escape code. */
|
||||||
|
EXTERN int disable_online_time; /* disable online time display */
|
||||||
|
|
||||||
|
-EXTERN char lockfile[128]; /* UUCP lock file of terminal */
|
||||||
|
+EXTERN char lockfile[1024]; /* UUCP lock file of terminal */
|
||||||
|
EXTERN char homedir[256]; /* Home directory of user */
|
||||||
|
EXTERN char logfname[PARS_VAL_LEN]; /* Name of the logfile */
|
||||||
|
EXTERN char username[16]; /* Who is using minicom? */
|
||||||
|
diff -up minicom-2.4/src/updown.c.orig minicom-2.4/src/updown.c
|
||||||
|
--- minicom-2.4/src/updown.c.orig 2009-12-13 16:20:34.000000000 +0100
|
||||||
|
+++ minicom-2.4/src/updown.c 2010-03-10 11:54:05.519368852 +0100
|
||||||
|
@@ -378,11 +378,12 @@ void updown(int what, int nr)
|
||||||
|
void lockfile_remove(void)
|
||||||
|
{
|
||||||
|
if (lockfile[0])
|
||||||
|
- unlink(lockfile);
|
||||||
|
+ ttyunlock(lockfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lockfile_create(void)
|
||||||
|
{
|
||||||
|
+#ifdef NOTNOW
|
||||||
|
int fd, n;
|
||||||
|
char buf[81];
|
||||||
|
|
||||||
|
@@ -399,6 +400,9 @@ void lockfile_create(void)
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
umask(n);
|
||||||
|
+#else
|
||||||
|
+ ttylock(lockfile);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
@ -1,7 +1,7 @@
|
|||||||
diff -up minicom-2.3/src/updown.c.staticbuf minicom-2.3/src/updown.c
|
diff -up minicom-2.4/src/updown.c.staticbuf minicom-2.4/src/updown.c
|
||||||
--- minicom-2.3/src/updown.c.staticbuf 2008-08-29 12:55:48.000000000 +0200
|
--- minicom-2.4/src/updown.c.staticbuf 2009-12-13 16:20:34.000000000 +0100
|
||||||
+++ minicom-2.3/src/updown.c 2008-08-29 12:55:48.000000000 +0200
|
+++ minicom-2.4/src/updown.c 2010-03-10 10:43:14.570243745 +0100
|
||||||
@@ -91,40 +91,83 @@ static void udcatch(int dummy)
|
@@ -89,40 +89,83 @@ static void udcatch(int dummy)
|
||||||
* Translate %b to the current bps rate, and
|
* Translate %b to the current bps rate, and
|
||||||
* %l to the current tty port.
|
* %l to the current tty port.
|
||||||
* %f to the serial port file descriptor
|
* %f to the serial port file descriptor
|
||||||
@ -105,7 +105,7 @@ diff -up minicom-2.3/src/updown.c.staticbuf minicom-2.3/src/updown.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -185,7 +228,8 @@ void updown(int what, int nr)
|
@@ -183,7 +226,8 @@ void updown(int what, int nr)
|
||||||
const char *s ="";
|
const char *s ="";
|
||||||
int pipefd[2];
|
int pipefd[2];
|
||||||
int n, status;
|
int n, status;
|
||||||
@ -115,7 +115,7 @@ diff -up minicom-2.3/src/updown.c.staticbuf minicom-2.3/src/updown.c
|
|||||||
WIN *win = (WIN *)NULL;
|
WIN *win = (WIN *)NULL;
|
||||||
|
|
||||||
if (mcd(what == 'U' ? P_UPDIR : P_DOWNDIR) < 0)
|
if (mcd(what == 'U' ? P_UPDIR : P_DOWNDIR) < 0)
|
||||||
@@ -217,6 +261,7 @@ void updown(int what, int nr)
|
@@ -215,6 +259,7 @@ void updown(int what, int nr)
|
||||||
#if 1
|
#if 1
|
||||||
{
|
{
|
||||||
int multiple; /* 0:only directory, 1:one file, -1:any number */
|
int multiple; /* 0:only directory, 1:one file, -1:any number */
|
||||||
@ -123,7 +123,7 @@ diff -up minicom-2.3/src/updown.c.staticbuf minicom-2.3/src/updown.c
|
|||||||
|
|
||||||
if (P_MUL(g)=='Y')
|
if (P_MUL(g)=='Y')
|
||||||
/* need file(s), or just a directory? */
|
/* need file(s), or just a directory? */
|
||||||
@@ -236,7 +281,13 @@ void updown(int what, int nr)
|
@@ -234,7 +279,13 @@ void updown(int what, int nr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* discard directory if "multiple" == 0 */
|
/* discard directory if "multiple" == 0 */
|
||||||
@ -138,7 +138,7 @@ diff -up minicom-2.3/src/updown.c.staticbuf minicom-2.3/src/updown.c
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -262,6 +313,8 @@ void updown(int what, int nr)
|
@@ -260,6 +311,8 @@ void updown(int what, int nr)
|
||||||
} else
|
} else
|
||||||
mc_wreturn();
|
mc_wreturn();
|
||||||
mcd("");
|
mcd("");
|
||||||
@ -147,10 +147,10 @@ diff -up minicom-2.3/src/updown.c.staticbuf minicom-2.3/src/updown.c
|
|||||||
return;
|
return;
|
||||||
case 0: /* Child */
|
case 0: /* Child */
|
||||||
if (P_PIORED(g) == 'Y') {
|
if (P_PIORED(g) == 'Y') {
|
||||||
@@ -280,11 +333,21 @@ void updown(int what, int nr)
|
@@ -278,11 +331,21 @@ void updown(int what, int nr)
|
||||||
set_privs();
|
for (n = 1; n < _NSIG; n++)
|
||||||
setgid((gid_t)real_gid);
|
signal(n, SIG_DFL);
|
||||||
setuid((uid_t)real_uid);
|
|
||||||
- fastexec(translate(cmdline));
|
- fastexec(translate(cmdline));
|
||||||
+ translated_cmdline = translate(cmdline);
|
+ translated_cmdline = translate(cmdline);
|
||||||
+ if (translated_cmdline != NULL) {
|
+ if (translated_cmdline != NULL) {
|
||||||
@ -170,19 +170,21 @@ diff -up minicom-2.3/src/updown.c.staticbuf minicom-2.3/src/updown.c
|
|||||||
if (win) {
|
if (win) {
|
||||||
setcbreak(1); /* Cbreak, no echo. */
|
setcbreak(1); /* Cbreak, no echo. */
|
||||||
enab_sig(1, 0); /* But enable SIGINT */
|
enab_sig(1, 0); /* But enable SIGINT */
|
||||||
@@ -388,6 +451,7 @@ void kermit(void)
|
@@ -409,7 +472,8 @@ void lockfile_create(void)
|
||||||
char buf[81];
|
void kermit(void)
|
||||||
int fd;
|
{
|
||||||
#endif
|
int status, pid, n;
|
||||||
|
- char *kermit_path = translate(P_KERMIT);
|
||||||
+ char * translated_cmdline;
|
+ char * translated_cmdline;
|
||||||
|
+ char *kermit_path = P_KERMIT;
|
||||||
|
|
||||||
/* Clear screen, set keyboard modes etc. */
|
if (!kermit_path || !*kermit_path) {
|
||||||
mc_wleave();
|
werror("No kermit path defined!");
|
||||||
@@ -408,7 +472,11 @@ void kermit(void)
|
@@ -433,7 +497,11 @@ void kermit(void)
|
||||||
for (n = 0; n < _NSIG; n++)
|
for (n = 0; n < _NSIG; n++)
|
||||||
signal(n, SIG_DFL);
|
signal(n, SIG_DFL);
|
||||||
|
|
||||||
- fastexec(translate(P_KERMIT));
|
- fastexec(kermit_path);
|
||||||
+ translated_cmdline = translate(P_KERMIT);
|
+ translated_cmdline = translate(P_KERMIT);
|
||||||
+ if (translated_cmdline != NULL) {
|
+ if (translated_cmdline != NULL) {
|
||||||
+ fastexec(translated_cmdline);
|
+ fastexec(translated_cmdline);
|
||||||
@ -191,15 +193,15 @@ diff -up minicom-2.3/src/updown.c.staticbuf minicom-2.3/src/updown.c
|
|||||||
exit(1);
|
exit(1);
|
||||||
default: /* Parent */
|
default: /* Parent */
|
||||||
break;
|
break;
|
||||||
@@ -522,6 +590,7 @@ void runscript(int ask, const char *s, c
|
@@ -531,6 +599,7 @@ void runscript(int ask, const char *s, c
|
||||||
char buf[81];
|
|
||||||
char scr_lines[5];
|
char scr_lines[5];
|
||||||
char cmdline[128];
|
char cmdline[128];
|
||||||
|
struct pollfd fds[2];
|
||||||
+ char *translated_cmdline;
|
+ char *translated_cmdline;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
WIN *w;
|
WIN *w;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
@@ -627,7 +696,12 @@ void runscript(int ask, const char *s, c
|
@@ -633,7 +702,12 @@ void runscript(int ask, const char *s, c
|
||||||
mc_setenv("LOGIN", scr_user);
|
mc_setenv("LOGIN", scr_user);
|
||||||
mc_setenv("PASS", scr_passwd);
|
mc_setenv("PASS", scr_passwd);
|
||||||
mc_setenv("TERMLIN", scr_lines); /* jl 13.09.97 */
|
mc_setenv("TERMLIN", scr_lines); /* jl 13.09.97 */
|
12
minicom-2.4-umask.patch
Normal file
12
minicom-2.4-umask.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up ./minicom-2.4/src/config.c.umask ./minicom-2.4/src/config.c
|
||||||
|
--- minicom-2.4/src/config.c.umask 2010-03-09 16:32:14.876153489 +0100
|
||||||
|
+++ minicom-2.4/src/config.c 2010-03-09 16:33:17.789153650 +0100
|
||||||
|
@@ -1245,6 +1245,8 @@ int dodflsave(void)
|
||||||
|
}
|
||||||
|
writepars(fp, dosetup);
|
||||||
|
fclose(fp);
|
||||||
|
+ if(dosetup)
|
||||||
|
+ chmod(fname, (mode_t) 0644);
|
||||||
|
werror(_("Configuration saved"));
|
||||||
|
|
||||||
|
return domacsave() < 0 ? -1 : 0;
|
51
minicom.spec
51
minicom.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: A text-based modem control and terminal emulation program
|
Summary: A text-based modem control and terminal emulation program
|
||||||
Name: minicom
|
Name: minicom
|
||||||
Version: 2.3
|
Version: 2.4
|
||||||
Release: 6%{?dist}
|
Release: 1%{?dist}
|
||||||
URL: http://alioth.debian.org/projects/minicom/
|
URL: http://alioth.debian.org/projects/minicom/
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/Communications
|
Group: Applications/Communications
|
||||||
@ -10,17 +10,15 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|||||||
BuildRequires: lockdev-devel ncurses-devel
|
BuildRequires: lockdev-devel ncurses-devel
|
||||||
Requires: lockdev lrzsz
|
Requires: lockdev lrzsz
|
||||||
|
|
||||||
Source0: http://alioth.debian.org/frs/download.php/2332/minicom-2.3.tar.gz
|
Source0: http://alioth.debian.org/frs/download.php/3195/minicom-2.4.tar.gz
|
||||||
|
|
||||||
Patch1: minicom-2.3-ncurses.patch
|
Patch1: minicom-2.4-umask.patch
|
||||||
Patch2: minicom-2.3-drop-privs.patch
|
Patch2: minicom-2.2-spaces.patch
|
||||||
Patch4: minicom-2.2-umask.patch
|
Patch3: minicom-2.3-gotodir.patch
|
||||||
Patch6: minicom-2.2-spaces.patch
|
Patch4: minicom-2.4-rh.patch
|
||||||
Patch7: minicom-2.3-gotodir.patch
|
Patch5: minicom-2.4-esc.patch
|
||||||
Patch8: minicom-2.3-rh.patch
|
Patch6: minicom-2.4-staticbuf.patch
|
||||||
Patch9: minicom-2.3-esc.patch
|
Patch7: minicom-2.4-config.patch
|
||||||
Patch10: minicom-2.3-staticbuf.patch
|
|
||||||
Patch11: minicom-2.3-getline.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Minicom is a simple text-based modem control and terminal emulation
|
Minicom is a simple text-based modem control and terminal emulation
|
||||||
@ -30,15 +28,13 @@ language, and other features.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .ncurses
|
%patch1 -p1 -b .umask
|
||||||
%patch2 -p1 -b .drop-privs
|
%patch2 -p1 -b .spaces
|
||||||
%patch4 -p1 -b .umask
|
%patch3 -p1 -b .gotodir
|
||||||
%patch6 -p1 -b .spaces
|
%patch4 -p1 -b .rh
|
||||||
%patch7 -p1 -b .gotodir
|
%patch5 -p1 -b .esc
|
||||||
%patch8 -p1 -b .rh
|
%patch6 -p1 -b .staticbuf
|
||||||
%patch9 -p1 -b .esc
|
%patch7 -p1 -b .config
|
||||||
%patch10 -p1 -b .staticbuf
|
|
||||||
%patch11 -p1 -b .getline
|
|
||||||
|
|
||||||
cp -pr doc doc_
|
cp -pr doc doc_
|
||||||
rm -f doc_/Makefile*
|
rm -f doc_/Makefile*
|
||||||
@ -51,7 +47,6 @@ make %{?_smp_mflags}
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||||
install -p -m 644 doc/minicom.users $RPM_BUILD_ROOT%{_sysconfdir}/minicom.users
|
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
@ -61,7 +56,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc ChangeLog AUTHORS NEWS TODO doc_/*
|
%doc ChangeLog AUTHORS NEWS TODO doc_/*
|
||||||
%config(noreplace) %{_sysconfdir}/minicom.users
|
|
||||||
# DO NOT MAKE minicom SUID/SGID anything.
|
# DO NOT MAKE minicom SUID/SGID anything.
|
||||||
%{_bindir}/minicom
|
%{_bindir}/minicom
|
||||||
%{_bindir}/runscript
|
%{_bindir}/runscript
|
||||||
@ -70,6 +64,15 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 9 2010 Jan Görig <jgorig@redhat.com> 2.4-1
|
||||||
|
- update to 2.4
|
||||||
|
- /etc/minicom.users removed by upstream
|
||||||
|
- add minicom-2.4-config.patch
|
||||||
|
- remove minicom-2.3-getline.patch - fixed in upstream
|
||||||
|
- remove minicom-2.3-drop-privs.patch - permissions handling removed by upstream
|
||||||
|
- remove minicom-2.3-ncurses.patch - deprecated
|
||||||
|
- modify minicom-2.4-rh.patch - wrong doinit checking (#519637)
|
||||||
|
|
||||||
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-6
|
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
@ -85,7 +88,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
- rediff patches with fuzz
|
- rediff patches with fuzz
|
||||||
|
|
||||||
* Thu Mar 13 2008 Lubomir Kundrak <lkundrak@redhat.com> 2.3-2
|
* Thu Mar 13 2008 Lubomir Kundrak <lkundrak@redhat.com> 2.3-2
|
||||||
- Add ChangeLog to %doc
|
- Add ChangeLog to %%doc
|
||||||
|
|
||||||
* Sun Feb 24 2008 Lubomir Kundrak <lkundrak@redhat.com> 2.3-1
|
* Sun Feb 24 2008 Lubomir Kundrak <lkundrak@redhat.com> 2.3-1
|
||||||
- 2.3
|
- 2.3
|
||||||
|
Loading…
Reference in New Issue
Block a user