Menu

[r8173]: / trunk / patches / ports-netatalk.patch  Maximize  Restore  History

Download this file

1025 lines (1011 with data), 38.1 kB

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
Index: net/netatalk/Makefile
===================================================================
RCS file: /home/ncvs/ports/net/netatalk/Makefile,v
retrieving revision 1.96
diff -u -r1.96 Makefile
--- net/netatalk/Makefile 3 Jul 2011 11:40:45 -0000 1.96
+++ net/netatalk/Makefile 6 Oct 2011 23:55:52 -0000
@@ -2,15 +2,15 @@
# Date created: 23 Jul 1997
# Whom: stb
#
-# $FreeBSD: ports/net/netatalk/Makefile,v 1.96 2011/07/03 11:40:45 swills Exp $
+# $FreeBSD: ports/net/netatalk/Makefile,v 1.101 2011/08/14 17:17:28 marcus Exp $
#
PORTNAME= netatalk
-PORTVERSION= 2.1.5
-PORTREVISION= 2
+PORTVERSION= 2.2.0
+PORTREVISION= 4
PORTEPOCH= 1
CATEGORIES= net print
-MASTER_SITES= SF
+MASTER_SITES= SF/netatalk/netatalk/2.2
MAINTAINER= marcus@FreeBSD.org
COMMENT= File server for Mac OS X
@@ -24,6 +24,7 @@
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_PERL5= yes
+WANT_GNOME= yes
USE_RC_SUBR= netatalk
CONFIGURE_ARGS+= --with-tcp-wrappers \
@@ -37,24 +38,21 @@
SRVLOC "Enable Service Location Protocol support" off \
PAM "Enable PAM support" off \
TIMELORD "Enable Timelord network time service" off \
- KRB5 "Enable Kerberos V UAM" off
+ KRB5 "Enable Kerberos V UAM" off \
+ ZEROCONF "Enable Zeroconf (Bonjour) support" on
FILES= AppleVolumes.default AppleVolumes.system afpd.conf \
atalkd.conf papd.conf netatalk.conf
LINKS= unbin unhex unsingle hqx2bin single2bin macbinary \
binheader nadheader
-MAN1= achfile.1 ad.1 aecho.1 afile.1 afppasswd.1 apple_cp.1 \
- apple_dump.1 apple_mv.1 apple_rm.1 asip-status.pl.1 dbd.1 \
- getzones.1 hqx2bin.1 macbinary.1 megatron.1 nbp.1 nbplkup.1 \
- nbprgstr.1 nbpunrgstr.1 netatalk-config.1 pap.1 papstatus.1 \
- psorder.1 single2bin.1 unbin.1 unhex.1 uniconv.1 unsingle.1
-MAN3= atalk_aton.3 nbp_name.3
-MAN4= atalk.4
+MAN1= ad.1 afpldaptest.1 afppasswd.1 apple_dump.1 asip-status.pl.1 \
+ dbd.1 hqx2bin.1 macbinary.1 megatron.1 \
+ netatalk-config.1 single2bin.1 unbin.1 unhex.1 uniconv.1 \
+ unsingle.1
MAN5= AppleVolumes.5 AppleVolumes.default.5 \
AppleVolumes.system.5 afp_ldap.conf.5 afp_signature.conf.5 \
- afpd.conf.5 atalkd.conf.5 netatalk.conf.5 papd.conf.5
-MAN8= afp_acls.8 afpd.8 atalkd.8 cnid_dbd.8 cnid_metad.8 papd.8 \
- papstatus.8 psf.8 timelord.8
+ afp_voluuid.conf.5 afpd.conf.5 netatalk.conf.5
+MAN8= afpd.8 cnid_dbd.8 cnid_metad.8 timelord.8
CONFLICTS= bigloo-2.* cap-6.0.* tct-1.* netatalk-1* yudit-[0-9]*
@@ -68,9 +66,16 @@
.endif
.if defined(WITH_APPLETALK)
-CONFIGURE_ARGS+= --with-ddp
+CONFIGURE_ARGS+= --enable-ddp
+PLIST_SUB+= APPLETALK=""
+MAN1+= aecho.1 getzones.1 nbp.1 nbplkup.1 nbprgstr.1 \
+ nbpunrgstr.1 pap.1 papstatus.1 psorder.1
+MAN3+= atalk_aton.3 nbp_name.3
+MAN4+= atalk.4
+MAN5+= atalkd.conf.5 papd.conf.5
+MAN8+= atalkd.8 papd.8 papstatus.8 psf.8
.else
-CONFIGURE_ARGS+= --without-ddp
+PLIST_SUB+= APPLETALK="@comment "
.endif
.if defined(WITH_PAM)
@@ -96,9 +101,25 @@
PLIST_SUB+= TIMELORD="@comment "
.endif
+.if defined (WITH_ZEROCONF)
+CONFIGURE_ARGS+= --enable-zeroconf=${LOCALBASE}
+LIB_DEPENDS+= avahi-client.3:${PORTSDIR}/net/avahi-app
+USE_GNOME+= pkgconfig
+SUB_LIST+= ZEROCONF="avahi_daemon"
+.else
+SUB_LIST+= ZEROCONF=""
+.endif
+
+.if ${OSVERSION} < 800031
+PLIST_SUB+= ATFUNCS="@comment "
+.else
+PLIST_SUB+= ATFUNCS=""
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|%%DB_NAME%%|${BDB_INCLUDE_DIR:T}| ; \
- s|%%DB_LIB%%|-l${BDB_LIB_NAME}|g' \
+ s|%%DB_LIB%%|-l${BDB_LIB_NAME}|g ; \
+ s|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/configure
post-install:
Index: net/netatalk/distinfo
===================================================================
RCS file: /home/ncvs/ports/net/netatalk/distinfo,v
retrieving revision 1.30
diff -u -r1.30 distinfo
--- net/netatalk/distinfo 29 Dec 2010 04:36:17 -0000 1.30
+++ net/netatalk/distinfo 6 Oct 2011 23:55:52 -0000
@@ -1,2 +1,2 @@
-SHA256 (netatalk-2.1.5.tar.bz2) = 11fcce36cc5179de60c5c0b10032ff9e042ed8b8c6e0b99d2d7200c8d0749038
-SIZE (netatalk-2.1.5.tar.bz2) = 1125946
+SHA256 (netatalk-2.2.0.tar.bz2) = 31bf7c1ea311f876d9be6d4be9faed24d170a89e6ce692304fc2cb525f25143b
+SIZE (netatalk-2.2.0.tar.bz2) = 1216174
Index: net/netatalk/pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net/netatalk/pkg-plist,v
retrieving revision 1.31
diff -u -r1.31 pkg-plist
--- net/netatalk/pkg-plist 2 Jun 2010 14:46:42 -0000 1.31
+++ net/netatalk/pkg-plist 6 Oct 2011 23:55:52 -0000
@@ -1,20 +1,15 @@
-bin/achfile
-bin/ad
+%%ATFUNCS%%bin/ad
bin/add_netatalk_printer
bin/adv1tov2
-bin/aecho
-bin/afile
+%%APPLETALK%%bin/aecho
+bin/afpldaptest
bin/afppasswd
-bin/apple_cp
bin/apple_dump
-bin/apple_mv
-bin/apple_rm
bin/binheader
bin/asip-status.pl
bin/cnid2_create
bin/dbd
-bin/getzones
-bin/logger_test
+%%APPLETALK%%bin/getzones
bin/macusers
bin/megatron
@exec cd %B && ln -s megatron hqx2bin
@@ -31,14 +26,13 @@
@unexec rm -f %B/unbin
@unexec rm -f %B/unhex
@unexec rm -f %B/unsingle
-bin/nbplkup
-bin/nbprgstr
-bin/nbpunrgstr
-bin/netacnv
+%%APPLETALK%%bin/nbplkup
+%%APPLETALK%%bin/nbprgstr
+%%APPLETALK%%bin/nbpunrgstr
bin/netatalk-config
-bin/pap
-bin/papstatus
-bin/psorder
+%%APPLETALK%%bin/pap
+%%APPLETALK%%bin/papstatus
+%%APPLETALK%%bin/psorder
bin/showppd
bin/uniconv
@unexec if cmp -s %D/etc/AppleVolumes.default %D/etc/AppleVolumes.default.dist; then rm -f %D/etc/AppleVolumes.default; fi
@@ -50,15 +44,18 @@
@unexec if cmp -s %D/etc/afpd.conf %D/etc/afpd.conf.dist; then rm -f %D/etc/afpd.conf; fi
etc/afpd.conf.dist
@exec [ ! -f %B/afpd.conf ] && cp %B/%f %B/afpd.conf
-@unexec if cmp -s %D/etc/atalkd.conf %D/etc/atalkd.conf.dist; then rm -f %D/etc/atalkd.conf; fi
-etc/atalkd.conf.dist
-@exec [ ! -f %B/atalkd.conf ] && cp %B/%f %B/atalkd.conf
+@unexec if cmp -s %D/etc/afp_ldap.conf %D/etc/afp_ldap.conf.dist; then rm -f %D/etc/afp_ldap.conf; fi
+etc/afp_ldap.conf.dist
+@exec [ ! -f %B/afp_ldap.conf ] && cp %B/%f %B/afp_ldap.conf
+%%APPLETALK%%@unexec if cmp -s %D/etc/atalkd.conf %D/etc/atalkd.conf.dist; then rm -f %D/etc/atalkd.conf; fi
+%%APPLETALK%%etc/atalkd.conf.dist
+%%APPLETALK%%@exec [ ! -f %B/atalkd.conf ] && cp %B/%f %B/atalkd.conf
@unexec if cmp -s %D/etc/netatalk.conf %D/etc/netatalk.conf.dist; then rm -f %D/etc/netatalk.conf; fi
etc/netatalk.conf.dist
@exec [ ! -f %B/netatalk.conf ] && cp %B/%f %B/netatalk.conf
@unexec if cmp -s %D/etc/papd.conf %D/etc/papd.conf.dist; then rm -f %D/etc/papd.conf; fi
-etc/papd.conf.dist
-@exec [ ! -f %B/papd.conf ] && cp %B/%f %B/papd.conf
+%%APPLETALK%%etc/papd.conf.dist
+%%APPLETALK%%@exec [ ! -f %B/papd.conf ] && cp %B/%f %B/papd.conf
libexec/netatalk-uams/uams_clrtxt.so
libexec/netatalk-uams/uams_dhx.so
libexec/netatalk-uams/uams_dhx2.so
@@ -108,6 +105,7 @@
include/atalk/logger.h
include/atalk/nbp.h
include/atalk/netddp.h
+include/atalk/queue.h
include/atalk/pap.h
include/atalk/paths.h
include/atalk/rtmp.h
@@ -146,7 +144,7 @@
libexec/ofwmpap
libexec/ofwpap
libexec/psa
-libexec/psf
+%%APPLETALK%%libexec/psf
libexec/tfmpap
libexec/tfmpaprev
libexec/tfpap
@@ -156,10 +154,10 @@
libexec/tfwpap
libexec/tfwpaprev
sbin/afpd
-sbin/atalkd
+%%APPLETALK%%sbin/atalkd
sbin/cnid_dbd
sbin/cnid_metad
-sbin/papd
+%%APPLETALK%%sbin/papd
%%TIMELORD%%sbin/timelord
share/aclocal/netatalk.m4
%%DATADIR%%/pagecount.ps
Index: net/netatalk/files/netatalk.in
===================================================================
RCS file: /home/ncvs/ports/net/netatalk/files/netatalk.in,v
retrieving revision 1.3
diff -u -r1.3 netatalk.in
--- net/netatalk/files/netatalk.in 27 Mar 2010 00:13:49 -0000 1.3
+++ net/netatalk/files/netatalk.in 6 Oct 2011 23:55:52 -0000
@@ -1,9 +1,9 @@
#!/bin/sh
#
-# $FreeBSD: ports/net/netatalk/files/netatalk.in,v 1.3 2010/03/27 00:13:49 dougb Exp $
+# $FreeBSD: ports/net/netatalk/files/netatalk.in,v 1.4 2011/08/14 17:17:28 marcus Exp $
#
# PROVIDE: atalkd papd cnid_metad timelord afpd
-# REQUIRE: DAEMON %%SRVLOC%%
+# REQUIRE: DAEMON %%SRVLOC%% %%ZEROCONF%%
# KEYWORD: shutdown
#
# AppleTalk daemons. Make sure not to start atalkd in the background:
Index: net/netatalk/files/patch-config_netatalk.conf
===================================================================
RCS file: /home/ncvs/ports/net/netatalk/files/patch-config_netatalk.conf,v
retrieving revision 1.3
diff -u -r1.3 patch-config_netatalk.conf
--- net/netatalk/files/patch-config_netatalk.conf 30 May 2010 17:03:17 -0000 1.3
+++ net/netatalk/files/patch-config_netatalk.conf 6 Oct 2011 23:55:52 -0000
@@ -1,43 +1,20 @@
---- config/netatalk.conf.orig 2010-04-19 11:35:26.000000000 +0000
-+++ config/netatalk.conf 2010-05-20 19:14:32.000000000 +0000
+--- config/netatalk.conf.orig 2011-07-22 00:30:42.000000000 -0400
++++ config/netatalk.conf 2011-07-30 18:01:04.000000000 -0400
@@ -1,4 +1,5 @@
-# Netatalk configuration
+# netatalk configuration
+# For details see man netatalk.conf
- # Change this to increase the maximum number of clients that can connect:
- AFPD_MAX_CLIENTS=20
-@@ -6,7 +7,7 @@
- # NOTE: if your zone has spaces in it, you're better off specifying
- # it in afpd.conf
- #ATALK_ZONE=@zone
--ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
-+ATALK_NAME=`/bin/hostname -s`
+ #########################################################################
+ # Global configuration
+@@ -21,8 +22,8 @@ export ATALK_MAC_CHARSET
- # specify the Mac and unix charsets to be used
- ATALK_MAC_CHARSET='MAC_ROMAN'
-@@ -20,24 +21,5 @@
- # Change this to set the id of the guest user
- AFPD_GUEST=nobody
-
--# Set which daemons to run.
--# If you need legacy AppleTalk, run atalkd.
--# papd, timelord and a2boot are dependent upon atalkd.
--# If you use "AFP over TCP" server only, run only cnid_metad and afpd.
--ATALKD_RUN=no
--PAPD_RUN=no
--TIMELORD_RUN=no
--A2BOOT_RUN=no
+ #### Set which daemons to run.
+ #### If you use AFP file server, run both cnid_metad and afpd.
-CNID_METAD_RUN=yes
-AFPD_RUN=yes
--
--# Control whether the daemons are started in the background.
--# If it is dissatisfied that atalkd starts slowly, set "yes".
--ATALK_BGROUND=no
--
--# export the charsets, read form ENV by apps
--export ATALK_MAC_CHARSET
--export ATALK_UNIX_CHARSET
--
- # config for cnid_metad. Default log config:
- # CNID_CONFIG="-l log_note"
++#CNID_METAD_RUN=yes
++#AFPD_RUN=yes
+
+ #### maximum number of clients that can connect:
+ #AFPD_MAX_CLIENTS=20
Index: net/netatalk/files/patch-configure
===================================================================
RCS file: /home/ncvs/ports/net/netatalk/files/patch-configure,v
retrieving revision 1.17
diff -u -r1.17 patch-configure
--- net/netatalk/files/patch-configure 25 Jul 2010 01:37:08 -0000 1.17
+++ net/netatalk/files/patch-configure 6 Oct 2011 23:55:52 -0000
@@ -1,11 +1,37 @@
---- configure.orig 2010-07-10 06:18:22.000000000 -0400
-+++ configure 2010-07-24 21:33:50.000000000 -0400
-@@ -30958,7 +30958,7 @@ if test "x$bdb_required" = "xyes"; then
+--- configure.orig 2011-07-27 07:59:28.000000000 -0400
++++ configure 2011-08-01 03:26:25.000000000 -0400
+@@ -27039,6 +27039,7 @@ fi
+
+ savedcflags="$CFLAGS"
+ savedldflags="$LDFLAGS"
++ saved_CPPFLAGS="$CPPFLAGS"
+ ICONV_CFLAGS=""
+ ICONV_LIBS=""
+
+@@ -28265,6 +28266,8 @@ echo "$as_me: error: internal error, ata
+ if test "x$zeroconf" != "xno"; then
+ savedcppflags="$CPPFLAGS"
+ savedldflags="$LDFLAGS"
++ CPPFLAGS="-I%%LOCALBASE%%/include $CPPFLAGS"
++ LDFLAGS="-L%%LOCALBASE%%/lib $LDFLAGS"
+
+ if test "x$zeroconf" = "xyes" -o "x$zeroconf" = "xtry"; then
+ zeroconf_dir="/usr"
+@@ -31357,7 +31360,7 @@ if test "x$bdb_required" = "xyes"; then
trybdbdir=""
dobdbsearch=yes
bdb_search_dirs="/usr/local /usr"
-- search_subdirs="/ /db5 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4"
-+ search_subdirs="/%%DB_NAME%% / /db5 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4"
+- search_subdirs="/ /db5 /db5.1 /db51 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4"
++ search_subdirs="/%%DB_NAME%% / /db5 /db5.1 /db51 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4"
bdbfound=no
savedcflags="$CFLAGS"
+@@ -33387,7 +33390,7 @@ rm -f core conftest.err conftest.$ac_obj
+ fi
+ { echo "$as_me:$LINENO: result: $netatalk_cv_HAVE_ACL_GET_PERM_NP" >&5
+ echo "${ECHO_T}$netatalk_cv_HAVE_ACL_GET_PERM_NP" >&6; }
+- if test x"netatalk_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
++ if test x"$netatalk_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
+
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_ACL_GET_PERM_NP 1
Index: net/netatalk/files/patch-etc__afpd__afp_avahi.c
===================================================================
RCS file: net/netatalk/files/patch-etc__afpd__afp_avahi.c
diff -N net/netatalk/files/patch-etc__afpd__afp_avahi.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc__afpd__afp_avahi.c 6 Oct 2011 23:55:52 -0000
@@ -0,0 +1,149 @@
+--- ./etc/afpd/afp_avahi.c.orig 2011-07-21 21:30:42.000000000 -0700
++++ ./etc/afpd/afp_avahi.c 2011-08-29 15:03:14.926315200 -0700
+@@ -176,8 +176,8 @@
+ return;
+
+ fail:
+- avahi_client_free (ctx->client);
+- avahi_threaded_poll_quit(ctx->threaded_poll);
++ time(NULL);
++// avahi_threaded_poll_quit(ctx->threaded_poll);
+ }
+
+ /* Called when publishing of service data completes */
+@@ -198,14 +198,12 @@
+ /* With multiple names there's no way to know which one collided */
+ LOG(log_error, logtype_afpd, "publish_reply: AVAHI_ENTRY_GROUP_COLLISION",
+ avahi_strerror(avahi_client_errno(ctx->client)));
+- avahi_client_free(avahi_entry_group_get_client(g));
+ avahi_threaded_poll_quit(ctx->threaded_poll);
+ break;
+
+ case AVAHI_ENTRY_GROUP_FAILURE:
+ LOG(log_error, logtype_afpd, "Failed to register service: %s",
+ avahi_strerror(avahi_client_errno(ctx->client)));
+- avahi_client_free(avahi_entry_group_get_client(g));
+ avahi_threaded_poll_quit(ctx->threaded_poll);
+ break;
+
+@@ -253,14 +251,12 @@
+ LOG(log_error, logtype_afpd, "Failed to contact server: %s",
+ avahi_strerror(error));
+
+- avahi_client_free (ctx->client);
+ avahi_threaded_poll_quit(ctx->threaded_poll);
+ }
+
+ } else {
+ LOG(log_error, logtype_afpd, "Client failure: %s",
+ avahi_strerror(avahi_client_errno(client)));
+- avahi_client_free (ctx->client);
+ avahi_threaded_poll_quit(ctx->threaded_poll);
+ }
+ break;
+@@ -281,7 +277,7 @@
+ * Tries to setup the Zeroconf thread and any
+ * neccessary config setting.
+ */
+-void av_zeroconf_setup(const AFPConfig *configs) {
++void av_zeroconf_register(const AFPConfig *configs) {
+ int error;
+
+ /* initialize the struct that holds our config settings. */
+@@ -306,24 +302,10 @@
+ NULL,
+ &error))) {
+ LOG(log_error, logtype_afpd, "Failed to create client object: %s",
+- avahi_strerror(avahi_client_errno(ctx->client)));
++ avahi_strerror(error));
+ goto fail;
+ }
+
+- return;
+-
+-fail:
+- if (ctx)
+- av_zeroconf_unregister();
+-
+- return;
+-}
+-
+-/*
+- * This function finally runs the loop impl.
+- */
+-int av_zeroconf_run(void) {
+- /* Finally, start the event loop thread */
+ if (avahi_threaded_poll_start(ctx->threaded_poll) < 0) {
+ LOG(log_error, logtype_afpd, "Failed to create thread: %s",
+ avahi_strerror(avahi_client_errno(ctx->client)));
+@@ -333,26 +315,12 @@
+ }
+
+ ctx->thread_running = 1;
+- return 0;
++ return;
+
+ fail:
+- if (ctx)
+- av_zeroconf_unregister();
+-
+- return -1;
+-}
++ av_zeroconf_unregister();
+
+-/*
+- * Tries to shutdown this loop impl.
+- * Call this function from outside this thread.
+- */
+-void av_zeroconf_shutdown() {
+- /* Call this when the app shuts down */
+- avahi_threaded_poll_stop(ctx->threaded_poll);
+- avahi_client_free(ctx->client);
+- avahi_threaded_poll_free(ctx->threaded_poll);
+- free(ctx);
+- ctx = NULL;
++ return;
+ }
+
+ /*
+@@ -360,27 +328,21 @@
+ * Call this function from inside this thread.
+ */
+ int av_zeroconf_unregister() {
+- if (ctx->thread_running) {
+- /* First, block the event loop */
+- avahi_threaded_poll_lock(ctx->threaded_poll);
+-
+- /* Than, do your stuff */
+- avahi_threaded_poll_quit(ctx->threaded_poll);
++ LOG(log_error, logtype_afpd, "av_zeroconf_unregister");
+
+- /* Finally, unblock the event loop */
+- avahi_threaded_poll_unlock(ctx->threaded_poll);
+- ctx->thread_running = 0;
++ if (ctx) {
++ LOG(log_error, logtype_afpd, "av_zeroconf_unregister: avahi_threaded_poll_stop");
++ if (ctx->threaded_poll)
++ avahi_threaded_poll_stop(ctx->threaded_poll);
++ LOG(log_error, logtype_afpd, "av_zeroconf_unregister: avahi_client_free");
++ if (ctx->client)
++ avahi_client_free(ctx->client);
++ LOG(log_error, logtype_afpd, "av_zeroconf_unregister: avahi_threaded_poll_free");
++ if (ctx->threaded_poll)
++ avahi_threaded_poll_free(ctx->threaded_poll);
++ free(ctx);
++ ctx = NULL;
+ }
+-
+- if (ctx->client)
+- avahi_client_free(ctx->client);
+-
+- if (ctx->threaded_poll)
+- avahi_threaded_poll_free(ctx->threaded_poll);
+-
+- free(ctx);
+- ctx = NULL;
+-
+ return 0;
+ }
+
Index: net/netatalk/files/patch-etc__afpd__afp_avahi.h
===================================================================
RCS file: net/netatalk/files/patch-etc__afpd__afp_avahi.h
diff -N net/netatalk/files/patch-etc__afpd__afp_avahi.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc__afpd__afp_avahi.h 6 Oct 2011 23:55:52 -0000
@@ -0,0 +1,13 @@
+--- ./etc/afpd/afp_avahi.h.orig 2011-07-21 21:30:42.000000000 -0700
++++ ./etc/afpd/afp_avahi.h 2011-08-29 15:03:14.926315200 -0700
+@@ -41,9 +41,7 @@
+ };
+
+ /* prototype definitions */
+-void av_zeroconf_setup(const AFPConfig *configs);
+-int av_zeroconf_run(void);
++void av_zeroconf_register(const AFPConfig *configs);
+ int av_zeroconf_unregister(void);
+-void av_zeroconf_shutdown(void);
+
+ #endif /* AFPD_AVAHI_H */
Index: net/netatalk/files/patch-etc__afpd__afp_options.c
===================================================================
RCS file: net/netatalk/files/patch-etc__afpd__afp_options.c
diff -N net/netatalk/files/patch-etc__afpd__afp_options.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc__afpd__afp_options.c 6 Oct 2011 23:55:52 -0000
@@ -0,0 +1,13 @@
+--- ./etc/afpd/afp_options.c.orig 2011-07-27 04:55:39.000000000 -0700
++++ ./etc/afpd/afp_options.c 2011-08-29 15:00:45.043756687 -0700
+@@ -240,6 +240,10 @@
+ options->flags |= OPTION_ANNOUNCESSH;
+ if (strstr(buf, " -noacl2maccess"))
+ options->flags &= ~OPTION_ACL2MACCESS;
++ if (strstr(buf, " -keepsessions")) {
++ default_options.flags |= OPTION_KEEPSESSIONS;
++ options->flags |= OPTION_KEEPSESSIONS;
++ }
+
+ /* passwd bits */
+ if (strstr(buf, " -nosavepassword"))
Index: net/netatalk/files/patch-etc__afpd__afp_zeroconf.c
===================================================================
RCS file: net/netatalk/files/patch-etc__afpd__afp_zeroconf.c
diff -N net/netatalk/files/patch-etc__afpd__afp_zeroconf.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc__afpd__afp_zeroconf.c 6 Oct 2011 23:55:52 -0000
@@ -0,0 +1,20 @@
+--- ./etc/afpd/afp_zeroconf.c.orig 2011-07-21 21:30:42.000000000 -0700
++++ ./etc/afpd/afp_zeroconf.c 2011-08-29 15:03:14.926315200 -0700
+@@ -27,8 +27,7 @@
+ #if defined (HAVE_AVAHI)
+ LOG(log_debug, logtype_afpd, "Attempting to register with mDNS using Avahi");
+
+- av_zeroconf_setup(configs);
+- av_zeroconf_run();
++ av_zeroconf_register(configs);
+ #endif
+ }
+
+@@ -36,6 +35,6 @@
+ {
+ #if defined (HAVE_AVAHI)
+ LOG(log_debug, logtype_afpd, "Attempting to de-register mDNS using Avahi");
+- av_zeroconf_shutdown();
++ av_zeroconf_unregister();
+ #endif
+ }
Index: net/netatalk/files/patch-etc__afpd__main.c
===================================================================
RCS file: net/netatalk/files/patch-etc__afpd__main.c
diff -N net/netatalk/files/patch-etc__afpd__main.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc__afpd__main.c 6 Oct 2011 23:55:53 -0000
@@ -0,0 +1,139 @@
+--- ./etc/afpd/main.c.orig 2011-07-27 04:55:39.000000000 -0700
++++ ./etc/afpd/main.c 2011-08-19 14:43:45.042815401 -0700
+@@ -52,11 +52,11 @@
+ #endif /* TRU64 */
+
+ unsigned char nologin = 0;
+-
+ struct afp_options default_options;
+ static AFPConfig *configs;
+ static server_child *server_children;
+ static sig_atomic_t reloadconfig = 0;
++static sig_atomic_t gotsigchld = 0;
+
+ /* Two pointers to dynamic allocated arrays which store pollfds and associated data */
+ static struct pollfd *fdset;
+@@ -94,7 +94,11 @@
+ continue;
+ fdset_add_fd(&fdset, &polldata, &fdset_used, &fdset_size, config->fd, LISTEN_FD, config);
+ }
+- fdset_add_fd(&fdset, &polldata, &fdset_used, &fdset_size, disasociated_ipc_fd, DISASOCIATED_IPC_FD, NULL);
++
++ if (default_options.flags & OPTION_KEEPSESSIONS) {
++ LOG(log_note, logtype_afpd, "Activating continous service");
++ fdset_add_fd(&fdset, &polldata, &fdset_used, &fdset_size, disasociated_ipc_fd, DISASOCIATED_IPC_FD, NULL);
++ }
+ }
+
+ static void fd_reset_listening_sockets(void)
+@@ -106,7 +110,9 @@
+ continue;
+ fdset_del_fd(&fdset, &polldata, &fdset_used, &fdset_size, config->fd);
+ }
+- fdset_del_fd(&fdset, &polldata, &fdset_used, &fdset_size, disasociated_ipc_fd);
++
++ if (default_options.flags & OPTION_KEEPSESSIONS)
++ fdset_del_fd(&fdset, &polldata, &fdset_used, &fdset_size, disasociated_ipc_fd);
+ }
+
+ /* ------------------ */
+@@ -127,7 +133,12 @@
+ LOG(log_note, logtype_afpd, "AFP Server shutting down on SIGTERM");
+ break;
+ case SIGQUIT:
+- LOG(log_note, logtype_afpd, "AFP Server shutting down on SIGQUIT, NOT disconnecting clients");
++ if (default_options.flags & OPTION_KEEPSESSIONS) {
++ LOG(log_note, logtype_afpd, "AFP Server shutting down on SIGQUIT, NOT disconnecting clients");
++ } else {
++ LOG(log_note, logtype_afpd, "AFP Server shutting down on SIGQUIT");
++ sig = SIGTERM;
++ }
+ break;
+ }
+ if (server_children)
+@@ -154,13 +165,18 @@
+ reloadconfig = 1;
+ break;
+
++ case SIGCHLD:
++ /* w/ a configuration file, we can force a re-read if we want */
++ gotsigchld = 1;
++ break;
++
+ default :
+ LOG(log_error, logtype_afpd, "afp_goaway: bad signal" );
+ }
+ return;
+ }
+
+-static void child_handler(int sig _U_)
++static void child_handler(void)
+ {
+ int fd;
+ int status, i;
+@@ -273,7 +289,8 @@
+ }
+ #endif
+
+- sv.sa_handler = child_handler;
++ sv.sa_handler = afp_goaway; /* handler for all sigs */
++
+ sigemptyset( &sv.sa_mask );
+ sigaddset(&sv.sa_mask, SIGALRM);
+ sigaddset(&sv.sa_mask, SIGHUP);
+@@ -286,7 +303,6 @@
+ exit(EXITERR_SYS);
+ }
+
+- sv.sa_handler = afp_goaway;
+ sigemptyset( &sv.sa_mask );
+ sigaddset(&sv.sa_mask, SIGALRM);
+ sigaddset(&sv.sa_mask, SIGTERM);
+@@ -374,6 +390,7 @@
+ afp_child_t *child;
+ int fd[2]; /* we only use one, but server_child_add expects [2] */
+ pid_t pid;
++ int saveerrno;
+
+ /* wait for an appleshare connection. parent remains in the loop
+ * while the children get handled by afp_over_{asp,dsi}. this is
+@@ -386,7 +403,13 @@
+ pthread_sigmask(SIG_UNBLOCK, &sigs, NULL);
+ ret = poll(fdset, fdset_used, -1);
+ pthread_sigmask(SIG_BLOCK, &sigs, NULL);
+- int saveerrno = errno;
++ saveerrno = errno;
++
++ if (gotsigchld) {
++ gotsigchld = 0;
++ child_handler();
++ continue;
++ }
+
+ if (reloadconfig) {
+ nologin++;
+@@ -441,11 +464,11 @@
+ child = (afp_child_t *)polldata[i].data;
+ LOG(log_debug, logtype_afpd, "main: IPC request from child[%u]", child->pid);
+
+- if ((ret = ipc_server_read(server_children, child->ipc_fds[0])) == 0) {
++ if (ipc_server_read(server_children, child->ipc_fds[0]) != 0) {
+ fdset_del_fd(&fdset, &polldata, &fdset_used, &fdset_size, child->ipc_fds[0]);
+ close(child->ipc_fds[0]);
+ child->ipc_fds[0] = -1;
+- if (child->disasociated) {
++ if ((default_options.flags & OPTION_KEEPSESSIONS) && child->disasociated) {
+ LOG(log_note, logtype_afpd, "main: removing reattached child[%u]", child->pid);
+ server_child_remove(server_children, CHILD_DSIFORK, child->pid);
+ }
+@@ -461,8 +484,9 @@
+ if (readt(fd[0], &pid, sizeof(pid_t), 0, 1) != sizeof(pid_t)) {
+ LOG(log_error, logtype_afpd, "main: readt: %s", strerror(errno));
+ close(fd[0]);
++ break;
+ }
+- LOG(log_note, logtype_afpd, "main: IPC reconnect from [%u]", pid);
++ LOG(log_note, logtype_afpd, "main: IPC reconnect from pid [%u]", pid);
+ if ((child = server_child_add(server_children, CHILD_DSIFORK, pid, fd)) == NULL) {
+ LOG(log_error, logtype_afpd, "main: server_child_add");
+ close(fd[0]);
Index: net/netatalk/files/patch-etc_afpd_acls.c
===================================================================
RCS file: net/netatalk/files/patch-etc_afpd_acls.c
diff -N net/netatalk/files/patch-etc_afpd_acls.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc_afpd_acls.c 6 Oct 2011 23:55:53 -0000
@@ -0,0 +1,63 @@
+--- etc/afpd/acls.c.orig 2011-07-30 18:08:35.000000000 -0400
++++ etc/afpd/acls.c 2011-07-30 18:19:19.000000000 -0400
+@@ -1060,7 +1060,59 @@ static int set_acl(const struct vol *vol
+ #ifdef HAVE_ACL_FROM_MODE
+ EC_NULL_LOG_ERR(acc_acl = acl_from_mode(st.st_mode), AFPERR_MISC);
+ #else
+-#error "Missing acl_from_mode() replacement"
++ /* Implement the non POSIX.1e function acl_from_mode
++ *
++ * Taken from http://people.freebsd.org/~markus/stuff/kacl.diff
++ */
++ {
++ acl_t new_acl = acl_init( 3 );
++ acl_entry_t entry;
++ acl_permset_t permset = 0;
++ int error = 0;
++
++ /* Add owner entry */
++ if ( ( error = acl_create_entry( &new_acl, &entry ) ) == 0 ) {
++ /* Set owner permissions */
++ acl_set_tag_type( entry, ACL_USER_OBJ );
++ acl_get_permset( entry, &permset );
++ acl_clear_perms( permset );
++ if ( st.st_mode & S_IRUSR ) acl_add_perm( permset, ACL_READ );
++ if ( st.st_mode & S_IWUSR ) acl_add_perm( permset, ACL_WRITE );
++ if ( st.st_mode & S_IXUSR ) acl_add_perm( permset, ACL_EXECUTE );
++ acl_set_permset( entry, permset );
++
++ /* Add group entry */
++ if ( ( error = acl_create_entry( &new_acl, &entry ) ) == 0 ) {
++ /* Set group permissions */
++ acl_set_tag_type( entry, ACL_GROUP_OBJ );
++ acl_get_permset( entry, &permset );
++ acl_clear_perms( permset );
++ if ( st.st_mode & S_IRGRP ) acl_add_perm( permset, ACL_READ );
++ if ( st.st_mode & S_IWGRP ) acl_add_perm( permset, ACL_WRITE );
++ if ( st.st_mode & S_IXGRP ) acl_add_perm( permset, ACL_EXECUTE );
++ acl_set_permset( entry, permset );
++
++ /* Add other entry */
++ if ( ( error = acl_create_entry( &new_acl, &entry ) ) == 0 ) {
++ /* Set other permissions */
++ acl_set_tag_type( entry, ACL_OTHER );
++ acl_get_permset( entry, &permset );
++ acl_clear_perms( permset );
++ if ( st.st_mode & S_IROTH ) acl_add_perm( permset, ACL_READ );
++ if ( st.st_mode & S_IWOTH ) acl_add_perm( permset, ACL_WRITE );
++ if ( st.st_mode & S_IXOTH ) acl_add_perm( permset, ACL_EXECUTE );
++ acl_set_permset( entry, permset );
++ }
++ }
++ }
++
++ if ( error ) {
++ acl_free( &new_acl );
++ EC_NULL_LOG_ERR(acc_acl = NULL, AFPERR_MISC);
++ }
++ else
++ acc_acl = new_acl;
++ }
+ #endif
+ /* adds the clients aces */
+ EC_ZERO_ERR(map_aces_darwin_to_posix(daces, &def_acl, &acc_acl, ace_count), AFPERR_MISC);
Index: net/netatalk/files/patch-etc_afpd_afp_asp.c
===================================================================
RCS file: net/netatalk/files/patch-etc_afpd_afp_asp.c
diff -N net/netatalk/files/patch-etc_afpd_afp_asp.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc_afpd_afp_asp.c 6 Oct 2011 23:55:53 -0000
@@ -0,0 +1,13 @@
+--- etc/afpd/afp_asp.c.orig 2011-07-30 23:13:47.000000000 -0400
++++ etc/afpd/afp_asp.c 2011-07-30 23:14:22.000000000 -0400
+@@ -31,9 +31,9 @@
+ #include <atalk/atp.h>
+ #include <atalk/asp.h>
+ #include <atalk/compat.h>
++#include <atalk/globals.h>
+ #include <atalk/util.h>
+
+-#include "globals.h"
+ #include "switch.h"
+ #include "auth.h"
+ #include "fork.h"
Index: net/netatalk/files/patch-etc_apfd_Makefile.in
===================================================================
RCS file: /home/ncvs/ports/net/netatalk/files/patch-etc_apfd_Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 patch-etc_apfd_Makefile.in
--- net/netatalk/files/patch-etc_apfd_Makefile.in 8 May 2011 23:08:21 -0000 1.1
+++ net/netatalk/files/patch-etc_apfd_Makefile.in 6 Oct 2011 23:55:53 -0000
@@ -1,11 +1,11 @@
---- etc/afpd/Makefile.in.orig 2011-05-08 19:04:22.000000000 -0400
-+++ etc/afpd/Makefile.in 2011-05-08 19:04:34.000000000 -0400
-@@ -295,7 +295,7 @@ afpd_SOURCES = unix.c ofork.c main.c swi
- afp_dsi.c messages.c afp_config.c nfsquota.c quota.c uam.c \
- afs.c uid.c afp_util.c catsearch.c afprun.c hash.c extattrs.c \
- $(am__append_1)
--afpd_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la @QUOTA_LIBS@ @SLP_LIBS@ @WRAP_LIBS@ @LIBADD_DL@
-+afpd_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la @QUOTA_LIBS@ @SLP_LIBS@ @WRAP_LIBS@ @LIBADD_DL@ @PAM_LIBS@
+--- etc/afpd/Makefile.in.orig 2011-07-27 07:59:24.000000000 -0400
++++ etc/afpd/Makefile.in 2011-07-30 18:03:30.000000000 -0400
+@@ -317,7 +317,7 @@ afpd_SOURCES = afp_asp.c afp_avahi.c afp
+ afpd_LDADD = \
+ $(top_builddir)/libatalk/cnid/libcnid.la \
+ $(top_builddir)/libatalk/libatalk.la \
+- @LIBGCRYPT_LIBS@ @ZEROCONF_LIBS@ @QUOTA_LIBS@ @SLP_LIBS@ @WRAP_LIBS@ @LIBADD_DL@ @ACL_LIBS@ @PTHREAD_LIBS@
++ @LIBGCRYPT_LIBS@ @ZEROCONF_LIBS@ @QUOTA_LIBS@ @SLP_LIBS@ @WRAP_LIBS@ @LIBADD_DL@ @ACL_LIBS@ @PTHREAD_LIBS@ @PAM_LIBS@
+
afpd_LDFLAGS = -export-dynamic
- afpd_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/sys \
- @SLP_CFLAGS@ \
+ afpd_CFLAGS = \
Index: net/netatalk/files/patch-etc_cnid_dbd_cnid_metad.c
===================================================================
RCS file: net/netatalk/files/patch-etc_cnid_dbd_cnid_metad.c
diff -N net/netatalk/files/patch-etc_cnid_dbd_cnid_metad.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc_cnid_dbd_cnid_metad.c 6 Oct 2011 23:55:53 -0000
@@ -0,0 +1,10 @@
+--- etc/cnid_dbd/cnid_metad.c.orig 2011-07-30 18:28:32.000000000 -0400
++++ etc/cnid_dbd/cnid_metad.c 2011-07-30 18:29:01.000000000 -0400
+@@ -39,6 +39,7 @@
+ #include <string.h>
+ #include <signal.h>
+ #include <sys/types.h>
++#include <sys/resource.h>
+ #include <sys/time.h>
+ #include <sys/wait.h>
+ #include <sys/uio.h>
Index: net/netatalk/files/patch-etc_cnid_dbd_comm.c
===================================================================
RCS file: net/netatalk/files/patch-etc_cnid_dbd_comm.c
diff -N net/netatalk/files/patch-etc_cnid_dbd_comm.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-etc_cnid_dbd_comm.c 6 Oct 2011 23:55:53 -0000
@@ -0,0 +1,12 @@
+--- etc/cnid_dbd/comm.c.orig 2011-07-30 18:27:55.000000000 -0400
++++ etc/cnid_dbd/comm.c 2011-07-30 18:28:04.000000000 -0400
+@@ -9,9 +9,6 @@
+ #include "config.h"
+ #endif
+
+-#ifndef _XOPEN_SOURCE
+-# define _XOPEN_SOURCE 600
+-#endif
+ #ifndef __EXTENSIONS__
+ # define __EXTENSIONS__
+ #endif
Index: net/netatalk/files/patch-include__atalk__globals.h
===================================================================
RCS file: net/netatalk/files/patch-include__atalk__globals.h
diff -N net/netatalk/files/patch-include__atalk__globals.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-include__atalk__globals.h 6 Oct 2011 23:55:53 -0000
@@ -0,0 +1,39 @@
+--- ./include/atalk/globals.h.orig 2011-07-27 04:55:39.000000000 -0700
++++ ./include/atalk/globals.h 2011-08-19 14:43:45.046204676 -0700
+@@ -43,6 +43,7 @@
+ #define OPTION_UUID (1 << 7)
+ #define OPTION_ACL2MACCESS (1 << 8)
+ #define OPTION_NOZEROCONF (1 << 9)
++#define OPTION_KEEPSESSIONS (1 << 10) /* preserve sessions across master afpd restart with SIGQUIT */
+
+ #ifdef FORCE_UIDGID
+ /* set up a structure for this */
+@@ -127,18 +128,16 @@
+ /* typedef for AFP functions handlers */
+ typedef int (*AFPCmd)(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen);
+
+-/* afp_dsi.c */
+-extern AFPObj *AFPobj;
+-
+-extern int afp_version;
+-extern int afp_errno;
+-extern unsigned char nologin;
+-extern struct dir *curdir;
+-extern char getwdbuf[];
+-
+-/* FIXME CNID */
+-extern const char *Cnid_srv;
+-extern const char *Cnid_port;
++/* Global variables */
++extern AFPObj *AFPobj;
++extern int afp_version;
++extern int afp_errno;
++extern unsigned char nologin;
++extern struct dir *curdir;
++extern char getwdbuf[];
++extern struct afp_options default_options;
++extern const char *Cnid_srv;
++extern const char *Cnid_port;
+
+ extern int get_afp_errno (const int param);
+ extern void afp_options_init (struct afp_options *);
Index: net/netatalk/files/patch-libatalk__util__server_child.c
===================================================================
RCS file: net/netatalk/files/patch-libatalk__util__server_child.c
diff -N net/netatalk/files/patch-libatalk__util__server_child.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-libatalk__util__server_child.c 6 Oct 2011 23:55:53 -0000
@@ -0,0 +1,14 @@
+--- ./libatalk/util/server_child.c.orig 2011-07-27 04:55:39.000000000 -0700
++++ ./libatalk/util/server_child.c 2011-08-19 14:42:28.704028827 -0700
+@@ -135,8 +135,10 @@
+
+ /* it's possible that the child could have already died before the
+ * pthread_sigmask. we need to check for this. */
+- if (kill(pid, 0) < 0)
++ if (kill(pid, 0) < 0) {
++ LOG(log_error, logtype_default, "server_child_add: no such process pid [%d]", pid);
+ goto exit;
++ }
+
+ fork = (server_child_fork *) children->fork + forkid;
+
Index: net/netatalk/files/patch-libatalk__util__server_ipc.c
===================================================================
RCS file: net/netatalk/files/patch-libatalk__util__server_ipc.c
diff -N net/netatalk/files/patch-libatalk__util__server_ipc.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/netatalk/files/patch-libatalk__util__server_ipc.c 6 Oct 2011 23:55:53 -0000
@@ -0,0 +1,61 @@
+--- ./libatalk/util/server_ipc.c.orig 2011-07-27 04:55:39.000000000 -0700
++++ ./libatalk/util/server_ipc.c 2011-08-19 14:42:28.728518099 -0700
+@@ -214,21 +214,27 @@
+ /*!
+ * Read a IPC message from a child
+ *
++ * This is using an fd with non-blocking IO, so EAGAIN is not an error
++ *
+ * @args children (rw) pointer to our structure with all childs
+ * @args fd (r) IPC socket with child
+ *
+- * @returns number of bytes transfered, -1 on error, 0 on EOF
++ * @returns -1 on error, 0 on success
+ */
+ int ipc_server_read(server_child *children, int fd)
+ {
+- int ret = 0;
++ int ret;
+ struct ipc_header ipc;
+ char buf[IPC_MAXMSGSIZE], *p;
+
+ if ((ret = read(fd, buf, IPC_HEADERLEN)) != IPC_HEADERLEN) {
+- LOG(log_error, logtype_afpd, "Reading IPC header failed (%i of %u bytes read): %s",
+- ret, IPC_HEADERLEN, strerror(errno));
+- return ret;
++ if (ret != 0) {
++ if (errno == EAGAIN)
++ return 0;
++ LOG(log_error, logtype_afpd, "Reading IPC header failed (%i of %u bytes read): %s",
++ ret, IPC_HEADERLEN, strerror(errno));
++ }
++ return -1;
+ }
+
+ p = buf;
+@@ -255,7 +261,7 @@
+ if ((ret = read(fd, buf, ipc.len)) != (int) ipc.len) {
+ LOG(log_info, logtype_afpd, "Reading IPC message failed (%u of %u bytes read): %s",
+ ret, ipc.len, strerror(errno));
+- return ret;
++ return -1;
+ }
+ }
+ ipc.msg = buf;
+@@ -271,6 +277,7 @@
+ if (readt(fd, &ipc.DSI_requestID, 2, 0, 2) != 2) {
+ LOG (log_error, logtype_afpd, "ipc_read(%s:child[%u]): couldnt read DSI id: %s",
+ ipc_cmd_str[ipc.command], ipc.child_pid, strerror(errno));
++ return -1;
+ }
+ if ((ipc.afp_socket = recv_fd(fd, 1)) == -1) {
+ LOG (log_error, logtype_afpd, "ipc_read(%s:child[%u]): recv_fd: %s",
+@@ -296,7 +303,7 @@
+ return -1;
+ }
+
+- return ret;
++ return 0;
+ }
+
+ /* ----------------- */
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.