* Mon Jan 20 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.10-5.sme
- fix cross compiling issues [SME: 12512] - tidy spec from deprecated rhel version
This commit is contained in:
parent
b3c3a293e2
commit
05ea95fdea
28
daemontools-encore-1.10-cross-compile.patch
Normal file
28
daemontools-encore-1.10-cross-compile.patch
Normal file
@ -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: \
|
@ -1,17 +1,18 @@
|
|||||||
Summary: A collection of tools for managing UNIX services
|
Summary: A collection of tools for managing UNIX services
|
||||||
Name: daemontools-encore
|
Name: daemontools-encore
|
||||||
Version: 1.10
|
Version: 1.10
|
||||||
Release: 4%{dist}
|
Release: 5%{dist}
|
||||||
License: Public domain
|
License: Public domain
|
||||||
Group: Utilities/System
|
Group: Utilities/System
|
||||||
URL: http://untroubled.org/daemontools-encore/
|
URL: http://untroubled.org/daemontools-encore/
|
||||||
Source: http://untroubled.org/daemontools-encore/%{name}-%{version}.tar.gz
|
Source: http://untroubled.org/daemontools-encore/%{name}-%{version}.tar.gz
|
||||||
Source2: daemontools-svscanboot
|
|
||||||
Source3: daemontools.service
|
Source3: daemontools.service
|
||||||
|
Patch0: daemontools-encore-1.10-cross-compile.patch
|
||||||
Buildroot: %_tmppath/%{name}-%{version}
|
Buildroot: %_tmppath/%{name}-%{version}
|
||||||
Obsoletes: daemontools
|
Obsoletes: daemontools
|
||||||
Provides: daemontools
|
Provides: daemontools
|
||||||
BuildRequires: /usr/bin/perl
|
BuildRequires: /usr/bin/perl
|
||||||
|
%define _build_id_links none
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -30,10 +31,12 @@ daemontools provides.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup
|
||||||
|
%patch0 -p1
|
||||||
perl -i -pe 'if ($. == 1) { s!^!%{buildroot}!; s!local/!! }' conf-bin
|
perl -i -pe 'if ($. == 1) { s!^!%{buildroot}!; s!local/!! }' conf-bin
|
||||||
perl -i -pe 'if ($. == 1) { s!^!%{buildroot}!; s!local!share! }' conf-man
|
perl -i -pe 'if ($. == 1) { s!^!%{buildroot}!; s!local!share! }' conf-man
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
CC="gcc $RPM_OPT_FLAGS -s " CFLAGS="$RPM_OPT_FLAGS" \
|
||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -44,12 +47,9 @@ DESTDIR=%{buildroot} make install
|
|||||||
mkdir -p %{buildroot}/usr/lib/systemd/system
|
mkdir -p %{buildroot}/usr/lib/systemd/system
|
||||||
install -m 0644 %{SOURCE3} %{buildroot}/usr/lib/systemd/system
|
install -m 0644 %{SOURCE3} %{buildroot}/usr/lib/systemd/system
|
||||||
%endif
|
%endif
|
||||||
%if %{rhel} == 6
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/init
|
|
||||||
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/init/svscanboot.conf
|
|
||||||
%endif
|
|
||||||
mkdir -p %{buildroot}/service
|
mkdir -p %{buildroot}/service
|
||||||
# symink executables to legacy SME directory
|
|
||||||
|
# symlink executables to legacy SME directory
|
||||||
mkdir -p %{buildroot}/usr/local/bin
|
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
|
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
|
ln %{buildroot}/usr/bin/$prog %{buildroot}/usr/local/bin/$prog
|
||||||
@ -62,27 +62,6 @@ if [ -e /usr/bin/systemctl ] ; then
|
|||||||
systemctl start daemontools
|
systemctl start daemontools
|
||||||
fi
|
fi
|
||||||
%endif
|
%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
|
%postun
|
||||||
if [ "$1" -eq 0 ]; then
|
if [ "$1" -eq 0 ]; then
|
||||||
@ -92,18 +71,6 @@ if [ -e /usr/bin/systemctl ] ; then
|
|||||||
systemctl disable daemontools
|
systemctl disable daemontools
|
||||||
fi
|
fi
|
||||||
%endif
|
%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
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -114,13 +81,14 @@ fi
|
|||||||
%if %{rhel} >= 7
|
%if %{rhel} >= 7
|
||||||
/usr/lib/systemd/system/daemontools.service
|
/usr/lib/systemd/system/daemontools.service
|
||||||
%endif
|
%endif
|
||||||
%if %{rhel} == 6
|
|
||||||
%{_sysconfdir}/init/*conf
|
|
||||||
%endif
|
|
||||||
%dir %attr(0755,root,root) /service
|
%dir %attr(0755,root,root) /service
|
||||||
%doc README CHANGES CHANGES.djb LICENSE TODO
|
%doc README CHANGES CHANGES.djb LICENSE TODO
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 20 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.10-5.sme
|
||||||
|
- fix cross compiling issues [SME: 12512]
|
||||||
|
- tidy spec from deprecated rhel version
|
||||||
|
|
||||||
* Mon Jan 20 2025 Trevor Batley <trevorb@koozali.org> 1.10-4
|
* Mon Jan 20 2025 Trevor Batley <trevorb@koozali.org> 1.10-4
|
||||||
- add debug_pkg %{nil} to remove empty debuginfo file error
|
- add debug_pkg %{nil} to remove empty debuginfo file error
|
||||||
- fix symlink of executables to legacy sme directory
|
- fix symlink of executables to legacy sme directory
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
# svscanboot
|
|
||||||
start on stopped rc RUNLEVEL=[12345]
|
|
||||||
stop on starting runlevel [06]
|
|
||||||
respawn
|
|
||||||
exec /usr/bin/svscanboot
|
|
Loading…
Reference in New Issue
Block a user