On Thursday 24 May 2007 1:37 pm, Akemi Yagi wrote:
On 5/24/07, dcw dwoody1@charter.net wrote:
(1) prepare .spec by removing lines from %prep (2) rpmbuild -bp kernel-2.6.spec (3) go to BUILD (where .config is) (4) make xconfig (5) add # i386 to .config as the first line (6) copy this .config back to SOURCES (using the original name xxx.config) (7) rpmbuild -ba kernel-2.6.spec
Or, instead of steps (5) to (7), just run:
I did 5 and 6 anyway, assuming that in the worst case they were not needed and would do no harm. I then did 'rpmbuild -bc ...' as below.
Does the rpmbuild -bc work only in the BUILD directory? Or does it work in the SOURCE directory? Will doing step 5 and 6 cause any problems?
It was working until gpg had a segfault. From some of the emails I have been reading this is a known problem that has not been fixed yet.
Other emails I have read indicated that signmodule should be set to 0. What is the down side risk of doing this?
All I can tell you is that 'signmodules' is set to 0 in my spec file. I did not change it, so that must have been CentOS's default (?).
There is sigmodules in several places in the SPEC file. The first one is set to '0' but the others are not. I prefer not setting singmodules to '0' unless I know what the risks are.
The last time I recompiled a kernel was when it was at 2.4.x. Is there a way to compile the kernel without using rpmbuild?
By the way, Johnny Hughes has kindly checked the above procedure and said, "that's what I do." This is a big assurance. I agree that your goal is almost there.
This is good, but what does he do to avoid segfaults?
Thanks,
David
Isn't Linux fantastic? Imagine trying this in Windows...
Akemi _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
-- RD Woodyard, Inc.
-------------------------------------------------------
On 5/24/07, dcw dwoody1@charter.net wrote:
Does the rpmbuild -bc work only in the BUILD directory? Or does it work in the SOURCE directory?
It will work anywhere that exists, as long as you point it to a properly set up .spec file.
However, unless you are doing short-circuit builds (-bc and -bi only), you CANNOT build in the BUILD/kernel-xxx/linux-xxx directory because the %prep deletes it and reconstructs it from scratch.
On 5/24/07, dcw dwoody1@charter.net wrote:
On Thursday 24 May 2007 1:37 pm, Akemi Yagi wrote:
On 5/24/07, dcw dwoody1@charter.net wrote:
(1) prepare .spec by removing lines from %prep (2) rpmbuild -bp kernel-2.6.spec (3) go to BUILD (where .config is) (4) make xconfig (5) add # i386 to .config as the first line (6) copy this .config back to SOURCES (using the original name xxx.config) (7) rpmbuild -ba kernel-2.6.spec Or, instead of steps (5) to (7), just run:
I did 5 and 6 anyway, assuming that in the worst case they were not needed and would do no harm. I then did 'rpmbuild -bc ...' as below.
Does the rpmbuild -bc work only in the BUILD directory? Or does it work in the SOURCE directory?
You can run it from anywhere as far as you use the full path.
Will doing step 5 and 6 cause any problems?
No. In fact, you do need these steps before running rpmbuild -bc. As I wrote earlier, you can skip these steps IF you run rpmbuild with the --short-circuit flag. The flag prevents rpmbuild from running the %prep stage, therefore the .config file does not need the # i386 line any more and there is no need to copy it back to SOURCE.
It was working until gpg had a segfault. From some of the emails I have been reading this is a known problem that has not been fixed yet.
There is sigmodules in several places in the SPEC file. The first one is set to '0' but the others are not. I prefer not setting singmodules to '0' unless I know what the risks are.
I don't really know if there are any serious cosequencies because of this, so I cannot advise here.
The last time I recompiled a kernel was when it was at 2.4.x. Is there a way to compile the kernel without using rpmbuild?
Yes, although I don't recommend it. If you are really determined to do it, I suggest you do a through study on kernel building. Compilation itself could be as simple as copying the entire source directory to a place and running a series of make commands (make, make modules_install make install). Depending on how you get the .config file, you may or may not need to run a ARCH=i386 make oldconfig before make menuconfig, etc, etc.
By the way, Johnny Hughes has kindly checked the above procedure and said, "that's what I do." This is a big assurance. I agree that your goal is almost there.
This is good, but what does he do to avoid segfaults?
I have not seen segfaults myself. It is possible that he has not, either.
Thanks,
David
I did some more investigation. After a cd to the BUILD directory, I ran 'make xconfig' and set the 3 items that I need. isa, isapnp and ne2000 support.
From the SPEC directory I ran 'rpmbuild -bc --short-circuit kernel-2.6.spec'. After about 4 minutes I looked at the contents of the .config file in the BUILD directory.
ALL 3 ITEMS I had selected had been DELETED.
I also noticed that rpmbuild -bc runs 'make mrproper'. From my 2.4.x days, I seem to remember that mrproper restores everything to original content. Is my memory correct?
Thanks,
David
On Thursday 24 May 2007 4:04 pm, Akemi Yagi wrote:
On 5/24/07, dcw dwoody1@charter.net wrote:
On Thursday 24 May 2007 1:37 pm, Akemi Yagi wrote:
On 5/24/07, dcw dwoody1@charter.net wrote:
(1) prepare .spec by removing lines from %prep (2) rpmbuild -bp kernel-2.6.spec (3) go to BUILD (where .config is) (4) make xconfig (5) add # i386 to .config as the first line (6) copy this .config back to SOURCES (using the original name xxx.config) (7) rpmbuild -ba kernel-2.6.spec Or, instead of steps (5) to (7), just run:
I did 5 and 6 anyway, assuming that in the worst case they were not needed and would do no harm. I then did 'rpmbuild -bc ...' as below.
Does the rpmbuild -bc work only in the BUILD directory? Or does it work in the SOURCE directory?
You can run it from anywhere as far as you use the full path.
Will doing step 5 and 6 cause any problems?
No. In fact, you do need these steps before running rpmbuild -bc. As I wrote earlier, you can skip these steps IF you run rpmbuild with the --short-circuit flag. The flag prevents rpmbuild from running the %prep stage, therefore the .config file does not need the # i386 line any more and there is no need to copy it back to SOURCE.
It was working until gpg had a segfault. From some of the emails I have been reading this is a known problem that has not been fixed yet.
There is sigmodules in several places in the SPEC file. The first one is set to '0' but the others are not. I prefer not setting singmodules to '0' unless I know what the risks are.
I don't really know if there are any serious cosequencies because of this, so I cannot advise here.
The last time I recompiled a kernel was when it was at 2.4.x. Is there a way to compile the kernel without using rpmbuild?
Yes, although I don't recommend it. If you are really determined to do it, I suggest you do a through study on kernel building. Compilation itself could be as simple as copying the entire source directory to a place and running a series of make commands (make, make modules_install make install). Depending on how you get the .config file, you may or may not need to run a ARCH=i386 make oldconfig before make menuconfig, etc, etc.
By the way, Johnny Hughes has kindly checked the above procedure and said, "that's what I do." This is a big assurance. I agree that your goal is almost there.
This is good, but what does he do to avoid segfaults?
I have not seen segfaults myself. It is possible that he has not, either.
Thanks,
David
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 5/24/07, dcw dwoody1@charter.net wrote:
I did some more investigation. After a cd to the BUILD directory, I ran 'make xconfig' and set the 3 items that I need. isa, isapnp and ne2000 support.
From the SPEC directory I ran 'rpmbuild -bc --short-circuit kernel-2.6.spec'. After about 4 minutes I looked at the contents of the .config file in the BUILD directory.
ALL 3 ITEMS I had selected had been DELETED.
I also noticed that rpmbuild -bc runs 'make mrproper'. From my 2.4.x days, I seem to remember that mrproper restores everything to original content. Is my memory correct?
Right, you don't want make mrproper at that step. If the --short-circuit flag is not working as it is supposed to, stick to the original method of going through steps 5 through 7. It is known to work.
Akemi
On 5/24/07, dcw dwoody1@charter.net wrote:
I did some more investigation. After a cd to the BUILD directory, I ran 'make xconfig' and set the 3 items that I need. isa, isapnp and ne2000 support.
From the SPEC directory I ran 'rpmbuild -bc --short-circuit kernel-2.6.spec'. After about 4 minutes I looked at the contents of the .config file in the BUILD directory.
ALL 3 ITEMS I had selected had been DELETED.
I also noticed that rpmbuild -bc runs 'make mrproper'. From my 2.4.x days, I seem to remember that mrproper restores everything to original content. Is my memory correct?
I normally use make menuconfig, but I'm wondering if the basic process is the same:
cd <rpm-build-base/BUILD/kernel*/linux*/ cp <rpm-base-dir>/SOURCES/<your-choice-of-config-file> .config make xconfig cp .config <rpm-base-dir>/SOURCES/<your-choice-of-config-file> cd <rpm-build-base>/SPECS rpmbuild ...
Whatever you create in the BUILD/kernel*/linux*/ directory is reconstructed from scratch UNLESS you are doing an rpmbuild -bc or -bi with --short-circuit, and that won't get you an rpm of the kernel, just the kernel itself.
The process you describe is the process I am using. There has been a couple of problems along the way. Only 1 problem has not been resolved.
If signmodules is set to 1 in the SPEC file for the arch that I have, then there is a segfault during the process when using 'rpmbuild -ba'. From the emails I have read, this is a known problem that has not been resolved.
I am currently running the process with all the fixes for the problems I have been having. This includes signmodules set to 0. Signmodules is defined in several places in the SPEC file.
I am concerned about the signmodules setting since I do not know what it does. It would seem to be important but I do not know. Are you knowledgeable about this or do you know where I can get information about it?
Thanks for your input,
David On Friday 25 May 2007 1:01 pm, Mark Hull-Richter wrote:
On 5/24/07, dcw dwoody1@charter.net wrote:
I did some more investigation. After a cd to the BUILD directory, I ran 'make xconfig' and set the 3 items that I need. isa, isapnp and ne2000 support.
From the SPEC directory I ran 'rpmbuild -bc --short-circuit kernel-2.6.spec'. After about 4 minutes I looked at the contents of the .config file in the BUILD directory.
ALL 3 ITEMS I had selected had been DELETED.
I also noticed that rpmbuild -bc runs 'make mrproper'. From my 2.4.x days, I seem to remember that mrproper restores everything to original content. Is my memory correct?
I normally use make menuconfig, but I'm wondering if the basic process is the same:
cd <rpm-build-base/BUILD/kernel*/linux*/ cp <rpm-base-dir>/SOURCES/<your-choice-of-config-file> .config make xconfig cp .config <rpm-base-dir>/SOURCES/<your-choice-of-config-file> cd <rpm-build-base>/SPECS rpmbuild ...
Whatever you create in the BUILD/kernel*/linux*/ directory is reconstructed from scratch UNLESS you are doing an rpmbuild -bc or -bi with --short-circuit, and that won't get you an rpm of the kernel, just the kernel itself.
On 5/25/07, dcw dwoody1@charter.net wrote:
The process you describe is the process I am using. There has been a couple of problems along the way. Only 1 problem has not been resolved.
If signmodules is set to 1 in the SPEC file for the arch that I have, then there is a segfault during the process when using 'rpmbuild -ba'. From the emails I have read, this is a known problem that has not been resolved.
I am currently running the process with all the fixes for the problems I have been having. This includes signmodules set to 0. Signmodules is defined in several places in the SPEC file.
I am concerned about the signmodules setting since I do not know what it does. It would seem to be important but I do not know. Are you knowledgeable about this or do you know where I can get information about it?
Would you please stop top-posting?
On 5/25/07, dcw dwoody1@charter.net wrote:
The process you describe is the process I am using. There has been a couple of problems along the way. Only 1 problem has not been resolved.
If signmodules is set to 1 in the SPEC file for the arch that I have, then there is a segfault during the process when using 'rpmbuild -ba'. From the emails I have read, this is a known problem that has not been resolved.
I am currently running the process with all the fixes for the problems I have been having. This includes signmodules set to 0. Signmodules is defined in several places in the SPEC file.
I am concerned about the signmodules setting since I do not know what it does. It would seem to be important but I do not know. Are you knowledgeable about this or do you know where I can get information about it?
David,
<preamble>I am not a kernel developer, so I could be totally wrong.</preamble>
My impression is that the gpg kernel module signing is something provided by distros (redhat, fedora?) and might not (yet) be in the mainline kernel. IF this is correct, that would imply that omitting this feature is not a serious concern. Especially, it you never load a module from unknown sources, you wouldn't have to worry about gpg signing. If I were you, I would go ahead and rebuild the kernel by turning off the signmodules option. To be able to use the NIC seems more critically important to you.
Once again, I could be wrong. It's your call.
Akemi
On Friday 25 May 2007 4:46 pm, Akemi Yagi wrote:
On 5/25/07, dcw dwoody1@charter.net wrote:
The process you describe is the process I am using. There has been a couple of problems along the way. Only 1 problem has not been resolved.
If signmodules is set to 1 in the SPEC file for the arch that I have, then there is a segfault during the process when using 'rpmbuild -ba'. From the emails I have read, this is a known problem that has not been resolved.
I am currently running the process with all the fixes for the problems I have been having. This includes signmodules set to 0. Signmodules is defined in several places in the SPEC file.
I am concerned about the signmodules setting since I do not know what it does. It would seem to be important but I do not know. Are you knowledgeable about this or do you know where I can get information about it?
David,
<preamble>I am not a kernel developer, so I could be totally wrong.</preamble>
My impression is that the gpg kernel module signing is something provided by distros (redhat, fedora?) and might not (yet) be in the mainline kernel. IF this is correct, that would imply that omitting this feature is not a serious concern. Especially, it you never load a module from unknown sources, you wouldn't have to worry about gpg signing. If I were you, I would go ahead and rebuild the kernel by turning off the signmodules option. To be able to use the NIC seems more critically important to you.
Your comments sound correct to me. I will not be installing modules that do not come from CentOS, so I should not have a problem.
Here is a recap of what happened: I followed the steps from an earlier posting from Akemi: (1) prepare .spec by removing lines from %prep (2) rpmbuild -bp kernel-2.6.spec (3) go to BUILD (where .config is) (4) make xconfig, as well as, adding the settings that I needed. I my case it was support for ISA, ISAPNP and NE2000. (5) edited the .config file in the BUILD dir: made '# i386' the first line in the .config file. (6) copy this .config back to SOURCES (using the original name xxx.config) 7) rpmbuild -ba kernel-2.6.spec
I had a problem with a segfault during the 'rpmbuild -ba' process. I changed the setting from 1 to 0 for the lines(multiple) that had: '#define signmodules 1'.
However, after the 'rpmbuild -ba' finished, I used 'find /home/cs/redhat -name ne.ko -print' and it did not find the module. I did a rpm --list of the kernel rpm and it was there however. (Sorry about the redhat -- it should have been centos.)
One other thing that caused me problems is that I did not know that rpmbuild would not create all the needed directories. ie. BUILD RPMS are 2 that I know of for sure.
I copied the kernel rpm to the gateway computer, did a 'rpm -ivh' for the new kernel and rebooted.
I then ran system-config-network and was able to setup the ne2000 card in less time than I takes to write about it.
Thanks for all your help, especially Akemi for staying with me during all this.
David
Once again, I could be wrong. It's your call.
Akemi _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 5/26/07, dcw dwoody1@charter.net wrote:
I copied the kernel rpm to the gateway computer, did a 'rpm -ivh' for the new kernel and rebooted.
I then ran system-config-network and was able to setup the ne2000 card in less time than I takes to write about it.
Thanks for all your help, especially Akemi for staying with me during all this.
David
Congratulations on your successful rebuilding. I am so happy for you. And don't forget to thank CentOS and, especially, Johnny Hughes whose input was indispensable in this endeavor.
Akemi