Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

28.4.11

Create Debian and RPM packages using OBS

Have you ever tried to create both Debian and RPM packages using OBS? Well, a little bit different from the package generation locally, but not that much ;)

Before continuing, you should prepare yourself with basic Debian and RPM packaging knowledge.

First, make a tar-ball for your source code, without any packaging information inside. Name it obs-sample.tar.gz.

Then for Debian packaging, you need the following files.
obs-sample_1.0.dsc: indicating you want to create a Debian package; the Files section is not needed, but the Build-Depends section is necessary.
debian.rules: the rules file for Debianization.
debian.control: the control file for Debianization.
debian.tar.gz: all the other files inside the debian folder.

For RPM packaging, you only need the .spec file as expected.

Finally, here goes the simple sample I created. Happy hacking!

14.7.09

Tricks & skills in Ubuntu

To delete unused kernels, use the following command:
sudo aptitude purge ~ilinux-image-.*\(\!`uname -r`\)

To delete the RC packages, use the following command:
dpkg -l | grep ^rc | cut -d' ' -f3| sudo xargs dpkg -P

Use this command to remove the unused configuration files:
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

Make sudo regards http_proxy etc., add in file /etc/sudoers:
Defaults env_keep += "http_proxy"