Peppermint | Linux OS Community Forum
It is currently Tue Nov 19, 2019 2:08 am

All times are UTC - 5 hours [ DST ]

Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Set up a Debian/Ubuntu package repository in Dropbox.
PostPosted: Thu Aug 19, 2010 5:23 pm 
User avatar

Joined: Wed May 19, 2010 5:10 pm
Posts: 1352
Location: Asheville, NC, USA
Class: apt repository setup and configuration
Difficulty: Advanced to Expert: Requires package building and terminal experience
Time: Depending on skill, 30 minutes to a couple of hours
Desirability: Publish your own packages publicly using apt with full dependency tracking

In Debian based Linux distributions (such as Peppermint), packages are kept in APT repositories where they can be accessed using command line package management tools and graphical tools such as Synaptic and the Software Manager. The advantages of this are many, in my opinion the biggest of which is that this allows for proper dependency resolution when installing anything.

This how-to presumes that you're familiar with properly building .deb packages, are comfortable working from a command line, and are a Dropbox user.

Part One: Getting everything ready

The tool that allows us to set up and configure package repositories is called reprepro, so let's get it in the system with:
apt install reprepro

If you have a Dropbox account, make sure it's synced with the computer you're presently using, If you don't have a Dropbox account, get signed up and sync it with your computer. In Peppermint this is simple as it's in the menu already, but preferably use this link to sign up as it'll do good things for me:

Dropbox will usually set itself up and sync a folder at ~/Dropbox and will have a few other folders within it, notably the ~/Dropbox/Public folder from where you can share files with pretty much anyone. Within the ~/Dropbox/Public folder open a terminal and let's create the necessary directory tree for a repo:
mkdir -p apt
mkdir -p apt/conf
mkdir -p apt/incoming

From here we need to make a configuration file so that that reprepro will know that this is, in fact, a repository and so it will know what to do with everything. Create a new file called "distributions" and store it in ~/Dropbox/Public/apt/conf/ and we need to put a few things in it:
Origin: Kendall Weaver
Label: Dropbox Test Repo
Suite: peppermint
Codename: peppermint
Version: 3.1
Architectures: i386 source
Components: main
Description: Let's see if this works.

Naturally change any of the data to reflect your information. If you need to add support for amd64, then just add "amd64" along with the others on the "Architectures:" line and if you need to add other components such as "contrib non-free universe multiverse kentuckyfriedchicken" or whatever, then just add those on the "Components:" line. Change the suite and codename to properly reflect what systems this is for.

If you want to support multiple releases then just add another section of the above to the same file (with a blank line in between) and change the details as necessary.

Part Two: Importing and publishing packages

From here the repository is technically set up and functional, but it has no packages. What we do now is copy to ~/Dropbox/Public/apt the files and archives from a locally built package. Using the example of a package built from scratch we'll have a .deb package, a .tar.gz source archive, a .changes file, and a .dsc file:
kendall@tristan ~/Dropbox/Public/apt $ ls
conf                          ice_1.0.0_all.deb
ice_1.0.0.dsc                 ice_1.0.0_i386.changes
ice_1.0.0.tar.gz              incoming

And from here we can publish the package using the following reprepro command:
reprepro -Vb . include peppermint ice_1.0.0_i386.changes

If you originally built the package for another release or edition, we can pass an option to allow us to publish the package anyway:
reprepro --ignore=wrongdistribution -Vb . include peppermint ice_1.0.0_i386.changes

You'll see reprepro work it's magic and it'll create a few other directories in ~/Dropbox/Public/apt with all the necessary data.

Part Three: Getting the details in order

At this point we need to figure out what line we need to add to our software sources to enable the new repository on our system. So let's go to and log in.

After logging in you'll see a complete list of everything in your ~/Dropbox folder. Naturally we click the link to the Public folder and from there to the apt folder within it.

From here you'll see the stuff you copied over earlier. Highlight the package and click the little blue arrow over to your right and select the option to "Copy Public Link", in this case mine is going to look like this:

Now we use this url to derive what should be the proper source lines:
deb peppermint main
deb-src peppermint main

We can add these lines to our /etc/apt/sources.list or use a graphical tool such as "Software Sources" in the Preferences menu in Peppermint. Run an "apt update" command ("sudo apt-get update" on Debian/Ubuntu) immediately afterward and you should see your new repository in the list.


While working, stop a few times to make sure that Dropbox is 100% synced. If your Dropbox panel icon has a green circle with a check on it, then it's all the way synced and you're ready to go. If it's not 100% synced then you may not be able to copy a public link, or the packages may not download properly after setting up the repo.

Dropbox has a data transfer limit and if you exceed it, you're account can be suspended. It's a fairly generous limit for sharing packages or for something like a small application release or a distro test repository, but it would be impossible to fully support a complete distribution repository using this method. Also be sure to keep an eye on your Dropbox storage limit.

reprepro has much more functionality than what is described here. I highly recommend you research the available documentation to explore it's full potential.

Thanks for reading. For questions or comments regarding this how-to, contact me via Twitter using the link in my sig.

Developer and creator of Peppermint OS.

Twitter: @kendalltristan

Peppermint is powered by VPS.NET Cloud Servers.


Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by php B.B. © 2000, 2002, 2005, 2007 php B.B. Group
Template made by DEVPPL