summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-06-24 23:25:11 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-06-24 23:25:11 +0000
commitd7f8a4b605fb12051b1ee4aa732d490382b6ab9a (patch)
treeb914caf50f4f38d1967a6c5479a318cd35debee9
parentf5c1f1e76951691b4e9fd7f522ed0a9d0726a5ba (diff)
downloadksh-d7f8a4b605fb12051b1ee4aa732d490382b6ab9a.tar.gz
Updated patches via git-buildpackage
-rw-r--r--debian/patches/0001-shell-options.patch (renamed from debian/patches/shell-options.patch)12
-rw-r--r--debian/patches/0002-cleanup-man-title.patch (renamed from debian/patches/cleanup-man-title.patch)10
-rw-r--r--debian/patches/0003-no-rpath.patch21
-rw-r--r--debian/patches/0004-handle-removed-working-dir.patch31
-rw-r--r--debian/patches/0005-Link-with-libm-to-resovle-symbols-in-suid_exec.patch26
-rw-r--r--debian/patches/0006-Mystery-mostly-empty-dlldefs.h.patch72
-rw-r--r--debian/patches/handle-removed-working-dir.patch21
-rw-r--r--debian/patches/no-rpath.patch11
-rw-r--r--debian/patches/series10
9 files changed, 177 insertions, 37 deletions
diff --git a/debian/patches/shell-options.patch b/debian/patches/0001-shell-options.patch
index cf7a39f..7fbb807 100644
--- a/debian/patches/shell-options.patch
+++ b/debian/patches/0001-shell-options.patch
@@ -1,6 +1,16 @@
+From: Oliver Kiddle <okiddle@yahoo.co.uk>
+Date: Sun, 24 Jun 2012 22:33:38 +0000
+Subject: shell-options
+
+---
+ src/cmd/ksh93/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/ksh93/Makefile b/src/cmd/ksh93/Makefile
+index 3ad44c6..2d98480 100644
--- a/src/cmd/ksh93/Makefile
+++ b/src/cmd/ksh93/Makefile
-@@ -48,8 +48,8 @@
+@@ -48,8 +48,8 @@ SHOPT_REMOTE == /* enable --rc if running as a remote shell */
SHOPT_SEVENBIT == /* strip the eigth bit from characters */
SHOPT_SPAWN == /* use spawnveg for fork/exec */
SHOPT_STATS == 1 /* add .sh.stats variable */
diff --git a/debian/patches/cleanup-man-title.patch b/debian/patches/0002-cleanup-man-title.patch
index f59c61b..9ccd04d 100644
--- a/debian/patches/cleanup-man-title.patch
+++ b/debian/patches/0002-cleanup-man-title.patch
@@ -1,3 +1,13 @@
+From: Oliver Kiddle <okiddle@yahoo.co.uk>
+Date: Sun, 24 Jun 2012 22:33:38 +0000
+Subject: cleanup-man-title
+
+---
+ src/cmd/ksh93/sh.1 | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/src/cmd/ksh93/sh.1 b/src/cmd/ksh93/sh.1
+index 27d8a9e..ca7924f 100644
--- a/src/cmd/ksh93/sh.1
+++ b/src/cmd/ksh93/sh.1
@@ -19,15 +19,7 @@
diff --git a/debian/patches/0003-no-rpath.patch b/debian/patches/0003-no-rpath.patch
new file mode 100644
index 0000000..e34f90b
--- /dev/null
+++ b/debian/patches/0003-no-rpath.patch
@@ -0,0 +1,21 @@
+From: Oliver Kiddle <okiddle@yahoo.co.uk>
+Date: Sun, 24 Jun 2012 22:33:38 +0000
+Subject: no-rpath
+
+---
+ src/cmd/INIT/make.probe | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cmd/INIT/make.probe b/src/cmd/INIT/make.probe
+index 8a3c383..a2706db 100644
+--- a/src/cmd/INIT/make.probe
++++ b/src/cmd/INIT/make.probe
+@@ -2068,7 +2068,7 @@ CC_LD=$ld
+ CC_LD_DYNAMIC=$lddynamic
+ CC_LD_LAZY=$ldlazy
+ CC_LD_NOLAZY=$ldnolazy
+-CC_LD_ORIGIN=$ldorigin
++CC_LD_ORIGIN=
+ CC_LD_RECORD=$ldrecord
+ CC_LD_NORECORD=$ldnorecord
+ CC_LD_RUNPATH=$ldrunpath
diff --git a/debian/patches/0004-handle-removed-working-dir.patch b/debian/patches/0004-handle-removed-working-dir.patch
new file mode 100644
index 0000000..457d242
--- /dev/null
+++ b/debian/patches/0004-handle-removed-working-dir.patch
@@ -0,0 +1,31 @@
+From: Oliver Kiddle <okiddle@yahoo.co.uk>
+Date: Sun, 24 Jun 2012 22:33:38 +0000
+Subject: handle-removed-working-dir
+
+---
+ src/cmd/ksh93/bltins/cd_pwd.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/src/cmd/ksh93/bltins/cd_pwd.c b/src/cmd/ksh93/bltins/cd_pwd.c
+index fb0dcda..d06cfba 100644
+--- a/src/cmd/ksh93/bltins/cd_pwd.c
++++ b/src/cmd/ksh93/bltins/cd_pwd.c
+@@ -115,7 +115,18 @@ int b_cd(int argc, char *argv[],Shbltin_t *context)
+ if(*(dp=dir+1) == '.')
+ dp++;
+ if(*dp==0 || *dp=='/')
++ {
++ struct stat statb;
++ if((dp-dir)==2)
++ {
++ sfprintf(shp->strbuf,oldpwd);
++ dp = sfstruse(shp->strbuf);
++ *strrchr(dp,'/')=0;
++ if(*dp)
++ dir = (char*)dp;
++ }
+ cdpath = 0;
++ }
+ }
+ rval = -1;
+ do
diff --git a/debian/patches/0005-Link-with-libm-to-resovle-symbols-in-suid_exec.patch b/debian/patches/0005-Link-with-libm-to-resovle-symbols-in-suid_exec.patch
new file mode 100644
index 0000000..c8e1d4f
--- /dev/null
+++ b/debian/patches/0005-Link-with-libm-to-resovle-symbols-in-suid_exec.patch
@@ -0,0 +1,26 @@
+From: Igor Pashev <pashev.igor@gmail.com>
+Date: Sun, 24 Jun 2012 22:47:19 +0000
+Subject: Link with libm to resovle symbols in suid_exec
+
++ cc -g -O2 -L. -L/var/tmp/ksh-93u+/arch/sol11.i386/lib -o suid_exec suid_exec.o /var/tmp/ksh-93u+/arch/sol11.i386/lib/libast.a -liconv -lnsl /var/tmp/ksh-93u+/arch/sol11.i386/lib/libast.a -liconv
+/var/tmp/ksh-93u+/arch/sol11.i386/lib/libast.a(sfcvt.o): In function `_sfcvt':
+/var/tmp/ksh-93u+/src/lib/libast/sfio/sfcvt.c:203: undefined reference to `frexpl'
+/var/tmp/ksh-93u+/src/lib/libast/sfio/sfcvt.c:205: undefined reference to `ldexpl'
+/var/tmp/ksh-93u+/src/lib/libast/sfio/sfcvt.c:216: undefined reference to `ldexpl'
+---
+ src/cmd/ksh93/Mamfile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cmd/ksh93/Mamfile b/src/cmd/ksh93/Mamfile
+index 5a55040..9381e33 100644
+--- a/src/cmd/ksh93/Mamfile
++++ b/src/cmd/ksh93/Mamfile
+@@ -1386,7 +1386,7 @@ prev +li
+ prev ${mam_libsocket}
+ prev ${mam_libsecdb}
+ setv CC.DLL -UCC.DLL
+-exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o suid_exec suid_exec.o ${mam_libast} ${mam_libnsl} ${mam_libast}
++exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o suid_exec suid_exec.o ${mam_libast} ${mam_libnsl} ${mam_libast} -lm
+ done suid_exec generated
+ make shell
+ prev libshell.a archive
diff --git a/debian/patches/0006-Mystery-mostly-empty-dlldefs.h.patch b/debian/patches/0006-Mystery-mostly-empty-dlldefs.h.patch
new file mode 100644
index 0000000..a844468
--- /dev/null
+++ b/debian/patches/0006-Mystery-mostly-empty-dlldefs.h.patch
@@ -0,0 +1,72 @@
+From: Igor Pashev <pashev.igor@gmail.com>
+Date: Sun, 24 Jun 2012 22:58:54 +0000
+Subject: Mystery: mostly empty dlldefs.h
+
+Without this generated file dlldefs.h does not define required types and
+function (e. g. Dllscan_t). This results in errors:
+
++ mamake -C lib/libdll -k strip=0 install
++ cc -D_BLD_DLL -fPIC -g -O2 -I. -I/var/tmp/ksh-93u+/src/lib/libdll -I/var/tmp/ksh-93u+/arch/sol11.i386/include/ast -D_PACKAGE_ast -D_BLD_dll -c /var/tmp/ksh-93u+/src/lib/libdll/dllplug.c
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c: In function 'dllplugin':
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:41:2: error: unknown type name 'Dllscan_t'
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:42:2: error: unknown type name 'Dllent_t'
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:47:11: warning: assignment makes pointer from integer without a cast [enabled by default]
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:49:15: warning: assignment makes pointer from integer without a cast [enabled by default]
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:55:26: error: request for member 'path' in something not a structure or union
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:55:40: error: 'RTLD_GLOBAL' undeclared (first use in this function)
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:55:40: note: each undeclared identifier is reported only once for each function it appears in
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:55:52: error: 'RTLD_PARENT' undeclared (first use in this function)
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:57:28: error: request for member 'path' in something not a structure or union
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:65:24: error: request for member 'path' in something not a structure or union
+/var/tmp/ksh-93u+/src/lib/libdll/dllplug.c:93:56: error: request for member 'path' in something not a structure or union
+
+When running tests:
++ mamake -C lib/libdll -k strip=0 install
++ set -
++ iffe -v -c cc -D_BLD_DLL -fPIC -g -O2 ref -L. -L/var/tmp/ksh-93u+/arch/sol11.i386/lib -I/var/tmp/ksh-93u+/arch/sol11.i386/include/ast -I/var/tmp/ksh-93u+/arch/sol11.i386/include /var/tmp/ksh-93u+/arch/sol11.i386/lib/libast.a -liconv : run /var/tmp/ksh-93u+/src/lib/libdll/features/dll
+iffe: test: is sys/types.h a header ... yes
+iffe: test: is /var/tmp/ksh-93u+/arch/sol11.i386/lib/libast.a a library ... yes
+iffe: test: is -liconv a library ... yes
+iffe: test: is dl.h a header ... no
+iffe: test: is dlfcn.h a header ... yes
+iffe: test: is dll.h a header ... no
+iffe: test: is rld_interface.h a header ... no
+iffe: test: is mach-o/dyld.h a header ... no
+iffe: test: is sys/ldr.h a header ... no
+iffe: test: is -ldl a library ... yes
+iffe: test: is dlopen a library function ... yes
+iffe: test: is dllload a library function ... no
+iffe: test: is loadbind a library function ... no
+iffe: test: is shl_load a library function ... no
+iffe: test: link{ ... }end ... no
+iffe: test: run{ ... }end ... yes
+iffe: test: output{ ... }end ... no <<<----- HERE !!!
++ cmp -s FEATURE/dll dlldefs.h
++ rm -f dlldefs.h
++ silent test -d .
++ cp FEATURE/dll dlldefs.h
+
+Line marked "HERE !!!" must be 'yes'. This mean dlldefs.h will be
+populated with needed definitions.
+
+It is fixed by removing include directive for ast. I do not know why :-)
+
+One can use this command to investigate it (you need extend
+your PATH variable for iffe):
+---
+ src/lib/libdll/Mamfile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/libdll/Mamfile b/src/lib/libdll/Mamfile
+index 198ac1e..4361ebb 100644
+--- a/src/lib/libdll/Mamfile
++++ b/src/lib/libdll/Mamfile
+@@ -167,7 +167,7 @@ make features/dll
+ done features/dll
+ bind -ldl dontcare
+ bind -last
+-exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdl} ${mam_libast} : run features/dll
++exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${INSTALLROOT}/include ${mam_libdl} ${mam_libast} : run features/dll
+ done FEATURE/dll generated
+ exec - cmp 2>/dev/null -s FEATURE/dll dlldefs.h || { rm -f dlldefs.h; silent test -d . || mkdir .; cp FEATURE/dll dlldefs.h; }
+ done dlldefs.h generated
diff --git a/debian/patches/handle-removed-working-dir.patch b/debian/patches/handle-removed-working-dir.patch
deleted file mode 100644
index 9bf0f4a..0000000
--- a/debian/patches/handle-removed-working-dir.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/src/cmd/ksh93/bltins/cd_pwd.c
-+++ b/src/cmd/ksh93/bltins/cd_pwd.c
-@@ -115,7 +115,18 @@
- if(*(dp=dir+1) == '.')
- dp++;
- if(*dp==0 || *dp=='/')
-+ {
-+ struct stat statb;
-+ if((dp-dir)==2)
-+ {
-+ sfprintf(shp->strbuf,oldpwd);
-+ dp = sfstruse(shp->strbuf);
-+ *strrchr(dp,'/')=0;
-+ if(*dp)
-+ dir = (char*)dp;
-+ }
- cdpath = 0;
-+ }
- }
- rval = -1;
- do
diff --git a/debian/patches/no-rpath.patch b/debian/patches/no-rpath.patch
deleted file mode 100644
index abeb067..0000000
--- a/debian/patches/no-rpath.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/cmd/INIT/make.probe
-+++ b/src/cmd/INIT/make.probe
-@@ -2068,7 +2068,7 @@
- CC_LD_DYNAMIC=$lddynamic
- CC_LD_LAZY=$ldlazy
- CC_LD_NOLAZY=$ldnolazy
--CC_LD_ORIGIN=$ldorigin
-+CC_LD_ORIGIN=
- CC_LD_RECORD=$ldrecord
- CC_LD_NORECORD=$ldnorecord
- CC_LD_RUNPATH=$ldrunpath
diff --git a/debian/patches/series b/debian/patches/series
index 10f9a00..a14e3b0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,6 @@
-shell-options.patch
-cleanup-man-title.patch
-no-rpath.patch
-handle-removed-working-dir.patch
+0001-shell-options.patch
+0002-cleanup-man-title.patch
+0003-no-rpath.patch
+0004-handle-removed-working-dir.patch
+0005-Link-with-libm-to-resovle-symbols-in-suid_exec.patch
+0006-Mystery-mostly-empty-dlldefs.h.patch