pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc mirror for local use



Thank you for your reply, Jonathan!

I've got a nice lipkg zone running now with a daily rsync job pulling in the pkgsrc package archive.
Distributing packages to other zones on my LAN now goes lightning fast! Very nice.

One other thing, though: when adding my local repo URL to the repositories.conf file above the public repo URL, and my local mirror repo is offline for some reason, I would expect pkgin to fall back - after a certain time - to the public repo. But it doesn't. Instead after about a minute or so it bails out with an error: "Could not fetch <local mirror repo>/pkg_summary.gz: Gateway Time-out". And that's it.

Is that something I could easily configure on my end or would this fall into the "feature request" category for pkgin?
Not a really big issue though.

Thanks for your efforts and support!

Cheers,
Andries

P.S.: For unknown reasons did your reply not reach my inbox, nor my spam/junk folder. I only found it when browsing the online pkgsrc-Users message archive. :-/
Maybe by default add the list mail address on CC to work around this?



* On 2026-01-09 at 20:19 GMT, Andries Annema wrote:

I tried to adapt the pointers to the new public pkgsrc repo at "https://pkgsrc.smartos.org/packages/SmartOS/trunk/"; like so:

      # rsync -n rsync://pkgsrc.smartos.org/packages/SmartOS/trunk/
      /tank/pkgsrc_mirror
      
      
but it barfs with:

@ERROR: Unknown module 'packages'
If you run rsync in browse mode you can see what the remote offers:

  $ rsync rsync://pkgsrc.smartos.org
  pkgsrc         	https://pkgsrc.smartos.org/

So instead of /packages use /pkgsrc:

  $ rsync rsync://pkgsrc.smartos.org/pkgsrc
  drwxr-xr-x             15 2025/11/14 08:35:53 .
  -rw-r--r--          5,018 2022/07/15 16:04:27 favicon.ico
  ...

and that'll eventually lead you to:

  rsync://pkgsrc.smartos.org/pkgsrc/packages/SmartOS/trunk/

Would it be possible to provide a more detailed write-up on how to get such mirror set up?
I would expect such page to exist at the main wiki here:
https://github.com/TritonDataCenter/pkgsrc/wiki
but I suppose this matter has never had much priority to get documented properly. Which I can understand!
I'll take a look at adding this.

Thanks,

--
Jonathan Perkin                    pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


On 08-01-2026 20:54, Andries Annema wrote:

Hi,

Trying to get myself a pkgsrc mirror up and running in an OmniOS lipkg zone, to improve package delivery to other OmniOS zones on my local LAN, but I'm struggling to get it working. The lack of documentation on this matter is probably the culprit.

The main source I could find is this dated post with links that don't work anymore:
https://smartos.topicbox.com/groups/smartos-discuss/T1dd25f748b24520e

I tried to adapt the pointers to the new public pkgsrc repo at "https://pkgsrc.smartos.org/packages/SmartOS/trunk/" like so:

# rsync -n rsync://pkgsrc.smartos.org/packages/SmartOS/trunk/ /tank/pkgsrc_mirror

but it barfs with:

@ERROR: Unknown module 'packages'
rsync error: error starting client-server protocol (code 5) at main.c(1850) [Receiver=3.4.1]


Digging deeper brought me here:
https://gist.github.com/jperkin/1025a6d81553c19b3c35a3aefa986a0b

which seems to give some very solid pointers on how to keep the mirror copy in better atomic sync with the public repo, of which I adapted the main sync command like so - for a first manual test:

#  rsync -n -av --link-dest=/tank/pkgsrc_mirror/pkgsrc rsync://pkgsrc.smartos.org/packages/SmartOS/trunk/ /tank/pkgsrc_mirror/.pkgsrc/

but still it barfs with the same error as above.


Would it be possible to provide a more detailed write-up on how to get such mirror set up?
I would expect such page to exist at the main wiki here:
https://github.com/TritonDataCenter/pkgsrc/wiki
but I suppose this matter has never had much priority to get documented properly. Which I can understand!

Anyway, even some pointers are much appreciated.

Thank you and cheers,
Andries



Home | Main Index | Thread Index | Old Index