This repository has been archived by the owner on Nov 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proftpd.spec
1661 lines (1405 loc) · 64.9 KB
/
proftpd.spec
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
#
# Rebuild switch:
# --with integrationtests enable integration tests (not fully maintained, likely to fail)
#
# Do a systemd-based build from Fedora 15; otherwise, a sysvinit-based build
# With systemd, the runtime directory is /run on tmpfs rather than /var/run on persistent storage
%if (0%{?rhel} && 0%{?rhel} <= 6) || (0%{?fedora} && 0%{?fedora} <= 14)
%global use_systemd 0
%global rundir %{_localstatedir}/run
%global rundir_tmpfs 0
%else
%global use_systemd 1
%global rundir /run
%global rundir_tmpfs 1
%endif
# systemd-units merged into systemd at Fedora 17
%if (0%{?fedora} && 0%{?fedora} <= 16)
%global systemd_units systemd-units
%else
%global systemd_units systemd
%endif
# Support systemd presets from Fedora 18, RHEL 7
%if (0%{?rhel} && 0%{?rhel} <= 6) || (0%{?fedora} && 0%{?fedora} <= 17)
%global preset_support 0
%else
%global preset_support 1
%endif
# For memcached support we need libmemcached ≥ 0.41, available from F-14 (EL-6 and below have libmemcached 0.31)
%if !((0%{?rhel} && 0%{?rhel} <= 6) || (0%{?fedora} && 0%{?fedora} <= 13))
%global have_libmemcached 1
%endif
# Switch from mysql-devel to mariadb-connector-c-devel from Fedora 28 onwards
# Also disable tcp_wrappers support from Fedora 28 onwards (#1518776)
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 27)
%global mysql_lib mysql
%global mysql_devel_pkg mysql-devel
%global libwrap_support 1
%else
%global mysql_lib mariadb
%global mysql_devel_pkg mariadb-connector-c-devel
%endif
# Switch from postgresql-devel to libpq-devel from Fedora 30 onwards
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 29)
%global postgresql_devel_pkg postgresql-devel
%else
%global postgresql_devel_pkg libpq-devel
%endif
# Do a hardened build where possible
%global _hardened_build 1
# Dynamic modules contain references to symbols in main dæmon, so we need to disable linker checks for undefined symbols
%undefine _strict_symbol_defs_build
#global prever rc3
%global rpmrel 18
%global mod_vroot_version 0.9.5
Summary: Flexible, stable and highly-configurable FTP server
Name: proftpd
Version: 1.3.6
Release: %{?prever:0.}%{rpmrel}%{?prever:.%{prever}}%{?dist}
License: GPLv2+
URL: http://www.proftpd.org/
Source0: https://github.com/proftpd/proftpd/archive/v%{version}%{?prever}.tar.gz
Source1: proftpd.conf
Source5: proftpd-welcome.msg
Source9: proftpd.sysconfig
Source10: https://github.com/Castaglia/proftpd-mod_vroot/archive/v%{mod_vroot_version}.tar.gz
Source11: https://raw.github.com/jbenden/mod_clamav/master/mod_clamav.c
Source12: https://raw.github.com/jbenden/mod_clamav/master/mod_clamav.h
Patch1: proftpd-1.3.6-shellbang.patch
Patch2: proftpd.conf-no-memcached.patch
Patch3: proftpd-1.3.4rc1-mod_vroot-test.patch
Patch4: proftpd-1.3.6-no-mod-wrap.patch
Patch100: https://github.com/proftpd/proftpd/commit/459693c7.patch
Patch101: https://github.com/proftpd/proftpd/commit/389cc579.patch
Patch102: https://github.com/proftpd/proftpd/commit/1825a2b8.patch
Patch103: https://github.com/proftpd/proftpd/commit/73887e02.patch
Patch104: https://github.com/proftpd/proftpd/commit/8a186e2d.patch
Patch105: https://github.com/proftpd/proftpd/commit/c3e5d75f.patch
Patch106: proftpd-1.3.6-add-enable-tests-nonetwork-option.patch
Patch107: https://github.com/proftpd/proftpd/commit/adfdc01d.patch
Patch108: https://github.com/proftpd/proftpd/commit/6cc96b5f.patch
Patch109: https://github.com/proftpd/proftpd/commit/aa85f127.patch
Patch110: https://github.com/proftpd/proftpd/commit/7907aa65.patch
Patch111: https://github.com/proftpd/proftpd/commit/08ba2f63.patch
Patch112: https://github.com/proftpd/proftpd/commit/757b9633.patch
Patch113: https://github.com/proftpd/proftpd/commit/41ecb7dc.patch
Patch114: https://github.com/proftpd/proftpd/commit/ad786eaa.patch
Patch115: https://github.com/proftpd/proftpd/commit/a2c02a6b.patch
Patch116: proftpd-1.3.6-ENOATTR.patch
Patch117: https://github.com/proftpd/proftpd/commit/fa378a8f.patch
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: GeoIP-devel
BuildRequires: gettext
BuildRequires: libacl-devel
BuildRequires: libcap-devel
%if 0%{?have_libmemcached:1}
BuildRequires: libmemcached-devel >= 0.41
%endif
BuildRequires: %{mysql_devel_pkg}
BuildRequires: ncurses-devel
BuildRequires: openldap-devel
BuildRequires: openssl-devel
BuildRequires: pam-devel
BuildRequires: pcre-devel >= 7.0
BuildRequires: perl-generators
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 25)
BuildRequires: perl
%else
BuildRequires: perl-interpreter
%endif
BuildRequires: pkgconfig
BuildRequires: %{postgresql_devel_pkg}
BuildRequires: sqlite-devel
BuildRequires: tar
%if 0%{?libwrap_support:1}
BuildRequires: tcp_wrappers-devel
%endif
BuildRequires: zlib-devel
# Test suite requirements
BuildRequires: check-devel
%if 0%{?_with_integrationtests:1}
BuildRequires: perl(Compress::Zlib)
BuildRequires: perl(Digest::MD5)
BuildRequires: perl(HTTP::Request)
BuildRequires: perl(IO::Socket::SSL)
BuildRequires: perl(LWP::UserAgent)
BuildRequires: perl(Net::FTPSSL)
BuildRequires: perl(Net::SSLeay)
BuildRequires: perl(Net::Telnet)
BuildRequires: perl(Sys::HostAddr)
BuildRequires: perl(Test::Harness)
BuildRequires: perl(Test::Unit) >= 0.25
BuildRequires: perl(Time::HiRes)
%endif
# Need %%{systemd_units} for ownership of /usr/lib/tmpfiles.d directory
%if %{rundir_tmpfs}
Requires: %{systemd_units}
%endif
# Scriptlet dependencies
Requires(preun): coreutils, findutils
%if %{use_systemd}
BuildRequires: %{systemd_units}
%{?systemd_requires}
%else
Requires(post): chkconfig
Requires(preun): chkconfig, initscripts
Requires(postun): initscripts
%endif
Provides: ftpserver
%description
ProFTPD is an enhanced FTP server with a focus toward simplicity, security,
and ease of configuration. It features a very Apache-like configuration
syntax, and a highly customizable server infrastructure, including support for
multiple 'virtual' FTP servers, anonymous FTP, and permission-based directory
visibility.
%if %{use_systemd}
This package defaults to the standalone behavior of ProFTPD, but all the
needed scripts to have it run by systemd instead are included.
%else
This package defaults to the standalone behavior of ProFTPD, but all the
needed scripts to have it run by xinetd instead are included.
%endif
%package devel
Summary: ProFTPD - Tools and header files for developers
Requires: %{name} = %{version}-%{release}
# devel package requires the same devel packages as were build-required
# for the main package
Requires: gcc, libtool
Requires: GeoIP-devel
Requires: libacl-devel
Requires: libcap-devel
%if 0%{?have_libmemcached:1}
Requires: libmemcached-devel >= 0.41
%endif
Requires: %{mysql_devel_pkg}
Requires: ncurses-devel
Requires: openldap-devel
Requires: openssl-devel
Requires: pam-devel
Requires: pcre-devel
Requires: pkgconfig
Requires: %{postgresql_devel_pkg}
Requires: sqlite-devel
%if 0%{?libwrap_support:1}
Requires: tcp_wrappers-devel
%endif
Requires: zlib-devel
%description devel
This package is required to build additional modules for ProFTPD.
%package ldap
Summary: Module to add LDAP support to the ProFTPD FTP server
Requires: %{name} = %{version}-%{release}
%description ldap
Module to add LDAP support to the ProFTPD FTP server.
%package mysql
Summary: Module to add MySQL support to the ProFTPD FTP server
Requires: %{name} = %{version}-%{release}
%description mysql
Module to add MySQL support to the ProFTPD FTP server.
%package postgresql
Summary: Module to add PostgreSQL support to the ProFTPD FTP server
Requires: %{name} = %{version}-%{release}
%description postgresql
Module to add PostgreSQL support to the ProFTPD FTP server.
%package sqlite
Summary: Module to add SQLite support to the ProFTPD FTP server
Requires: %{name} = %{version}-%{release}
%description sqlite
Module to add SQLite support to the ProFTPD FTP server.
%package clamav
Summary: Module to add ClamAV support to the ProFTPD FTP server
Requires: %{name} = %{version}-%{release}
%description clamav
Module to add ClamAV support to the ProFTPD FTP server
%package utils
Summary: ProFTPD - Additional utilities
Requires: %{name} = %{version}-%{release}
Requires: perl-interpreter
# ftpasswd --use-cracklib requires Crypt::Cracklib
BuildRequires: perl(Crypt::Cracklib)
Requires: perl(Crypt::Cracklib)
%description utils
This package contains additional utilities for monitoring and configuring the
ProFTPD server:
* ftpasswd: generate passwd(5) files for use with AuthUserFile
* ftpcount: show the current number of connections per server/virtualhost
* ftpmail: monitor transfer log and send email when files uploaded
* ftpquota: manipulate quota tables
* ftptop: show the current status of FTP sessions
* ftpwho: show the current process information for each FTP session
%prep
%setup -q -n %{name}-%{version}%{?prever}
# Extract mod_vroot source into contrib/
# Directory must be named mod_vroot for configure script to find it
cd contrib
tar xfz %{SOURCE10}
mv proftpd-mod_vroot-%{mod_vroot_version} mod_vroot
cd -
# Move mod_clamav source into contrib/
cp %{_sourcedir}/mod_clamav.* contrib/
# Default config file
cp -p %{SOURCE1} proftpd.conf
# Avoid documentation name conflicts
mv contrib/README contrib/README.contrib
# Change shellbangs /usr/bin/env perl ⇒ /usr/bin/perl
%patch1
# If we don't have libmemcached support, remove the mod_tls_memcache
# snippet from the config file
%if 0%{!?have_libmemcached:1}
%patch2
%endif
# If we're running the full test suite, include the mod_vroot test
%patch3 -p1 -b .test_vroot
# Remove references to mod_wrap from the configuration file if necessary
%if 0%{!?libwrap_support:1}
%patch4 -b .nowrappers
%endif
# Check for symlinks in home directory path as logging-in user
# http://bugs.proftpd.org/show_bug.cgi?id=4306
# https://bugzilla.redhat.com/show_bug.cgi?id=1443507
# https://github.com/proftpd/proftpd/pull/496
%patch100 -p1
# Fix API tests to work in Fedora/RHEL environments
# https://github.com/proftpd/proftpd/issues/483
# https://github.com/proftpd/proftpd/pull/510
# https://github.com/proftpd/proftpd/pull/514
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
# Fix similars functionality and unit test
# https://github.com/proftpd/proftpd/pull/513
%patch105 -p1
# Add functionality to disable external network tests
# https://github.com/proftpd/proftpd/pull/497
%patch106 -p1
# Systemd requires that executeable pathnames are absolute
# https://github.com/proftpd/proftpd/pull/502
%patch107 -p1
# Systemd upstream recommends Type = simple for services if possible
# https://github.com/proftpd/proftpd/pull/506
%patch108 -p1
# Don't mess with system profiles in TLSCipherSuite
# https://github.com/proftpd/proftpd/pull/499
%patch109 -p1
%patch110 -p1
# Remove redundant bind() to controls socket
# https://github.com/proftpd/proftpd/issues/501
%patch111 -p1
# mod_sftp failed to check shadow password information when publickey
# authentication used
# http://bugs.proftpd.org/show_bug.cgi?id=4308
%patch112 -p1
# Use of "AllowEmptyPasswords off" broke SFTP/SCP logins
# http://bugs.proftpd.org/show_bug.cgi?id=4309
%patch113 -p1
# With systemd, wait for network-online.target before starting
# https://bugzilla.redhat.com/show_bug.cgi?id=1506805
# https://github.com/proftpd/proftpd/pull/617
%patch114 -p1
# Update mod_sftp to handle changed APIs in OpenSSL 1.1.x releases
# https://github.com/proftpd/proftpd/issues/674
# https://github.com/proftpd/proftpd/pull/710
%patch115 -p1
# Don't assume ENOATTR is defined in test suite
%patch116 -p1
# Fix infinite loop possible in mod_sftp's set_sftphostkey() function, by
# actually iterating properly for the next configuration record
# http://bugs.proftpd.org/show_bug.cgi?id=4356
# https://github.com/proftpd/proftpd/pull/736
%patch117 -p1
# OpenSSL Cipher Profiles introduced in Fedora 21
# Elsewhere, we use the default of DEFAULT:!ADH:!EXPORT:!DES
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 20)
sed -i -e '/^[[:space:]]*TLSCipherSuite[[:space:]]*PROFILE=SYSTEM$/d' proftpd.conf
%endif
# Tweak logrotate script for systemd compatibility (#802178)
%if %{use_systemd}
sed -i -e '/killall/s/test.*/systemctl reload proftpd.service/' \
contrib/dist/rpm/proftpd.logrotate
%endif
# Avoid docfile dependencies
chmod -c -x contrib/xferstats.holger-preiss
# Remove bogus exec permissions from source files
chmod -c -x include/hanson-tpl.h lib/hanson-tpl.c
# Remove any patch backup files from documentation
find doc/ contrib/ -name '*.orig' -delete
%build
# Modules to be built as DSO's (excluding mod_ifsession, always specified last)
SMOD1=mod_sql:mod_sql_passwd:mod_sql_mysql:mod_sql_postgres:mod_sql_sqlite
SMOD2=mod_quotatab:mod_quotatab_file:mod_quotatab_ldap:mod_quotatab_radius:mod_quotatab_sql
SMOD3=mod_ldap:mod_ban%{?libwrap_support::mod_wrap}:mod_ctrls_admin:mod_facl:mod_load:mod_vroot
SMOD4=mod_radius:mod_ratio:mod_rewrite:mod_site_misc:mod_exec:mod_shaper:mod_geoip
SMOD5=mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_copy:mod_deflate:mod_ifversion:mod_qos
SMOD6=mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_tls_shmcache%{?have_libmemcached::mod_tls_memcache}
SMOD7=mod_clamav
%configure \
--libexecdir="%{_libexecdir}/proftpd" \
--localstatedir="%{rundir}/proftpd" \
--disable-strip \
--enable-ctrls \
--enable-dso \
--enable-facl \
--enable-ipv6 \
%{?have_libmemcached: --enable-memcache} \
--enable-nls \
--enable-openssl \
--disable-pcre \
--disable-redis \
--enable-shadow \
--enable-tests=nonetwork \
--with-libraries="%{_libdir}/%{mysql_lib}" \
--with-includes="%{_includedir}/mysql" \
--with-modules=mod_readme:mod_auth_pam:mod_tls \
--with-shared=${SMOD1}:${SMOD2}:${SMOD3}:${SMOD4}:${SMOD5}:${SMOD6}:${SMOD7}:mod_ifsession
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot} \
rundir="%{rundir}/proftpd" \
INSTALL_USER=`id -un` \
INSTALL_GROUP=`id -gn`
install -D -p -m 640 proftpd.conf %{buildroot}%{_sysconfdir}/proftpd.conf
install -D -p -m 644 contrib/dist/rpm/proftpd.pam \
%{buildroot}%{_sysconfdir}/pam.d/proftpd
%if %{use_systemd}
install -D -p -m 644 contrib/dist/rpm/proftpd.service \
%{buildroot}%{_unitdir}/proftpd.service
install -D -p -m 644 contrib/dist/systemd/proftpd.socket \
%{buildroot}%{_unitdir}/proftpd.socket
install -D -p -m 644 contrib/dist/systemd/[email protected] \
%{buildroot}%{_unitdir}/[email protected]
%else
install -D -p -m 755 contrib/dist/rpm/proftpd.init.d \
%{buildroot}%{_sysconfdir}/rc.d/init.d/proftpd
install -D -p -m 644 contrib/dist/rpm/xinetd \
%{buildroot}%{_sysconfdir}/xinetd.d/xproftpd
%endif
install -D -p -m 644 contrib/dist/rpm/proftpd.logrotate \
%{buildroot}%{_sysconfdir}/logrotate.d/proftpd
install -D -p -m 644 %{SOURCE5} %{buildroot}%{_localstatedir}/ftp/welcome.msg
install -D -p -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/sysconfig/proftpd
mkdir -p %{buildroot}%{_localstatedir}/{ftp/{pub,uploads},log/proftpd}
touch %{buildroot}%{_sysconfdir}/ftpusers
# Make sure %%{rundir}/proftpd exists at boot time for systems where it's on tmpfs (#656675)
%if %{rundir_tmpfs}
install -d -m 755 %{buildroot}%{_prefix}/lib/tmpfiles.d
install -p -m 644 contrib/dist/rpm/proftpd-tmpfs.conf \
%{buildroot}%{_prefix}/lib/tmpfiles.d/proftpd.conf
%endif
# Find translations
%find_lang proftpd
%check
# Integration tests not fully maintained - stick to API tests only by default
%if 0%{?_with_integrationtests:1}
ln ftpdctl tests/
make check
%else
# API tests should always be OK
if ! make -C tests api-tests; then
# Diagnostics to report upstream
cat tests/api-tests.log
./proftpd -V
# Fail the build
false
fi
%endif
%post
%if %{use_systemd}
systemctl daemon-reload &>/dev/null || :
%endif
if [ $1 -eq 1 ]; then
# Initial installation
%if ! %{use_systemd}
chkconfig --add proftpd || :
%endif
%if %{preset_support}
systemctl preset proftpd.service &>/dev/null || :
%endif
IFS=":"; cat /etc/passwd | \
while { read username nu nu gid nu nu nu nu; }; do \
if [ $gid -lt 100 -a "$username" != "ftp" ]; then
echo $username >> %{_sysconfdir}/ftpusers
fi
done
fi
%preun
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
%if %{use_systemd}
systemctl --no-reload disable proftpd.service &>/dev/null || :
systemctl stop proftpd.service &>/dev/null || :
%else
service proftpd stop &>/dev/null || :
chkconfig --del proftpd || :
%endif
find %{rundir}/proftpd -depth -mindepth 1 |
xargs rm -rf &>/dev/null || :
fi
%postun
%if %{use_systemd}
systemctl daemon-reload &>/dev/null || :
%endif
if [ $1 -ge 1 ]; then
# Package upgrade, not uninstall
%if %{use_systemd}
systemctl try-restart proftpd.service &>/dev/null || :
%else
service proftpd condrestart &>/dev/null || :
else
# Package removal, not upgrade
service xinetd reload &>/dev/null || :
%endif
fi
%files -f proftpd.lang
%if 0%{?_licensedir:1}
%license COPYING
%else
%doc COPYING
%endif
%doc CREDITS ChangeLog NEWS README.md
%doc README.DSO README.modules README.IPv6 README.PAM
%doc README.capabilities README.classes README.controls README.facl
%doc contrib/README.contrib contrib/README.ratio
%doc doc/* sample-configurations/
%dir %{_localstatedir}/ftp/
%dir %{_localstatedir}/ftp/pub/
%dir %{rundir}/proftpd/
%config(noreplace) %{_localstatedir}/ftp/welcome.msg
%config(noreplace) %{_sysconfdir}/blacklist.dat
%config(noreplace) %{_sysconfdir}/dhparams.pem
%config(noreplace) %{_sysconfdir}/ftpusers
%config(noreplace) %{_sysconfdir}/logrotate.d/proftpd
%config(noreplace) %{_sysconfdir}/pam.d/proftpd
%config(noreplace) %{_sysconfdir}/proftpd.conf
%config(noreplace) %{_sysconfdir}/sysconfig/proftpd
%if %{use_systemd}
%{_unitdir}/proftpd.service
%{_unitdir}/proftpd.socket
%{_unitdir}/[email protected]
%else
%config(noreplace) %{_sysconfdir}/xinetd.d/xproftpd
%{_sysconfdir}/rc.d/init.d/proftpd
%endif
%if %{rundir_tmpfs}
%{_prefix}/lib/tmpfiles.d/proftpd.conf
%endif
%{_bindir}/ftpdctl
%{_sbindir}/ftpscrub
%{_sbindir}/ftpshut
%{_sbindir}/in.proftpd
%{_sbindir}/proftpd
%{_mandir}/man5/proftpd.conf.5*
%{_mandir}/man5/xferlog.5*
%{_mandir}/man8/ftpdctl.8*
%{_mandir}/man8/ftpscrub.8*
%{_mandir}/man8/ftpshut.8*
%{_mandir}/man8/proftpd.8*
%dir %{_libexecdir}/proftpd/
%{_libexecdir}/proftpd/mod_ban.so
%{_libexecdir}/proftpd/mod_ctrls_admin.so
%{_libexecdir}/proftpd/mod_copy.so
%{_libexecdir}/proftpd/mod_deflate.so
%{_libexecdir}/proftpd/mod_exec.so
%{_libexecdir}/proftpd/mod_facl.so
%{_libexecdir}/proftpd/mod_geoip.so
%{_libexecdir}/proftpd/mod_ifsession.so
%{_libexecdir}/proftpd/mod_ifversion.so
%{_libexecdir}/proftpd/mod_load.so
%{_libexecdir}/proftpd/mod_qos.so
%{_libexecdir}/proftpd/mod_quotatab.so
%{_libexecdir}/proftpd/mod_quotatab_file.so
%{_libexecdir}/proftpd/mod_quotatab_radius.so
%{_libexecdir}/proftpd/mod_quotatab_sql.so
%{_libexecdir}/proftpd/mod_radius.so
%{_libexecdir}/proftpd/mod_ratio.so
%{_libexecdir}/proftpd/mod_rewrite.so
%{_libexecdir}/proftpd/mod_sftp.so
%{_libexecdir}/proftpd/mod_sftp_pam.so
%{_libexecdir}/proftpd/mod_sftp_sql.so
%{_libexecdir}/proftpd/mod_shaper.so
%{_libexecdir}/proftpd/mod_site_misc.so
%{_libexecdir}/proftpd/mod_sql.so
%{_libexecdir}/proftpd/mod_sql_passwd.so
%{?have_libmemcached:%{_libexecdir}/proftpd/mod_tls_memcache.so}
%{_libexecdir}/proftpd/mod_tls_shmcache.so
%{_libexecdir}/proftpd/mod_vroot.so
%{?libwrap_support:%{_libexecdir}/proftpd/mod_wrap.so}
%{_libexecdir}/proftpd/mod_wrap2.so
%{_libexecdir}/proftpd/mod_wrap2_file.so
%{_libexecdir}/proftpd/mod_wrap2_sql.so
%exclude %{_libexecdir}/proftpd/*.a
%exclude %{_libexecdir}/proftpd/*.la
%attr(331, ftp, ftp) %dir %{_localstatedir}/ftp/uploads/
%attr(750, root, root) %dir %{_localstatedir}/log/proftpd/
%files devel
%{_bindir}/prxs
%{_includedir}/proftpd/
%{_libdir}/pkgconfig/proftpd.pc
%files ldap
%doc README.LDAP contrib/mod_quotatab_ldap.ldif contrib/mod_quotatab_ldap.schema
%{_libexecdir}/proftpd/mod_ldap.so
%{_libexecdir}/proftpd/mod_quotatab_ldap.so
%files mysql
%{_libexecdir}/proftpd/mod_sql_mysql.so
%files postgresql
%{_libexecdir}/proftpd/mod_sql_postgres.so
%files sqlite
%{_libexecdir}/proftpd/mod_sql_sqlite.so
%files clamav
%{_libexecdir}/proftpd/mod_clamav.so
%files utils
%doc contrib/xferstats.holger-preiss
%{_bindir}/ftpasswd
%{_bindir}/ftpcount
%{_bindir}/ftpmail
%{_bindir}/ftpquota
%{_bindir}/ftptop
%{_bindir}/ftpwho
%{_mandir}/man1/ftpasswd.1*
%{_mandir}/man1/ftpcount.1*
%{_mandir}/man1/ftpmail.1*
%{_mandir}/man1/ftpquota.1*
%{_mandir}/man1/ftptop.1*
%{_mandir}/man1/ftpwho.1*
%changelog
* Thu Sep 6 2018 Paul Howarth <[email protected]> - 1.3.6-18
- Switch from postgresql-devel to libpq-devel from Fedora 30 onwards
* Fri Aug 24 2018 Paul Howarth <[email protected]> - 1.3.6-17
- Fix infinite loop possible in mod_sftp's set_sftphostkey() function, by
actually iterating properly for the next configuration record
http://bugs.proftpd.org/show_bug.cgi?id=4356
https://github.com/proftpd/proftpd/pull/736
* Fri Jul 13 2018 Fedora Release Engineering <[email protected]> - 1.3.6-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jul 5 2018 Paul Howarth <[email protected]> - 1.3.6-15
- Don't assume ENOATTR is always defined in test suite
- Update mod_sftp to handle changed APIs in OpenSSL 1.1.x releases
https://github.com/proftpd/proftpd/issues/674
https://github.com/proftpd/proftpd/pull/710
* Fri Feb 09 2018 Fedora Release Engineering <[email protected]> - 1.3.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sun Jan 28 2018 Paul Howarth <[email protected]> - 1.3.6-13
- Account for systemd-units being merged into systemd at Fedora 17
- Use forward-looking conditionals
- Don't use full paths from commands in scriptlets, to aid readability
* Mon Jan 22 2018 Paul Howarth <[email protected]> - 1.3.6-12
- Disable strict linker checks for undefined symbols, which breaks build due
to modules containing references to symbols in the main daemon
* Sat Jan 20 2018 Björn Esser <[email protected]> - 1.3.6-11
- Rebuilt for switch to libxcrypt
* Tue Jan 09 2018 Merlin Mathesius <[email protected]> - 1.3.6-10
- Cleanup spec file conditionals
* Fri Dec 1 2017 Paul Howarth <[email protected]> - 1.3.6-9
- Disable tcp_wrappers support via libwrap/mod_wrap from F-28 onwards; note
that similar functionality is still available using mod_wrap2, which does
not use libwrap (ref: https://bugzilla.redhat.com/show_bug.cgi?id=1518776)
* Mon Oct 30 2017 Paul Howarth <[email protected]> - 1.3.6-8
- With systemd, wait for network-online.target before starting (#1506805)
* Thu Sep 21 2017 Paul Howarth <[email protected]> - 1.3.6-7
- Switch to build with MariaDB Connector/C library rather than full mysql-devel
package from Fedora 28 onwards (#1493657,
https://fedoraproject.org/wiki/User:Hhorak/mariadb-connector-c-proposal)
* Wed Sep 20 2017 Paul Howarth <[email protected]> - 1.3.6-6
- Add sqlite sub-package with mod_sql_sqlite for SQLite support (#1328321)
* Thu Aug 03 2017 Fedora Release Engineering <[email protected]> - 1.3.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Fri Jul 28 2017 Fedora Release Engineering <[email protected]> - 1.3.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jul 13 2017 Paul Howarth <[email protected]> - 1.3.6-3
- mod_sftp failed to check shadow password information when publickey
authentication used (http://bugs.proftpd.org/show_bug.cgi?id=4308)
- Use of "AllowEmptyPasswords off" broke SFTP/SCP logins
(http://bugs.proftpd.org/show_bug.cgi?id=4309)
* Thu Jul 13 2017 Petr Pisar <[email protected]> - 1.3.6-2
- perl dependency renamed to perl-interpreter
<https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules>
* Mon May 22 2017 Paul Howarth <[email protected]> - 1.3.6-1
- Update to 1.3.6 (see NEWS for details)
- Update mod_vroot to 0.9.5 (API compatibility with 1.3.6)
- Add upstream fixes for flaky API tests
(https://github.com/proftpd/proftpd/issues/483)
(https://github.com/proftpd/proftpd/pull/510)
(https://github.com/proftpd/proftpd/pull/514)
- Add functionality to disable external network tests
(https://github.com/proftpd/proftpd/pull/497)
- Update template TLS configuration
- PCRE 7.0 always available for use now
- Disable PCRE support for now as JIT compiler has SELinux issues
(https://bugs.exim.org/show_bug.cgi?id=1749)
- Update proftpd.service to use Type=simple rather than Type=forking
(https://github.com/proftpd/proftpd/pull/506)
- Remove redundant bind() to controls socket
(https://github.com/proftpd/proftpd/issues/501)
- Fix similars functionality and unit test
(https://github.com/proftpd/proftpd/pull/513)
- Integration tests can use system Test::Unit now
- tcpd.h can always be found in tcp_wrappers-devel now
* Wed May 3 2017 Paul Howarth <[email protected]> - 1.3.5e-2
- AllowChrootSymlinks off could cause login failures depending on filesystem
permissions: use the IDs of the logging-in user to perform the directory
walk, looking for symlinks, to be more consistent with similar checks done
during login (#1443507, upstream bug 4306)
- Crypt::CrackLib always available now
* Mon Apr 10 2017 Paul Howarth <[email protected]> - 1.3.5e-1
- Update to 1.3.5e
- SFTP clients using [email protected] digest failed to connect
(upstream bug 4287)
- SFTP rekeying failure with ProFTPD 1.3.5d, caused by null pointer
dereference (upstream bug 4288)
- AllowChrootSymlinks off did not check entire DefaultRoot path for symlinks
(CVE-2017-7418, upstream bug 4295)
- Change shellbangs in shipped perl scripts to use system perl
- Drop EL-5 support
- Drop BuildRoot: and Group: tags
- Drop explicit buildroot cleaning in %%install section
- Drop explicit %%clean section
- /etc/pam.d/password-auth always available now
- pcre 7.0 or later always available now
* Sun Feb 12 2017 Paul Howarth <[email protected]> - 1.3.5d-3
- Properly allocate (and clear) the UMAC contexts, to fix segfault in mod_sftp
(#1420365, upstream bug 4287)
* Sat Feb 11 2017 Fedora Release Engineering <[email protected]> - 1.3.5d-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jan 16 2017 Paul Howarth <[email protected]> - 1.3.5d-1
- Update to 1.3.5d
- Support OpenSSL 1.1.x API (upstream bug 4275)
Bug fixes:
- SSH rekey during authentication can cause issues with clients
(upstream bug 4254)
- Recursive SCP uploads of multiple directories not handled properly
(upstream bug 4257)
- LIST returns different results for file, depending on path syntax
(upstream bug 4259)
- "AuthAliasOnly on" in server config breaks anonymous logins
(upstream bug 4255)
- CapabilitiesEngine directive not honored for <IfUser>/<IfGroup> sections
(upstream bug 4272)
- Memory leak when mod_facl is used (upstream bug 4278)
- All FTP logins treated as anonymous logins again (upstream bug 4283,
regression in 1.3.5c of upstream bug 3307)
* Sat Nov 19 2016 Paul Howarth <[email protected]> - 1.3.5b-3
- Support OpenSSL 1.1.x API (upstream bug 4275)
* Sat May 21 2016 Paul Howarth <[email protected]> - 1.3.5b-2
- Handle client/server version skew in mod_sql_mysql
(https://forums.proftpd.org/smf/index.php?topic=11887.0)
- Fix a possible cause of segfaults in mod_sftp (#1337880, upstream bug 4203)
- BR: perl-generators for correct dependencies in utils sub-package
* Fri Mar 11 2016 Paul Howarth <[email protected]> - 1.3.5b-1
- Update to 1.3.5b
- mod_geoip did not load all of the GeoIPTables properly (upstream bug 4187)
- "Incorrect string value" reported by mod_sql_mysql for some UTF8 characters
(upstream bug 4191)
- SSH rekey failed when using RSA hostkey smaller than 2048 bits
(upstream bug 4097)
- MLSD/MLST fact type "cdir" is incorrectly used for the current working
directory (upstream bug 4198)
- HiddenStores temporary files not removed when exceeding quota using SCP
(upstream bug 4201)
- MLSD lines not properly terminated with CRLF (upstream bug 4202)
- Zero-length memory allocation possible, with undefined results
(upstream bug 4209)
- Avoid unbounded SFTP extended attribute key/values (upstream bug 4210)
- Ensure that FTP data transfer commands fail appropriately when
"RootRevoke on" is in effect (upstream bug 4212)
- Handle FTP re-authentication attempts better (upstream bug 4217)
- Permissions on files uploaded via STOU did not honor configured Umask
(upstream bug 4223)
- Support SFTP clients that send multiple INIT requests (upstream bug 4227)
- TLSDHParamFile directive appears ignored because unexpected DH is chosen
(upstream bug 4230)
- Drop unbundled old version of mod_geoip
- Drop upstreamed patches
* Thu Feb 04 2016 Fedora Release Engineering <[email protected]> - 1.3.5a-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Dec 1 2015 Paul Howarth <[email protected]> - 1.3.5a-5
- Avoid unbounded SFTP extended attribute key/values
(#1286977, http://bugs.proftpd.org/show_bug.cgi?id=4210)
* Thu Oct 29 2015 Paul Howarth <[email protected]> - 1.3.5a-4
- See if we can fix crash in mod_lang
http://bugs.proftpd.org/show_bug.cgi?id=4206
https://retrace.fedoraproject.org/faf/reports/10744/
* Thu Sep 10 2015 Paul Howarth <[email protected]> - 1.3.5a-3
- Add dependency on perl(Crypt::Cracklib), needed for ftpasswd --use-cracklib
* Thu Jun 18 2015 Fedora Release Engineering <[email protected]> - 1.3.5a-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu May 28 2015 Paul Howarth <[email protected]> - 1.3.5a-1
- Update to 1.3.5a
- Fixed "stalled" SSL/TLS handshakes for data transfers
- Fixed handling of SSH keys with overlong Comment headers in mod_sftp_sql
- By default, mod_tls will no longer support SSLv3 connections; in order to
support SSLv3 connections (for sites that need to), you must explicitly
configure this via the TLSProtocol directive, e.g.:
TLSProtocol SSLv3 TLSv1 ...
- The mod_copy module is enabled by default; there may be cases where the
module should be disabled, without requiring a rebuild of the server, thus
mod_copy now supports a CopyEngine directive to enable/disable the module
- The DeleteAbortedStores directive (for Bug#3917) is only enabled when
HiddenStores is in effect, as intended when originally implemented, rather
than all the time
- Many other bug-fixes, see NEWS for details
- Drop upstreamed patches
* Wed May 27 2015 Paul Howarth <[email protected]> - 1.3.5-7
- Update mod_vroot to 0.9.4
- Fix broken vroot alias checks (GH#4, GH#5)
- Improve documentation
- Add further regression tests
* Tue Apr 28 2015 Paul Howarth <[email protected]> - 1.3.5-6
- Unauthenticated copying of files via SITE CPFR/CPTO was allowed by mod_copy
(CVE-2015-3306, http://bugs.proftpd.org/show_bug.cgi?id=4169)
* Thu Feb 5 2015 Paul Howarth <[email protected]> - 1.3.5-5
- Update mod_vroot to 0.9.3 and drop upstreamed mod_vroot patch
- Anonymous upload directory specification needs to be slightly different if
mod_vroot is in use (#1045922)
http://sourceforge.net/p/proftp/mailman/message/31728570/
- For systemd-based systems, use systemd rather than xinetd for inetd mode
activation (#737707); to use this mode, set "ServerType inetd" in
/etc/proftpd.conf and do "systemctl enable proftpd.socket" (and
"systemctl start proftpd.socket" to start listening for connections)
- Use %%license where possible
* Sun Aug 17 2014 Fedora Release Engineering <[email protected]> - 1.3.5-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 7 2014 Fedora Release Engineering <[email protected]> 1.3.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri May 16 2014 Paul Howarth <[email protected]> 1.3.5-2
- Add upstream fix to ignore any ENOPROTOOPT errors when setting the
IPv6 TCLASS (TOS) flags on the socket; they make for noisier logging
without providing any actual value to the user/admin (upstream bug 4055)
* Fri May 16 2014 Paul Howarth <[email protected]> 1.3.5-1
- Update to 1.3.5 (see NEWS for details)
- Drop upstreamed patches
- Drop sysv-to-systemd migration script
- No longer need to support pam_stack
* Fri Dec 20 2013 Paul Howarth <[email protected]> 1.3.4d-5
- Fix support for 8192-bit DH parameters (#1044586)
- Add 3072-bit and 7680-bit DH parameters (upstream bug 4002)
* Sat Sep 14 2013 Paul Howarth <[email protected]> 1.3.4d-4
- Fix mod_sftp/mod_sftp_pam invalid pool allocation during kbdint authentication
(#1007678, upstream bug #3973, CVE-2013-4359)
* Sun Aug 04 2013 Fedora Release Engineering <[email protected]> 1.3.4d-2.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Jul 17 2013 Petr Pisar <[email protected]> 1.3.4d-2.1
- Perl 5.18 rebuild
* Mon Jun 17 2013 Paul Howarth <[email protected]> 1.3.4d-2
- Fix spurious log messages at session close (upstream bug #3945)
* Sat Jun 15 2013 Paul Howarth <[email protected]> 1.3.4d-1
- Update to 1.3.4d
- Fixed broken build when using --disable-ipv6 configure option
- Fixed mod_sql "SQLAuthType Backend" MySQL issues
- Various other bugs fixed - see NEWS for details
- Drop upstreamed patch for PAM session closing
* Tue Apr 16 2013 Paul Howarth <[email protected]> 1.3.4c-2
- Make sure we can switch back to root before closing PAM sessions so that
they're closed properly and don't pollute the system logs with dbus reject
messages (#951728, upstream bug #3929)
* Thu Mar 7 2013 Paul Howarth <[email protected]> 1.3.4c-1
- Update to 1.3.4c
- Added Spanish translation
- Fixed several mod_sftp issues, including SFTPPassPhraseProvider,
handling of symlinks for REALPATH requests, and response code logging
- Fixed symlink race for creating directories when UserOwner is in effect
- Increased performance of FTP directory listings
- Drop MySQL password patch, no longer needed
- Drop upstreamed proftpd patch for CVE-2012-6095
- Update patch for bug 3744 to apply against updated proftpd code
* Thu Feb 14 2013 Fedora Release Engineering <[email protected]> 1.3.4b-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jan 16 2013 Paul Howarth <[email protected]> 1.3.4b-5
- Update patch for CVE-2012-6095 to cover vroot cases
* Mon Jan 7 2013 Paul Howarth <[email protected]> 1.3.4b-4
- Fix possible symlink race when applying UserOwner to newly created directory
(CVE-2012-6095, #892715, http://bugs.proftpd.org/show_bug.cgi?id=3841)
* Sat Sep 22 2012 Remi Collet <[email protected]> 1.3.4b-3
- Rebuild against libmemcached.so.11 without SASL
* Thu Aug 30 2012 Paul Howarth <[email protected]> 1.3.4b-2
- Add support for systemd presets in Fedora 18+ (#850281)
* Wed Aug 1 2012 Paul Howarth <[email protected]> 1.3.4b-1
- Update to 1.3.4b
- Fixed mod_ldap segfault on login when LDAPUsers with no filters used
- Fixed sporadic SFTP upload issues for large files
- Fixed SSH2 handling for some clients (e.g. OpenVMS)
- New FactsOptions directive; see doc/modules/mod_facts.html#FactsOptions
- Fixed build errors on Tru64, AIX, Cygwin
- Lots of bugs fixed - see NEWS for details
- No bzipped tarball release this time, so revert to gzipped one
- Drop patches for fixes included in upstream release
* Sat Jul 21 2012 Fedora Release Engineering <[email protected]> 1.3.4a-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jul 3 2012 Paul Howarth <[email protected]> 1.3.4a-10
- Move tmpfiles.d file from %%{_sysconfdir} to %%{_prefix}/lib
* Sat Apr 21 2012 Paul Howarth <[email protected]> 1.3.4a-9
- Rebuild for new libmemcached in Rawhide
* Fri Apr 13 2012 Paul Howarth <[email protected]> 1.3.4a-8
- Do hardened (PIE) builds where possible
- Drop %%defattr, redundant since rpm 4.4
- Always look for TLS certs in /etc/pki/tls/certs
* Mon Mar 12 2012 Paul Howarth <[email protected]> 1.3.4a-7
- Tweak logrotate script for systemd compatibility (#802178)
- Fix leaked file descriptors for log files (as per bug 3751)
* Sat Mar 3 2012 Paul Howarth <[email protected]> 1.3.4a-6
- Rebuild for new libmemcached in Rawhide
* Tue Feb 28 2012 Paul Howarth <[email protected]> 1.3.4a-5
- Document SELinux configuration for ProFTPD in proftpd.conf (#785443)
- Add support for basic and administrative controls actions using ftpdctl by
default (#786623)
- Add trace logging directives in proftpd.conf but disable them by default as
they impair performance
- Fix ftpwho/ftptop not showing command arguments (bug 3714)
- Fix MLSD/MLST fail with "DirFakeUser off" or "DirFakeGroup off" (bug 3715)
- Fix proftpd fails to run with "Abort trap" error message (bug 3717)
- Fix LIST -R can loop endlessly if bad directory symlink exists (bug 3719)
- Fix overly restrictive module logfile permissions (bug 3720)
- Fix mod_memcache segfault on server restart (bug 3723)
- Fix unloading mod_quotatab causes segfault (#757311, bug 3724)
- Fix mod_exec does not always capture stdout/stderr output from executed
command (bug 3726)
- Fix mod_wrap2 causes unexpected LogFormat %%u expansion for SFTP connections
(bug 3727)
- Fix mod_ldap segfault when LDAPUsers is used with no optional filters
(bug 3729)
- Fix DirFakeUser/DirFakeGroup off with name causes SIGSEGV for MLSD/MLST