Skip to contentSkip to conversation

QUILT helper

Buildroot Viallard Anthony 3 participants 5 messages Jan 18, 2013 – Feb 18, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

It will be nice having a quilt helper like openwrt has.

QUILT=1 make ofono

Et voil?, with this command, builroot use quilt to apply patches. So, if you need to edit a patch, you just go in the build dir, use quilt pop, quilt refresh, quilt push -a and use a new command to update the eddited patch :

make ofono-refresh

I known christmas was few days ago but if you include this idea, I will be happy like when santa claus gave me a SEGA master system.

Best regards,
avd.

Signature · 5 lines
.-------------------.-----------------------.-------------------.
| Viallard Anthony  | Syscom Instruments SA | Embedded System   |
| +41 024 455 24 82 | Rue de l'industrie 21 | Software Designer |
| ~~~~~~~~~~~~~~~~~ | 1450 Sainte-Croix     | ~~~~~~~~~~~~~~~~~ |
'-------------------^-----------------------^-------------------^
#1 lore raw
Quoted 11 lines · Viallard Anthony

Hi,

It will be nice having a quilt helper like openwrt has.

QUILT=1 make ofono

Et voil?, with this command, builroot use quilt to apply patches. So, if you need to edit a patch, you just go in the build dir, use quilt pop, quilt refresh, quilt push -a and use a new command to update the eddited patch :

Quoted 4 lines

make ofono-refresh

I known christmas was few days ago but if you include this idea, I will be happy like when santa claus gave me a SEGA master system.

I've been thinking about a feature to make it easier to create patches,
but I was thinking in terms of git rather than quilt.

None of the core buildroot developers uses quilt AFAIK, so don't expect
your wish to be granted out of nowhere. But I for one am definitely open to consider patches that make it easier to create package patches!

If you do contribute this feature, don't forget to include sufficient
documentation in the manual so someone who has no experience with quilt can get going right away.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw

Hello Anthony, hello Arnout,

Quoted 18 lines · On Saturday 19 January 2013 17:36:58 Arnout Vandecappelle wrote:
Quoted 10 lines · Viallard Anthony

Hi,

It will be nice having a quilt helper like openwrt has.

QUILT=1 make ofono

Et voil?, with this command, builroot use quilt to apply patches. So, if you need to edit a patch, you just go in the build dir, use quilt pop, quilt refresh, quilt push -a and use a new command to update the eddited

Quoted 5 lines

patch :
make ofono-refresh

I known christmas was few days ago but if you include this idea, I will be happy like when santa claus gave me a SEGA master system.

Quoted 6 lines

I've been thinking about a feature to make it easier to create patches,
but I was thinking in terms of git rather than quilt.

None of the core buildroot developers uses quilt AFAIK, so don't expect
your wish to be granted out of nowhere. But I for one am definitely open to consider patches that make it easier to create package patches!

[...]

A way to work with patches for a package is currently:
make $PKG-dirclean
make $PKG-extract
cd build/$PKG-$PKG_VERSION
git init
git add .
git rm --cached .stamp_*
git commit -m 'initial tarball'
git tag initial

After that, import all relevant patches using
git am $PATCH
or
git apply $PATCH
git commit -a -m "$PATCH"
depending of format of $PATCH

After that, you may create manually files .stamp_patched and .applied_patches_list

Use git rebase to edit each patch. Once you are satisfied, use
git format-patch initial

Copy your work in package/$PKG directory

IFAIK you may also use guilt on top of git. Guilt which have nearly same commands than quilt. Use "guilt push/pop/refresh" instead of rebase and "guilt export" instead of "git format-patch".

We could add an option to apply-patches.sh to automatically do first steps. We could do:
make $PKG-dirclean
make CREATE_GIT=1 $PKG-patch
cd build/$PKG-$PKG_VERSION
git rebase -i
git format-patch initial

And with guilt:
make $PKG-dirclean
make CREATE_GIT=1 $PKG-patch
cd build/$PKG-$PKG_VERSION
guilt push/pop/refresh
guilt export

What do you think about it?

Signature · 3 lines
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
#3 lore raw
Quoted 38 lines · J?r?me Pouiller

A way to work with patches for a package is currently:
make $PKG-dirclean
make $PKG-extract
cd build/$PKG-$PKG_VERSION
git init
git add .
git rm --cached .stamp_*
git commit -m 'initial tarball'
git tag initial

After that, import all relevant patches using
git am $PATCH
or
git apply $PATCH
git commit -a -m "$PATCH"
depending of format of $PATCH

After that, you may create manually files .stamp_patched and .applied_patches_list

Use git rebase to edit each patch. Once you are satisfied, use
git format-patch initial

Copy your work in package/$PKG directory

IFAIK you may also use guilt on top of git. Guilt which have nearly same commands than quilt. Use "guilt push/pop/refresh" instead of rebase and "guilt export" instead of "git format-patch".

We could add an option to apply-patches.sh to automatically do first steps. We could do:
make $PKG-dirclean
make CREATE_GIT=1 $PKG-patch
cd build/$PKG-$PKG_VERSION
git rebase -i
git format-patch initial

Quoted 9 lines

And with guilt:
make $PKG-dirclean
make CREATE_GIT=1 $PKG-patch
cd build/$PKG-$PKG_VERSION
guilt push/pop/refresh
guilt export

What do you think about it?

Hello J?r?me,

I think using QUILT directly will be the best. Because, we don't need git here. We just need a buildroot system to init quilt env, copy patches and when the job is done, copy the patches from quilt env to the package directory.

I want so much this feature ! I'm the only one here :) ?

I began to do some research about how openwrt do that and how we can do this in buildroot. But, I'm pretty busy and don't have time to do it now. If someone who know internal stuff in buildroot can tell where to do the modifications, it will be appreciable.

Cheers,
avd.

#4 lore raw
Quoted 6 lines · Viallard Anthony
Quoted 6 lines

We could add an option to apply-patches.sh to automatically do first steps. We
could do:
make $PKG-dirclean
make CREATE_GIT=1 $PKG-patch

I would make it something like 'make $PKG-prepare-patch'. That gives us
the possibility to later add a PATCH_BACKEND variable that can be set to git, hg or quilt (or something else).

Quoted 14 lines
Quoted 4 lines

cd build/$PKG-$PKG_VERSION
git rebase -i
git format-patch initial

Quoted 9 lines

And with guilt:
make $PKG-dirclean
make CREATE_GIT=1 $PKG-patch
cd build/$PKG-$PKG_VERSION
guilt push/pop/refresh
guilt export

What do you think about it?

Quoted 6 lines

Hello J?r?me,

I think using QUILT directly will be the best. Because, we don't need git here. We just need a buildroot system to init quilt env, copy patches and when the job is done, copy the patches from quilt env to the package directory.

I think more people (in particular, the buildroot developers) are
familiar with git (or hg) workflows than quilt workflows.

guilt combines the best features of git and quilt for this particular
purpose, I think (not that I ever used guilt :-). quilt has the disadvantage that you have to add a file before modifying it - this is solved by guilt. git has the disadvantage that it is easy to loose your orientation in the middle of a rebase (with edits) - that is also solved by guilt.

Quoted 1 line

I want so much this feature ! I'm the only one here :) ?

I'm also in favour of this feature. In fact, a long time ago I posted a
patch to add a script to do the reverse: create a patch series from a git repository.

Regards,
Arnout

Quoted 5 lines

I began to do some research about how openwrt do that and how we can do this in buildroot. But, I'm pretty busy and don't have time to do it now. If someone who know internal stuff in buildroot can tell where to do the modifications, it will be appreciable.

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F