diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | adchpp-2.11.0-fix_cflags.patch | 78 | ||||
-rw-r--r-- | adchpp-2.8.0-fix_config_paths.patch | 84 | ||||
-rw-r--r-- | adchpp-2.9.0-fix_log_path.patch | 11 | ||||
-rw-r--r-- | adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch | 20 |
7 files changed, 202 insertions, 5 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Sun Mar 4 13:28:05 UTC 2018 +# Sun Feb 3 00:17:36 UTC 2019 pkgbase = adchpp pkgdesc = ADCH++ is a hub software for the ADC network. pkgver = 2.12.1 @@ -24,8 +24,8 @@ pkgbase = adchpp source = adchpp.sysuser source = http://data.gpo.zugaina.org/klondike/net-p2p/adchpp/files/adchpp-2.8.0-fix_config_paths.patch source = http://data.gpo.zugaina.org/klondike/net-p2p/adchpp/files/adchpp-2.11.0-fix_cflags.patch - source = adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch::https://sl1pkn07.wtf/paste/view/raw/9b86555d - source = adchpp-2.9.0-fix_log_path.patch::https://sl1pkn07.wtf/paste/view/raw/9e06ad93 + source = adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch + source = adchpp-2.9.0-fix_log_path.patch sha256sums = ee839daa4d392e01da204475d625f92050ba3370a3a20c5288d8d37e7dcbcbb6 sha256sums = 408dace5cbe39f93b814b517250ba0ca5729f2d01e2183a467c5acdbbefb78f2 sha256sums = a538ea4dbbbf2f0519f28ac070750d951828902d1c7df658718158f85bf7d524 diff --git a/.gitignore b/.gitignore index d4c77ef7e207..1574584581f0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,7 @@ !adchpp.service !adchpp.tmpfile !adchpp.sysuser +!adchpp-2.8.0-fix_config_paths.patch +!adchpp-2.9.0-fix_log_path.patch +!adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch +!adchpp-2.11.0-fix_cflags.patch @@ -26,8 +26,8 @@ source=("http://downloads.sourceforge.net/project/adchpp/Releases/ADCH%2B%2B%202 'adchpp.sysuser' 'http://data.gpo.zugaina.org/klondike/net-p2p/adchpp/files/adchpp-2.8.0-fix_config_paths.patch' 'http://data.gpo.zugaina.org/klondike/net-p2p/adchpp/files/adchpp-2.11.0-fix_cflags.patch' - 'adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch::https://sl1pkn07.wtf/paste/view/raw/9b86555d' - 'adchpp-2.9.0-fix_log_path.patch::https://sl1pkn07.wtf/paste/view/raw/9e06ad93' + 'adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch' + 'adchpp-2.9.0-fix_log_path.patch' ) sha256sums=('ee839daa4d392e01da204475d625f92050ba3370a3a20c5288d8d37e7dcbcbb6' '408dace5cbe39f93b814b517250ba0ca5729f2d01e2183a467c5acdbbefb78f2' diff --git a/adchpp-2.11.0-fix_cflags.patch b/adchpp-2.11.0-fix_cflags.patch new file mode 100644 index 000000000000..a60a79b6e151 --- /dev/null +++ b/adchpp-2.11.0-fix_cflags.patch @@ -0,0 +1,78 @@ +diff -ur adchpp_2.9.0_source.orig/SConstruct adchpp_2.9.0_source/SConstruct +--- adchpp_2.9.0_source.orig/SConstruct 2013-02-07 21:31:11.952964272 +0100 ++++ adchpp_2.9.0_source/SConstruct 2013-02-07 21:33:06.574966920 +0100 +@@ -6,9 +6,9 @@ + from build_util import Dev + + gcc_flags = { +- 'common': ['-g', '-Wall', '-Wextra', '-Wno-unused-parameter', '-Wno-unused-value', '-Wno-missing-field-initializers', '-Wno-address', '-Wno-unknown-pragmas', '-fexceptions'], ++ 'common': ['-fexceptions'], + 'debug': [], +- 'release' : ['-O3', '-fno-ipa-cp-clone'] ++ 'release' : [] + } + + gcc_xxflags = { +@@ -45,7 +45,7 @@ + } + + gcc_link_flags = { +- 'common' : ['-g', '$UNDEF', '-time'], ++ 'common' : ['$UNDEF', '-time'], + 'debug' : [], + 'release' : ['-O3'] + } +@@ -77,6 +77,22 @@ + langs = ['lua', 'python', 'ruby'] + + defEnv = Environment(ENV = os.environ) ++ ++if 'CC' in os.environ: ++ defEnv.Replace(CC = os.environ['CC']) ++ ++if 'CXX' in os.environ: ++ defEnv.Replace(CXX = os.environ['CXX']) ++ ++if 'CCFLAGS' in os.environ: ++ defEnv.Replace(CCFLAGS = os.environ['CCFLAGS'].split()) ++ ++if 'CXXFLAGS' in os.environ: ++ defEnv.Replace(CXXFLAGS = os.environ['CXXFLAGS'].split()) ++ ++if 'LINKFLAGS' in os.environ: ++ defEnv.Replace(CXXFLAGS = os.environ['LINKFLAGS'].split()) ++ + opts = Variables('custom.py', ARGUMENTS) + + if sys.platform == 'win32': +@@ -111,6 +127,21 @@ + + env = Environment(ENV = os.environ, tools = [defEnv['tools'], 'swig'], toolpath = ['tools'], options = opts, TARGET_ARCH = TARGET_ARCH, MSVS_ARCH = TARGET_ARCH) + ++if 'CC' in os.environ: ++ env.Replace(CC = os.environ['CC']) ++ ++if 'CXX' in os.environ: ++ env.Replace(CXX = os.environ['CXX']) ++ ++if 'CCFLAGS' in os.environ: ++ env.Replace(CCFLAGS = os.environ['CCFLAGS'].split()) ++ ++if 'CXXFLAGS' in os.environ: ++ env.Replace(CXXFLAGS = os.environ['CXXFLAGS'].split()) ++ ++if 'LINKFLAGS' in os.environ: ++ env.Replace(CXXFLAGS = os.environ['LINKFLAGS'].split()) ++ + # filter out boost from dependencies to get a speedier rebuild scan + # this means that if boost changes, scons -c needs to be run + # delete .sconsign.dblite to see the effects of this if you're upgrading +@@ -143,8 +174,6 @@ + + if env['savetemps']: + env.Append(CCFLAGS = ['-save-temps', '-fverbose-asm']) +- else: +- env.Append(CCFLAGS = ['-pipe']) + + # require i686 instructions for atomic<int64_t>, used by boost::lockfree (otherwise lockfree + # lists won't actually be lock-free). diff --git a/adchpp-2.8.0-fix_config_paths.patch b/adchpp-2.8.0-fix_config_paths.patch new file mode 100644 index 000000000000..2598ca659322 --- /dev/null +++ b/adchpp-2.8.0-fix_config_paths.patch @@ -0,0 +1,84 @@ +diff -ru adchpp_2.8.0_source.orig//etc/Script.xml adchpp_2.8.0_source//etc/Script.xml +--- adchpp_2.8.0_source.orig//etc/Script.xml 2012-02-24 07:15:25.529177571 +0100 ++++ adchpp_2.8.0_source//etc/Script.xml 2012-02-24 08:11:11.750184714 +0100 +@@ -1,7 +1,7 @@ + <?xml version="1.0" encoding="utf-8" standalone="yes"?>
+ <!--Ensure that you load the scripts in this order so that they work correctly.-->
+ <ScriptPlugin>
+- <Engine language="lua" scriptPath="Scripts/">
++ <Engine language="lua" scriptPath="%%ADCHPPSHARE%%/scripts/">
+ <Script>access.lua</Script>
+ <Script>access.bans.lua</Script>
+ <Script>access.guard.lua</Script>
+diff -ru adchpp_2.8.0_source.orig//etc/adchpp.xml adchpp_2.8.0_source//etc/adchpp.xml +--- adchpp_2.8.0_source.orig//etc/adchpp.xml 2012-02-24 07:15:25.529177571 +0100 ++++ adchpp_2.8.0_source//etc/adchpp.xml 2012-02-24 08:11:11.750184714 +0100 +@@ -20,7 +20,7 @@ + through strftime with the current time (see any standard c library reference
+ to find out what works...). There's not much logging done at all btw, but
+ plugins can use the logs as well... -->
+- <LogFile type="string">logs/adchpp%Y%m.log</LogFile>
++ <LogFile type="string">%%ADCHPPLOG%%/adchpp%Y%m.log</LogFile>
+
+ <!-- Advanced connection settings (don't change unless you at least think you know what you're doing) -->
+
+@@ -61,7 +61,7 @@ +
+ To create secure connections, set TLS="1" and define the following (preferably absolute)
+ paths: Certificate, PrivateKey, TrustedPath, DHParams. An example secure server setting:
+- <Server Port="2780" TLS="1" Certificate="certs/cacert.pem" PrivateKey="certs/privkey.pem" TrustedPath="certs/trusted/" DHParams="certs/dhparam.pem"/>
++ <Server Port="2780" TLS="1" Certificate="%%ADCHPPETC%%/certs/cacert.pem" PrivateKey="%%ADCHPPETC%%/certs/privkey.pem" TrustedPath="%%ADCHPPETC%%/certs/trusted/" DHParams="%%ADCHPPETC%%/certs/dhparam.pem"/>
+
+ Simple OpenSSL commands to generate files used for secure connections:
+ openssl genrsa -out privkey.pem 2048
+@@ -82,9 +82,7 @@ + if someone's written a script plugin for it. You must specify the path to your
+ plugins in linux default place it looks for the plugin path is /home/<username>/adchpp/ -->
+
+- <!--Plugins Path="~/adchpp/"-->
+-
+- <Plugins>
++ <Plugins Path="%%ADCHPPLIB%%/">
+ <!-- This plugins provides the scripting support. -->
+ <Plugin>Script</Plugin>
+ <!-- Bloom filter plugin, helps save upload bandwidth at a slight expense of memory and download bandwidth -->
+diff -ru adchpp_2.8.0_source.orig//pyutil/adchpp.py adchpp_2.8.0_source//pyutil/adchpp.py +--- adchpp_2.8.0_source.orig//pyutil/adchpp.py 2012-02-24 07:15:25.533177571 +0100 ++++ adchpp_2.8.0_source//pyutil/adchpp.py 2012-02-24 08:18:11.909185610 +0100 +@@ -1,6 +1,5 @@ + import sys,os
+-sys.path.append(os.path.abspath('../build/debug-default/bin/'))
+-sys.path.append(os.path.abspath('../build/debug-mingw/bin/'))
++sys.path.append(os.path.abspath('%%ADCHPPLIB%%'))
+
+ import pyadchpp as a
+
+@@ -18,7 +17,7 @@ + nicks = dict([(x.nick, x) for x in users if x.nick])
+ cids = dict([(x.cid, x) for x in users if x.cid])
+
+-configPath = os.path.abspath('../etc/') + os.sep
++configPath = os.path.abspath('%%ADCHPPETC%%') + os.sep
+ core = a.Core.create(configPath)
+
+ def findUser(nick, cid):
+diff -ru adchpp_2.8.0_source.orig//rbutil/adchpp.rb adchpp_2.8.0_source//rbutil/adchpp.rb +--- adchpp_2.8.0_source.orig//rbutil/adchpp.rb 2012-02-24 07:15:25.533177571 +0100 ++++ adchpp_2.8.0_source//rbutil/adchpp.rb 2012-02-24 08:14:33.845185144 +0100 +@@ -1,6 +1,5 @@ +
+-$:.unshift(File.expand_path('../build/debug-default/bin/'))
+-$:.unshift(File.expand_path('../build/release-default/bin/'))
++$:.unshift(File.expand_path('%%ADCHPPLIB%%'))
+
+ puts "Loading module..."
+
+@@ -8,7 +7,7 @@ +
+ a = Rbadchpp
+
+-config_path = File.expand_path("../etc/") + '/'
++config_path = File.expand_path("%%ADCHPPETC%%") + '/'
+ puts "Configuration path is #{config_path}..."
+
+ core = a::Core.create(config_path)
diff --git a/adchpp-2.9.0-fix_log_path.patch b/adchpp-2.9.0-fix_log_path.patch new file mode 100644 index 000000000000..81dd675d3971 --- /dev/null +++ b/adchpp-2.9.0-fix_log_path.patch @@ -0,0 +1,11 @@ +--- adchpp/LogManager.cpp 2013-05-21 14:12:26.028801359 +0200 ++++ adchpp/LogManager.cpp-new 2013-05-21 14:55:19.793611710 +0200 +@@ -44,7 +44,7 @@ + dcdebug("Logging: %s\n", msg.c_str()); + signalLog_(msg); + if(getEnabled()) { +- string logFile = Util::formatTime(File::makeAbsolutePath(core.getConfigPath(), getLogFile())); ++ string logFile = Util::formatTime(File::makeAbsolutePath(getLogFile())); + FastMutex::Lock l(mtx); + try { + File f(logFile, File::WRITE, File::OPEN | File::CREATE); diff --git a/adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch b/adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch new file mode 100644 index 000000000000..57bb2c33806c --- /dev/null +++ b/adchpp-2.9.0-fix_store_files_in_config_dir_access.guard_plugin.patch @@ -0,0 +1,20 @@ +--- plugins/Script/examples/access.guard.lua 2012-10-23 18:29:12.000000000 +0200 ++++ plugins/Script/examples/access.guard.lua-new 2013-05-21 13:58:43.667172013 +0200 +@@ -56,7 +56,7 @@ + local li_settings_file = adchpp.Util_getCfgPath() .. "li_settings.txt" + local en_settings_file = adchpp.Util_getCfgPath() .. "en_settings.txt" + local fldb_folder = "FL_DataBase" +-local script_path = base.scriptPath .. '/' ++local script_path = adchpp.Util_getCfgPath() .. '/' + local fldb_path = script_path .. fldb_folder .. '/' + local fldb_path = string.gsub(fldb_path, '\\', '/') + local fldb_path = string.gsub(fldb_path, '//+', '/') +@@ -166,7 +166,7 @@ + local file = io.open(tmpbanstats_file, "r") + if not file then + log('The folder '.. fldb_path .. ' was not found, creating it ...') +- fldb_folder_exist = os.execute("mkdir ".. fldb_folder) ++ fldb_folder_exist = os.execute("mkdir ".. fldb_path) + else + file:close() + end |