Bug 181438 - shells/pdksh hangs when doing an ls
Summary: shells/pdksh hangs when doing an ls
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-20 20:50 UTC by Sean Bruno
Modified: 2014-02-19 10:40 UTC (History)
0 users

See Also:


Attachments
2014-02-12-pdksh.diff (3.04 KB, patch)
2014-02-12 13:34 UTC, Rodrigo OSORIO
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer freebsd_triage 2013-08-20 20:50:01 UTC
We're not really sure when, but ksh stopped working over the last few months and users cannot login correctly

How-To-Repeat: run ksh on freefall and do an ls
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-20 20:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->skreuzer

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-08-27 16:04:44 UTC
Author: skreuzer
Date: Tue Aug 27 15:04:37 2013
New Revision: 325457
URL: http://svnweb.freebsd.org/changeset/ports/325457

Log:
  Mark the port as broken on FreeBSD 10.0
  
  PR:		ports/181438
  Submitted by:	Sean Bruno <sbruno@FreeBSD.org>

Modified:
  head/shells/pdksh/Makefile

Modified: head/shells/pdksh/Makefile
==============================================================================
--- head/shells/pdksh/Makefile	Tue Aug 27 15:03:04 2013	(r325456)
+++ head/shells/pdksh/Makefile	Tue Aug 27 15:04:37 2013	(r325457)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	pdksh
-# Date created:		23 May 1995
-# Whom:			Thomas Gellekum <tg@FreeBSD.org>
-#
+# Created by: Thomas Gellekum <tg@FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	pdksh
 PORTVERSION=	5.2.14p2
@@ -20,6 +16,7 @@ PATCH_DIST_STRIP=	-p2
 
 MAINTAINER=	skreuzer@FreeBSD.org
 COMMENT=	The Public Domain Korn Shell
+
 LICENSE=	BSD
 
 GNU_CONFIGURE=	yes
@@ -27,6 +24,10 @@ MAN1=		ksh.1
 
 .include <bsd.port.options.mk>
 
+.if ${OSVERSION} >= 1000039
+BROKEN=	hangs on 10.0: http://www.freebsd.org/cgi/query-pr.cgi?pr=181438
+.endif
+
 .if defined(WITH_STATIC)
 CONFIGURE_ENV+=	LDSTATIC=-static
 .endif
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Rodrigo OSORIO 2013-09-04 15:18:00 UTC
Hi,

Since I take this port maintenership,
I'm working on this issue.

regards,
- rodrigo
Comment 4 Steven Kreuzer freebsd_committer freebsd_triage 2014-01-02 15:46:35 UTC
Responsible Changed
From-To: skreuzer->freebsd-ports-bugs

Kicking this back into the pool as I am no longer the maintainer 
of this port
Comment 5 hostmaster 2014-02-04 22:52:02 UTC
Any progress in fixing this - any idea what's causing it?


Bruce Becker			+1 416 410 0879
GTS Network Administration	Toronto, Ont.
Email:	hostmaster@GTS.Infra-service.CA
Comment 6 Udo.Schweigert 2014-02-11 14:38:16 UTC
Here is a fairly simple patch to solve this issue. Supprisingly it was a
problem of a change in sort(1)'s default behavior in 10.0.

For the committer: new file to be added to repository: files/patch-siglist.sh

Regards,

Udo


diff -ru  /usr/ports/shells/pdksh/Makefile ./Makefile
--- /usr/ports/shells/pdksh/Makefile	2014-02-11 15:22:36.000000000 +0100
+++ ./Makefile	2014-02-11 15:28:59.000000000 +0100
@@ -3,7 +3,7 @@
 
 PORTNAME=	pdksh
 PORTVERSION=	5.2.14p2
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	shells
 MASTER_SITES=	http://gd.tuwien.ac.at/utils/shells/pdksh/ \
 		ftp://ftp.lip6.fr/pub/unix/shells/pdksh/ \
@@ -25,10 +25,6 @@
 NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
-.if ${OSVERSION} >= 1000039
-BROKEN=	hangs on 10.0: http://www.freebsd.org/cgi/query-pr.cgi?pr=181438
-.endif
-
 .if defined(WITH_STATIC)
 CONFIGURE_ENV+=	LDSTATIC=-static
 .endif
