pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/netatalk22 Fixes for earlier versions of appletalk...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bb3dcb58c60c
branches:  trunk
changeset: 458307:bb3dcb58c60c
user:      nat <nat%pkgsrc.org@localhost>
date:      Sun Sep 12 15:52:37 2021 +0000

description:
Fixes for earlier versions of appletalk and phase 1 interfaces.

Add option to disable afp session timeouts.
Fix setting of phase1 addresses on NetBSD.
Send replies to client when printing to prompt more data to be sent.

ok markd@.

diffstat:

 net/netatalk22/Makefile                                  |   4 +-
 net/netatalk22/distinfo                                  |  10 +++-
 net/netatalk22/patches/patch-config_afpd.conf.tmpl       |  15 +++++
 net/netatalk22/patches/patch-etc_afpd_afp__options.c     |  16 +++++
 net/netatalk22/patches/patch-etc_atalkd_main.c           |  23 ++++++++
 net/netatalk22/patches/patch-etc_papd_file.c             |  39 ++++++++++++++
 net/netatalk22/patches/patch-etc_papd_file.h             |  16 +++++
 net/netatalk22/patches/patch-etc_papd_magics.c           |  43 ++++++++++++++++
 net/netatalk22/patches/patch-libatalk_asp_asp__getsess.c |  18 ++++++
 net/netatalk22/patches/patch-man_man5_afpd.conf.5.tmpl   |  15 +++++
 10 files changed, 196 insertions(+), 3 deletions(-)

diffs (260 lines):

diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/Makefile
--- a/net/netatalk22/Makefile   Sun Sep 12 14:50:27 2021 +0000
+++ b/net/netatalk22/Makefile   Sun Sep 12 15:52:37 2021 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.39 2021/05/24 19:53:21 wiz Exp $
+# $NetBSD: Makefile,v 1.40 2021/09/12 15:52:37 nat Exp $
 
 DISTNAME=      netatalk-2.2.6
 PKGNAME=       ${DISTNAME:C/-/22-/}
-PKGREVISION=   25
+PKGREVISION=   26
 CATEGORIES=    net print
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=netatalk/}
 EXTRACT_SUFX=  .tar.bz2
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/distinfo
--- a/net/netatalk22/distinfo   Sun Sep 12 14:50:27 2021 +0000
+++ b/net/netatalk22/distinfo   Sun Sep 12 15:52:37 2021 +0000
@@ -1,16 +1,24 @@
-$NetBSD: distinfo,v 1.9 2021/04/02 09:54:26 hauke Exp $
+$NetBSD: distinfo,v 1.10 2021/09/12 15:52:37 nat Exp $
 
 SHA1 (netatalk-2.2.6.tar.bz2) = 98a2d33f2e240e49caec32b83bca579723ce87f7
 RMD160 (netatalk-2.2.6.tar.bz2) = c7b051cf89d30c9bf1d491d9e04ceee2f39b897d
 SHA512 (netatalk-2.2.6.tar.bz2) = 74aa3415a43293a8804b00b0eda564d6536310e59c3f0d067d634db89f4d612a1dfd932df18607c32b948922ae032bc25471e21635ab149a78629ff95c341f47
 Size (netatalk-2.2.6.tar.bz2) = 1301887 bytes
 SHA1 (patch-config_Makefile.in) = e6b020cf4cf11572a648bee7de0937add1948ea8
+SHA1 (patch-config_afpd.conf.tmpl) = 0640c91319d06745664dfe048f7b13d5eeb89d6f
 SHA1 (patch-configure) = 9919625c3cd54e34ab45c6606094e12215630d33
 SHA1 (patch-distrib_initscripts_Makefile.in) = 706890f9e0aacab4d523cc1900048b7fab96f5d4
+SHA1 (patch-etc_afpd_afp__options.c) = 4e21b9701e64aa47cbb707047988be609acfb1cf
+SHA1 (patch-etc_atalkd_main.c) = bdd452b9ca62e506d056e3818fb7f5b54a9d38c5
 SHA1 (patch-etc_cnid_dbd_cmd_dbd_scanvol.c) = df844b4047e614a3fd44cbcea252627f6fe43b65
+SHA1 (patch-etc_papd_file.c) = 8d050430e8013501230462375c874c8188f12e73
+SHA1 (patch-etc_papd_file.h) = 2464cc27385a8300f8cc3503643db4512d5f368f
+SHA1 (patch-etc_papd_magics.c) = e1d0a871de6cb567e9d98fa428aa560f6203c89c
 SHA1 (patch-etc_papd_print_cups.c) = 8dada275f9525b9229a85492050de982b1e54295
 SHA1 (patch-etc_uams_uams__dhx__pam.c) = 8ed99ff32ca932367c5df7af6889db1abbde7a2e
 SHA1 (patch-etc_uams_uams__dhx__passwd.c) = 52e2862aa55268349dfc64a7d71ebc17e1b8830b
 SHA1 (patch-etc_uams_uams__randnum.c) = 0608eb6a7b43b0cc360879849c9ca0b38ffdc684
 SHA1 (patch-include_atalk_ldapconfig.h) = e69d212f45ace23773d15c122ca2e550b025f845
