42 cards
View
Posted 4 months ago. Visible to the public.

HowTo: Downgrade a Port on FreeBSD

Example

collectd5 in version 5.9.0 is broken and you upgraded it everywhere. But because it's FreeBSD it does not restart running services. After every old version is removed from /var/cache/pkg you restarted collectd and it does not start anymore, you really want to downgrade to 5.8.1 again. But even pkg now has 5.9.0 and you need your own make config setup anyway.

portdowngrade

Enter portdowngrade. Install it via pkg install portdowngrade.

You might want go to /root and run the next command should the folder not yet exist. You will see why at the end.

Copy
# mkdir portdowngrades && cd portdowngrades

It helps you along the way, so you can just naively type

Copy
# portdowngrade collectd5

and it takes a moment and will tell you, that this might not be specific enough, so it tells you to be more specific

Copy
collectd5-5.9.0_1 -> net-mgmt/collectd5 Choose a port origin (directory) from the list above, and then run portdowngrade category/port

So you know to tell it, where to find collectd5 and type the one you mean

Copy
# portdowngrade net-mgmt/collectd5

It will then blurt out a long list of revisions you can go back to, but the last line says what you need to do

Copy
Choose a revision from the above list and run /usr/local/sbin/portdowngrade net-mgmt/collectd5 revision

You could also just go to FreshPorts collectd5 and search for a suitable revision there. Once you know where you want to downgrade to, call it once again

Copy
# portdowngrade net-mgmt/collectd5 r497411

portdowngrade does NOT change /usr/ports in any case (anymore, apparently) and instead adds the old revision as a directory your current $PWD as well as copies your config. You can use this directory just as you would use /usr/ports/net-mgmt/collectd5/ and reinstall the old version from there now.

Owner of this card:

Avatar
Marius Schuller
Last edit:
10 days ago
by Claus-Theodor Riegg
This website uses cookies to improve usability and analyze traffic.
Accept or learn more