aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-09-09 21:51:07 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2022-09-09 21:51:07 +0200
commita3d2c43fbac6be0848e9388ccc96a27076a7b0ed (patch)
tree231d6a6ac0ea1e1dd33e520188acc874348cf024
parentdc1a17d7d13315754d19b3feae7020441e3ab4cc (diff)
downloadgnunet-rpm-a3d2c43fbac6be0848e9388ccc96a27076a7b0ed.tar.gz
gnunet-rpm-a3d2c43fbac6be0848e9388ccc96a27076a7b0ed.zip
update with systemd scripts
-rw-r--r--rpmbuild/SPECS/gnunet.spec20
1 files changed, 16 insertions, 4 deletions
diff --git a/rpmbuild/SPECS/gnunet.spec b/rpmbuild/SPECS/gnunet.spec
index d275786..f7ddc63 100644
--- a/rpmbuild/SPECS/gnunet.spec
+++ b/rpmbuild/SPECS/gnunet.spec
@@ -4,7 +4,7 @@
4 4
5Name: gnunet 5Name: gnunet
6Version: 0.17.5 6Version: 0.17.5
7Release: 1%{?dist} 7Release: 2%{?dist}
8Summary: Framework for secure peer-to-peer networking 8Summary: Framework for secure peer-to-peer networking
9License: AGPLv3 9License: AGPLv3
10Group: Productivity/Networking/File-Sharing 10Group: Productivity/Networking/File-Sharing
@@ -44,6 +44,7 @@ BuildRequires: libsodium-devel
44BuildRequires: sqlite-devel 44BuildRequires: sqlite-devel
45BuildRequires: gnupg2 45BuildRequires: gnupg2
46BuildRequires: libjose-devel 46BuildRequires: libjose-devel
47BuildRequires: systemd-rpm-macros
47Requires: libextractor 48Requires: libextractor
48Requires: openssl 49Requires: openssl
49Requires: nss-util 50Requires: nss-util
@@ -190,16 +191,22 @@ getent group %{name}dns >/dev/null || /usr/sbin/groupadd -r %{name}dns
190getent passwd %{name} >/dev/null || useradd -r -g %{name} -G %{name}dns -m -d %{gnunethome} %{gnunetuser} -c "GNUnet system account" 191getent passwd %{name} >/dev/null || useradd -r -g %{name} -G %{name}dns -m -d %{gnunethome} %{gnunetuser} -c "GNUnet system account"
191exit 0 192exit 0
192 193
194# The sed replacements can be removed for 0.17.6
193%install 195%install
194make install DESTDIR=%{buildroot} 196make install DESTDIR=%{buildroot}
197sed -i 's/\/usr\/lib/\/usr\/lib64/' "contrib/services/systemd/%{name}.service"
198sed -i 's/SYSTEM_ONLY/START_SYSTEM_SERVICE/' "contrib/conf/gnunet/gnunet-system.conf"
199sed -i 's/USER_ONLY/START_USER_SERVICE/' "contrib/conf/gnunet/gnunet-system.conf"
200install -Dm644 "contrib/services/systemd/%{name}.service" "%{buildroot}/%{_unitdir}/%{name}.service"
201sed -i 's/\/usr\/lib/\/usr\/lib64/' "contrib/services/systemd/%{name}-user.service"
202install -Dm644 "contrib/services/systemd/%{name}-user.service" "%{buildroot}/%{_userunitdir}/%{name}-user.service"
203install -Dm644 "contrib/conf/gnunet/gnunet-system.conf" %{buildroot}/%{_sysconfdir}/gnunet.conf
195 204
196%check 205%check
197#make check 206#make check
198 207
199%post 208%post
200mkdir -p /%{_sysconfdir}/%{name} 209mkdir -p ~/.config/gnunet
201touch /%{_sysconfdir}/%{name}/gnunet.conf
202mkdir -p ~/.config
203touch ~/.config/gnunet.conf 210touch ~/.config/gnunet.conf
204 211
205%postun 212%postun
@@ -601,6 +608,9 @@ touch ~/.config/gnunet.conf
601%{_libdir}/libnss_gns4.so.2 608%{_libdir}/libnss_gns4.so.2
602%{_libdir}/libnss_gns6.so.2 609%{_libdir}/libnss_gns6.so.2
603%{_libdir}/pkgconfig/gnunetscalarproduct.pc 610%{_libdir}/pkgconfig/gnunetscalarproduct.pc
611%{_unitdir}/%{name}.service
612%{_userunitdir}/%{name}-user.service
613%{_sysconfdir}/gnunet.conf
604 614
605%files devel 615%files devel
606%{_libdir}/libgnunetblockgroup.so 616%{_libdir}/libgnunetblockgroup.so
@@ -915,6 +925,8 @@ touch ~/.config/gnunet.conf
915%{_mandir}/man1/gnunet-ecc.1.gz 925%{_mandir}/man1/gnunet-ecc.1.gz
916 926
917%changelog 927%changelog
928* Fri Sep 09 2022 Martin Schanzenbach <schanzen@gnunet.org> - 0.17.5
929- Add systemd scripts
918* Sun Sep 04 2022 Martin Schanzenbach <schanzen@gnunet.org> - 0.17.5 930* Sun Sep 04 2022 Martin Schanzenbach <schanzen@gnunet.org> - 0.17.5
919- Version bump 931- Version bump
920* Fri Aug 12 2022 Martin Schanzenbach <schanzen@gnunet.org> - 0.17.4 932* Fri Aug 12 2022 Martin Schanzenbach <schanzen@gnunet.org> - 0.17.4