diff -ru  /usr/ports/shells/pdksh/files/patch-siglist.sh ./files/patch-siglist.sh
--- /usr/ports/shells/pdksh/files/patch-siglist.sh	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-siglist.sh	2014-02-11 15:01:52.000000000 +0100
@@ -0,0 +1,11 @@
+--- work/pdksh-5.2.14/siglist.sh	1996-09-18 18:52:41.000000000 +0200
++++ siglist.sh	2014-01-24 14:02:01.000000000 +0100
+@@ -23,7 +23,7 @@
+ 	{ QwErTy SIG\1 , "\1", "\2" },\
+ #endif/') > $in
+ $CPP $in  > $out
+-sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n |
++sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -n +2n +0n |
+     sed 's/^[0-9]* //' |
+     awk 'BEGIN { last=0; nsigs=0; }
+ 	{
Comment 7 Rodrigo Osorio freebsd_committer freebsd_triage 2014-02-12 10:29:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rodrigo

I'll take it.
Comment 8 Rodrigo OSORIO 2014-02-12 13:34:21 UTC
Hi Udo,

Thanks for solving the issue, but instead of using a workaround,
I suggest a more convenient solution using the posix2 syntax
handled by both gnu sort (before 10) and freebsd sort(10 and beyond).

I also include few changes to stagify the port.

Regards,
- rodrigo
Comment 9 Rodrigo OSORIO 2014-02-12 19:11:18 UTC
Hi,

I tedted it on 10 and 9.1, i have two running builds on redport to
validate that. But afaik, gnu sort handle those options without error.

-rodrigo
Comment 10 dfilter service freebsd_committer freebsd_triage 2014-02-18 08:44:35 UTC
Author: rodrigo
Date: Tue Feb 18 08:44:28 2014
New Revision: 344843
URL: http://svnweb.freebsd.org/changeset/ports/344843
QAT: https://qat.redports.org/buildarchive/r344843/

Log:
  Fix ksh after 10.0 by using a posix compliant syntax for sort invocation.
  Fix staging
  
  PR:		ports/181438
  Submitted by:	Chweigert Udo <Udo.Schweigert@siemens.com>
  Reviewed by:	bapt (mentor)

Added:
  head/shells/pdksh/files/patch-siglist.sh   (contents, props changed)
Modified:
  head/shells/pdksh/Makefile
  head/shells/pdksh/pkg-plist

Modified: head/shells/pdksh/Makefile
==============================================================================
--- head/shells/pdksh/Makefile	Tue Feb 18 08:41:22 2014	(r344842)
+++ head/shells/pdksh/Makefile	Tue Feb 18 08:44:28 2014	(r344843)
@@ -3,7 +3,7 @@
 
 PORTNAME=	pdksh
 PORTVERSION=	5.2.14p2
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	shells
 MASTER_SITES=	http://gd.tuwien.ac.at/utils/shells/pdksh/ \
 		ftp://ftp.lip6.fr/pub/unix/shells/pdksh/ \
@@ -17,18 +17,12 @@ PATCH_DIST_STRIP=	-p2
 MAINTAINER=	rodrigo@FreeBSD.org
 COMMENT=	The Public Domain Korn Shell
 
-LICENSE=	BSD
+LICENSE=	BSD3CLAUSE
 
 GNU_CONFIGURE=	yes
-MAN1=		ksh.1
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
-.if ${OSVERSION} >= 1000039
-BROKEN=	hangs on 10.0: http://www.freebsd.org/cgi/query-pr.cgi?pr=181438
-.endif
-
 .if defined(WITH_STATIC)
 CONFIGURE_ENV+=	LDSTATIC=-static
 .endif

Added: head/shells/pdksh/files/patch-siglist.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/shells/pdksh/files/patch-siglist.sh	Tue Feb 18 08:44:28 2014	(r344843)
@@ -0,0 +1,11 @@
+--- siglist.sh	2014-02-12 11:26:07.000000000 +0100
++++ siglist.sh	2014-02-12 11:26:22.000000000 +0100
+@@ -23,7 +23,7 @@
+ 	{ QwErTy SIG\1 , "\1", "\2" },\
+ #endif/') > $in
+ $CPP $in  > $out
+-sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n |
++sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -k3n -k1n |
+     sed 's/^[0-9]* //' |
+     awk 'BEGIN { last=0; nsigs=0; }
+ 	{

Modified: head/shells/pdksh/pkg-plist
==============================================================================
--- head/shells/pdksh/pkg-plist	Tue Feb 18 08:41:22 2014	(r344842)
+++ head/shells/pdksh/pkg-plist	Tue Feb 18 08:44:28 2014	(r344843)
@@ -1,3 +1,4 @@
 bin/ksh
+man/man1/ksh.1.gz
 @exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
 @unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 11 Rodrigo Osorio freebsd_committer freebsd_triage 2014-02-18 08:48:38 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 12 dfilter service freebsd_committer freebsd_triage 2014-02-19 10:25:52 UTC
Author: rodrigo
Date: Wed Feb 19 10:25:44 2014
New Revision: 345064
URL: http://svnweb.freebsd.org/changeset/ports/345064
QAT: https://qat.redports.org/buildarchive/r345064/

Log:
  fix staging issue ( missed in my first commit)
  
  PR:		ports/181438
  Approved by:	bapt (mentor)

Added:
  head/shells/pdksh/files/patch-Makefile.in   (contents, props changed)

Added: head/shells/pdksh/files/patch-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/shells/pdksh/files/patch-Makefile.in	Wed Feb 19 10:25:44 2014	(r345064)
@@ -0,0 +1,26 @@
+--- Makefile.in	2014-02-19 10:09:23.000000000 +0100
++++ Makefile.in	2014-02-19 10:09:57.000000000 +0100
+@@ -26,8 +26,8 @@
+ exec_prefix = @exec_prefix@
+ transform=@program_transform_name@
+ 
+-bindir = $(exec_prefix)/bin
+-mandir = $(prefix)/man/man$(manext)
++bindir = $(DESTDIR)$(exec_prefix)/bin
++mandir = $(DESTDIR)$(prefix)/man/man$(manext)
+ manext = 1
+ 
+ # Suffix for executables: nothing for unix, .exe for os/2.
+--- Makefile.in	2014-02-12 11:54:53.000000000 +0100
++++ Makefile.in	2014-02-12 11:55:29.000000000 +0100
+@@ -26,8 +26,8 @@
+ exec_prefix = @exec_prefix@
+ transform=@program_transform_name@
+ 
+-bindir = $(exec_prefix)/bin
+-mandir = $(prefix)/man/man$(manext)
++bindir = ${DESTDIR}$(exec_prefix)/bin
++mandir = ${DESTDIR}$(prefix)/man/man$(manext)
+ manext = 1
+ 
+ # Suffix for executables: nothing for unix, .exe for os/2.
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 13 dfilter service freebsd_committer freebsd_triage 2014-02-19 10:32:36 UTC
Author: rodrigo
Date: Wed Feb 19 10:32:29 2014
New Revision: 345065
URL: http://svnweb.freebsd.org/changeset/ports/345065
QAT: https://qat.redports.org/buildarchive/r345065/

Log:
  Fix mistake in the commited patch.
  
  PR:		ports/181438
  Approved by:	bapt (mentor)

Modified:
  head/shells/pdksh/files/patch-Makefile.in

Modified: head/shells/pdksh/files/patch-Makefile.in
==============================================================================
--- head/shells/pdksh/files/patch-Makefile.in	Wed Feb 19 10:25:44 2014	(r345064)
+++ head/shells/pdksh/files/patch-Makefile.in	Wed Feb 19 10:32:29 2014	(r345065)
@@ -11,16 +11,3 @@
  manext = 1
  
  # Suffix for executables: nothing for unix, .exe for os/2.
---- Makefile.in	2014-02-12 11:54:53.000000000 +0100
-+++ Makefile.in	2014-02-12 11:55:29.000000000 +0100
-@@ -26,8 +26,8 @@
- exec_prefix = @exec_prefix@
- transform=@program_transform_name@
- 
--bindir = $(exec_prefix)/bin
--mandir = $(prefix)/man/man$(manext)
-+bindir = ${DESTDIR}$(exec_prefix)/bin
-+mandir = ${DESTDIR}$(prefix)/man/man$(manext)
- manext = 1
- 
- # Suffix for executables: nothing for unix, .exe for os/2.
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"