diff --git a/_service b/_service index d0cef17..1d9cf63 100644 --- a/_service +++ b/_service @@ -1,15 +1,14 @@ - + git https://github.com/grommunio/grommunio-index grommunio-index master - 0.1 @PARENT_TAG@.@TAG_OFFSET@.%h - + *.tar xz - + diff --git a/debian.changelog b/debian.changelog index 6f3f489..df17e52 100644 --- a/debian.changelog +++ b/debian.changelog @@ -1,4 +1,4 @@ -grommunio-index (0.1.18.6a0f73a) unstable; urgency=low +grommunio-index (1.0.6.f40d25b) unstable; urgency=low * Initial package. diff --git a/debian.control b/debian.control index 991045c..359bdc9 100644 --- a/debian.control +++ b/debian.control @@ -10,5 +10,7 @@ Standards-Version: 4.5.1 Package: grommunio-index Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} +Requires: system-user-groindex, + system-group-groweb, system-group-gromoxcf Description: Generator for grommunio-web search indexes . diff --git a/debian.grommunio-index.postinst b/debian.grommunio-index.postinst new file mode 100644 index 0000000..c2d3424 --- /dev/null +++ b/debian.grommunio-index.postinst @@ -0,0 +1,3 @@ +usermod grommunio -aG groweb || : +find /var/lib/grommunio-web/sqlite-index/ -mindepth 1 "(" -type d -o -type f ")" -exec chmod g+w,o-w {} + || : +find /var/lib/grommunio-web/sqlite-index/ -mindepth 1 "(" -type d -o -type f ")" -exec chgrp -h groweb {} + || : diff --git a/grommunio-index-0.1.18.6a0f73a.tar.xz b/grommunio-index-0.1.18.6a0f73a.tar.xz deleted file mode 100644 index 7b44221..0000000 --- a/grommunio-index-0.1.18.6a0f73a.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab81dc53c13ad6482f006856a85f7772ab644bb52e1d4ca7f7fae677ce7eb6f4 -size 21092 diff --git a/grommunio-index-1.0.6.f40d25b.tar.xz b/grommunio-index-1.0.6.f40d25b.tar.xz new file mode 100644 index 0000000..27a3960 --- /dev/null +++ b/grommunio-index-1.0.6.f40d25b.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:809b060d222309c6c5be5abe539f2765dc26a4ac011271f084f03087829a55b8 +size 22748 diff --git a/grommunio-index.changes b/grommunio-index.changes index 4201d8a..4749daf 100644 --- a/grommunio-index.changes +++ b/grommunio-index.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 7 12:32:59 UTC 2024 - Jan Engelhardt + +- Update to snapshot 1.0.6 + * Switch to user identity groindex/groweb+gromoxcf + ------------------------------------------------------------------- Tue Jan 17 12:59:53 UTC 2023 - Jan Engelhardt diff --git a/grommunio-index.dsc b/grommunio-index.dsc index 50f3a49..b0c39a1 100644 --- a/grommunio-index.dsc +++ b/grommunio-index.dsc @@ -1,7 +1,7 @@ Format: 1.0 Source: grommunio-index Architecture: any -Version: 0.1.18.6a0f73a +Version: 1.0.6.f40d25b DEBTRANSFORM-RELEASE: 1 Maintainer: Grommunio Homepage: https://grommunio.com/ diff --git a/grommunio-index.spec b/grommunio-index.spec index 73e4dcb..59cabf1 100644 --- a/grommunio-index.spec +++ b/grommunio-index.spec @@ -1,7 +1,7 @@ # # spec file for package grommunio-index # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: grommunio-index -Version: 0.1.18.6a0f73a +Version: 1.0.6.f40d25b Release: 0 Summary: Generator for grommunio-web search indexes License: AGPL-3.0-or-later @@ -30,12 +30,29 @@ BuildRequires: gcc11-c++ %else BuildRequires: gcc-c++ %endif +%if 0%{?suse_version} +BuildRequires: libmysqlclient-devel >= 5.6 +%else +BuildRequires: mariadb-devel >= 5.6 +%endif BuildRequires: libexmdbpp-devel >= 1.8.0 BuildRequires: libexmdbpp0 >= 1.8.0 +BuildRequires: pkgconfig(libHX) >= 3.27 BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(systemd) Requires: libexmdbpp0 >= 1.8.0 -Requires: user(groweb) +%if 0%{?suse_version} >= 1500 +BuildRequires: sysuser-tools +%sysusers_requires +%else +Requires(pre): %_sbindir/groupadd +Requires(pre): %_sbindir/useradd +%endif +Requires(pre): group(groweb) +Requires(pre): group(gromoxcf) +Requires: group(gromoxcf) +Requires: group(groweb) +Requires: user(groindex) %define services grommunio-index.service grommunio-index.timer %description @@ -45,48 +62,65 @@ A C++17 program for the generation of grommunio-web fulltext search indexes. %autosetup -p1 %build +>user.pre +%if 0%{?suse_version} >= 1500 +%sysusers_generate_pre %_sourcedir/system-user-groindex.conf user system-user-groindex.conf +%endif + +pushd . %if 0%{?suse_version} && 0%{?suse_version} < 1550 %cmake -DCMAKE_CXX_COMPILER=%_bindir/g++-11 %else -%if 0%{?centos_version} == 800 -echo '#!/bin/sh -ex' >cxx -echo 'exec g++ "$@" -lstdc++fs' >>cxx -ls -al cxx -chmod a+x cxx -export CXX="$PWD/cxx" %cmake -%else -%cmake -%endif %endif %cmake_build +popd %install -%if 0%{?centos_version} == 800 -export CXX="$PWD/cxx" -%endif +pushd . %cmake_install +popd mkdir -p "%buildroot/%_datadir/%name" -%pre +%pre -f user.pre +%if 0%{?rhel} || 0%{?fedora_version} +getent group groindex >/dev/null || %_sbindir/groupadd -r groindex +getent passwd groindex >/dev/null || %_sbindir/useradd -g groindex -s /bin/false \ + -r -c "user for %name" -d / groindex +usermod groindex -aG groweb +usermod groindex -aG gromoxcf +%endif +%if 0%{?service_add_pre:1} %service_add_pre %services +%endif %post +find /var/lib/grommunio-web/sqlite-index/ -mindepth 1 "(" -type d -o -type f ")" -exec chmod g+w,o-w {} + || : +find /var/lib/grommunio-web/sqlite-index/ -mindepth 1 "(" -type d -o -type f ")" -exec chgrp -h groweb {} + || : +%if 0%{?service_add_post:1} %service_add_post %services -if test -x /bin/systemctl; then - systemctl enable --now grommunio-index.timer || : -fi +%else +%systemd_post %services +%endif %preun +%if 0%{?service_del_preun:1} %service_del_preun %services +%else +%systemd_preun %services +%endif %postun +%if 0%{?service_del_postun:1} %service_del_postun %services +%else +%systemd_postun_with_restart %services +%endif %files %_bindir/grommunio-index* -%_sbindir/grommunio-index* %_datadir/%name/ +%_sysusersdir/*.conf %_unitdir/* %license LICENSE.txt