diff --git a/daemontools-encore-1.10-cross-compile.patch b/daemontools-encore-1.10-cross-compile.patch new file mode 100644 index 0000000..fe805d8 --- /dev/null +++ b/daemontools-encore-1.10-cross-compile.patch @@ -0,0 +1,28 @@ +diff -Nur daemontools-encore-1.10.old/conf-cc daemontools-encore-1.10/conf-cc +--- daemontools-encore-1.10.old/conf-cc 2014-04-01 18:58:19.000000000 -0400 ++++ daemontools-encore-1.10/conf-cc 2025-01-20 21:26:36.776879300 -0500 +@@ -1,3 +1,3 @@ +-gcc -O2 -Wall -Wshadow -Wcast-align -Wwrite-strings ++${CC} -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings + + This will be used to compile .c files. +diff -Nur daemontools-encore-1.10.old/conf-ld daemontools-encore-1.10/conf-ld +--- daemontools-encore-1.10.old/conf-ld 2014-04-01 18:58:19.000000000 -0400 ++++ daemontools-encore-1.10/conf-ld 2025-01-20 21:35:54.814297101 -0500 +@@ -1,3 +1,3 @@ +-gcc -s ++${CC} ${LDFLAGS} + + This will be used to link .o files into an executable. +diff -Nur daemontools-encore-1.10.old/Makefile daemontools-encore-1.10/Makefile +--- daemontools-encore-1.10.old/Makefile 2014-04-01 18:58:19.000000000 -0400 ++++ daemontools-encore-1.10/Makefile 2025-01-20 12:55:43.071975214 -0500 +@@ -210,7 +210,7 @@ + + hasshsgr.h: \ + chkshsgr choose compile hasshsgr.h1 hasshsgr.h2 load tryshsgr.c warn-shsgr +- ./chkshsgr || ( cat warn-shsgr; exit 1 ) ++ echo "Warning: We can not run test on cross target. - ignoring ./chkshsgr || ( cat warn-shsgr; exit 1 )" + ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h + + haswaitp.h: \ diff --git a/daemontools-encore.spec b/daemontools-encore.spec index 088de04..2b00c91 100644 --- a/daemontools-encore.spec +++ b/daemontools-encore.spec @@ -1,17 +1,18 @@ Summary: A collection of tools for managing UNIX services Name: daemontools-encore Version: 1.10 -Release: 4%{dist} +Release: 5%{dist} License: Public domain Group: Utilities/System URL: http://untroubled.org/daemontools-encore/ Source: http://untroubled.org/daemontools-encore/%{name}-%{version}.tar.gz -Source2: daemontools-svscanboot Source3: daemontools.service +Patch0: daemontools-encore-1.10-cross-compile.patch Buildroot: %_tmppath/%{name}-%{version} Obsoletes: daemontools Provides: daemontools BuildRequires: /usr/bin/perl +%define _build_id_links none %define debug_package %{nil} %description @@ -30,10 +31,12 @@ daemontools provides. %prep %setup +%patch0 -p1 perl -i -pe 'if ($. == 1) { s!^!%{buildroot}!; s!local/!! }' conf-bin perl -i -pe 'if ($. == 1) { s!^!%{buildroot}!; s!local!share! }' conf-man %build +CC="gcc $RPM_OPT_FLAGS -s " CFLAGS="$RPM_OPT_FLAGS" \ make %install @@ -44,12 +47,9 @@ DESTDIR=%{buildroot} make install mkdir -p %{buildroot}/usr/lib/systemd/system install -m 0644 %{SOURCE3} %{buildroot}/usr/lib/systemd/system %endif -%if %{rhel} == 6 -mkdir -p %{buildroot}%{_sysconfdir}/init -install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/init/svscanboot.conf -%endif mkdir -p %{buildroot}/service -# symink executables to legacy SME directory + +# symlink executables to legacy SME directory mkdir -p %{buildroot}/usr/local/bin for prog in envdir envuidgid fghack multilog pgrphack readproctitle setlock setuidgid softlimit supervise svc svok svscan svscanboot svstat ; do ln %{buildroot}/usr/bin/$prog %{buildroot}/usr/local/bin/$prog @@ -62,27 +62,6 @@ if [ -e /usr/bin/systemctl ] ; then systemctl start daemontools fi %endif -%if %{rhel} == 6 -/sbin/initctl start svscanboot || true -%endif -%if %{rhel} < 6 -# Add svscanboot to inittab -if [ ! -f /etc/inittab ]; then - echo "No /etc/inittab found - required svscanboot line not added!" - exit 1 -elif grep svscanboot /etc/inittab >/dev/null; then - echo "svscanboot line found in /etc/inittab - I assume svscan is already running" -else - rm -f /etc/inittab.rpmnew - cp /etc/inittab /etc/inittab.rpmnew || exit 1 - echo >> /etc/inittab.rpmnew - echo '# Start daemontools svscan' >> /etc/inittab.rpmnew - echo 'SV:123456:respawn:/usr/bin/svscanboot' >> /etc/inittab.rpmnew - mv -f /etc/inittab.rpmnew /etc/inittab - kill -HUP 1 - echo "Added svscanboot to /etc/inittab - init should start svscan now." -fi -%endif %postun if [ "$1" -eq 0 ]; then @@ -92,18 +71,6 @@ if [ -e /usr/bin/systemctl ] ; then systemctl disable daemontools fi %endif -%if %{rhel} == 6 -/sbin/initctl stop svscanboot -%endif -%if %{rhel} < 6 - # Remove svscanboot entry from inittab - if grep svscanboot /etc/inittab >/dev/null; then - grep -v svscan /etc/inittab > /etc/inittab.rpmnew - mv -f /etc/inittab.rpmnew /etc/inittab - kill -HUP 1 - echo "Removed svscanboot from /etc/inittab." - fi -%endif fi %files @@ -114,13 +81,14 @@ fi %if %{rhel} >= 7 /usr/lib/systemd/system/daemontools.service %endif -%if %{rhel} == 6 -%{_sysconfdir}/init/*conf -%endif %dir %attr(0755,root,root) /service %doc README CHANGES CHANGES.djb LICENSE TODO %changelog +* Mon Jan 20 2025 Jean-Philippe Pialasse 1.10-5.sme +- fix cross compiling issues [SME: 12512] +- tidy spec from deprecated rhel version + * Mon Jan 20 2025 Trevor Batley 1.10-4 - add debug_pkg %{nil} to remove empty debuginfo file error - fix symlink of executables to legacy sme directory diff --git a/daemontools-svscanboot b/daemontools-svscanboot deleted file mode 100644 index c4499e6..0000000 --- a/daemontools-svscanboot +++ /dev/null @@ -1,5 +0,0 @@ -# svscanboot -start on stopped rc RUNLEVEL=[12345] -stop on starting runlevel [06] -respawn -exec /usr/bin/svscanboot