Browse Source

updated 4 packages

librsvg2-2.48.8-1

nfs-utils-2.5.1-1

quota-4.05-1

xl2tpd-1.3.15-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@12465 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 3 years ago
parent
commit
b6c1f71972
4 changed files with 251 additions and 156 deletions
  1. 32 47
      lib/libr/librsvg2/librsvg2-vl.spec
  2. 16 7
      n/nfs-utils/nfs-utils-vl.spec
  3. 137 90
      q/quota/quota-vl.spec
  4. 66 12
      x/xl2tpd/xl2tpd-vl.spec

+ 32 - 47
lib/libr/librsvg2/librsvg2-vl.spec

@@ -1,70 +1,47 @@
 %define __libtoolize :
 
-%define libxml2_version 2.7.8
-%define gdk_pixbuf2 2.26.1
-%define gtk3_version 3.4.1
-%define freetype_version 2.4.2
-%define popt_version 1.14
-%define libart_version 2.3.21
-%define cairo_version 1.12.0
-%define dbus_version 1.4.0
-%define dbus_glib_version 0.88
-%define avahi_glib_version 0.6.23
-%define libcroco_version 0.6.2
-%define libgsf_version 1.14.19
-
 Name:           librsvg2
-Summary:        An SVG library based on libart.
-Summary(ja):    libart ベースの SVG ライブラリ
-Version:        2.46.4
+Summary:        An SVG library based on cairo.
+Summary(ja):    cairo ベースの SVG ライブラリ
+Group:          graphics,system
+Version:        2.48.8
 Release:        1%{?_dist_release}
+Vendor:         Project Vine
+Distribution:   Vine Linux
+
 License:        LGPL
-Group:          System Environment/Libraries
 %global         shortver %(echo %{version} | sed -e 's/\\.[0-9]*$//')
 Source:         https://download.gnome.org/sources/librsvg/%{shortver}/librsvg-%{version}.tar.xz
 
-Requires(post,postun): gtk3 >= %{gtk3_version}
-Requires(post): dbus-glib >= %{dbus_glib_version}
-Requires(post): avahi-glib >= %{avahi_glib_version}
-Requires(post): libgsf, libcroco
-Requires: gtk3 >= %{gtk3_version}
-Requires: libxml2 >= %{libxml2_version}
-Requires: popt >= %{popt_version}
-Requires: freetype2 >= %{freetype_version}
-Requires: libpng
-BuildRequires: libpng-devel
-BuildRequires: gtk3-devel >= %{gtk3_version}
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
 BuildRequires: gobject-introspection-devel
-BuildRequires: libxml2-devel >= %{libxml2_version}
-BuildRequires: freetype2-devel >= %{freetype_version}
-BuildRequires: cairo-devel >= %{cairo_version}
-BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
-BuildRequires: avahi-glib-devel >= %{avahi_glib_version}
-BuildRequires: libcroco-devel >= %{libcroco_version}
-BuildRequires: libgsf-devel >= %{libgsf_version}
-BuildRequires: autoconf
+BuildRequires: cairo-devel
+BuildRequires: fontconfig-devel
+BuildRequires: gdk-pixbuf2-devel
+BuildRequires: glib2-devel
+BuildRequires: libxml2-devel
+BuildRequires: pango-devel
 BuildRequires: gtk-doc
 BuildRequires: vala-devel
 BuildRequires: vala-tools
 BuildRequires: rust
 BuildRequires: cargo
 
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-
-Vendor: Project Vine
-Distribution: Vine Linux
+Requires: cairo
+Requires(post,postun): gdk-pixbuf2
 
 %description
-An SVG library based on libart.
+An SVG library based on cairo.
 
 %description -l ja
-libart ベースの SVG ライブラリです
+cairo ベースの SVG ライブラリです
 
 
 %package devel
 Summary: Libraries and include files for developing with librsvg.
 Summary(ja): librsvg の開発用ライブラリおよびヘッダファイル
-Group: Development/Libraries
+Group: programming
 Requires: %{name} = %{version}
 Requires: gdk-pixbuf2-devel >= %{gdk_pixbug2_version}
 Requires: cairo-devel >= %{cairo_version}
@@ -77,7 +54,7 @@ files to allow you to develop with librsvg.
 %package        docs
 Summary:        Documentation for %{name}
 Summary(ja):    %{name} 用のドキュメント
