Skip to content

what is the correct way to use latest version of pkgin? #360

Description

@zssfred

It looks like /opt/tools/bin/pkgin won't work correctly.
And /opt/local/bin/pkgin which is from bootstrap mayn't be the latest one.

BTW, can we just remove bootstrap after the pkgsrc repo works well?

Thanks.

Fred

Activity

  1. jperkin commented on Mar 9, 2023

    @jperkin
    Collaborator

    Please can you provide more information. What about the tools version of pkgin is not working correctly?

    The tools version is for the GZ only, it's not meant to be installed anywhere else.

    The bootstrap kits will always be a bit behind what is available in the repository as we aim to build every day or so. You can just "pkgin upgrade" to get the latest.

    Which part of bootstrap do you want to remove? Do you mean the tarball you download? If so, yes that's fine to remove at any point after extraction.

  2. self-assigned this
    on Mar 9, 2023
  3. zssfred commented on Mar 9, 2023

    @zssfred
    Author

    Please can you provide more information. What about the tools version of pkgin is not working correctly?
    something like below:
    [root@smartos /opt/tools/var/db/pkgin/cache]# /opt/tools/bin/pkgin search watch
    No results found for watch
    [root@smartos /opt/tools/var/db/pkgin/cache]# /opt/local/bin/pkgin search watch
    conserver8-8.2.4nb1 Application that allows multiple users to watch serial consoles
    watch-3.2.6nb4 = Watch a program with update intervals

    =: package is installed and up-to-date
    <: package is installed but newer version is available

    : installed package has a greater version than available package

    The tools version is for the GZ only, it's not meant to be installed anywhere else.

    The bootstrap kits will always be a bit behind what is available in the repository as we aim to build every day or so. You can just "pkgin upgrade" to get the latest.

    Which part of bootstrap do you want to remove? Do you mean the tarball you download? If so, yes that's fine to remove at any point after extraction.

    I mean removing whole /opt/local.

    Thanks.

    Fred

  4. jperkin commented on Mar 9, 2023

    @jperkin
    Collaborator

    The tools repository is deliberately limited as it only includes software that is useful in a Global Zone context, and also requires changes to ensure that packages that create users are modified to work with the existing users available in the GZ.

    That said, if there is software that you would like to use in the GZ and think would be useful to be added to the repository, please just let me know and I'll add it to the build list. In this case misc/watch looks useful so I'll add it to be available in the next build.

    You can always remove /opt/local completely if you want to destroy the installation, but you will also probably want to clean up anything that has been written to /var as well as any SMF instances that have been imported. /var/db/pkgin is one such candidate, and svcs -a | grep /pkgsrc will show instances that may need cleaning up.

  5. jperkin commented on Mar 9, 2023

    @jperkin
    Collaborator

    FWIW, misc/watch was already added:

    $ type pkgin
    pkgin is hashed (/opt/tools/bin/pkgin)
    
    $ pkgin up
    processing remote summary (https://pkgsrc.smartos.org/packages/SmartOS/trunk/tools/All)...
    
    $ pkgin se ^watch
    watch-3.2.6nb4       Watch a program with update intervals
    

    So I'm not sure what you did with your tools installation but it doesn't look like it's working correctly.

  6. zssfred commented on Mar 9, 2023

    @zssfred
    Author

    What is your settings in /opt/tools/etc/pkgin/repositories.conf ?

  7. jperkin commented on Mar 9, 2023

    @jperkin
    Collaborator

    The default, https://pkgsrc.smartos.org/packages/SmartOS/trunk/tools/All. I never modify repositories.conf.

  8. zssfred commented on Mar 10, 2023

    @zssfred
    Author

    I point to 2022Q4 in "/opt/local/etc/pkgin/repositories.conf" and issue "pkgin in pkgin".

    The weird thing is there are no "/opt/tools/etc/pkg_install.conf" and "/opt/tools/etc/gnupg/pkgsrc.gpg" and "/opt/tools/share/gnupg/pkgsrc-security.gpg" after installation.

    I also point to 2022Q4 in "/opt/tools/etc/pkgin/repositories.conf" after installation.

    The issue I met in the upper part is because I didn't initialize /opt/tools/var/db/pkgin/pkgin.db. “pkgin up" can do the initialization well.

  9. jperkin commented on Mar 10, 2023

    @jperkin
    Collaborator

    Why are you changing repositories.conf? The bootstrap kits installs the correct repository for that set. If you are randomly changing repositories then you should expect things to probably break.

    You certainly can't switch between an /opt/local install and an /opt/tools one simply by changing the repository, they are completely different prefixes.

    It would help if you could explain exactly what you are trying to do at a higher level, as it's hard to advise based on the information so far, as it's not clear what you are trying to achieve.

    You generally have 3 options:

    • You want to run our packages on a general-purpose illumos operating system, such as OmniOS or OpenIndiana, in which case you should follow the "Standard" instructions at https://pkgsrc.smartos.org/install-on-illumos/
    • You are running SmartOS and want to use our packages inside a zone, in which case you should use imgadm/vmadm to provision a standard image that comes preinstalled with the bootstrap kit from images.smartos.org.
    • You are running SmartOS and want to use our packages in the Global Zone, in which case you should install the special /opt/tools set from the "Tools (SmartOS GZ)" tab at https://pkgsrc.smartos.org/install-on-illumos/

    At no point do you need to be editing repositories.conf and trying to install pkgin.

  10. zssfred commented on Mar 10, 2023

    @zssfred
    Author

    Why are you changing repositories.conf? The bootstrap kits installs the correct repository for that set. If you are randomly changing repositories then you should expect things to probably break.

    You certainly can't switch between an /opt/local install and an /opt/tools one simply by changing the repository, they are completely different prefixes.

    It would help if you could explain exactly what you are trying to do at a higher level, as it's hard to advise based on the information so far, as it's not clear what you are trying to achieve.

    You generally have 3 options:

    • You want to run our packages on a general-purpose illumos operating system, such as OmniOS or OpenIndiana, in which case you should follow the "Standard" instructions at https://pkgsrc.smartos.org/install-on-illumos/

    • You are running SmartOS and want to use our packages inside a zone, in which case you should use imgadm/vmadm to provision a standard image that comes preinstalled with the bootstrap kit from images.smartos.org.

    • You are running SmartOS and want to use our packages in the Global Zone, in which case you should install the special /opt/tools set from the "Tools (SmartOS GZ)" tab at https://pkgsrc.smartos.org/install-on-illumos/

    The trunk branch has some kind of coupling with SmartOS kernel/libc version. And it is always iterated. But we don't update SmartOS so frequently. That is reason why we want to select some quarterly releases as stable matching.

    At no point do you need to be editing repositories.conf and trying to install pkgin.

    To be clear, there are possible two pkgins -- one(A) in bootstrap and one(B) in pkgsrc repo. And yes, normally A works well and no need to install B. But B can work too if you like.

  11. jperkin commented on Mar 10, 2023

    @jperkin
    Collaborator

    If you want to install a specific LTS release then don't install the trunk bootstrap, grab the appropriate bootstrap kit directly from https://pkgsrc.smartos.org/packages/SmartOS/bootstrap/

    There is only ever one pkgin installed, the one that comes in the bootstrap kit just happens to be the latest from the repository at the time the bootstrap kit was created. If the repository happens to get a newer version built for it then it will be available as a regular "pkgin upgrade", there's no need to explicitly install it.

  12. zssfred commented on Mar 11, 2023

    @zssfred
    Author

    This is surely a better way than hacking the configuration. But I guess the upgraded pkgin will under "/opt/tools". In a nut shell, we are talking about the overlap between bootstrap and repo. For the bootstrap is already minimal, the possibility of overlap shout not be big.

    Thanks.

  13. jperkin commented on Mar 11, 2023

    @jperkin
    Collaborator

    Sorry I'm not sure what you mean. An upgrade will never change the prefix, they are completely distinct bootstrap kits and repositories.

  14. zssfred commented on Mar 13, 2023

    @zssfred
    Author

    Ooh, I catch the culprit -- I wrongly pointed "2022Q4" to "https://pkgsrc.smartos.org/packages/SmartOS/2022Q4/tools/All" referenced from my old "2019Q3" installation.

  15. 31 remaining items

  16. added a commit that references this issue on Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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