[CentOS-devel] source code of Centos

Nico Kadel-Garcia nkadel at gmail.com
Sun Jan 25 05:05:18 UTC 2015


On Sat, Jan 24, 2015 at 11:01 PM, Rock Lee <rocklee_104 at sina.com> wrote:
>
>>On Wed, Jan 21, 2015 at 9:01 PM, Rock Lee <rocklee_104 at sina.com> wrote:
>>> Hi:
>>>
>>>      I want to make a linux OS based on Centos recently. I searched on
>>> Google several days, but still can't find the whole source code of Centos.
>>> Is there any way to get the whole source code of Centos, like android, just
>>> do a few command and then get the image files
>>
>>The short answer is "no". CentOS is mostly a clean rebuild of RHEL,
>>and for their latest release, RHEL has decided to publish the publicly
>>available source code at https://git.centos.org/. Setting up the build
>>tree to build the whole thing from source, including the build
>>environments, is a lot of time and resources that I suspect you do
>>*not* want to invest months in, and it takes  hundreds if not
>>thousands of hours on a modest system to build that while thing from
>>scratch. Basically, you can do it, but you'll always be chasing
>>updates and errata and minor copyright or trademark or license issues
>>to keep it maintained.
>>
>>
>>There are several free, quite usable rebuilds of RHEL, including
>>CentOS and Scientific Linux (which have different policies about
>>add-on tools). So I urge you not to go there: if you need a few
>>packages modified, it should be straightforward to use "mock" to build
>>packages, add a yum repository at OS installation time, and pull the
>>relevant packages from your personal repository. This approach is very
>>common and can work very well. I use it to publish samba 4.1.x with
>>full domain controller features activated for RHEL 6 based operating
>>systems.
>>_______________________________________________
>>CentOS-devel mailing list
>>CentOS-devel at centos.org
>>http://lists.centos.org/mailman/listinfo/centos-devel
>>
>>
> Hi, Nico & Stephen:
> Thanks for your reply. It is really a daunting work to build the whole thing.
> Actually, what I need to modify are linux kernel and several tools,  like e2fsprogs,
> for example. After build my personal packages, how to add a yum repository
> at OS installation time? BTW, when installing the OS, how can I format  disk with
> my personal tools?

I think this should  be in the "users" discussion list, as it's not so
much for developing CentOS as it is sys-admin configuration
information. But that's just me.

The easy way to do this is to use kickstart and use '%pre' statements
to download as needed and apply your personal tools. That way, you
don't need to burn a new DVD image. You can just pre-set the
partitioning. I've done this with great success since...... Red Hat
5.2. Not RHEL or CentOS 5.2, but Red Hat 5.2 in. Oh, Oh, my, Back in
1999, when I used it to redeploy operating systems on hardware with 2
disks, by freeing up he second disk, installing the new OS there,
rebooting with it, and pushing the OS back to the first disk.

You can do a *lot* of non-anaconda supported work with %pre, %post,
and %post --nochroot operations in kickstart. This not only includes
activating an additional yum repository, but even installing third
party software that is not available via yum, or running tools like
"chef" or "cfengine" to complete local configurations. As long as your
packages don't conflict with the CentOS base installation, you can do
the yum setup and your own  package deployments after the base install
is done.

If you need a different kernel for hardware support, that takes more
work. Will you need that?


More information about the CentOS-devel mailing list