-Group:          Documentation
+Group:          documentation
 Requires:       %{name} = %{version}-%{release}
 BuildArch:	noarch
 
@@ -88,7 +65,7 @@ This package contains documentation for %{name}.
 %package        vala
 Summary:        Vala bindings for %{name}
 Summary(ja):    %{name} の Vala バインディング
-Group:          Development/Libraries
+Group:          programming
 Requires:       %{name} = %{version}-%{release}
 Requires:       vala
 
@@ -96,19 +73,23 @@ Requires:       vala
 Vala bindings for %{name}.
 
 
+%debug_package
+
+
 %prep
 %setup -q -n librsvg-%{version}
 
+
 %build
 %configure --enable-gtk-doc \
 	   --enable-introspection=yes \
 	   --enable-vala=yes \
 	   --with-svgz \
 	   --enable-gtk-theme \
-	   --with-croco \
 	   --disable-static
 %__make %{?_smp_mflags}
 
+
 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}
@@ -161,10 +142,14 @@ fi ||:
 
 %files vala
 %defattr(-,root,root,-)
-%{_datadir}/vala/vapi/librsvg-2.0.vapi
+%{_datadir}/vala/vapi/librsvg-2.0.*
 
 
 %changelog
+* Thu Aug 13 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.48.8-1
+- new upstream release.
+- cleaned BR: up.
+
 * Sat Feb 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.46.4-1
 - new upstream release.
 

+ 16 - 7
n/nfs-utils/nfs-utils-vl.spec

@@ -8,9 +8,9 @@
 Summary: NFS utilities and supporting clients and daemons for the kernel NFS server
 Summary(ja): カーネル NFS サーバ用 NFS ユーティリティと関連プログラム
 Name: nfs-utils
-Version: 2.4.3
+Version: 2.5.1
 Release: 1%{?_dist_release}%{?with_systemd:.systemd}
-Group: System Environment/Daemons
+Group: system
 Vendor: Project Vine
 Distribution: Vine Linux
 
@@ -33,7 +33,8 @@ Source13: rpcgssd.init
 Source15: nfsdcld.init
 Source23: nfs.sysconfig
 
-Patch001: nfs-utils.2.4.4-rc2.patch
+Patch001: nfs-utils-2.5.2-rc3.patch
+Patch002: nfs-utils-2.5.1-rpcidmap-nodebug-msg.patch
 
 Patch100: nfs-utils-1.2.1-statdpath-man.patch
 Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@@ -124,7 +125,7 @@ NFS サーバに関する情報を得ることができます。
 %package -n libnfsidmap
 Summary: NFSv4 User and Group ID Mapping Library
 Provides: libnfsidmap%{?_isa} = %{version}-%{release}
-Group: System Environment/Libraries
+Group: system
 License: BSD
 BuildRequires: pkgconfig, openldap-devel
 BuildRequires: automake, libtool
@@ -137,7 +138,7 @@ Library that handles mapping between names and ids for NFSv4.
 
 %package -n libnfsidmap-devel
 Summary: Development files for the libnfsidmap library
-Group: Development/Libraries
+Group: programming
 Requires: libnfsidmap%{?_isa} = %{version}-%{release}
 Requires: pkgconfig
 
@@ -152,6 +153,7 @@ developing programs which use the libnfsidmap library.
 %autopatch -p1
 %else
 %patch001 -p1
+%patch002 -p1
 %endif
 
 # Remove .orig files
@@ -207,6 +209,9 @@ install -m 755 %{SOURCE4} %{buildroot}%{_sbindir}/nfsconvert
 mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/nfs-utils/
 install -m 755 %{SOURCE5} %{buildroot}/%{_libexecdir}/nfs-utils/nfsconvert.sh
 install -m 644 %{SOURCE6} %{buildroot}%{_unitdir}
