Skip to content

Question: how to install SmartOS binary packages on non-Illumos operating system with pkgin #265

Description

@am11

apologies in advance if it is already documented somewhere, but I could not find this information, therefore asking here directly.

On Debian/Linux system, in the path where illumos/sysroot release tarball is restored, we want to install SmartOS binary packages. We have built pkgsrc tools (including pkgin) on Debian/Linux using pkgsrc (2020Q1) sources.

Now using this pkgin (Linux executable running on Debian/Linux system), is it possible to make it:

  • fetch 2020 Q1/Q2 binary packages built for SmartOS and
  • install package at location with custom path prefix

by, for example, modifying some config file or some command line switch? If so, how? :)

As an example, we compile FreeBSD's pkg tool (https://github.com/freebsd/pkg) on Debian/Linux, then modify its pkg.conf file to make it install FreeBSD packages on Debian/Linux inside the sysroot directory:

echo "ABI = \"FreeBSD:11:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf

here $__RootfsDir is the root of where the sysroot files are restored. Complete working examples for various package managers and operating systems are available in this bash script: https://github.com/dotnet/arcade/blob/master/eng/common/cross/build-rootfs.sh.

Activity

  1. sjorge commented on May 22, 2020

    @sjorge

    You might want to use pkg_add directly without going to pkgin, you should be able to specify most stuff via env variables like PKG_PATH and such.

  2. jperkin commented on May 22, 2020

    @jperkin
    Collaborator

    TBH I'd go even more directly and just unpack the packages directly into wherever you want. The .tgz files we ship are wrapped in ar(1) for the signing bits, but contain an unsigned package tarball that you can just unpack wherever.

    Using pkgin or pkg_install is likely technically possible, but would end up just as ugly to work around the various MACHINE_ARCH checks etc as just doing it the tarball way.

  3. am11 commented on May 22, 2020

    @am11
    Author

    Thank you, I will try that approach. Is there an index page where binary packages are listed?

  4. am11 commented on May 22, 2020

    @am11
    Author
  5. added a commit that references this issue on Sep 9, 2020
  6. added a commit that references this issue on Sep 21, 2020
  7. added a commit that references this issue on Oct 12, 2020
  8. added a commit that references this issue on Jan 30, 2021
    14af0ee
  9. added a commit that references this issue on Feb 13, 2021
  10. added a commit that references this issue on Jul 1, 2021
  11. added a commit that references this issue on Nov 23, 2022
  12. 69 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions