mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2025-01-03 14:32:40 +00:00
Add user/group to spec, shore up systemd scripts
This commit is contained in:
parent
f3beb17727
commit
d34f06d3c3
1 changed files with 43 additions and 10 deletions
53
dist/rpm/arsse.spec
vendored
53
dist/rpm/arsse.spec
vendored
|
@ -24,14 +24,17 @@ Requires: php-hash
|
||||||
Requires: php-json
|
Requires: php-json
|
||||||
# A database option is required; a Web server option is required as well, but what we package is not exhaustive
|
# A database option is required; a Web server option is required as well, but what we package is not exhaustive
|
||||||
Requires: arsse-conf-db
|
Requires: arsse-conf-db
|
||||||
|
# User and Group
|
||||||
|
Requires: user(arsse) group(arsse)
|
||||||
|
|
||||||
|
%systemd_requires
|
||||||
|
|
||||||
Recommends: arsse-sqlite
|
Recommends: arsse-sqlite
|
||||||
Suggests: php-curl
|
Suggests: php-curl
|
||||||
|
|
||||||
Provides: arsse = %{version}
|
|
||||||
Obsoletes: arsse < %{version}
|
Obsoletes: arsse < %{version}
|
||||||
|
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
|
BuildRequires: sysuser-tools
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Arsse bridges the gap between multiple existing newsfeed aggregator
|
The Arsse bridges the gap between multiple existing newsfeed aggregator
|
||||||
|
@ -96,8 +99,8 @@ Group: Productivity/Networking/Web/Utilities
|
||||||
Requires: php-fpm >= %{minver}
|
Requires: php-fpm >= %{minver}
|
||||||
Requires: nginx
|
Requires: nginx
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Provides: arsse-nginx-fpm = %{version}
|
Provides: arsse-config-nginx-fpm = %{version}
|
||||||
Obsoletes: arsse-nginx-fpm < %{version}
|
Obsoletes: arsse-config-nginx-fpm < %{version}
|
||||||
Supplements: packageand(apache2:arsse)
|
Supplements: packageand(apache2:arsse)
|
||||||
|
|
||||||
%description config-nginx-fpm
|
%description config-nginx-fpm
|
||||||
|
@ -110,27 +113,39 @@ Group: Productivity/Networking/Web/Utilities
|
||||||
Requires: php-fpm >= %{minver}
|
Requires: php-fpm >= %{minver}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: apache >= 2.4
|
Requires: apache >= 2.4
|
||||||
Provides: arsse-apache-fpm = %{version}
|
Provides: arsse-config-apache-fpm = %{version}
|
||||||
Obsoletes: arsse-apache-fpm < %{version}
|
Obsoletes: arsse-config-apache-fpm < %{version}
|
||||||
Supplements: packageand(apache2:arsse)
|
Supplements: packageand(apache2:arsse)
|
||||||
|
|
||||||
%description config-apache-fpm
|
%description config-apache-fpm
|
||||||
Apache Web server configuration for The Arsse using PHP-FPM. Using Ngix is
|
Apache Web server configuration for The Arsse using PHP-FPM. Using Ngix is
|
||||||
generally preferred as it receives more testing.
|
generally preferred as it receives more testing.
|
||||||
|
|
||||||
|
%package -n system-user-arsse
|
||||||
|
Summary: System user and group arsse
|
||||||
|
Group: System/Fhs
|
||||||
|
%{sysusers_requires}
|
||||||
|
|
||||||
|
%description -n system-user-arsse
|
||||||
|
This package provides the system account and group 'arsse'.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}
|
%setup -q -n %{name}
|
||||||
### Perform adjustments to config files here?
|
# Patch the executable so it does not use env as the interpreter; RPMLint complains about this
|
||||||
|
sed -i -se 's/#! \?\/usr\/bin\/env php/#! \/usr\/bin\/php/' dist/arsse
|
||||||
|
# Remove stray executable
|
||||||
|
rm -f vendor/nicolus/picofeed/picofeed
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Nothing to do
|
%sysusers_generate_pre dist/sysuser.conf arsse system-user-arsse.conf
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p "%{buildroot}%{_datadir}/php/arsse" "%{buildroot}%{_mandir}" "%{buildroot}%{_unitdir}"
|
mkdir -p "%{buildroot}%{_datadir}/php/arsse" "%{buildroot}%{_mandir}" "%{buildroot}%{_unitdir}" "%{buildroot}%{_sysusersdir}" "%{buildroot}%{_bindir}"
|
||||||
cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "%{buildroot}%{_datadir}/php/arsse"
|
cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "%{buildroot}%{_datadir}/php/arsse"
|
||||||
cp -r dist/man/* "%{buildroot}%{_mandir}"
|
cp -r dist/man/* "%{buildroot}%{_mandir}"
|
||||||
cp dist/systemd/arsse-fetch.service "%{buildroot}%{_unitdir}/arsse.service"
|
cp dist/systemd/arsse-fetch.service "%{buildroot}%{_unitdir}/arsse.service"
|
||||||
install -Dm755 dist/arsse "%{buildroot}%{_bindir}/arsse"
|
install -m 755 dist/arsse "%{buildroot}%{_bindir}/arsse"
|
||||||
|
install -m 644 dist/sysuser.conf %{buildroot}%{_sysusersdir}/system-user-arsse.conf
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%dir %{_datadir}/php
|
%dir %{_datadir}/php
|
||||||
|
@ -140,3 +155,21 @@ install -Dm755 dist/arsse "%{buildroot}%{_bindir}/arsse"
|
||||||
%{_mandir}/man*/arsse.*
|
%{_mandir}/man*/arsse.*
|
||||||
%{_bindir}/arsse
|
%{_bindir}/arsse
|
||||||
%{_unitdir}/arsse.service
|
%{_unitdir}/arsse.service
|
||||||
|
|
||||||
|
%files -n system-user-arsse
|
||||||
|
%{_sysusersdir}/system-user-arsse.conf
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%service_add_pre arsse.service demo1.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
%service_add_post arsse.service demo1.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun arsse.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun arsse.service
|
||||||
|
%service_del_postun_without_restart arsse.service
|
||||||
|
|
||||||
|
%pre -n system-user-arsse -f arsse.pre
|
Loading…
Reference in a new issue