+mkdir -p %{buildroot}/lib/systemd/system-generators/
+mv -f %{buildroot}/usr/lib/systemd/system-generators/* %{buildroot}/lib/systemd/system-generators/
+
 %else
 install -m 755 %{SOURCE10} %{buildroot}%{_initdir}/nfs
 install -m 755 %{SOURCE11} %{buildroot}%{_initdir}/nfslock
@@ -399,7 +404,7 @@ fi
 %doc linux-nfs/ChangeLog linux-nfs/KNOWNBUGS linux-nfs/NEW linux-nfs/README
 %doc linux-nfs/THANKS linux-nfs/TODO
 %if %{with systemd}
-/usr/lib/systemd/system-generators/*
+/lib/systemd/system-generators/*
 %{_unitdir}/*
 %{_sbindir}/nfsconvert
 %attr(755,root,root) %{_libexecdir}/nfs-utils/nfsconvert.sh
@@ -449,7 +454,8 @@ fi
 %{_sbindir}/nfsconf
 %{_sbindir}/nfsref
 %{_sbindir}/nfsdcld
-%{_sbindir}/clddb-tool
+%{_sbindir}/nfsdclddb
+%{_sbindir}/nfsdclnts
 %{_mandir}/*/*
 
 %attr(4755,root,root)   /sbin/mount.nfs
@@ -474,6 +480,9 @@ fi
 
 
 %changelog
+* Thu Aug 13 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.5.1-1
+- new upstream release.
+
 * Tue Apr 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.3-1
 - new upstream release.
 - updated patches.

+ 137 - 90
q/quota/quota-vl.spec

@@ -1,74 +1,97 @@
+%bcond_with systemd
+%bcond_with quota_enables_tcpwrappers
+
 Name: quota
 Summary: System administration tools for monitoring users' disk usage.
 Summary(ja): ユーザのディスク使用量をモニタするシステム管理ツール
-Version: 4.04
-Release: 1%{?_dist_release}
-License: BSD
-Group: System Environment/Base
-URL: http://sourceforge.net/projects/linuxquota/
-
+Version: 4.05
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
+Group: system
 Vendor: Project Vine
 Distribution: Vine Linux
 
+License: BSD
+URL: https://sourceforge.net/projects/linuxquota/
 #Source0: http://downloads.sourceforge.net/linuxquota/quota-%{version}.tar.gz
 Source0: quota-%{version}.tar.gz
 Source1: quota_nld.init
 Source2: quota_nld.sysconfig
 
+Source101: quota_nld.service
+Source103: rpc-rquotad.service
+Source104: rpc-rquotad.sysconfig
+
 # Not accepted changes (378a64006bb1e818e84a1c77808563b802b028fa)
 Patch0: quota-4.04-warnquota-configuration-tunes.patch
 Patch1: quota-4.03-Validate-upper-bound-of-RPC-port.patch
