Re: Is this a bug in CentOS-7 BackupPC?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sat, Sep 26, 2015 at 08:12:40PM +0100, Timothy Murphy wrote:
> I don't really understand this.
> The perl script wants to create /var/run/BackupPC/BackupPC.sock
> which it seems it cannot do unless /var/run/BackupPC/ exists.
> If as you say this disappears on re-booting,
> I don't see how this program could work.

Seems like a packaging bug in EPEL.  Fedora does this (semi-)right, by
dropping down an /etc/tmpfiles.d/BackupPC.conf, which instantiates the
/var/run/BackupPC directory as 0755 root:backuppc.

Looking at the epel7 specfile, I see:

# tmpfiles.d & systemd support in all supported Fedora now, but not RHEL
%if 0%{?fedora}
%global _with_tmpfilesd 1
%global _with_systemd 1
%endif

and then later:

%if 0%{?_with_tmpfilesd}
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d
install -p -m 0644 %{SOURCE6}
$RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d/%{name}.conf
%endif

and 

%if 0%{?_with_tmpfilesd}
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
%endif

Of course, CentOS7 (and RHEL7) supports tmpfiles.d, in fact, may
system services require it, such as cups, samba, pam, etc.  I'm not
sure why the BackupPC package installs it in /etc/tmpfiles.d instead
of /usr/lib/tmpfiles.d, probably because the person who made the
package isn't very systemd-saavy.

The contents of the /etc/tmpfiles.d/BackupPC.conf file looks like
this: 

D /var/run/BackupPC 0775 root backuppc -

If you create that file, you'll get the /var/run/BackupPC file when
you start up.  I suggest filing a bug against the EPEL package if you
want to get it fixed there.

-- 
Jonathan Billings <billings@xxxxxxxxxx>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux