* Re: [path] don't diff generated firmware files
2008-09-01 23:14 ` Alexey Dobriyan
@ 2008-09-12 17:17 ` Randy Dunlap
2008-09-12 17:17 ` [PATCH] dontdiff: more updates to be closer to gitignore Randy Dunlap
2008-09-12 17:18 ` [RFC/PATCH] dontdiff: generate from gitignore Randy Dunlap
2 siblings, 0 replies; 11+ messages in thread
From: Randy Dunlap @ 2008-09-12 17:17 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: Arjan van de Ven, linux-kernel, dwmw2, torvalds
On Tue, 2 Sep 2008 03:14:19 +0400 Alexey Dobriyan wrote:
> On Mon, Sep 01, 2008 at 03:09:51PM -0700, Arjan van de Ven wrote:
> > With the new firmware infrastructure in 2.6.27, some files are generated and shouldn't be
> > diffed; add these 2 to the "dontdiff" file
>
> > --- linux.trees.git/Documentation/dontdiff
> > +++ linux.trees.git/Documentation/dontdiff
> > @@ -5,6 +5,8 @@
> > *.css
> > *.dvi
> > *.eps
> > +*.fw.gen.S
> > +*.fw
>
> Dontdiff is obsoleted because of .gitignore and should probably be auto-generated
> from them.
Let's please not assume that everyone uses git nor force that.
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] dontdiff: more updates to be closer to gitignore
2008-09-01 23:14 ` Alexey Dobriyan
2008-09-12 17:17 ` Randy Dunlap
@ 2008-09-12 17:17 ` Randy Dunlap
2008-09-12 17:18 ` [RFC/PATCH] dontdiff: generate from gitignore Randy Dunlap
2 siblings, 0 replies; 11+ messages in thread
From: Randy Dunlap @ 2008-09-12 17:17 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: linux-kernel, torvalds, akpm, samr
defkeymap.c_shipped should be diffed if it is changed.
Reported-by: Mike Galbraith <efault@gmx.de>
COPYING, CREDITS, .mailmap should be diffed if they are changed.
keywords.c_shipped & lex.c_shipped should be diffed when changed.
parse.[ch]_shipped should be diffed when changed.
Reported-by: Sam Ravnborg <sam@ravnborg.org>
vsyscall* updates from a .gitignore patch by "Denis V. Lunev" <den@openvz.org>.
*.so.dbg from a .gitignore patch by Thomas Gleixner <tglx@linutronix.de>.
binoffset from a .gitignore patch by Uwe Kleine-K=F6nig <Uwe.Kleine-Koenig@digi.com>.
Module.markers from a .gitignore patch by Matthew Wilcox <willy@linux.intel.com>.
vmlinux*.lds* should be diffed if changed.
Reported-by: Etienne Lorrain <etienne_lorrain@yahoo.fr>
vmlinux.lds from a .gitignore patch by Daniel Guilak <daniel@danielguilak.com>.
*.scr should be diffed if changed.
Lots of updates from http://lkml.org/lkml/2008/5/20/32
Reported-by: Bart Van Assche <bart.vanassche@gmail.com>
Use ncscope.* instead of *cscope* since the latter may catch too many files.
Add *.elf, from a .gitignore patch by Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>.
Make firmware entries match .gitignore entries.
Make some entries less greedy by removing trailing '*'.
Remove "make_times_h" (no such file).
Remove "filelist" (no such file).
Remove "dummy_sym.c" (no such file).
Remove "gen-kdb_cmds.c" (no such file).
Remove "gentbl" (no such file).
Remove "kconfig.tk" (no such file).
Remove "tkparse" (no such file).
Remove "sim710_d.h" (no such file).
Remove "53c8xx_d.h" (no such file).
Add "syscalltab.h" (generated file).
---
Documentation/dontdiff | 59 +++++++++++++++++++++++++++----------------------
1 file changed, 33 insertions(+), 26 deletions(-)
--- linux-2.6.27-rc6-git2.orig/Documentation/dontdiff
+++ linux-2.6.27-rc6-git2/Documentation/dontdiff
@@ -2,11 +2,13 @@
*.aux
*.bin
*.cpio
-*.css
+*.csp
+*.dsp
*.dvi
+*.elf
*.eps
-*.fw.gen.S
*.fw
+*.gen.S
*.gif
*.grep
*.grp
@@ -30,6 +32,7 @@
*.s
*.sgml
*.so
+*.so.dbg
*.symtypes
*.tab.c
*.tab.h
@@ -38,24 +41,17 @@
*.xml
*_MODULES
*_vga16.c
-*cscope*
*~
*.9
*.9.gz
.*
-.cscope
-.gitignore
-.mailmap
.mm
53c700_d.h
-53c8xx_d.h*
-COPYING
-CREDITS
CVS
ChangeSet
Image
Kerntypes
-MODS.txt
+Module.markers
Module.symvers
PENDING
SCCS
@@ -73,7 +69,9 @@ autoconf.h*
bbootsect
bin2c
binkernel.spec
+binoffset
bootsect
+bounds.h
bsetup
btfixupprep
build
@@ -89,39 +87,36 @@ config_data.h*
config_data.gz*
conmakehash
consolemap_deftbl.c*
+cpustr.h
crc32table.h*
cscope.*
-defkeymap.c*
+defkeymap.c
devlist.h*
docproc
-dummy_sym.c*
elf2ecoff
elfconfig.h*
-filelist
fixdep
fore200e_mkfirm
fore200e_pca_fw.c*
gconf
gen-devlist
-gen-kdb_cmds.c*
gen_crc32table
gen_init_cpio
genksyms
-gentbl
*_gray256.c
+ihex2fw
ikconfig.h*
initramfs_data.cpio
initramfs_data.cpio.gz
initramfs_list
kallsyms
kconfig
-kconfig.tk
-keywords.c*
+keywords.c
ksym.c*
ksym.h*
kxgettext
lkc_defs.h
-lex.c*
+lex.c
lex.*.c
logo_*.c
logo_*_clut224.c
@@ -130,7 +125,6 @@ lxdialog
mach-types
mach-types.h
machtypes.h
-make_times_h
map
maui_boot.h
mconf
@@ -138,6 +132,7 @@ miboot*
mk_elfconfig
mkboot
mkbugboot
+mkcpustr
mkdep
mkprep
mktables
@@ -145,11 +140,12 @@ mktree
modpost
modules.order
modversions.h*
+ncscope.*
offset.h
offsets.h
oui.c*
-parse.c*
-parse.h*
+parse.c
+parse.h
patches*
pca200e.bin
pca200e_ecd.bin2
@@ -157,7 +153,7 @@ piggy.gz
piggyback
pnmtologo
ppc_defs.h*
-promcon_tbl.c*
+promcon_tbl.c
pss_boot.h
qconf
raid6altivec*.c
@@ -168,27 +164,38 @@ series
setup
setup.bin
setup.elf
-sim710_d.h*
sImage
sm_tbl*
split-include
+syscalltab.h
tags
tftpboot.img
timeconst.h
times.h*
-tkparse
trix_boot.h
utsrelease.h*
+vdso-syms.lds
vdso.lds
+vdso32-int80-syms.lds
+vdso32-syms.lds
+vdso32-syscall-syms.lds
+vdso32-sysenter-syms.lds
+vdso32.lds
+vdso32.so.dbg
+vdso64.lds
+vdso64.so.dbg
version.h*
vmlinux
vmlinux-*
vmlinux.aout
-vmlinux*.lds*
-vmlinux*.scr
+vmlinux.lds
vsyscall.lds
+vsyscall_32.lds
wanxlfw.inc
uImage
unifdef
+wakeup.bin
+wakeup.elf
+wakeup.lds
zImage*
zconf.hash.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFC/PATCH] dontdiff: generate from gitignore
2008-09-01 23:14 ` Alexey Dobriyan
2008-09-12 17:17 ` Randy Dunlap
2008-09-12 17:17 ` [PATCH] dontdiff: more updates to be closer to gitignore Randy Dunlap
@ 2008-09-12 17:18 ` Randy Dunlap
2008-09-12 17:36 ` Linus Torvalds
2 siblings, 1 reply; 11+ messages in thread
From: Randy Dunlap @ 2008-09-12 17:18 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: linux-kernel, torvalds, akpm, samr
From: Randy Dunlap <randy.dunlap@oracle.com>
Generate the "dontdiff" file from the .gitignore files.
Save it in scripts/dontdiff.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
Makefile | 10 +++++++++-
scripts/.gitignore | 1 +
scripts/mkdontdiff | 23 +++++++++++++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
--- linux-2.6.27-rc6-git2.orig/Makefile
+++ linux-2.6.27-rc6-git2/Makefile
@@ -398,7 +398,7 @@ endif
no-dot-config-targets := clean mrproper distclean \
cscope TAGS tags help %docs check% \
include/linux/version.h headers_% \
- kernelrelease kernelversion
+ kernelrelease kernelversion dontdiff
config-targets := 0
mixed-targets := 0
@@ -1251,6 +1251,7 @@ help:
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
@echo ' dir/file.ko - Build module including final link'
+ @echo ' dontdiff - Create a "dontdiff" file'
@echo ' prepare - Set up for building external modules'
@echo ' tags/TAGS - Generate tags file for editors'
@echo ' cscope - Generate cscope index'
@@ -1519,6 +1520,13 @@ endef
tags: FORCE
$(call cmd,tags)
+quiet_cmd_dontdiff = MAKE dontdiff
+ cmd_dontdiff = $(shell $(CONFIG_SHELL) \
+ $(srctree)/scripts/mkdontdiff $(srctree))
+
+dontdiff: FORCE
+ $(call cmd,dontdiff)
+
# Scripts to check various things for consistency
# ---------------------------------------------------------------------------
--- /dev/null
+++ linux-2.6.27-rc6-git2/scripts/mkdontdiff
@@ -0,0 +1,23 @@
+#! /bin/sh
+set -f
+
+TMPFILE=`mktemp ./.tmpdd.XXXXXX`
+srctree=$1
+DDFILE=$srctree/scripts/dontdiff
+
+find . -name .gitignore | xargs cat | grep -v '^[#!]' | grep -v '^[:space:]*$' | sort | uniq > $TMPFILE
+
+rm -f $DDFILE
+touch $DDFILE
+
+while read PATTERN ; do
+ if echo "$PATTERN" | grep -q '/' ; then
+ filename=`basename $PATTERN`
+ else
+ filename="$PATTERN"
+ fi
+
+ echo $filename >> $DDFILE
+done < $TMPFILE
+
+rm $TMPFILE
--- linux-2.6.27-rc6-git2.orig/scripts/.gitignore
+++ linux-2.6.27-rc6-git2/scripts/.gitignore
@@ -2,6 +2,7 @@
# Generated files
#
conmakehash
+dontdiff
kallsyms
pnmtologo
bin2c
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC/PATCH] dontdiff: generate from gitignore
2008-09-12 17:18 ` [RFC/PATCH] dontdiff: generate from gitignore Randy Dunlap
@ 2008-09-12 17:36 ` Linus Torvalds
2008-09-12 17:41 ` Randy Dunlap
0 siblings, 1 reply; 11+ messages in thread
From: Linus Torvalds @ 2008-09-12 17:36 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Alexey Dobriyan, linux-kernel, akpm, samr
On Fri, 12 Sep 2008, Randy Dunlap wrote:
>
> Generate the "dontdiff" file from the .gitignore files.
t's not quite as simple as that, though.
The .gitignore files are fundamentally location hierarchy-aware, so a
ignore entry in one subdirectory only affects that subdirectory
(recursively), so if you flatten then, you should take that into account.
As far as I can tell, your script will generate lots of incorrect entries
due to this. Eg, it will generate
parse.[ch]
as a dontdiff pattern, because scripts/genksyms/.gitignore has that, but
that means that now it will ignore parse.c in all the _other_ places,
where it *isn't* a generated file (ie mm/parse.c).
Linus
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC/PATCH] dontdiff: generate from gitignore
2008-09-12 17:36 ` Linus Torvalds
@ 2008-09-12 17:41 ` Randy Dunlap
2008-09-12 20:32 ` Kai Henningsen
0 siblings, 1 reply; 11+ messages in thread
From: Randy Dunlap @ 2008-09-12 17:41 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Alexey Dobriyan, linux-kernel, akpm, samr
Linus Torvalds wrote:
>
> On Fri, 12 Sep 2008, Randy Dunlap wrote:
>> Generate the "dontdiff" file from the .gitignore files.
>
> t's not quite as simple as that, though.
>
> The .gitignore files are fundamentally location hierarchy-aware, so a
> ignore entry in one subdirectory only affects that subdirectory
> (recursively), so if you flatten then, you should take that into account.
>
> As far as I can tell, your script will generate lots of incorrect entries
> due to this. Eg, it will generate
>
> parse.[ch]
>
> as a dontdiff pattern, because scripts/genksyms/.gitignore has that, but
> that means that now it will ignore parse.c in all the _other_ places,
> where it *isn't* a generated file (ie mm/parse.c).
Yes, that's one of the reasons that it contains "RFC" in $subject.
There's also no handling of !pattern .gitignore lines....
AFAIK, diff with a dontdiff file does not allow/support full pathname
hierarchies like .gitignore does, so this is probably a futile exercise. ??
--
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC/PATCH] dontdiff: generate from gitignore
2008-09-12 17:41 ` Randy Dunlap
@ 2008-09-12 20:32 ` Kai Henningsen
0 siblings, 0 replies; 11+ messages in thread
From: Kai Henningsen @ 2008-09-12 20:32 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Linus Torvalds, Alexey Dobriyan, linux-kernel, akpm, samr
On Fri, Sep 12, 2008 at 19:41, Randy Dunlap <randy.dunlap@oracle.com> wrote:
> Linus Torvalds wrote:
>>
>> On Fri, 12 Sep 2008, Randy Dunlap wrote:
>>> Generate the "dontdiff" file from the .gitignore files.
>>
>> t's not quite as simple as that, though.
>>
>> The .gitignore files are fundamentally location hierarchy-aware, so a
>> ignore entry in one subdirectory only affects that subdirectory
>> (recursively), so if you flatten then, you should take that into account.
>>
>> As far as I can tell, your script will generate lots of incorrect entries
>> due to this. Eg, it will generate
>>
>> parse.[ch]
>>
>> as a dontdiff pattern, because scripts/genksyms/.gitignore has that, but
>> that means that now it will ignore parse.c in all the _other_ places,
>> where it *isn't* a generated file (ie mm/parse.c).
>
> Yes, that's one of the reasons that it contains "RFC" in $subject.
> There's also no handling of !pattern .gitignore lines....
>
> AFAIK, diff with a dontdiff file does not allow/support full pathname
> hierarchies like .gitignore does, so this is probably a futile exercise. ??
I'm presuming you're talking about this diff option?
`-X FILE'
`--exclude-from=FILE'
When comparing directories, ignore files and subdirectories whose
basenames match any pattern contained in FILE. *Note Comparing
Directories::.
Indeed: it clearly says "basename" here.
If it weren't for that, you could just use git-ls-files --ignore to
find them ...
^ permalink raw reply [flat|nested] 11+ messages in thread