From 17fa3d8b9c781e74a7f648c3d49a235ae9b5bbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Membr=C3=A9?= Date: Mon, 4 May 2015 11:35:10 +0200 Subject: [PATCH] Fixes #6549: patches does not apply anymore on rudder-agent --- ...er-agent-to-rudder-agent-thin-debian.patch | 9 +--- ...dder-agent-to-rudder-agent-thin-spec.patch | 41 ++++++++----------- 2 files changed, 20 insertions(+), 30 deletions(-) diff --git a/rudder-agent-thin/SOURCES/patches/rudder-agent-thin/0001-rudder-agent-to-rudder-agent-thin-debian.patch b/rudder-agent-thin/SOURCES/patches/rudder-agent-thin/0001-rudder-agent-to-rudder-agent-thin-debian.patch index a152f78ba..75810fb27 100644 --- a/rudder-agent-thin/SOURCES/patches/rudder-agent-thin/0001-rudder-agent-to-rudder-agent-thin-debian.patch +++ b/rudder-agent-thin/SOURCES/patches/rudder-agent-thin/0001-rudder-agent-to-rudder-agent-thin-debian.patch @@ -121,19 +121,14 @@ index 071a2b6..cba53f8 100755 # Compile the LMDB library and install it in /opt/rudder # LMDB source code does not know how to create destination folders, do it ourselves for i in bin lib include man/man1; do mkdir -p $(CURDIR)/debian/tmp/opt/rudder/$$i; done -@@ -83,10 +81,9 @@ binary-arch: install - # dh_installlogrotate - # dh_installmime - # dh_python -- dh_installinit --no-start -R # restart after upgrade (instead of stop, upgrade, start) -+ dh_installinit --no-start -R --name=rudder-agent # restart after upgrade (instead of stop, upgrade, start) +@@ -88,6 +86,5 @@ binary-arch: install # Install the profile.d file (PATH adjustment) dh_install --SOURCEDIR=$(CURDIR)/SOURCES/ rudder-agent.sh /etc/profile.d - dh_install --SOURCEDIR=$(CURDIR)/SOURCES/perl-custom/opt rudder /opt dh_install --SOURCEDIR=$(CURDIR)/SOURCES run-inventory /opt/rudder/bin dh_install --SOURCEDIR=$(CURDIR)/SOURCES initial-promises /opt/rudder/share dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-agent-utilities/bin rudder /opt/rudder/bin -@@ -100,9 +97,7 @@ binary-arch: install +@@ -101,9 +98,7 @@ binary-arch: install dh_install --SOURCEDIR=$(CURDIR)/SOURCES/ check-rudder-agent /opt/rudder/bin/ # Install script to get local processes on VZ systems dh_install --SOURCEDIR=$(CURDIR)/SOURCES/ vzps.py /opt/rudder/bin/ diff --git a/rudder-agent-thin/SOURCES/patches/rudder-agent-thin/0002-rudder-agent-to-rudder-agent-thin-spec.patch b/rudder-agent-thin/SOURCES/patches/rudder-agent-thin/0002-rudder-agent-to-rudder-agent-thin-spec.patch index 1d0e3f842..cf464c84d 100644 --- a/rudder-agent-thin/SOURCES/patches/rudder-agent-thin/0002-rudder-agent-to-rudder-agent-thin-spec.patch +++ b/rudder-agent-thin/SOURCES/patches/rudder-agent-thin/0002-rudder-agent-to-rudder-agent-thin-spec.patch @@ -18,15 +18,16 @@ %define rudderdir /opt/rudder %define ruddervardir /var/rudder -@@ -69,7 +69,6 @@ +@@ -69,8 +69,7 @@ Source8: vzps.py Source9: rudder-agent.sh Source10: detect_os.sh -Source11: rudder-perl Source12: rudder-agent-utilities - + Source13: rudder.init + # uuidgen doesn't exist on AIX, so we provide a simple shell compatible version -@@ -77,11 +76,6 @@ +@@ -78,11 +77,6 @@ Source100: uuidgen %endif @@ -38,7 +39,7 @@ %if 0%{?rhel} && 0%{?rhel} == 4 Patch1: fix-missing-headers %endif -@@ -89,10 +83,10 @@ +@@ -90,10 +84,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Generic requirements @@ -52,7 +53,7 @@ # Specific requirements -@@ -191,6 +185,10 @@ +@@ -192,6 +186,10 @@ %define use_system_openssl false %endif @@ -63,7 +64,7 @@ ## 5 - Resulting dependencies %if "%{use_system_openssl}" == "true" BuildRequires: openssl-devel -@@ -207,23 +205,11 @@ +@@ -208,23 +206,11 @@ %define cp_a_command cp -hpPr %endif @@ -88,16 +89,16 @@ #================================================= # Source preparation -@@ -240,8 +226,6 @@ +@@ -241,8 +227,6 @@ cd %{_sourcedir} -%{_sourcedir}/perl-prepare.sh %{_sourcedir}/fusioninventory-agent - # Ensure an appropriate environment for the compiler - export CFLAGS=$(echo ${RPM_OPT_FLAGS}|sed -e "s/-D_FORTIFY_SOURCE=.//") - export CXXFLAGS="${CFLAGS}" -@@ -365,9 +349,6 @@ + export CFLAGS="${RPM_OPT_FLAGS}" + export CXXFLAGS="${RPM_OPT_FLAGS}" +@@ -375,9 +359,6 @@ # Initial promises cp -r %{_sourcedir}/initial-promises %{buildroot}%{rudderdir}/share/ @@ -107,7 +108,7 @@ # Wrapper script %{install_command} -m 755 %{SOURCE3} %{buildroot}/opt/rudder/bin/run-inventory -@@ -390,8 +371,6 @@ +@@ -400,8 +381,6 @@ %{install_command} -m 755 %{SOURCE8} %{buildroot}/opt/rudder/bin/vzps.py @@ -116,7 +117,7 @@ # Rudder agent utilities %{install_command} -m 755 %{SOURCE12}/bin/rudder %{buildroot}%{rudderdir}/bin/rudder %{cp_a_command} %{SOURCE12}/share/commands/* %{buildroot}%{rudderdir}/share/commands/ -@@ -416,7 +395,7 @@ +@@ -426,7 +405,7 @@ # Build a list of files to include in this package for use in the %files section below find %{buildroot}%{rudderdir} %{buildroot}%{ruddervardir} -type f -o -type l | sed "s,%{buildroot},," | sed "s,\.py$,\.py*," | grep -v "%{rudderdir}/etc/uuid.hive" | grep -v "%{ruddervardir}/cfengine-community/ppkeys" > %{_builddir}/file.list.%{name} @@ -125,7 +126,7 @@ #================================================= # Pre Installation #================================================= -@@ -437,7 +416,7 @@ +@@ -447,7 +426,7 @@ %endif fi @@ -134,25 +135,19 @@ #================================================= # Post Installation #================================================= -@@ -672,7 +651,7 @@ - - /opt/rudder/bin/check-rudder-agent - +@@ -678,4 +656,4 @@ -%preun -n rudder-agent +%preun -n rudder-agent-thin #================================================= # Pre Uninstallation #================================================= -@@ -694,7 +673,7 @@ - fi - - +@@ -700,4 +679,4 @@ -%postun -n rudder-agent +%postun -n rudder-agent-thin #================================================= # Post Uninstallation #================================================= -@@ -741,7 +720,7 @@ +@@ -750,7 +729,7 @@ # Files #================================================= # Files from %{rudderdir} and %{ruddervardir} are automatically added via the -f option @@ -161,7 +156,7 @@ %defattr(-, root, root, 0755) %{bindir}/rudder -@@ -779,15 +758,8 @@ +@@ -787,15 +766,8 @@ # Changelog #================================================= %changelog