Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
8d12c12453
!11 [sync] PR-8: add sw_64 support
From: @openeuler-sync-bot 
Reviewed-by: @wk333 
Signed-off-by: @wk333
2025-03-06 06:21:34 +00:00
maqi
bdf16d45d1 add sw_64 support
(cherry picked from commit b4485b861879eda7c49efb495885f20591cbc557)
2025-03-06 14:18:37 +08:00
openeuler-ci-bot
9b6117a284
!6 Add riscv64 support
From: @East_x 
Reviewed-by: @jimmy_hero 
Signed-off-by: @jimmy_hero
2023-08-17 03:20:49 +00:00
EastDong
cca34946a2 add riscv support 2023-06-14 18:40:28 +08:00
openeuler-ci-bot
d8b02410db
!4 add loongarch64 support for gearmand
From: @zhangwenlong01 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2023-06-09 06:17:30 +00:00
Wenlong Zhang
486e097a9d add loongarch64 support for gearmand 2023-06-08 19:58:47 +08:00
openeuler-ci-bot
0b95a6d3d5
!3 Update to 1.1.20
From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-04-14 03:05:57 +00:00
lyn1001
19ad143df5 update to 1.1.20 2023-04-14 10:32:47 +08:00
openeuler-ci-bot
2453316bdb !1 Package init
From: @zhengyaohui
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-09-13 06:46:10 +00:00
zhengyaohui
b2a496c16a Package init 2021-09-12 17:16:23 +08:00
9 changed files with 310 additions and 0 deletions

View File

@ -0,0 +1,25 @@
From 01ad1976408db45adb5e83f4962c70f4c735a594 Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Thu, 8 Jun 2023 11:46:36 +0000
Subject: [PATCH] add loongarch64 support for gearmand
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 49ac057..4908098 100755
--- a/configure
+++ b/configure
@@ -17054,7 +17054,7 @@ $as_echo_n "checking for boostlib >= $boost_lib_version_req... " >&6; }
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
- x86_64|ppc64*|s390x|sparc64|aarch64)
+ x86_64|ppc64*|s390x|sparc64|aarch64|loongarch64)
libsubdirs="lib64 lib lib64"
;;
esac
--
2.33.0

22
add-riscv64-support.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/configure b/configure
index 49ac057..9c0a693 100755
--- a/configure
+++ b/configure
@@ -17054,7 +17054,7 @@ $as_echo_n "checking for boostlib >= $boost_lib_version_req... " >&6; }
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
- x86_64|ppc64*|s390x|sparc64|aarch64|loongarch64)
+ x86_64|ppc64*|s390x|sparc64|aarch64|loongarch64|riscv64)
libsubdirs="lib64 lib lib64"
;;
esac
@@ -27319,7 +27319,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
if test -n "$ac_prev"; then
case $ac_word in
- i?86 | x86_64 | ppc | ppc64*)
+ i?86 | x86_64 | ppc | ppc64* | riscv64)
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
ac_arch=$ac_word
else

24
add-sw_64-support.patch Normal file
View File

@ -0,0 +1,24 @@
From 1b61e8756e2d5ca947f424f75fe8ac81d3024837 Mon Sep 17 00:00:00 2001
From: maqi <maqi@uniontech.com>
Date: Tue, 10 Dec 2024 15:36:35 +0800
Subject: [PATCH] add sw_64 and mips64 support
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 1a9271c..27e12ec 100755
--- a/configure
+++ b/configure
@@ -17678,7 +17678,7 @@ printf %s "checking for boostlib >= $boost_lib_version_req... " >&6; }
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
- x86_64|ppc64*|s390x|sparc64|aarch64|loongarch64|riscv64)
+ x86_64|ppc64*|s390x|sparc64|aarch64|loongarch64|riscv64|sw_64)
libsubdirs="lib64 lib lib64"
;;
esac
--
2.39.3

View File

@ -0,0 +1,21 @@
diff -up gearmand-1.1.12/configure.ppc64le gearmand-1.1.12/configure
--- gearmand-1.1.12/configure.ppc64le 2014-09-09 17:12:22.368039057 +0200
+++ gearmand-1.1.12/configure 2014-09-09 17:11:49.584039857 +0200
@@ -16219,7 +16219,7 @@ $as_echo_n "checking for boostlib >= $bo
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
- x86_64|ppc64|s390x|sparc64|aarch64)
+ x86_64|ppc64*|s390x|sparc64|aarch64)
libsubdirs="lib64 lib lib64"
;;
esac
@@ -26051,7 +26051,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
if test -n "$ac_prev"; then
case $ac_word in
- i?86 | x86_64 | ppc | ppc64)
+ i?86 | x86_64 | ppc | ppc64*)
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
ac_arch=$ac_word
else

BIN
gearmand-1.1.20.tar.gz Normal file

Binary file not shown.

81
gearmand.init Normal file
View File