-# Install rquotad(3) only if RPC is enabled,
-# <https://sourceforge.net/p/linuxquota/patches/45/>, in upstream after 4.04
-Patch2: quota-4.04-Install-rquota-3-only-if-RPC-is-enabled.patch
-# Pass TIRPC header files location to all RPC compilation units,
-# <https://sourceforge.net/p/linuxquota/patches/46/>, in upstream after 4.04
-Patch3: quota-4.04-Add-TIRPC_CFLAGS-globally-to-CFLAGS-for-RPC-support-.patch
-# Do not iterate over negative UIDs in repquota,
-# <https://sourceforge.net/p/linuxquota/patches/47/>, in upstream after 4.04
-Patch4: quota-4.04-repquota-Fix-output-when-user-2-exists.patch
-# Fix snprintf overflows in warnquota,
-# <https://sourceforge.net/p/linuxquota/patches/48/>, in upstream after 4.04
-Patch5: quota-4.04-warnquota-Check-snprintf-for-overflows.patch
-# Fix user name search in utmp log,
-# <https://sourceforge.net/p/linuxquota/patches/48/>, in upstream after 4.04
-Patch6: quota-4.04-warnquota-Fix-comparing-user-name-to-non-null-termin.patch
-# Avoid questions in quotacheck non-interactive mode, in upstream after 4.04
-Patch7: quota-4.04-quotacheck-Avoid-question-in-non-interactive-mode.patch
-# Report an error when quotacheck fails to cache quota files,
-# in upstream after 4.04
-Patch8: quota-4.04-quotacheck-Report-error-when-caching-of-quota-file-f.patch
-# Report an error if quota file magic is invalid, in upstream after 4.04
-Patch9: quota-4.04-quotacheck-Fail-check-if-quota-file-magic-is-invalid.patch
-# Fix busy loop in rpc.rquotad, bug #1575956, in upstream after 4.04,
-# <https://sourceforge.net/p/linuxquota/feature-requests/16/>
-Patch10: quota-4.04-Listen-on-a-TCP-socket.patch
-# Fix current block usage limit in RPC client, in upstream after 4.04,
-# <https://sourceforge.net/p/linuxquota/bugs/127/>
-Patch11: quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch
-# Distinguish between none quota limits and no allocated resources in quota(1)
-# tool output, proposed to upstream,
-# <https://sourceforge.net/p/linuxquota/bugs/128/>
-Patch12: quota-4.04-quota-1-Distinguish-between-none-quota-limits-and-no.patch
-# Fix a descriptor leak, proposed to upstream,
-# <https://sourceforge.net/p/linuxquota/bugs/129/>
-Patch13: quota-4.04-convertquota-Fix-a-file-descriptor-leak-in-convert_e.patch
-# Fix a descriptor leak, proposed to upstream,
-# <https://sourceforge.net/p/linuxquota/bugs/129/>
-Patch14: quota-4.04-quotackeck-Fix-a-directory-descriptor-leak-in-scan_d.patch
-# Fix a descriptor leak, proposed to upstream,
-# <https://sourceforge.net/p/linuxquota/bugs/129/>
-Patch15: quota-4.04-xqmstats-Fix-a-file-descriptor-leak-in-main.patch
+# Fix modifying CFLAGS and LDFLAGS by pkgconfig, in upstream after 4.05
+Patch2: quota-4.05-Revert-configure.ac-fix-pkg_check_modules-calls.patch
+# 1/6 Report an error if an RPC fails on an explicitly requested file system,
+# <https://sourceforge.net/p/linuxquota/bugs/134/>, in upstream after 4.05
+Patch3: quota-4.05-Make-messages-about-failures-for-NFS-consistent-with.patch
+# 2/6
+Patch4: quota-4.05-quotaops-Do-not-return-partial-list-from-getprivs.patch
+# 3/6
+Patch5: quota-4.05-quotaops-Do-not-leak-dquot-structures-on-failure.patch
+# 4/6
+Patch6: quota-4.05-setquota-Report-failure-to-obtain-quota-information.patch
+# 5/6
+Patch7: quota-4.05-rpc-Clarify-error-message-when-cannot-connect-to-rpc.patch
+# 6/6
+Patch8: quota-4.05-quotaops-Make-error-string-translatable.patch
+# Fix Free Software Foundation's postal address,
+# <https://sourceforge.net/p/linuxquota/bugs/133/>, in upstream after 4.05
+Patch9: quota-4.05-COPYING-Update-mailing-address.patch
+# Move quota_nld.pid file to /run,
+# <https://sourceforge.net/p/linuxquota/patches/49/>, in upstream after 4.05
+Patch10: quota-4.05-Make-a-directory-for-quota_nld-PID-file-configurable.patch
+# Optimize out useless checking of file systems with hidden quota files,
+# in upstream after 4.05
+Patch11: quota-4.05-quotacheck-Skip-checking-of-filesystems-with-hidded-.patch
+# Fix warnquota --help output, in upstream after 4.05
+Patch12: quota-4.05-warnquota-Fix-help-text.patch
+# Fix checking for the LDAP failures in the warnquota tool,
+# in upstream after 4.05
+Patch13: quota-4.05-warnquota-Properly-detect-LDAP-errors.patch
+# 1/2 Report detailed LDAP failures, in upstream after 4.05
+Patch14: quota-4.05-warnquota-Print-also-additional-error-info-for-LDAP-.patch
+# 2/2 Report detailed LDAP failures, in upstream after 4.05,
+# <https://sourceforge.net/p/linuxquota/patches/50/>
+Patch15: quota-4.05-warnquota-Free-LDAP-error-message.patch
+# Document CC_TO in warquota.conf is looked up with LDAP,
+# in upstream after 4.05
+Patch16: quota-4.05-warnquota-Clarify-that-CC_TO-gets-resolved-through-L.patch
+# Initialize all members of a configparams structure in warnquota,
+# in upstream after 4.05, <https://sourceforge.net/p/linuxquota/patches/51/>
+Patch17: quota-4.05-warnquota-Initialize-all-members-of-a-configparams-s.patch
+# Fix ignoring disabled quotas, bug #1805110, in upstream after 4.05,
+# <https://sourceforge.net/p/linuxquota/bugs/136/>
+Patch18: quota-4.05-Fix-ignoring-disabled-quotas.patch
+# Pass quota type for Q_XFS_GETQSTAT, in upstream after 4.05
+Patch19: quota-4.05-quota-tools-pass-quota-type-to-QCMD-for-Q_XFS_GETQST.patch
+# Set kernel option when setting XFS grace times, posted to upstream
+Patch20: quota-4.05-quota-tools-Set-FS_DQ_TIMER_MASK-for-individual-xfs-grace-times.patch
 
 BuildRoot: %{_tmppath}/%{name}-root
-Requires: kernel >= 2.4, initscripts >= 6.38
-Requires(post): chkconfig
-Requires(preun): chkconfig
-Conflicts: nfs-utils < 1.0.1
 BuildRequires: e2fsprogs-devel, gettext
-BuildRequires: tcp_wrappers, nss-devel
+BuildRequires: nss-devel
 BuildRequires: openldap-devel, openssl-devel, dbus-devel, libnl3-devel
-
+BuildRequires: rpcgen
+BuildRequires: pkgconfig(libtirpc)
+%if %{with quota_enables_tcpwrappers}
+BuildRequires: tcp_wrappers
+Requires: tcp_wrappers
+%endif
+Conflicts: nfs-utils < 1.0.1
+%if %{with systemd}
+BuildRequires:  systemd
+Requires: kernel >= 4.0
+%{?systemd_requires}
+%else
+Requires: kernel >= 4.0, initscripts >= 6.38
+Requires(post): chkconfig
+Requires(preun): chkconfig
+%endif
 
 %description
 The quota package contains system administration tools for monitoring
@@ -84,40 +107,33 @@ quota パッケージには,ユーザやグループのディスク使用量
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
+%autopatch -p1
 # Regenerate build scripts
 autoreconf -f -i
 
+
 %build
 %configure \
     --enable-bsd-behaviour \
     --enable-ext2direct=yes \
     --enable-ldapmail=yes \
+%if %{with quota_enables_tcpwrappers}
+    --enable-libwrap=yes \
+%else
+    --disable-libwrap \
+%endif
     --enable-netlink=yes \
-    --enable-rootsbin=yes \
-    --enable-rpc=yes \
-    --enable-rpcsetquota=yes \
-    --enable-strip-binaries=no \
     --enable-nls \
+    --with-pid-dir=/run \
     --disable-rpath \
+    --enable-rpc=yes \
+    --enable-rpcsetquota=yes \
     --disable-silent-rules \
-    --disable-xfs-roothack
-make
+    --disable-xfs-roothack \
+    --enable-rootsbin=yes \
+    --enable-strip-binaries=no
+make %{?_smp_mflags}
+
 
 %install
 rm -fr %{buildroot}
@@ -128,38 +144,57 @@ mkdir -p %{buildroot}%{_bindir}
 mkdir -p %{buildroot}%{_mandir}/{man1,man3,man8}
 
 make install DESTDIR=%{buildroot}
+rm -rf %{buildroot}%{_datadir}/doc/%{name}
 
+install -p -m644 -D %{SOURCE2} \
+    $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/quota_nld
 install -m 644 warnquota.conf %{buildroot}%{_sysconfdir}
+%if %{with systemd}
+install -p -m644 -D %{SOURCE101} $RPM_BUILD_ROOT%{_unitdir}/quota_nld.service
+install -p -m644 -D %{SOURCE103} $RPM_BUILD_ROOT%{_unitdir}/rpc-rquotad.service
+install -p -m644 -D %{SOURCE104} \
+    $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rpc-rquotad
+%else
+install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/quota_nld
+%endif
 
 mv %{buildroot}%{_sbindir}/quota{check,off,on} %{buildroot}/sbin/
 
-# we don't support XFS yet
-#
-rm -f %{buildroot}%{_sbindir}/quot
-rm -f %{buildroot}%{_sbindir}/xqmstats
-rm -f %{buildroot}%{_mandir}/man8/quot.*
-rm -f %{buildroot}%{_mandir}/man8/xqmstats.*
+%find_lang %{name}
 
