Hello community, here is the log from the commit of package nbd for openSUSE:Factory checked in at 2015-03-18 13:04:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nbd (Old) and /work/SRC/openSUSE:Factory/.nbd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nbd" Changes: -------- --- /work/SRC/openSUSE:Factory/nbd/nbd.changes 2014-11-10 17:29:11.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.nbd.new/nbd.changes 2015-03-18 13:04:41.000000000 +0100 @@ -1,0 +2,35 @@ +Thu Mar 5 12:28:06 UTC 2015 - [email protected] + +- Cleanup spec-file with spec-cleaner +- Do not generate config.example from README + * add config.example as source +- Add unit file (nbd-server.service) +- Add sysconfig template (nbd-server.sysconfig) +- Add no-return-nonvoid.patch +- Update requirements +- Update to 3.9 + * AF_UNIX support + * Fixed test suite on non-GNU getopt() implementations + * New "treefiles" mode, which exports a gazillion of page-sized + files; useful for exporting things which are stored on an + SSHFS or amazon AWS (trough FUSE) or similar, where every + write causes an upload to the backend storage + * New "cowdir" option, allowing to specify where copy-on-write + files are written. + * Minor changes so that nbd-client can now also be compiled for + the Android platform. This required removal of the -swap + command line option, which requires the mlockall() system + call, unavailable on Android. + * Protocol update: a reserved bit is used to avoid sending + the 124 bytes of useless data at the beginning of the + negotiation. The change is implemented so that things will + still work with clients not supporting this option, however. + * gznbd is now built by the same build system, rather than + a separate one. Note however that gznbd is still + unmaintained; it should be considered a "contrib" feature. + * "nbd-server -V" will now output the nbd-server version number. + * Various fixes found through Coverity and the clang static + analyzer, and lots of other minor things too small to + mention here. + +------------------------------------------------------------------- Old: ---- nbd-3.3.tar.bz2 New: ---- config.example nbd-3.9.tar.xz nbd-server.service nbd-server.sysconfig no-return-nonvoid.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nbd.spec ++++++ --- /var/tmp/diff_new_pack.LUYUlt/_old 2015-03-18 13:04:42.000000000 +0100 +++ /var/tmp/diff_new_pack.LUYUlt/_new 2015-03-18 13:04:42.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package nbd # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,22 +17,34 @@ Name: nbd -BuildRequires: doxygen -BuildRequires: glib2-devel >= 2.26.0 -PreReq: %insserv_prereq coreutils -Version: 3.3 +Version: 3.9 Release: 0 -Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.bz2 -Source2: init.nbd-server -Patch2: nbd-2.9.25-close.diff -Patch3: nbd-2.9.25-doxyfile.diff Summary: Network Block Device Server and Client Utilities License: GPL-2.0+ Group: Productivity/Networking/Other Url: http://nbd.sourceforge.net/ -Prefix: /usr -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.xz +Source1: %{name}-server.service +Source2: init.nbd-server +Source3: config.example +Source4: nbd-server.sysconfig +Patch2: nbd-2.9.25-close.diff +Patch3: nbd-2.9.25-doxyfile.diff +# fix return value +Patch4: no-return-nonvoid.patch +BuildRequires: doxygen +BuildRequires: glib2-devel >= 2.26.0 +BuildRequires: xz +Requires(pre): %fillup_prereq +Requires(pre): coreutils Suggests: nbd-doc +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} >= 1210 +BuildRequires: systemd-rpm-macros +%systemd_requires +%else +Requires(pre): %insserv_prereq +%endif %description This package contains nbd-server. It is the server backend for the nbd @@ -52,15 +64,6 @@ The package also contains the nbd-client tools, which you need to configure the nbd devices on the client side. - - -Authors: --------- - Wouter Verhelst <[email protected]> - Anton Altaparmakov <[email protected]> - Pavel Machek <[email protected]> - Paul Clements <[email protected]> - %package doc Summary: Network Block Device Server and Client Utilities Group: Productivity/Networking/Other @@ -81,90 +84,111 @@ mode where changes are saved to a separate file and thrown away when the connection closes. - - -Authors: --------- - Wouter Verhelst <[email protected]> - Anton Altaparmakov <[email protected]> - Pavel Machek <[email protected]> - Paul Clements <[email protected]> - %prep -%setup +%setup -q %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build -export CFLAGS="$RPM_OPT_FLAGS -fstack-protector -fno-strict-aliasing" -./configure --with-gnu-ld --prefix=/usr --mandir=%{_mandir} \ - --infodir=%{_infodir} --libdir=%{_libdir} --libexecdir=%{_libdir} \ - --program-prefix="" --sysconfdir=/etc --build=%{_target_cpu}-suse-linux -make +export CFLAGS="%{optflags} -fstack-protector -fno-strict-aliasing" +%configure + +make %{?_smp_mflags} doxygen doc/Doxyfile.in %install -make install DESTDIR=$RPM_BUILD_ROOT man_MANS='nbd-client.8 nbd-server.1 nbd-server.5 nbd-trdump.1' -mkdir -p $RPM_BUILD_ROOT/etc/init.d -install %SOURCE2 $RPM_BUILD_ROOT/etc/init.d/nbd-server -mkdir -p $RPM_BUILD_ROOT/usr/bin -ln -s ../../etc/init.d/nbd-server $RPM_BUILD_ROOT/usr/bin/rcnbd-server +make install DESTDIR=%{buildroot} man_MANS='nbd-client.8 nbd-server.1 nbd-server.5 nbd-trdump.1' +mkdir -p %{buildroot}%{_sysconfdir}/init.d +mkdir -p %{buildroot}%{_prefix}/bin + +%if 0%{?suse_version} >= 1210 +install -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}-server.service +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-server +%else +install %{SOURCE2} %{buildroot}%{_initddir}/nbd-server +ln -s ../..%{_initddir}/nbd-server %{buildroot}%{_sbindir}/rc%{name}-server +%endif + #echo "#Port file options" > $RPM_BUILD_ROOT/etc/nbd-server.conf -mkdir -p $RPM_BUILD_ROOT/etc/nbd-server -touch $RPM_BUILD_ROOT/etc/nbd-server/config -touch $RPM_BUILD_ROOT/etc/nbd-server/allow -grep -A16 -B1 '^\[generic\]' README > $RPM_BUILD_ROOT/etc/nbd-server/config.example +mkdir -p %{buildroot}%{_sysconfdir}/nbd-server +touch %{buildroot}%{_sysconfdir}/nbd-server/config +touch %{buildroot}%{_sysconfdir}/nbd-server/allow +install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/nbd-server/config.example +install -D -m 0644 %{SOURCE4} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}-server %files %defattr(-,root,root) -%attr(0755,root,root) /usr/sbin/nbd-client -%attr(0755,root,root) /usr/bin/nbd-server -%attr(0755,root,root) /usr/bin/nbd-trdump -%attr(0755,root,root) /etc/init.d/nbd-server -%attr(0755,root,root) /usr/bin/rcnbd-server +%attr(0755,root,root) %{_sbindir}/nbd-client +%attr(0755,root,root) %{_bindir}/nbd-server +%attr(0755,root,root) %{_bindir}/nbd-trdump +%{_sbindir}/rcnbd-server +%if 0%{?suse_version} >= 1210 +%{_unitdir}/%{name}-server.service +%else +%{_initddir}/%{name}-server +%endif %{_mandir}/man1/nbd-server.1.gz %{_mandir}/man1/nbd-trdump.1.gz %{_mandir}/man5/nbd-server.5.gz %{_mandir}/man8/nbd-client.8.gz -%doc README -#%%config(noreplace) /etc/nbd-server.conf -%dir /etc/nbd-server -%ghost %config(noreplace) /etc/nbd-server/config -%ghost %config(noreplace) /etc/nbd-server/allow -%config /etc/nbd-server/config.example +%doc README.md +%dir %{_sysconfdir}/nbd-server +%ghost %config(noreplace) %{_sysconfdir}/nbd-server/config +%ghost %config(noreplace) %{_sysconfdir}/nbd-server/allow +%config %{_sysconfdir}/nbd-server/config.example +%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}-server %files doc %defattr(-,root,root) %doc doc/html %post +%if 0%{?suse_version} >= 1210 +%service_add_post %{name}-server.service +%fillup_only -n nbd-server +%else %{fillup_and_insserv -f nbd-server} -if test -e /etc/nbd-server.conf; then +%endif +if test -e %{_sysconfdir}/nbd-server.conf; then # Do we have to create a generic section? unset generic - if test -e /etc/nbd-server/config; then generic=1; fi - grep -vE '^(#|[[:blank:]]*$)' /etc/nbd-server.conf | + if test -e %{_sysconfdir}/nbd-server/config; then generic=1; fi + grep -vE '^(#|[[:blank:]]*$)' %{_sysconfdir}/nbd-server.conf | while read port file opts; do if test -z "$generic"; then - echo > /etc/nbd-server/config - echo "[generic]" >> /etc/nbd-server/config - echo " # No generic options yet" >> /etc/nbd-server/config - echo >> /etc/nbd-server/config + echo > %{_sysconfdir}/nbd-server/config + echo "[generic]" >> %{_sysconfdir}/nbd-server/config + echo " # No generic options yet" >> %{_sysconfdir}/nbd-server/config + echo >> %{_sysconfdir}/nbd-server/config generic=1 fi FN=${file%/*} nm="cvt.$port.${FN##*/}.${file##*/}" echo " ... convert $port $file $opts -> $nm" - /usr/bin/nbd-server $port $file $opts -o "$nm" >> /etc/nbd-server/config + %{_bindir}/nbd-server $port $file $opts -o "$nm" >> %{_sysconfdir}/nbd-server/config done - mv /etc/nbd-server.conf /etc/nbd-server.conf.converted + mv %{_sysconfdir}/nbd-server.conf %{_sysconfdir}/nbd-server.conf.converted fi %postun -%{insserv_cleanup} +%if 0%{?suse_version} >= 1210 +%service_del_postun %{name}-server.service +%else +%insserv_cleanup %restart_on_update nbd-server +%endif + +%pre +%if 0%{?suse_version} >= 1210 +%service_add_pre %{name}-server.service +%endif %preun +%if 0%{?suse_version} >= 1210 +%service_del_preun %{name}-server.service +%else %{stop_on_removal nbd-server} +%endif %changelog ++++++ config.example ++++++ [generic] # The [generic] section is required, even if nothing is specified # there. # When either of these options are specified, nbd-server drops # privileges to the given user and group after opening ports, but # _before_ opening files. user = nbd group = nbd # Since version 2.9.17, nbd-server will do exports on a name # basis (the used name is the name of the section in which the # export is specified). This however required an incompatible # protocol change. To enable backwards-compatible port-based # exports, uncomment the following line: # oldstyle = true [export1] exportname = /export/nbd/export1-file # The following line will be ignored unless the # "oldstyle = true" line in the generic section above is # enabled. port = 12345 authfile = /export/nbd/export1-authfile timeout = 30 filesize = 10000000 readonly = false multifile = false copyonwrite = false prerun = dd if=/dev/zero of=%s bs=1k count=500 postrun = rm -f %s [otherexport] exportname = /export/nbd/experiment # The other options are all optional, except this one in case # the oldstyle option is used in [generic]: # port = 12346 ++++++ nbd-2.9.25-close.diff ++++++ --- /var/tmp/diff_new_pack.LUYUlt/_old 2015-03-18 13:04:42.000000000 +0100 +++ /var/tmp/diff_new_pack.LUYUlt/_new 2015-03-18 13:04:42.000000000 +0100 @@ -1,8 +1,10 @@ ---- nbd-2.9.25/nbd-client.c.orig 2012-01-05 15:40:31.962826124 -0500 -+++ nbd-2.9.25/nbd-client.c 2012-01-05 15:40:53.627555277 -0500 -@@ -70,6 +70,7 @@ - len=read(fd, buf, 256); - buf[len-1]='\0'; +Index: nbd-3.9/nbd-client.c +=================================================================== +--- nbd-3.9.orig/nbd-client.c ++++ nbd-3.9/nbd-client.c +@@ -79,6 +79,7 @@ int check_conn(char* devname, int do_pri + } + buf[(len < 256) ? len : 255]='\0'; if(do_print) printf("%s\n", buf); + close(fd); return 0; ++++++ nbd-server.service ++++++ [Unit] Description=Network Block Device server Documentation=man:nbd-server(1) man:nbd-server(5) After=syslog.target network.target [Service] Type=forking EnvironmentFile=/etc/sysconfig/nbd-server ExecStart=/usr/bin/nbd-server $OPTIONS PIDFile=/run/nbd-server.pid [Install] WantedBy=multi-user.target ++++++ nbd-server.sysconfig ++++++ # Command line options for nbd-server OPTIONS="" ++++++ no-return-nonvoid.patch ++++++ Index: nbd-3.9/nbd-server.c =================================================================== --- nbd-3.9.orig/nbd-server.c +++ nbd-3.9/nbd-server.c @@ -1595,6 +1595,7 @@ CLIENT* negotiate(int net, CLIENT *clien err("Negotiation failed/12: %m"); return NULL; } + return NULL; } /** sending macro. */ -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
