Friday, June 28, 2019

Get the specific release where your commit is merged



In a specific release your commit is merged. 
So, how do you get the specific release in which your PR is merged ?

1. first get the commit hash of the PR.

2. Then , try this:

git tag --contains <commit id>


The lowest one in the above command's output is where your commit is first merged.

Thanks for the tip Niels!

Wednesday, June 26, 2019

vim variables to set for ansible




vim variables to set for ansible

vim
:set ai ts=2 sw=2  et

ai  => autoindent
ts  => tabstop=2
sw => shiftwidth=2
et => expandtab


Remember it using "aits sweet"  :) 

--

set cursorline

--

autocmd   FileType   yaml    setlocal    ai ts=2 sw=2  et  

--


Adding a new patch to rpm based package


Adding a new patch to rpm based package

--

Setting up rpmbuild environment : 

mkdir ~/rpmbuild

cd ~/rpmbuild

mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS,}

cp v1.1.0.tar.gz     *.patch     /root/rpmbuild/SOURCES/

--

# Clone the package
git clone <your package name>


# first build it with current sources and patches:
rpmbuild -bb  <package name>.spec  --noclean

Note: prior to the above step, clean the *older* sources if present :
    rm -rf /root/rpmbuild/SOURCES/*

# cd to the source code
cd /home//rpmbuild/BUILD/<package name>

# initialize git
git init .

# add all
git add .

# make initial commit
git commit -s "initial"

# making your new changes
// now make changes.

git add    <new files/ patched files>

# commit the changes
git commit -s "give relevant comment here"

# create a patch
git format-patch -1

# Now copy the patch to  source location and make relevant changes in  <package name>.spec.

# Now you can build the rpm package with this new patch as well .

-----------