Compare commits
10 Commits
61885d7a2a
...
8d12c12453
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d12c12453 | ||
|
|
bdf16d45d1 | ||
|
|
9b6117a284 | ||
|
|
cca34946a2 | ||
|
|
d8b02410db | ||
|
|
486e097a9d | ||
|
|
0b95a6d3d5 | ||
|
|
19ad143df5 | ||
|
|
2453316bdb | ||
|
|
b2a496c16a |
25
0001-add-loongarch64-support-for-gearmand.patch
Normal file
25
0001-add-loongarch64-support-for-gearmand.patch
Normal 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
22
add-riscv64-support.patch
Normal 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
24
add-sw_64-support.patch
Normal 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
|
||||||
21
gearmand-1.1.12-ppc64le.patch
Normal file
21
gearmand-1.1.12-ppc64le.patch
Normal 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
BIN
gearmand-1.1.20.tar.gz
Normal file
Binary file not shown.
81
gearmand.init
Normal file
81
gearmand.init
Normal 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
12
gearmand.service
Normal 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
122
gearmand.spec
Normal 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
3
gearmand.sysconfig
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
### Settings for gearmand
|
||||||
|
# OPTIONS=""
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user