From af2a8b35094caa2663b967987bce6534c12ceb37 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 20:03:03 +0200 Subject: [PATCH 01/38] Fix compilation with static analyzers --- src/Makefile.in | 3 +++ src/mod/python.mod/pycmds.c | 16 +++++++++++++++- src/mod/python.mod/python.c | 6 ++++++ src/mod/python.mod/tclpython.c | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Makefile.in b/src/Makefile.in index 6c6be3ac1..4a3cc4d7e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -6,6 +6,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ @SET_MAKE@ +EGGEXEC = @EGGEXEC@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ @@ -18,6 +19,8 @@ CFLAGS = @CFLAGS@ -I.. -I$(top_srcdir) @SSL_INCLUDES@ @DEFS@ $(CFLGS) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ +XLIBS = @SSL_LIBS@ @TCL_LIB_SPEC@ @LIBS@ + eggdrop_objs = bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o \ dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o \ modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o \ diff --git a/src/mod/python.mod/pycmds.c b/src/mod/python.mod/pycmds.c index 1e55088c4..315044adf 100644 --- a/src/mod/python.mod/pycmds.c +++ b/src/mod/python.mod/pycmds.c @@ -59,6 +59,7 @@ static PyObject *py_displayhook(PyObject *self, PyObject *o) { Py_RETURN_NONE; } +// Safety: only callable in main thread static void cmd_python(struct userrec *u, int idx, char *par) { PyObject *pobj, *ptype, *pvalue, *ptraceback; PyObject *pystr, *module_name, *pymodule, *pyfunc, *pyval, *item; @@ -138,6 +139,7 @@ static PyObject *py_findircuser(PyObject *self, PyObject *args) { Py_RETURN_NONE; } +// Safety: Python GIL? static int tcl_call_python(ClientData cd, Tcl_Interp *irp, int objc, Tcl_Obj *const objv[]) { PyObject *args = PyTuple_New(objc > 1 ? objc - 1: 0); @@ -314,12 +316,16 @@ static Tcl_Obj *py_to_tcl_obj(PyObject *o) { } } +// Safety: One thread at a time, main thread must be in select() or calling this static PyObject *python_call_tcl(PyObject *self, PyObject *args, PyObject *kwargs) { + pthread_mutex_lock(&tclmtx); + TclFunc *tf = (TclFunc *)self; Py_ssize_t argc = PyTuple_Size(args); Tcl_DString ds; const char *result; int retcode; + PyObject *ret; Tcl_DStringInit(&ds); Tcl_DStringAppendElement(&ds, tf->tclcmdname); @@ -331,6 +337,7 @@ static PyObject *python_call_tcl(PyObject *self, PyObject *args, PyObject *kwarg if (retcode != TCL_OK) { PyErr_Format(EggdropError, "Tcl error: %s", Tcl_GetStringResult(tclinterp)); + pthread_mutex_unlock(&tclmtx); return NULL; } result = Tcl_GetStringResult(tclinterp); @@ -338,12 +345,16 @@ static PyObject *python_call_tcl(PyObject *self, PyObject *args, PyObject *kwarg if (!*result) { // Empty string means okay + pthread_mutex_unlock(&tclmtx); Py_RETURN_NONE; } - return PyUnicode_DecodeUTF8(result, strlen(result), NULL); + ret = PyUnicode_DecodeUTF8(result, strlen(result), NULL); + pthread_mutex_unlock(&tclmtx); + return ret; } +// Safety: One thread at a time, main thread must be in select() or calling this static PyObject *py_findtclfunc(PyObject *self, PyObject *args) { char *cmdname; TclFunc *result; @@ -352,13 +363,16 @@ static PyObject *py_findtclfunc(PyObject *self, PyObject *args) { PyErr_SetString(EggdropError, "wrong arguments"); return NULL; } + pthread_mutex_lock(&tclmtx); // TODO: filter a bit better what is available to Python, specify return types ("list of string"), etc. if (!(Tcl_FindCommand(tclinterp, cmdname, NULL, TCL_GLOBAL_ONLY))) { PyErr_SetString(PyExc_AttributeError, cmdname); + pthread_mutex_unlock(&tclmtx); return NULL; } result = PyObject_New(TclFunc, &TclFuncType); strcpy(result->tclcmdname, cmdname); + pthread_mutex_unlock(&tclmtx); return (PyObject *)result; } diff --git a/src/mod/python.mod/python.c b/src/mod/python.mod/python.c index 7a4ed7fce..2cd399115 100644 --- a/src/mod/python.mod/python.c +++ b/src/mod/python.mod/python.c @@ -40,6 +40,7 @@ //static PyObject *pymodobj; static PyObject *pirp, *pglobals; +static pthread_mutex_t tclmtx; #undef global static Function *global = NULL, *irc_funcs = NULL; @@ -55,6 +56,7 @@ static int python_expmem() // TODO: Do we really have to exit eggdrop on module load failure? static void init_python() { + pthread_mutexattr_t mtxattr; PyObject *pmodule; PyStatus status; PyConfig config; @@ -100,6 +102,10 @@ static void init_python() { PyRun_SimpleString("import eggdrop"); PyRun_SimpleString("sys.displayhook = eggdrop.__displayhook__"); + pthread_mutexattr_init(&mtxattr); + pthread_mutexattr_settype(&mtxattr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&tclmtx, &mtxattr); + return; } diff --git a/src/mod/python.mod/tclpython.c b/src/mod/python.mod/tclpython.c index fed1f6386..039fdc594 100644 --- a/src/mod/python.mod/tclpython.c +++ b/src/mod/python.mod/tclpython.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +// Safety: only callable from main thread static int tcl_pysource STDVAR { FILE *fp; From 0e2a9703cfd5f9685eb227a48948a7d6533d16af Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 20:23:08 +0200 Subject: [PATCH 02/38] Update ccpp.yml Matrix testing --- .github/workflows/ccpp.yml | 42 +++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 485733521..2dea2cf64 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -1,23 +1,37 @@ -name: C/C++ CI +name: CI Pipeline on: pull_request: - branches: - - develop + branches: [ develop ] + push: + branches: [ develop ] jobs: - build: - name: compile test + default-build: + strategy: + matrix: + cc: [ 'gcc', 'clang' ] + name: compile test, default runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install clang tcl tcl-dev openssl libssl-dev + - name: Build + env: + CC: ${{ matrix.cc }} + run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop install + feature-test: + strategy: + matrix: + conf_tls: [ '', '--disable-tls' ] + conf_ipv6: [ '', '--disable-ipv6' ] + conf_tdns: [ '', '--disable-tdns' ] + name: compile test, feature + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - name: install dependencies run: sudo apt-get install tcl tcl-dev openssl libssl-dev - - name: configure - run: ./configure - - name: make config - run: make config - - name: make - run: make - - name: make install - run: make install + - name: Build + run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop install From d227c2d2147ed8a7ab2cdefdfffcbbd817b3f735 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 20:40:22 +0200 Subject: [PATCH 03/38] Remove configure-flags github action --- .github/workflows/configure_flags.yml | 41 --------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .github/workflows/configure_flags.yml diff --git a/.github/workflows/configure_flags.yml b/.github/workflows/configure_flags.yml deleted file mode 100644 index 60a8c07bb..000000000 --- a/.github/workflows/configure_flags.yml +++ /dev/null @@ -1,41 +0,0 @@ -on: - workflow_dispatch: - inputs: - name: - description: 'Test configure flags' - -jobs: - configure-nosslflag: - name: Configure, --disable-tls - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: sudo apt-get install tcl tcl-dev - - run: ./configure --disable-tls - - run: make config - - run: make - - run: make install - - - configure-noipv6: - name: Configure, --disable-ipv6 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: sudo apt-get install tcl tcl-dev - - run: ./configure --disable-ipv6 - - run: make config - - run: make - - run: make install - - - configure-notdns: - name: Configure, --disable-tdns - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: sudo apt-get install tcl tcl-dev - - run: ./configure --disable-tdns - - run: make config - - run: make - - run: make install From 94332f44972ba26987808964951dceaea1ea9146 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 20:53:17 +0200 Subject: [PATCH 04/38] Update ccpp.yml --- .github/workflows/ccpp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 2dea2cf64..92ae23171 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -27,6 +27,7 @@ jobs: conf_tls: [ '', '--disable-tls' ] conf_ipv6: [ '', '--disable-ipv6' ] conf_tdns: [ '', '--disable-tdns' ] + continue-on-error: true name: compile test, feature runs-on: ubuntu-latest steps: From 3283aad3d1d5a7bf0b37b96060cc3a762f8dd235 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 20:56:20 +0200 Subject: [PATCH 05/38] Update ccpp.yml --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 92ae23171..4f1ed5398 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -28,7 +28,7 @@ jobs: conf_ipv6: [ '', '--disable-ipv6' ] conf_tdns: [ '', '--disable-tdns' ] continue-on-error: true - name: compile test, feature + name: features runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From c277641cc6227e42f8713a31528debfa67df9c40 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 21:46:36 +0200 Subject: [PATCH 06/38] Test Tcl versions --- .github/workflows/{ccpp.yml => make.yml} | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) rename .github/workflows/{ccpp.yml => make.yml} (52%) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/make.yml similarity index 52% rename from .github/workflows/ccpp.yml rename to .github/workflows/make.yml index 4f1ed5398..522a37118 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/make.yml @@ -20,7 +20,7 @@ jobs: - name: Build env: CC: ${{ matrix.cc }} - run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop install + run: ./configure && make config eggdrop install feature-test: strategy: matrix: @@ -35,4 +35,24 @@ jobs: - name: install dependencies run: sudo apt-get install tcl tcl-dev openssl libssl-dev - name: Build - run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop install + run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop + tcl-versions: + strategy: + matrix: + tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] + continue-on-error: true + name: features + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install openssl libssl-dev + - name: Build Tcl + run: | + wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ + tar xzf tcl${{ matrix.tcl_version }} && \ + cd tcl${{ matrix.tcl_version }} && \ + ./configure --prefix=$HOME/tcl && \ + make default install + - name: Build + run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop From c6183c4b3a398551a24695587646419d1dd3dd2d Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 21:47:49 +0200 Subject: [PATCH 07/38] Test Tcl versions --- .github/workflows/make.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 522a37118..a946f903b 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -41,7 +41,7 @@ jobs: matrix: tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] continue-on-error: true - name: features + name: tcl-versions runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -50,8 +50,8 @@ jobs: - name: Build Tcl run: | wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ - tar xzf tcl${{ matrix.tcl_version }} && \ - cd tcl${{ matrix.tcl_version }} && \ + tar xzf tcl${{ matrix.tcl_version }}.tar.gz && \ + cd tcl${{ matrix.tcl_version }}/unix && \ ./configure --prefix=$HOME/tcl && \ make default install - name: Build From 3f86e8e8f90ee58d4fbd74af0d38de894a7e9ac3 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 21:48:49 +0200 Subject: [PATCH 08/38] Test Tcl versions --- .github/workflows/make.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index a946f903b..fb8d50a52 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -50,7 +50,7 @@ jobs: - name: Build Tcl run: | wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ - tar xzf tcl${{ matrix.tcl_version }}.tar.gz && \ + tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \ cd tcl${{ matrix.tcl_version }}/unix && \ ./configure --prefix=$HOME/tcl && \ make default install From 57ce259ab8dc6260df56ae54fd080e7e1109cc1f Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 21:49:34 +0200 Subject: [PATCH 09/38] Test Tcl versions --- .github/workflows/make.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index fb8d50a52..c034e1bc0 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -53,6 +53,6 @@ jobs: tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \ cd tcl${{ matrix.tcl_version }}/unix && \ ./configure --prefix=$HOME/tcl && \ - make default install + make && make install - name: Build run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop From 3cec2babd1861e4e9964d83528780be7a4ef5111 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 22:33:23 +0200 Subject: [PATCH 10/38] Split CI --- .github/workflows/features.yml | 38 ++++++++++++++++++++++++++++++++++ .github/workflows/make.yml | 24 ++------------------- .github/workflows/openssl.yml | 38 ++++++++++++++++++++++++++++++++++ .github/workflows/tcl.yml | 29 ++++++++++++++++++++++++++ 4 files changed, 107 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/features.yml create mode 100644 .github/workflows/openssl.yml create mode 100644 .github/workflows/tcl.yml diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml new file mode 100644 index 000000000..4f1ed5398 --- /dev/null +++ b/.github/workflows/features.yml @@ -0,0 +1,38 @@ +name: CI Pipeline + +on: + pull_request: + branches: [ develop ] + push: + branches: [ develop ] + +jobs: + default-build: + strategy: + matrix: + cc: [ 'gcc', 'clang' ] + name: compile test, default + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install clang tcl tcl-dev openssl libssl-dev + - name: Build + env: + CC: ${{ matrix.cc }} + run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop install + feature-test: + strategy: + matrix: + conf_tls: [ '', '--disable-tls' ] + conf_ipv6: [ '', '--disable-ipv6' ] + conf_tdns: [ '', '--disable-tdns' ] + continue-on-error: true + name: features + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install tcl tcl-dev openssl libssl-dev + - name: Build + run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop install diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index c034e1bc0..de06d00ce 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -20,7 +20,7 @@ jobs: - name: Build env: CC: ${{ matrix.cc }} - run: ./configure && make config eggdrop install + run: ./configure && make config && make -j4 && make install feature-test: strategy: matrix: @@ -35,24 +35,4 @@ jobs: - name: install dependencies run: sudo apt-get install tcl tcl-dev openssl libssl-dev - name: Build - run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop - tcl-versions: - strategy: - matrix: - tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] - continue-on-error: true - name: tcl-versions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: install dependencies - run: sudo apt-get install openssl libssl-dev - - name: Build Tcl - run: | - wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ - tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \ - cd tcl${{ matrix.tcl_version }}/unix && \ - ./configure --prefix=$HOME/tcl && \ - make && make install - - name: Build - run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop + run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config && make -j4 diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml new file mode 100644 index 000000000..b59e5fe2d --- /dev/null +++ b/.github/workflows/openssl.yml @@ -0,0 +1,38 @@ +name: OpenSSL Versions + +on: + pull_request: + branches: [ develop ] + push: + branches: [ develop ] + +jobs: + ssl-versions: + strategy: + matrix: + ssl_version: [ '1.1', '3.0', '3.1', '3.2', '3.3' ] + continue-on-error: true + name: OpenSSL + runs-on: ubuntu-latest + steps: + - uses: oprypin/find-latest-tag@v1 + with: + repository: openssl/openssl + releases-only: true + prefix: 'OpenSSL ' + regex: "${{ matrix.ssl_version }}\d+[a-z]?" + sort-tags: true + id: openssl + - uses: actions/checkout@v4 + with: + repository: openssl/openssl + ref: ${{ steps.openssl.outputs.tag }} + path: 'openssl' + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - name: Build OpenSSL + run: | + cd openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - name: Build + run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop diff --git a/.github/workflows/tcl.yml b/.github/workflows/tcl.yml new file mode 100644 index 000000000..c7e2ba1e9 --- /dev/null +++ b/.github/workflows/tcl.yml @@ -0,0 +1,29 @@ +name: Tcl Versions + +on: + pull_request: + branches: [ develop ] + push: + branches: [ develop ] + +jobs: + tcl-versions: + strategy: + matrix: + tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] + continue-on-error: true + name: tcl-versions + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install openssl libssl-dev + - name: Build Tcl + run: | + wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ + tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \ + cd tcl${{ matrix.tcl_version }}/unix && \ + ./configure --prefix=$HOME/tcl && \ + make -j4 && make install + - name: Build + run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop From d3bac64808331edffc675df39ddf77963944f6b5 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 22:34:55 +0200 Subject: [PATCH 11/38] Update openssl.yml --- .github/workflows/openssl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml index b59e5fe2d..5f2300ecb 100644 --- a/.github/workflows/openssl.yml +++ b/.github/workflows/openssl.yml @@ -20,7 +20,7 @@ jobs: repository: openssl/openssl releases-only: true prefix: 'OpenSSL ' - regex: "${{ matrix.ssl_version }}\d+[a-z]?" + regex: "${{ matrix.ssl_version }}[0-9]+[a-z]?" sort-tags: true id: openssl - uses: actions/checkout@v4 From 5b4c6f53c313615b1072d6e36f152d9bfdbd3b3d Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 22:39:03 +0200 Subject: [PATCH 12/38] openssl builds --- .github/workflows/openssl.yml | 38 ++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml index 5f2300ecb..963c6b00a 100644 --- a/.github/workflows/openssl.yml +++ b/.github/workflows/openssl.yml @@ -10,7 +10,7 @@ jobs: ssl-versions: strategy: matrix: - ssl_version: [ '1.1', '3.0', '3.1', '3.2', '3.3' ] + ssl_version: [ '3.0', '3.1', '3.2', '3.3' ] continue-on-error: true name: OpenSSL runs-on: ubuntu-latest @@ -19,8 +19,8 @@ jobs: with: repository: openssl/openssl releases-only: true - prefix: 'OpenSSL ' - regex: "${{ matrix.ssl_version }}[0-9]+[a-z]?" + prefix: 'openssl-' + regex: "${{ matrix.ssl_version }}.[0-9]+" sort-tags: true id: openssl - uses: actions/checkout@v4 @@ -36,3 +36,35 @@ jobs: cd openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + ssl-version-11: + continue-on-error: true + name: OpenSSL + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: openssl/openssl + ref: 'OpenSSL_1_1_1w' + path: 'openssl' + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - name: Build OpenSSL + run: | + cd openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - name: Build + run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + ssl-version-10: + continue-on-error: true + name: OpenSSL + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - name: Build OpenSSL + run: | + wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz + cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - name: Build + run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From 7b4a96b195d6d17bd779399d7e96602c02670a23 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 22:41:31 +0200 Subject: [PATCH 13/38] openssl builds --- .github/workflows/openssl.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml index 963c6b00a..140f44fe0 100644 --- a/.github/workflows/openssl.yml +++ b/.github/workflows/openssl.yml @@ -12,7 +12,7 @@ jobs: matrix: ssl_version: [ '3.0', '3.1', '3.2', '3.3' ] continue-on-error: true - name: OpenSSL + name: OpenSSL 3.x runs-on: ubuntu-latest steps: - uses: oprypin/find-latest-tag@v1 @@ -33,12 +33,12 @@ jobs: run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL run: | - cd openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $HOME/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-11: continue-on-error: true - name: OpenSSL + name: OpenSSL 1.1 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -51,12 +51,12 @@ jobs: run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL run: | - cd openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $HOME/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-10: continue-on-error: true - name: OpenSSL + name: OpenSSL 1.0 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -65,6 +65,6 @@ jobs: - name: Build OpenSSL run: | wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz - cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $HOME/openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From cb30b73d220e013d93489016eef318173c0666d1 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 22:43:56 +0200 Subject: [PATCH 14/38] openssl builds --- .github/workflows/openssl.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml index 140f44fe0..4049527a0 100644 --- a/.github/workflows/openssl.yml +++ b/.github/workflows/openssl.yml @@ -33,7 +33,7 @@ jobs: run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL run: | - cd $HOME/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-11: @@ -51,7 +51,7 @@ jobs: run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL run: | - cd $HOME/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-10: @@ -64,7 +64,7 @@ jobs: run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL run: | - wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz - cd $HOME/openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ + cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From 46b6baaf4487d8dc81fa924605010be8a9de44ea Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 22:47:30 +0200 Subject: [PATCH 15/38] openssl builds --- .github/workflows/openssl.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml index 4049527a0..594d03e66 100644 --- a/.github/workflows/openssl.yml +++ b/.github/workflows/openssl.yml @@ -28,12 +28,12 @@ jobs: repository: openssl/openssl ref: ${{ steps.openssl.outputs.tag }} path: 'openssl' - - uses: actions/checkout@v4 - - name: install dependencies - run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL run: | cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install tcl tcl-dev - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-11: @@ -46,12 +46,12 @@ jobs: repository: openssl/openssl ref: 'OpenSSL_1_1_1w' path: 'openssl' - - uses: actions/checkout@v4 - - name: install dependencies - run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL run: | - cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - uses: actions/checkout@v4 - name: Build run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-10: From 8ac5c8a50079c2e5339316fec0357c6005013765 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 22:50:43 +0200 Subject: [PATCH 16/38] openssl builds --- .github/workflows/openssl.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml index 594d03e66..81c20aa68 100644 --- a/.github/workflows/openssl.yml +++ b/.github/workflows/openssl.yml @@ -30,12 +30,14 @@ jobs: path: 'openssl' - name: Build OpenSSL run: | - cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $HOME/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - uses: actions/checkout@v4 + with: + path: 'eggdrop' - name: install dependencies run: sudo apt-get install tcl tcl-dev - name: Build - run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + run: cd $HOME/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-11: continue-on-error: true name: OpenSSL 1.1 @@ -48,18 +50,22 @@ jobs: path: 'openssl' - name: Build OpenSSL run: | - ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $HOME/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: install dependencies run: sudo apt-get install tcl tcl-dev - uses: actions/checkout@v4 + with: + path: 'eggdrop' - name: Build - run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + run: cd $HOME/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-10: continue-on-error: true name: OpenSSL 1.0 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + path: 'eggdrop' - name: install dependencies run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL @@ -67,4 +73,4 @@ jobs: wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build - run: ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + run: cd $HOME/eggrdop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From be5a40d35d18b74f592ddc0aca1b024aaf9d57b6 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 22:54:10 +0200 Subject: [PATCH 17/38] openssl builds --- .github/workflows/openssl.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml index 81c20aa68..826e95cb6 100644 --- a/.github/workflows/openssl.yml +++ b/.github/workflows/openssl.yml @@ -30,14 +30,14 @@ jobs: path: 'openssl' - name: Build OpenSSL run: | - cd $HOME/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - uses: actions/checkout@v4 with: path: 'eggdrop' - name: install dependencies run: sudo apt-get install tcl tcl-dev - name: Build - run: cd $HOME/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-11: continue-on-error: true name: OpenSSL 1.1 @@ -50,14 +50,14 @@ jobs: path: 'openssl' - name: Build OpenSSL run: | - cd $HOME/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: install dependencies run: sudo apt-get install tcl tcl-dev - uses: actions/checkout@v4 with: path: 'eggdrop' - name: Build - run: cd $HOME/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-10: continue-on-error: true name: OpenSSL 1.0 @@ -73,4 +73,4 @@ jobs: wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build - run: cd $HOME/eggrdop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From c1835ebd1b0f1937c730fdfc588d63f236a37183 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 23:03:40 +0200 Subject: [PATCH 18/38] openssl builds --- .github/workflows/openssl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml index 826e95cb6..59fcb6bca 100644 --- a/.github/workflows/openssl.yml +++ b/.github/workflows/openssl.yml @@ -37,7 +37,7 @@ jobs: - name: install dependencies run: sudo apt-get install tcl tcl-dev - name: Build - run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib64 && LD_LIBRARY_PATH=$HOME/ssl/lib64 make config eggdrop ssl-version-11: continue-on-error: true name: OpenSSL 1.1 From d5745d5ac4c9e36955e1a96d48457d43c079b1e2 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 23:09:22 +0200 Subject: [PATCH 19/38] openssl builds --- .github/workflows/make.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index de06d00ce..c3c8ddd0a 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -1,4 +1,4 @@ -name: CI Pipeline +name: Eggdrop Compile on: pull_request: From 73314e7922096b8ac5c8b7ca7c83b586d4594898 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 23:21:59 +0200 Subject: [PATCH 20/38] Test one CI file --- .github/workflows/features.yml | 38 ----------------- .github/workflows/make.yml | 70 +++++++++++++++++++++++++++++++ .github/workflows/openssl.yml | 76 ---------------------------------- .github/workflows/tcl.yml | 29 ------------- 4 files changed, 70 insertions(+), 143 deletions(-) delete mode 100644 .github/workflows/features.yml delete mode 100644 .github/workflows/openssl.yml delete mode 100644 .github/workflows/tcl.yml diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml deleted file mode 100644 index 4f1ed5398..000000000 --- a/.github/workflows/features.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: CI Pipeline - -on: - pull_request: - branches: [ develop ] - push: - branches: [ develop ] - -jobs: - default-build: - strategy: - matrix: - cc: [ 'gcc', 'clang' ] - name: compile test, default - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: install dependencies - run: sudo apt-get install clang tcl tcl-dev openssl libssl-dev - - name: Build - env: - CC: ${{ matrix.cc }} - run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop install - feature-test: - strategy: - matrix: - conf_tls: [ '', '--disable-tls' ] - conf_ipv6: [ '', '--disable-ipv6' ] - conf_tdns: [ '', '--disable-tdns' ] - continue-on-error: true - name: features - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: install dependencies - run: sudo apt-get install tcl tcl-dev openssl libssl-dev - - name: Build - run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config eggdrop install diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index c3c8ddd0a..2d282e396 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -36,3 +36,73 @@ jobs: run: sudo apt-get install tcl tcl-dev openssl libssl-dev - name: Build run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config && make -j4 + tcl-versions: + strategy: + matrix: + tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] + continue-on-error: true + name: tcl-versions + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install openssl libssl-dev + - name: Build Tcl + run: | + wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ + tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \ + cd tcl${{ matrix.tcl_version }}/unix && \ + ./configure --prefix=$HOME/tcl && \ + make -j4 && make install + - name: Build + run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop + ssl-versions-3x: + strategy: + matrix: + ssl_version: [ '3.0', '3.1', '3.2', '3.3' ] + continue-on-error: true + name: OpenSSL 3.x + runs-on: ubuntu-latest + steps: + - uses: oprypin/find-latest-tag@v1 + with: + repository: openssl/openssl + releases-only: true + prefix: 'openssl-' + regex: "${{ matrix.ssl_version }}.[0-9]+" + sort-tags: true + id: openssl + - uses: actions/checkout@v4 + with: + repository: openssl/openssl + ref: ${{ steps.openssl.outputs.tag }} + path: 'openssl' + - name: Build OpenSSL + run: | + cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - uses: actions/checkout@v4 + with: + path: 'eggdrop' + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - name: Build + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib64 && LD_LIBRARY_PATH=$HOME/ssl/lib64 make config eggdrop + ssl-version-11: + continue-on-error: true + name: OpenSSL 1.1 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: openssl/openssl + ref: 'OpenSSL_1_1_1w' + path: 'openssl' + - name: Build OpenSSL + run: | + cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - uses: actions/checkout@v4 + with: + path: 'eggdrop' + - name: Build diff --git a/.github/workflows/openssl.yml b/.github/workflows/openssl.yml deleted file mode 100644 index 59fcb6bca..000000000 --- a/.github/workflows/openssl.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: OpenSSL Versions - -on: - pull_request: - branches: [ develop ] - push: - branches: [ develop ] - -jobs: - ssl-versions: - strategy: - matrix: - ssl_version: [ '3.0', '3.1', '3.2', '3.3' ] - continue-on-error: true - name: OpenSSL 3.x - runs-on: ubuntu-latest - steps: - - uses: oprypin/find-latest-tag@v1 - with: - repository: openssl/openssl - releases-only: true - prefix: 'openssl-' - regex: "${{ matrix.ssl_version }}.[0-9]+" - sort-tags: true - id: openssl - - uses: actions/checkout@v4 - with: - repository: openssl/openssl - ref: ${{ steps.openssl.outputs.tag }} - path: 'openssl' - - name: Build OpenSSL - run: | - cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - - uses: actions/checkout@v4 - with: - path: 'eggdrop' - - name: install dependencies - run: sudo apt-get install tcl tcl-dev - - name: Build - run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib64 && LD_LIBRARY_PATH=$HOME/ssl/lib64 make config eggdrop - ssl-version-11: - continue-on-error: true - name: OpenSSL 1.1 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - repository: openssl/openssl - ref: 'OpenSSL_1_1_1w' - path: 'openssl' - - name: Build OpenSSL - run: | - cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - - name: install dependencies - run: sudo apt-get install tcl tcl-dev - - uses: actions/checkout@v4 - with: - path: 'eggdrop' - - name: Build - run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop - ssl-version-10: - continue-on-error: true - name: OpenSSL 1.0 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - path: 'eggdrop' - - name: install dependencies - run: sudo apt-get install tcl tcl-dev - - name: Build OpenSSL - run: | - wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ - cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - - name: Build - run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop diff --git a/.github/workflows/tcl.yml b/.github/workflows/tcl.yml deleted file mode 100644 index c7e2ba1e9..000000000 --- a/.github/workflows/tcl.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Tcl Versions - -on: - pull_request: - branches: [ develop ] - push: - branches: [ develop ] - -jobs: - tcl-versions: - strategy: - matrix: - tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] - continue-on-error: true - name: tcl-versions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: install dependencies - run: sudo apt-get install openssl libssl-dev - - name: Build Tcl - run: | - wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ - tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \ - cd tcl${{ matrix.tcl_version }}/unix && \ - ./configure --prefix=$HOME/tcl && \ - make -j4 && make install - - name: Build - run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop From 8e04909d48b219c472b0c37b63a64c4802df5461 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 23:24:17 +0200 Subject: [PATCH 21/38] fix --- .github/workflows/make.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 2d282e396..996cd62d2 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -106,3 +106,20 @@ jobs: with: path: 'eggdrop' - name: Build + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + ssl-version-10: + continue-on-error: true + name: OpenSSL 1.0 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: 'eggdrop' + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - name: Build OpenSSL + run: | + wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ + cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - name: Build + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From d042bae27a04136fb4e1e4f8541e3cc378415e82 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 23:32:27 +0200 Subject: [PATCH 22/38] add fpic to ssl1.0 --- .github/workflows/make.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 996cd62d2..b4091d298 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -118,6 +118,8 @@ jobs: - name: install dependencies run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL + env: + CFLAGS: -fPIC run: | wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw From d9a800e626e3d2eedf0ad6241a99fe7a6c5a5d02 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 23:33:19 +0200 Subject: [PATCH 23/38] add fpic to ssl1.0 --- .github/workflows/make.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index b4091d298..3b19aab68 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -118,10 +118,8 @@ jobs: - name: install dependencies run: sudo apt-get install tcl tcl-dev - name: Build OpenSSL - env: - CFLAGS: -fPIC run: | wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ - cd openssl-1.0.2u && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd openssl-1.0.2u && CFLAGS=-fPIC ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: Build run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From 5643470f54a891b9ad828611a497d15d0e0375c0 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 23:38:12 +0200 Subject: [PATCH 24/38] add fpic to ssl1.0 --- .github/workflows/make.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 3b19aab68..ff0d1f1fd 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -8,10 +8,10 @@ on: jobs: default-build: + name: Compile Test strategy: matrix: cc: [ 'gcc', 'clang' ] - name: compile test, default runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -22,13 +22,13 @@ jobs: CC: ${{ matrix.cc }} run: ./configure && make config && make -j4 && make install feature-test: + name: Features + continue-on-error: true strategy: matrix: conf_tls: [ '', '--disable-tls' ] conf_ipv6: [ '', '--disable-ipv6' ] conf_tdns: [ '', '--disable-tdns' ] - continue-on-error: true - name: features runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -37,11 +37,11 @@ jobs: - name: Build run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config && make -j4 tcl-versions: + name: Tcl Versions strategy: matrix: tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] continue-on-error: true - name: tcl-versions runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -57,11 +57,11 @@ jobs: - name: Build run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop ssl-versions-3x: + name: OpenSSL 3.x strategy: matrix: ssl_version: [ '3.0', '3.1', '3.2', '3.3' ] continue-on-error: true - name: OpenSSL 3.x runs-on: ubuntu-latest steps: - uses: oprypin/find-latest-tag@v1 @@ -88,8 +88,8 @@ jobs: - name: Build run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib64 && LD_LIBRARY_PATH=$HOME/ssl/lib64 make config eggdrop ssl-version-11: - continue-on-error: true name: OpenSSL 1.1 + continue-on-error: true runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -108,8 +108,8 @@ jobs: - name: Build run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop ssl-version-10: - continue-on-error: true name: OpenSSL 1.0 + continue-on-error: true runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -120,6 +120,6 @@ jobs: - name: Build OpenSSL run: | wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ - cd openssl-1.0.2u && CFLAGS=-fPIC ./config --prefix=$HOME/ssl && make -j4 && make install_sw + cd openssl-1.0.2u && ./config --prefix=$HOME/ssl -fPIC && make -j4 && make install_sw - name: Build run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From 5f046d32d6e3b32e94e87bc5e89159711e6898e8 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sat, 15 Jun 2024 23:41:48 +0200 Subject: [PATCH 25/38] layout change --- .github/workflows/dependencies.yml | 96 ++++++++++++++++++++++++++++++ .github/workflows/make.yml | 87 --------------------------- 2 files changed, 96 insertions(+), 87 deletions(-) create mode 100644 .github/workflows/dependencies.yml diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml new file mode 100644 index 000000000..d76a5e6c7 --- /dev/null +++ b/.github/workflows/dependencies.yml @@ -0,0 +1,96 @@ +name: Tcl/SSL Versions + +on: + pull_request: + branches: [ develop ] + push: + branches: [ develop ] + +jobs: + tcl-versions: + name: Tcl Versions + strategy: + matrix: + tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] + continue-on-error: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install openssl libssl-dev + - name: Build Tcl + run: | + wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ + tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \ + cd tcl${{ matrix.tcl_version }}/unix && \ + ./configure --prefix=$HOME/tcl && \ + make -j4 && make install + - name: Build + run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop + ssl-version-10: + name: OpenSSL 1.0 + continue-on-error: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: 'eggdrop' + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - name: Build OpenSSL + run: | + wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ + cd openssl-1.0.2u && ./config --prefix=$HOME/ssl -fPIC && make -j4 && make install_sw + - name: Build + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + ssl-version-11: + name: OpenSSL 1.1 + continue-on-error: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: openssl/openssl + ref: 'OpenSSL_1_1_1w' + path: 'openssl' + - name: Build OpenSSL + run: | + cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - uses: actions/checkout@v4 + with: + path: 'eggdrop' + - name: Build + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop + ssl-versions-3x: + name: OpenSSL 3.x + strategy: + matrix: + ssl_version: [ '3.0', '3.1', '3.2', '3.3' ] + continue-on-error: true + runs-on: ubuntu-latest + steps: + - uses: oprypin/find-latest-tag@v1 + with: + repository: openssl/openssl + releases-only: true + prefix: 'openssl-' + regex: "${{ matrix.ssl_version }}.[0-9]+" + sort-tags: true + id: openssl + - uses: actions/checkout@v4 + with: + repository: openssl/openssl + ref: ${{ steps.openssl.outputs.tag }} + path: 'openssl' + - name: Build OpenSSL + run: | + cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw + - uses: actions/checkout@v4 + with: + path: 'eggdrop' + - name: install dependencies + run: sudo apt-get install tcl tcl-dev + - name: Build + run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib64 && LD_LIBRARY_PATH=$HOME/ssl/lib64 make config eggdrop diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index ff0d1f1fd..98cab383d 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -36,90 +36,3 @@ jobs: run: sudo apt-get install tcl tcl-dev openssl libssl-dev - name: Build run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config && make -j4 - tcl-versions: - name: Tcl Versions - strategy: - matrix: - tcl_version: [ '8.5.19', '8.6.14', '8.7a5', '9.0b2' ] - continue-on-error: true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: install dependencies - run: sudo apt-get install openssl libssl-dev - - name: Build Tcl - run: | - wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \ - tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \ - cd tcl${{ matrix.tcl_version }}/unix && \ - ./configure --prefix=$HOME/tcl && \ - make -j4 && make install - - name: Build - run: ./configure --with-tcl=$HOME/tcl/lib && LD_LIBRARY_PATH=$HOME/tcl/lib make config eggdrop - ssl-versions-3x: - name: OpenSSL 3.x - strategy: - matrix: - ssl_version: [ '3.0', '3.1', '3.2', '3.3' ] - continue-on-error: true - runs-on: ubuntu-latest - steps: - - uses: oprypin/find-latest-tag@v1 - with: - repository: openssl/openssl - releases-only: true - prefix: 'openssl-' - regex: "${{ matrix.ssl_version }}.[0-9]+" - sort-tags: true - id: openssl - - uses: actions/checkout@v4 - with: - repository: openssl/openssl - ref: ${{ steps.openssl.outputs.tag }} - path: 'openssl' - - name: Build OpenSSL - run: | - cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - - uses: actions/checkout@v4 - with: - path: 'eggdrop' - - name: install dependencies - run: sudo apt-get install tcl tcl-dev - - name: Build - run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib64 && LD_LIBRARY_PATH=$HOME/ssl/lib64 make config eggdrop - ssl-version-11: - name: OpenSSL 1.1 - continue-on-error: true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - repository: openssl/openssl - ref: 'OpenSSL_1_1_1w' - path: 'openssl' - - name: Build OpenSSL - run: | - cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - - name: install dependencies - run: sudo apt-get install tcl tcl-dev - - uses: actions/checkout@v4 - with: - path: 'eggdrop' - - name: Build - run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop - ssl-version-10: - name: OpenSSL 1.0 - continue-on-error: true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - path: 'eggdrop' - - name: install dependencies - run: sudo apt-get install tcl tcl-dev - - name: Build OpenSSL - run: | - wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && tar xzf openssl-1.0.2u.tar.gz && \ - cd openssl-1.0.2u && ./config --prefix=$HOME/ssl -fPIC && make -j4 && make install_sw - - name: Build - run: cd $GITHUB_WORKSPACE/eggdrop && ./configure --with-sslinc=$HOME/ssl/include --with-ssllib=$HOME/ssl/lib && LD_LIBRARY_PATH=$HOME/ssl/lib make config eggdrop From 99da7702ffe63e5d73f9002b0403e7b9b362568c Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 00:04:45 +0200 Subject: [PATCH 26/38] Undo accidental python.mod changes --- src/mod/python.mod/pycmds.c | 16 +--------------- src/mod/python.mod/python.c | 6 ------ src/mod/python.mod/tclpython.c | 1 - 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/mod/python.mod/pycmds.c b/src/mod/python.mod/pycmds.c index 315044adf..1e55088c4 100644 --- a/src/mod/python.mod/pycmds.c +++ b/src/mod/python.mod/pycmds.c @@ -59,7 +59,6 @@ static PyObject *py_displayhook(PyObject *self, PyObject *o) { Py_RETURN_NONE; } -// Safety: only callable in main thread static void cmd_python(struct userrec *u, int idx, char *par) { PyObject *pobj, *ptype, *pvalue, *ptraceback; PyObject *pystr, *module_name, *pymodule, *pyfunc, *pyval, *item; @@ -139,7 +138,6 @@ static PyObject *py_findircuser(PyObject *self, PyObject *args) { Py_RETURN_NONE; } -// Safety: Python GIL? static int tcl_call_python(ClientData cd, Tcl_Interp *irp, int objc, Tcl_Obj *const objv[]) { PyObject *args = PyTuple_New(objc > 1 ? objc - 1: 0); @@ -316,16 +314,12 @@ static Tcl_Obj *py_to_tcl_obj(PyObject *o) { } } -// Safety: One thread at a time, main thread must be in select() or calling this static PyObject *python_call_tcl(PyObject *self, PyObject *args, PyObject *kwargs) { - pthread_mutex_lock(&tclmtx); - TclFunc *tf = (TclFunc *)self; Py_ssize_t argc = PyTuple_Size(args); Tcl_DString ds; const char *result; int retcode; - PyObject *ret; Tcl_DStringInit(&ds); Tcl_DStringAppendElement(&ds, tf->tclcmdname); @@ -337,7 +331,6 @@ static PyObject *python_call_tcl(PyObject *self, PyObject *args, PyObject *kwarg if (retcode != TCL_OK) { PyErr_Format(EggdropError, "Tcl error: %s", Tcl_GetStringResult(tclinterp)); - pthread_mutex_unlock(&tclmtx); return NULL; } result = Tcl_GetStringResult(tclinterp); @@ -345,16 +338,12 @@ static PyObject *python_call_tcl(PyObject *self, PyObject *args, PyObject *kwarg if (!*result) { // Empty string means okay - pthread_mutex_unlock(&tclmtx); Py_RETURN_NONE; } - ret = PyUnicode_DecodeUTF8(result, strlen(result), NULL); - pthread_mutex_unlock(&tclmtx); - return ret; + return PyUnicode_DecodeUTF8(result, strlen(result), NULL); } -// Safety: One thread at a time, main thread must be in select() or calling this static PyObject *py_findtclfunc(PyObject *self, PyObject *args) { char *cmdname; TclFunc *result; @@ -363,16 +352,13 @@ static PyObject *py_findtclfunc(PyObject *self, PyObject *args) { PyErr_SetString(EggdropError, "wrong arguments"); return NULL; } - pthread_mutex_lock(&tclmtx); // TODO: filter a bit better what is available to Python, specify return types ("list of string"), etc. if (!(Tcl_FindCommand(tclinterp, cmdname, NULL, TCL_GLOBAL_ONLY))) { PyErr_SetString(PyExc_AttributeError, cmdname); - pthread_mutex_unlock(&tclmtx); return NULL; } result = PyObject_New(TclFunc, &TclFuncType); strcpy(result->tclcmdname, cmdname); - pthread_mutex_unlock(&tclmtx); return (PyObject *)result; } diff --git a/src/mod/python.mod/python.c b/src/mod/python.mod/python.c index 2cd399115..7a4ed7fce 100644 --- a/src/mod/python.mod/python.c +++ b/src/mod/python.mod/python.c @@ -40,7 +40,6 @@ //static PyObject *pymodobj; static PyObject *pirp, *pglobals; -static pthread_mutex_t tclmtx; #undef global static Function *global = NULL, *irc_funcs = NULL; @@ -56,7 +55,6 @@ static int python_expmem() // TODO: Do we really have to exit eggdrop on module load failure? static void init_python() { - pthread_mutexattr_t mtxattr; PyObject *pmodule; PyStatus status; PyConfig config; @@ -102,10 +100,6 @@ static void init_python() { PyRun_SimpleString("import eggdrop"); PyRun_SimpleString("sys.displayhook = eggdrop.__displayhook__"); - pthread_mutexattr_init(&mtxattr); - pthread_mutexattr_settype(&mtxattr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&tclmtx, &mtxattr); - return; } diff --git a/src/mod/python.mod/tclpython.c b/src/mod/python.mod/tclpython.c index 039fdc594..fed1f6386 100644 --- a/src/mod/python.mod/tclpython.c +++ b/src/mod/python.mod/tclpython.c @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// Safety: only callable from main thread static int tcl_pysource STDVAR { FILE *fp; From 9aa0844af33e785be16dc3e57775fc2de5984a09 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 16:33:07 +0200 Subject: [PATCH 27/38] Test autotools --- .github/workflows/autotools.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/autotools.yml diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml new file mode 100644 index 000000000..142ffde7d --- /dev/null +++ b/.github/workflows/autotools.yml @@ -0,0 +1,26 @@ +name: Autotools check + +on: + pull_request: + branches: [ develop ] + push: + branches: [ develop ] + +jobs: + default-build: + name: Check if autotools need to be run + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: sudo apt-get install build-essential autoconf autoheader + - name: Remove configure revision + run: find . -name configure -exec sed -i 's/From configure.ac (.*)//' {} \; + - name: Stage revision removal + run: find . -name configure -exec git add {} \; + - name: Run autotools + run: misc/runautotools + - name: Remove configure revision again + run: find . -name configure -exec sed -i 's/From configure.ac (.*)//' {} \; + - name: Check diff + run: git diff From 4fede4b5075a1efb4e338cf108f96f797d0e6c38 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 16:34:16 +0200 Subject: [PATCH 28/38] Test autotools --- .github/workflows/autotools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 142ffde7d..0336427bf 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: install dependencies - run: sudo apt-get install build-essential autoconf autoheader + run: sudo apt-get install build-essential autoconf - name: Remove configure revision run: find . -name configure -exec sed -i 's/From configure.ac (.*)//' {} \; - name: Stage revision removal From 1c7203d509d3907a3c797b1f78d7d9c828327919 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 16:38:17 +0200 Subject: [PATCH 29/38] Test autotools --- .github/workflows/autotools.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 0336427bf..217d57a69 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -14,13 +14,13 @@ jobs: - uses: actions/checkout@v4 - name: install dependencies run: sudo apt-get install build-essential autoconf - - name: Remove configure revision - run: find . -name configure -exec sed -i 's/From configure.ac (.*)//' {} \; - - name: Stage revision removal - run: find . -name configure -exec git add {} \; + - name: Stage configure with revision removed + run: | + for i in `find . -name configure`; do sed -i 's/From configure.ac (.*)//' $i; git add $i; done - name: Run autotools run: misc/runautotools - name: Remove configure revision again - run: find . -name configure -exec sed -i 's/From configure.ac (.*)//' {} \; + run: | + for i in `find . -name configure`; do sed -i 's/From configure.ac (.*)//' $i; done - name: Check diff run: git diff From ca4f9e8b2077acd0db868d2b7abad72c03c224f6 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 16:41:40 +0200 Subject: [PATCH 30/38] Test autotools --- .github/workflows/autotools.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 217d57a69..abf80a5ee 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -16,11 +16,12 @@ jobs: run: sudo apt-get install build-essential autoconf - name: Stage configure with revision removed run: | - for i in `find . -name configure`; do sed -i 's/From configure.ac (.*)//' $i; git add $i; done + echo `find . -name configure` + for i in `find . -name configure`; do echo $i; sed -i 's/From configure.ac (.*)//' $i; git add $i; done - name: Run autotools run: misc/runautotools - name: Remove configure revision again run: | - for i in `find . -name configure`; do sed -i 's/From configure.ac (.*)//' $i; done + for i in `find . -name configure`; do echo $i; sed -i 's/From configure.ac (.*)//' $i; done - name: Check diff run: git diff From 9875dc174587e5233dee6ae0a80b24b75783e229 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 16:45:20 +0200 Subject: [PATCH 31/38] Test autotools --- .github/workflows/autotools.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index abf80a5ee..a7ac01882 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -16,12 +16,11 @@ jobs: run: sudo apt-get install build-essential autoconf - name: Stage configure with revision removed run: | - echo `find . -name configure` - for i in `find . -name configure`; do echo $i; sed -i 's/From configure.ac (.*)//' $i; git add $i; done + for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; git add $i; done - name: Run autotools run: misc/runautotools - name: Remove configure revision again run: | - for i in `find . -name configure`; do echo $i; sed -i 's/From configure.ac (.*)//' $i; done + for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; done - name: Check diff run: git diff From f1867daebf67a4d5dfb0ba4df97d90f6595d14ff Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 16:46:36 +0200 Subject: [PATCH 32/38] test --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 78a7e70d5..3cf019027 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl configure.ac: this file is processed by autoconf to produce ./configure. AC_PREREQ([2.71]) AC_INIT([Eggdrop],[1.9.5],[bugs@eggheads.org],[eggdrop],[https://www.eggheads.org]) -AC_COPYRIGHT([Copyright (C) 1999 - 2024 Eggheads Development Team]) +AC_COPYRIGHT([Copyright (C) 1999 - 2025 Eggheads Development Team]) AC_LANG([C]) AC_REVISION([m4_esyscmd([misc/getcommit])]) AC_CONFIG_SRCDIR(src/eggdrop.h) From 64b5e5d2511f7e9ee758625d163f30c59266ea79 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 16:55:05 +0200 Subject: [PATCH 33/38] Autotools test --- .github/workflows/autotools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index a7ac01882..e4be93335 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -23,4 +23,4 @@ jobs: run: | for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; done - name: Check diff - run: git diff + run: git diff | tee .gitdiff && cat .gitdiff && if [ ! -s .gitdiff ]; then exit 1; fi From 8b77c5695938be24c4b506e87f16e388aba9a38a Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 16:56:54 +0200 Subject: [PATCH 34/38] Test autotools --- .github/workflows/autotools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index e4be93335..9299a4b77 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -23,4 +23,4 @@ jobs: run: | for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; done - name: Check diff - run: git diff | tee .gitdiff && cat .gitdiff && if [ ! -s .gitdiff ]; then exit 1; fi + run: git diff | tee .gitdiff && cat .gitdiff && if [ -s .gitdiff ]; then exit 1; fi From 2a8fce35469feac5f84ad5425d7d6e249bae8fdb Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 17:06:26 +0200 Subject: [PATCH 35/38] test --- .github/workflows/autotools.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 9299a4b77..b890f7ae2 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -23,4 +23,18 @@ jobs: run: | for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; done - name: Check diff - run: git diff | tee .gitdiff && cat .gitdiff && if [ -s .gitdiff ]; then exit 1; fi + run: | + git diff | tee .gitdiff + if [ "${{ github.event_name }}" = "pull_request" ]; then + if [ -s .gitdiff ]; then + gh pr edit "${{ github.event.number }}" --add-label "misc/runautotools" + else + gh pr edit "${{ github.event.number }}" --remove-label "misc/runautotools" + fi + else + if [ -s .gitdiff ]; then + exit 1 + fi + fi + env: + NUMBER: {% raw %}${{ github.event.number }}{% endraw %} From 4bead295bfcd0f40b6d0a535c32e64df5f347047 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 17:09:32 +0200 Subject: [PATCH 36/38] test --- .github/workflows/autotools.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index b890f7ae2..6f5622d5b 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -36,5 +36,3 @@ jobs: exit 1 fi fi - env: - NUMBER: {% raw %}${{ github.event.number }}{% endraw %} From 27711b162c1bbdfdd2c64c8ad89b0e85a30408de Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 17:10:31 +0200 Subject: [PATCH 37/38] test --- .github/workflows/autotools.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 6f5622d5b..50370d325 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -23,6 +23,8 @@ jobs: run: | for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; done - name: Check diff + env: + GH_TOKEN: ${{ github.token }} run: | git diff | tee .gitdiff if [ "${{ github.event_name }}" = "pull_request" ]; then From 8969b99edf2636fee6050e493fd30a9af42ff566 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Sun, 16 Jun 2024 17:12:43 +0200 Subject: [PATCH 38/38] Update autotools.yml --- .github/workflows/autotools.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 50370d325..044dd78a1 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -10,6 +10,8 @@ jobs: default-build: name: Check if autotools need to be run runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - uses: actions/checkout@v4 - name: install dependencies