Re: How to customize a release?

2004-09-03 Thread Ruslan Ermilov
Hi Chris,

On Thu, Sep 02, 2004 at 04:19:18PM -0400, John Baldwin wrote:
 On Thursday 02 September 2004 04:07 pm, [EMAIL PROTECTED] wrote:
  John,
  Thanks for the quick reply.
 
   There is a 'KERNELS' variable that is helpful.
 
  I see this in the Makefile, but if I were to use KERNELS=MYKERNEL will
  that prevent the other standard kernels from being built?
 
Let me know if you believe this is unclear and should be improved (from the
release(7) manpage):

:  release.3Makes and installs the GENERIC kernel as well as any
   ^^^^^
:   other kernels listed in KERNELS.
^^^
: 
:  KERNELS  Specifies a list of additional kernel configura-
  ^
:   tions to compile and install into the ``base'' dis-
:   tribution.  Each kernel is installed into
:   /boot/config so that it can be booted from the
:   loader via ``boot config''.


   Also, look at LOCAL_PATCHES and LOCAL_SCRIPTS as far as how to patch a
   release build.  Note that you can include patches to
   src/release/Makefile in LOCAL_PATCHES if need be. :)
 
  LOCAL_PATCHES is what I'm using now (waiting for build to finish to see
  how it worked). I was hoping for a way to populate the src tree without
  doing a full release so I could create the patches, then run make release
  only once (it took 5 hours on my devel system last time).  At this point
  I've already done that, but for the next time I'd like to work more
  efficiently.
 
What do you mean, I don't get it?

  BTW, I see I overlooked the RELEASENOUPDATE variable in the man page, so
  that answers my question about preventing CVS updates on make rerelease.
  Unfortunately make rerelease didn't rebuild anything in /R/stage (I got
  ftp.1 is up to date). Am I supposed to delete the stage directories to
  force a rebuild, or do I need to do a full release to incorporate any
  minor changes?
 
 I just delete the files in ${CHROOTDIR}/usr/obj/usr/src/release to get it to 
 rebuild the targets I want.
 
So do I.

One more hint: suppose you want to rebuild world inside the chroot.  Then
you have two options with make rerelease: one is to *not* use RELEASENOUPDATE
-- it will then use CVS to update your source tree (beware this doesn't work
if you ran make release with EXTSRCDIR).  Another is to run make rerelease
with RELEASENOUPDATE and remove ${CHROOTDIR}/tmp/.world_done before doing it.
In any case, buildworld will be rebuilt with -DNOCLEAN, which should be fast.
To force rebuild of other stages, you need to remove particular files under
${CHROOTDIR}/usr/obj/usr/src/release/ (as has been already mentioned).


Cheers,
-- 
Ruslan Ermilov
[EMAIL PROTECTED]
FreeBSD committer


pgpKqVKAv3V9I.pgp
Description: PGP signature


Re: How to customize a release?

2004-09-03 Thread ctodd

 Let me know if you believe this is unclear and should be improved (from the
 release(7) manpage):

 :  release.3Makes and installs the GENERIC kernel as well as any
^^^^^
 :   other kernels listed in KERNELS.
 ^^^
 :
 :  KERNELS  Specifies a list of additional kernel configura-
   ^
 :   tions to compile and install into the ``base'' dis-
 :   tribution.  Each kernel is installed into
 :   /boot/config so that it can be booted from the
 :   loader via ``boot config''.

This must exist in the 5.x man pages, I'm working with 4.x systems :

 release.3   Builds and installs ``crypto'', ``krb4'' and ``krb5''
 distri-butions.
 release.4   Makes and installs the GENERIC kernel.

There is no reference to the KERNELS variable in the 4.x version of the
man page although it does exist in the Makefile. So this explains why you
think I hadn't RTFM ;-)

Thanks for your help, between you and John I think I've got this mostly
figured out.

Regards,
Chris
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to customize a release?

2004-09-03 Thread Ruslan Ermilov
On Fri, Sep 03, 2004 at 01:04:19AM -0700, [EMAIL PROTECTED] wrote:
 
  Let me know if you believe this is unclear and should be improved (from the
  release(7) manpage):
 
  :  release.3Makes and installs the GENERIC kernel as well as any
 ^^^^^
  :   other kernels listed in KERNELS.
  ^^^
  :
  :  KERNELS  Specifies a list of additional kernel configura-
