1

I'm new in Ubuntu. I'm a web dev and have created html app using electron.

There are a lot of instruction how to create a deb package. So now I have built a .deb package and can install it. However I couldn't find some issues:

  1. How to make my package updatable via update manager? I have found here that I can command

sudo add-apt-repository deb http://something something

Is it a correct if I will run this command in postinstall script? and what means something and something

  1. What should be a structure of files? I have found this this link is software updater. So the question is: is it a standard dir/files tree and where I can read the description of this structure?

  2. How I can make my software installable via apt-get? I want to keep source on my server

  3. What is a signature and how I can sign my software.

Thanks for any information, because I've spent 3 days and couldn't find needed info about it.

closed as too broad by karel, andrew.46, David Foerster, amc, Luís de Sousa Jul 18 '16 at 9:37

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Have you published your package? Sorry If I'm being stupid but just to confirm you know.. – Sharad Gautam Jul 5 '16 at 15:21
  • @SharadGautam, no, I didn't it yet. 'How' is one of the questions ;) – Gleb Jul 5 '16 at 15:39
  • this is not really an answer but "file structure" of the package itself is less important than where you have the .install files install the package files. That has to obey the File System Hierarchy. The structure of the debian folder is also important, detailed in the Debian New Maintainers / Packaging Guide. – Thomas Ward Jul 5 '16 at 17:56
  • Welcome to Ask Ubuntu! We’re sorry, but Ask Ubuntu is not a forum, but a Question & Answer site: it works best if you ask one question, so you can receive one answer. When you ask multiple questions, you need to find one expert versed in multiple areas, which becomes unlikelier the more questions you put into, well, one question! ;-) So please, split up your question into multiple questions and drop me a comment so I can answer one of your questions. – David Foerster Jul 15 '16 at 7:59
2

How to make my package updatable via update manager?

How I can make my software installable via apt-get? I want to keep source on my server.

For both of these things, you'll need to create a repository to host your package, so that it can be downloaded. The easiest way to do this is to create a PPA on Launchpad. You will then have a PPA / repository, trough which you can distribute your software. See How do I create a PPA?

Is it a correct if I will run this command in postinstall script?

No, don't do this. If you create a repository, users should add it (on the computer where they want to install your package) first, using the command sudo add-apt-repository ppa:your-repo/ppa, and then install your package with sudo apt-get install yourpackage.

If you do not want to use a PPA, but want to submit your package to the main Ubuntu repository, see https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages.

What is a signature and how I can sign my software.

A "Signature" is a way for users to ensure that the package they get was not tampered with or modified, so that they can be sure that the package was created by you and not by someone else. This is for security. If you use Launchpad PPAs, this will be done for you. If you only want to sign the debian package, see how do you create a "signed" deb package

What should be a structure of files?

There is a good guide here, otherwise, you need to make sure that the files for your program are in the right place ("/opt/, /bin/, /lib/, and so on.)

  • Thank you very much for the answer. How I can avoid asking users to run add-apt-repository (E.g. I can run apt-get install nodejs)? And what about files structure – Gleb Jul 5 '16 at 15:52
  • @Gleb, for that, you need to submit your package to the main Ubuntu / Debian repository, see wiki.ubuntu.com/UbuntuDevelopment/NewPackages. However, this is difficult, and your package may not be accepted, especially if it's fairly "niche" and is not already widely used. I'm not too sure about the structure of the files, but there's various guides around the internet, e.g. this one – JonasCz Jul 5 '16 at 15:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.