Managing a Repository (both local and remote)

No Gravatar

This mini guide is useful, though very simplified, to those who need to create its own repository staff (both for its own distribution derived from Ubuntu, either to sort out their work to package crowds and make available the result of time spent at both that if the network in a manner consistent P ).

Well, the work to be done is very simple:
First we create the structure of our repository. After we moved in the path chosen by us (here I will refer to / home / ragnarok, the home user on my laptop) we give the following commands:

$ Mkdir miorepo
$ Cd miorepo
$ Mkdir binary
$ Mkdir source
$ Touch index

In this way we prepared a structure like this:

miorepo
index
- Binary
- Source

As you can imagine inside the directory will be binary and source, respectively, inserted on binary and source packages that we want to add to our repository.

Index file we created (we could call it any other way) is not essential but is very convenient to handle all packages in the repo.

After inserting the packages open that file and write an entry for each package type:

package_name priorità_pacchetto categoria_pacchetto

The last column (categoria_pacchetto) will serve to synaptic to decide in which category put the deb in the repository to organize the research.

Now create the Packages.gz file and Sources.gz (respectively in folders binary and source). To complete this operation are sufficient, the following commands (data from inside the folder miorepo):

$ Dpkg-scanpackages binary index | gzip-9c> binary / Packages.gz
$ Dpkg-source scansources Index | gzip-9c> source / Sources.gz

If you have decided not to create the index file in the commands withdrawing replace with / dev / null.

Our repository is now ready! Just remember that every time you add a package, either binary or source, you have to recreate the two files above and, if present, update the index file.

The only thing left to do is edit the file / etc / apt / sources.list.
If the repository is local, we insert, in our case, an entry like this:

deb file: / / / home / ragnarok / miorepo binary /
deb-src file: / / / home / ragnarok / miorepo source /

Otherwise, if we decide to make it available online (just created by copying the entire structure, including signs and Sources.gz Packages.gz file on our home page, for example in the root of our site) we add the entry:

http://www.miositoweb.org/miorepo deb binary /
deb-src http://www.miositoweb.org/miorepo source /

Now, our packages are available to anyone who knows their location! :)

Popularity: 12% [?]

Tags:


leave a response , or trackback from your own site. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

This website uses IntenseDebate comments, but they are not currently loaded Because either your browser does not support JavaScript, or they did not load fast enough.

to “Gestire un Repository (sia locale che remoto)” 2 Responses to "Managing a Repository (both local and remote)"

  1. Congratulations, very useful and interesting.
    I had half a mind to do to make a small repo "for friends" with stuff that is not in. Deb or is obsolete.
    Thanks P

    PS: Now I'm going for a ride in your blog, perhaps you find other interesting stuff ;)

  2. Thanks for the comment Churl :) I hope you can find something interesting in the previous posts!
    Hello!

Leave a Reply