^
  :   tions to compile and install into the ``base'' dis-
  :   tribution.  Each kernel is installed into
  :   /boot/config so that it can be booted from the
  :   loader via ``boot config''.
 
 This must exist in the 5.x man pages, I'm working with 4.x systems :
 
  release.3   Builds and installs ``crypto'', ``krb4'' and ``krb5''
  distri-butions.
  release.4   Makes and installs the GENERIC kernel.
 
 There is no reference to the KERNELS variable in the 4.x version of the
 man page although it does exist in the Makefile. So this explains why you
 think I hadn't RTFM ;-)
 
 Thanks for your help, between you and John I think I've got this mostly
 figured out.
 
I've just updated the release(7) manapge in RELENG_4, merging all
documentation changes from HEAD that were relevant.  You might
want to update and re-read it.


Cheers,
-- 
Ruslan Ermilov
[EMAIL PROTECTED]
FreeBSD committer


pgpKOda3WZQXj.pgp
Description: PGP signature


Re: How to customize a release?

2004-09-03 Thread Christian Brueffer
On Thu, Sep 02, 2004 at 11:01:31PM +0300, Ruslan Ermilov wrote:
 On Thu, Sep 02, 2004 at 03:38:26PM -0400, John Baldwin wrote:
  On Thursday 02 September 2004 03:21 pm, [EMAIL PROTECTED] wrote:
   I'm looking for information on how to properly customize a FreeBSD
   distribution when using the make release framework. Specifically I need
   to modify some config files to default to serial console and fast baud
   rate, and use a custom kernel configuration (not just hack the GENERIC
   conf file).
  
   The documentation on the FreeBSD site covers how to build a release, but
   other than a few hints I'm not finding and references on the correct way
   to _customize_ the release. I did find a site that discusses building a
   release, mirroring the usr/src tree from that release directory, modifying
   the source, then creating a diff patch that's used on a subsequent make
   release. If it works as advertised, this is somewhat helpful other than
   waiting an entire day for multiple release builds to finish.
  
   Is there a way to populate the build area with the source, then apply my
   own patches prior to running a full make release? I tried make
   release.1 but this totally ignored my CHROOTDIR and tried to create /R
   in my root partition :-(.
  
   Also I noted that make rerelease updates the source from CVS which is
   undesirable in my case since I already have fresh source that was used
   to create patches, and if any of those original files changed my patches
   could fail. Can CVS updates be turned off for subsequent builds?
  
   Lastly, KERNCONF seems to have no relevance in make release. How can I
   force a non generic kernel to be used when building the release?
  
  There is a 'KERNELS' variable that is helpful.  Also, look at LOCAL_PATCHES 
  and LOCAL_SCRIPTS as far as how to patch a release build.  Note that you can 
  include patches to src/release/Makefile in LOCAL_PATCHES if need be. :)
  
 I'd say, please read the release(7) manpage.
 

The FreeBSD from Scratch article might also be useful for you:

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/fbsd-from-scratch/

- Christian

-- 
Christian Brueffer  [EMAIL PROTECTED]   [EMAIL PROTECTED]
GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc
GPG Fingerprint: A5C8 2099 19FF AACA F41B  B29B 6C76 178C A0ED 982D


pgpQ87eduIzqk.pgp
Description: PGP signature


Re: How to customize a release?

2004-09-03 Thread ctodd

 I've just updated the release(7) manapge in RELENG_4, merging all
 documentation changes from HEAD that were relevant.  You might
 want to update and re-read it.

Cool, thanks!

Chris
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


How to customize a release?

2004-09-02 Thread ctodd

I'm looking for information on how to properly customize a FreeBSD
distribution when using the make release framework. Specifically I need
to modify some config files to default to serial console and fast baud
rate, and use a custom kernel configuration (not just hack the GENERIC
conf file).

The documentation on the FreeBSD site covers how to build a release, but
other than a few hints I'm not finding and references on the correct way
to _customize_ the release. I did find a site that discusses building a
release, mirroring the usr/src tree from that release directory, modifying
the source, then creating a diff patch that's used on a subsequent make
release. If it works as advertised, this is somewhat helpful other than
waiting an entire day for multiple release builds to finish.

Is there a way to populate the build area with the source, then apply my
own patches prior to running a full make release? I tried make
release.1 but this totally ignored my CHROOTDIR and tried to create /R
in my root partition :-(.

Also I noted that make rerelease updates the source from CVS which is
undesirable in my case since I already have fresh source that was used
to create patches, and if any of those original files changed my patches
could fail. Can CVS updates be turned off for subsequent builds?

Lastly, KERNCONF seems to have no relevance in make release. How can I
force a non generic kernel to be used when building the release?

Chris
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to customize a release?

2004-09-02 Thread John Baldwin
On Thursday 02 September 2004 03:21 pm, [EMAIL PROTECTED] wrote:
 I'm looking for information on how to properly customize a FreeBSD
 distribution when using the make release framework. Specifically I need
 to modify some config files to default to serial console and fast baud
 rate, and use a custom kernel configuration (not just hack the GENERIC
 conf file).

 The documentation on the FreeBSD site covers how to build a release, but
 other than a few hints I'm not finding and references on the correct way
 to _customize_ the release. I did find a site that discusses building a
 release, mirroring the usr/src tree from that release directory, modifying
 the source, then creating a diff patch that's used on a subsequent make
 release. If it works as advertised, this is somewhat helpful other than
 waiting an entire day for multiple release builds to finish.

 Is there a way to populate the build area with the source, then apply my
 own patches prior to running a full make release? I tried make
 release.1 but this totally ignored my CHROOTDIR and tried to create /R
 in my root partition :-(.

 Also I noted that make rerelease updates the source from CVS which is
 undesirable in my case since I already have fresh source that was used
 to create patches, and if any of those original files changed my patches
 could fail. Can CVS updates be turned off for subsequent builds?

 Lastly, KERNCONF seems to have no relevance in make release. How can I
 force a non generic kernel to be used when building the release?

There is a 'KERNELS' variable that is helpful.  Also, look at LOCAL_PATCHES 
and LOCAL_SCRIPTS as far as how to patch a release build.  Note that you can 
include patches to src/release/Makefile in LOCAL_PATCHES if need be. :)

-- 
John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/
Power Users Use the Power to Serve  =  http://www.FreeBSD.org
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to customize a release?

2004-09-02 Thread Ruslan Ermilov
On Thu, Sep 02, 2004 at 03:38:26PM -0400, John Baldwin wrote:
 On Thursday 02 September 2004 03:21 pm, [EMAIL PROTECTED] wrote:
  I'm looking for information on how to properly customize a FreeBSD
  distribution when using the make release framework. Specifically I need
  to modify some config files to default to serial console and fast baud
  rate, and use a custom kernel configuration (not just hack the GENERIC
  conf file).
 
  The documentation on the FreeBSD site covers how to build a release, but
  other than a few hints I'm not finding and references on the correct way
  to _customize_ the release. I did find a site that discusses building a
  release, mirroring the usr/src tree from that release directory, modifying
  the source, then creating a diff patch that's used on a subsequent make
  release. If it works as advertised, this is somewhat helpful other than
  waiting an entire day for multiple release builds to finish.
 
  Is there a way to populate the build area with the source, then apply my
  own patches prior to running a full make release? I tried make
  release.1 but this totally ignored my CHROOTDIR and tried to create /R
  in my root partition :-(.
 
  Also I noted that make rerelease updates the source from CVS which is
  undesirable in my case since I already have fresh source that was used
  to create patches, and if any of those original files changed my patches
  could fail. Can CVS updates be turned off for subsequent builds?
 
  Lastly, KERNCONF seems to have no relevance in make release. How can I
  force a non generic kernel to be used when building the release?
 
 There is a 'KERNELS' variable that is helpful.  Also, look at LOCAL_PATCHES 
 and LOCAL_SCRIPTS as far as how to patch a release build.  Note that you can 
 include patches to src/release/Makefile in LOCAL_PATCHES if need be. :)
 
I'd say, please read the release(7) manpage.


Cheers,
-- 
Ruslan Ermilov
[EMAIL PROTECTED]
FreeBSD committer


pgpoiYMD5MKux.pgp
Description: PGP signature


Re: How to customize a release?

2004-09-02 Thread ctodd

John,
Thanks for the quick reply.

 There is a 'KERNELS' variable that is helpful.

I see this in the Makefile, but if I were to use KERNELS=MYKERNEL will
that prevent the other standard kernels from being built?

 Also, look at LOCAL_PATCHES and LOCAL_SCRIPTS as far as how to patch a
 release build.  Note that you can include patches to
 src/release/Makefile in LOCAL_PATCHES if need be. :)

