From fa1096cd51ccf854af32595a4af5850af2e6238d9fa35a5c6f49a6be82198a19 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 13 Jul 2013 14:25:56 +0000 Subject: [PATCH] - add setup-tgt-conf-d.patch: Configure a /etc/tgt/conf.d by default - move examples to docdir OBS-URL: https://build.opensuse.org/package/show/Base:System/tgt?expand=0&rev=17 --- setup-tgt-conf-d.patch | 31 +++++++++++++++++++++++++++++++ tgt.changes | 6 ++++++ tgt.spec | 5 +++-- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 setup-tgt-conf-d.patch diff --git a/setup-tgt-conf-d.patch b/setup-tgt-conf-d.patch new file mode 100644 index 0000000..64f2770 --- /dev/null +++ b/setup-tgt-conf-d.patch @@ -0,0 +1,31 @@ +--- conf/Makefile ++++ conf/Makefile +@@ -1,4 +1,5 @@ + sysconfdir ?= /etc ++docdatadir ?= /usr/share/doc/packages/ + + EXAMPLES = targets.conf.example targets.conf.vtl.L700 targets.conf.vtl.MSL2024 + +@@ -11,9 +12,10 @@ + if [ ! -f $(DESTDIR)$(sysconfdir)/tgt/targets.conf ] ; then \ + install -m 644 targets.conf $(DESTDIR)$(sysconfdir)/tgt ; \ + fi +- install -d -m 755 $(DESTDIR)$(sysconfdir)/tgt/examples ++ install -d -m 755 $(DESTDIR)$(sysconfdir)/tgt/conf.d ++ install -d -m 755 $(DESTDIR)$(docdatadir)/tgt/examples + for f in $(EXAMPLES) ; do \ +- install -m 644 examples/$$f $(DESTDIR)$(sysconfdir)/tgt/examples ;\ ++ install -m 644 examples/$$f $(DESTDIR)$(docdatadir)/tgt/examples ;\ + done + + .PHONY: clean +--- conf/targets.conf ++++ conf/targets.conf +@@ -1,2 +1,7 @@ + # Empty targets configuration file -- please see the package + # documentation directory for an example. ++ ++# ++# Include configuration from directory ++# ++include /etc/tgt/conf.d/*.conf diff --git a/tgt.changes b/tgt.changes index 3ce9a0e..e6a12c4 100644 --- a/tgt.changes +++ b/tgt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jul 13 14:25:21 UTC 2013 - dmueller@suse.com + +- add setup-tgt-conf-d.patch: Configure a /etc/tgt/conf.d by default +- move examples to docdir + ------------------------------------------------------------------- Thu Apr 11 10:36:23 PDT 2013 - lduncan@suse.com diff --git a/tgt.spec b/tgt.spec index 7a3c4e0..8a50886 100644 --- a/tgt.spec +++ b/tgt.spec @@ -38,6 +38,7 @@ Patch1: %{name}-git-update Patch2: %{name}-fix-build # PATCH-FIX-UPSTREAM tgt-mgmt-fixed-m-system-o-delete-handling.patch [bnc#767438] - lduncan@suse.com Patch3: %{name}-mgmt-fixed-m-system-o-delete-handling.patch +Patch4: setup-tgt-conf-d.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -60,6 +61,7 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 %build %ifarch ppc ppc64 @@ -93,9 +95,8 @@ rm -f filelist /usr/sbin/* /etc/init.d/tgtd %dir /etc/tgt -%dir /etc/tgt/examples +%dir /etc/tgt/conf.d %config %attr(0644,root,root) /etc/tgt/targets.conf -%config %attr(0644,root,root) /etc/tgt/examples/* %config %attr(0644,root,root) /etc/sysconfig/SuSEfirewall2.d/services/tgt %doc README doc/README.iscsi doc/README.iser doc/README.lu_configuration %doc doc/README.mmc doc/README.passthrough doc/README.sbcjukebox doc/README.ssc