Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory
@ 2024-06-26 16:49 Brandon Maier via buildroot
  2024-07-15  8:30 ` Arnout Vandecappelle via buildroot
  2024-07-22 23:49 ` Bryan Brattlof via buildroot
  0 siblings, 2 replies; 7+ messages in thread
From: Brandon Maier via buildroot @ 2024-06-26 16:49 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni, Romain Naour, Yann E. MORIN

From: Yegor Yefremov <yegorslists@googlemail.com>

This .gitignore file ignores all files in an output directory and
hence doesn't change the git status.

Remove "/output" entry from the main .gitignore file as it is already
handled by this general approach.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
This is a resend of the v1 of this patch from Yegor Yefremov, as the
original patch series seems to have stalled.

I'm not familiar with the process for resending someone else's patches,
so let me know if I should redo anything.

I find having the output folders gitignore'd is useful as some newer
tools like fd-find and ripgrep will automatically respect gitignore.
Otherwise the output directories are huge and quick searches can
suddenly take a long time if I have created a few.
---
Changes v2:
- create .gitignore only if $(O) is a subfolder of $(TOPDIR) (Yann E.
  MORIN)
- Link to v1: https://patchwork.ozlabs.org/project/buildroot/patch/20240206132051.2838897-1-yegorslists@googlemail.com/

Changes v3:
- also support nested subdirectories (Yann E. MORIN)
- Link to v2: https://patchwork.ozlabs.org/project/buildroot/patch/20240213143025.274988-1-yegorslists@googlemail.com/

Changes v4:
- Revert to v1 of code (Arnout Vandecappelle)
- Link to v3: https://patchwork.ozlabs.org/project/buildroot/patch/20240214071908.297656-1-yegorslists@googlemail.com/
---
 .gitignore | 1 -
 Makefile   | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index bb02d9f572..14b7ca5040 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-/output
 /dl
 /.auto.deps
 /.config.cmd
diff --git a/Makefile b/Makefile
index 138cfc5f8d..3d930d64a9 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,9 @@ ifneq ($(findstring @,$(CANONICAL_O)),)
 $(error The build directory can not contain a '@')
 endif
 
+# Create a default .gitignore file that ignores everything
+$(shell echo "*" > "$(CANONICAL_O)/.gitignore")
+
 CANONICAL_CURDIR = $(realpath $(CURDIR))
 
 REQ_UMASK = 0022

---
base-commit: 4f1b7d0ef00af527f6a5c1fcfd18ce204a7d78e8
change-id: 20240626-gitignore-output-new-5b47c23fde37

