diff options
Diffstat (limited to 'net-irc/znc')
-rw-r--r-- | net-irc/znc/Manifest | 20 | ||||
-rw-r--r-- | net-irc/znc/files/README.gentoo | 22 | ||||
-rw-r--r-- | net-irc/znc/files/znc-1.6.1-create-pidfile-per-default.patch | 23 | ||||
-rw-r--r-- | net-irc/znc/files/znc-1.6.1-systemwideconfig.patch | 215 | ||||
-rw-r--r-- | net-irc/znc/files/znc-1.7.0-inttest-fix-make-warning.patch | 26 | ||||
-rw-r--r-- | net-irc/znc/files/znc-1.7.1-inttest-dir.patch (renamed from net-irc/znc/files/znc-1.7.0-inttest-dir.patch) | 19 | ||||
-rw-r--r-- | net-irc/znc/files/znc.initd-r1 | 39 | ||||
-rw-r--r-- | net-irc/znc/metadata.xml | 1 | ||||
-rw-r--r-- | net-irc/znc/znc-1.6.5.ebuild | 130 | ||||
-rw-r--r-- | net-irc/znc/znc-1.6.6.ebuild | 129 | ||||
-rw-r--r-- | net-irc/znc/znc-1.7.1.ebuild (renamed from net-irc/znc/znc-1.7.0.ebuild) | 14 | ||||
-rw-r--r-- | net-irc/znc/znc-9999.ebuild | 9 |
12 files changed, 31 insertions, 616 deletions
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest index 660f62433bc6..1b428a6e26ff 100644 --- a/net-irc/znc/Manifest +++ b/net-irc/znc/Manifest @@ -1,19 +1,9 @@ -AUX README.gentoo 768 BLAKE2B 83e7cdf538b89a8ef6ab242c9f1d5b01dd5a57aa4dc5b4f1b96998fbe0e01fb554c2d6de02fc552a1ac4ab26584a7fa14c19a96b4eda1ebd0367b68f965c2402 SHA512 627d3a8291e228fbeb783e61f46fe82f45ebc2a3647962c9bda150651d9bcadef699b6318083fc2396e6acc988ddf0ae1c01694e618d099591fa0db0258879d6 AUX README.gentoo-r1 530 BLAKE2B 5feab666142884c67c3c1a51322bb614bbdbaa453a4b6a4eb17b9fe774e4a4b188471a449f2cb5a1d07845a02a5eb15f2fad08958a839306d2029f56e8306543 SHA512 d5be4c0fc0069e6e8c6bf92f281034a603d6041f2b9a54d4fa97cae662225095d4473f54c4573141396ecccf369158f6c0986cafb9c39837edf9ab15200c8e18 -AUX znc-1.6.1-create-pidfile-per-default.patch 650 BLAKE2B 1316a818971396db3f2fea706afe57435a176db0f47e0e05fd5c53eeff9c5dfb2ffed201b75cd0bc9edbc521a962cb28ac1b8ac11d69729a41a1d01e3b7cd6ae SHA512 2e2342c8f87a58cd1703f19d3d76f58ac4c92a049de5b342dd46c2476a1344cbb9f85743fe387713a2465006f71f1379951d7f3770019f1867544b6705e0e8ec -AUX znc-1.6.1-systemwideconfig.patch 8079 BLAKE2B f0ae13248ba1f49a8f4c7e49ea06c1107ebefdb916d09f8e45f21368f194daa33e0edd005595c9eb36014dab20e3a40e4fba13ec531fe40a3a18d71cc6183ebf SHA512 295a08dd5ce43b217e816148e272b722dff1a956ccdb5e58b0d337b7929a2bdae4e017ec686e820f89e53b310dd86ea8668095134d9618e5552ec323b83e624d -AUX znc-1.7.0-inttest-dir.patch 1868 BLAKE2B be859b4aeb0c0d052a72780518c85e7b2bcdc4c9fd871a1584d31bf6f01296bd8dcbdf53980dc794689e82fdebaa495c8da5ad65d736efb858f38237d56a3d8a SHA512 5f6b57f1d3c26028f06841f1e7c5db065cb8c6475dc4f6ca75f46603ad25041b6be03ae9ca5e45961812ce358092203e9fe82e0eee8d1a8e2a845a2940dcd74f -AUX znc-1.7.0-inttest-fix-make-warning.patch 1112 BLAKE2B 5404deec32a7126e10f1472681ea0b52785c2946a62eda4369cae39ec2e847bea3375f9118bdab9e98b21fc6291dbb9081cb8eef4864798203ddb9eb39676836 SHA512 6d3aef103e2f5b16bc6107ff69b38ff1814d692a46fca36e42df2c95dd94334a239b3576daaf2b49a3b56cea287e289a55f1ec6ddbf976bf80ebc8049cfb9a01 +AUX znc-1.7.1-inttest-dir.patch 2205 BLAKE2B f322f6884170c71ba537897d38c5ca2787937afdd2ac1fe0b0b4ab55ad7d453029bf4a8c748c5787fc4ed3b46e2b33c925cb962ec868f7a5c07356697a3039e2 SHA512 b74d136985546114604252be74e55e8f5e0740b678bdd224ea63cc3587d17d861c81c69b4bdea0aabc23e64097dda0097e97fbd80110c2c2a919b33d912d2dea AUX znc.confd-r1 720 BLAKE2B 4857a8bcd36ed1008a558ac7b067d6fad53b5d39c0df9130ca28d4ac3db3924a3a1200682c19c7e6f7869f22338b492f73bf6ccbc2b723d117c9eebc10a89838 SHA512 3ab102f64ea0572350c8595fd3739874da591c43a3dbc3a740c72c53bd7418fded721d478d1fb92de0c0d18131313ba6679e842a135dfe239ea3f42821d8e468 -AUX znc.initd-r1 914 BLAKE2B df6854929c0dbddc2fa75dec0b5b4103ffc9c6a6d9de05c9f04c0d36a4ffff28e834e42b22c363e24be03435088b2fa4428486c08adedb12ff3b484445545b0c SHA512 01f44ab51f6fa29383b4a4bc6e5f19928ebac6b32f73fb96906113596a904324dd53ef9dbb895a8dd29028f3523e6f7285d2d5b2ee43058fc017f0b47ae788c1 AUX znc.initd-r2 952 BLAKE2B 81346bf0a1581543683eb5c125b29474c0bc01b8aee11c036a134c5a01042059564f2982aaec65715ac0a2c87b64fcd9746464148a81daeee549f4228d6ff55f SHA512 c3d676796aaa485dcaebee0fba58a8f86560cd192e0e2ccf06f58346c1368f58aa5be1c1e5160f8105e3dc5c684d3d1f82eff6a4d7b87c07f11450b72288727f -DIST googletest-release-1.7.0.tar.gz 468653 BLAKE2B 8dfca8b79dcd7b64ce84bad11ee68c549f4fe3dff7638ed1d845af4a7f754ad5df782d2cbebdb9fecfda2499dae6585e07cda7a8c8c454f0b70723d5c9578aa4 SHA512 c623d5720c4ed574e95158529872815ecff478c03bdcee8b79c9b042a603533f93fe55f939bcfe2cd745ce340fd626ad6d9a95981596f1a4d05053d874cd1dfc DIST gtest-ba96d0b1161f540656efdaed035b3c062b60e006.tar.gz 987370 BLAKE2B fcedfe559c4c93166962900117dc492da3cbb99165c30766c39131c20e3b41f057a31a8cb631beaca829c1e9966e90cbc37469ba56a5fc15a2bea86cbe401a63 SHA512 ce78098f973b45f4a177db387c42a56d5ea34407a2af278760b850c326e8450760a58991d62a5408f5df79f89fefd10fee71745b7e8669b2a6f74fa63a259600 -DIST znc-1.6.5.tar.gz 1470681 BLAKE2B 9de0b211280489423bc2894d0e76d7276aa42428d07d64516372a9ca6d1616db1f27c0142b54160c61cbee89d65ceadf941d001319254dbff9eb5b016988482e SHA512 d78603ac86d1fb92cdf591b1eb6d32fa19b0e39414bd69e1300c537051612ae590c43d3b8e4dd598cdff605bf3aa1d3d5d806edd428d15d50f733e1670f3e626 -DIST znc-1.6.6.tar.gz 1471612 BLAKE2B 8bd977a95417c4259e9f38759d838f55a146f376dc8bb6230ab6e1b698fb7c9e060cbc237efd4e836961314abab56cc02e7c6bc74e40bad17abaf06e47fbb516 SHA512 cc5bc7328bfe36525ab215b4b53c7cd20aa02b41e7bb28507ff9d9632560f4c30396804e4b828bca0ece19f42813e3fce59d1bae639ea5fc149059f6979e63e7 -DIST znc-1.7.0.tar.gz 1853666 BLAKE2B 3e519d4005a10a9a5329f22ab6abbd19dfa2c7cecb949c138bc72909eae8883576fc0352e3ac46b852b8c58f038150419720aa48791a1339b004206f3afc20e9 SHA512 718dec65dfa2374c568b2694e4faef1f8cf313ae96d171e2263656e077e0fae5f8037c69a23ae33f4ea314ac6e15480c7dccef73ad3ac9324eb79caca622d54b -EBUILD znc-1.6.5.ebuild 3474 BLAKE2B fb127e5cb20f375da773dc5bf628ba6c4a4d45b408fe5f975768999c82a93844b2091511a90d694438743a0f165fb4afd1c774358fec09561be3fae64085715c SHA512 7a4c7f7d30eb63273fa75f6b925f11b2f426afea29de82dd1b33fdfcdaba911cf5172a564e230fc50d0a97c769389b963609c59169783f7a5354bf71ced2d0e4 -EBUILD znc-1.6.6.ebuild 3473 BLAKE2B 612f02114d9a058e109ee6f7185774bdc382e26abac72ff6b912997f1a8020ab67cbdd559739ffa5e7f121730d868ba54894fc333b63e41ae99706dca522d103 SHA512 06fc0f3897e7b2946f258cd48bc0a7ad689df339c2413cdddd7872a92774f17034d9d5f62e4d64222b62d07f1e321859428a05936f00775c63fa92805498456c -EBUILD znc-1.7.0.ebuild 5207 BLAKE2B 0e17aa348cb278d47df83da152646ec10b4d3ab9bdc1714b1cd86936b07c6acfc483640911fcde0badf1493455d42a7c6dcef38071d54108e55c2d8bc137d0e3 SHA512 9f3b4ceef80bafa6666d50e285f659a948a2a11493bac4f8a96e40d3d3e853e997d2efa691cc0e35a9fb91857555d773a8ddc07ea6e75622b8d9a67e546f5c5b -EBUILD znc-9999.ebuild 5149 BLAKE2B 31067d50828a946fec99fbe2f89ba6290ea9401ffb8ccf9eb9bd0f2dcb1c2cd3f2af9ce5931a89384d3ed347a3a4c35dc00d8ce20ad19e271ab98e0d1ac6dfd1 SHA512 843e39790b2d8687109a321d380dd3fc9ba3a2815badd24893cec9fdd996f5b43c0b61c6972dcd5c82aeb24eb5cabbb213f8183c7ea10a409fa85e67435d7c10 -MISC metadata.xml 633 BLAKE2B 506bc5b769694797c07165febefd08354b744a28644148d86901442a8d437cee7ec2552382eaa280cd99fe3c00cd2ae3adfded62980fe2fce31e550f00f4fc25 SHA512 58c2f6174c32c3b2bc52d5589844305cdac275d38bff7ec959d8a7e1eb14991789ba218f3dab2a993ab98ff0af7f7a574c3bfefdf7c9fd495043892732cb2502 +DIST znc-1.7.1.tar.gz 2041669 BLAKE2B 57ead136e28b0fc4a875802ef89ef004213789e68d19ceeab15c6fac6fe51ea51618764c484ea618fc6359d9c15cc7ffcf5529642d730b9217a4f127e92d9ae6 SHA512 907068fb0828091026d440145b70ca76109302f13c18d94f772660192434287f209a06a52da1dd39726b9a38735b3cea9afbd062eb6def4cd428bb73c562a902 +EBUILD znc-1.7.1.ebuild 5210 BLAKE2B 39e1bfeff0b6b062a85ce1f362a6cdc1a30434f8ff4d3e6f0ffb9c9e7c079834a76dea87f2ec955be4a2c2e5c32752ed42f1d7dbf597d498ffca43b3e92dafed SHA512 2bdbcfc173bf15f77619c07ec13f0e5af8a4a368c01f620ec830a52ae6e97ded36a986c251925911d8f232f978c7a5b7cfd2792cca5b390f53bea3f18d4c3ef1 +EBUILD znc-9999.ebuild 5211 BLAKE2B 4e17086ad59007af436fbbfafb225c9708c66bf47eed8936d43c63feee16d6597f99fe5286fce7e1efd347b9a55fe5ecc932756322813646dfc36cabf7e98c07 SHA512 761110da439be96c483c0b7253e83b12fcbe1574b8d8e226879cead14c54e11200c9fafb6d9234756751c3c2ba27bc974840d80d981e456260a657fb325872e5 +MISC metadata.xml 507 BLAKE2B c8926f6668f57c84f5715156a424b18f7cb01f0ea9ac6a499550f731a00c7de035ec270f89297bda07ac3115292deffdcd0f3a339484c9de5d8bd7170be00de6 SHA512 d69af8535c2e409e6b6e65bfd279d74bd89ce01e911e0d21b4079bd13328e47f3b959ef82531b833c702955225e01db6915f4fb3f94d048a05ce2107b61bf1a6 diff --git a/net-irc/znc/files/README.gentoo b/net-irc/znc/files/README.gentoo deleted file mode 100644 index 5b222a24f589..000000000000 --- a/net-irc/znc/files/README.gentoo +++ /dev/null @@ -1,22 +0,0 @@ -To run znc as a user, run 'znc --makeconf' to create a configuration file. - -If znc was compiled with the 'daemon' use flag, you may run - emerge --config znc -to configure it. - -To generate a new SSL certificate, run: - znc --system-wide-config-as znc --makepem -d /var/lib/znc -as root. - -If migrating from a user-based install, you can copy the existing -configuration files: - mkdir /var/lib/znc - mv /home/$USER/.znc/* /var/lib/znc - rm -rf /home/$USER/.znc - chown -R znc:znc /var/lib/znc -You may also adjust the location of the files and the user running znc -in /etc/conf.d/znc instead. - -To run as a daemon, please make sure that your configuration contains - PidFile = /run/znc/znc.pid -or that the PidFile value matches the one in /etc/conf.d/znc. diff --git a/net-irc/znc/files/znc-1.6.1-create-pidfile-per-default.patch b/net-irc/znc/files/znc-1.6.1-create-pidfile-per-default.patch deleted file mode 100644 index 8419e9344bf2..000000000000 --- a/net-irc/znc/files/znc-1.6.1-create-pidfile-per-default.patch +++ /dev/null @@ -1,23 +0,0 @@ -Add PidFile option to new configurations per default - -Our runscript requires that ZNC creates a pidfile. This patch will add -the PidFile directive to ZNC's default configuration. ---- - src/znc.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/znc.cpp b/src/znc.cpp -index b33e860..4a02568 100644 ---- a/src/znc.cpp -+++ b/src/znc.cpp -@@ -575,6 +575,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) { - VCString vsLines; - - vsLines.push_back(MakeConfigHeader()); -+ vsLines.push_back("PidFile = /run/znc/znc.pid"); - vsLines.push_back("Version = " + CString(VERSION_STR)); - - m_sConfigFile = ExpandConfigPath(sConfigFile); --- -2.5.0 - diff --git a/net-irc/znc/files/znc-1.6.1-systemwideconfig.patch b/net-irc/znc/files/znc-1.6.1-systemwideconfig.patch deleted file mode 100644 index d28fa30c219d..000000000000 --- a/net-irc/znc/files/znc-1.6.1-systemwideconfig.patch +++ /dev/null @@ -1,215 +0,0 @@ -Add system-wide daemon support. - -This patch adds system-wide daemon support to ZNC so that you can run -one ZNC instance system-wide using the new "--system-wide-config-as" -option. - -Patch is based on @mrueg version from 2012. - -X-Gentoo-Bug: 438430 -X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=438430 ---- - include/znc/znc.h | 3 ++ - src/main.cpp | 83 ++++++++++++++++++++++++++++++++++++++++--------------- - src/znc.cpp | 7 ++++- - 3 files changed, 70 insertions(+), 23 deletions(-) - -diff --git a/include/znc/znc.h b/include/znc/znc.h -index cf2326e..16394f9 100644 ---- a/include/znc/znc.h -+++ b/include/znc/znc.h -@@ -187,6 +187,8 @@ public: - - static void DumpConfig(const CConfig* Config); - -+ void SetSystemWideConfig(bool systemWideConfig); -+ - private: - CFile* InitPidFile(); - bool DoRehash(CString& sError); -@@ -231,6 +233,7 @@ protected: - unsigned int m_uiConnectPaused; - TCacheMap<CString> m_sConnectThrottle; - bool m_bProtectWebSessions; -+ bool m_bSystemWideConfig; - bool m_bHideVersion; - }; - -diff --git a/src/main.cpp b/src/main.cpp -index 09b2c9c..bd5cca6 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -16,6 +16,9 @@ - - #include <znc/znc.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #if defined(HAVE_LIBSSL) && defined(HAVE_PTHREAD) - #include <znc/Threads.h> -@@ -99,34 +102,36 @@ static inline int getopt_long(int argc, char * const argv[], const char *optstri - #endif - - static const struct option g_LongOpts[] = { -- { "help", no_argument, 0, 'h' }, -- { "version", no_argument, 0, 'v' }, -- { "debug", no_argument, 0, 'D' }, -- { "foreground", no_argument, 0, 'f' }, -- { "no-color", no_argument, 0, 'n' }, -- { "allow-root", no_argument, 0, 'r' }, -- { "makeconf", no_argument, 0, 'c' }, -- { "makepass", no_argument, 0, 's' }, -- { "makepem", no_argument, 0, 'p' }, -- { "datadir", required_argument, 0, 'd' }, -+ { "help", no_argument, 0, 'h' }, -+ { "version", no_argument, 0, 'v' }, -+ { "debug", no_argument, 0, 'D' }, -+ { "foreground", no_argument, 0, 'f' }, -+ { "no-color", no_argument, 0, 'n' }, -+ { "allow-root", no_argument, 0, 'r' }, -+ { "makeconf", no_argument, 0, 'c' }, -+ { "makepass", no_argument, 0, 's' }, -+ { "makepem", no_argument, 0, 'p' }, -+ { "datadir", required_argument, 0, 'd' }, -+ { "system-wide-config-as", required_argument, 0, 'S' }, - { 0, 0, 0, 0 } - }; - - static void GenerateHelp(const char *appname) { - CUtils::PrintMessage("USAGE: " + CString(appname) + " [options]"); - CUtils::PrintMessage("Options are:"); -- CUtils::PrintMessage("\t-h, --help List available command line options (this page)"); -- CUtils::PrintMessage("\t-v, --version Output version information and exit"); -- CUtils::PrintMessage("\t-f, --foreground Don't fork into the background"); -- CUtils::PrintMessage("\t-D, --debug Output debugging information (Implies -f)"); -- CUtils::PrintMessage("\t-n, --no-color Don't use escape sequences in the output"); -- CUtils::PrintMessage("\t-r, --allow-root Don't complain if ZNC is run as root"); -- CUtils::PrintMessage("\t-c, --makeconf Interactively create a new config"); -- CUtils::PrintMessage("\t-s, --makepass Generates a password for use in config"); -+ CUtils::PrintMessage("\t-h, --help List available command line options (this page)"); -+ CUtils::PrintMessage("\t-v, --version Output version information and exit"); -+ CUtils::PrintMessage("\t-f, --foreground Don't fork into the background"); -+ CUtils::PrintMessage("\t-D, --debug Output debugging information (Implies -f)"); -+ CUtils::PrintMessage("\t-n, --no-color Don't use escape sequences in the output"); -+ CUtils::PrintMessage("\t-r, --allow-root Don't complain if ZNC is run as root"); -+ CUtils::PrintMessage("\t-c, --makeconf Interactively create a new config"); -+ CUtils::PrintMessage("\t-s, --makepass Generates a password for use in config"); - #ifdef HAVE_LIBSSL -- CUtils::PrintMessage("\t-p, --makepem Generates a pemfile for use with SSL"); -+ CUtils::PrintMessage("\t-p, --makepem Generates a pemfile for use with SSL"); - #endif /* HAVE_LIBSSL */ -- CUtils::PrintMessage("\t-d, --datadir Set a different ZNC repository (default is ~/.znc)"); -+ CUtils::PrintMessage("\t-d, --datadir Set a different ZNC repository (default is ~/.znc)"); -+ CUtils::PrintMessage("\t-S, --system-wide-config-as Create a system-wide ZNC daemon configuration"); - } - - static void die(int sig) { -@@ -192,6 +197,8 @@ int main(int argc, char** argv) { - bool bMakeConf = false; - bool bMakePass = false; - bool bAllowRoot = false; -+ bool bSystemWideConfig = false; -+ CString sSystemWideConfigUser = "znc"; - bool bForeground = false; - #ifdef ALWAYS_RUN_IN_FOREGROUND - bForeground = true; -@@ -201,7 +208,7 @@ int main(int argc, char** argv) { - #endif - CZNC::CreateInstance(); - -- while ((iArg = getopt_long(argc, argv, "hvnrcspd:Df", g_LongOpts, &iOptIndex)) != -1) { -+ while ((iArg = getopt_long(argc, argv, "hvnrcspd:DfS:", g_LongOpts, &iOptIndex)) != -1) { - switch (iArg) { - case 'h': - GenerateHelp(argv[0]); -@@ -219,6 +226,10 @@ int main(int argc, char** argv) { - case 'c': - bMakeConf = true; - break; -+ case 'S': -+ bSystemWideConfig = true; -+ sSystemWideConfigUser = optarg; -+ break; - case 's': - bMakePass = true; - break; -@@ -254,8 +265,36 @@ int main(int argc, char** argv) { - return 1; - } - -+ if (bSystemWideConfig && getuid() == 0) { -+ struct passwd *pwd; -+ -+ pwd = getpwnam(sSystemWideConfigUser.c_str()); -+ if (pwd == NULL) { -+ CUtils::PrintError("Daemon user not found."); -+ return 1; -+ } -+ -+ if ((long) pwd->pw_uid == 0) { -+ CUtils::PrintError("Please define a daemon user other than root."); -+ return 1; -+ } -+ if (setgroups(0, NULL) != 0) { -+ CUtils::PrintError("setgroups: Unable to clear supplementary group IDs"); -+ return 1; -+ } -+ if (setgid((long) pwd->pw_gid) != 0) { -+ CUtils::PrintError("setgid: Unable to drop group privileges"); -+ return 1; -+ } -+ if (setuid((long) pwd->pw_uid) != 0) { -+ CUtils::PrintError("setuid: Unable to drop user privileges"); -+ return 1; -+ } -+ } -+ - CZNC* pZNC = &CZNC::Get(); - pZNC->InitDirs(((argc) ? argv[0] : ""), sDataDir); -+ pZNC->SetSystemWideConfig(bSystemWideConfig); - - #ifdef HAVE_LIBSSL - if (bMakePem) { -@@ -304,7 +343,7 @@ int main(int argc, char** argv) { - CUtils::PrintStatus(true, ""); - } - -- if (isRoot()) { -+ if (isRoot() && !bSystemWideConfig) { - CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid"); - CUtils::PrintError("reasons for this and it can, in theory, cause great damage!"); - if (!bAllowRoot) { -diff --git a/src/znc.cpp b/src/znc.cpp -index 78cda1a..b33e860 100644 ---- a/src/znc.cpp -+++ b/src/znc.cpp -@@ -55,6 +55,7 @@ CZNC::CZNC() { - m_sConnectThrottle.SetTTL(30000); - m_pLockFile = NULL; - m_bProtectWebSessions = true; -+ m_bSystemWideConfig = false; - m_bHideVersion = false; - m_uDisabledSSLProtocols = Csock::EDP_SSL; - m_sSSLProtocols = ""; -@@ -861,7 +862,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) { - CUtils::PrintMessage(""); - - File.UnLock(); -- return bFileOpen && CUtils::GetBoolInput("Launch ZNC now?", true); -+ return bFileOpen && !m_bSystemWideConfig && CUtils::GetBoolInput("Launch ZNC now?", true); - } - - void CZNC::BackupConfigOnce(const CString& sSuffix) { -@@ -1973,3 +1974,7 @@ void CZNC::LeakConnectQueueTimer(CConnectQueueTimer *pTimer) { - bool CZNC::WaitForChildLock() { - return m_pLockFile && m_pLockFile->ExLock(); - } -+ -+void CZNC::SetSystemWideConfig(bool systemWideConfig) { -+ m_bSystemWideConfig = systemWideConfig; -+} --- -2.5.0 - diff --git a/net-irc/znc/files/znc-1.7.0-inttest-fix-make-warning.patch b/net-irc/znc/files/znc-1.7.0-inttest-fix-make-warning.patch deleted file mode 100644 index 0be20e4c08d0..000000000000 --- a/net-irc/znc/files/znc-1.7.0-inttest-fix-make-warning.patch +++ /dev/null @@ -1,26 +0,0 @@ -From abee9f9bfc8c9ca9d4616238fdd812c4200b17d5 Mon Sep 17 00:00:00 2001 -From: Alexey Sokolov <alexey+znc@asokolov.org> -Date: Thu, 28 Jun 2018 23:57:29 +0100 -Subject: [PATCH] Fix a warning in integration test / gmake / znc-buildmod - interaction. - -It was requested on https://github.com/gentoo/gentoo/pull/8901 ---- - test/CMakeLists.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index b19c22fab..296cb0de7 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -85,5 +85,10 @@ externalproject_add(inttest_bin - "-DZNC_BIN_DIR:path=${CMAKE_INSTALL_FULL_BINDIR}" - "-DQt5_HINTS:path=${brew_qt5}") - add_custom_target(inttest COMMAND -+ # Prevent a warning from test of znc-buildmod, when inner make -+ # discovers that there is an outer make and tries to use it: -+ # gmake[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. -+ # This option doesn't affect ninja, which doesn't show that warning anyway. -+ ${CMAKE_COMMAND} -E env MAKEFLAGS= - "${CMAKE_CURRENT_BINARY_DIR}/integration/inttest") - add_dependencies(inttest inttest_bin) diff --git a/net-irc/znc/files/znc-1.7.0-inttest-dir.patch b/net-irc/znc/files/znc-1.7.1-inttest-dir.patch index 250eccc53fb6..9aff2a9b64be 100644 --- a/net-irc/znc/files/znc-1.7.0-inttest-dir.patch +++ b/net-irc/znc/files/znc-1.7.1-inttest-dir.patch @@ -1,3 +1,12 @@ +commit 95f1c7e9081866ea1e716743ea039a74565f80c6 +Author: Louis Sautier <sautier.louis@gmail.com> +Date: Sun Jul 15 15:36:21 2018 +0200 + + Allow integration tests to be run inside a different root + + Based on DarthGandalf's patch submitted in + https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15112014e7605d13624297d7601504b5d187a6de + diff --git a/include/znc/znc.h b/include/znc/znc.h index ecb2b41a..a791a648 100644 --- a/include/znc/znc.h @@ -28,15 +37,15 @@ index 5aec7805..6f9c34ae 100644 return ret; } diff --git a/src/WebModules.cpp b/src/WebModules.cpp -index 19ece50a..8ea4d9fa 100644 +index a5841987..f1b8a421 100644 --- a/src/WebModules.cpp +++ b/src/WebModules.cpp -@@ -563,7 +563,7 @@ CString CWebSock::GetSkinPath(const CString& sSkinName) { - sRet = CZNC::Get().GetCurPath() + "/webskins/" + sSkinName; +@@ -565,7 +565,7 @@ CString CWebSock::GetSkinPath(const CString& sSkinName) { + sRet = CZNC::Get().GetCurPath() + "/webskins/" + sSkin; if (!CFile::IsDir(sRet)) { -- sRet = CString(_SKINDIR_) + "/" + sSkinName; -+ sRet = CZNC::UnusualRoot() + CString(_SKINDIR_) + "/" + sSkinName; +- sRet = CString(_SKINDIR_) + "/" + sSkin; ++ sRet = CZNC::UnusualRoot() + CString(_SKINDIR_) + "/" + sSkin; } } diff --git a/net-irc/znc/files/znc.initd-r1 b/net-irc/znc/files/znc.initd-r1 deleted file mode 100644 index dedb44b1362f..000000000000 --- a/net-irc/znc/files/znc.initd-r1 +++ /dev/null @@ -1,39 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -extra_commands="config" -extra_started_commands="reload save" -command="/usr/bin/znc" -command_args="--datadir \"${ZNC_DATADIR}\"" -pidfile="${ZNC_PIDFILE:-/run/znc/znc.pid}" -user=${ZNC_USER:-znc} -group=${ZNC_GROUP:-znc} -start_stop_daemon_args="--chdir \"${ZNC_DATADIR}\" --user ${user} --group ${group} ${ZNC_SSDARGS}" -retry="${ZNC_TERMTIMEOUT}" - -required_dirs="${ZNC_DATADIR}" - -depend() { - use dns logger -} - -start_pre() { - checkpath -d -m 0770 -o ${user}:${group} "$(dirname ${pidfile})" -} - -stop_post() { - rm -f "${pidfile}" -} - -reload() { - ebegin "Reloading ZNC Configuration File from Disk" - start-stop-daemon --signal SIGHUP --pidfile "${pidfile}" - eend $? -} - -save() { - ebegin "Saving ZNC Configuration File to Disk" - start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}" - eend $? -} diff --git a/net-irc/znc/metadata.xml b/net-irc/znc/metadata.xml index 16293e77692c..b58dd845044e 100644 --- a/net-irc/znc/metadata.xml +++ b/net-irc/znc/metadata.xml @@ -6,7 +6,6 @@ <name>Louis Sautier</name> </maintainer> <use> - <flag name="daemon">Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.</flag> <flag name="zlib">Enable mod_deflate-like gzip support for znc's web interface using <pkg>sys-libs/zlib</pkg>.</flag> </use> <upstream> diff --git a/net-irc/znc/znc-1.6.5.ebuild b/net-irc/znc/znc-1.6.5.ebuild deleted file mode 100644 index 20fc31e09572..000000000000 --- a/net-irc/znc/znc-1.6.5.ebuild +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_{4,5,6} ) -inherit eutils python-single-r1 readme.gentoo-r1 systemd user - -MY_PV=${PV/_/-} -GTEST_VER="1.7.0" -GTEST_URL="https://github.com/google/googletest/archive/release-${GTEST_VER}.tar.gz -> googletest-release-${GTEST_VER}.tar.gz" -DESCRIPTION="An advanced IRC Bouncer" - -SRC_URI=" - http://znc.in/releases/archive/${PN}-${MY_PV}.tar.gz - test? ( ${GTEST_URL} ) -" -KEYWORDS="amd64 arm x86" - -HOMEPAGE="https://znc.in" -LICENSE="Apache-2.0" -SLOT="0" -IUSE="daemon debug +ipv6 +icu libressl perl python +ssl sasl tcl test +zlib" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - icu? ( dev-libs/icu:= ) - perl? ( >=dev-lang/perl-5.10:= ) - python? ( ${PYTHON_DEPS} ) - sasl? ( >=dev-libs/cyrus-sasl-2 ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tcl? ( dev-lang/tcl:0= ) - zlib? ( sys-libs/zlib ) -" -DEPEND=" - ${RDEPEND} - virtual/pkgconfig -" - -S=${WORKDIR}/${PN}-${MY_PV} - -PATCHES=( - "${FILESDIR}"/${PN}-1.6.1-systemwideconfig.patch - "${FILESDIR}"/${PN}-1.6.1-create-pidfile-per-default.patch -) - -pkg_setup() { - if use python; then - python-single-r1_pkg_setup - fi - if use daemon; then - enewgroup ${PN} - enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} - # The home directory was previously set to /dev/null - # This caused a bug with the systemd unit - # https://bugs.gentoo.org/521916 - esethome ${PN} /var/lib/${PN} - fi -} - -src_configure() { - econf \ - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ - $(use_enable debug) \ - $(use_enable icu charset) \ - $(use_enable ipv6) \ - $(use_enable perl) \ - $(use_enable python) \ - $(use_enable sasl cyrus) \ - $(use_enable ssl openssl) \ - $(use_enable tcl) \ - $(use_enable zlib) \ - $(use_with test gtest "${WORKDIR}/googletest-release-${GTEST_VER}") -} - -src_install() { - default - dodoc NOTICE - if use daemon; then - newinitd "${FILESDIR}"/znc.initd-r1 znc - newconfd "${FILESDIR}"/znc.confd-r1 znc - fi - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo") || die - DISABLE_AUTOFORMATTING=1 - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog - if [[ -d "${EROOT%/}"/etc/znc ]]; then - ewarn "/etc/znc exists on your system." - ewarn "Due to the nature of the contents of that folder," - ewarn "we have changed the default configuration to use" - ewarn " /var/lib/znc" - ewarn "please move /etc/znc to /var/lib/znc" - ewarn "or adjust /etc/conf.d/znc" - fi -} - -pkg_config() { - if use daemon; then - if [[ -e "${EROOT%/}/var/lib/znc" ]]; then - ewarn "${EROOT%/}/var/lib/znc already exists, aborting to avoid damaging" - ewarn "any existing configuration. If you are sure you want" - ewarn "to generate a new configuration, remove the folder" - ewarn "and try again." - else - einfo "Press any key to interactively create a new configuration file" - einfo "for znc." - einfo "To abort, press Control-C" - read - mkdir -p "${EROOT%/}/var/lib/znc" || die - chown -R ${PN}:${PN} "${EROOT%/}/var/lib/znc" || - die "Setting permissions failed" - "${EROOT%/}"/usr/bin/znc --system-wide-config-as ${PN} -c -r -d "${EROOT%/}/var/lib/znc" || - die "Config failed" - echo - einfo "To start znc, run '/etc/init.d/znc start'" - einfo "or add znc to a runlevel:" - einfo " rc-update add znc default" - fi - else - ewarn "To configure znc as a system-wide daemon you have to" - ewarn "enable the 'daemon' use flag." - fi -} diff --git a/net-irc/znc/znc-1.6.6.ebuild b/net-irc/znc/znc-1.6.6.ebuild deleted file mode 100644 index 76b253fef239..000000000000 --- a/net-irc/znc/znc-1.6.6.ebuild +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_{4,5,6} ) -inherit eutils python-single-r1 readme.gentoo-r1 systemd user - -MY_PV=${PV/_/-} -GTEST_VER="1.7.0" -GTEST_URL="https://github.com/google/googletest/archive/release-${GTEST_VER}.tar.gz -> googletest-release-${GTEST_VER}.tar.gz" - -DESCRIPTION="An advanced IRC Bouncer" -HOMEPAGE="https://znc.in" -SRC_URI=" - http://znc.in/releases/archive/${PN}-${MY_PV}.tar.gz - test? ( ${GTEST_URL} ) -" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 arm x86" -IUSE="daemon debug +ipv6 +icu libressl perl python +ssl sasl tcl test +zlib" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - icu? ( dev-libs/icu:= ) - perl? ( >=dev-lang/perl-5.10:= ) - python? ( ${PYTHON_DEPS} ) - sasl? ( >=dev-libs/cyrus-sasl-2 ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tcl? ( dev-lang/tcl:0= ) - zlib? ( sys-libs/zlib ) -" -DEPEND=" - ${RDEPEND} - virtual/pkgconfig -" - -S=${WORKDIR}/${PN}-${MY_PV} - -PATCHES=( - "${FILESDIR}"/${PN}-1.6.1-systemwideconfig.patch - "${FILESDIR}"/${PN}-1.6.1-create-pidfile-per-default.patch -) - -pkg_setup() { - if use python; then - python-single-r1_pkg_setup - fi - if use daemon; then - enewgroup ${PN} - enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} - # The home directory was previously set to /dev/null - # This caused a bug with the systemd unit - # https://bugs.gentoo.org/521916 - esethome ${PN} /var/lib/${PN} - fi -} - -src_configure() { - econf \ - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ - $(use_enable debug) \ - $(use_enable icu charset) \ - $(use_enable ipv6) \ - $(use_enable perl) \ - $(use_enable python) \ - $(use_enable sasl cyrus) \ - $(use_enable ssl openssl) \ - $(use_enable tcl) \ - $(use_enable zlib) \ - $(use_with test gtest "${WORKDIR}/googletest-release-${GTEST_VER}") -} - -src_install() { - default - dodoc NOTICE - if use daemon; then - newinitd "${FILESDIR}"/znc.initd-r1 znc - newconfd "${FILESDIR}"/znc.confd-r1 znc - fi - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo") || die - DISABLE_AUTOFORMATTING=1 - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog - if [[ -d "${EROOT%/}"/etc/znc ]]; then - ewarn "/etc/znc exists on your system." - ewarn "Due to the nature of the contents of that folder," - ewarn "we have changed the default configuration to use" - ewarn " /var/lib/znc" - ewarn "please move /etc/znc to /var/lib/znc" - ewarn "or adjust /etc/conf.d/znc" - fi -} - -pkg_config() { - if use daemon; then - if [[ -e "${EROOT%/}/var/lib/znc" ]]; then - ewarn "${EROOT%/}/var/lib/znc already exists, aborting to avoid damaging" - ewarn "any existing configuration. If you are sure you want" - ewarn "to generate a new configuration, remove the folder" - ewarn "and try again." - else - einfo "Press any key to interactively create a new configuration file" - einfo "for znc." - einfo "To abort, press Control-C" - read - mkdir -p "${EROOT%/}/var/lib/znc" || die - chown -R ${PN}:${PN} "${EROOT%/}/var/lib/znc" || - die "Setting permissions failed" - "${EROOT%/}"/usr/bin/znc --system-wide-config-as ${PN} -c -r -d "${EROOT%/}/var/lib/znc" || - die "Config failed" - echo - einfo "To start znc, run '/etc/init.d/znc start'" - einfo "or add znc to a runlevel:" - einfo " rc-update add znc default" - fi - else - ewarn "To configure znc as a system-wide daemon you have to" - ewarn "enable the 'daemon' use flag." - fi -} diff --git a/net-irc/znc/znc-1.7.0.ebuild b/net-irc/znc/znc-1.7.1.ebuild index 7cd8c8865979..1de5e05761e8 100644 --- a/net-irc/znc/znc-1.7.0.ebuild +++ b/net-irc/znc/znc-1.7.1.ebuild @@ -3,7 +3,7 @@ EAPI=6 -PYTHON_COMPAT=( python3_{4,5,6} ) +PYTHON_COMPAT=( python3_{4,5,6,7} ) inherit cmake-utils python-single-r1 readme.gentoo-r1 systemd user @@ -16,11 +16,14 @@ if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/znc/znc.git"} SRC_URI="" else + MY_PV=${PV/_/-} + MY_P=${PN}-${MY_PV} SRC_URI=" - https://znc.in/releases/archive/${P}.tar.gz + https://znc.in/releases/archive/${MY_P}.tar.gz test? ( ${GTEST_URL} ) " - KEYWORDS="~amd64 ~arm ~x86" + KEYWORDS="amd64 arm x86" + S=${WORKDIR}/${MY_P} fi HOMEPAGE="https://znc.in" @@ -52,10 +55,7 @@ DEPEND=" test? ( dev-qt/qtnetwork:5 ) " -PATCHES=( - "${FILESDIR}"/${PN}-1.7.0-inttest-fix-make-warning.patch - "${FILESDIR}"/${PN}-1.7.0-inttest-dir.patch -) +PATCHES=( "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch ) pkg_setup() { if use python; then diff --git a/net-irc/znc/znc-9999.ebuild b/net-irc/znc/znc-9999.ebuild index ec9c6196f378..e59849a6e29b 100644 --- a/net-irc/znc/znc-9999.ebuild +++ b/net-irc/znc/znc-9999.ebuild @@ -16,11 +16,14 @@ if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/znc/znc.git"} SRC_URI="" else + MY_PV=${PV/_/-} + MY_P=${PN}-${MY_PV} SRC_URI=" - https://znc.in/releases/archive/${P}.tar.gz + https://znc.in/releases/archive/${MY_P}.tar.gz test? ( ${GTEST_URL} ) " KEYWORDS="~amd64 ~arm ~x86" + S=${WORKDIR}/${MY_P} fi HOMEPAGE="https://znc.in" @@ -52,9 +55,7 @@ DEPEND=" test? ( dev-qt/qtnetwork:5 ) " -PATCHES=( - "${FILESDIR}"/${PN}-1.7.0-inttest-dir.patch -) +PATCHES=( "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch ) pkg_setup() { if use python; then |