3

I would like to create an Ubuntu package from a single bash script I wrote.

Is there a simple instruction how to build an Ubuntu package, that can be uploaded to launchpad? (I already created the PPA and uploaded my PGP- and SSH-keys).

I already created successfully a debian package (with Packages.gz and a PPA hosted at github itself) but that package is missing the needed files that are required in this Ubuntu manual: Uploading a package to a PPA:

  • .dsc
  • .changes
  • .diff.gz or .debian.tar.gz
  • and optionally the .orig.tar.gz (if you used debuild -S -sa to build your package)

How do those files have to look like and how do I create them? (examples, commandline tools?)

rubo77
  • 32,486
  • I don't know about simple, but I followed the links from your post to this article about building a package for Ubuntu : http://packaging.ubuntu.com/html/ – Charles Green Jul 09 '14 at 15:06
  • The first paragraph there on 2. Getting Set Up already describes that you have to install pbuilder which installs some GB on your system, is this really needed for my case? (only one bash script is tested and that works well) – rubo77 Jul 09 '14 at 15:10
  • I'm gonna guess since pbuilder is the "package builder", that you will be better off if you do install it. Perhaps a package could be built by hand by someone with sufficient knowledge. – Charles Green Jul 09 '14 at 15:12
  • You do not need pbuilder to make a .deb from a bash script, but it automates the process and interfaces with launchpad (your ppa). See http://askubuntu.com/questions/27715/create-a-deb-package-from-scripts-or-binaries and http://packaging.ubuntu.com/html/ . There is no real replacement for reading the packaging guidelines if you wish to package a .deb "properly", meaning minimize problems for people who want to use your .deb . Also, without proper packaging, your .deb will never be accepted into the official repos. – Panther Jul 09 '14 at 15:24
  • Those files are created by running debuild -S -sa or debuild -S -sd. pbuilder is when you want to test building the package in a clean chroot (where only the minimal Ubuntu packages are present. This is to test that you have covered all necessary dependencies. – saiarcot895 Jul 09 '14 at 16:10
  • If I use debuild -S -sa I get this error: cannot find readable debian/changelog anywhere! – rubo77 Jul 09 '14 at 16:19
  • 1
    There a few files deemed essential while building a Debian package: debian/{changelog,compat,control,copyright,rules} and a few others. Most packaging tutorials talk about them. You can use the command dh_make -s -n will generate a set of sample files needed, which you can customize accordingly. – muru Jul 10 '14 at 01:34
  • @rubo77: Note that you also need to be inside and at the top level of the source code tree; the debian folder must be a subfolder of your current directory. – saiarcot895 Jul 11 '14 at 02:10

0 Answers0