+SHA1 (patch-libatalk_asp_asp__getsess.c) = 398cf1b4cadecb96a0a25a50255a5516ba62a0d7
 SHA1 (patch-libatalk_bstring_bstrlib.c) = f43818328237b908166f956de464f532d578d2c4
+SHA1 (patch-man_man5_afpd.conf.5.tmpl) = 33597b5f1bb98c17f9a94d2d33549541690aedfd
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/patches/patch-config_afpd.conf.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk22/patches/patch-config_afpd.conf.tmpl        Sun Sep 12 15:52:37 2021 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-config_afpd.conf.tmpl,v 1.1 2021/09/12 15:52:37 nat Exp $
+
+Allow -1 as a vaild tickleval to disable session tickles.
+As needed on appletalk 58.
+
+--- config/afpd.conf.tmpl.orig 2014-03-16 11:17:48.000000000 +0000
++++ config/afpd.conf.tmpl
+@@ -175,6 +175,7 @@
+ #                         Note, this defaults to 30 seconds, and really 
+ #                         shouldn't be changed.  If you want to control
+ #                         the server idle timeout, use the -timeout option.
++#                        A value of -1 disables session timer tickles.
+ #     -timeout <number>   Specify the number of tickles to send before
+ #                         timing out a connection.
+ #                         The default is 4, therefore a connection will
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/patches/patch-etc_afpd_afp__options.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk22/patches/patch-etc_afpd_afp__options.c      Sun Sep 12 15:52:37 2021 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-etc_afpd_afp__options.c,v 1.1 2021/09/12 15:52:37 nat Exp $
+
+Allow -1 as a vaild tickleval to disable session tickles.
+As needed on appletalk 58.
+
+--- etc/afpd/afp_options.c.orig        2014-03-16 11:17:48.000000000 +0000
++++ etc/afpd/afp_options.c
+@@ -318,7 +318,7 @@ int afp_options_parseline(char *buf, str
+         options->loginmaxfail = atoi(c);
+     if ((c = getoption(buf, "-tickleval"))) {
+         options->tickleval = atoi(c);
+-        if (options->tickleval <= 0) {
++        if (options->tickleval != -1 && options->tickleval <= 0) {
+             options->tickleval = 30;
+         }
+     }
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/patches/patch-etc_atalkd_main.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk22/patches/patch-etc_atalkd_main.c    Sun Sep 12 15:52:37 2021 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-etc_atalkd_main.c,v 1.1 2021/09/12 15:52:37 nat Exp $
+
+Set interface address correctly for phase 1 networks on NetBSD.
+
+NB: This is a kludge that should not be required.
+
+--- etc/atalkd/main.c.orig     2017-07-09 11:03:31.000000000 +0000
++++ etc/atalkd/main.c
+@@ -1228,8 +1228,14 @@ void bootaddr(struct interface *iface)
+     }
+ 
+     if ( iface->i_flags & IFACE_PHASE1 ) {
++#ifndef __NetBSD__
+       setaddr( iface, IFACE_PHASE1, 0,
+               iface->i_caddr.sat_addr.s_node, 0, 0 );
++#else
++       setaddr( iface, IFACE_PHASE1, iface->i_caddr.sat_addr.s_net,
++              iface->i_caddr.sat_addr.s_node,
++              iface->i_rt->rt_firstnet, iface->i_rt->rt_lastnet );
++#endif
+ 
+       if ( iface->i_flags & IFACE_LOOPBACK ) {
+           iface->i_flags |= IFACE_CONFIG | IFACE_ADDR;
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/patches/patch-etc_papd_file.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk22/patches/patch-etc_papd_file.c      Sun Sep 12 15:52:37 2021 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-etc_papd_file.c,v 1.1 2021/09/12 15:52:37 nat Exp $
+
+Introdtuce spoolreply() for sending a response back to the client.
+
+Required to request more data for printing.
+XXX: AFAICT this should work in all cases.
+
+--- etc/papd/file.c.orig       2014-03-16 11:17:48.000000000 +0000
++++ etc/papd/file.c
+@@ -40,7 +40,7 @@ int markline( struct papfile *pf, char *
+     if ( *linelength >= pf->pf_datalen ) {
+       if ( pf->pf_state & PF_EOF ) {
+           append( pf, "\n", 1 );
+-      } else if (*linelength < 1024) {
++      } else {
+           return( -1 );
+       }
+     }
+@@ -107,6 +107,20 @@ void append(struct papfile *pf, const ch
+ }
+ 
+ 
++void spoolreply(struct papfile *out, char *str)
++{
++    char      *pserr1 = "%%[ status: ";
++    char      *pserr2 = " ]%%\n";
++
++    if ( str == NULL ) {
++      str = "Spooler error.";
++    }
++
++    append( out, pserr1, strlen( pserr1 ));
++    append( out, str, strlen( str ));
++    append( out, pserr2, strlen( pserr2 ));
++}
++
+ void spoolerror(struct papfile *out, char *str)
+ {
+     char      *pserr1 = "%%[ Error: ";
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/patches/patch-etc_papd_file.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk22/patches/patch-etc_papd_file.h      Sun Sep 12 15:52:37 2021 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-etc_papd_file.h,v 1.1 2021/09/12 15:52:37 nat Exp $
+
+Introdtuce spoolreply() for sending a response back to the client.
+
+Required to request more data for printing.
+XXX: AFAICT this should work in all cases.
+
+--- etc/papd/file.h.orig       2014-03-16 11:17:48.000000000 +0000
++++ etc/papd/file.h
+@@ -40,5 +40,6 @@ int markline ( struct papfile *, char **
+ void morespace ( struct papfile *, const char *, int );
+ void append ( struct papfile *, const char *, int );
+ void spoolerror ( struct papfile *, char * );
++void spoolreply ( struct papfile *, char * );
+ 
+ #endif /* PAPD_FILE_H */
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/patches/patch-etc_papd_magics.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk22/patches/patch-etc_papd_magics.c    Sun Sep 12 15:52:37 2021 +0000
@@ -0,0 +1,43 @@
+$NetBSD: patch-etc_papd_magics.c,v 1.1 2021/09/12 15:52:37 nat Exp $
+
+Send a reply when more data required by papd server.
+As required by appletalk 58.
+
+Also prevent an erronous return value from ps().
+
+AFAICT this should have no consequence on later appletalk versions.
+
+--- etc/papd/magics.c.orig     2014-03-16 11:17:48.000000000 +0000
++++ etc/papd/magics.c
+@@ -74,6 +74,7 @@ int ps( struct papfile *infile, struct p
+               return( 0 );
+ 
+           case -1 :
++              spoolreply( outfile, "Processing..." );
+               return( 0 );
+           }
+ 
+@@ -98,6 +99,7 @@ int ps( struct papfile *infile, struct p
+           CONSUME( infile, linelength + crlflength );
+       }
+     }
++    return 0;
+ }
+ 
+ int cm_psquery( struct papfile *in, struct papfile *out, struct sockaddr_at *sat _U_)
+@@ -115,6 +117,7 @@ int cm_psquery( struct papfile *in, stru
+           return( CH_DONE );
+ 
+       case -1 :
++          spoolreply( out, "Processing..." );
+           return( CH_MORE );
+ 
+         case -2 :
+@@ -149,6 +152,7 @@ int cm_psadobe( struct papfile *in, stru
+           return( CH_DONE );
+ 
+       case -1 :
++          spoolreply( out, "Processing..." );
+           return( CH_MORE );
+ 
+         case -2 :
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/patches/patch-libatalk_asp_asp__getsess.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk22/patches/patch-libatalk_asp_asp__getsess.c  Sun Sep 12 15:52:37 2021 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-libatalk_asp_asp__getsess.c,v 1.1 2021/09/12 15:52:37 nat Exp $
+
+Allow -1 as a vaild tickleval to disable session tickles.
+As needed on appletalk 58.
+
+--- libatalk/asp/asp_getsess.c.orig    2014-09-01 17:19:35.000000000 +0000
++++ libatalk/asp/asp_getsess.c
+@@ -163,8 +163,8 @@ ASP asp_getsession(ASP asp, server_child
+ 
+       timer.it_interval.tv_sec = timer.it_value.tv_sec = tickleval;
+       timer.it_interval.tv_usec = timer.it_value.tv_usec = 0;
+-      if ((sigaction(SIGALRM, &action, NULL) < 0) ||
+-        (setitimer(ITIMER_REAL, &timer, NULL) < 0)) {
++      if (tickleval != -1 && ((sigaction(SIGALRM, &action, NULL) < 0) ||
++        (setitimer(ITIMER_REAL, &timer, NULL) < 0))) {
+       free(asp_ac);
+       server_asp = NULL;
+       asp_ac = NULL;
diff -r c86104596c06 -r bb3dcb58c60c net/netatalk22/patches/patch-man_man5_afpd.conf.5.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk22/patches/patch-man_man5_afpd.conf.5.tmpl    Sun Sep 12 15:52:37 2021 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-man_man5_afpd.conf.5.tmpl,v 1.1 2021/09/12 15:52:37 nat Exp $
+
+Allow -1 as a vaild tickleval to disable session tickles.
+As needed on appletalk 58.
+
+--- man/man5/afpd.conf.5.tmpl.orig     2014-04-08 08:47:12.000000000 +0000
++++ man/man5/afpd.conf.5.tmpl
+@@ -598,6 +598,7 @@ These options are useful for debugging o
+ \-tickleval \fI[number]\fR
+ .RS 4
+ Sets the tickle timeout interval (in seconds)\&. Defaults to 30\&.
++A value of -1 disables session tickles.
+ .RE
+ .PP
+ \-timeout \fI[number]\fR



Home | Main Index | Thread Index | Old Index