commit istgt for openSUSE:Factory
Hello community, here is the log from the commit of package istgt for openSUSE:Factory checked in at 2014-02-04 19:21:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/istgt (Old) and /work/SRC/openSUSE:Factory/.istgt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "istgt" Changes: -------- --- /work/SRC/openSUSE:Factory/istgt/istgt.changes 2013-07-15 09:48:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.istgt.new/istgt.changes 2014-02-04 19:21:48.000000000 +0100 @@ -1,0 +2,16 @@ +Mon Feb 3 16:03:23 UTC 2014 - ddiss@suse.com + +- Call systemd pre[un]/post[un] macros + +------------------------------------------------------------------- +Mon Feb 3 11:58:29 UTC 2014 - ddiss@suse.com + +- Add systemd services file + + etc-add-systemd-service-file.patch + + build-use-systemd-init.patch + + build-regenerate-configure.patch + +- Add rcistgt symlink + + links to SysV init or systemd service path + +------------------------------------------------------------------- New: ---- build-regenerate-configure.patch build-use-systemd-init.patch etc-add-systemd-service-file.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ istgt.spec ++++++ --- /var/tmp/diff_new_pack.SVdQ7G/_old 2014-02-04 19:21:49.000000000 +0100 +++ /var/tmp/diff_new_pack.SVdQ7G/_new 2014-02-04 19:21:49.000000000 +0100 @@ -27,6 +27,16 @@ Source: istgt-%{upstreamrel}.tar.gz Requires: bash BuildRequires: autoconf +%define systemd_init 0 +%if 0%{?suse_version} >= 1300 +BuildRequires: systemd +%define systemd_init 1 +%{?systemd_requires} +%endif +%if 0%{?fedora_version} >= 20 +BuildRequires: systemd-units +%define systemd_init 1 +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch1: fix-installdir.patch Patch2: add-istgtcontrol-manpage.patch @@ -36,6 +46,9 @@ Patch6: iscsi-cancel-conn-worker-threads-using-the-task_pipe.patch Patch7: md5-add-RFC1321-based-RSA-free-MD5-library.patch Patch8: md5-use-in-tree-libmd5-rfc-rather-than-libcrypto.patch +Patch9: etc-add-systemd-service-file.patch +Patch10: build-use-systemd-init.patch +Patch11: build-regenerate-configure.patch %description This software (istgt) is the implementation of iSCSI target @@ -63,26 +76,54 @@ %patch6 -p0 %patch7 -p0 %patch8 -p0 +%patch9 -p0 +%patch10 -p0 +%patch11 -p0 autoconf %build -%configure +%if 0%{?systemd_init} + %configure --with-unitdir=%{_unitdir} +%else + %configure +%endif make %install make install DESTDIR=$RPM_BUILD_ROOT +%if 0%{?systemd_init} + ln -s ../../%{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name} +%else + ln -s ../../%{_sysconfdir}/init.d/%{name} %{buildroot}/%{_sbindir}/rc%{name} +%endif + +%pre +%if 0%{?systemd_init} + %service_add_pre istgt.service +%endif %post /sbin/ldconfig +%if 0%{?systemd_init} + %service_add_post istgt.service +%endif %preun -%{?stop_on_removal:%{stop_on_removal istgt}} +%if 0%{?systemd_init} + %service_del_preun istgt.service +%else + %{?stop_on_removal:%{stop_on_removal istgt}} +%endif %postun /sbin/ldconfig -%{?restart_on_update:%{restart_on_update istgt}} -%{?insserv_cleanup:%{insserv_cleanup}} +%if 0%{?systemd_init} + %service_del_postun istgt.service +%else + %{?restart_on_update:%{restart_on_update istgt}} + %{?insserv_cleanup:%{insserv_cleanup}} +%endif %files %defattr(-,root,root) @@ -90,7 +131,13 @@ %{_sbindir}/istgtcontrol %dir %{_sysconfdir}/istgt/ %config %{_sysconfdir}/istgt/*.conf.sample -%{_sysconfdir}/init.d/istgt +%if 0%{?systemd_init} + %{_unitdir}/istgt.service +%else + %{_sysconfdir}/init.d/istgt +%endif +%{_sbindir}/rcistgt + %doc %{_mandir}/man1/istgt.1.gz %doc %{_mandir}/man1/istgtcontrol.1.gz ++++++ build-regenerate-configure.patch ++++++
From 74eed2c578d204db68082ae21261569f3a3e134f Mon Sep 17 00:00:00 2001 From: David Disseldorp
Date: Sun, 2 Feb 2014 23:17:46 +0100 Subject: [PATCH 3/3] build: regenerate configure
--- configure | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git configure configure index 3423760..35a2203 100755 --- configure +++ configure @@ -694,6 +694,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +with_unitdir enable_largefile with_configdir with_mediadir @@ -1335,6 +1336,9 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-unitdir=UNITDIR_PATH + Generate and install a systemd services file in + provided dir --with-configdir=DIR (default PREFIX/etc/istgt) --with-mediadir=DIR (default /var/istgt) --with-rcdir=DIR (default PREFIX/etc/rc.d) @@ -3307,6 +3311,16 @@ if test "$CC" = "clang" && test "$ac_test_CFLAGS" != "set"; then CFLAGS="-g -O3" fi +# systemd unit directory + +# Check whether --with-unitdir was given. +if test "${with_unitdir+set}" = set; then : + withval=$with_unitdir; +else + with_unitdir=no +fi + + # host OS related vboxinc="/usr/local/src/virtualbox/*/include" vboxlib="/usr/local/lib/virtualbox" @@ -3392,10 +3406,17 @@ case "$host_os" in vboxinc=$tmp fi vboxlib="/usr/lib/virtualbox" - rctemplate="istgt_linux.sh.in" + if test "x$with_unitdir" != xno -a -d "$with_unitdir"; then + rctemplate="istgt.service.in" - rcdir='/etc/init.d' + rcdir=$with_unitdir + else + rctemplate="istgt_linux.sh.in" + + rcdir='/etc/init.d' + + fi $as_echo "#define _GNU_SOURCE 1" >>confdefs.h -- 1.8.4.5 ++++++ build-use-systemd-init.patch ++++++
From b67c328383ff230b79abbfd2e50885b6972292d6 Mon Sep 17 00:00:00 2001 From: David Disseldorp
Date: Sun, 2 Feb 2014 17:06:08 +0100 Subject: [PATCH 2/3] build: specify systemd services file on Linux
Allow for the specification of a systemd services path at configure time via the new --with-unitdir=PATH option. When specified, the systemd services file will be generated and installed under PATH. --- configure.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git configure.in configure.in index 29feab5..b102a43 100644 --- configure.in +++ configure.in @@ -18,6 +18,13 @@ if test "$CC" = "clang" && test "$ac_test_CFLAGS" != "set"; then CFLAGS="-g -O3" fi +# systemd unit directory +AC_ARG_WITH([unitdir], + [AS_HELP_STRING([--with-unitdir=UNITDIR_PATH], + [Generate and install a systemd services file in provided dir])], + [], + [with_unitdir=no]) + # host OS related vboxinc="/usr/local/src/virtualbox/*/include" vboxlib="/usr/local/lib/virtualbox" @@ -31,8 +38,13 @@ case "$host_os" in vboxinc=$tmp fi vboxlib="/usr/lib/virtualbox" - AC_SUBST([rctemplate], ["istgt_linux.sh.in"]) - AC_SUBST([rcdir], ['/etc/init.d']) + if test "x$with_unitdir" != xno -a -d "$with_unitdir"; then + AC_SUBST([rctemplate], ["istgt.service.in"]) + AC_SUBST([rcdir], [$with_unitdir]) + else + AC_SUBST([rctemplate], ["istgt_linux.sh.in"]) + AC_SUBST([rcdir], ['/etc/init.d']) + fi AC_DEFINE([_GNU_SOURCE], 1, [Define if linux host]) ;; *netbsd*) -- 1.8.4.5 ++++++ etc-add-systemd-service-file.patch ++++++
From 0d34781bcaeaf823818a304d7ef973504a119aaf Mon Sep 17 00:00:00 2001 From: David Disseldorp
Date: Sun, 2 Feb 2014 16:48:38 +0100 Subject: [PATCH 1/3] etc: add systemd service file
--- etc/Makefile.in | 12 ++++++++---- etc/istgt.service.in | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 etc/istgt.service.in diff --git etc/Makefile.in etc/Makefile.in index 057356b..1e1746b 100644 --- etc/Makefile.in +++ etc/Makefile.in @@ -25,10 +25,11 @@ header = document = sample = auth.conf istgtcontrol.conf \ istgt.large.conf.in istgt.conf.in \ - istgt.sh.in istgt_netbsd.sh.in istgt_linux.sh.in + istgt.sh.in istgt_netbsd.sh.in istgt_linux.sh.in \ + istgt.service.in rctemplate = @rctemplate@ rcdir = @rcdir@ -rcfile = $(rctemplate:.sh.in=.sh) +rcfile = $(rctemplate:.in=) DISTDIR = $(top_srcdir)/`cat $(top_srcdir)/distdir` DISTFILES = Makefile.in \ @@ -70,9 +71,12 @@ install: install-dirs $(INSTALL) -m 0600 auth.conf $(DESTDIR)$(sysconfdir)/istgt/auth.conf.sample $(INSTALL) -m 0600 istgtcontrol.conf \ $(DESTDIR)$(sysconfdir)/istgt/istgtcontrol.conf.sample -# $(INSTALL) -m 0555 istgt.sh $(DESTDIR)$(sysconfdir)/rc.d/istgt if [ "x$(rcfile)" != "x" -a -f "$(rcfile)" ]; then \ - $(INSTALL) -m 0555 $(rcfile) $(DESTDIR)$(rcdir)/istgt; \ + if [ "x$(rcfile)" == "xistgt.service" ]; then \ + $(INSTALL) -m 0555 $(rcfile) $(DESTDIR)$(rcdir)/istgt.service; \ + else \ + $(INSTALL) -m 0555 $(rcfile) $(DESTDIR)$(rcdir)/istgt; \ + fi \ fi install-dirs: diff --git etc/istgt.service.in etc/istgt.service.in new file mode 100644 index 0000000..eba4958 --- /dev/null +++ etc/istgt.service.in @@ -0,0 +1,14 @@ +[Unit] +Description=istgt iSCSI Daemon +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/run/samba/smbd.pid +ExecStart=%%SBINDIR%%/istgt -c %%SYSCONFDIR%%/istgt.conf +Restart=on-abort +ExecReload=%%BINDIR%%/kill -HUP $MAINPID +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target -- 1.8.4.5 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de