* distclean removing LICENSES .gitignores @ 2019-05-12 22:17 Geordan Neukum 2019-05-13 15:05 ` Ahmad Fatoum 0 siblings, 1 reply; 14+ messages in thread From: Geordan Neukum @ 2019-05-12 22:17 UTC (permalink / raw) To: barebox When on the master branch, I noticed that running a "make distclean" will remove: - LICENSES/exceptions/.gitignore - LICENSES/other/.gitignore It looks like this is due to matching the pattern '-o size 0' in the top-level barebox makefile under the distclean target. Is this the desired behavior? If not, I can go ahead and submit a patch that cleans up that target. Thanks, Geordan _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: distclean removing LICENSES .gitignores 2019-05-12 22:17 distclean removing LICENSES .gitignores Geordan Neukum @ 2019-05-13 15:05 ` Ahmad Fatoum 2019-05-14 2:19 ` [PATCH] LICENSES: modify .gitignore files to be nonempty Geordan Neukum ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Ahmad Fatoum @ 2019-05-13 15:05 UTC (permalink / raw) To: barebox Hello Geordan, On 13/5/19 00:17, Geordan Neukum wrote: > When on the master branch, I noticed that running a "make distclean" > will remove: > > - LICENSES/exceptions/.gitignore > > - LICENSES/other/.gitignore > > > It looks like this is due to matching the pattern '-o size 0' in the > top-level barebox makefile under the distclean target. > > Is this the desired behavior? Nope, this behavior isn't desired. I added the files, to have git index the directories. IIRC, otherwise kernel checkpatch.pl laments their absence. Maybe we should add a comment describing the purpose and then these files aren't totally empty? > If not, I can go ahead and submit a > patch that cleans up that target. Please go ahead. Cheers Ahmad > > Thanks, > Geordan > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] LICENSES: modify .gitignore files to be nonempty 2019-05-13 15:05 ` Ahmad Fatoum @ 2019-05-14 2:19 ` Geordan Neukum 2019-05-14 7:28 ` Ian Abbott 2019-05-14 8:35 ` Uwe Kleine-König 2019-05-15 7:44 ` distclean removing LICENSES .gitignores Sascha Hauer 2019-05-16 3:53 ` Masahiro Yamada 2 siblings, 2 replies; 14+ messages in thread From: Geordan Neukum @ 2019-05-14 2:19 UTC (permalink / raw) To: barebox; +Cc: Geordan Neukum, a.fatoum The .gitignore files under the LICENSES/exceptions and LICENSES/other directories cannot have a size of 0 or else they are subject to removal by the make target 'distclean'. Modify the .gitignore files to ignore all files except for themselves. These .gitignores can be updated further or removed outright as new licenses are added to these directories in the future. Signed-off-by: Geordan Neukum <gneukum1@gmail.com> --- LICENSES/exceptions/.gitignore | 4 ++++ LICENSES/other/.gitignore | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore index e69de29bb..d5e7eacf3 100644 --- a/LICENSES/exceptions/.gitignore +++ b/LICENSES/exceptions/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except for this file +!.gitignore diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore index e69de29bb..d5e7eacf3 100644 --- a/LICENSES/other/.gitignore +++ b/LICENSES/other/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except for this file +!.gitignore -- 2.21.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LICENSES: modify .gitignore files to be nonempty 2019-05-14 2:19 ` [PATCH] LICENSES: modify .gitignore files to be nonempty Geordan Neukum @ 2019-05-14 7:28 ` Ian Abbott 2019-05-14 8:28 ` Ahmad Fatoum 2019-05-14 8:35 ` Uwe Kleine-König 1 sibling, 1 reply; 14+ messages in thread From: Ian Abbott @ 2019-05-14 7:28 UTC (permalink / raw) To: Geordan Neukum, barebox; +Cc: a.fatoum On 14/05/2019 03:19, Geordan Neukum wrote: > The .gitignore files under the LICENSES/exceptions and LICENSES/other > directories cannot have a size of 0 or else they are subject to removal > by the make target 'distclean'. Modify the .gitignore files to > ignore all files except for themselves. These .gitignores can be > updated further or removed outright as new licenses are added to these > directories in the future. > > Signed-off-by: Geordan Neukum <gneukum1@gmail.com> > --- > LICENSES/exceptions/.gitignore | 4 ++++ > LICENSES/other/.gitignore | 4 ++++ > 2 files changed, 8 insertions(+) > > diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore > index e69de29bb..d5e7eacf3 100644 > --- a/LICENSES/exceptions/.gitignore > +++ b/LICENSES/exceptions/.gitignore > @@ -0,0 +1,4 @@ > +# Ignore everything in this directory > +* > +# Except for this file > +!.gitignore > diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore > index e69de29bb..d5e7eacf3 100644 > --- a/LICENSES/other/.gitignore > +++ b/LICENSES/other/.gitignore > @@ -0,0 +1,4 @@ > +# Ignore everything in this directory > +* > +# Except for this file > +!.gitignore > I may be missing something, but why not have just a comment line? -- -=( Ian Abbott <abbotti@mev.co.uk> || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address: )=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=- _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LICENSES: modify .gitignore files to be nonempty 2019-05-14 7:28 ` Ian Abbott @ 2019-05-14 8:28 ` Ahmad Fatoum 2019-05-14 12:51 ` Ian Abbott 0 siblings, 1 reply; 14+ messages in thread From: Ahmad Fatoum @ 2019-05-14 8:28 UTC (permalink / raw) To: Ian Abbott, Geordan Neukum, barebox On 14/5/19 09:28, Ian Abbott wrote: > On 14/05/2019 03:19, Geordan Neukum wrote: >> The .gitignore files under the LICENSES/exceptions and LICENSES/other >> directories cannot have a size of 0 or else they are subject to removal >> by the make target 'distclean'. Modify the .gitignore files to >> ignore all files except for themselves. These .gitignores can be >> updated further or removed outright as new licenses are added to these >> directories in the future. >> >> Signed-off-by: Geordan Neukum <gneukum1@gmail.com> >> --- >> LICENSES/exceptions/.gitignore | 4 ++++ >> LICENSES/other/.gitignore | 4 ++++ >> 2 files changed, 8 insertions(+) >> >> diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore >> index e69de29bb..d5e7eacf3 100644 >> --- a/LICENSES/exceptions/.gitignore >> +++ b/LICENSES/exceptions/.gitignore >> @@ -0,0 +1,4 @@ >> +# Ignore everything in this directory >> +* >> +# Except for this file >> +!.gitignore >> diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore >> index e69de29bb..d5e7eacf3 100644 >> --- a/LICENSES/other/.gitignore >> +++ b/LICENSES/other/.gitignore >> @@ -0,0 +1,4 @@ >> +# Ignore everything in this directory >> +* >> +# Except for this file >> +!.gitignore >> > > I may be missing something, but why not have just a comment line? > One side effect of doing it this way, that it's more likely to remind, whoever `git add`s files to these directories that the .gitignore needs to be removed (unless they have aliased git add to git add -f..). Personally, I am fine with both ways, but I would prefer the comment to say something along the lines of: # Placeholder as upstream checkpatch.pl requires this directory to exist # This file can be removed when new files are added Cheers Ahmad -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LICENSES: modify .gitignore files to be nonempty 2019-05-14 8:28 ` Ahmad Fatoum @ 2019-05-14 12:51 ` Ian Abbott 2019-05-15 0:45 ` [PATCH v2] " Geordan Neukum 2019-05-15 0:56 ` [PATCH] " Geordan Neukum 0 siblings, 2 replies; 14+ messages in thread From: Ian Abbott @ 2019-05-14 12:51 UTC (permalink / raw) To: Ahmad Fatoum, Geordan Neukum, barebox On 14/05/2019 09:28, Ahmad Fatoum wrote: > On 14/5/19 09:28, Ian Abbott wrote: >> On 14/05/2019 03:19, Geordan Neukum wrote: >>> The .gitignore files under the LICENSES/exceptions and LICENSES/other >>> directories cannot have a size of 0 or else they are subject to removal >>> by the make target 'distclean'. Modify the .gitignore files to >>> ignore all files except for themselves. These .gitignores can be >>> updated further or removed outright as new licenses are added to these >>> directories in the future. >>> >>> Signed-off-by: Geordan Neukum <gneukum1@gmail.com> >>> --- >>> LICENSES/exceptions/.gitignore | 4 ++++ >>> LICENSES/other/.gitignore | 4 ++++ >>> 2 files changed, 8 insertions(+) >>> >>> diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore >>> index e69de29bb..d5e7eacf3 100644 >>> --- a/LICENSES/exceptions/.gitignore >>> +++ b/LICENSES/exceptions/.gitignore >>> @@ -0,0 +1,4 @@ >>> +# Ignore everything in this directory >>> +* >>> +# Except for this file >>> +!.gitignore >>> diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore >>> index e69de29bb..d5e7eacf3 100644 >>> --- a/LICENSES/other/.gitignore >>> +++ b/LICENSES/other/.gitignore >>> @@ -0,0 +1,4 @@ >>> +# Ignore everything in this directory >>> +* >>> +# Except for this file >>> +!.gitignore >>> >> >> I may be missing something, but why not have just a comment line? >> > > One side effect of doing it this way, that it's more likely to remind, > whoever `git add`s files to these directories that the .gitignore needs to > be removed (unless they have aliased git add to git add -f..). It may confuse some people for a while, until they figure out what is preventing them from adding their file to git. > Personally, I am fine with both ways, but I would prefer the comment > to say something along the lines of: > > # Placeholder as upstream checkpatch.pl requires this directory to exist > # This file can be removed when new files are added If the .gitignore is currently only needed as a placeholder to avoid the directory being empty, it could be a file that git does not care about at all. Common names for such a file seem to include '.keep' and '.gitkeep'. -- -=( Ian Abbott <abbotti@mev.co.uk> || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address: )=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=- _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] LICENSES: modify .gitignore files to be nonempty 2019-05-14 12:51 ` Ian Abbott @ 2019-05-15 0:45 ` Geordan Neukum 2019-05-15 8:54 ` Ahmad Fatoum 2019-05-15 0:56 ` [PATCH] " Geordan Neukum 1 sibling, 1 reply; 14+ messages in thread From: Geordan Neukum @ 2019-05-15 0:45 UTC (permalink / raw) To: barebox; +Cc: Ian Abbott, Ahmad Fatoum, u.kleine-koenig > If the .gitignore is currently only needed as a placeholder to avoid the > directory being empty, it could be a file that git does not care about > at all. Common names for such a file seem to include '.keep' and > '.gitkeep'. Fair enough. As Ahmad suggested earlier, I was attempting to force a cleanup of this file in the future as the new licenses are added. If we feel strongly enough against using a .gitignore for this purpose, I would be happy to resubmit the patch using another strategy. A README may also suffice as a visible reminder that this is only intended to be a temporary workaround. Best, Geordan On Tue, May 14, 2019 at 12:51 PM Ian Abbott <abbotti@mev.co.uk> wrote: > > On 14/05/2019 09:28, Ahmad Fatoum wrote: > > On 14/5/19 09:28, Ian Abbott wrote: > >> On 14/05/2019 03:19, Geordan Neukum wrote: > >>> The .gitignore files under the LICENSES/exceptions and LICENSES/other > >>> directories cannot have a size of 0 or else they are subject to removal > >>> by the make target 'distclean'. Modify the .gitignore files to > >>> ignore all files except for themselves. These .gitignores can be > >>> updated further or removed outright as new licenses are added to these > >>> directories in the future. > >>> > >>> Signed-off-by: Geordan Neukum <gneukum1@gmail.com> > >>> --- > >>> LICENSES/exceptions/.gitignore | 4 ++++ > >>> LICENSES/other/.gitignore | 4 ++++ > >>> 2 files changed, 8 insertions(+) > >>> > >>> diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore > >>> index e69de29bb..d5e7eacf3 100644 > >>> --- a/LICENSES/exceptions/.gitignore > >>> +++ b/LICENSES/exceptions/.gitignore > >>> @@ -0,0 +1,4 @@ > >>> +# Ignore everything in this directory > >>> +* > >>> +# Except for this file > >>> +!.gitignore > >>> diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore > >>> index e69de29bb..d5e7eacf3 100644 > >>> --- a/LICENSES/other/.gitignore > >>> +++ b/LICENSES/other/.gitignore > >>> @@ -0,0 +1,4 @@ > >>> +# Ignore everything in this directory > >>> +* > >>> +# Except for this file > >>> +!.gitignore > >>> > >> > >> I may be missing something, but why not have just a comment line? > >> > > > > One side effect of doing it this way, that it's more likely to remind, > > whoever `git add`s files to these directories that the .gitignore needs to > > be removed (unless they have aliased git add to git add -f..). > > It may confuse some people for a while, until they figure out what is > preventing them from adding their file to git. > > > Personally, I am fine with both ways, but I would prefer the comment > > to say something along the lines of: > > > > # Placeholder as upstream checkpatch.pl requires this directory to exist > > # This file can be removed when new files are added > > If the .gitignore is currently only needed as a placeholder to avoid the > directory being empty, it could be a file that git does not care about > at all. Common names for such a file seem to include '.keep' and > '.gitkeep'. > > -- > -=( Ian Abbott <abbotti@mev.co.uk> || Web: www.mev.co.uk )=- > -=( MEV Ltd. is a company registered in England & Wales. )=- > -=( Registered number: 02862268. Registered address: )=- > -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=- _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] LICENSES: modify .gitignore files to be nonempty 2019-05-15 0:45 ` [PATCH v2] " Geordan Neukum @ 2019-05-15 8:54 ` Ahmad Fatoum 0 siblings, 0 replies; 14+ messages in thread From: Ahmad Fatoum @ 2019-05-15 8:54 UTC (permalink / raw) To: Geordan Neukum, barebox; +Cc: Ian Abbott, u.kleine-koenig Hello Geordan, On 15/5/19 02:45, Geordan Neukum wrote: >> If the .gitignore is currently only needed as a placeholder to avoid the >> directory being empty, it could be a file that git does not care about >> at all. Common names for such a file seem to include '.keep' and >> '.gitkeep'. > > Fair enough. As Ahmad suggested earlier, I was attempting to force a > cleanup of this file in the future as the new licenses are added. If we > feel strongly enough against using a .gitignore for this purpose, I would > be happy to resubmit the patch using another strategy. A README may also > suffice as a visible reminder that this is only intended to be a temporary > workaround. I now think we should just delete these directories. We already patch checkpatch.pl, so why not patch spdxcheck.py as well and be done with it.. I will send out a patc hset for removing the directories along with a checkpatch.pl update shortly. Thanks for raising the issue. Cheers Ahmad > > Best, > Geordan > > On Tue, May 14, 2019 at 12:51 PM Ian Abbott <abbotti@mev.co.uk> wrote: >> >> On 14/05/2019 09:28, Ahmad Fatoum wrote: >>> On 14/5/19 09:28, Ian Abbott wrote: >>>> On 14/05/2019 03:19, Geordan Neukum wrote: >>>>> The .gitignore files under the LICENSES/exceptions and LICENSES/other >>>>> directories cannot have a size of 0 or else they are subject to removal >>>>> by the make target 'distclean'. Modify the .gitignore files to >>>>> ignore all files except for themselves. These .gitignores can be >>>>> updated further or removed outright as new licenses are added to these >>>>> directories in the future. >>>>> >>>>> Signed-off-by: Geordan Neukum <gneukum1@gmail.com> >>>>> --- >>>>> LICENSES/exceptions/.gitignore | 4 ++++ >>>>> LICENSES/other/.gitignore | 4 ++++ >>>>> 2 files changed, 8 insertions(+) >>>>> >>>>> diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore >>>>> index e69de29bb..d5e7eacf3 100644 >>>>> --- a/LICENSES/exceptions/.gitignore >>>>> +++ b/LICENSES/exceptions/.gitignore >>>>> @@ -0,0 +1,4 @@ >>>>> +# Ignore everything in this directory >>>>> +* >>>>> +# Except for this file >>>>> +!.gitignore >>>>> diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore >>>>> index e69de29bb..d5e7eacf3 100644 >>>>> --- a/LICENSES/other/.gitignore >>>>> +++ b/LICENSES/other/.gitignore >>>>> @@ -0,0 +1,4 @@ >>>>> +# Ignore everything in this directory >>>>> +* >>>>> +# Except for this file >>>>> +!.gitignore >>>>> >>>> >>>> I may be missing something, but why not have just a comment line? >>>> >>> >>> One side effect of doing it this way, that it's more likely to remind, >>> whoever `git add`s files to these directories that the .gitignore needs to >>> be removed (unless they have aliased git add to git add -f..). >> >> It may confuse some people for a while, until they figure out what is >> preventing them from adding their file to git. >> >>> Personally, I am fine with both ways, but I would prefer the comment >>> to say something along the lines of: >>> >>> # Placeholder as upstream checkpatch.pl requires this directory to exist >>> # This file can be removed when new files are added >> >> If the .gitignore is currently only needed as a placeholder to avoid the >> directory being empty, it could be a file that git does not care about >> at all. Common names for such a file seem to include '.keep' and >> '.gitkeep'. >> >> -- >> -=( Ian Abbott <abbotti@mev.co.uk> || Web: www.mev.co.uk )=- >> -=( MEV Ltd. is a company registered in England & Wales. )=- >> -=( Registered number: 02862268. Registered address: )=- >> -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=- > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LICENSES: modify .gitignore files to be nonempty 2019-05-14 12:51 ` Ian Abbott 2019-05-15 0:45 ` [PATCH v2] " Geordan Neukum @ 2019-05-15 0:56 ` Geordan Neukum 1 sibling, 0 replies; 14+ messages in thread From: Geordan Neukum @ 2019-05-15 0:56 UTC (permalink / raw) To: Ian Abbott, barebox, Ahmad Fatoum > If the .gitignore is currently only needed as a placeholder to avoid the > directory being empty, it could be a file that git does not care about > at all. Common names for such a file seem to include '.keep' and > '.gitkeep'. Fair enough. As Ahmad suggested earlier, I was attempting to force a cleanup of this file in the future as the new licenses are added. If we feel strongly enough against using a .gitignore for this purpose, I would be happy to resubmit the patch using another strategy. A README may also suffice as a visible reminder that this is only intended to be a temporary workaround. Best, Geordan On Tue, May 14, 2019 at 12:51 PM Ian Abbott <abbotti@mev.co.uk> wrote: > > On 14/05/2019 09:28, Ahmad Fatoum wrote: > > On 14/5/19 09:28, Ian Abbott wrote: > >> On 14/05/2019 03:19, Geordan Neukum wrote: > >>> The .gitignore files under the LICENSES/exceptions and LICENSES/other > >>> directories cannot have a size of 0 or else they are subject to removal > >>> by the make target 'distclean'. Modify the .gitignore files to > >>> ignore all files except for themselves. These .gitignores can be > >>> updated further or removed outright as new licenses are added to these > >>> directories in the future. > >>> > >>> Signed-off-by: Geordan Neukum <gneukum1@gmail.com> > >>> --- > >>> LICENSES/exceptions/.gitignore | 4 ++++ > >>> LICENSES/other/.gitignore | 4 ++++ > >>> 2 files changed, 8 insertions(+) > >>> > >>> diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore > >>> index e69de29bb..d5e7eacf3 100644 > >>> --- a/LICENSES/exceptions/.gitignore > >>> +++ b/LICENSES/exceptions/.gitignore > >>> @@ -0,0 +1,4 @@ > >>> +# Ignore everything in this directory > >>> +* > >>> +# Except for this file > >>> +!.gitignore > >>> diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore > >>> index e69de29bb..d5e7eacf3 100644 > >>> --- a/LICENSES/other/.gitignore > >>> +++ b/LICENSES/other/.gitignore > >>> @@ -0,0 +1,4 @@ > >>> +# Ignore everything in this directory > >>> +* > >>> +# Except for this file > >>> +!.gitignore > >>> > >> > >> I may be missing something, but why not have just a comment line? > >> > > > > One side effect of doing it this way, that it's more likely to remind, > > whoever `git add`s files to these directories that the .gitignore needs to > > be removed (unless they have aliased git add to git add -f..). > > It may confuse some people for a while, until they figure out what is > preventing them from adding their file to git. > > > Personally, I am fine with both ways, but I would prefer the comment > > to say something along the lines of: > > > > # Placeholder as upstream checkpatch.pl requires this directory to exist > > # This file can be removed when new files are added > > If the .gitignore is currently only needed as a placeholder to avoid the > directory being empty, it could be a file that git does not care about > at all. Common names for such a file seem to include '.keep' and > '.gitkeep'. > > -- > -=( Ian Abbott <abbotti@mev.co.uk> || Web: www.mev.co.uk )=- > -=( MEV Ltd. is a company registered in England & Wales. )=- > -=( Registered number: 02862268. Registered address: )=- > -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=- _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LICENSES: modify .gitignore files to be nonempty 2019-05-14 2:19 ` [PATCH] LICENSES: modify .gitignore files to be nonempty Geordan Neukum 2019-05-14 7:28 ` Ian Abbott @ 2019-05-14 8:35 ` Uwe Kleine-König 2019-05-14 10:37 ` [PATCH v2] " Geordan Neukum 1 sibling, 1 reply; 14+ messages in thread From: Uwe Kleine-König @ 2019-05-14 8:35 UTC (permalink / raw) To: Geordan Neukum; +Cc: barebox, a.fatoum On Tue, May 14, 2019 at 02:19:54AM +0000, Geordan Neukum wrote: > The .gitignore files under the LICENSES/exceptions and LICENSES/other > directories cannot have a size of 0 or else they are subject to removal > by the make target 'distclean'. Modify the .gitignore files to > ignore all files except for themselves. These .gitignores can be > updated further or removed outright as new licenses are added to these > directories in the future. > > Signed-off-by: Geordan Neukum <gneukum1@gmail.com> > --- > LICENSES/exceptions/.gitignore | 4 ++++ > LICENSES/other/.gitignore | 4 ++++ > 2 files changed, 8 insertions(+) > > diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore > index e69de29bb..d5e7eacf3 100644 > --- a/LICENSES/exceptions/.gitignore > +++ b/LICENSES/exceptions/.gitignore > @@ -0,0 +1,4 @@ > +# Ignore everything in this directory > +* > +# Except for this file > +!.gitignore > diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore > index e69de29bb..d5e7eacf3 100644 > --- a/LICENSES/other/.gitignore > +++ b/LICENSES/other/.gitignore > @@ -0,0 +1,4 @@ > +# Ignore everything in this directory > +* If you would add an empty line here, it would be harder to read the * in the previous line as # which happend to me and made me misunderstand this patch. > +# Except for this file > +!.gitignore Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2] LICENSES: modify .gitignore files to be nonempty 2019-05-14 8:35 ` Uwe Kleine-König @ 2019-05-14 10:37 ` Geordan Neukum 2019-05-14 11:00 ` Ahmad Fatoum 0 siblings, 1 reply; 14+ messages in thread From: Geordan Neukum @ 2019-05-14 10:37 UTC (permalink / raw) To: barebox; +Cc: abbotti, a.fatoum, Geordan Neukum, u.kleine-koenig The .gitignore files under the LICENSES/exceptions and LICENSES/other directories cannot have a size of 0 or else they are subject to removal by the make target 'distclean'. Modify the .gitignore files to ignore all files except for themselves. This shall serve as a reminder that these .gitignores can and should be removed when new licenses are added. Signed-off-by: Geordan Neukum <gneukum1@gmail.com> --- Changes in v2: - Added whitespace for readability's sake - Modified comment to specify intent more clearly LICENSES/exceptions/.gitignore | 8 ++++++++ LICENSES/other/.gitignore | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore index e69de29bb..7323b9e1a 100644 --- a/LICENSES/exceptions/.gitignore +++ b/LICENSES/exceptions/.gitignore @@ -0,0 +1,8 @@ +# Placeholder as upstream checkpatch.pl requires this directory to exist +# This file can be removed when new files are added + +# Ignore everything in this directory +* + +# Except for this file +!.gitignore diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore index e69de29bb..7323b9e1a 100644 --- a/LICENSES/other/.gitignore +++ b/LICENSES/other/.gitignore @@ -0,0 +1,8 @@ +# Placeholder as upstream checkpatch.pl requires this directory to exist +# This file can be removed when new files are added + +# Ignore everything in this directory +* + +# Except for this file +!.gitignore -- 2.21.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] LICENSES: modify .gitignore files to be nonempty 2019-05-14 10:37 ` [PATCH v2] " Geordan Neukum @ 2019-05-14 11:00 ` Ahmad Fatoum 0 siblings, 0 replies; 14+ messages in thread From: Ahmad Fatoum @ 2019-05-14 11:00 UTC (permalink / raw) To: Geordan Neukum, barebox; +Cc: abbotti, u.kleine-koenig On 14/5/19 12:37, Geordan Neukum wrote: > The .gitignore files under the LICENSES/exceptions and LICENSES/other > directories cannot have a size of 0 or else they are subject to removal > by the make target 'distclean'. Modify the .gitignore files to > ignore all files except for themselves. This shall serve as a reminder > that these .gitignores can and should be removed when new licenses are > added. > > Signed-off-by: Geordan Neukum <gneukum1@gmail.com> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> > --- > Changes in v2: > - Added whitespace for readability's sake > - Modified comment to specify intent more clearly > > LICENSES/exceptions/.gitignore | 8 ++++++++ > LICENSES/other/.gitignore | 8 ++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore > index e69de29bb..7323b9e1a 100644 > --- a/LICENSES/exceptions/.gitignore > +++ b/LICENSES/exceptions/.gitignore > @@ -0,0 +1,8 @@ > +# Placeholder as upstream checkpatch.pl requires this directory to exist > +# This file can be removed when new files are added > + > +# Ignore everything in this directory > +* > + > +# Except for this file > +!.gitignore > diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore > index e69de29bb..7323b9e1a 100644 > --- a/LICENSES/other/.gitignore > +++ b/LICENSES/other/.gitignore > @@ -0,0 +1,8 @@ > +# Placeholder as upstream checkpatch.pl requires this directory to exist > +# This file can be removed when new files are added > + > +# Ignore everything in this directory > +* > + > +# Except for this file > +!.gitignore > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: distclean removing LICENSES .gitignores 2019-05-13 15:05 ` Ahmad Fatoum 2019-05-14 2:19 ` [PATCH] LICENSES: modify .gitignore files to be nonempty Geordan Neukum @ 2019-05-15 7:44 ` Sascha Hauer 2019-05-16 3:53 ` Masahiro Yamada 2 siblings, 0 replies; 14+ messages in thread From: Sascha Hauer @ 2019-05-15 7:44 UTC (permalink / raw) To: Ahmad Fatoum; +Cc: barebox On Mon, May 13, 2019 at 05:05:39PM +0200, Ahmad Fatoum wrote: > Hello Geordan, > > On 13/5/19 00:17, Geordan Neukum wrote: > > When on the master branch, I noticed that running a "make distclean" > > will remove: > > > > - LICENSES/exceptions/.gitignore > > > > - LICENSES/other/.gitignore > > > > > > It looks like this is due to matching the pattern '-o size 0' in the > > top-level barebox makefile under the distclean target. > > > > Is this the desired behavior? > > Nope, this behavior isn't desired. I added the files, to have git > index the directories. IIRC, otherwise kernel checkpatch.pl laments their > absence. Maybe we should add a comment describing the purpose and then > these files aren't totally empty? barebox has its own checkpatch script which doesn't have the problem yet as it's copied from the kernel when there was no SPDX check, so we need an updated checkpatch to even get this problem ;) Then in the Kernel "other" was renamed to "deprecated", so with the current spdxcheck.py we get an exception in the kernel aswell. There were two patches sent for this on LKML: https://lkml.org/lkml/2019/5/11/158 But honestly I don't know the intention why spdxcheck expects certain directories to exist instead of looking which directories are actually there. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: distclean removing LICENSES .gitignores 2019-05-13 15:05 ` Ahmad Fatoum 2019-05-14 2:19 ` [PATCH] LICENSES: modify .gitignore files to be nonempty Geordan Neukum 2019-05-15 7:44 ` distclean removing LICENSES .gitignores Sascha Hauer @ 2019-05-16 3:53 ` Masahiro Yamada 2 siblings, 0 replies; 14+ messages in thread From: Masahiro Yamada @ 2019-05-16 3:53 UTC (permalink / raw) To: Ahmad Fatoum; +Cc: Barebox List On Tue, May 14, 2019 at 12:05 AM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote: > > Hello Geordan, > > On 13/5/19 00:17, Geordan Neukum wrote: > > When on the master branch, I noticed that running a "make distclean" > > will remove: > > > > - LICENSES/exceptions/.gitignore > > > > - LICENSES/other/.gitignore > > > > > > It looks like this is due to matching the pattern '-o size 0' in the > > top-level barebox makefile under the distclean target. > > > > Is this the desired behavior? > > Nope, this behavior isn't desired. I added the files, to have git > index the directories. IIRC, otherwise kernel checkpatch.pl laments their > absence. Maybe we should add a comment describing the purpose and then > these files aren't totally empty? > > > If not, I can go ahead and submit a > > patch that cleans up that target. > > Please go ahead. The '-o size 0' came from Linux, and it is gone already from Linux. See this Linux commit: commit f4b129f519f1bbd191dca2bf17d1137edf941fd1 Author: Michal Marek <mmarek@suse.cz> Date: Wed Aug 10 13:10:20 2011 +0200 kbuild: Do not delete empty files in make distclean Commit 3d64b44 introduced an empty file under arch/arm/mach-zynq/board_dt.c. While this was not intended and the file was removed from the tree by a later commit, we really should only match junk files by known name patterns and not their size. Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz> If you touch this hunk, please sync this part with Linux. In other words, please import the following two commits as well. commit a03fcb50e816a69acffb13b5e56db75063aeba8a Author: Masahiro Yamada <yamada.m@jp.panasonic.com> Date: Fri Mar 28 16:36:12 2014 +0900 kbuild: remove redundant '.*.cmd' pattern from make distclean '.*.cmd' files are cleaned-up by "make clean". The same pattern in "make distclean" is unnecessary. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz> commit f78271dfb77353c4d045f9735deebe21839fb2ed Author: Masahiro Yamada <yamada.masahiro@socionext.com> Date: Sun Jan 22 23:02:32 2017 +0900 kbuild: drop unneeded patterns '.*.orig' and '.*.rej' from distclean The patterns '.*.orig' and '.*.rej' are cleaned away by '*.orig' and '*.rej' seen two lines above. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> > Cheers > Ahmad > > > > > Thanks, > > Geordan > > > > _______________________________________________ > > barebox mailing list > > barebox@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/barebox > > > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox -- Best Regards Masahiro Yamada _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-05-16 3:54 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-05-12 22:17 distclean removing LICENSES .gitignores Geordan Neukum 2019-05-13 15:05 ` Ahmad Fatoum 2019-05-14 2:19 ` [PATCH] LICENSES: modify .gitignore files to be nonempty Geordan Neukum 2019-05-14 7:28 ` Ian Abbott 2019-05-14 8:28 ` Ahmad Fatoum 2019-05-14 12:51 ` Ian Abbott 2019-05-15 0:45 ` [PATCH v2] " Geordan Neukum 2019-05-15 8:54 ` Ahmad Fatoum 2019-05-15 0:56 ` [PATCH] " Geordan Neukum 2019-05-14 8:35 ` Uwe Kleine-König 2019-05-14 10:37 ` [PATCH v2] " Geordan Neukum 2019-05-14 11:00 ` Ahmad Fatoum 2019-05-15 7:44 ` distclean removing LICENSES .gitignores Sascha Hauer 2019-05-16 3:53 ` Masahiro Yamada
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox