From 04ee0007985e4573ec4afddd5f6610de2236ccac805ff96c96ce1899d0341c41 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 11 Jul 2016 15:26:39 +0000 Subject: [PATCH] osc copypac from project:server:dns:powerdns package:pdns-common revision:1 OBS-URL: https://build.opensuse.org/package/show/server:dns/pdns-common?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + pdns-common.changes | 5 +++ pdns-common.spec | 88 ++++++++++++++++++++++++++++++++++++++++++ pdns-common.tmpfiles.d | 2 + 5 files changed, 119 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pdns-common.changes create mode 100644 pdns-common.spec create mode 100644 pdns-common.tmpfiles.d diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pdns-common.changes b/pdns-common.changes new file mode 100644 index 0000000..19b2bb5 --- /dev/null +++ b/pdns-common.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Wed May 11 22:51:10 UTC 2016 - mrueckert@suse.de + +- initial package + diff --git a/pdns-common.spec b/pdns-common.spec new file mode 100644 index 0000000..e150ae5 --- /dev/null +++ b/pdns-common.spec @@ -0,0 +1,88 @@ +# +# spec file for package pdns-common +# +# Copyright (c) 2016 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild +%if 0%{?suse_version} > 1230 +%bcond_without systemd +%define _localstatedir /run/pdns +%else +%bcond_with systemd +%define _localstatedir /var/run/pdns +%endif + +%define home %{_var}/lib/pdns + +%{!?_tmpfilesdir: %global _tmpfilesdir /usr/lib/tmpfiles.d } + +Name: pdns-common +Version: 4.0 +Release: 0 +License: MIT +Summary: Shared directories between PowerDNS Packages +Url: https://www.powerdns.com/ +Group: Productivity/Networking/DNS/Servers +Source: pdns-common.tmpfiles.d +BuildArch: noarch +%if %{with systemd} +BuildRequires: pkgconfig(systemd) +%{?systemd_requires} +%endif +%if 0%{?suse_version} +PreReq: pwdutils +%else +PreReq: shadow-utils +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Shared directories between PowerDNS Packages + +%prep + +%build + +%install +install -Dd -m 0755 %{buildroot}%{home} +install -Dd -m 0755 %{buildroot}%{_sysconfdir}/pdns + +%if %{with systemd} +install -D -m 0644 %{SOURCE0} %{buildroot}%{_tmpfilesdir}/%{name}.conf +%else +install -D -d -m 0750 %{buildroot}%{_localstatedir} +%endif + +%pre +/usr/sbin/groupadd -r pdns >/dev/null 2>&1 || : +/usr/sbin/useradd -g pdns -s /bin/false -r -c "PowerDNS" -d %{home} pdns >/dev/null 2>&1 || : + +%if %{with systemd} +%post +systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf ||: +%endif + +%files +%defattr(-,root,root) +%if %{with systemd} +%{_tmpfilesdir}/%{name}.conf +%dir %attr(750,pdns,pdns) %ghost %{_localstatedir}/ +%else +%dir %attr(750,pdns,pdns) %{_localstatedir}/ +%endif +%dir %attr(750,root,pdns) %{_sysconfdir}/pdns/ +%dir %attr(750,pdns,pdns) %{home}/ + +%changelog diff --git a/pdns-common.tmpfiles.d b/pdns-common.tmpfiles.d new file mode 100644 index 0000000..7a5a377 --- /dev/null +++ b/pdns-common.tmpfiles.d @@ -0,0 +1,2 @@ +# Type Path Mode UID GID Age Argument +d /run/pdns 0750 pdns pdns - -