Creating and sharing YOUR OWN repos with Pkg

Moderator: Forum moderators

Post Reply
User avatar
sc0ttman
Posts: 93
Joined: Sat Aug 22, 2020 3:55 pm
Has thanked: 4 times
Been thanked: 33 times

Creating and sharing YOUR OWN repos with Pkg

Post by sc0ttman »

It's actually quite easy to create your own packages in Puppy Linux.

With Pkg installed it's also easy to create & share your own package repositories, too.

These user-created repos are sometimes called "user-contrib" repos.

Pkg is installed in many pups by default, or available at the Pkg Homepage.

Creating packages:

In a standard Puppy Linux, you create PET packages like so:

Code: Select all

dir2pet pkgname-1.2.3/

Using Pkg, it's this:

Code: Select all

pkg dir2pet pkgname-1.2.3/

Either way, follow on the on-screen instructions, and make sure to list your package dependencies correctly!

In the folder pkgname-1.2.3/ you would get something like this:

pkgname-1.2.3/usr/bin/script.sh
pkgname-1.2.3/pet.specs

You should end up with a file called something like:

pkgname-1.2.3-noarch.pet

Creating a repo

Create a folder with the repo name you want, such as: puppy-fossa64-sc0ttman

If you built your packages as above (either method), you can put all your packages in your new repo directory.

Note, they must all be of the same type - one of these: .deb, .pet, .sfs, .tar.xz, etc.

You can then run the following command:

Code: Select all

pkg dir2repo "repo-name/"    # where "reponame" is a folder full of packages 

Follow the on screen steps - choose a repo name, description, URL, etc.

When finished, upload all the contents of your repo dir to the URL you chose when you created it.

You can then share the URL on these forums, and other users can install your repo in their system like so:

Code: Select all

pkg add-repo <URL>

(Here is an example repo, created as above: https://smokey01.com/sc0ttman/stretch-7.5/gfx/)

THE BENEFITS

This way you can create packages and their dependencies for specific Puppy versions, or general "noarch" or "common" packages for many Puppy versions.

You can just share a URL and all your packages will be available to other users.

Create different repos for different use cases:

  • a repo for your custom packages and programs (for devs)
  • a repo for "fixed" packages (ones that don't work when installed from the "built-in" repos of your chosen puppy)
  • a repo for packages not found elsewhere (cool programs you compiled and packaged yourself)
  • a repo for one big package (e.g. kodi) and all its deps, (always latest version, with patches, custom build, etc.. like "PPA" repos)
  • a SFS only repo of custom-made pkg+deps SFS files (useing pkg sfs-combine pkgname, for example)
  • etc, etc
User avatar
Anacleto
Posts: 99
Joined: Sat Nov 14, 2020 2:37 pm
Location: Spain
Has thanked: 10 times
Been thanked: 9 times

Re: Creating and sharing YOUR OWN repos with Pkg

Post by Anacleto »

hi sc0ttman.

Thanks for your post.

Sorry there's one thing I don't understand, you say:

When finished, upload all the contents of your repo dir to the URL you chose when you created it.

We have to have a repository address of our own created by us and then share that address.

But who we share it with or how we share it, could you give an example?

Are there any addresses where you can upload those links?

Thanks see you.

User avatar
rockedge
Site Admin
Posts: 5713
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1992 times
Been thanked: 2097 times
Contact:

Re: Creating and sharing YOUR OWN repos with Pkg

Post by rockedge »

what do your URL's look like?

User avatar
Anacleto
Posts: 99
Joined: Sat Nov 14, 2020 2:37 pm
Location: Spain
Has thanked: 10 times
Been thanked: 9 times

Re: Creating and sharing YOUR OWN repos with Pkg

Post by Anacleto »

Hi rockedge.

Sorry by the answers of the post so late. I forgot this post.

At first I thought it could have somewhere adrees where we could upload the PET files for all the people, but then I realized that this would not be convenient. That's why I think it will be the best to leave the PET file in the forum and then the administrators of the PET file servers decide if they are useful to load them in the repositories or not.

Regards.

Post Reply

Return to “Package Collections/Repositories”