Hello community, here is the log from the commit of package minicom for openSUSE:Factory checked in at Sat Jan 15 01:11:44 CET 2011. -------- --- minicom/minicom.changes 2010-09-03 16:18:30.000000000 +0200 +++ minicom/minicom.changes 2011-01-11 16:54:21.000000000 +0100 @@ -1,0 +2,7 @@ +Tue Jan 11 15:52:53 UTC 2011 - lnussel@suse.de + +- enable and fix socket support (bnc#661749) +- change default device to /dev/modem as /dev/tty8 doesn't make sense +- save to home if running as non-root + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- minicom-2.3-lockdev.diff New: ---- minicom-2.4-lockdev.diff minicom-2.4-norootsetup.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ minicom.spec ++++++ --- /var/tmp/diff_new_pack.Fiwkts/_old 2011-01-15 01:10:23.000000000 +0100 +++ /var/tmp/diff_new_pack.Fiwkts/_new 2011-01-15 01:10:23.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package minicom (Version 2.4) +# spec file for package minicom # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,7 @@ Group: Hardware/Modem Requires: rzsz Version: 2.4 -Release: 1 +Release: 2 Summary: A Terminal Program Source: %{name}-%{version}.tar.bz2 Patch0: minicom-2.2-defaults.diff @@ -34,8 +34,9 @@ Patch2: bug204522.diff Patch3: bug199924.diff Patch4: 03norzsz.diff -Patch5: minicom-2.3-lockdev.diff +Patch5: minicom-2.4-lockdev.diff Patch6: minicom-2.3-no-build-date.patch +Patch7: minicom-2.4-norootsetup.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -62,12 +63,15 @@ %patch4 -p1 %patch5 -p1 %patch6 +%patch7 -p1 %build autoreconf --force --install %configure --disable-rpath \ --enable-music \ --enable-dfl-baud=57600 \ + --enable-dfl-port=/dev/modem \ + --enable-socket \ --enable-cfg-dir=%{_sysconfdir} %{__make} %{?_smp_mflags} ++++++ minicom-2.3-lockdev.diff -> minicom-2.4-lockdev.diff ++++++ --- minicom/minicom-2.3-lockdev.diff 2010-08-31 16:00:13.000000000 +0200 +++ minicom/minicom-2.4-lockdev.diff 2011-01-11 16:54:21.000000000 +0100 @@ -2,45 +2,53 @@ =================================================================== --- minicom-2.4.orig/src/main.c +++ minicom-2.4/src/main.c -@@ -161,6 +161,8 @@ int open_term(int doinit, int show_win_o +@@ -161,6 +161,20 @@ int open_term(int doinit, int show_win_o int s_errno; #endif ++#ifdef USE_SOCKET ++#define SOCKET_PREFIX "unix#" ++ portfd_is_socket = portfd_is_connected = 0; ++ if (strncmp(dial_tty, SOCKET_PREFIX, strlen(SOCKET_PREFIX)) == 0) { ++ portfd_is_socket = 1; ++ } ++#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) { -@@ -212,6 +214,29 @@ int open_term(int doinit, int show_win_o +@@ -208,10 +222,12 @@ int open_term(int doinit, int show_win_o + return -1; + } + } ++#endif + 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 -+ ++nolock: /* Run a special program to disable callin if needed. */ if (doinit > 0 && P_CALLOUT[0]) { if (fastsystem(P_CALLOUT, NULL, NULL, NULL) < 0) { +@@ -229,11 +245,7 @@ int open_term(int doinit, int show_win_o + signal(SIGALRM, get_alrm); + alarm(4); + #ifdef USE_SOCKET +-#define SOCKET_PREFIX "unix#" +- portfd_is_socket = portfd_is_connected = 0; +- if (strncmp(dial_tty, SOCKET_PREFIX, strlen(SOCKET_PREFIX)) == 0) { +- portfd_is_socket = 1; +- ++ if (portfd_is_socket) { + portfd_sock_addr.sun_family = AF_UNIX; + strncpy(portfd_sock_addr.sun_path, + dial_tty + strlen(SOCKET_PREFIX), Index: minicom-2.4/src/minicom.c =================================================================== --- minicom-2.4.orig/src/minicom.c @@ -84,9 +92,13 @@ =================================================================== --- minicom-2.4.orig/src/updown.c +++ minicom-2.4/src/updown.c -@@ -394,17 +394,21 @@ void updown(int what, int nr) +@@ -393,18 +393,28 @@ void updown(int what, int nr) + void lockfile_remove(void) { ++ if (portfd_is_socket) ++ return; ++ if (lockfile[0]) - unlink(lockfile); + ttyunlock(lockfile); @@ -100,6 +112,9 @@ + int fd; char buf[81]; +#endif ++ ++ if (portfd_is_socket) ++ return; if (!lockfile[0]) return; @@ -108,12 +123,12 @@ n = umask(022); /* Create lockfile compatible with UUCP-1.2 */ if ((fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 0666)) < 0) { -@@ -415,6 +419,9 @@ void lockfile_create(void) +@@ -415,6 +425,9 @@ void lockfile_create(void) close(fd); } umask(n); +#else -+ ttylock(lockfile); ++ ttylock(lockfile); +#endif } ++++++ minicom-2.4-norootsetup.diff ++++++ save to ~/.minirc if not root Index: minicom-2.4/src/config.c =================================================================== --- minicom-2.4.orig/src/config.c +++ minicom-2.4/src/config.c @@ -1234,7 +1234,7 @@ void vdodflsave(void) int dodflsave(void) { FILE *fp; - char *fname = dosetup ? parfile : pparfile; + char *fname = getuid() == 0 ? parfile : pparfile; if ((fp = fopen(fname, "w")) == NULL) { werror(_("Cannot write to %s"), fname); @@ -1287,6 +1287,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); + snprintf(pparfile, sizeof(pparfile), "%s/.minirc.%s", homedir, s); dodflsave(); } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org