diff mbox

[036/270] kbuild: Do not package /boot and /lib in make tar-pkg

Message ID 1353949160-26803-37-git-send-email-herton.krzesinski@canonical.com
State New
Headers show

Commit Message

Herton Ronaldo Krzesinski Nov. 26, 2012, 4:55 p.m. UTC
3.5.7u1 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Michal Marek <mmarek@suse.cz>

commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream.

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>
Signed-off-by: Michal Marek <mmarek@suse.cz>
[ herton: dropped unrelated changes to arch/x86/Makefile and
  scripts/Makefile.fwinst, which don't apply anyway on 3.5, see commit
  3ce9e53e788881da0d5f3912f80e0dd6b501f304 upstream ]
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 scripts/package/buildtar |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ben Hutchings Nov. 27, 2012, 2:26 a.m. UTC | #1
On Mon, 2012-11-26 at 14:55 -0200, Herton Ronaldo Krzesinski wrote:
> 3.5.7u1 -stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Michal Marek <mmarek@suse.cz>
> 
> commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream.
> 
> 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>
> Signed-off-by: Michal Marek <mmarek@suse.cz>
> [ herton: dropped unrelated changes to arch/x86/Makefile and
>   scripts/Makefile.fwinst, which don't apply anyway on 3.5, see commit
>   3ce9e53e788881da0d5f3912f80e0dd6b501f304 upstream ]
> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>

This is missing from 3.4.

Ben.

> ---
>  scripts/package/buildtar |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/package/buildtar b/scripts/package/buildtar
> index 8a7b155..d0d748e 100644
> --- a/scripts/package/buildtar
> +++ b/scripts/package/buildtar
> @@ -109,7 +109,7 @@ esac
>  	if tar --owner=root --group=root --help >/dev/null 2>&1; then
>  		opts="--owner=root --group=root"
>  	fi
> -	tar cf - . $opts | ${compress} > "${tarball}${file_ext}"
> +	tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}"
>  )
>  
>  echo "Tarball successfully created in ${tarball}${file_ext}"
gregkh@linuxfoundation.org Nov. 30, 2012, 1:38 a.m. UTC | #2
On Tue, Nov 27, 2012 at 02:26:27AM +0000, Ben Hutchings wrote:
> On Mon, 2012-11-26 at 14:55 -0200, Herton Ronaldo Krzesinski wrote:
> > 3.5.7u1 -stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Michal Marek <mmarek@suse.cz>
> > 
> > commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream.
> > 
> > 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>
> > Signed-off-by: Michal Marek <mmarek@suse.cz>
> > [ herton: dropped unrelated changes to arch/x86/Makefile and
> >   scripts/Makefile.fwinst, which don't apply anyway on 3.5, see commit
> >   3ce9e53e788881da0d5f3912f80e0dd6b501f304 upstream ]
> > Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
> 
> This is missing from 3.4.

I don't think it is needed, as 3ce9e53e788881da0d5f3912f80e0dd6b501f304
didn't go into 3.4, so all should be good for now.

thanks,

greg k-h
Ben Hutchings Nov. 30, 2012, 2:19 a.m. UTC | #3
On Thu, 2012-11-29 at 17:38 -0800, Greg Kroah-Hartman wrote:
> On Tue, Nov 27, 2012 at 02:26:27AM +0000, Ben Hutchings wrote:
> > On Mon, 2012-11-26 at 14:55 -0200, Herton Ronaldo Krzesinski wrote:
> > > 3.5.7u1 -stable review patch.  If anyone has any objections, please let me know.
> > > 
> > > ------------------
> > > 
> > > From: Michal Marek <mmarek@suse.cz>
> > > 
> > > commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream.
> > > 
> > > 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>
> > > Signed-off-by: Michal Marek <mmarek@suse.cz>
> > > [ herton: dropped unrelated changes to arch/x86/Makefile and
> > >   scripts/Makefile.fwinst, which don't apply anyway on 3.5, see commit
> > >   3ce9e53e788881da0d5f3912f80e0dd6b501f304 upstream ]
> > > Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
> > 
> > This is missing from 3.4.
> 
> I don't think it is needed, as 3ce9e53e788881da0d5f3912f80e0dd6b501f304
> didn't go into 3.4, so all should be good for now.

