Re: [PATCH v2 1/2] scripts/package: add KBUILD_PKG_ROOTCMD variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24.11.2009 13:03, Jonathan Nieder wrote:
> Hi,
> 
> Michal Marek wrote:
>> GNU tar has --owner and --group options to override the owner and group
>> of the files in the archive, something like
>>
>> opts=
>> if tar --owner=root --group=root --help >/dev/null 2>&1; then
>>     opts="--owner=root --group=root"
>> fi
>> tar cf - . $opts ...
>>
>> would make tar-pkg do the right thing automatically without specifying
>> fakeroot.
> 
> Sounds appealing.  Probably it is safe to assume GNU tar is available
> for running tar-pkg. I’ll look into this, though I wouldn’t mind if a
> patch appears before I finish.

I would still fallback to plain tar, you never know what exotic
system users build on and GNU tar is not mentioned in
Documentation/Changes. But you're right, this would be another patch.


>>> @@ -96,10 +100,10 @@ clean-dirs += $(objtree)/tar-install/
>>>  # Help text displayed when executing 'make help'
>>>  # ---------------------------------------------------------------------------
>>>  help: FORCE
>>> +	@echo ' Set KBUILD_PKG_ROOTCMD={sudo|fakeroot -u|...} and make as non-root:'
>>>  	@echo '  rpm-pkg         - Build both source and binary RPM kernel packages'
>>>  	@echo '  binrpm-pkg      - Build only the binary kernel package'
>>>  	@echo '  deb-pkg         - Build the kernel as an deb package'
>>>  	@echo '  tar-pkg         - Build the kernel as an uncompressed tarball'
>>>  	@echo '  targz-pkg       - Build the kernel as a gzip compressed tarball'
>>>  	@echo '  tarbz2-pkg      - Build the kernel as a bzip2 compressed tarball'
> 
> If this variable is to only be used for some targets, this help text
> starts to look out of place.  Maybe make deb-pkg should error out with
> a suggestion to set it if `id -u` is not 0, instead.

Good idea.


> Thanks for the thoughtful review.  Updated patch coming soon.

Thanks!

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux