From: Alexander Samad on
On Tue, Aug 10, 2010 at 9:00 PM, Stephen Powell <zlinuxman(a)wowway.com> wrote:
> On Mon, 09 Aug 2010 19:01:50 -0400 (EDT), Alexander Samad wrote:
>> On Mon, Aug 9, 2010 at 9:26 AM, Stephen Powell <zlinuxman(a)wowway.com> wrote:
>>> On Sun, 08 Aug 2010 03:10:10 -0400 (EDT), Angus Hedger wrote:
>>>>
[snip
>>
>> I did trying using the packages for 2.6.35, but you can't install the
>> headers because the linux-kbuild-2.6.35 is there
>
> Why do you want to install the headers if you already have the whole
> kernel source code?  What are you trying to accomplish besides
> building a custom kernel?

I wanted the header file, so I could build the intel i915 modules, I
was planning on taking the modules source that belong to that and try
to compile against a debian kernel.

>>>
>>> A Debian source package for 2.6.35 is also
>>> available in experimental: linux-source-2.6.35.

must have slipped past me - I saw the package, but so used to using
the headers files.....

>>
>> can I use make-kpkg against this ?
>
> I haven't tried that specific source package, but I don't know of
> any reason why it wouldn't work.
>>
>> my reason for doing this is I have a problem with my screen - there is
>> a bug open at freedesktop.org. and I need to get the lastest git from
>> drm-intel....
>
> So does this video driver use an out-of-kernel-source-tree kernel
> module, like the proprietary nvidia driver does?  Are you trying to
> use module-assistant?  Is that why you need the headers (or why you
> think you need the headers)?
no it not like the ndvidia think, just they freedesktop org -
maintaniers would like me to use the lastest HEAD version...

>
> --
>  .''`.     Stephen Powell
>  : :'  :
>  `. `'`
>   `-
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian..org
> Archive: http://lists.debian.org/477765543.3782.1281445228509.JavaMail.root(a)md01.wow.synacor.com
>
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTi?stQDAWE1RF-QXCh0eO-m7V1S5y?R9N0Qv(a)mail.gmail.com
From: Tom H on
On Mon, Aug 9, 2010 at 8:18 PM, John Hasler <jhasler(a)debian.org> wrote:
> Tom H writes:
>> I wasn't saying that you should use sudo. I was pointing out that you
>> were wrong in saying that "shouldn't compile using root permissions".
>
> No he wasn't.
>
>> Whether you choose fakeroot, sudo, su, or log on as root, is a
>> religious-type discussion that you can have with someone who cares
>> about such things.
>
> Read the fakeroot man page. Fakroot does _not_ "get root".  It does not
> give you any additional powers: that is why it exists.

I have and I agree with you regarding what fakeroot does (based on the
manpage that I've read in the past and read again after you posted
part of it).

IIUC, instead of giving you additional powers, fakeroot gives your
environment additional powers (otherwise, why would it be used?) and
that's probably why the kernel-package documentation doesn't
differentiate between fakeroot and sudo, refers to them both as
"$Get_Root", and describes them as "whatever you need to become root
-- fakeroot or sudo...)."


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTikwJq3Zk3AE2?BeCxyj7yHMB7bUChGVdKrYK6(a)mail.gmail.com
From: Stephen Powell on
On Tue, 10 Aug 2010 14:58:04 -0400 (EDT), Tom H wrote:
>
> I have and I agree with you regarding what fakeroot does (based on the
> manpage that I've read in the past and read again after you posted
> part of it).
>
> IIUC, instead of giving you additional powers, fakeroot gives your
> environment additional powers (otherwise, why would it be used?) and
> that's probably why the kernel-package documentation doesn't
> differentiate between fakeroot and sudo, refers to them both as
> "$Get_Root", and describes them as "whatever you need to become root
> -- fakeroot or sudo...)."

In order to build a binary Debian package, some functions are used
internally by make-kpkg (or lower level commands called by make-kpkg,
such as dpkg-buildpackage) that would normally require root privileges.
Examples are chmod(2), stat(2), etc. Compiling the kernel source code
does not require root privileges, but building the .deb file normally
does. There are several solutions to this problem, such as:

(1) login as root.
(2) login as a non-root user and issue su to get a nested shell
session that has root privileges, assuming that you know the
root password.
(3) preface the make-kpkg command with sudo, assuming that you have
proper sudo permissions.
(4) use the --rootcmd option of make-kpkg, supplying sudo as its
argument. For example,

make-kpkg --rootcmd sudo ...

This way, make-kpkg executes as a non-root user most of the time
and uses sudo to become root only when it needs to be.

(5) preface the make-kpkg command with fakeroot
(6) use the --rootcmd option of make-kpkg, supplying fakeroot as its
argument. For example,

make-kpkg --rootcmd fakeroot ...

And there are probably other scenarios that I haven't thought of.

fakeroot, as its name implies, does not actually give you true root
privileges. Rather, it supplies temporary replacements for the library
functions needed by dpkg-buildpackage that would ordinarily require
root privileges, such as chmod(2), stat(2), etc. These replacement
functions simulate the effect the real library functions would have
had, had the user really been root. It gives you "just enough"
apparent root authority to build a package (selected file manipulation
functions) and no more.

If you've looked at my kernel building web page,
http://www.wowway.com/~zlinuxman/Kernel.htm, you will see that I
don't cover this. That's because I don't use it when I build my
own custom kernels. I do use it when building a "regular"
Debian package, but for some reason I've never bothered with it for
creating my own custom kernels. I just log in as root and forget
about it. For some people, this seems to be a "religious" issue.
But I never bother with it. I just login as root and forget about it.
So many of the steps require root authority (real root authority)
that it's simpler for me just to stay root the whole time.
If I ever get burned by it, I'll probably change my lazy ways.
But I've never had a problem with it.

To each his own. Live and let live. Etc.

--
.''`. Stephen Powell
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/1801908961.11483.1281469778081.JavaMail.root(a)md01.wow.synacor.com
From: Arthur Machlas on
> If you've looked at my kernel building web page,
> http://www.wowway.com/~zlinuxman/Kernel.htm, you will see that I
> don't cover this.  That's because I don't use it when I build my
> own custom kernels.  I do use it when building a "regular"
> Debian package, but for some reason I've never bothered with it for
> creating my own custom kernels.  I just log in as root and forget
> about it.  For some people, this seems to be a "religious" issue.
> But I never bother with it.  I just login as root and forget about it.
> So many of the steps require root authority (real root authority)
> that it's simpler for me just to stay root the whole time.
> If I ever get burned by it, I'll probably change my lazy ways.
> But I've never had a problem with it.
>
> To each his own.  Live and let live.  Etc.

A less religious explanation, from Greg Kroah-Hartman, author of The
Linux Kernel in a Nutshell, and well-known kernel hacker.

"This warning is the most important thing to remember while working through the
steps in this book. Everything in this book—downloading the kernel source code,
uncompressing it, configuring the kernel, and building it—should be done as a
normal user on the machine. Only the two or three commands it takes to install a
new kernel should be done as the superuser (root).
There have been bugs in the kernel build process in the past, causing
some special
files in the /dev directory to be deleted if the user had superuser
permissions while
building the Linux kernel.* There are also issues that can easily
arise when uncompressing
the Linux kernel with superuser rights, as some of the files in the kernel
source package will not end up with the proper permissions and will cause build
errors later.

* This took quite a while to fix, as none of the primary kernel
developers build kernels as root, so
they did not suffer from the bug. A number of weeks went by before it
was finally determined that
the act of building the kernel was the problem. A number of kernel
developers half-jokingly suggested
that the bug remain in, to help prevent anyone from building the
kernel as root, but calmer
heads prevailed and the bug in the build system was fixed." - Linux
Kernel in a Nutshell, p. 4


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTik1npU8sGoEbQAbbU4G23b-5aL_OuH4xTFO?J(a)mail.gmail.com
From: Alexander Samad on
[snip]
>>>
>>> I did trying using the packages for 2.6.35, but you can't install the
>>> headers because the linux-kbuild-2.6.35 is there
>>
>> Why do you want to install the headers if you already have the whole
>> kernel source code?  What are you trying to accomplish besides
>> building a custom kernel?
>
> I wanted the header file, so I could build the intel i915 modules, I
> was planning on taking the modules source that belong to that and try
> to compile against a debian kernel.

okay here is the problem with this, there are some extra steps needed
to use the kernel-source

so I installed the linux-image and the kernel-source package, boots up
great - but.... I can't compile my vb kernel modules - no header files
- I point it to /usr/src/<..> (unpacked kernel-source), doesn't
work...

What do I need to do :)

Alex

>
>>>>
>>>> A Debian source package for 2.6.35 is also
>>>> available in experimental: linux-source-2.6.35.
[snip]


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTi?+BsE_C9PcXxEGWGPmTZX1P0BS9ZÿrqN1T(a)mail.gmail.com