mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 07:51:59 -09:00
package/setserial: apply patches from setserial_2.17-45.3.diff.gz
Since64ac719952("apply-patches.sh: add recursivity when scanning patchdir"), patches with the .dpatch file extension are simply ignored. Unfortunately, setserial package stopped applying the patches after that commit. Sadly, 0002-tiocghayesesp-build-fix.patch is breaking the patch context for patch 18 in the debian diff because we are currently applying patches from within Buildroot tree before applying the ones we download from Debian. Instead of doing some hacks, let's apply Debian patches before Buildroot's. However, this requires a few changes. First, we need to migrate away from the SETSERIAL_PATCH mechanism because currently _PRE_PATCH_HOOKS runs before this is applied and _POST_PATCH_HOOKS runs after the Buildroot patches are applied. Instead, let's use an _EXTRA_DOWNLOADS we manually extract à-la package/android-tools/android-tools.mk. Then in the _PRE_PATCH_HOOKS, we apply the big diff the _EXTRA_DOWNLOADS contains so that the patches from within can be applied afterwards. Because the big diff still contains only patches with the *.dpatch extensions that are not supported anymore, we need to either rename all patches or use the 00list file that lists all patches in the order they need to be applied. Fortunately, Buildroot already supports applying patches with `patch` regardless of their extension if they are within such a file. Unfortunately, it needs to be called "series", hence the renaming. Because patch 18 from the big diff is now applied before 0002-tiocghayesesp-build-fix.patch from Buildroot tree, the latter will fail if left unmodified, so this commit also rebases it. Finally, we keep the removal of 01_makefile.dpatch for now even though it only exists because it generates a conflict with 0001-build-system-fix.patch from Buildroot tree. It'll be rebased in a later commit though. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit534147af94) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
72e9554f92
commit
761d5434c9
@@ -1067,7 +1067,6 @@ package/sentry-native/0001-sentry.h-include-ucontext.h.patch lib_patch.Upstream
|
||||
package/ser2net/S50ser2net Shellcheck lib_sysv.Indent lib_sysv.Variables
|
||||
package/setools/0001-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch lib_patch.Upstream
|
||||
package/setserial/0001-build-system-fix.patch lib_patch.Upstream
|
||||
package/setserial/0002-tiocghayesesp-build-fix.patch lib_patch.Upstream
|
||||
package/shadowsocks-libev/0001-configure.ac-use-pkg-config-to-find-netfilter_conntr.patch lib_patch.Upstream
|
||||
package/shadowsocks-libev/0002-fix-maybe-uninitialized-errors.patch lib_patch.Upstream
|
||||
package/shadowsocks-libev/0003-lib-Makefile.am-remove-static-from-LDFLAGS.patch lib_patch.Upstream
|
||||
|
||||
@@ -6,6 +6,9 @@ define the TIOCGHAYESESP ioctl, breaking the build.
|
||||
It's very unlikely to be of interest anymore, so just undef it.
|
||||
|
||||
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
|
||||
[rebased on top of Debian's setserial_2.17-45.3.diff]
|
||||
Upstream: N/A only for compatibility with Linux kernels [2.6.33;2.6.36[
|
||||
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
|
||||
---
|
||||
setserial.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
@@ -14,9 +17,9 @@ Index: setserial-2.17/setserial.c
|
||||
===================================================================
|
||||
--- setserial-2.17.orig/setserial.c
|
||||
+++ setserial-2.17/setserial.c
|
||||
@@ -24,6 +24,11 @@
|
||||
@@ -39,6 +39,11 @@
|
||||
#include "safety.h"
|
||||
#endif
|
||||
#include <linux/serial.h>
|
||||
|
||||
+/* linux/hayesesp.h got removed in 2.6.33 but some archs (like x86)
|
||||
+ still define TIOCGHAYESESP. It's very unlikely to be of interest
|
||||
|
||||
@@ -5,23 +5,41 @@
|
||||
################################################################################
|
||||
|
||||
SETSERIAL_VERSION = 2.17
|
||||
SETSERIAL_PATCH = setserial_2.17-45.3.diff.gz
|
||||
SETSERIAL_SOURCE = setserial_$(SETSERIAL_VERSION).orig.tar.gz
|
||||
SETSERIAL_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/s/setserial
|
||||
SETSERIAL_EXTRA_DOWNLOADS = setserial_2.17-45.3.diff.gz
|
||||
SETSERIAL_LICENSE = GPL-2.0
|
||||
SETSERIAL_LICENSE_FILES = debian/copyright
|
||||
# make all also builds setserial.cat which needs nroff
|
||||
SETSERIAL_MAKE_OPTS = setserial
|
||||
|
||||
# Extract the Debian tarball inside the sources
|
||||
define SETSERIAL_DEBIAN_EXTRACT
|
||||
$(call suitable-extractor,$(notdir $(SETSERIAL_EXTRA_DOWNLOADS))) \
|
||||
$(SETSERIAL_DL_DIR)/$(notdir $(SETSERIAL_EXTRA_DOWNLOADS)) > $(@D)/setserial_2.17-45.3.diff
|
||||
endef
|
||||
|
||||
SETSERIAL_POST_EXTRACT_HOOKS += SETSERIAL_DEBIAN_EXTRACT
|
||||
|
||||
define SETSERIAL_APPLY_DEBIAN_PATCHES
|
||||
# Touching gorhack.h is needed for the Debian patch 18 to work
|
||||
# - Applying diff gotten from SETSERIAL_EXTRA_DOWNLOADS
|
||||
# - Touching gorhack.h is needed for the Debian patch 18 to work
|
||||
# - Rename 00list which contains the list of patches to "series" so
|
||||
# Buildroot knows in which order the patches need to be applied. This
|
||||
# is necessary because their file extension is dpatch, which isn't
|
||||
# supported by the APPLY_PATCHES script outside of the series
|
||||
# mechanism.
|
||||
$(APPLY_PATCHES) $(@D) $(@D) setserial_2.17-45.3.diff
|
||||
|
||||
if [ -d $(@D)/debian/patches ]; then \
|
||||
touch $(@D)/gorhack.h; \
|
||||
rm $(@D)/debian/patches/01_makefile.dpatch; \
|
||||
$(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.dpatch; \
|
||||
mv $(@D)/debian/patches/00list $(@D)/debian/patches/series; \
|
||||
sed -i '/01_makefile.dpatch/d' $(@D)/debian/patches/series; \
|
||||
$(APPLY_PATCHES) $(@D) $(@D)/debian/patches series; \
|
||||
fi
|
||||
endef
|
||||
|
||||
SETSERIAL_POST_PATCH_HOOKS += SETSERIAL_APPLY_DEBIAN_PATCHES
|
||||
SETSERIAL_PRE_PATCH_HOOKS += SETSERIAL_APPLY_DEBIAN_PATCHES
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
Reference in New Issue
Block a user