Accepting request 287259 from home:pluskalm:branches:network:utilities

- Cleanup spec file
  * using spec-cleaner
  * remove unnecessary %defines
- Create new package (devel)
- Install either init script or unit file
- Refresh dependencies
- Update to 1.4.22
  * gatkq: return key in response
  * Handle SIGTERM the same as SIGINT
  * Fix off-by-one causing segfault in lru_crawler
  * Fix potential corruption for incr/decr of 0b items
  * Fix  issue #369  - uninitialized stats_lock
  * issue#370 : slab re-balance is not thread-safe in function 
    do_item_get
  * Fix potential corruption in hash table expansion
  * use item lock instead of global lock when hash expanding
  * fix hang when lru crawler started from commandline
  * rename thread_init to avoid runtime failure on AIX
  * Support -V (version option)
- Changes for 1.4.21
  * makefile cleanups
  * Avoid OOM errors when locked items stuck in tail

OBS-URL: https://build.opensuse.org/request/show/287259
OBS-URL: https://build.opensuse.org/package/show/network:utilities/memcached?expand=0&rev=28
This commit is contained in:
Marcus Meissner 2015-02-23 16:45:39 +00:00 committed by Git OBS Bridge
parent 10c94e9a49
commit 8b515ef511
4 changed files with 116 additions and 86 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:25d121408eed0b1522308ff3520819b130f04ba0554c68a673af23a915a54018
size 337380

