diff --git a/harden_spice-webdavd.service.patch b/harden_spice-webdavd.service.patch new file mode 100644 index 0000000000000000000000000000000000000000..964397ad810c3c50b2d691e4912f2cace7688ab9 --- /dev/null +++ b/harden_spice-webdavd.service.patch @@ -0,0 +1,24 @@ +Index: phodav-2.5/data/spice-webdavd.service +=================================================================== +--- phodav-2.5.orig/data/spice-webdavd.service ++++ phodav-2.5/data/spice-webdavd.service +@@ -4,6 +4,19 @@ Requires=dbus.service avahi-daemon.servi + After=dbus.service avahi-daemon.service + + [Service] ++# added automatically, for details please see ++# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ++ProtectSystem=full ++ProtectHome=true ++PrivateDevices=true ++ProtectHostname=true ++ProtectClock=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectKernelLogs=true ++ProtectControlGroups=true ++RestrictRealtime=true ++# end of automatic additions + Type=simple + EnvironmentFile=-/etc/sysconfig/spice-webdavd + ExecStart=/usr/sbin/spice-webdavd -p 9843 $SPICE_WEBDAVD_EXTRA_ARGS diff --git a/phodav-2.5.tar.xz b/phodav-2.5.tar.xz deleted file mode 100644 index 3db81e368a570aaadbf41ff0d554c2fb3ad7e9eb..0000000000000000000000000000000000000000 Binary files a/phodav-2.5.tar.xz and /dev/null differ diff --git a/phodav-3.0.tar.xz b/phodav-3.0.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..6fbc5d7dd7b546ce9aee8996801447f0ec2c40c6 Binary files /dev/null and b/phodav-3.0.tar.xz differ diff --git a/phodav.spec b/phodav.spec index 361d05e206991139e75d80d4a87d1d33f3698a57..1b548122a14ddd84bcc485985f9bcd299a869daf 100644 --- a/phodav.spec +++ b/phodav.spec @@ -1,20 +1,28 @@ Name: phodav -Version: 2.5 +Version: 3.0 Release: 1 Summary: A WebDav server implementation using libsoup License: LGPLv2+ URL: https://wiki.gnome.org/phodav Source0: http://download.gnome.org/sources/%{name}/%{version}/%{name}-%{version}.tar.xz -BuildRequires: systemd-devel systemd-units libsoup-devel avahi-gobject-devel asciidoc -BuildRequires: xmlto avahi-gobject gcc git-core meson gettext-devel gtk-doc + +Patch0: harden_spice-webdavd.service.patch + +BuildRequires: asciidoc xmlto gcc git-core meson gettext-devel gtk-doc pkgconfig systemd +BuildRequires: pkgconfig(avahi-client) +BuildRequires: pkgconfig(avahi-gobject) +BuildRequires: pkgconfig(gio-unix-2.0) >= 2.44 +BuildRequires: pkgconfig(glib-2.0) >= 2.44 +BuildRequires: pkgconfig(libsoup-3.0) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(udev) %description A WebDAV server implementation using libsoup (RFC 4918). %package -n libphodav Summary: A library to serve files with WebDAV -Provides: libphodav-2.0 = 0:%{version}-%{release} libphodav2 = 0:%{version}-%{release} -Obsoletes: libphodav-2.0 <= 0:2.0-3 libphodav2 <= 0:2.0-4 libphodav-1.0 <= 0:0.4-6 %description -n libphodav This package provides the library of WebDAV server. @@ -22,8 +30,6 @@ This package provides the library of WebDAV server. %package -n libphodav-devel Summary: Development files for libphodav Requires: libphodav = %{version}-%{release} -Provides: libphodav-2.0-devel = 0:%{version}-%{release} libphodav2-devel = 0:%{version}-%{release} -Obsoletes: libphodav-2.0-devel <= 0:2.0-3 libphodav2-devel <= 0:2.0-4 libphodav-1.0-devel <= 0:0.4-6 %description -n libphodav-devel The libphodav-devel package includes the header files for libphodav. @@ -36,12 +42,6 @@ The chezdav package contains a simple tool allows to share a particular directory (with optional digest authentication). The service is announced over mDNS for clients to discover. -%package -n chezdav-help -Summary: Help documentation for the chezdav-help - -%description -n chezdav-help -Help documentation for the chezdav-help - %package -n spice-webdavd Summary: Spice daemon for the DAV channel Requires: avahi @@ -65,7 +65,8 @@ the Spice virtio channel. %meson_install %delete_la_and_a -%find_lang phodav-2.0 --with-gnome +%find_lang phodav-3.0 --with-gnome +ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcspice-webdavd %post -n libphodav /sbin/ldconfig @@ -82,30 +83,32 @@ the Spice virtio channel. %postun -n spice-webdavd %systemd_postun_with_restart spice-webdavd.service -%files -n libphodav -f phodav-2.0.lang +%files -n libphodav -f phodav-3.0.lang %doc COPYING -%{_libdir}/libphodav-2.0.so.0* +%{_libdir}/libphodav-3.0.so.0* %files -n libphodav-devel -%dir %{_includedir}/libphodav-2.0/ -%{_includedir}/libphodav-2.0/* -%{_libdir}/libphodav-2.0.so +%dir %{_includedir}/libphodav-3.0/ +%{_includedir}/libphodav-3.0/* +%{_libdir}/libphodav-3.0.so %{_libdir}/pkgconfig/* -%{_datadir}/gtk-doc/html/phodav-2.0/* +%{_datadir}/gtk-doc/html/phodav-3.0/* %files -n chezdav %{_bindir}/chezdav - -%files -n chezdav-help %{_mandir}/man1/chezdav.1* %files -n spice-webdavd %doc COPYING %{_sbindir}/spice-webdavd -/usr/lib/udev/rules.d/70-spice-webdavd.rules +%{_sbindir}/rcspice-webdavd +%{_udevrulesdir}/70-spice-webdavd.rules %{_unitdir}/spice-webdavd.service %changelog +* Mon Jan 02 2023 lin zhang - 3.0-1 +- update to 3.0 + * Wed Jun 30 2021 weijin deng - 2.5-1 - Upgrade to 2.5 - Use meson rebuild