-install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/quota_nld
-install -p -m644 -D %{SOURCE2} \
-    $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/quota_nld
 
-rm -rf %{buildroot}%{_datadir}/doc/%{name}
-
-%find_lang %{name}
+%check
+make check
 
 
 %clean
 rm -rf %{buildroot}
 
+
 %post
+%if %{with systemd}
+%systemd_post quota_nld.service
+%systemd_post rpc-rquotad.service
+%else
 /sbin/chkconfig --add quota_nld
+%endif
 
 %preun
-if [ $1 = 0 ] ; then
+%if %{with systemd}
+%systemd_preun quota_nld.service
+%systemd_preun rpc-rquotad.service
+%else
+if [ $1 = 0 -o -x /bin/systemctl ] ; then
     /sbin/service quota_nld stop >/dev/null 2>&1
     /sbin/chkconfig --del quota_nld
 fi
+%endif
+
+%if %{with systemd}
+%postun
+%systemd_postun_with_restart quota_nld.service
+%systemd_postun_with_restart rpc-rquotad.service
+%endif
 
 
 %files -f %{name}.lang
@@ -169,8 +204,6 @@ fi
 %config(noreplace) %{_sysconfdir}/warnquota.conf
 %config(noreplace) %{_sysconfdir}/quotagrpadmins
 %config(noreplace) %{_sysconfdir}/quotatab
