Skip to content

Instantly share code, notes, and snippets.

@citrus-it
Created February 10, 2023 15:27
Show Gist options
  • Save citrus-it/d4f4479436cb7fcfe819ec4a07bf7d8f to your computer and use it in GitHub Desktop.
Save citrus-it/d4f4479436cb7fcfe819ec4a07bf7d8f to your computer and use it in GitHub Desktop.
Transfer pkg repo, modifying manifests on the way
% pkg contents -t depend -g packages/i386/nightly/repo.redist zones
TYPE    FMRI
require consolidation/osnet/osnet-incorporation
require pkg:/[email protected]
require pkg:/library/[email protected]
require pkg:/library/[email protected]
require pkg:/service/[email protected]
require pkg:/shell/[email protected]
require pkg:/system/file-system/[email protected]
require pkg:/system/[email protected]

% cat x.mog
<transform depend fmri=.*library/libxml2@ -> edit fmri 2.10.3 2.10>

% pkgsend -s packages/tmp create-repository --set-property publisher.prefix=omnios
% pkgrecv -s packages/i386/nightly/repo.redist -d packages/tmp -m latest --mog-file x.mog \*

% pkg contents -t depend -g packages/tmp zones
TYPE    FMRI
require consolidation/osnet/osnet-incorporation
require pkg:/[email protected]
require pkg:/library/[email protected]
require pkg:/library/[email protected]
require pkg:/service/[email protected]
require pkg:/shell/[email protected]
require pkg:/system/file-system/[email protected]
require pkg:/system/[email protected]

# then onu from packages/tmp

@citrus-it
Copy link
Author

For a publisher change:

<transform set name=pkg.fmri -> edit value pkg://[^/]+/ pkg://omnios/>

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