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 .

-----------


Friday, April 26, 2019

Print signed pdf documents (with verified signature)




pdf documents are digitally signed and sometimes you want to get printouts of same with valid digital signature.

So, how it can be done:

========================
Open the (signed) pdf document.


Click on the signature with "yellow question mark"

It opens up signature validation status.

  There is "signature properties" , click on it.


Click "show certificate" here.

There is "Trust" tab in "show certificate". click on "Add to trusted identities".
 -> OK.

Now, you click on "validate signature".

The "yellow question mark" becomes "green tick mark".

Now, your printout will reflect the "green tick mark".
========================

Tuesday, April 2, 2019

How to cleanly remove network (created by libvirtd)

How to cleanly remove  network (created by libvirtd)

// list all net devices
virsh net-list --all



// make it inactive
virsh net-destroy  



// Now it is be in inactive state, but not removed - so, remove it using
virsh net-undefine