make mrproper cleanup more file
cover make mrproper cleanup more file
The point of mrproper is to cleanup all the machine specific files from the build.
Stephen Hemminger (2):
kbuild: cleanup signing keys with mrproper
kbuild: remove initramfs cpio with mrproper
Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/2 kbuild: cleanup signing keys with mrproper
When 'make mrproper' is run it was supposed to remove the signing keys in the certs directory, but only the filename is given rather than the pathanme which is necessary to cause cleanup.
--- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Makefile +3 -3
@@ -1274,9 +1274,9 @@ MRPROPER_DIRS += include/config usr/include include/generated \ arch/*/include/generated .tmp_objdiff MRPROPER_FILES += .config .config.old .version .old_version \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ - signing_key.pem signing_key.priv signing_key.x509 \ - x509.genkey extra_certificates signing_key.x509.keyid \ - signing_key.x509.signer vmlinux-gdb.py + certs/signing_key.pem certs/signing_key.priv certs/signing_key.x509 \ + certs/x509.genkey certs/extra_certificates certs/signing_key.x509.keyid \ + certs/signing_key.x509.signer vmlinux-gdb.py # clean - Delete most, but leave enough to build external modules #
Signature · 1 line
2.11.0
Re: [PATCH 1/2] kbuild: cleanup signing keys with mrproper
+CC David Woodhouse
+CC David Howells
2017-04-15 6:54 GMT+09:00 Stephen Hemminger <[email protected]>:
Quoted 14 lines
When 'make mrproper' is run it was supposed to remove the signing keys in the certs directory, but only the filename is given rather than the pathanme which is necessary to cause cleanup.
Signed-off-by Stephen Hemminger <[email protected]>--- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile +0
-0
Makefile MRPROPER_DIRS += include/config usr/include include/generated \ · line 1280
Quoted 10 lines
Makefile +3
-3@@ -1274,9 +1274,9 @@ MRPROPER_DIRS += include/config usr/include include/generated \ arch/*/include/generated .tmp_objdiff MRPROPER_FILES += .config .config.old .version .old_version \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ - signing_key.pem signing_key.priv signing_key.x509 \ - x509.genkey extra_certificates signing_key.x509.keyid \ - signing_key.x509.signer vmlinux-gdb.py + certs/signing_key.pem certs/signing_key.priv certs/signing_key.x509 \ + certs/x509.genkey certs/extra_certificates certs/signing_key.x509.keyid \ + certs/signing_key.x509.signer vmlinux-gdb.py
The logic seems quite simple,
but I am not quite sure which file is still valid?
[1] signing_key.pem - OK, this should be certs/signing_key.pem and removed by 'make mrproper'
[2] signing_key.priv - deprecated by commit fb1179499134 ?
[3] signing_key.x509 - OK, this should be certs/signing_key.x509 and removed by 'make mrproper'
[4] x509.genkey - this is an intermediate file for generating signing_key.pem, but unneeded for installing external modules. Does it make more sense to delete this by 'make clean'?
[5] extra_certificates - I am not sure where this is generated, and used
[6] siging_key.x509.keyid - same as [5]
[7] signing_key.x509.signer - same as [5]
Signature · 2 lines
Best Regards Masahiro Yamada
Re: [PATCH 1/2] kbuild: cleanup signing keys with mrproper
Quoted 46 lines · On Wed, 3 May 2017 13:37:08 +0900 Masahiro Yamada…
(quoted diff) +2
-0+CC David Woodhouse +CC David Howells2017-04-15 6:54 GMT+09:00 Stephen Hemminger <[email protected]>:
Quoted 14 lines
When 'make mrproper' is run it was supposed to remove the signing keys in the certs directory, but only the filename is given rather than the pathanme which is necessary to cause cleanup.
Signed-off-by Stephen Hemminger <[email protected]>--- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile +0
-0Makefile MRPROPER_DIRS += include/config usr/include include/generated \ · line 1280
Quoted 10 lines
Makefile +3
-3@@ -1274,9 +1274,9 @@ MRPROPER_DIRS += include/config usr/include include/generated \ arch/*/include/generated .tmp_objdiff MRPROPER_FILES += .config .config.old .version .old_version \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ - signing_key.pem signing_key.priv signing_key.x509 \ - x509.genkey extra_certificates signing_key.x509.keyid \ - signing_key.x509.signer vmlinux-gdb.py + certs/signing_key.pem certs/signing_key.priv certs/signing_key.x509 \ + certs/x509.genkey certs/extra_certificates certs/signing_key.x509.keyid \ + certs/signing_key.x509.signer vmlinux-gdb.pyThe logic seems quite simple,
but I am not quite sure which file is still valid?[1] signing_key.pem - OK, this should be
certs/signing_key.pemand removed by 'make mrproper'[2] signing_key.priv - deprecated by commit
fb1179499134?[3] signing_key.x509 - OK, this should be
certs/signing_key.x509and removed by 'make mrproper'[4] x509.genkey - this is an intermediate file for generating signing_key.pem, but unneeded for installing external modules. Does it make more sense to delete this by 'make clean'?
Quoted 5 lines
[5]
extra_certificates- I am not sure where this is generated, and used[6] siging_key.x509.keyid - same as [5]
[7] signing_key.x509.signer - same as [5]
Retested with current Linus tree:
After build, these files are present:
signing_key.x509
This file is never cleaned up by clean or proper.
The changes that I think are necessary:
certs/extra_certificates is no longer used, remove it from Makefile
certs/signing_key.x509 should be removed by mrproper
Re: [PATCH 1/2] kbuild: cleanup signing keys with mrproper
Hi Stephen,
Sorry for my late reply.
2017-05-12 2:25 GMT+09:00 Stephen Hemminger <[email protected]>:
Quoted 58 lines
Quoted 46 lines · On Wed, 3 May 2017 13:37:08 +0900 Masahiro Yamada…
(quoted diff) +2
-0+CC David Woodhouse +CC David Howells2017-04-15 6:54 GMT+09:00 Stephen Hemminger <[email protected]>:
Quoted 14 lines
When 'make mrproper' is run it was supposed to remove the signing keys in the certs directory, but only the filename is given rather than the pathanme which is necessary to cause cleanup.
Signed-off-by Stephen Hemminger <[email protected]>--- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile +0
-0Makefile MRPROPER_DIRS += include/config usr/include include/generated \ · line 1280
Quoted 10 lines
Makefile +3
-3@@ -1274,9 +1274,9 @@ MRPROPER_DIRS += include/config usr/include include/generated \ arch/*/include/generated .tmp_objdiff MRPROPER_FILES += .config .config.old .version .old_version \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ - signing_key.pem signing_key.priv signing_key.x509 \ - x509.genkey extra_certificates signing_key.x509.keyid \ - signing_key.x509.signer vmlinux-gdb.py + certs/signing_key.pem certs/signing_key.priv certs/signing_key.x509 \ + certs/x509.genkey certs/extra_certificates certs/signing_key.x509.keyid \ + certs/signing_key.x509.signer vmlinux-gdb.pyThe logic seems quite simple,
but I am not quite sure which file is still valid?[1] signing_key.pem - OK, this should be
certs/signing_key.pemand removed by 'make mrproper'[2] signing_key.priv - deprecated by commit
fb1179499134?[3] signing_key.x509 - OK, this should be
certs/signing_key.x509and removed by 'make mrproper'[4] x509.genkey - this is an intermediate file for generating signing_key.pem, but unneeded for installing external modules. Does it make more sense to delete this by 'make clean'?
Quoted 5 lines
[5]
extra_certificates- I am not sure where this is generated, and used[6] siging_key.x509.keyid - same as [5]
[7] signing_key.x509.signer - same as [5]
Retested with current Linus tree:
After build, these files are present:
Quoted 8 lines
signing_key.x509This file is never cleaned up by clean or proper.
The changes that I think are necessary:
certs/extra_certificatesis no longer used, remove it fromMakefile
certs/signing_key.x509should be removed by mrproper
I agree.
I'd like obsolete files dropped from the list
before fixing the file paths.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 2/2 kbuild: remove initramfs cpio with mrproper
In reply to Stephen HemmingerWhen 'make mrproper' is done, it should also remove the initramfs cpio file. I ran into this while doing test build on one machine, followed by make mrproper and rsync to a target machine. The build on the target machine would succeed but be unbootable because of the bad initramfs.
--- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Makefile +2 -1
@@ -1276,7 +1276,8 @@ MRPROPER_FILES += .config .config.old .version .old_version \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ certs/signing_key.pem certs/signing_key.priv certs/signing_key.x509 \ certs/x509.genkey certs/extra_certificates certs/signing_key.x509.keyid \ - certs/signing_key.x509.signer vmlinux-gdb.py + certs/signing_key.x509.signer vmlinux-gdb.py \ + usr/initramfs_data.cpio.gz # clean - Delete most, but leave enough to build external modules #
Signature · 1 line
2.11.0
Re: [PATCH 2/2] kbuild: remove initramfs cpio with mrproper
Hi Stephen,
2017-04-15 6:54 GMT+09:00 Stephen Hemminger <[email protected]>:
Quoted 4 lines
When 'make mrproper' is done, it should also remove the initramfs cpio file. I ran into this while doing test build on one machine, followed by make mrproper and rsync to a target machine. The build on the target machine would succeed but be unbootable because of the bad initramfs.
I think initramfs_data.cpio.* is unneeded for external modules.
So, shouldn't it removed by 'make clean', instead of 'make mrproper'?
Quoted 10 lines
Signed-off-by Stephen Hemminger <[email protected]>--- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)Makefile +0
-0
Makefile MRPROPER_FILES += .config .config.old .version .old_version \ · line 1281
Quoted 7 lines
Makefile +2
-1@@ -1276,7 +1276,8 @@ MRPROPER_FILES += .config .config.old .version .old_version \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ certs/signing_key.pem certs/signing_key.priv certs/signing_key.x509 \ certs/x509.genkey certs/extra_certificates certs/signing_key.x509.keyid \ - certs/signing_key.x509.signer vmlinux-gdb.py + certs/signing_key.x509.signer vmlinux-gdb.py \ + usr/initramfs_data.cpio.gz
As you see usr/Makefile,datafile_y = initramfs_data.cpio$(suffix_y)
The suffix could be .gz, .bz2, .xz, etc.
Why only initramfs_data.cpio.gz?
Signature · 2 lines
Best Regards Masahiro Yamada