Archive

Archive for the ‘fun’ Category

Conference Report – Flock 2014

August 13, 2014 Leave a comment

This years Flock conference was held at Prague, czech republic. This was my first trip to the Europe. I needed a Visa for this trip unlike my American friends. I got the visa in the last minute from the Consulate of czech republic, Los Angeles. The Visa officer needed an insurance of minimum 50000 Euro with Medical reparation and Evacuation converge.  My company Yahoo was able to get that sorted in time.  I attended lot of talks and workshops at Flock. I took notes on some of the sessions i attended. Here is my conference report

Status of COPR build service – by Miroslav suchy

 

https://fedorahosted.org/copr/wiki/UserDocs
https://copr.fedoraproject.org/

COPR is an automatic build system to build rpms. COPR allows users to select
Arch and system (target) , accepts src.rpm from the user and generates binary
rpms in the backend and creates repo as well.

Unlike koji COPR doesn’t need a ‘fas’ account to build rpms. Technically any one
can build rpms on COPR.

Due to public nature of COPR it uses Virtual Machines to build rpms. A virtual machine
is setup and mock is used inside the VM to build the rpm.

COPR currently runs on openstack. There are 1381 projects, 25k builds, 250 G of data,
and 1 TB/month data transfered in COPR as we speak. Koji/OBS was evaluated to use in
COPR but the decided against it for some reasons. OBS signing daemon might be used
with COPR to sign rpms in future.

* Mock is kind of slow, there is a GSOC project to speed it up using LVM snapshots *
* Radek Holy is working on docker for rpm builds *

It is important to note that redhat software collections are built on COPR. There
is a jenkins plugin available for COPR which lets users to trigger COPR builds
from jenkins. There is a copr-cli available to builds.

ARM architecture support, package signing are in future TODO.

Here is the video of the talk

 

 

UEFI – The great satan and you – by Adam

 

I am a fan of UEFI. I have been closely following UEFI development and support in Linux for a while. If you do not know about UEFI, Adam Williamson has an impressive write up about it at https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/

Adam started with what is UEFI and then moved on to explain how older BIOS works. Adam’s talk focused on Desktop machines

How BIOS work?

- Boots the 1st sector of disk
– Chainloading
– The bootloader is sneaked in between MBR and the partition

UEFI

- Defines an EFI executable format.
– EFI executable is copied into FAT filesystem and the firmware can read it
– UEFI boot manager is used to change the boot order and EFI variables.
– There is a fallback path if the EFI executable is not found on the specified path
– Supports BIOS mode named CSM. CSM is going away soon.

Adam proposed following tests to tell if your machine is UEFI?

- Machine is Windows 8 pre-installed. Then it is must have UEFI in it.
– The “firmware” has mouse support then it is UEFI (BIOS can’t do that sh*t)

Adam showed some screenshots of crazy UEFI firmware UI implementations that makes identifying it more difficult for the user.

While multibooting adam asked the users to install both OS in same mode. Mixing BIOS (CSM) and UEFI is discouraged and unsupported in Fedora.

Adam then proposed following special commands to write a USB stick with EFI support

- dd: use dd on usb sticks
– livecd-iso-to-disk: pass –efi –format -reset-mbr
– liveusb-creator: well..it might work
– DO NOT use Unetbootin

Adam then revealed that, Peter Jones and Matthew Garret lobbied Microsoft to enable option to disable secure boot. They even have weekly calls. The engagement with microsoft has been very professional. Microsoft takes UEFI signing seriously.

I asked peter about completely removing microsoft key from the firmware. He said it is a “bad” idea because ROM based firmwares won’t load and they are signed by the Microsoft key. He also mentioned that there is a complex workaround to this problem. The workaround is generating the hash of the firmware and adding it to the shim whitelist.

Here is the video of the talk

 

Fast OS Deployment with Anaconda – By Arun S A G (me)

 

I presented and showed a demo on how to deploy operating systems fast on bare metal
machines. The entire talk was well received by the anaconda team.

The demo showed installations of a  Fedora 21 (pre release) VM which took 2 minutes
to complete.  Most of the audience were pleasantly surprised.

  • There were some interesting thoughts and area for improvements came out of this talk
  •  RedHat developer proposed me to make use of the cloud kickstart file which has very minimal set of package
  • Peter Jones suggested that anaconda can/should be modified to produce tarballs as one of the build targets (anaconda right now supports iso targets)
  • Most of the installation time was spent on generating ramdisk. So peter suggested we should pre-generate the ramdisk and include it in the tarball.
  • rpmdb cache needs to be removed from the tarball.
  • Adam williamson asked me to share some sample kick-start files from work so that we can well test different use cases before releasing anaconda.
  • Automating the biosboot partition during the installation process was discussed

Here is the video of my talk

Overall it was a wonderful conference.  Thanks Yahoo and RedHat for sponsoring my travel and accommodation. It was good to see lot of volunteers again and i had a good time in Prague, Czech republic. I am looking forward to Flock 2015

Categories: conference, fedora, foss, fun Tags: , , ,

Trip to Sastra University – Trichy

