mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-26 09:46:09 +00:00
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)
This commit is contained in:
parent
3d9186a781
commit
e64f5eae85
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=489293
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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})
|
||||
|
||||
|
@ -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
|
||||
|
13
www/apt-cacher-ng/files/patch-source_acngtool.cc
Normal file
13
www/apt-cacher-ng/files/patch-source_acngtool.cc
Normal file
@ -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;
|
17
www/apt-cacher-ng/files/patch-source_tcpconnect.cc
Normal file
17
www/apt-cacher-ng/files/patch-source_tcpconnect.cc
Normal file
@ -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
|
||||
{
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user