Port patches from Debian (BZ#1716106)

Requires lrzsz
This commit is contained in:
Robin Lee 2019-06-13 16:41:47 +08:00
parent 7acebd4af5
commit d384ba9703
9 changed files with 293 additions and 8 deletions

View File

@ -0,0 +1,82 @@
From: Bart Martens <bart.martens@advalvas.be>
Date: Tue, 17 Jan 2006 00:23:59 +0100
Subject: Remove build instruction about lrzsz.
Now that we have removed bundled lrzsz in source tarball, the package's
build instrctions need patching as well.
---
Makefile.in | 20 ++------------------
fake_readline/Makefile.in | 2 +-
test/Makefile.in | 4 ++--
3 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 92c7254..6e46a93 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -86,21 +86,6 @@ uninstall :
fake_readline : force
-cd fake_readline && $(MAKE)
-lrzsz :
- cd lrzsz-0.12.20 && ./configure --prefix=@prefix@
- cd lrzsz-0.12.20 && $(MAKE)
-
-lrzsz_links :
- ln -s @bindir@/lrz @bindir@/rz
- ln -s @bindir@/lsz @bindir@/sz
- ln -s @bindir@/lrb @bindir@/rb
- ln -s @bindir@/lsb @bindir@/sb
- ln -s @bindir@/lrx @bindir@/rx
- ln -s @bindir@/lsx @bindir@/sx
-
-lrzsz_install :
- cd lrzsz-0.12.20 && $(MAKE) install
-
# create source archive in ~/backup
tgz $(TGZ) : distclean force
@cdir=`pwd` && cdir=`basename $$cdir` && cd .. && \
@@ -136,11 +121,10 @@ TAGS :
new : clean all
clean :
- -rm *.o *~ *.a \#*\# core $(PRGS) typescript nohup.out $(RPMSPEC) $(BACKLINK)
+ -rm -f *.o *~ *.a \#*\# core $(PRGS) typescript nohup.out $(RPMSPEC) $(BACKLINK)
distclean : clean
- -rm Makefile config.cache config.status config.log config.scan config.h TAGS
- -(cd lrzsz-0.12.20 && $(MAKE) distclean)
+ -rm -f Makefile config.cache config.status config.log config.scan config.h TAGS
-(cd fake_readline && $(MAKE) distclean)
-(cd test && $(MAKE) distclean)
diff --git a/fake_readline/Makefile.in b/fake_readline/Makefile.in
index 77eca27..1134a5c 100644
--- a/fake_readline/Makefile.in
+++ b/fake_readline/Makefile.in
@@ -28,7 +28,7 @@ new : clean all
clean :
- -rm *.o *~ *.a \#*\# core $(NAME) typescript nohup.out
+ -rm -f *.o *~ *.a \#*\# core $(NAME) typescript nohup.out
distclean : clean
diff --git a/test/Makefile.in b/test/Makefile.in
index 30f6dc1..7d8671f 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -68,10 +68,10 @@ TAGS :
new : clean all
clean :
- -rm *.o *~ *.a \#*\# core $(PRGS) typescript nohup.out $(RPMSPEC) $(BACKLINK) output.*
+ -rm -f *.o *~ *.a \#*\# core $(PRGS) typescript nohup.out $(RPMSPEC) $(BACKLINK) output.*
distclean : clean
- -rm Makefile config.cache config.status config.log config.scan config.h TAGS
+ -rm -f Makefile config.cache config.status config.log config.scan config.h TAGS
autoconf:
autoconf

View File

@ -0,0 +1,27 @@
From: Bart Martens <bartm@knars.be>
Date: Sun, 20 May 2007 11:00:41 +0200
Subject: Install files into under $(DESTDIR).
This patch forces all installed files under $(DESTDIR) to cooperate
with Debian's build system.
---
Makefile.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 6e46a93..69f68d7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -75,9 +75,9 @@ ztelnet : $(NAME)
install :
strip $(NAME)
- $(INSTALL) -m 0711 zssh @bindir@
- ln -f @bindir@/zssh @bindir@/ztelnet
- $(INSTALL) -m 0644 $(MANS) @mandir@/man1
+ $(INSTALL) -m 0711 zssh $(DESTDIR)/@bindir@
+ ln -f $(DESTDIR)/@bindir@/zssh $(DESTDIR)/@bindir@/ztelnet
+ $(INSTALL) -m 0644 $(MANS) $(DESTDIR)/@mandir@/man1
uninstall :
-cd @bindir@ && rm $(PRGS)

View File

@ -0,0 +1,21 @@
From: Bart Martens <bartm@knars.be>
Date: Sun, 20 May 2007 11:00:41 +0200
Subject: Do not symlink zssh to ztelnet
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 69f68d7..51f60c0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -76,7 +76,7 @@ ztelnet : $(NAME)
install :
strip $(NAME)
$(INSTALL) -m 0711 zssh $(DESTDIR)/@bindir@
- ln -f $(DESTDIR)/@bindir@/zssh $(DESTDIR)/@bindir@/ztelnet
+ #ln -f $(DESTDIR)/@bindir@/zssh $(DESTDIR)/@bindir@/ztelnet
$(INSTALL) -m 0644 $(MANS) $(DESTDIR)/@mandir@/man1
uninstall :

View File

@ -0,0 +1,53 @@
From: Ben Wong <ben@wongs.net>
Date: Tue, 25 Sep 2007 01:48:30 -0700
Subject: Use GNU openpty library for pty.h
---
configure.in | 11 +++++++++--
openpty.c | 4 ++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index a8f1441..af2cad0 100644
--- a/configure.in
+++ b/configure.in
@@ -57,7 +57,7 @@ AC_CONFIG_HEADER(config.h)
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h termios.h unistd.h \
- err.h sys/cdefs.h sys/param.h util.h stropts.h)
+ err.h sys/cdefs.h sys/param.h util.h stropts.h pty.h)
@@ -97,7 +97,14 @@ AC_CHECK_FUNCS(strdup getpt isastream tcsetpgrp)
dnl Check what is available for tty/pty allocation
-AC_CHECK_FUNCS(_getpty getpseudotty openpty grantpt unlockpt)
+AC_CHECK_FUNCS(_getpty getpseudotty grantpt unlockpt)
+AC_CHECK_FUNCS(openpty,,
+ [AC_CHECK_LIB(util,openpty,
+ [AC_DEFINE(HAVE_OPENPTY)
+ LIBS="$LIBS -lutil"]
+ )])
+
+
AC_MSG_CHECKING(for pseudo ttys)
if test -c /dev/getpty && test $ac_cv_func_getpseudotty = yes
then
diff --git a/openpty.c b/openpty.c
index 42cb203..0b8a642 100644
--- a/openpty.c
+++ b/openpty.c
@@ -25,6 +25,10 @@ static char gl_slavename[GL_SLAVENAMELEN + 1] = {0};
#include <util.h>
#endif
+#ifdef HAVE_PTY_H
+#include <pty.h>
+#endif
+
void getmaster()
{
#ifdef DEBUG

View File

@ -0,0 +1,23 @@
From: Ben Wong <ben@wongs.net>
Date: Tue, 25 Sep 2007 01:48:30 -0700
Subject: Do not call strip in build process
This is handled later in Debian build system by debhelper.
This closes #438380.
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 51f60c0..6f5542c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -74,7 +74,7 @@ ztelnet : $(NAME)
ln $(NAME) $@
install :
- strip $(NAME)
+ #strip $(NAME)
$(INSTALL) -m 0711 zssh $(DESTDIR)/@bindir@
#ln -f $(DESTDIR)/@bindir@/zssh $(DESTDIR)/@bindir@/ztelnet
$(INSTALL) -m 0644 $(MANS) $(DESTDIR)/@mandir@/man1

View File

@ -0,0 +1,22 @@
From: YuanQing Su <syq@debian.org>
Date: Mon, 21 Jul 2014 08:22:29 +0000
Subject: replace CPPFunction call with rl_completion_func_t
This closes #741761.
---
completion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/completion.c b/completion.c
index 98e714a..de44329 100644
--- a/completion.c
+++ b/completion.c
@@ -53,7 +53,7 @@ void initialize_readline()
so that if zssh_completion() fails nothing is completed */
rl_completion_entry_function = fake_generator;
/* Tell the completer that we want a crack first. */
- rl_attempted_completion_function = (CPPFunction *) zssh_completion;
+ rl_attempted_completion_function = (rl_completion_func_t *) zssh_completion;
}

