Changes

Jump to: navigation, search

LEAP SOP

2,801 bytes added, 22:40, 27 March 2016
no edit summary
== Fetching source ==
Source packages are located under 7.x folder directory on http://vault.centos.org/. There are several types of repository:
; os: Base packages
; extra: Extra packages such as docker, cockpit, golang, etc.
Source While there is no Rsync repository for CentOS source rpms , they can only be downloaded manually through yum or curl/wgetor yum. Therefore, since there creating a bash script to automate download processes is no Rsync repository for Centos source rpmshighly recommended.
== Determine problem ==
=== Common errors and solutions ===
; build.log - Code compilation error: <u>Reason</u>: Certain depended pulled library is too old
: <u>Solution</u>: Try to build all other packages and then rebuild this one
; build.log - Cannot detect system type
: <u>Reason</u>: The software uses outdated <tt>config.guess</tt> and <tt>config.sub</tt> to autodetect system type
: <u>Solution</u>: Replace both files in the source with the latest online version. See https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html
; build.log - Unknown system type
: <u>Reason</u>: The software only allows it to be built with kernel 2.6/3.x
: <u>Solution</u>: Add 4.x support to the system checking script(just a IF statement of checking version number)
; Build test/check failed: <u>Reason</u>: Can be random reasons or the software is just unable to run perfectly on AArch64: <u>Solution</u>: Try to look for solutions, otherwise comment out the <tt>%check</tt> section in spec file ; BuildError <span>:</span> No matching arches were found: <u>Reason</u>: Package only supports the specific architectures on the <tt>ExclusiveArch</tt> list in the spec file: <u>Solution</u>: Checkout similar version of the package on [http://arm.koji.fedoraproject.org Fedora ARM Koji ] and [http://buildlogs.centos.org/centos/7 CentOS AArch64 repo ] and determine whether the package is possible to support AArch64 or not ; Fail to patch: <u>Reason</u>: Wrong patches or sources were packed into the source rpm: <u>Solution</u>: Retrieve the original CentOS src.rpm and repack it again, see also: [[#Duplicated source name]]
=== Resources ===
# * Previous build of the package# * CentOS AArch64 repo: http://buildlogs.centos.org/centos/7# * Fedora ARM Koji: http://arm.koji.fedoraproject.org# * CentOS git repo (for reverting CentOS changes): http://git.centos.org* '''<span style="color:# GOOGLE!4885ed">G</span><span style="color:#db3236">O</span><span style="color:#f4c20d">O</span><span style="color:#4885ed">G</span><span style="color:#3cba54">L</span><span style="color:#db3236">E</span>'''
== Source modification ==
There a few standards to follow during modificationto make life easier:
* Add comments about any line changes
* Add the word ''LEAP'' at the beginning of any comments, for example:
ExclusiveArch: x86_64 aarch64
</source>
* When commenting out a existing line of code, add one more <tt>% </tt> before any rpm macro otherwise rpmbuild will complaintreat it as a error/warning. For instance:
<source lang=bash>
# Before commenting out
</source>
* Add ''<tt>.leap'' </tt> after the release version, add ''<tt>.leap.1''</tt>, ''<tt>.leap.2'' </tt> ... and so on for further modificationmodifications
* Make sure to specify all the changes under the <tt>%changelog</tt> section:
- Add AArch64 support
- Roll in LEAP Branding
 
</source>
=== Rebranding Re-branding ===The packages that contain the word ''extension <tt>.centos'' </tt> in their release version are branded packages. In order to properly rebranding re-branding those packages for LEAP, here is the checklist:* Replace the word ''"CentOS'' " or ''"CentOS Linux'' " with ''"LEAP'' ", and "centos" with "leap" in spec package descriptions and patches (make sure they are branding-related)* Replace CentOS branding patches with LEAP branding patchesone
** If certain patch file contains author name, regenerate the patch with your own name instead of modifying the patch directly
* Replace CentOS links with links for LEAP links accordingly
* Sometimes Red Hat trademarks and links have to be replaced as well
* Remove CentOS/RHEL certificate certificates, binaries, or any enterprise support files  ==== Particular cases ====; libreport / abrt: Libreport and abrt are the library and application for automatic bug detection and reporting to RHEL bug tracker servers. Since CentOS added several significant patches to both packages for supporting their own bug tracker, removing those patches can be very complicated process. The best way to solve this problem is retrieving the original RHEL versions from http://git.centos.org, add our own de-branding patches, and binariesbump the version-release number + ''.leap'' to match the requirements of dependency. ; ntp / chrony / PackageKit / system-config-date: These packages contain network time protocol configurations pointing to the NTP pool address: ''pool.VENDERZONE.ntp.org'' . By default, they are pointing to ''pool.centos.ntp.org''. Since ntp pool for LEAP hasn't been set up, it is necessary to remove any ''.VENDERZONE'' (system-config-date one has a different name) in the spec files instead of just replacing the brand.
; grub2 / shim / shim-signed / system-config-kdump
: There is a important variable <tt>efidir</tt> in the patches and specs in these packages. It represents the name of the EFI directory containing all the EFI boot files. Make sure the value of <tt>efidir</tt> changed to '''leap'''.
==== Particular branded packages ====; oscap-anaconda-addon / oscap-security-guide: TODO
; libreport/abrt== Build order ==It is safer and more time-efficient to build certain essential packages before any other packages are built, because other packages are very likely to depend on them: * '''Libreportleap-release''' and - the base of entire distribution* '''gcc''', '''abrtglibc''' are the library and application for automatic bug detection and reporting to RHEL bug tracker servers. Since CentOS added several significant patches to both packages for supporting their own bug tracker, removing those patches can be very complicated process. The best way to solve this problem is retrieving the original RHEL versions from http://git.centos.org'''make''', add our own de'''binutils''' -branding patches, and bump the versionbasic toolchain* '''coreutils''' -release number + basic system tools* '''.leapxorg-x11-server''' to match - xorg-x11-drv* always require the requirements specific version of dependency.xorg-x11-server they are built with
; ntp== Duplicated source name ==A few packages in the package set contain patches or sources having identical file names. When installing source rpms to rpmbuild tree (<tt>$HOME/chronyrpmbuild/Packagekit*</system-config-date: These packages contain network time protocol configurations pointing tt>), try to avoid installing too many of them at the NTP pool address: poolsame time (50+).VENDERZONE.ntp.org Wipe the rpmbuild tree after finishing modification and build of those packages on Koji. By default, they There are pointing to poola few problematic packages have been discovered:* '''java-1.centos7.ntp0-openjdk''' and '''java-1.org8. Since ntp pool for LEAP hasn0-openjdk'''* '''xorg-x11-drv-dummy''' and '''xorg-x11-drv-fbdev'''t been set up, it is necessary to remove any .VENDERZONE in the spec files in stead of just replacing the brand.
; grub2/shim/shim== Other special cases ==* '''libreoffice''' -signed/systemRequire at least 50GB of space to build* '''binutils''' -configwas intentionally upgraded to 2.24, be careful not to downgrade it.* '''httpd''' -kdump: There is a important variable <tt>efidircentos-noindex.tar.gz</tt> in the patches and specs in these packages. It represents the name of the EFI directory containing all the EFI boot files. Make sure the value of contains branded default webpages, replace it with <tt>efidirleap-noindex.tar.gz</tt> '''leap'''.from previous version of httpd
; oscap= Fixing broken dependencies =After all of the packages have been done, it's time to fix minor broken dependencies. <tt>repoclosure</tt> and <tt>leap-anacondaclosure-addonreport.sh</oscaptt> (by Chris Markieta) are the tools to check dependency stats of a repository. You should always check the build-securitytag repository since new packages may require some of the old packages. When a package requires a missing shared library file like <tt>xxxxx-guide: TODO3.so</tt>, it only need to be rebuilt again (if the library exists) in order to pick up the latest <tt>.so</tt> file from the latest version of required library.
=Package signing = Build order =Synchronizing Repositories =It is better and time-saving to build certain packages before any other packages, because other packages is likely to depend on them:* leap-release* gcc, glibc, make* coreutils* xorg-x11-server= Release =
More coming ...

Navigation menu