February 6, 2012 1 comment

I was invited to visit Sastra universityTrichy for a workshop on Free Software. I joined with Aditya and Srishti at KPN office bangalore. We boarded an air-conditioned  sleeper coach by 11.30 P.M and reached Trichy by 6 AM. The road was bit bumpy, i couldn’t sleep much.  As expected Trichy was much warmer than Bangalore in the morning. Trichy main bus stand has couple of Kamaraj statues. Sristi was surprised to see the ‘Golden’ statues of kamaraj.

While we were discussing about kamaraj, our cab arrived. The Sastra university is 45 minutes drive from Trichy. It is located between Trichy and Tanjore. We were asked to stay at the Guest house.

By 10 A.M i started my session on Free Software at one of their ‘smart classrooms’. I explained students about free software and its importance. My second talk was on GNU/Linux Commands, the talk was based on Stanford universities open classroom session on PracticalUnix. Students tried various commands on their laptops as i explained them. Aditya introduced python and  Srishti introduced QT to students on the first day.

We  had a good dinner at ‘Canopy’ Sastra’s canteen which is being managed by students. We finished the dinner with a tasty creamy cold coffee sponsored by Srishti. I was very tired after travel; so i went to bed early.

After a good sleep, I started the second day by introducing Django to students. I explained Django by creating a small blogging application. Many students tried to follow my instructions and came up with the small blogging website (Yay!). Next I joined with Sristi and introduced git revision control system to students using Shakthi‘s ‘di-git-ally-managing-love-letters‘ presentation. The students loved it! Aditya did a workshop on puppet on the second day. We also met the I.T department professor and had a little talk. She presented us with a memento .

By 6.30 P.M we left the college by saying good bye. We had to board the bus at Tanjore. Tanjore is famous for its Brihadeeswarar Temple. It was built on 11th century. We visited the temple and spent some time there. After dinner , we boarded the bus back to Bangalore. Srishti took lot of pictures during the visit (will be uploaded soon)

I am going to FUDCon Pune 2011

October 11, 2011 Leave a comment
Categories: conference, fedora, foss, fun, Linux Tags: , ,

New package: Sqlninja

September 4, 2011 Leave a comment

sqlninja – http://sqlninja.sourceforge.net/download.html a candidate for Fedora security spin is now available in updates-testing repository

yum install –enablerepo=updates-testing sqlninja

The package currently does not include any payload binaries, they can be downloaded from http://sqlninja.svn.sourceforge.net/viewvc/sqlninja/scripts/

Categories: fedora, foss, fun, Linux, Packaging Tags: , , , ,

New Package: Python-requests – HTTP for Humans

August 17, 2011 Leave a comment

According to http://docs.python-requests.org/en/latest/index.html

Most existing Python modules for sending HTTP requests are extremely verbose and cumbersome. Python’s builtin urllib2 module provides most of the HTTP capabilities you should need, but the api is thoroughly broken. It requires an enormous amount of work (even method overrides) to perform the simplest of tasks.

Things shouldn’t be this way. Not in Python

Sample code

>>> r = requests.get(‘https://api.github.com’, auth=(‘user’, ‘pass’))
>>> r.status_code
204
>>> r.headers['content-type']
‘application/json’
>>> r.content

The same sample , without using requests would look like https://gist.github.com/973705. Requests library indeed reduces the lines of code we have to write to set up HTTP requests.

The new library is available as python-requests in  Fedora. You can test the packaging using the following command

yum –enablerepo=updates-testing install python-requests

Have fun!

Categories: fedora, foss, fun, Packaging, python Tags: , ,

Django , Interpolate two strings in a template

April 15, 2011 Leave a comment

While i was working on my weekend project http://downloader.zer0c00l.in/,  I had to concat  interpolate two strings inside a template,  first string was hard coded in the template and another one had to be passed from the view. Initially i tried something like

<a href="/view/logs/?page="{{ page }}> next </a>

That resulted in <a href=”/view/logs/?page=”>next</a> .  Django completely ignored the {{ page }}. After scratching my head for a long time i removed the quotes and rewrote the code into

<a href=/view/logs/?page={{ page }}> next </a>

That worked as expected.

Categories: django, fedora, foss, fun, python, webdev Tags: ,

Behaviour of ConfigParser.read() – Python

February 7, 2011 1 comment

I am playing around with python for a while. My code uses ConfigParser to parse a piece of configuration file. Now the documentation says ConfigParser.read() accepts list of file names as an argument and tries to read them one by one and returns the list of files that are read successfully.This behaviour is helpful when you have multiple configuration files all across your system.

what the documentation doesn’t tell you is, which configuration file it will use for further processing in case of multiple successful reads. ConfigParser actually uses the last read file for further processing. So prioritize your  configuration files accordingly

import ConfigParser

config_parser = ConfigParser.ConfigParser()

filenames = ['low_priority_file','medium_priority_file','high_priority_file']

config_parser.read(filenames)

Categories: fedora, foss, fun, hack, python Tags: , ,
Follow

Get every new post delivered to your Inbox.

Join 882 other followers