Best regards,
-- 
Brandon Maier <brandon.maier@collins.com>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory
  2024-06-26 16:49 [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory Brandon Maier via buildroot
@ 2024-07-15  8:30 ` Arnout Vandecappelle via buildroot
  2024-07-22 23:49 ` Bryan Brattlof via buildroot
  1 sibling, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-07-15  8:30 UTC (permalink / raw)
  To: Brandon Maier, buildroot; +Cc: Romain Naour, Yann E. MORIN, Thomas Petazzoni



On 26/06/2024 18:49, Brandon Maier wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> This .gitignore file ignores all files in an output directory and
> hence doesn't change the git status.
> 
> Remove "/output" entry from the main .gitignore file as it is already
> handled by this general approach.
> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>

  Applied to master, thanks.

> ---
> This is a resend of the v1 of this patch from Yegor Yefremov, as the
> original patch series seems to have stalled.
> 
> I'm not familiar with the process for resending someone else's patches,
> so let me know if I should redo anything.

  You did it perfectly!

  Regards,
  Arnout

> 
> I find having the output folders gitignore'd is useful as some newer
> tools like fd-find and ripgrep will automatically respect gitignore.
> Otherwise the output directories are huge and quick searches can
> suddenly take a long time if I have created a few.
> ---
> Changes v2:
> - create .gitignore only if $(O) is a subfolder of $(TOPDIR) (Yann E.
>    MORIN)
> - Link to v1: https://patchwork.ozlabs.org/project/buildroot/patch/20240206132051.2838897-1-yegorslists@googlemail.com/
> 
> Changes v3:
> - also support nested subdirectories (Yann E. MORIN)
> - Link to v2: https://patchwork.ozlabs.org/project/buildroot/patch/20240213143025.274988-1-yegorslists@googlemail.com/
> 
> Changes v4:
> - Revert to v1 of code (Arnout Vandecappelle)
> - Link to v3: https://patchwork.ozlabs.org/project/buildroot/patch/20240214071908.297656-1-yegorslists@googlemail.com/
> ---
>   .gitignore | 1 -
>   Makefile   | 3 +++
>   2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/.gitignore b/.gitignore
> index bb02d9f572..14b7ca5040 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1,4 +1,3 @@
> -/output
>   /dl
>   /.auto.deps
>   /.config.cmd
> diff --git a/Makefile b/Makefile
> index 138cfc5f8d..3d930d64a9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -63,6 +63,9 @@ ifneq ($(findstring @,$(CANONICAL_O)),)
>   $(error The build directory can not contain a '@')
>   endif
>   
> +# Create a default .gitignore file that ignores everything
> +$(shell echo "*" > "$(CANONICAL_O)/.gitignore")
> +
>   CANONICAL_CURDIR = $(realpath $(CURDIR))
>   
>   REQ_UMASK = 0022
> 
> ---
> base-commit: 4f1b7d0ef00af527f6a5c1fcfd18ce204a7d78e8
> change-id: 20240626-gitignore-output-new-5b47c23fde37
> 
> Best regards,
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory
  2024-06-26 16:49 [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory Brandon Maier via buildroot
  2024-07-15  8:30 ` Arnout Vandecappelle via buildroot
@ 2024-07-22 23:49 ` Bryan Brattlof via buildroot
  2024-07-23  8:08   ` Thomas Petazzoni via buildroot
                     ` (2 more replies)
  1 sibling, 3 replies; 7+ messages in thread
From: Bryan Brattlof via buildroot @ 2024-07-22 23:49 UTC (permalink / raw)
  To: Brandon Maier; +Cc: Romain Naour, Yann E. MORIN, Thomas Petazzoni, buildroot

Hello everyone!

On June 26, 2024 thus sayeth Brandon Maier via buildroot:
> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> This .gitignore file ignores all files in an output directory and
> hence doesn't change the git status.
> 
> Remove "/output" entry from the main .gitignore file as it is already
> handled by this general approach.
> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
> This is a resend of the v1 of this patch from Yegor Yefremov, as the
> original patch series seems to have stalled.
> 
> I'm not familiar with the process for resending someone else's patches,
> so let me know if I should redo anything.
> 
> I find having the output folders gitignore'd is useful as some newer
> tools like fd-find and ripgrep will automatically respect gitignore.
> Otherwise the output directories are huge and quick searches can
> suddenly take a long time if I have created a few.
> ---

For some odd reason this seems to have broken 
python-jsonschema-specifications in a fairly weird way that I'm not 
fully sure I understand. 

Somehow when downloading the source with this patch applied the build 
will succeed but it will never be installed in the host directory. 
Reverting this patch and deleting the package in the dl/ directory fixes 
everything. (at least for TI's reference boards)

I'll continue to look into this, just wanted to start the thread just in 
the off chance someone else is doing the same :)

~Bryan
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory
  2024-07-22 23:49 ` Bryan Brattlof via buildroot
@ 2024-07-23  8:08   ` Thomas Petazzoni via buildroot
  2024-07-23 10:23   ` Marcus Hoffmann via buildroot
  2024-07-24 21:26   ` Brandon Maier via buildroot
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-23  8:08 UTC (permalink / raw)
  To: Bryan Brattlof; +Cc: Romain Naour, Yann E. MORIN, Brandon Maier, buildroot

Hello,

On Mon, 22 Jul 2024 18:49:11 -0500
Bryan Brattlof <bb@ti.com> wrote:

> For some odd reason this seems to have broken 
> python-jsonschema-specifications in a fairly weird way that I'm not 
> fully sure I understand. 
> 
> Somehow when downloading the source with this patch applied the build 
> will succeed but it will never be installed in the host directory. 
> Reverting this patch and deleting the package in the dl/ directory fixes 
> everything. (at least for TI's reference boards)
> 
> I'll continue to look into this, just wanted to start the thread just in 
> the off chance someone else is doing the same :)

Interesting, thanks for the heads up on this. I don't know if I'll have
the time to look into this right now, but I can imagine that the
package is somehow using git, and the fact that a .gitignore file
exists breaks stuff?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory
  2024-07-22 23:49 ` Bryan Brattlof via buildroot
  2024-07-23  8:08   ` Thomas Petazzoni via buildroot
@ 2024-07-23 10:23   ` Marcus Hoffmann via buildroot
  2024-07-23 19:31     ` Bryan Brattlof via buildroot
  2024-07-24 21:26   ` Brandon Maier via buildroot
  2 siblings, 1 reply; 7+ messages in thread
From: Marcus Hoffmann via buildroot @ 2024-07-23 10:23 UTC (permalink / raw)
  To: Bryan Brattlof, Brandon Maier
  Cc: Romain Naour, Yann E. MORIN, Thomas Petazzoni, buildroot

Hi Bryan,

On 23.07.24 01:49, Bryan Brattlof via buildroot wrote:
> Hello everyone!
> 
> On June 26, 2024 thus sayeth Brandon Maier via buildroot:
>> From: Yegor Yefremov <yegorslists@googlemail.com>
>>
>> This .gitignore file ignores all files in an output directory and
>> hence doesn't change the git status.
>>
>> Remove "/output" entry from the main .gitignore file as it is already
>> handled by this general approach.
>>
>> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
>> ---
>> This is a resend of the v1 of this patch from Yegor Yefremov, as the
>> original patch series seems to have stalled.
>>
>> I'm not familiar with the process for resending someone else's patches,
>> so let me know if I should redo anything.
>>
>> I find having the output folders gitignore'd is useful as some newer
>> tools like fd-find and ripgrep will automatically respect gitignore.
>> Otherwise the output directories are huge and quick searches can
>> suddenly take a long time if I have created a few.
>> ---
> 
> For some odd reason this seems to have broken
> python-jsonschema-specifications in a fairly weird way that I'm not
> fully sure I understand.
> 
> Somehow when downloading the source with this patch applied the build
> will succeed but it will never be installed in the host directory.
> Reverting this patch and deleting the package in the dl/ directory fixes
> everything. (at least for TI's reference boards)
> 
> I'll continue to look into this, just wanted to start the thread just in
> the off chance someone else is doing the same :)

I just ran into the same problem now for pydantic-core, which pointed to 
https://github.com/PyO3/maturin/issues/1911

Is python-jsonschema-specifications also using the rust/maturin infra or 
is there a separate gitignore problem in another build tool?

Marcus

> 
> ~Bryan
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory
  2024-07-23 10:23   ` Marcus Hoffmann via buildroot
@ 2024-07-23 19:31     ` Bryan Brattlof via buildroot
  0 siblings, 0 replies; 7+ messages in thread
From: Bryan Brattlof via buildroot @ 2024-07-23 19:31 UTC (permalink / raw)
  To: Marcus Hoffmann
  Cc: Thomas Petazzoni, Romain Naour, Yann E. MORIN, Brandon Maier,
	buildroot

On July 23, 2024 thus sayeth Marcus Hoffmann:
> Hi Bryan,
> 
> On 23.07.24 01:49, Bryan Brattlof via buildroot wrote:
> > Hello everyone!
> > 
> > On June 26, 2024 thus sayeth Brandon Maier via buildroot:
> > > From: Yegor Yefremov <yegorslists@googlemail.com>
> > > 
> > > This .gitignore file ignores all files in an output directory and
> > > hence doesn't change the git status.
> > > 
> > > Remove "/output" entry from the main .gitignore file as it is already
> > > handled by this general approach.
> > > 
> > > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> > > Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> > > ---
> > > This is a resend of the v1 of this patch from Yegor Yefremov, as the
> > > original patch series seems to have stalled.
> > > 
> > > I'm not familiar with the process for resending someone else's patches,
> > > so let me know if I should redo anything.
> > > 
> > > I find having the output folders gitignore'd is useful as some newer
> > > tools like fd-find and ripgrep will automatically respect gitignore.
> > > Otherwise the output directories are huge and quick searches can
> > > suddenly take a long time if I have created a few.
> > > ---
> > 
> > For some odd reason this seems to have broken
> > python-jsonschema-specifications in a fairly weird way that I'm not
> > fully sure I understand.
> > 
> > Somehow when downloading the source with this patch applied the build
> > will succeed but it will never be installed in the host directory.
> > Reverting this patch and deleting the package in the dl/ directory fixes
> > everything. (at least for TI's reference boards)
> > 
> > I'll continue to look into this, just wanted to start the thread just in
> > the off chance someone else is doing the same :)
> 
> I just ran into the same problem now for pydantic-core, which pointed to
> https://github.com/PyO3/maturin/issues/1911
> 
> Is python-jsonschema-specifications also using the rust/maturin infra or is
> there a separate gitignore problem in another build tool?
> 

Ah nice find! It's using hatch which I think wraps maturin. I'll play 
around with this and see if I can come up with a patch. 

Thank you

> Marcus
> 
> > 
> > ~Bryan
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory
  2024-07-22 23:49 ` Bryan Brattlof via buildroot
  2024-07-23  8:08   ` Thomas Petazzoni via buildroot
  2024-07-23 10:23   ` Marcus Hoffmann via buildroot
@ 2024-07-24 21:26   ` Brandon Maier via buildroot
  2 siblings, 0 replies; 7+ messages in thread
From: Brandon Maier via buildroot @ 2024-07-24 21:26 UTC (permalink / raw)
  To: Bryan Brattlof; +Cc: Romain Naour, Yann E. MORIN, Thomas Petazzoni, buildroot

Hi Bryan,

On Mon Jul 22, 2024 at 11:49 PM UTC, Bryan Brattlof via buildroot wrote:
> Hello everyone!
>
> On June 26, 2024 thus sayeth Brandon Maier via buildroot:
> > From: Yegor Yefremov <yegorslists@googlemail.com>
> >
> > This .gitignore file ignores all files in an output directory and
> > hence doesn't change the git status.
> >
> > Remove "/output" entry from the main .gitignore file as it is already
> > handled by this general approach.
> >
> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> > Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> > ---
> > This is a resend of the v1 of this patch from Yegor Yefremov, as the
> > original patch series seems to have stalled.
> >
> > I'm not familiar with the process for resending someone else's patches,
> > so let me know if I should redo anything.
> >
> > I find having the output folders gitignore'd is useful as some newer
> > tools like fd-find and ripgrep will automatically respect gitignore.
> > Otherwise the output directories are huge and quick searches can
> > suddenly take a long time if I have created a few.
> > ---
>
> For some odd reason this seems to have broken
> python-jsonschema-specifications in a fairly weird way that I'm not
> fully sure I understand.
>
> Somehow when downloading the source with this patch applied the build
> will succeed but it will never be installed in the host directory.
> Reverting this patch and deleting the package in the dl/ directory fixes
> everything. (at least for TI's reference boards)
>
> I'll continue to look into this, just wanted to start the thread just in
> the off chance someone else is doing the same :)

Thanks for spotting this. I did some test builds locally and can
reproduce the issue.

I tried various different gitignore patterns, but haven't found one that
unbreaks python-jsonschema-specifications. To get this package back to a
working state I sent a new patch to revert the gitignore change.

Thanks!
Brandon

>
> ~Bryan
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-07-24 21:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26 16:49 [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory Brandon Maier via buildroot
2024-07-15  8:30 ` Arnout Vandecappelle via buildroot
2024-07-22 23:49 ` Bryan Brattlof via buildroot
2024-07-23  8:08   ` Thomas Petazzoni via buildroot
2024-07-23 10:23   ` Marcus Hoffmann via buildroot
2024-07-23 19:31     ` Bryan Brattlof via buildroot
2024-07-24 21:26   ` Brandon Maier via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox