Hello community, here is the log from the commit of package minicom for openSUSE:11.4 checked in at Fri Aug 26 22:47:47 CEST 2011.
-------- --- old-versions/11.4/UPDATES/all/minicom/minicom.changes 2011-07-26 11:27:09.000000000 +0200 +++ 11.4/minicom/minicom.changes 2011-08-24 11:48:56.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Aug 24 09:44:30 UTC 2011 - [email protected] + +- fix lockdev suppport (bnc#713330) + +------------------------------------------------------------------- calling whatdependson for 11.4-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ minicom.spec ++++++ --- /var/tmp/diff_new_pack.8dGb9P/_old 2011-08-26 22:29:09.000000000 +0200 +++ /var/tmp/diff_new_pack.8dGb9P/_new 2011-08-26 22:29:09.000000000 +0200 @@ -26,7 +26,7 @@ Group: Hardware/Modem Requires: rzsz Version: 2.5 -Release: 5.<RELEASE6> +Release: 5.<RELEASE8> Summary: A Terminal Program Source: %{name}-%{version}.tar.bz2 Patch0: minicom-2.2-defaults.diff @@ -35,6 +35,7 @@ Patch3: minicom-2.4-lockdev.diff Patch4: minicom-2.3-no-build-date.patch Patch5: minicom-2.4-norootsetup.diff +# PATCH-FIX-UPSTREAM increased size of parameter buffers (bnc#707860) Patch6: minicom-2.5-increase-parameter-buffers.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -46,13 +47,6 @@ of the uucp group. - -Authors: --------- - Miquel van Smoorenburg <[email protected]> - Jukka Lahtinen <[email protected]> - Adam Lackorzynski <[email protected]> - %prep %setup -q %patch0 ++++++ minicom-2.4-lockdev.diff ++++++ --- /var/tmp/diff_new_pack.8dGb9P/_old 2011-08-26 22:29:10.000000000 +0200 +++ /var/tmp/diff_new_pack.8dGb9P/_new 2011-08-26 22:29:10.000000000 +0200 @@ -2,7 +2,7 @@ =================================================================== --- minicom-2.5.orig/src/main.c +++ minicom-2.5/src/main.c -@@ -164,6 +164,20 @@ int open_term(int doinit, int show_win_o +@@ -164,6 +164,18 @@ int open_term(int doinit, int show_win_o int s_errno; #endif @@ -14,29 +14,29 @@ + } +#endif + -+ lockfile[0] = 0; + if (portfd_is_socket) + goto nolock; + +#if !HAVE_LOCKDEV -+ /* First see if the lock file directory is present. */ if (P_LOCK[0] && stat(P_LOCK, &stt) == 0) { -@@ -211,10 +225,12 @@ int open_term(int doinit, int show_win_o +@@ -211,10 +223,12 @@ int open_term(int doinit, int show_win_o return -1; } } +#endif - if (doinit > 0) - lockfile_create(); +- if (doinit > 0) +- lockfile_create(); ++ if (doinit > 0 && lockfile_create() != 0) ++ return -1; +nolock: /* Run a special program to disable callin if needed. */ if (doinit > 0 && P_CALLOUT[0]) { if (fastsystem(P_CALLOUT, NULL, NULL, NULL) < 0) { -@@ -232,11 +248,7 @@ int open_term(int doinit, int show_win_o +@@ -232,11 +246,7 @@ int open_term(int doinit, int show_win_o signal(SIGALRM, get_alrm); alarm(4); #ifdef USE_SOCKET @@ -53,12 +53,13 @@ =================================================================== --- minicom-2.5.orig/src/minicom.c +++ minicom-2.5/src/minicom.c -@@ -1570,7 +1570,7 @@ dirty_goto: +@@ -1569,8 +1569,7 @@ dirty_goto: + mc_wclose(st, 0); mc_wclose(stdwin, 1); keyboard(KUNINSTALL, 0); - if (lockfile[0]) +- if (lockfile[0]) - unlink(lockfile); -+ ttyunlock(lockfile); ++ lockfile_remove(); close(portfd); if (quit != NORESET && P_CALLIN[0]) @@ -66,45 +67,56 @@ =================================================================== --- minicom-2.5.orig/src/minicom.h +++ minicom-2.5/src/minicom.h -@@ -35,6 +35,12 @@ +@@ -35,6 +35,10 @@ #include <time.h> +#if HAVE_LOCKDEV +#include <ttylock.h> -+#else -+#define ttyunlock(x) unlink(x) +#endif + #ifdef USE_SOCKET #include <sys/socket.h> #include <sys/un.h> -@@ -82,7 +88,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? */ +@@ -294,7 +298,7 @@ extern int io_pending, pendingkeys; + void domacros(void); + + +-void lockfile_create(void); ++int lockfile_create(void); + void lockfile_remove(void); + + Index: minicom-2.5/src/updown.c =================================================================== --- minicom-2.5.orig/src/updown.c +++ minicom-2.5/src/updown.c -@@ -457,17 +457,28 @@ void updown(int what, int nr) +@@ -29,6 +29,8 @@ + #include <config.h> + #endif + ++#include <wchar.h> ++ + #include "port.h" + #include "minicom.h" + #include "intl.h" +@@ -457,16 +459,31 @@ void updown(int what, int nr) void lockfile_remove(void) { + if (portfd_is_socket) + return; + ++#if !HAVE_LOCKDEV if (lockfile[0]) -- unlink(lockfile); -+ ttyunlock(lockfile); + unlink(lockfile); ++#else ++ ttyunlock(dial_tty); ++#endif } - void lockfile_create(void) +-void lockfile_create(void) ++int lockfile_create(void) { - int fd, n; + int n; @@ -114,21 +126,28 @@ +#endif + + if (portfd_is_socket) -+ return; ++ return 0; ++#if !HAVE_LOCKDEV if (!lockfile[0]) - return; +- return; ++ return 0; -+#if !HAVE_LOCKDEV n = umask(022); /* Create lockfile compatible with UUCP-1.2 */ - if ((fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 0666)) < 0) { -@@ -484,6 +495,9 @@ void lockfile_create(void) +@@ -484,6 +501,16 @@ void lockfile_create(void) close(fd); } umask(n); ++ return 0; +#else -+ ttylock(lockfile); ++ n = ttylock(dial_tty); ++ if (n < 0) { ++ fprintf(stderr, _("Cannot create lockfile for %s: %s\n"), dial_tty, strerror(-n)); ++ } else if (n > 0) { ++ fprintf(stderr, _("Device %s is locked.\n"), dial_tty); ++ } ++ return n; +#endif } ++++++ minicom-2.4-norootsetup.diff ++++++ --- /var/tmp/diff_new_pack.8dGb9P/_old 2011-08-26 22:29:10.000000000 +0200 +++ /var/tmp/diff_new_pack.8dGb9P/_new 2011-08-26 22:29:10.000000000 +0200 @@ -1,8 +1,8 @@ save to ~/.minirc if not root -Index: minicom-2.4/src/config.c +Index: minicom-2.5/src/config.c =================================================================== ---- minicom-2.4.orig/src/config.c -+++ minicom-2.4/src/config.c +--- minicom-2.5.orig/src/config.c ++++ minicom-2.5/src/config.c @@ -1234,7 +1234,7 @@ void vdodflsave(void) int dodflsave(void) { @@ -12,7 +12,7 @@ if ((fp = fopen(fname, "w")) == NULL) { werror(_("Cannot write to %s"), fname); -@@ -1287,6 +1287,7 @@ static void donamsave(void) +@@ -1289,6 +1289,7 @@ static void donamsave(void) s = input(_("Give name to save this configuration?"), ifile); if (s != (char *)0 && *s != 0) { snprintf(parfile, sizeof(parfile), "%s/minirc.%s", CONFDIR, s); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