-%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/quota_nld
-%{_initrddir}/quota_nld
 /sbin/*
 %{_bindir}/*
 %{_sbindir}/*
@@ -179,9 +212,23 @@ fi
 %{_mandir}/man3/*
 %{_mandir}/man5/*
 %{_mandir}/man8/*
+%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/quota_nld
+%if %{with systemd}
+%{_unitdir}/quota_nld.service
+%{_unitdir}/rpc-rquotad.service
+%config(noreplace) %{_sysconfdir}/sysconfig/rpc-rquotad
+%else
+%{_initrddir}/quota_nld
+%endif
 
 
 %changelog
+* Thu Aug 13 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.05-1
+- new upstram release.
+- updated all patches.
+- disabled tcp_wrappers as default.
+- added systemd support (disabled as default).
+
 * Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.04-1
 - new upstram release.
 - dropped BR:libnl-devel.

+ 66 - 12
x/xl2tpd/xl2tpd-vl.spec

@@ -1,14 +1,22 @@
+%bcond_with systemd
+
 %define src_dir_name xl2tpd-%{version}
 
 Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661)
 Name: xl2tpd
-Version: 1.3.13
-Release: 1%{?_dist_release}
+Version: 1.3.15
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
+Group: network,servers,security
+Vendor: Project Vine
+Distribution: Vine Linux
+Packager: tomop
+
 # No version specified.
 License: GPL+
 Url: http://www.xelerance.com/software/xl2tpd/
-Group: System Environment/Daemons
 Source0: https://github.com/xelerance/xl2tpd/archive/v%{version}.tar.gz#/xl2tpd-%{version}.tar.gz
+Source1: xl2tpd.service
+Source2: tmpfiles-xl2tpd.conf
 
 Patch1: 0001-fix-ppp-options.patch
 Patch2: 0002-fix-initscript.patch
@@ -17,13 +25,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: ppp 
 BuildRequires: libpcap-devel
 BuildRequires: openssl-devel
+%if %{with systemd}
+%{?systemd_requires}
+%else
 Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
-
-Vendor: Project Vine
-Distribution: Vine Linux
-Packager: tomop
+%endif
 
 %description
 xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661).
@@ -50,11 +58,25 @@ or via a patch in contrib for 2.4.x kernels.
 Xl2tpd is based on the 0.69 L2TP by Jeff McAdams <jeffm@iglou.com>
 It was de-facto maintained by Jacco de Leeuw <jacco2@dds.nl> in 2002 and 2003.
 
+
 %prep
 %autosetup -p1 -n %{src_dir_name}
 
+sed -i -e "s|/var/run|/run|" \
+	file.h \
+	l2tp.h \
+	xl2tpd-control.c \
+	packaging/fedora/xl2tpd.init \
+	doc/*
+
 %build
-make DFLAGS="$RPM_OPT_FLAGS -g -DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_FLOW -DDEBUG_PAYLOAD -DDEBUG_CONTROL -DDEBUG_CONTROL_XMIT -DDEBUG_FLOW_MORE -DDEBUG_MAGIC -DDEBUG_ENTROPY -DDEBUG_HIDDEN -DDEBUG_PPPD -DDEBUG_AAA -DDEBUG_FILE -DDEBUG_FLOW -DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_ZLB -DDEBUG_AUTH"
+export CFLAGS="$CFLAGS -fPIC -Wall -DTRUST_PPPD_TO_DIE"
+export DFLAGS="$RPM_OPT_FLAGS -g "
+export LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
+#DFLAGS="$RPM_OPT_FLAGS -g -DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_FLOW -DDEBUG_PAYLOAD -DDEBUG_CONTROL -DDEBUG_CONTROL_XMIT -DDEBUG_FLOW_MORE -DDEBUG_MAGIC -DDEBUG_ENTROPY -DDEBUG_HIDDEN -DDEBUG_PPPD -DDEBUG_AAA -DDEBUG_FILE -DDEBUG_FLOW -DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_ZLB -DDEBUG_AUTH"
+
+make %{_smp_mflags}
+
 
 %install
 rm -rf %{buildroot}
@@ -63,26 +85,48 @@ install -p -D -m644 examples/xl2tpd.conf %{buildroot}%{_sysconfdir}/xl2tpd/xl2tp
 install -p -D -m644 examples/ppp-options.xl2tpd %{buildroot}%{_sysconfdir}/ppp/options.xl2tpd
 install -p -D -m600 doc/l2tp-secrets.sample %{buildroot}%{_sysconfdir}/xl2tpd/l2tp-secrets
 install -p -D -m600 examples/chapsecrets.sample %{buildroot}%{_sysconfdir}/ppp/chap-secrets.sample
-install -p -D -m755 packaging/fedora/xl2tpd.init %{buildroot}%{_initrddir}/xl2tpd
 install -p -D -m755 -d %{buildroot}%{_localstatedir}/run/xl2tpd
 
+%if %{with systemd}
+install -d 0755 %{buildroot}%{_unitdir}
+mkdir -p %{buildroot}/%{_tmpfilesdir}
+install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/xl2tpd.service
+install -m 0644 %{SOURCE2} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
+%else
+install -p -D -m755 packaging/fedora/xl2tpd.init %{buildroot}%{_initrddir}/xl2tpd
+%endif
+
 
 %clean
 rm -rf %{buildroot}
 
+
 %post
+%if %{with systemd}
+%systemd_preun xl2tpd.service
+%else
 /sbin/chkconfig --add xl2tpd
+%endif
 
 %preun
-if [ $1 -eq 0 ]; then
+%if %{with systemd}
+%systemd_post xl2tpd.service
+%else
+if [ $1 -eq 0 -o /bin/systemctl ]; then
   /sbin/service xl2tpd stop > /dev/null 2>&1
   /sbin/chkconfig --del xl2tpd
 fi
+%endif
 
 %postun
+%if %{with systemd}
+%systemd_postun_with_restart xl2tpd.service
+%else
 if [ $1 -ge 1 ]; then
   /sbin/service xl2tpd condrestart 2>&1 >/dev/null
 fi
+%endif
+
 
 %files
 %defattr(-,root,root)
@@ -96,11 +140,21 @@ fi
 %dir %{_sysconfdir}/xl2tpd
 %config(noreplace) %{_sysconfdir}/xl2tpd/*
 %config(noreplace) %{_sysconfdir}/ppp/*
+%ghost %dir /run/xl2tpd
+%ghost %attr(0600,root,root) /run/xl2tpd/l2tp-control
+%if %{with systemd}
+%{_unitdir}/*
+%{_tmpfilesdir}/*
+%else
 %attr(0755,root,root)  %{_initrddir}/xl2tpd
-%dir %{_localstatedir}/run/xl2tpd
-%ghost %attr(0600,root,root) %{_localstatedir}/run/xl2tpd/l2tp-control
+%endif
+
 
 %changelog
+* Thu Aug 13 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.15-1
+- new upstream release.
+- added systemd support (disabled as default).
+
 * Sat Jan 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.13-1
 - new upstream release.