Easy way to set up an apt repository in a folder

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Post Reply
Message
Author
User avatar
Stevo
Developer
Posts: 12774
Joined: Fri Dec 15, 2006 8:07 pm

Easy way to set up an apt repository in a folder

#1 Post by Stevo »

Our Repo Team can use this if the package can't be built in pbuilder with its local repo feature, and it needs extra backports first. I'm sure it can also be useful for other use cases. The functionality is provided by the local-apt-repository package, currently only in the Stretch repo, but I'll see if it can be backported for MX 15.

The local folder must be /srv/local-apt-repository

Code: Select all

sudo apt-get install local-apt-repository
Create the local folder as necessary:

Code: Select all

sudo mkdir -p /srv/local-apt-repository
Copy all the debs in a folder to that repo folder:

Code: Select all

sudo cp *.deb /srv/local-apt-repository
Since we don't run systemd on MX by default, run an extra command to rebuild the repo after changing contents:

Code: Select all

sudo /usr/lib/local-apt-repository/rebuild
Update the apt database:

Code: Select all

sudo apt-get update
or use the tray widget.

The new packages should now appear in the apt system--if they are upgrades to installed packages, the MX updater-notifier will show them as upgrades.

Post Reply

Return to “Tips & Tricks by users”