No, 3ce9e53e788881da0d5f3912f80e0dd6b501f304 was later and reverted
unintended changes in fe04ddf7c2910362f3817c8156e41cbd6c0ee35d.  You
should probably combine the two.

See these stable commits:

3.2: 0767530 kbuild: Do not package /boot and /lib in make tar-pkg
3.6: 4bb50fa kbuild: Do not package /boot and /lib in make tar-pkg
3.6: 0a7f602 kbuild: Fix accidental revert in commit fe04ddf

Ben.
Jonathan Nieder Nov. 30, 2012, 8:30 a.m. UTC | #4
Greg Kroah-Hartman wrote:
> On Tue, Nov 27, 2012 at 02:26:27AM +0000, Ben Hutchings wrote:
>> On Mon, 2012-11-26 at 14:55 -0200, Herton Ronaldo Krzesinski wrote:

>>> commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream.
>>>
>>> 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>
>>> Signed-off-by: Michal Marek <mmarek@suse.cz>
>>> [ herton: dropped unrelated changes to arch/x86/Makefile and
>>>   scripts/Makefile.fwinst, which don't apply anyway on 3.5, see commit
>>>   3ce9e53e788881da0d5f3912f80e0dd6b501f304 upstream ]
>>> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
>>
>> This is missing from 3.4.
>
> I don't think it is needed, as 3ce9e53e788881da0d5f3912f80e0dd6b501f304
> didn't go into 3.4, so all should be good for now.

The dependency's the other way around.  Herton's comment above means
to say that 3ce9e53 is being squashed in as a fixup.

Thanks,
Jonathan
gregkh@linuxfoundation.org Dec. 6, 2012, 8:17 p.m. UTC | #5
On Fri, Nov 30, 2012 at 02:19:49AM +0000, Ben Hutchings wrote:
> On Thu, 2012-11-29 at 17:38 -0800, Greg Kroah-Hartman wrote:
> > On Tue, Nov 27, 2012 at 02:26:27AM +0000, Ben Hutchings wrote:
> > > On Mon, 2012-11-26 at 14:55 -0200, Herton Ronaldo Krzesinski wrote:
> > > > 3.5.7u1 -stable review patch.  If anyone has any objections, please let me know.
> > > > 
> > > > ------------------
> > > > 
> > > > From: Michal Marek <mmarek@suse.cz>
> > > > 
> > > > commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream.
> > > > 
> > > > 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>
> > > > Signed-off-by: Michal Marek <mmarek@suse.cz>
> > > > [ herton: dropped unrelated changes to arch/x86/Makefile and
> > > >   scripts/Makefile.fwinst, which don't apply anyway on 3.5, see commit
> > > >   3ce9e53e788881da0d5f3912f80e0dd6b501f304 upstream ]
> > > > Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
> > > 
> > > This is missing from 3.4.
> > 
> > I don't think it is needed, as 3ce9e53e788881da0d5f3912f80e0dd6b501f304
> > didn't go into 3.4, so all should be good for now.
> 
> No, 3ce9e53e788881da0d5f3912f80e0dd6b501f304 was later and reverted
> unintended changes in fe04ddf7c2910362f3817c8156e41cbd6c0ee35d.  You
> should probably combine the two.
> 
> See these stable commits:
> 
> 3.2: 0767530 kbuild: Do not package /boot and /lib in make tar-pkg
> 3.6: 4bb50fa kbuild: Do not package /boot and /lib in make tar-pkg
> 3.6: 0a7f602 kbuild: Fix accidental revert in commit fe04ddf

Ah, thanks, that makes more sense, I think I have it straightened out
now.

greg k-h
diff mbox

Patch

diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index 8a7b155..d0d748e 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -109,7 +109,7 @@  esac
 	if tar --owner=root --group=root --help >/dev/null 2>&1; then
 		opts="--owner=root --group=root"
 	fi
-	tar cf - . $opts | ${compress} > "${tarball}${file_ext}"
+	tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}"
 )
 
 echo "Tarball successfully created in ${tarball}${file_ext}"