[packages/busybox] - rel 2; build with noexecstack
arekm
arekm at pld-linux.org
Mon Mar 30 15:53:53 CEST 2020
commit 7a6bf0ae12f6d1b441a01e0160eb9ff981e4cab7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Mar 30 15:53:46 2020 +0200
- rel 2; build with noexecstack
busybox-1.31.1-stime-fix.patch | 24 ++++++++++++++++++++++++
busybox.spec | 10 ++++++----
2 files changed, 30 insertions(+), 4 deletions(-)
---
diff --git a/busybox.spec b/busybox.spec
index 7c360c3..928f4b5 100644
--- a/busybox.spec
+++ b/busybox.spec
@@ -42,7 +42,7 @@ Summary(pt_BR.UTF-8): BusyBox é um conjunto de utilitários UNIX em um único b
Name: busybox
# stable line only
Version: 1.31.1
-Release: 1
+Release: 2
License: GPL v2
Group: Applications
Source0: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
@@ -58,6 +58,7 @@ Patch4: %{name}-kernel_headers.patch
Patch5: %{name}-insmod-morearchs.patch
Patch6: %{name}-dhcp.patch
Patch7: %{name}-fix_64_archs.patch
+Patch8: busybox-1.31.1-stime-fix.patch
Patch9: %{name}-ash-export-PATH.patch
URL: http://www.busybox.net/
BuildRequires: gcc >= 3.2
@@ -167,6 +168,7 @@ Statycznie skonsolidowany busybox dla initrd.
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
%patch9 -p1
%build
@@ -177,7 +179,7 @@ install %{SOURCE2} .config
%{__make} \
%{?with_verbose:V=1} \
CROSS_CFLAGS="%{rpmcflags} -Os -D_BSD_SOURCE" \
- LDFLAGS="%{rpmldflags} -static" \
+ LDFLAGS="%{rpmldflags} -static -Wl,-z,noexecstack" \
%if %{with dietlibc}
LIBRARIES="-lrpc" \
CC="diet %{__cc}"
@@ -208,7 +210,7 @@ install %{SOURCE1} .config
%{__make} \
%{?with_verbose:V=1} \
CROSS_CFLAGS="%{rpmcflags} -Os -D_BSD_SOURCE" \
- LDFLAGS="%{rpmldflags} -static" \
+ LDFLAGS="%{rpmldflags} -static -Wl,-z,noexecstack" \
%if %{with dietlibc}
LIBRARIES="-lrpc" \
CC="diet %{__cc}"
@@ -234,7 +236,7 @@ mv -f busybox built/busybox.static
%{?with_verbose:V=1} \
%{CrossOpts} \
CFLAGS_EXTRA="%{rpmcflags}" \
- LDFLAGS="%{rpmldflags}" \
+ LDFLAGS="%{rpmldflags} -Wl,-z,noexecstack" \
CC="%{__cc}"
%{__make} busybox.links docs/busybox.1
%endif
diff --git a/busybox-1.31.1-stime-fix.patch b/busybox-1.31.1-stime-fix.patch
new file mode 100644
index 0000000..15af327
--- /dev/null
+++ b/busybox-1.31.1-stime-fix.patch
@@ -0,0 +1,24 @@
+diff -up busybox-1.31.1/libbb/Kbuild.src.stime busybox-1.31.1/libbb/Kbuild.src
+--- busybox-1.31.1/libbb/Kbuild.src.stime 2019-11-13 17:08:22.808371597 -0500
++++ busybox-1.31.1/libbb/Kbuild.src 2019-11-13 17:08:50.154882529 -0500
+@@ -198,3 +198,6 @@ lib-$(CONFIG_FEATURE_FIND_REGEX) += xreg
+
+ # Add the experimental logging functionality, only used by zcip
+ lib-$(CONFIG_ZCIP) += logenv.o
++
++lib-$(CONFIG_DATE) += stime.o
++lib-$(CONFIG_RDATE) += stime.o
+diff -up busybox-1.31.1/libbb/stime.c.stime busybox-1.31.1/libbb/stime.c
+--- busybox-1.31.1/libbb/stime.c.stime 2019-11-13 17:07:06.905723262 -0500
++++ busybox-1.31.1/libbb/stime.c 2019-11-13 17:07:51.769924328 -0500
+@@ -0,0 +1,10 @@
++#include <time.h>
++#include <sys/time.h>
++
++int stime(const time_t *t) {
++ struct timeval tv;
++
++ tv.tv_sec = *t;
++ tv.tv_usec = 0;
++ return settimeofday(&tv, NULL);
++}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/busybox.git/commitdiff/7a6bf0ae12f6d1b441a01e0160eb9ff981e4cab7
More information about the pld-cvs-commit
mailing list