From b1fc0cca2e8dc846cf4b6e9b8e97dccd0ea78661 Mon Sep 17 00:00:00 2001 From: Vyacheslav Barinov Date: Thu, 14 Jan 2016 14:08:55 +0300 Subject: [PATCH] sudo-rpm package added Change-Id: Iad3d5aab10aa229cd45f9798e4a4e69593864663 Signed-off-by: Vyacheslav Barinov --- packaging/sudo.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packaging/sudo.spec b/packaging/sudo.spec index d1c717d..640c22e 100644 --- a/packaging/sudo.spec +++ b/packaging/sudo.spec @@ -28,6 +28,15 @@ Group: System/Utilities %description devel These header files are needed for building of sudo plugins. +%package rpm +Summary: Script making possible to run RPM as root from inside build +Group: System/Utilities +Requires: sudo + +%description rpm +The package will add ALL ALL = (root) NOPASSWD: /usr/bin/rpm to sudoers and +makes possible to install packages from inside build. + %prep %setup -q cp %{SOURCE1001} . @@ -71,6 +80,8 @@ cat sudoers.lang >> %{name}.lang %post chmod 0440 %{_sysconfdir}/sudoers +%post rpm +echo 'ALL ALL = (root) NOPASSWD: /usr/bin/rpm' >> %{_sysconfdir}/sudoers %lang_package @@ -94,3 +105,5 @@ chmod 0440 %{_sysconfdir}/sudoers %manifest %{name}.manifest %defattr(-,root,root) %{_includedir}/sudo_plugin.h + +%files rpm -- 2.7.4