[BackupPC] perl-suidperl is no longer available (fix bug #611009)
Johan Cwiklinski
trasher at fedoraproject.org
Sat Jul 31 20:31:31 UTC 2010
commit b21075d8dcf0b54cbbdd098c7412b26ca5df580c
Author: trasher <trasher at fedoraproject.org>
Date: Sat Jul 31 22:21:07 2010 +0200
perl-suidperl is no longer available (fix bug #611009)
BackupPC.spec | 17 ++++++++++++++---
BackupPC_Admin.c | 10 ++++++++++
2 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/BackupPC.spec b/BackupPC.spec
index 58cc11c..19f0137 100644
--- a/BackupPC.spec
+++ b/BackupPC.spec
@@ -6,7 +6,7 @@
Name: BackupPC
Version: 3.1.0
-Release: 14.1%{?dist}
+Release: 15%{?dist}
Summary: High-performance backup system
Group: Applications/System
@@ -16,9 +16,12 @@ Source0: http://downloads.sourceforge.net/backuppc/%{name}-%{version}.tar
Source1: BackupPC.htaccess
Source2: BackupPC.logrotate
Source3: BackupPC-README.fedora
+#A C wrapper to use since perl-suidperl is no longer provided
+Source4: BackupPC_Admin.c
Patch0: BackupPC-TopDir_change.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
+# No longer noarch due to the C wrapper
+#BuildArch: noarch
BuildRequires: /bin/cat
BuildRequires: /bin/df
@@ -32,7 +35,6 @@ BuildRequires: %{_bindir}/ssh
BuildRequires: perl(Compress::Zlib)
Requires: httpd
-Requires: perl-suidperl
Requires: perl(File::RsyncP)
Requires: perl(Compress::Zlib)
Requires: perl(Archive::Zip)
@@ -101,6 +103,7 @@ EOF
%endif
%build
+gcc -o BackupPC_Admin %{SOURCE4} $RPM_OPT_FLAGS
%if %{useselinux}
# SElinux
pushd selinux
@@ -151,6 +154,10 @@ sed -i 's/^\$Conf{XferMethod}\ =.*/$Conf{XferMethod} = "rsync";/' $RPM_BUILD_ROO
sed -i 's|^\$Conf{CgiURL}\ =.*|$Conf{CgiURL} = "http://localhost/BackupPC";|' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.pl
sed -i 's|ClientNameAlias => 1,|ClientNameAlias => 0,|' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.pl
+#perl-suidperl is no longer avaialable, we use a C wrapper
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/%{name}/sbin/BackupPC_Admin $RPM_BUILD_ROOT%{_datadir}/%{name}/sbin/BackupPC_Admin.pl
+%{__install} -p -m 4755 BackupPC_Admin $RPM_BUILD_ROOT%{_datadir}/%{name}/sbin/
+
%if %{useselinux}
# SElinux
%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}
@@ -216,6 +223,7 @@ fi
%{_initrddir}/backuppc
%attr(4750,backuppc,apache) %{_datadir}/%{name}/sbin/BackupPC_Admin
+%attr(750,backuppc,apache) %{_datadir}/%{name}/sbin/BackupPC_Admin.pl
%attr(-,backuppc,root) %{_localstatedir}/lib/%{name}/
%if %{useselinux}
@@ -223,6 +231,9 @@ fi
%endif
%changelog
+* Sat Jul 31 2010 Johan Cwiklinski <johan AT x-tnd DOT be> 3.1.0-15
+- perl-suidperl is no longer available (fix bug #611009)
+
* Fri Jul 09 2010 Mike McGrath <mmcgrath at redhat.com> 3.1.0-14.1
- Rebuilding to fix perl-suidperl broken dep
diff --git a/BackupPC_Admin.c b/BackupPC_Admin.c
new file mode 100644
index 0000000..be3137f
--- /dev/null
+++ b/BackupPC_Admin.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+#ifndef REAL_PATH
+#define REAL_PATH "/usr/share/BackupPC/sbin/BackupPC_Admin.pl"
+#endif
+int main(ac, av)
+char **av;
+{
+ execv(REAL_PATH, av);
+ return 0;
+}
More information about the scm-commits
mailing list