<div class="gmail_quote">On Sat, Apr 7, 2012 at 5:42 PM, Johnny Hughes <span dir="ltr"><<a href="mailto:johnny@centos.org">johnny@centos.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 04/07/2012 08:24 AM, Peter Penzov wrote:<br>
> I have some more questions:<br>
<br>
You are still top posting ... please don't. <br></blockquote><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><br>
> 1. Do you use a cluster for building the source code or you take the<br>
> SRPMs and manually copy/paste them into the building systems?<br>
<br>
</div>There are any number of build systems out there for different things.<br>
There is the OBS (Open Build System from open SUSE ... Dell uses this<br>
alot), Koji (the Scientific Linux system uses this), or plague (we use<br>
this for CentOS-4 and CentOS-5).<br>
<br>
However, we wrote our own build system for CentOS-6.<br>
<br>
We basically use a beanstalk queue. However, what you use does not<br>
matter. I still use scripts like the ones we initially used at the very<br>
beginning of CentOS-3 as well.<br>
<div class="im"><br>
<br>
<br>
> 2. What tool do you use to find differences into SRPMs? I don't believe<br>
> that you extract the packets manually and compate the code with diff<br>
> tool every time.<br>
<br>
</div>There is NO PROGRAM that I use. I am a Unix system admin. If I want to<br>
do something, I use the tools I have been using for 20 years to do it.<br>
<br>
In the case of looking at the inside of an SRPM, I would personally do<br>
it this way.<br>
<br>
1. Download the redhat SRPM from here (for example, lets do the latest<br>
firefox):<br>
<br>
<br>
<a href="ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Client/en/os/SRPMS/firefox-10.0.3-1.el6_2.src.rpm" target="_blank">ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Client/en/os/SRPMS/firefox-10.0.3-1.el6_2.src.rpm</a><br>
<br>
and the centos SRPM<br>
<br>
<a href="http://vault.centos.org/6.2/updates/Source/SPackages/firefox-10.0.3-1.el6.centos.src.rpm" target="_blank">http://vault.centos.org/6.2/updates/Source/SPackages/firefox-10.0.3-1.el6.centos.src.rpm</a><br>
<br>
2. Now you need to extract the SRPMS in to separate directories. There<br>
are many ways to do this. 2 ways are are to use "rpm2cpio" ...OR...<br>
"rpm -Uvh"<br>
<br>
If all want to do is to see the differences and not rebuild the pack, I<br>
would use rpm2cpio like this:<br>
<br>
a. create a separate directory and put each SRPM in there.<br>
<br>
b. extract the RedHat SRPM like this:<br>
rpm2cpio firefox-10.0.3-1.el6_2.src.rpm | cpio -idv<br>
<br>
c. go to the directory with the CentOS SRPM in it and do this:<br>
rpm2cpio firefox-10.0.3-1.el6.centos.src.rpm | cpio -idv<br>
<br>
d. now do a diff of the two directories:<br>
diff -uNrp RHEL/ CentOS/<br>
<br>
The output looks like this:<br>
<br>
<a href="http://pastebin.centos.org/38641" target="_blank">http://pastebin.centos.org/38641</a><br>
<br>
So, you can see that besides the actual SRPM files (which you know are<br>
different and line 1 and 2 in the link) ... there are 3 other differences.<br>
<br>
We added a file named "firefox-centos-default-prefs.js" (lines 4-18) and<br>
removed a file named "firefox-redhat-default-prefs.js" (lines 20-34).<br>
<br>
We also modified the SPEC file (lines 36-58)<br>
<br>
(The changes are changing the name redhat to centos for sources 12 and<br>
13 and a changelog entry ... note that since this is centos6 there is no<br>
source 13)<br>
<br>
3. Every other file in those two directories are the same.<br>
<br>
=========================================================<br>
<br>
How would I compare every file ... I would script something to do it.<br>
<br>
You could also create one directory named firefox, and you could (if you<br>
had rpm and rpmbuild installed) also do it this way:<br>
<br>
1. download both files.<br>
<br>
2. Install the CentOS SRPM like this:<br>
<br>
rpm --define "_topdir `pwd`" firefox-10.0.3-1.el6.centos.src.rpm<br>
mv SOURCES SOURCES.centos<br>
mv SPECS SPECS.centos<br>
<br>
3. Install the Red Hat SRPM like this:<br>
<br>
rpm --define "_topdir `pwd`" firefox-10.0.3-1.el6_2.src.rpm<br>
mv SOURCES SOURCES.rhel<br>
mv SPECS SPECS.rhel<br>
<br>
4. do diffs for each dir like this:<br>
<br>
diff -uNrp SPECS.rhel/ SPECS.centos/ > SPECS.diff<br>
diff -uNrp SOURCES.rhel/ SOURCES.centos/ > SOURCES.diff<br>
<br>
========================================================<br>
If you want to have a local git repo that tracks the differences, you<br>
could do this instead:<br>
<br>
1. download both files, put them in a firefox dir.<br>
<br>
2. Install the RHEL SRPM (the original file):<br>
<br>
rpm --define "_topdir `pwd`" firefox-10.0.3-1.el6_2.src.rpm<br>
<br>
3. add the SPECS and SOURCES directories to the git repo (I don't like<br>
to add bzipped or gzipped or tar files to git, so I exclude those from<br>
the repos):<br>
<br>
cd SPECS; git add *; cd ../<br>
<br>
cd SOURCES; git add $(ls | egrep -v "\.bz2|\.gz|\.tar"); cd ../<br>
<br>
4. commit the changes to the git repo so you can track the centos<br>
changes later:<br>
<br>
git commit -m "initial rhel rpm imported"<br>
<br>
5. Repeat steps 2, 3 for the CentOS SRPM ...<br>
<br>
a. Now you can see the spec diff doing:<br>
<br>
git diff SPECS/<br>
<br>
b. or the SOURCES diff doing:<br>
<br>
git diff SOURCES/<br>
<br>
6. Now you can commit the CentOS changes to git:<br>
<br>
git commit -m "initial centos rpm imported"<br>
<br>
===============================================================<br>
I am not going to also tell you how to do it for svn or some other VCS<br>
system ... the bottom line is that there are a hundred different ways to<br>
extract the original SRPMS and make changes and track the changes.<br>
<br>
Once you do the changes to the SPEC file and the SOURCES, you rebuild<br>
the SRPM and then submit that SRPM somehow to a build system (mock,<br>
build locally, plague, koji, brew, OBS, ect.). You can have any number<br>
of build systems.<br>
<br>
This is not rocket science ...<br>
<br>
<br>_______________________________________________<br>
CentOS-devel mailing list<br>
<a href="mailto:CentOS-devel@centos.org">CentOS-devel@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos-devel" target="_blank">http://lists.centos.org/mailman/listinfo/centos-devel</a><br>
<br></blockquote></div><br>Yes it will be very difficult to create a custom build.<br><br>I want to ask you a very specific question:<br>If I decide to create my custom build from Red Hat Linux (with removed Red Hat logos, red color and etc in order not to violate the GPL license) and I just change the name with my own are there going to be any build problems? <br>
<br>I'm not interested in becoming a competitor in Red Hat's support businesses I just want open source OS certified for installation by Oracle database which I can custom modify. I'm not interested in any kernel code modification or package source code modification. I just want to build custom OS with just changed name and color. Maybe deployed on no more that 20 servers. <br>
<br>If I build from source Red Hat just with change name and color are there going to be any problems like dependency problems package source code problems and etc, left by Red Hat to make the life of the competitors terrible? I'm not interested what are they just answer me with YES or NO. I'm sure that you have insight development information about this.<br>