View File

@ -0,0 +1,21 @@
From: Boyuan Yang <073plan@gmail.com>
Date: Fri, 22 Dec 2017 10:31:58 +0800
Subject: Fix typo in man page zssh.1
---
zssh.1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zssh.1 b/zssh.1
index 1a2ef44..c7e404f 100644
--- a/zssh.1
+++ b/zssh.1
@@ -227,7 +227,7 @@ Other arguments are passed verbatim to ssh/telnet/whatever.
.TP 10
.B ZSSHESCAPE
-Setting the ZSSHESCAPE environment variable allows to override the default
+Setting the ZSSHESCAPE environment variable allows one to override the default
escape sequence. ZSSHESCAPE should contain only two characters of the form
`^X', meaning that ^X is to be the new escape sequence.

View File

@ -0,0 +1,21 @@
From: Reiner Herrmann <reiner@reiner-h.de>
Date: Fri, 22 Dec 2017 10:40:03 +0800
Subject: Strip build date from version string to enable reproducible building
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 6f5542c..db0ba38 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -110,7 +110,7 @@ $(RPMSPEC) : $(RPMSPEC:.spec=.spec.tpl)
version.h : force
- echo '#define ZSSH_VERSION "' `cat VERSION` ', built' `date` '"' > version.h
+ echo '#define ZSSH_VERSION "' `cat VERSION` '"' > version.h
fun.h : $(SRC)
protos -o fun.h $(SRC)

View File

@ -1,39 +1,54 @@
Name: zssh
Version: 1.5c
Release: 3%{?dist}
Release: 4%{?dist}
Summary: SSH and Telnet client with ZMODEM file transfer capability
License: GPLv3
URL: http://zssh.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/zssh/zssh/1.5/%{name}-%{version}.tgz
# patches from https://sources.debian.org/patches/zssh/1.5c.debian.1-7/
Patch0: https://sources.debian.org/data/main/z/zssh/1.5c.debian.1-7/debian/patches/0001-Remove-build-instruction-about-lrzsz.patch
Patch1: https://sources.debian.org/data/main/z/zssh/1.5c.debian.1-7/debian/patches/0002-Install-files-into-under-DESTDIR.patch
Patch2: https://sources.debian.org/data/main/z/zssh/1.5c.debian.1-7/debian/patches/0003-Do-not-symlink-zssh-to-ztelnet.patch
Patch3: https://sources.debian.org/data/main/z/zssh/1.5c.debian.1-7/debian/patches/0004-Use-GNU-openpty-library-for-pty.h.patch
Patch4: https://sources.debian.org/data/main/z/zssh/1.5c.debian.1-7/debian/patches/0005-Do-not-call-strip-in-build-process.patch
Patch5: https://sources.debian.org/data/main/z/zssh/1.5c.debian.1-7/debian/patches/0006-replace-CPPFunction-call-with-rl_completion_func_t.patch
Patch6: https://sources.debian.org/data/main/z/zssh/1.5c.debian.1-7/debian/patches/0007-Fix-typo-in-man-page-zssh.1.patch
Patch7: https://sources.debian.org/data/main/z/zssh/1.5c.debian.1-7/debian/patches/0008-Strip-build-date-from-version-string-to-enable-repro.patch
BuildRequires: gcc
BuildRequires: readline-devel
BuildRequires: libtermcap-devel
BuildRequires: autoconf
Requires: lrzsz
%description
%{summary}.
%prep
%setup -q
%autosetup -p1
# remove bundled lrzsz
rm -fr lrzsz-0.12.20
%build
autoconf
%configure
%make_build
%install
install -Dm 0755 %{name} %{buildroot}%{_bindir}/%{name}
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/ztelnet
install -Dm 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
install -Dm 0644 ztelnet.1 %{buildroot}%{_mandir}/man1/ztelnet.1
mkdir -p %{buildroot}%{_bindir}/ %{buildroot}%{_mandir}/man1/
%make_install
rm %{buildroot}%{_mandir}/man1/ztelnet.1*
%files
%doc README
%license COPYING
%{_bindir}/%{name}
%{_bindir}/ztelnet
%{_mandir}/man1/%{name}.1.*
%{_mandir}/man1/ztelnet.1.*
%changelog
* Thu Jun 13 2019 Robin Lee <cheeselee@fedoraproject.org> - 1.5c-4
- Port patches from Debian (BZ#1716106)
- Requires lrzsz
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5c-3
- Rebuild for readline 8.0