Questions Regarding Packages/Ports - BSD

This is a discussion on Questions Regarding Packages/Ports - BSD ; Hi, I'm just experimenting with FreeBSD in a VirtualBox and have a couple of questions. Say one performs a minimal install and you've logged in for the first time. One does a pkg -R portupgrade and that installs fine and ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Questions Regarding Packages/Ports

  1. Questions Regarding Packages/Ports

    Hi,

    I'm just experimenting with FreeBSD in a VirtualBox and have a couple of
    questions.

    Say one performs a minimal install and you've logged in for the first
    time. One does a pkg -R portupgrade and that installs fine and then you
    go on to install a few ports compiled locally.

    One will now have a system with both optimised ports that you've just
    installed and the pre-compiled binaries such as portupgrade.

    One can use pkg_info to determine what software is installed, however
    how does one tell which installed packages are pre-built or locally
    compiled?

    Is there a way of replacing all installed pre-compiled packages with
    natively compiled versions from the ports?

    --
    Regards,
    Sheridan Hutchinson
    Sheridan@Shezza.org


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEARECAAYFAkjMWWwACgkQnBrliHqz8aBOUQCgyK+TO1ZX2H VYbIXILVr2xCNI
    GIkAoKc81QvINpd7FFBZKOKKp8F0YOfa
    =+ajK
    -----END PGP SIGNATURE-----


  2. Re: Questions Regarding Packages/Ports

    Sheridan Hutchinson writes:

    > I'm just experimenting with FreeBSD in a VirtualBox and have a couple of
    > questions.
    >
    > Say one performs a minimal install and you've logged in for the first
    > time. One does a pkg -R portupgrade and that installs fine and then you
    > go on to install a few ports compiled locally.
    >
    > One will now have a system with both optimised ports that you've just
    > installed and the pre-compiled binaries such as portupgrade.
    >
    > One can use pkg_info to determine what software is installed, however
    > how does one tell which installed packages are pre-built or locally
    > compiled?


    There's no real way of doing that.

    > Is there a way of replacing all installed pre-compiled packages with
    > natively compiled versions from the ports?


    Not without replacing a lot of the others too. On the other hand, it
    rarely matters. Certainly rebuilding portupgrade locally isn't going
    to give you any better performance (or other behaviour).

    Where it does sometimes matter is in the options you choose for the
    software, but you would need to configure the port anyway. And once
    you've set the options to something non-default, "portupgrade -P"
    won't use default prebuilt packages anyway.

    --
    Lowell Gilbert, embedded/networking software engineer
    http://be-well.ilk.org/~lowell/

  3. Re: Questions Regarding Packages/Ports

    Lowell Gilbert wrote:
    >> Is there a way of replacing all installed pre-compiled packages
    >> with natively compiled versions from the ports?

    >
    > Not without replacing a lot of the others too. On the other hand, it
    > rarely matters. Certainly rebuilding portupgrade locally isn't
    > going to give you any better performance (or other behaviour).
    >
    > Where it does sometimes matter is in the options you choose for the
    > software, but you would need to configure the port anyway. And once
    > you've set the options to something non-default, "portupgrade -P"
    > won't use default prebuilt packages anyway.


    Hi Lowell,

    Thank you for your response it's useful.

    Just for giggles and curiosity, in a system that has mixed pre-compiled
    and natively compiled packages installed, is there a way of
    replaceing/regenerating them all from ports. I've got VirtualBox ready
    and waiting and it's not matter if it were to fail or be disastrous.

    What I'm most curious about is if this can be achieved as some of the
    documentation for FreeBSD indicates that in theory you could review all
    the source code before compilation, and I wanted to see if the
    implementation truly and maybe conveniently reflected that.

    --
    Regards,
    Sheridan Hutchinson
    Sheridan@Shezza.org


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEARECAAYFAkjNXLYACgkQnBrliHqz8aBiHQCbBqgg/sKNnaaICV51toXA6ebk
    sqQAn2mTcIBfbkrXVwo9KsBaCNpdC3dt
    =I3uL
    -----END PGP SIGNATURE-----


  4. Re: Questions Regarding Packages/Ports

    Sheridan Hutchinson wrote:
    >
    > Say one performs a minimal install and you've logged in for the first
    > time. One does a pkg -R portupgrade and that installs fine and then you
    > go on to install a few ports compiled locally.


    Probably you mean "pkg_add -r portupgrade"; -R is not nearly the same.

    > One will now have a system with both optimised ports that you've just
    > installed and the pre-compiled binaries such as portupgrade.


    Right, although the value of optimization depends on the port. People
    often have trouble with perceived optimizations that really aren't.

    > One can use pkg_info to determine what software is installed, however
    > how does one tell which installed packages are pre-built or locally
    > compiled?


    I don't know if that's possible, but it seems unlikely.

    > Is there a way of replacing all installed pre-compiled packages with
    > natively compiled versions from the ports?


    A package is just a prebuilt port, so rebuilding everything via ports
    should do what you want:

    portupgrade -af

    That gets more involved the more ports you have installed.

    --
    Warren Block * Rapid City, South Dakota * USA

  5. Re: Questions Regarding Packages/Ports

    Sheridan Hutchinson wrote:
    > [-- text/plain, encodage en quoted-printable, encodage : ISO-8859-1, 33 lignes --]
    >
    > Lowell Gilbert wrote:
    > >> Is there a way of replacing all installed pre-compiled packages
    > >> with natively compiled versions from the ports?

    > >
    > > Not without replacing a lot of the others too. On the other hand, it
    > > rarely matters. Certainly rebuilding portupgrade locally isn't
    > > going to give you any better performance (or other behaviour).
    > >
    > > Where it does sometimes matter is in the options you choose for the
    > > software, but you would need to configure the port anyway. And once
    > > you've set the options to something non-default, "portupgrade -P"
    > > won't use default prebuilt packages anyway.

    >
    > Hi Lowell,
    >
    > Thank you for your response it's useful.
    >
    > Just for giggles and curiosity, in a system that has mixed pre-compiled
    > and natively compiled packages installed, is there a way of
    > replaceing/regenerating them all from ports. I've got VirtualBox ready
    > and waiting and it's not matter if it were to fail or be disastrous.
    >


    There is a port called portmaster whose aim is to rebuild from source.
    In principle portmaster -af will rebuild everything from source. I am
    using portmaster in a jail with a small number of ports installed
    (around 60) and i must say it works remarkably well. The sophistication
    Doug Barton is able to produce with a simple shell script is astounding.
    Of course if you have 1000 ports installed, rebuilding from source is
    close to insanity.




    --

    Michel TALON


  6. Re: Questions Regarding Packages/Ports

    Michel Talon wrote:
    > There is a port called portmaster whose aim is to rebuild from
    > source. In principle portmaster -af will rebuild everything from
    > source. I am using portmaster in a jail with a small number of ports
    > installed (around 60) and i must say it works remarkably well. The
    > sophistication Doug Barton is able to produce with a simple shell
    > script is astounding. Of course if you have 1000 ports installed,
    > rebuilding from source is close to insanity.


    I will investigate portmaster and the other suggestions that I've had
    from the other posters. I definitely have enough options now to perform
    further experimentation.

    Thank you all for your help

    --
    Regards,
    Sheridan Hutchinson
    Sheridan@Shezza.org


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEARECAAYFAkjNnRUACgkQnBrliHqz8aDjuACgnuutjnOwmc 4sX31pw7atltMV
    /xcAn1Ex/o+rjqAZjuQcIH7GijJ1ywTo
    =6Gq3
    -----END PGP SIGNATURE-----


+ Reply to Thread