Hello Kern, I think that those discussion is not relevant to bacula-devel. Spec file correction which I have delivered is only distribution relevant.
Thanks for cooperation and you time. BR Petr On 03/04/2013 10:55 AM, Kern Sibbald wrote: > Hello, > > Thanks for the update. Nice. This seems to me to be the best way > to handle the issue. > > I haven't looked at your full spec file for quite some time and since > it is different from the one in the source code, I will just mention that > in the last one I saw, the RedHat package did not have the necessary > code to automatically generate unique random passwords at initial > installation time. You may already have this, but if not, it is relatively > easy to do and improves security for users considerable. The project > spec files (now probably quite out of date) with the necessary code > can be found in <bacula>/platforms/rpms/redhat/bacula.spec.in. > In particular search for XXX_REPLACE and you will see how we > do it. > > One thing I didn't like about spec files is that we had to duplicate similar > code in a number of places, and I saw no way of creating a sort of > macro or function inside the spec file (I guess it can be done by some > sort of included files). If you have a better way of resolving that issue > please let me know -- I survive, but I am far from being good at writing > rpm spec files. > > Best regards, > Kern > > On 03/04/2013 10:33 AM, Petr Hracek wrote: >> Hello, >> >> Yes I think that separate package would be good in spec file >> I have made modifications against upstream: >> diff --git a/bacula.spec b/bacula.spec >> index cc5c31c..3bd79ad 100644 >> --- a/bacula.spec >> +++ b/bacula.spec >> @@ -212,9 +212,50 @@ verification of computer data across a network of >> different computers. It is >> based on a client/server architecture. >> >> This package contains the storage daemon, the daemon responsible for >> writing >> -the data received from the clients onto tape drives or other mass storage >> -devices. >> +the data received from the clients onto other mass storage devices. >> >> +%package storage-tape >> +Summary: Bacula storage daemon files >> +Group: System Environment/Daemons >> +Requires: bacula-common%{?_isa} = %{version}-%{release} >> +# Storage backends merged into core. >> +Provides: bacula-storage-common = %{version}-%{release} >> +Obsoletes: bacula-storage-common < 5.2.2-2 >> +Provides: bacula-storage-mysql = %{version}-%{release} >> +Obsoletes: bacula-storage-mysql < 5.2.0 >> +Provides: bacula-storage-sqlite = %{version}-%{release} >> +Obsoletes: bacula-storage-sqlite < 5.2.0 >> +Provides: bacula-storage-postgresql = %{version}-%{release} >> +Obsoletes: bacula-storage-postgresql < 5.2.0 >> +Requires: mt-st >> + >> +%if 0%{?fedora} == 17 >> +Requires(post): systemd-units >> +Requires(preun): systemd-units >> +Requires(postun): systemd-units >> +%endif >> + >> +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 >> +Requires(post): systemd-sysv >> +Requires(post): systemd >> +Requires(preun): systemd >> +Requires(postun): systemd >> +%endif >> + >> +%if 0%{?rhel} == 5 || 0%{?rhel} == 6 >> +Requires(post): /sbin/chkconfig >> +Requires(preun): /sbin/chkconfig >> +Requires(preun): /sbin/service >> +Requires(postun): /sbin/service >> +%endif >> + >> +%description storage-tape >> +Bacula is a set of programs that allow you to manage the backup, >> recovery, and >> +verification of computer data across a network of different computers. >> It is >> +based on a client/server architecture. >> + >> +This package contains the storage daemon, the daemon responsible for >> writing >> +the data received from the clients onto tape drives devices. >> >> %package client >> Summary: Bacula backup client >> @@ -844,6 +885,11 @@ fi >> %{_mandir}/man8/bscan.8.* >> %{_mandir}/man8/btape.8.* >> >> +%files storage-tape >> +%defattr(-,root,root,-) >> +%{_libexecdir}/%{name}/mtx-changer >> +%{_libexecdir}/%{name}/mtx-changer.conf >> + >> %files client >> %defattr(-,root,root,-) >> %{_sbindir}/bacula-fd >> >> [stone@kiasportyw 5.fc19(master)]$ rpm -qpl >> bacula-storage-tape-5.2.13-5.fc19.i686.rpm >> /usr/libexec/bacula/mtx-changer >> /usr/libexec/bacula/mtx-changer.conf >> [stone@kiasportyw 5.fc19(master)]$ rpm -qpl --requires >> rpm: no arguments given for query >> [stone@kiasportyw 5.fc19(master)]$ rpm -qpl --requires >> bacula-storage-tape-5.2.13-5.fc19.i686.rpm >> /bin/sh >> bacula-common(x86-32) = 5.2.13-5.fc19 >> mt-st >> rpmlib(CompressedFileNames) <= 3.0.4-1 >> rpmlib(FileDigests) <= 4.6.0-1 >> rpmlib(PayloadFilesHavePrefix) <= 4.0-1 >> systemd >> systemd >> systemd >> systemd-sysv >> rpmlib(PayloadIsXz) <= 5.2-1 >> /usr/libexec/bacula/mtx-changer >> /usr/libexec/bacula/mtx-changer.conf >> [stone@kiasportyw 5.fc19(master)]$ >> >> Would it be OK? >> >> On 03/01/2013 11:37 PM, Kern Sibbald wrote: >>> Hello, >>> >>> Yes, I have been aware of the dependency problem for >>> some time. The problem is that if the user wants only a disk >>> based backup, which is becoming more and more prevalent, >>> such a dependency forces the user to load a package that >>> may never be used. >>> >>> Possibly the right way to do it is to have a separate Bacula >>> package that adds tape backup. >>> >>> Nothing really pleases me, so in such situations, I usually >>> do nothing until the right solution arises. >>> >>> What do you think? >>> >>> Best regards, >>> Kern >>> >>> On 03/01/2013 10:56 AM, Petr Hracek wrote: >>>> Hi, >>>> >>>> on the base of that bug: >>>> https://bugzilla.redhat.com/show_bug.cgi?id=911573 >>>> >>>> Means that when mt command is not existing on the system them mtx-change >>>> does not work. >>>> /usr/libexec/bacula/mtx-changer >>>> or causes problem. >>>> >>>> I have prepared patch which should solve that problem. >>>> >>>> diff --git a/bacula.spec b/bacula.spec >>>> index 8d518a0..a13d35e 100644 >>>> --- a/bacula.spec >>>> +++ b/bacula.spec >>>> @@ -185,6 +185,7 @@ Provides: bacula-storage-sqlite = >>>> %{version}-%{release} >>>> Obsoletes: bacula-storage-sqlite < 5.2.0 >>>> Provides: bacula-storage-postgresql = >>>> %{version}-%{release} >>>> Obsoletes: bacula-storage-postgresql < 5.2.0 >>>> +Requires: mt-st >>>> >>>> %if 0%{?fedora} == 17 >>>> Requires(post): systemd-units >>>> >>>> What do you think about that? >>>> -- S pozdravem / Best regards Petr Hracek Red Hat Czech s.r.o. BaseOS Core Services Brno Email: phra...@redhat.com Web: www.cz.redhat.com ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel