diff options
author | Michal Marek <mmarek@suse.cz> | 2012-09-25 10:03:03 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2012-09-27 10:26:19 -0400 |
commit | fe04ddf7c2910362f3817c8156e41cbd6c0ee35d (patch) | |
tree | c760dd345cdc0ac7add2b541ae642b1ef496c0f5 /scripts | |
parent | 24cc7fb69a5b5edfdff1d38c6a213d6a33648829 (diff) |
kbuild: Do not package /boot and /lib in make tar-pkg
There were reports of users destroying their Fedora installs by a kernel
tarball that replaces the /lib -> /usr/lib symlink. Let's remove the
toplevel directories from the tarball to prevent this from happening.
Reported-by: Andi Kleen <andi@firstfloor.org>
Suggested-by: Ben Hutchings <ben@decadent.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.fwinst | 4 | ||||
-rw-r--r-- | scripts/package/buildtar | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst index 4d908d16c035..c3f69ae275d1 100644 --- a/scripts/Makefile.fwinst +++ b/scripts/Makefile.fwinst | |||
@@ -27,7 +27,7 @@ endif | |||
27 | installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw)) | 27 | installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw)) |
28 | 28 | ||
29 | installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) | 29 | installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) |
30 | installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./ | 30 | installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/. |
31 | 31 | ||
32 | # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. | 32 | # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. |
33 | PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs | 33 | PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs |
@@ -42,7 +42,7 @@ quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) | |||
42 | $(installed-fw-dirs): | 42 | $(installed-fw-dirs): |
43 | $(call cmd,mkdir) | 43 | $(call cmd,mkdir) |
44 | 44 | ||
45 | $(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %) | 45 | $(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $$(dir $(INSTALL_FW_PATH)/%) |
46 | $(call cmd,install) | 46 | $(call cmd,install) |
47 | 47 | ||
48 | PHONY += __fw_install __fw_modinst FORCE | 48 | PHONY += __fw_install __fw_modinst FORCE |
diff --git a/scripts/package/buildtar b/scripts/package/buildtar index 8a7b15598ea9..d0d748e72915 100644 --- a/scripts/package/buildtar +++ b/scripts/package/buildtar | |||
@@ -109,7 +109,7 @@ esac | |||
109 | if tar --owner=root --group=root --help >/dev/null 2>&1; then | 109 | if tar --owner=root --group=root --help >/dev/null 2>&1; then |
110 | opts="--owner=root --group=root" | 110 | opts="--owner=root --group=root" |
111 | fi | 111 | fi |
112 | tar cf - . $opts | ${compress} > "${tarball}${file_ext}" | 112 | tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}" |
113 | ) | 113 | ) |
114 | 114 | ||
115 | echo "Tarball successfully created in ${tarball}${file_ext}" | 115 | echo "Tarball successfully created in ${tarball}${file_ext}" |