Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| e7a554a7f3 | |||
|
|
30c5cb4b3a | ||
|
|
c527c1d62a | ||
| a0020dabc4 |
4
_scmsync.obsinfo
Normal file
4
_scmsync.obsinfo
Normal file
@@ -0,0 +1,4 @@
|
||||
mtime: 1742552202
|
||||
commit: 5ba4ec164c89ea2b217b4206b313d94166881d12d20e4239634315e5d3e6059d
|
||||
url: https://src.opensuse.org/jengelh/atheme
|
||||
revision: master
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 21 09:06:31 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Use /run/atheme not /run to resolve a permission error on startup.
|
||||
- Add pcre2.diff.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 18 08:44:26 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
||||
17
atheme.spec
17
atheme.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package atheme
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -24,21 +24,23 @@ Summary: Extensible IRC services
|
||||
License: MIT
|
||||
Group: Productivity/Networking/IRC
|
||||
URL: https://atheme.github.io/atheme.html
|
||||
|
||||
Source: https://github.com/atheme/atheme/releases/download/v%version/%name-services-v%version.tar.xz
|
||||
Source9: example.conf
|
||||
Patch1: atheme-lockmodes.diff
|
||||
Patch2: atheme-nodate.diff
|
||||
Patch3: pcre2.diff
|
||||
BuildRequires: automake
|
||||
BuildRequires: cracklib-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: openldap2-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: sysuser-tools
|
||||
BuildRequires: pkgconfig(libmowgli-2) >= 2.0.0.g185
|
||||
BuildRequires: pkgconfig(libpcre)
|
||||
BuildRequires: pkgconfig(libpcre2-8)
|
||||
BuildRequires: pkgconfig(libqrencode)
|
||||
BuildRequires: pkgconfig(libssl)
|
||||
%sysusers_requires
|
||||
%define atheme_home /var/lib/atheme
|
||||
%define atheme_log /var/log/atheme
|
||||
@@ -79,7 +81,8 @@ mkdir -p libmowgli-2 modules/contrib
|
||||
touch libmowgli-2/Makefile modules/contrib/Makefile
|
||||
|
||||
%build
|
||||
export RUNDIR="/run"
|
||||
export RUNDIR="%atheme_run"
|
||||
autoreconf -fi
|
||||
%configure \
|
||||
--sysconfdir="%_sysconfdir/%name" \
|
||||
--bindir="%_sbindir" \
|
||||
@@ -91,7 +94,7 @@ export RUNDIR="/run"
|
||||
%make_build
|
||||
|
||||
%install
|
||||
export RUNDIR="/run"
|
||||
export RUNDIR="%atheme_run"
|
||||
%make_install DOCDIR="%_docdir/%name"
|
||||
b="%buildroot"
|
||||
|
||||
@@ -111,7 +114,7 @@ cat >"$b/%_unitdir/atheme.service" <<-EOF
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat >"$b/%_prefix/lib/tmpfiles.d/atheme.conf" <<-EOF
|
||||
d /run/atheme 0755 atheme atheme -
|
||||
d %atheme_run 0700 atheme atheme -
|
||||
EOF
|
||||
echo 'u atheme - "IRC services" %atheme_home' >system-user-atheme.conf
|
||||
cp -a system-user-atheme.conf "$b/%_sysusersdir/"
|
||||
|
||||
3
build.specials.obscpio
Normal file
3
build.specials.obscpio
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a293ae2d165fe18fc3fe306e46ed9a0be0d6f08a9be894e4605ec25f9e3bf4e6
|
||||
size 256
|
||||
87
pcre2.diff
Normal file
87
pcre2.diff
Normal file
@@ -0,0 +1,87 @@
|
||||
From dcab28a78baa798a4ada3be7a0fd01c1873bfa34 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Thu, 20 Mar 2025 23:13:55 +0100
|
||||
Subject: [PATCH] PCRE2 support
|
||||
References: https://github.com/atheme/atheme/pull/941
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
libathemecore/match.c | 20 ++++++++++++--------
|
||||
2 files changed, 13 insertions(+), 9 deletions(-)
|
||||
|
||||
Index: atheme-services-v7.2.12/configure.ac
|
||||
===================================================================
|
||||
--- atheme-services-v7.2.12.orig/configure.ac
|
||||
+++ atheme-services-v7.2.12/configure.ac
|
||||
@@ -402,7 +402,7 @@ AS_HELP_STRING([--with-pcre],[ Enable PC
|
||||
[with_pcre=no])
|
||||
|
||||
if test "x${with_pcre}" != "xno"; then
|
||||
- PKG_CHECK_MODULES([LIBPCRE], [libpcre], [], [AC_MSG_ERROR(PCRE requested, but not found)])
|
||||
+ PKG_CHECK_MODULES([LIBPCRE], [libpcre2-8], [], [AC_MSG_ERROR(PCRE requested, but not found)])
|
||||
AC_SUBST([LIBPCRE_CFLAGS])
|
||||
AC_SUBST([LIBPCRE_LIBS])
|
||||
AC_DEFINE([HAVE_PCRE], [1], [Define if you want to use PCRE])
|
||||
Index: atheme-services-v7.2.12/libathemecore/match.c
|
||||
===================================================================
|
||||
--- atheme-services-v7.2.12.orig/libathemecore/match.c
|
||||
+++ atheme-services-v7.2.12/libathemecore/match.c
|
||||
@@ -25,7 +25,8 @@
|
||||
|
||||
#include <regex.h>
|
||||
#ifdef HAVE_PCRE
|
||||
-#include <pcre.h>
|
||||
+#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
+#include <pcre2.h>
|
||||
#endif
|
||||
|
||||
#define BadPtr(x) (!(x) || (*(x) == '\0'))
|
||||
@@ -592,7 +593,7 @@ struct atheme_regex_
|
||||
{
|
||||
regex_t posix;
|
||||
#ifdef HAVE_PCRE
|
||||
- pcre *pcre;
|
||||
+ pcre2_code *pcre;
|
||||
#endif
|
||||
} un;
|
||||
};
|
||||
@@ -616,14 +617,17 @@ atheme_regex_t *regex_create(char *patte
|
||||
if (flags & AREGEX_PCRE)
|
||||
{
|
||||
#ifdef HAVE_PCRE
|
||||
- const char *errptr;
|
||||
- int erroffset;
|
||||
+ int errcode = 0;
|
||||
+ PCRE2_SIZE erroffset;
|
||||
|
||||
- preg->un.pcre = pcre_compile(pattern, (flags & AREGEX_ICASE ? PCRE_CASELESS : 0) | PCRE_NO_AUTO_CAPTURE, &errptr, &erroffset, NULL);
|
||||
+ preg->un.pcre = pcre2_compile(pattern, PCRE2_ZERO_TERMINATED, (flags & AREGEX_ICASE ? PCRE2_CASELESS : 0) | PCRE2_NO_AUTO_CAPTURE, &errcode, &erroffset, NULL);
|
||||
if (preg->un.pcre == NULL)
|
||||
{
|
||||
+ char errstr[256];
|
||||
+ errstr[0] = '\0';
|
||||
+ pcre2_get_error_message(errcode, errstr, sizeof(errstr));
|
||||
slog(LG_ERROR, "regex_match(): %s at offset %d in %s",
|
||||
- errptr, erroffset, pattern);
|
||||
+ errstr, erroffset, pattern);
|
||||
free(preg);
|
||||
return NULL;
|
||||
}
|
||||
@@ -710,7 +714,7 @@ bool regex_match(atheme_regex_t *preg, c
|
||||
return regexec(&preg->un.posix, string, 0, NULL, 0) == 0;
|
||||
#ifdef HAVE_PCRE
|
||||
case at_pcre:
|
||||
- return pcre_exec(preg->un.pcre, NULL, string, strlen(string), 0, 0, NULL, 0) >= 0;
|
||||
+ return pcre2_match(preg->un.pcre, string, PCRE2_ZERO_TERMINATED, 0, 0, NULL, NULL) >= 0;
|
||||
#endif
|
||||
default:
|
||||
slog(LG_ERROR, "regex_match(): we were given a pattern of unknown type %d, bad!", preg->type);
|
||||
@@ -731,7 +735,7 @@ bool regex_destroy(atheme_regex_t *preg)
|
||||
break;
|
||||
#ifdef HAVE_PCRE
|
||||
case at_pcre:
|
||||
- pcre_free(preg->un.pcre);
|
||||
+ pcre2_code_free(preg->un.pcre);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
Reference in New Issue
Block a user