@ -0,0 +1,81 @@
#!/bin/bash
#
# gearmand Startup script for the Gearman server
#
# chkconfig: - 85 15
# description: Gearman is a distributed job system.
# processname: gearmand
# config: /etc/sysconfig/gearmand
# pidfile: /var/run/gearmand/gearmand.pid
#
### BEGIN INIT INFO
# Provides: gearmand
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start:
# Default-Stop:
# Short-Description: start and stop the Gearman server
# Description: Gearman is a distributed job system.
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/gearmand ]; then
. /etc/sysconfig/gearmand
fi
[ -z "${PIDFILE}" ] && pidfile="/var/run/gearmand/gearmand.pid"
[ -z "${LOCKFILE}" ] && lockfile="/var/lock/subsys/gearmand"
gearmand=/usr/sbin/gearmand
prog=gearmand
RETVAL=0
start() {
echo -n $"Starting $prog: "
daemon --pidfile=$pidfile --user=gearmand $gearmand -d $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && (touch $lockfile; pgrep -f $gearmand > $pidfile)
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc -p $pidfile $gearmand
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f $lockfile $pidfile
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status -p $pidfile $gearmand
RETVAL=$?
;;
restart|reload)
stop
start
;;
condrestart|try-restart)
if status -p $pidfile $gearmand >&/dev/null; then
stop
start
fi
;;
*)
echo $"Usage: $prog {start|stop|restart|reload|condrestart|status|help}"
RETVAL=3
esac
exit $RETVAL

12
gearmand.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Gearmand distributed job system
After=syslog.target network.target
[Service]
EnvironmentFile=/etc/sysconfig/gearmand
User=gearmand
Type=forking
ExecStart=/usr/sbin/gearmand -d --log-file none --syslog $OPTIONS
[Install]
WantedBy=multi-user.target

122
gearmand.spec Normal file
View File

@ -0,0 +1,122 @@
Name: gearmand
Version: 1.1.20
Release: 3
Summary: A distributed job system
License: BSD
URL: http://www.gearman.org
Source0: https://github.com/gearman/%{name}/releases/download/%{version}/gearmand-%{version}.tar.gz
Source1: gearmand.init
Source2: gearmand.sysconfig
Source3: gearmand.service
Patch0: gearmand-1.1.12-ppc64le.patch
Patch2: 0001-add-loongarch64-support-for-gearmand.patch
Patch100: add-riscv64-support.patch
Patch101: add-sw_64-support.patch
ExcludeArch: ppc
BuildRequires: gcc-c++ chrpath libuuid-devel boost-devel >= 1.37.0, boost-thread sqlite-devel
BuildRequires: tokyocabinet-devel libevent-devel libmemcached-devel, memcached hiredis-devel
BuildRequires: gperf mariadb-connector-c-devel openssl-devel libpq-devel zlib-devel systemd
%ifarch %{ix86} x86_64 ppc64 ppc64le aarch64 %{arm}
BuildRequires: gperftools-devel
%endif
Requires(pre): shadow-utils
Requires: procps
%{?systemd_requires}
%description
Gearman provides a generic framework to farm out work to other machines
or dispatch function calls to machines that are better suited to do the work.
It allows you to do work in parallel, to load balance processing, and to
call functions between languages. It can be used in a variety of applications,
from high-availability web sites to the transport for database replication.
In other words, it is the nervous system for how distributed processing
communicates.
%package -n libgearman
Summary: Development libraries for gearman
Provides: libgearman-1.0 = %{version}-%{release}
Obsoletes: libgearman-1.0 < %{version}-%{release}
%description -n libgearman
Development libraries for %{name}.
%package -n libgearman-devel
Summary: Development headers for libgearman
Requires: pkgconfig, libgearman = %{version}-%{release} libevent-devel
Provides: libgearman-1.0-devel = %{version}-%{release}
Obsoletes: libgearman-1.0-devel < %{version}-%{release}
%description -n libgearman-devel
Development headers for %{name}.
%prep
%autosetup -p1
%build
%configure --disable-static --disable-silent-rules --enable-ssl
make %{_smp_mflags}
%install
make install DESTDIR=%{buildroot}
rm -v %{buildroot}%{_libdir}/libgearman*.la
chrpath --delete %{buildroot}%{_bindir}/gearman
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/gearmand
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
%check
%pre
getent group gearmand >/dev/null || groupadd -r gearmand
getent passwd gearmand >/dev/null || \
useradd -r -g gearmand -d / -s /sbin/nologin \
-c "Gearmand job server" gearmand
exit 0
%post
%systemd_post gearmand.service
%preun
%systemd_preun gearmand.service
%postun
%systemd_postun_with_restart gearmand.service
%ldconfig_scriptlets -n libgearman
%files
%license COPYING
%doc AUTHORS ChangeLog CONTRIBUTING.md README.md THANKS
%config(noreplace) %{_sysconfdir}/sysconfig/gearmand
%{_sbindir}/gearmand
%{_bindir}/gearman
%{_bindir}/gearadmin
%{_mandir}/man1/*
%{_mandir}/man8/*
%{_unitdir}/%{name}.service
%files -n libgearman
%license COPYING
%{_libdir}/libgearman.so.8
%{_libdir}/libgearman.so.8.0.0
%files -n libgearman-devel
%license COPYING
%doc AUTHORS ChangeLog CONTRIBUTING.md README.md THANKS
%{_includedir}/libgearman/
%{_libdir}/pkgconfig/gearmand.pc
%{_libdir}/libgearman.so
%{_includedir}/libgearman-1.0/
%{_mandir}/man3/*
%changelog
* Wed Mar 05 2025 maqi <maqi@uniontech.com> - 1.1.20-3
- add sw_64 support
* Wed Jun 14 2023 EastDong <xudong23@iscas.ac.cn> - 1.1.20-2
- add riscv64 support for gearmand
* Thu Jun 8 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 1.1.19.1-2
- add loongarch64 support for gearmand
* Fri Apr 14 2023 liyanan <thistleslyn@163.com> - 1.1.20-1
- Update to 1.1.20
* Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 1.1.19.1-1
- package init

3
gearmand.sysconfig Normal file
View File

@ -0,0 +1,3 @@
### Settings for gearmand
# OPTIONS=""