Hello community, here is the log from the commit of package thttpd for openSUSE:Factory checked in at 2014-07-21 21:40:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/thttpd (Old) and /work/SRC/openSUSE:Factory/.thttpd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "thttpd" Changes: -------- --- /work/SRC/openSUSE:Factory/thttpd/thttpd.changes 2013-12-04 12:32:08.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.thttpd.new/thttpd.changes 2014-07-21 22:35:07.000000000 +0200 @@ -1,0 +2,5 @@ +Fri Jul 18 16:40:22 UTC 2014 - [email protected] + +- Use systemd instead of sysvinit in openSUSE > 12.2 + +------------------------------------------------------------------- New: ---- thttpd.service ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ thttpd.spec ++++++ --- /var/tmp/diff_new_pack.1RBqub/_old 2014-07-21 22:35:08.000000000 +0200 +++ /var/tmp/diff_new_pack.1RBqub/_new 2014-07-21 22:35:08.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package thttpd # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,14 +15,26 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%if 0%{?suse_version} > 1220 +%define with_systemd 1 +%else +%define with_systemd 0 +%endif Name: thttpd Provides: http_daemon -PreReq: %fillup_prereq %insserv_prereq permissions +%if %{with_systemd} +BuildRequires: systemd +%{?systemd_requires} +%else +PreReq: %fillup_prereq %insserv_prereq +%endif +PreReq: permissions Version: 2.25b Release: 0 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-SuSE.tar.bz2 +Source2: %{name}.service Patch0: %{name}-%{version}-configure.patch Patch1: %{name}-%{version}-dirs.patch Patch2: %{name}-%{version}-time_h.patch @@ -55,12 +67,6 @@ is provided for. Advanced features include the ability to throttle traffic. - - -Authors: --------- - [email protected] - %define serverroot /srv/www %prep @@ -96,11 +102,7 @@ aclocal --force autoconf -f V_CCOPT="$RPM_OPT_FLAGS -Wall" \ -./configure \ - --mandir=%{_mandir} \ - --prefix=%{_prefix} \ - --infodir=%{_infodir} \ - --sysconfdir=%{_sysconfdir} +%configure %ifarch s390 s390x make F_PIE="-fPIE" %else @@ -116,9 +118,25 @@ make DESTDIR=%{buildroot} install cp -a SuSE/* %{buildroot} rm -f %{buildroot}%{serverroot}/htdocs/index.html +%if %{with_systemd} +rm -rf %{buildroot}/etc/init.d +rm %{buildroot}%{_sbindir}/rc%{name} +mkdir -p %{buildroot}%{_unitdir} +install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service +ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name} +%endif + +%if %{with_systemd} +%pre +%service_add_pre %{name}.service +%endif %post +%if %{with_systemd} +%service_add_post %{name}.service +%else %{fillup_and_insserv thttpd} +%endif %if 0%{?suse_version} <= 1130 %run_permissions %else @@ -129,14 +147,19 @@ %verify_permissions -e /usr/bin/makeweb %preun +%if %{with_systemd} +%service_del_preun %{name}.service +%else %stop_on_removal thttpd +%endif %postun +%if %{with_systemd} +%service_del_postun %{name}.service +%else %restart_on_update thttpd %{insserv_cleanup} - -%clean -rm -rf "%{buildroot}" +%endif %files %defattr(-, root, root) @@ -147,7 +170,11 @@ /usr/bin/htpasswd /usr/sbin/* /usr/share/man/*/* +%if %{with_systemd} +%{_unitdir}/%{name}.service +%else %config /etc/init.d/thttpd +%endif %config(noreplace) /etc/thttpd.conf %changelog ++++++ thttpd.service ++++++ [Unit] Description=Tiny HTTP Daemon [Service] PIDFile=/run/thttpd.pid ExecStart=/usr/bin/thttpd -D -C /etc/thttpd.conf Restart=always [Install] WantedBy=multi-user.target -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