LOCAL_PATCHES is what I'm using now (waiting for build to finish to see
how it worked). I was hoping for a way to populate the src tree without
doing a full release so I could create the patches, then run make release
only once (it took 5 hours on my devel system last time).  At this point
I've already done that, but for the next time I'd like to work more
efficiently.

BTW, I see I overlooked the RELEASENOUPDATE variable in the man page, so
that answers my question about preventing CVS updates on make rerelease.
Unfortunately make rerelease didn't rebuild anything in /R/stage (I got
ftp.1 is up to date). Am I supposed to delete the stage directories to
force a rebuild, or do I need to do a full release to incorporate any
minor changes?

Chris
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to customize a release?

2004-09-02 Thread ctodd

 I'd say, please read the release(7) manpage.

Ruslan,
I appreciate the tip, but I've read all available information I
could find including the man pages. The underlying problem here is there
is a lack of information on the inner workings of the release framework.
The subject matter is here's how we make a release for FreeBSD, but
there's no how-to incorporate your own src changes and roll your own.
I was 14 pages into google.com/bsd before I found this :

http://alumni.cse.ucsc.edu/~brucem/fbsd_sysgen.htm#make_dist

see How do I add custom modifications to the release I build?

While it sounds like it should work, I question whether this is the most
efficient way to accomplish this, and that is why I've turned to the
freebsd-hackers list. Using the above I have to run make release twice
(at 5 hours each currently) to accomplish my changes when it seems
reasonable that I should be able to :

CVS the source
Apply Patches
make release

make rerelease appears as if it should be able to suck in minor changes,
but I've not had such luck so far.

I understand that these lists get a lot of newbie questions, but I've
spent many hours using all resources that were available (Handbook, RTFM,
list archives, Google, Usenet) before posting my questions. I'm just
hoping to get some further clarity from those that have already been
through this.

Thanks again.

Chris
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to customize a release?

2004-09-02 Thread John Baldwin
On Thursday 02 September 2004 04:07 pm, [EMAIL PROTECTED] wrote:
 John,
   Thanks for the quick reply.

  There is a 'KERNELS' variable that is helpful.

 I see this in the Makefile, but if I were to use KERNELS=MYKERNEL will
 that prevent the other standard kernels from being built?

  Also, look at LOCAL_PATCHES and LOCAL_SCRIPTS as far as how to patch a
  release build.  Note that you can include patches to
  src/release/Makefile in LOCAL_PATCHES if need be. :)

 LOCAL_PATCHES is what I'm using now (waiting for build to finish to see
 how it worked). I was hoping for a way to populate the src tree without
 doing a full release so I could create the patches, then run make release
 only once (it took 5 hours on my devel system last time).  At this point
 I've already done that, but for the next time I'd like to work more
 efficiently.

 BTW, I see I overlooked the RELEASENOUPDATE variable in the man page, so
 that answers my question about preventing CVS updates on make rerelease.
 Unfortunately make rerelease didn't rebuild anything in /R/stage (I got
 ftp.1 is up to date). Am I supposed to delete the stage directories to
 force a rebuild, or do I need to do a full release to incorporate any
 minor changes?

I just delete the files in ${CHROOTDIR}/usr/obj/usr/src/release to get it to 
rebuild the targets I want.

-- 
John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/
Power Users Use the Power to Serve  =  http://www.FreeBSD.org
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]