proftpd: init at 1.3.8c

Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>

authored by laalsaas Maximilian Bosch and committed by Maximilian Bosch 8a7be1ee 3847fafb

+279
+189
pkgs/by-name/pr/proftpd/no-install-user.patch
··· 1 + diff --git a/Make.rules.in b/Make.rules.in 2 + index 2666b2c..bce4b2b 100644 3 + --- a/Make.rules.in 4 + +++ b/Make.rules.in 5 + @@ -30,9 +30,9 @@ INSTALL=@INSTALL@ 6 + INSTALL_STRIP=@INSTALL_STRIP@ 7 + INSTALL_USER=@install_user@ 8 + INSTALL_GROUP=@install_group@ 9 + -INSTALL_BIN=$(INSTALL) $(INSTALL_STRIP) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 10 + -INSTALL_SBIN=$(INSTALL) $(INSTALL_STRIP) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 11 + -INSTALL_MAN=$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 12 + +INSTALL_BIN=$(INSTALL) $(INSTALL_STRIP) -m 0755 13 + +INSTALL_SBIN=$(INSTALL) $(INSTALL_STRIP) -m 0755 14 + +INSTALL_MAN=$(INSTALL) -m 0644 15 + 16 + RM=rm -f 17 + SHELL=@CONFIG_SHELL@ 18 + diff --git a/Makefile.in b/Makefile.in 19 + index 32fd5f3..37c8907 100644 20 + --- a/Makefile.in 21 + +++ b/Makefile.in 22 + @@ -129,7 +129,6 @@ check: proftpd$(EXEEXT) 23 + $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8: 24 + @if [ ! -d $@ ]; then \ 25 + mkdir -p $@; \ 26 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 27 + chmod 0755 $@; \ 28 + fi 29 + 30 + @@ -139,7 +138,6 @@ install-proftpd: $(DESTDIR)$(includedir) $(DESTDIR)$(localstatedir) $(DESTDIR)$( 31 + rm -f $(DESTDIR)$(sbindir)/in.proftpd ; \ 32 + fi 33 + ln -s $(top_builddir)/proftpd $(DESTDIR)$(sbindir)/in.proftpd 34 + - -chown -h $(INSTALL_USER):$(INSTALL_GROUP) $(DESTDIR)$(sbindir)/in.proftpd 35 + 36 + install-libs: $(DESTDIR)$(libdir)/proftpd 37 + cd lib/ && $(MAKE) install 38 + @@ -177,11 +175,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir) 39 + $(INSTALL_SBIN) $(top_builddir)/ftpshut $(DESTDIR)$(sbindir)/ftpshut 40 + $(INSTALL_BIN) $(top_builddir)/ftptop $(DESTDIR)$(bindir)/ftptop 41 + $(INSTALL_BIN) $(top_builddir)/ftpwho $(DESTDIR)$(bindir)/ftpwho 42 + - $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(top_builddir)/src/prxs $(DESTDIR)$(bindir)/prxs 43 + + $(INSTALL) -m 0755 $(top_builddir)/src/prxs $(DESTDIR)$(bindir)/prxs 44 + 45 + install-conf: $(DESTDIR)$(sysconfdir) 46 + if [ ! -f $(DESTDIR)$(sysconfdir)/proftpd.conf ] ; then \ 47 + - $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 \ 48 + + $(INSTALL) -m 0644 \ 49 + $(top_srcdir)/sample-configurations/basic.conf \ 50 + $(DESTDIR)$(sysconfdir)/proftpd.conf ; \ 51 + fi 52 + diff --git a/contrib/Makefile.in b/contrib/Makefile.in 53 + index d1a31af..65d2abc 100644 54 + --- a/contrib/Makefile.in 55 + +++ b/contrib/Makefile.in 56 + @@ -17,6 +17,6 @@ Makefile: Makefile.in ../config.status 57 + cd ../ && ./config.status 58 + 59 + install-utils: 60 + - $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpasswd $(DESTDIR)$(bindir)/ftpasswd 61 + - $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpmail $(DESTDIR)$(bindir)/ftpmail 62 + - $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpquota $(DESTDIR)$(bindir)/ftpquota 63 + + $(INSTALL) -m 0755 $(srcdir)/ftpasswd $(DESTDIR)$(bindir)/ftpasswd 64 + + $(INSTALL) -m 0755 $(srcdir)/ftpmail $(DESTDIR)$(bindir)/ftpmail 65 + + $(INSTALL) -m 0755 $(srcdir)/ftpquota $(DESTDIR)$(bindir)/ftpquota 66 + diff --git a/contrib/mod_auth_otp/Makefile.in b/contrib/mod_auth_otp/Makefile.in 67 + index 4026969..f07914c 100644 68 + --- a/contrib/mod_auth_otp/Makefile.in 69 + +++ b/contrib/mod_auth_otp/Makefile.in 70 + @@ -52,7 +52,6 @@ install: install-headers install-man install-utils 71 + $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8: 72 + @if [ ! -d $@ ]; then \ 73 + mkdir -p $@; \ 74 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 75 + chmod 0755 $@; \ 76 + fi 77 + 78 + diff --git a/contrib/mod_dnsbl/Makefile.in b/contrib/mod_dnsbl/Makefile.in 79 + index 4bb54c4..7d70972 100644 80 + --- a/contrib/mod_dnsbl/Makefile.in 81 + +++ b/contrib/mod_dnsbl/Makefile.in 82 + @@ -46,7 +46,6 @@ install: install-headers 83 + $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd: 84 + @if [ ! -d $@ ]; then \ 85 + mkdir -p $@; \ 86 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 87 + chmod 0755 $@; \ 88 + fi 89 + 90 + diff --git a/contrib/mod_load/Makefile.in b/contrib/mod_load/Makefile.in 91 + index 5ec575e..e7e41cc 100644 92 + --- a/contrib/mod_load/Makefile.in 93 + +++ b/contrib/mod_load/Makefile.in 94 + @@ -47,7 +47,6 @@ install: install-headers 95 + $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd: 96 + @if [ ! -d $@ ]; then \ 97 + mkdir -p $@; \ 98 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 99 + chmod 0755 $@; \ 100 + fi 101 + 102 + diff --git a/contrib/mod_sftp/Makefile.in b/contrib/mod_sftp/Makefile.in 103 + index 4b8df1f..f7526b9 100644 104 + --- a/contrib/mod_sftp/Makefile.in 105 + +++ b/contrib/mod_sftp/Makefile.in 106 + @@ -65,7 +65,6 @@ install: install-headers install-misc 107 + $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd: 108 + @if [ ! -d $@ ]; then \ 109 + mkdir -p $@; \ 110 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 111 + chmod 0755 $@; \ 112 + fi 113 + 114 + @@ -73,7 +72,6 @@ $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd: 115 + $(DESTDIR)$(includedir)/proftpd/$(MODULE_NAME): 116 + @if [ ! -d $@ ]; then \ 117 + mkdir -p $@; \ 118 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 119 + chmod 0755 $@; \ 120 + fi 121 + 122 + @@ -83,8 +81,8 @@ install-headers: $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(includedir)/proftpd 123 + $(RM) $(DESTDIR)$(includedir)/proftpd/$(MODULE_NAME)/$(MODULE_NAME).h 124 + 125 + install-misc: 126 + - $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 $(top_srcdir)/dhparams.pem $(DESTDIR)$(sysconfdir)/dhparams.pem 127 + - $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 $(top_srcdir)/blacklist.dat $(DESTDIR)$(sysconfdir)/blacklist.dat 128 + + $(INSTALL) -m 0644 $(top_srcdir)/dhparams.pem $(DESTDIR)$(sysconfdir)/dhparams.pem 129 + + $(INSTALL) -m 0644 $(top_srcdir)/blacklist.dat $(DESTDIR)$(sysconfdir)/blacklist.dat 130 + 131 + clean: 132 + $(LIBTOOL) --mode=clean $(RM) $(MODULE_NAME).a $(MODULE_NAME).la *.o *.lo .libs/*.o 133 + diff --git a/contrib/mod_snmp/Makefile.in b/contrib/mod_snmp/Makefile.in 134 + index 7de4c1c..5987896 100644 135 + --- a/contrib/mod_snmp/Makefile.in 136 + +++ b/contrib/mod_snmp/Makefile.in 137 + @@ -45,7 +45,6 @@ install: install-headers install-misc 138 + $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd: 139 + @if [ ! -d $@ ]; then \ 140 + mkdir -p $@; \ 141 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 142 + chmod 0755 $@; \ 143 + fi 144 + 145 + @@ -53,7 +52,7 @@ install-headers: $(DESTDIR)$(includedir)/proftpd 146 + $(INSTALL_MAN) $(MODULE_NAME).h $(DESTDIR)$(includedir)/proftpd/$(MODULE_NAME).h 147 + 148 + install-misc: 149 + - $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 $(top_srcdir)/PROFTPD-MIB.txt $(DESTDIR)$(sysconfdir)/PROFTPD-MIB.txt 150 + + $(INSTALL) -m 0644 $(top_srcdir)/PROFTPD-MIB.txt $(DESTDIR)$(sysconfdir)/PROFTPD-MIB.txt 151 + 152 + clean: 153 + $(LIBTOOL) --mode=clean $(RM) $(MODULE_NAME).a $(MODULE_NAME).la *.o *.lo .libs/*.o 154 + diff --git a/contrib/mod_wrap2/Makefile.in b/contrib/mod_wrap2/Makefile.in 155 + index 7da015f..d912d23 100644 156 + --- a/contrib/mod_wrap2/Makefile.in 157 + +++ b/contrib/mod_wrap2/Makefile.in 158 + @@ -46,7 +46,6 @@ install: install-headers 159 + $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd: 160 + @if [ ! -d $@ ]; then \ 161 + mkdir -p $@; \ 162 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 163 + chmod 0755 $@; \ 164 + fi 165 + 166 + diff --git a/include/Makefile.in b/include/Makefile.in 167 + index 1b69d93..b7e8f5a 100644 168 + --- a/include/Makefile.in 169 + +++ b/include/Makefile.in 170 + @@ -24,7 +24,6 @@ Makefile: Makefile.in ../config.status 171 + $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd: 172 + @if [ ! -d $@ ]; then \ 173 + mkdir -p $@; \ 174 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \ 175 + chmod 0755 $@; \ 176 + fi 177 + 178 + diff --git a/locale/Makefile.in b/locale/Makefile.in 179 + index 77fd787..1c41c0e 100644 180 + --- a/locale/Makefile.in 181 + +++ b/locale/Makefile.in 182 + @@ -52,7 +52,6 @@ install: $(LANGS) 183 + if [ -f $(top_builddir)/locale/$$lang.mo ]; then \ 184 + if [ ! -d $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES ]; then \ 185 + mkdir -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ 186 + - chown $(INSTALL_USER):$(INSTALL_GROUP) $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ 187 + chmod 0755 $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ 188 + fi; \ 189 + $(INSTALL_MAN) $$lang.mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
+90
pkgs/by-name/pr/proftpd/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + libcap, 6 + libsodium, 7 + openssl, 8 + zlib, 9 + perl, 10 + ncurses, 11 + libxcrypt-legacy, 12 + removeReferencesTo, 13 + }: 14 + 15 + let 16 + perl' = perl.override { 17 + libxcrypt = libxcrypt-legacy; 18 + }; 19 + in 20 + stdenv.mkDerivation (finalAttrs: { 21 + pname = "proftpd"; 22 + version = "1.3.8c"; 23 + 24 + src = fetchFromGitHub { 25 + owner = "proftpd"; 26 + repo = "proftpd"; 27 + tag = "v${finalAttrs.version}"; 28 + hash = "sha256-wHcJJiGY8ULVIMo6RVEE7ne6YZM7gECt2IygPhX+3cU="; 29 + }; 30 + 31 + patches = [ ./no-install-user.patch ]; 32 + 33 + strictDeps = true; 34 + enableParallelBuilding = true; 35 + 36 + outputs = [ 37 + "out" 38 + "man" 39 + "dev" 40 + ]; 41 + 42 + buildInputs = [ 43 + libcap 44 + libsodium 45 + openssl 46 + zlib 47 + perl' 48 + ncurses 49 + ]; 50 + 51 + nativeBuildInputs = [ removeReferencesTo ]; 52 + 53 + configureFlags = [ 54 + "--enable-openssl" 55 + "--with-modules=mod_sftp" 56 + ]; 57 + 58 + postInstall = '' 59 + patchShebangs $out/bin 60 + 61 + # This causes a cyclic dependency between $out and $dev, but for 62 + # no good reason: `--enable-dso` is disabled, so this isn't functional 63 + # and even then we'd need special support for building custom proftpd 64 + # modules since installing stuff into the store later on 65 + # doesn't work anyways. 66 + rm $out/bin/prxs 67 + 68 + # Remove unneeded directories: 69 + # * var doesn't make sense in the store 70 + # * share/locale is not used 71 + # * libexec seems to be needed for custom modules 72 + # only which is not supported by this package. 73 + rm -r $out/{var,share,libexec} 74 + ''; 75 + 76 + postFixup = '' 77 + # Strip away configure flags from proftpd that point to $dev. 78 + remove-references-to -t $dev $out/bin/* 79 + ''; 80 + 81 + meta = { 82 + homepage = "http://www.proftpd.org/"; 83 + maintainers = lib.teams.flyingcircus.members; 84 + license = lib.licenses.gpl2Plus; 85 + mainProgram = "proftpd"; 86 + platforms = lib.platforms.unix; 87 + changelog = "http://proftpd.org/docs/RELEASE_NOTES-${finalAttrs.version}"; 88 + description = "Highly configurable GPL-licensed FTP server software"; 89 + }; 90 + })