Re: [PATCH] Provide packaging rules in eglibc-source
Dnia 2011-03-11, pią o godzinie 22:29 +0100, Aurelien Jarno pisze:
> On Fri, Mar 11, 2011 at 06:23:23PM +0100, Marcin Juszkiewicz wrote:
> diff --git a/debian/rules.d/build.mk b/debian/rules.d/build.mk
> > index ae5678d..092a892 100644
> > --- a/debian/rules.d/build.mk
> > +++ b/debian/rules.d/build.mk
> > @@ -172,6 +172,16 @@ $(stamp)source: $(stamp)patch
> > tar -c -J -C .. \
> > -f $(build-tree)/eglibc-$(EGLIBC_VERSION).tar.xz \
> > $(EGLIBC_SOURCES)
> > + mkdir -p debian/eglibc-source/usr/src/glibc
> > + tar cf - \
> > + debian/{README*,TODO,changelog*,compat,control,copyright} \
> > + debian/{debver2localesdep.pl,generate-supported.mk,locales-depver} \
> > + debian/{*.symbols.*,symbols.wildcards} \
> > + debian/{quiltrc,rules,shlibs-add-udebs,shlibver,watch} \
> > + debian/{bug,control.in,debhelper.in,local,patches,po,rules.d} \
> > + debian/{script.in,source,sysdeps,testsuite-checking,wrapper} \
> > + | tar -x -C debian/eglibc-source/usr/src/glibc -f -
> > +
> > touch $@
>
> This basically the whole debian/ directory into eglibc-source, including
> patches. However the tarball provided in eglibc-source contains already
> patched source, so I don't really understand how it works.
And this is where next patch (attached) gets into play. It adds
PATCHED_SOURCES variable which is checked in "patch" step and if set to
"yes" then patches are not applied again.
Code which uses this technique is here: http://42.pl/u/2zuN
>From f78d8e220d6daf53188e89c3aefa73640498fd55 Mon Sep 17 00:00:00 2001
From: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Date: Thu, 3 Feb 2011 15:43:15 +0100
Subject: [PATCH] Do not patch sources when PATCHED_SOURCES=yes is given
This patch is backport from Ubuntu where it got included in eglibc
2.12.1-0ubuntu1 package - LP: 612631
During build of eglibc there are several patches applied. Then eglibc-source
binary package is created - with patches sources and patches as separate files.
The problem appears when I try to cross build eglibc using data from
eglibc-source package - it fails on patching...
---
rules.d/quilt.mk | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/debian/rules.d/quilt.mk b/debian/rules.d/quilt.mk
index 1c93a66..3f12379 100644
--- a/debian/rules.d/quilt.mk
+++ b/debian/rules.d/quilt.mk
@@ -9,6 +9,7 @@ QUILT = quilt $(QUILTOPT)
patch: $(stamp)patch
$(stamp)patch:
+ifneq ($(PATCHED_SOURCES),yes)
@if $(QUILT) next >/dev/null 2>&1; then \
echo "Applying patches... "; \
$(QUILT) push -a -v ; \
@@ -23,6 +24,7 @@ $(stamp)patch:
QUILT_PC="$$pc" $(QUILT) push -a -v ; \
fi ; \
fi
+endif
touch $@
unpatch:
--
1.7.2.3
Reply to: