forked from pool/iodine
Accepting request 898207 from network:utilities
OBS-URL: https://build.opensuse.org/request/show/898207 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iodine?expand=0&rev=8
This commit is contained in:
commit
0105018592
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 5 12:33:09 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||
|
||||
- Change to using systemd-sysusers
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 12 15:06:06 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
28
iodine.spec
28
iodine.spec
@ -34,6 +34,7 @@ Source1: iodine.service
|
||||
Source2: sysconfig.iodine
|
||||
Source3: iodined.service
|
||||
Source4: sysconfig.iodined
|
||||
Source5: system-user-iodined.conf
|
||||
#PATCH-FIX-OPENSUSE iodine-fix-makefile-prefix.patch malcolmlewis@opensuse.org -- Modify default install prefix.
|
||||
Patch0: iodine-fix-makefile-prefix.patch
|
||||
BuildRequires: fdupes
|
||||
@ -42,8 +43,15 @@ BuildRequires: zlib-devel
|
||||
# iodine still uses ifconfig
|
||||
Requires: net-tools-deprecated
|
||||
Requires(pre): %fillup_prereq
|
||||
PreReq: /usr/sbin/useradd
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} >= 1500
|
||||
Requires(pre): group(nobody)
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1550
|
||||
BuildRequires: sysuser-tools
|
||||
%sysusers_requires
|
||||
%else
|
||||
Requires(pre): /usr/sbin/useradd
|
||||
%endif
|
||||
|
||||
%description
|
||||
Lets you tunnel IPv4 data through a DNS server. This can be usable
|
||||
@ -56,6 +64,9 @@ queries are allowed.
|
||||
|
||||
%build
|
||||
make PREFIX=%{_prefix} %{?_smp_mflags}
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%sysusers_generate_pre %{SOURCE5} iodine
|
||||
%endif
|
||||
|
||||
%install
|
||||
make install PREFIX=%{buildroot}%{_prefix}
|
||||
@ -76,11 +87,19 @@ mkdir -p %{buildroot}/var/lib/iodined
|
||||
# make rc-link
|
||||
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rciodine
|
||||
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rciodined
|
||||
%if 0%{?suse_version} >= 1550
|
||||
mkdir -p %{buildroot}%{_sysusersdir}
|
||||
install -m 0644 %{SOURCE5} %{buildroot}%{_sysusersdir}/
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%pre -f iodine.pre
|
||||
%else
|
||||
%pre
|
||||
/usr/sbin/useradd -r -d /var/lib/iodined -s /bin/false -c "user for iodine dns tunnel" -g nobody iodined 2> /dev/null || :
|
||||
%endif
|
||||
%service_add_pre iodine.service
|
||||
%service_add_pre iodined.service
|
||||
/usr/sbin/useradd -r -d /var/lib/iodined -s /bin/false -c "user for iodine dns tunnel" -g nobody iodined 2> /dev/null || :
|
||||
|
||||
%post
|
||||
%service_add_post iodine.service
|
||||
@ -107,6 +126,9 @@ ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rciodined
|
||||
%{_sbindir}/rciodined
|
||||
%{_unitdir}/iodine.service
|
||||
%{_unitdir}/iodined.service
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%{_sysusersdir}/system-user-iodined.conf
|
||||
%endif
|
||||
%{_mandir}/man8/%{name}.8%{?ext_man}
|
||||
%{_mandir}/man8/%{name}d.8%{?ext_man}
|
||||
%attr(0700,iodined,nobody)/var/lib/iodined
|
||||
|
2
system-user-iodined.conf
Normal file
2
system-user-iodined.conf
Normal file
@ -0,0 +1,2 @@
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
u iodined -:nobody "user for iodine dns tunnel" /var/lib/iodined -
|
Loading…
Reference in New Issue
Block a user