GenerateRPMFromATagInGithub

From T2B Wiki
Revision as of 12:28, 26 August 2015 by Maintenance script (talk | contribs) (Created page with " === Description of the initial problem === It might happen that a ncm-component has been patched in Github, but that the RPM have not been re-created in the yum.quattor.org ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description of the initial problem

It might happen that a ncm-component has been patched in Github, but that the RPM have not been re-created in the yum.quattor.org repository. The solution is then to create your own "homebrew" RPM from the correct code and to put this RPM in a local repo, and to bring the necessary changes in the PAN templates to install the homebrew RPM from the local repo.

Git clone of a tag

The general procedure is the following :

git clone <repo-address>
git tag -l
git checkout <tag-name>
git branch -D master
git checkout -b master

Use of maven to build an RPM

  • First set up your environment :
    • Your must first make sure that Java from Oracle is installed and is the default.
    • Let's say that maven 3.1.1 has been installed in /root/maven/apache-maven-3.1.1 (the installation is explained here : http://maven.apache.org/download.cgi#Installation).
    • Set your env. var. to the correct values :
  export M2_HOME=/root/maven/apache-maven-3.1.1
  export M2=$M2_HOME/bin
  export PATH=$M2:$PATH
  export JAVA_HOME=/usr/java/jdk1.6.0_04
  export PATH=$JAVA_HOME:$PATH
  
  • Go into the directory of your component and edit the pom.xml file. Modify the value of the version tag. For example, if the version is 13.1.1, then append '-iihe' to it, this way the name of your homebrew RPM will be slightly different from the one that is in the official repo.
  • Run the maven command :
mvn rpm:rpm


Template:TracNotice