3
memcached-1.4.22.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cfcc470c57079914aca6e565b2daeed1d13356ad492909d9aafd6eefac538c2a
size 346632

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
Sun Feb 22 20:47:12 UTC 2015 - mpluskal@suse.com
- Cleanup spec file
* using spec-cleaner
* remove unnecessary %defines
- Create new package (devel)
- Install either init script or unit file
- Refresh dependencies
- Update to 1.4.22
* gatkq: return key in response
* Handle SIGTERM the same as SIGINT
* Fix off-by-one causing segfault in lru_crawler
* Fix potential corruption for incr/decr of 0b items
* Fix issue #369 - uninitialized stats_lock
* issue#370 : slab re-balance is not thread-safe in function
do_item_get
* Fix potential corruption in hash table expansion
* use item lock instead of global lock when hash expanding
* fix hang when lru crawler started from commandline
* rename thread_init to avoid runtime failure on AIX
* Support -V (version option)
- Changes for 1.4.21
* makefile cleanups
* Avoid OOM errors when locked items stuck in tail
-------------------------------------------------------------------
Sun Nov 09 19:11:00 UTC 2014 - Led <ledest@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package memcached
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,51 +16,38 @@
#
%if 0%{?suse_version} > 1210
%bcond_without systemd
%endif
# currently fails due to network setup
%bcond_with check
Name: memcached
Version: 1.4.20
Version: 1.4.22
Release: 0
%define pkg_name memcached
%define pkg_version %{version}
#
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1100
BuildRequires: libevent-devel
%else
BuildRequires: libevent
%endif
BuildRequires: automake
BuildRequires: cyrus-sasl-devel
BuildRequires: pkgconfig
%if %{with systemd}
BuildRequires: systemd
%endif
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/sbin/useradd
Conflicts: memcached-unstable
%define home_dir /var/lib/%{pkg_name}
Url: http://memcached.org/
Source: http://www.memcached.org/files/%{name}-%{version}.tar.gz
Source1: %{pkg_name}.init
Source2: %{pkg_name}.sysconfig
Source3: memcached-rpmlintrc
Source4: memcached.service
#
Patch0: memcached-1.4.5.dif
Patch1: memcached-autofoo.patch
Patch2: memcached-use-endian_h.patch
#
Summary: A high-performance, distributed memory object caching system
License: BSD-3-Clause
Group: Productivity/Networking/Other
%if %{with systemd}
Url: http://memcached.org/
Source: http://www.memcached.org/files/%{name}-%{version}.tar.gz
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: memcached-rpmlintrc
Source4: memcached.service
Patch0: memcached-1.4.5.dif
Patch1: memcached-autofoo.patch
Patch2: memcached-use-endian_h.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cyrus-sasl-devel
BuildRequires: libevent-devel
BuildRequires: libtool
BuildRequires: pkg-config
Requires(pre): %fillup_prereq
Requires(pre): %insserv_prereq
Requires(pre): %{_sbindir}/groupadd
Requires(pre): %{_sbindir}/useradd
Conflicts: memcached-unstable
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1210
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%endif
%description
Memcached is a high-performance, distributed memory object caching
system, generic in nature, but intended for use in speeding up dynamic
@ -74,81 +61,98 @@ almost nothing, yielding faster page load times for users, better
resource utilization, and faster access to the databases on a memcache
miss.
%package devel
Summary: Files needed for development using memcached protocol
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
Memcached is a high-performance, distributed memory object caching
system, generic in nature, but intended for use in speeding up dynamic
web applications by alleviating database load.
This package contains development files
%prep
%setup -q -n %{pkg_name}-%{pkg_version}
%setup -q -n %{name}-%{version}
%patch0
%patch1
%patch2
%build
autoreconf -fiv
autoreconf -fi
%if 0%{?suse_version} <= 1140
export LIBEVENT_CFLAGS="-I%{_includedir}"
export LIBEVENT_LIBS="-levent"
%endif
%configure --enable-sasl --disable-coverage --bindir=%{_sbindir}
%configure \
--enable-sasl \
--disable-coverage \
--bindir=%{_sbindir}
make %{?_smp_mflags}
%if %{with check}
%check
%{__make} test
%endif
%install
%makeinstall
%{__install} -D -m 0755 scripts/memcached-tool %{buildroot}%{_sbindir}/memcached-tool
%{__install} -Dd -m 0755 %{buildroot}%{home_dir}
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
%{__ln_s} -f ../..%{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
%{__install} -D -m 0644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.%{pkg_name}
%if %{with systemd}
%{__install} -D -m 0644 %{S:4} %{buildroot}%{_unitdir}/%{pkg_name}.service
make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -D -m 0755 scripts/memcached-tool %{buildroot}%{_sbindir}/memcached-tool
install -Dd -m 0755 %{buildroot}%{_localstatedir}/lib/%{name}
install -D -m 0644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
%if 0%{?suse_version} > 1210
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
%else
install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{name}
ln -s ../..%{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
%endif
%clean
%{__rm} -rf %{buildroot};
%pre
/usr/sbin/groupadd -r %{pkg_name} >/dev/null 2>&1 || :
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "user for %{pkg_name}" -d %{home_dir} %{pkg_name} >/dev/null 2>&1 || :
%if %{with systemd}
%service_add_pre %{pkg_name}.service
%{_sbindir}/groupadd -r %{name} >/dev/null 2>&1 || :
%{_sbindir}/useradd -g %{name} -s /bin/false -r -c "user for %{name}" -d %{_localstatedir}/lib/%{name} %{name} >/dev/null 2>&1 || :
%if 0%{?suse_version} > 1210
%service_add_pre %{name}.service
%endif
%post
%fillup_and_insserv %{pkg_name}
%if %{with systemd}
%service_add_post %{pkg_name}.service
%if 0%{?suse_version} > 1210
%service_add_post %{name}.service
%fillup_only %{name}
%else
%fillup_and_insserv %{name}
%endif
%preun
%stop_on_removal %{pkg_name}
%if %{with systemd}
%service_del_preun %{pkg_name}.service
%if 0%{?suse_version} > 1210
%service_del_preun %{name}.service
%else
%stop_on_removal %{name}
%endif
%postun
%restart_on_update %{pkg_name}
%{insserv_cleanup}
%if %{with systemd}
%service_del_postun %{pkg_name}.service
%if 0%{?suse_version} > 1210
%service_del_postun %{name}.service
%else
%restart_on_update %{name}
%insserv_cleanup
%endif
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS doc/*.txt
%{_sbindir}/%{pkg_name}
# %{_sbindir}/%{pkg_name}-debug
%doc AUTHORS ChangeLog COPYING NEWS
%{_sbindir}/%{name}
%{_sbindir}/memcached-tool
%{_sbindir}/rc%{pkg_name}
%{_mandir}/man1/%{pkg_name}.*
%{_sysconfdir}/init.d/%{pkg_name}
%{_includedir}/%{pkg_name}
/var/adm/fillup-templates/sysconfig.%{pkg_name}
%dir %attr(755,root,root) %{home_dir}
%if %{with systemd}
%{_unitdir}/%{pkg_name}.service
%{_sbindir}/rc%{name}
%{_mandir}/man1/%{name}.*
%if 0%{?suse_version} > 1210
%{_unitdir}/%{name}.service
%else
%{_sysconfdir}/init.d/%{name}
%endif
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
%dir %attr(755,root,root) %{_localstatedir}/lib/%{name}
%files devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS doc/*.txt
%{_includedir}/%{name}
%changelog