aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2019-01-05 10:16:33 +0800
committerswills <swills@FreeBSD.org>2019-01-05 10:16:33 +0800
commitc14871d887829594ba224bc8421720c6de5b6f4d (patch)
tree15a9e6599f71e1906ddf174b908fe1ad220e84dd
parentc5eddb991eb6f1f76c7a8634c6a32f5a91fcc72f (diff)
downloadfreebsd-ports-gnome-c14871d887829594ba224bc8421720c6de5b6f4d.tar.gz
freebsd-ports-gnome-c14871d887829594ba224bc8421720c6de5b6f4d.tar.zst
freebsd-ports-gnome-c14871d887829594ba224bc8421720c6de5b6f4d.zip
www/apt-cacher-ng: Restore SSL option
While here, move acngtool and acngfs into sbin and set tigher permissions on sample security config PR: 234582 Submitted by: keve@keve.hu (maintainer)
-rw-r--r--www/apt-cacher-ng/Makefile21
-rw-r--r--www/apt-cacher-ng/files/patch-conf_acng.conf.in2
-rw-r--r--www/apt-cacher-ng/files/patch-fs_CMakeLists.txt6
-rw-r--r--www/apt-cacher-ng/files/patch-source_CMakeLists.txt6
-rw-r--r--www/apt-cacher-ng/files/patch-source_acfg__defaults.cc2
-rw-r--r--www/apt-cacher-ng/files/patch-source_acngtool.cc13
-rw-r--r--www/apt-cacher-ng/files/patch-source_tcpconnect.cc17
-rw-r--r--www/apt-cacher-ng/pkg-plist12
8 files changed, 60 insertions, 19 deletions
diff --git a/www/apt-cacher-ng/Makefile b/www/apt-cacher-ng/Makefile
index 29a60129ee5c..338774ea2bb5 100644
--- a/www/apt-cacher-ng/Makefile
+++ b/www/apt-cacher-ng/Makefile
@@ -2,6 +2,7 @@
PORTNAME= apt-cacher-ng
PORTVERSION= 3.2
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= DEBIAN_POOL/apt-cacher-ng
DISTFILES= ${PORTNAME}_${PORTVERSION}.orig${EXTRACT_SUFX}
@@ -14,21 +15,27 @@ LICENSE_NAME= Eduard Bloch license
LICENSE_FILE= ${WRKSRC}/COPYING
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
-USES= compiler:c++11-lang cmake ssl tar:xz
+USES= compiler:c++11-lang cmake tar:xz
USE_RC_SUBR= apt_cacher_ng
CMAKE_ARGS= -DLIBDIR:PATH=${DATADIR} \
- -DMANDIR:PATH=${PREFIX}/man \
- -Dopenssl_FOUND=1 \
- -Dopenssl_CFLAGS="-I ${OPENSSLINC}" \
- -Dopenssl_LDFLAGS="-L ${OPENSSLLIB} -lssl -lcrypto"
-CMAKE_ON= USE_SSL
+ -DMANDIR:PATH=${PREFIX}/man
+
SUB_FILES= backends_debian backends_freebsd backends_ubuntu \
freebsd_mirrors pkg-message
-OPTIONS_DEFINE= DOCS FUSE
+OPTIONS_DEFINE= DOCS SSL FUSE
+OPTIONS_DEFAULT= SSL
OPTIONS_SUB= yes
+SSL_DESC= SSL support to allow proxying https sites
+
+SSL_CMAKE_BOOL= USE_SSL
+SSL_USES= ssl
+SSL_CMAKE_ON= -Dopenssl_FOUND=1 \
+ -Dopenssl_CFLAGS="-I ${OPENSSLINC}" \
+ -Dopenssl_LDFLAGS="-L ${OPENSSLLIB} -lssl -lcrypto"
+
FUSE_DESC= FUSE support for interfacing with the proxy via acngfs
FUSE_CMAKE_BOOL= USE_FUSE
diff --git a/www/apt-cacher-ng/files/patch-conf_acng.conf.in b/www/apt-cacher-ng/files/patch-conf_acng.conf.in
index c3eb1ddf9c95..e9b488943761 100644
--- a/www/apt-cacher-ng/files/patch-conf_acng.conf.in
+++ b/www/apt-cacher-ng/files/patch-conf_acng.conf.in
@@ -1,6 +1,6 @@
--- conf/acng.conf.in.orig 2018-09-07 13:02:18 UTC
+++ conf/acng.conf.in
-@@ -69,6 +69,7 @@ Remap-epel: file:epel_mirrors # Fedora EPEL
+@@ -69,6 +69,7 @@ Remap-epel: file:epel_mirrors # Fedora
Remap-slrep: file:sl_mirrors # Scientific Linux
Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo # Gentoo Archives
Remap-secdeb: security.debian.org ; security.debian.org deb.debian.org/debian-security
diff --git a/www/apt-cacher-ng/files/patch-fs_CMakeLists.txt b/www/apt-cacher-ng/files/patch-fs_CMakeLists.txt
index d64c74c6fe87..52f58b663b67 100644
--- a/www/apt-cacher-ng/files/patch-fs_CMakeLists.txt
+++ b/www/apt-cacher-ng/files/patch-fs_CMakeLists.txt
@@ -11,14 +11,16 @@
pkg_check_modules(fuse fuse)
_append(acngfs_cflags -DMINIBUILD ${fuse_CFLAGS} ${CFLAGS_PTHREAD})
-@@ -22,6 +26,7 @@ if(fuse_FOUND AND HAVE_FUSE_25)
+@@ -22,7 +26,8 @@ if(fuse_FOUND AND HAVE_FUSE_25)
ADD_EXECUTABLE(acngfs ${fsSRCS} $<TARGET_OBJECTS:osslcompat>)
SET_TARGET_PROPERTIES(acngfs PROPERTIES COMPILE_FLAGS "${ACNG_COMPFLAGS} ${ACNG_CXXFLAGS} ${acngfs_cflags}")
+- INSTALL(TARGETS acngfs DESTINATION ${LIBDIR})
+ target_compile_features(acngfs PRIVATE cxx_auto_type)
- INSTALL(TARGETS acngfs DESTINATION ${LIBDIR})
++ INSTALL(TARGETS acngfs DESTINATION ${SBINDIR})
if(HAVE_DLOPEN)
_append(EXTRA_LIBS_ACNGFS dl)
+ endif()
@@ -32,4 +37,4 @@ else(fuse_FOUND AND HAVE_FUSE_25)
message("- FUSE not found or not compatible, not building acngfs")
endif(fuse_FOUND AND HAVE_FUSE_25)
diff --git a/www/apt-cacher-ng/files/patch-source_CMakeLists.txt b/www/apt-cacher-ng/files/patch-source_CMakeLists.txt
index 722dc8ef4a8b..3335488b2f36 100644
--- a/www/apt-cacher-ng/files/patch-source_CMakeLists.txt
+++ b/www/apt-cacher-ng/files/patch-source_CMakeLists.txt
@@ -1,6 +1,6 @@
--- source/CMakeLists.txt.orig 2018-09-07 13:02:18 UTC
+++ source/CMakeLists.txt
-@@ -2,14 +2,17 @@ set(SHAREDSRCS acbuf.cc acfg.cc acfg_defaults.cc aclog
+@@ -2,15 +2,18 @@ set(SHAREDSRCS acbuf.cc acfg.cc acfg_def
set(ACNG_SRCS apt-cacher.cc bgtask.cc cacheman.cc cleaner.cc conn.cc conserver.cc expiration.cc job.cc lockable.cc maintenance.cc mirror.cc pkgimport.cc rfc2553emu.cc showinfo.cc)
ADD_LIBRARY(acngstuff OBJECT ${SHAREDSRCS})
@@ -17,4 +17,6 @@
+target_compile_features(acngtool PRIVATE cxx_auto_type)
SET_TARGET_PROPERTIES(acngtool PROPERTIES COMPILE_FLAGS "${ACNG_COMPFLAGS} ${ACNG_CXXFLAGS} ${CFLAGS_PTHREAD}")
TARGET_LINK_LIBRARIES(acngtool ${BaseNetworkLibs} ${CompLibs} ${SSL_LIB_LIST} ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_LIBS_ACNGTOOL})
- INSTALL(TARGETS acngtool DESTINATION ${LIBDIR})
+-INSTALL(TARGETS acngtool DESTINATION ${LIBDIR})
++INSTALL(TARGETS acngtool DESTINATION ${SBINDIR})
+
diff --git a/www/apt-cacher-ng/files/patch-source_acfg__defaults.cc b/www/apt-cacher-ng/files/patch-source_acfg__defaults.cc
index 15b0119eb1a0..7c2e7a4921a6 100644
--- a/www/apt-cacher-ng/files/patch-source_acfg__defaults.cc
+++ b/www/apt-cacher-ng/files/patch-source_acfg__defaults.cc
@@ -1,6 +1,6 @@
--- source/acfg_defaults.cc.orig 2018-09-07 13:02:18 UTC
+++ source/acfg_defaults.cc
-@@ -40,6 +40,9 @@ string pfilepat(".*(\\.(u|d)?deb|\\.rpm|\\.drpm|\\.dsc
+@@ -40,6 +40,9 @@ string pfilepat(".*(\\.(u|d)?deb|\\.rpm|
"|\\.asc$" // all remaining PGP signatures. Assuming that volatile ones are matched below.
"|changelogs/pool/.*/changelog.txt$" // packages.ultimediaos.com
"|/objects/.*/.*\\.(dirtree|filez|commit|commitmeta)|/repo/deltas/.*" // FlatPak
diff --git a/www/apt-cacher-ng/files/patch-source_acngtool.cc b/www/apt-cacher-ng/files/patch-source_acngtool.cc
new file mode 100644
index 000000000000..2ddff95f00da
--- /dev/null
+++ b/www/apt-cacher-ng/files/patch-source_acngtool.cc
@@ -0,0 +1,13 @@
+--- source/acngtool.cc.orig 2018-09-07 13:02:18 UTC
++++ source/acngtool.cc
+@@ -562,8 +562,10 @@ int maint_job()
+ if (!ids.send(m_conFd))
+ return;
+
++#ifdef HAVE_SSL
+ m_ssl = nullptr;
+ m_bio = nullptr;
++#endif
+ // better match the TCP socket parameters
+ m_sHostName = "localhost";
+ m_sPort = sDefPortHTTP;
diff --git a/www/apt-cacher-ng/files/patch-source_tcpconnect.cc b/www/apt-cacher-ng/files/patch-source_tcpconnect.cc
new file mode 100644
index 000000000000..e10141f199a3
--- /dev/null
+++ b/www/apt-cacher-ng/files/patch-source_tcpconnect.cc
@@ -0,0 +1,17 @@
+--- source/tcpconnect.cc.orig 2018-09-07 13:02:18 UTC
++++ source/tcpconnect.cc
+@@ -41,13 +41,13 @@ atomic_int nConCount(0), nDisconCount(0)
+ #include <openssl/crypto.h>
+ #include <openssl/x509_vfy.h>
+ #include <openssl/x509v3.h>
+-#endif
+ #ifndef HAVE_SSL_HOST_VALIDATION
+ extern "C"
+ {
+ #include "oldssl-workaround/openssl_hostname_validation.h"
+ }
+ #endif
++#endif
+
+ namespace acng
+ {
diff --git a/www/apt-cacher-ng/pkg-plist b/www/apt-cacher-ng/pkg-plist
index c562b1cb74b2..702a12a57a90 100644
--- a/www/apt-cacher-ng/pkg-plist
+++ b/www/apt-cacher-ng/pkg-plist
@@ -2,13 +2,8 @@
@sample %%ETCDIR%%/backends_debian.sample
@sample %%ETCDIR%%/backends_freebsd.sample
@sample %%ETCDIR%%/backends_ubuntu.sample
-@sample %%ETCDIR%%/security.conf.sample
+@sample(proxy,proxy,400) %%ETCDIR%%/security.conf.sample
etc/avahi/services/apt-cacher-ng.service
-%%FUSE%%man/man8/acngfs.8.gz
-man/man8/apt-cacher-ng.8.gz
-sbin/apt-cacher-ng
-%%FUSE%%%%DATADIR%%/acngfs
-%%DATADIR%%/acngtool
%%DATADIR%%/archlx_mirrors
%%DATADIR%%/backends_debian.default
%%DATADIR%%/backends_gentoo.default
@@ -29,6 +24,9 @@ sbin/apt-cacher-ng
%%DATADIR%%/style.css
%%DATADIR%%/ubuntu_mirrors
%%DATADIR%%/userinfo.html
+sbin/apt-cacher-ng
+sbin/acngtool
+%%FUSE%%sbin/acngfs
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TODO
@@ -45,5 +43,7 @@ sbin/apt-cacher-ng
%%PORTDOCS%%%%DOCSDIR%%/html/secure.html
%%PORTDOCS%%%%DOCSDIR%%/html/troublefaq.html
%%PORTDOCS%%%%DOCSDIR%%/html/usage.html
+man/man8/apt-cacher-ng.8.gz
+%%FUSE%%man/man8/acngfs.8.gz
@dir(proxy,proxy,755) /var/cache/apt-cacher-ng
@dir(proxy,proxy,755) /var/log/apt-cacher-ng