Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Update utility #33

Open
probonopd opened this issue Jan 17, 2021 · 88 comments
Open

System Update utility #33

probonopd opened this issue Jan 17, 2021 · 88 comments

Comments

@probonopd
Copy link
Member

Write a System Update utility that installs the update into a new Boot Environment.

Along the lines of

 pkg upgrade --fetch-only -y
 beadm list
 beadm create c572e
 beadm mount c572e /media/c572e
 chroot /media/c572e
  pkg upgrade -y
  pkg upgrade -r FreeBSD -y
  exit
 beadm list
 beadm umount c572e

Thanks @grahamperrin

We could then make the next boot go into the new Boot Environment, and ask the user there whether all subsequent boots should continue to go there. Or something like that.

@grahamperrin
Copy link

grahamperrin commented Jan 18, 2021

Thanks, that's from my quick and dirty record of a first attempt https://pastebin.com/ppT7LfVT where (amongst other things) the pkg upgrade -y failed due to poudriere-related files being not found in the chroot(8) environment.

I took my hints from Upgrading from FreeBSD 9.3 to FreeBSD 10.1 using beadm and freebsd-update – Dan Langille's Other Diary (2015-03-13).

I see options such as --chroot and --rootdir in pkg(8), my first experiment with --chroot failed (through me not yet having a full understanding of the manual page). I guess that using one or both of those options in combination with (or in lieu of) chroot(8) will allow things to work with e.g. my poudriere repository, I simply haven't had time to digest the man pages.

For the pkg stuff above, the phrase System Update is potentially misleading in that base (the system) is not yet packaged. So better name the utility Software Update or something like that.

A System Update to the FreeBSD -RELEASE base of helloSystem should use freebsd-update(8).

A System Update to the FreeBSD -CURRENT base of helloSystem might be out of scope (without PkgBase).

See also

GhostBSD's Update Station, which has a BSD-3-Clause License.

Archived https://github.com/trueos/sysadm-ui-qt archive for the Qt GUI to sysadm. TrueOS Desktop had a GUI to updating, I can't recall what it looked like but the code might be in, or not far from, this archive.

@probonopd
Copy link
Member Author

Thanks for the pointers.

Let's not forget that we may want to get to an image-based solution in the end, where users do not have to deal with the individual packages but simply can download the new OS image and use it alongside the old one.

@probonopd
Copy link
Member Author

GhostBSD is probably using Gtk, so not something we would want to use.

https://github.com/trueos/sysadm-ui-qt is Qt based and compiles without issues, but it seems to have a different scope: It allows central system administrators to manage systems running it. Since helloSystem is made for "mere mortals" (normal end users), not for corporate system administrators, this is currently out of scope for helloSystem.

@grahamperrin
Copy link

Thanks, the references to comparable applications were more, for me (or anyone) to tell whether there is, for example, exemplary use of --chroot or --rootdir

@grahamperrin
Copy link

… not for corporate system administrators, …

I haven't used it in years but if I recall correctly:

  • sysadm-client was primarily the means of administering one's own computer, and the related GUI was user-friendly (as many things were in TrueOS Desktop; its PC-BSD heritage and so on)
  • the ability to administer a remote computer was a bonus, not detrimental to usability.

@grahamperrin
Copy link

grahamperrin commented Jan 26, 2021

#33 (comment) refined today (with FreeBSD 13.0-ALPHA1 and an active boot environment c1790-geed1cc6cdf-a):

  1. beadm list
  2. beadm create c1790-geed1cc6cdf-b
  3. beadm mount c1790-geed1cc6cdf-b /media/c1790-geed1cc6cdf-b
  4. chroot /media/c1790-geed1cc6cdf-b
  5. pkg upgrade -r FreeBSD -y
  6. exit
  7. beadm umount c1790-geed1cc6cdf-b
  8. beadm activate c1790-geed1cc6cdf-b
  9. gracefully restart the system.

Still, I can not make that type of routine a general recommendation. I have yet to restart the system and tell whether there's anything applicable from my poudriere repo.

Still, there's my lack of understanding of --chroot and --rootdir in pkg(8). If/when I take time to read up, maybe I'll discover a better routine – one that's not limited to the FreeBSD repo.

@grahamperrin

This comment has been minimized.

@probonopd
Copy link
Member Author

https://twitter.com/vermaden/status/1360562154836004869 describes upgrading from 12 to 13 as:

beadm create 13
beadm mount 13
chroot /var/tmp/BE-13.z4IanfZt
mount -t devfs devfs /dev
freebsd-update upgrade -r 13.0-BETA2
freebsd-update install
freebsd-update install
pkg upg
freebsd-update install
beadm activate 13
reboot

@probonopd probonopd changed the title System Update utility System Update/Upgrade utility Feb 13, 2021
@grahamperrin
Copy link

Thanks, that's useful.

https://www.freebsd.org/cgi/man.cgi?query=pkg-alias(8) upg is not an alias. Neither does it appear here:

@vermaden please, where did you learn the upg abbreviation?

If the second run of freebsd-update install is for world, then what is the third?

@grahamperrin

This comment has been minimized.

@grahamperrin

This comment has been minimized.

@vermaden
Copy link

vermaden commented Feb 16, 2021

@vermaden please, where did you learn the upg abbreviation?

Do not remember. Seriously :)

But pkg autor works the same for autoremove.

Probably a habit after long use of IBM TSM - Tivoli Storage Manager (now known as Spectrum Protect). Their command line also needed only that much part of command that was unique.

If the second run of freebsd-update install is for world, then what is the third?

After executing freebsd-update install the freebsd-update writes this at the end of 'world' install process:

Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run "/usr/sbin/freebsd-update install"
again to finish installing updates.

So the third freebsd-update install is for 'removing old shared object files'.

for an upgrade with 0.4.0 (0D26) you'll not need the devfs line.

Not sure about helloSystem upgrade but when I first started 12.2 ==> 13.0 upgrade without /dev mounted in the chroot then the freebsd-update exited after installing files with information that /dev/tty is not available and its not possible to interactively 'work' on the configuration files differences like /etc/fstab or /etc/sysctl.conf files.

Regards.

@grahamperrin

This comment has been minimized.

@grahamperrin
Copy link

grahamperrin commented Feb 16, 2021

#33 (comment) thanks @vermaden

/dev

Installed helloSystem 0.4.0 (0D26) mount point /dev has the required file system.

Old files

That reminds me,

root@mowa219-gjp4-8570p:~ # cd /usr/src && make -DBATCH_DELETE_OLD_FILES delete-old
>>> Removing old files (only deletes safe to delete libs)
/usr/sbin/fmtree
/usr/lib/debug/usr/sbin/fmtree.debug
/usr/share/man/man8/fmtree.8.gz
>>> Old files removed
>>> Removing old directories
>>> Old directories removed
To remove old libraries run 'make delete-old-libs'.
root@mowa219-gjp4-8570p:/usr/src # 

and

  • I do not make delete-old-libs
  • (off-topic from helloSystem) I can't easily recall what I have installed from ports
  • (OT) I do update (from source) my jail for poudriere, but I have never given thought to deletion of old files within the jail (does it take care of itself?) … maybe saner to simply create from source.

@grahamperrin
Copy link

helloSystem/docs#17

@grahamperrin

This comment has been minimized.

@probonopd
Copy link
Member Author

We could also take an entirely different approach to "updating", e.g., installing from a new Live ISO while keeping parts of the old system around, similar to what the Mac does... or use an A/B partitioning scheme, similar to what ChromeOS does, or...

@grahamperrin
Copy link

… installing from a new Live ISO while keeping parts of the old system …

The parts gained from an ISO might as effectively be gained with a PkgBase approach. I think first of @igalic https://alpha.pkgbase.live/

@probonopd
Copy link
Member Author

Not really: Integration and end-to-end tests can be run on an ISO, but not on an upgraded system. At least not easily.

@grahamperrin
Copy link

Integration

Way beyond me but 👍

end-to-end tests

Is an intention, to verify (with checksums) that what's installed is as it should be?

@grahamperrin
Copy link

@vermaden

#33 (comment) my bad,

Installed helloSystem 0.4.0 (0D26) mount point /dev has the required file system.

That was, not taking into account the chroot step. So, yes, mount -t devfs devfs /dev is a necessary next step.

@vermaden
Copy link

#33 (comment) thanks @vermaden

/dev

Installed helloSystem 0.4.0 (0D26) mount point /dev has the required file system.

Old files

That reminds me,

root@mowa219-gjp4-8570p:~ # cd /usr/src && make -DBATCH_DELETE_OLD_FILES delete-old
>>> Removing old files (only deletes safe to delete libs)
/usr/sbin/fmtree
/usr/lib/debug/usr/sbin/fmtree.debug
/usr/share/man/man8/fmtree.8.gz
>>> Old files removed
>>> Removing old directories
>>> Old directories removed
To remove old libraries run 'make delete-old-libs'.
root@mowa219-gjp4-8570p:/usr/src # 

and

* I **do not** `make delete-old-libs`

* (off-topic from helloSystem) I can't easily recall what I have installed from ports

* (OT) I do _update_ (from source) my jail for poudriere, but I have never given thought to deletion of old files within the jail (does it take care of itself?) … maybe saner to simply _create_ from source.

Yes, this is that step.

@grahamperrin

This comment has been minimized.

@igalic
Copy link

igalic commented Feb 17, 2021

just one small note re beadm: if you replace it with bectl(8), which is in base, that's one less thing to install

@vermaden
Copy link

@vermaden FYI https://pastebin.com/crR6WFCG – first observed whilst testing an upgrade with helloSystem, it's reproducible with a clean installation of FreeBSD 12.1-STABLE (without helloSystem as a starting point.

If I (exit the chroot environment etc. and) restart the system before the second run of freebsd-update install then there are no such bad system calls (and /lib/libmd.so.6 is not empty).

If moving from 12.x to 13.x its best (and probably stated in the FreeBSD Handbook) to first upgrade 12.1 to 12.2 (or other latest 12.x version at the moment) and then do the major upgrade to 13.x.

Regards.

@probonopd
Copy link
Member Author

The more I think about it, I come to the conclusion that I am really more in favor of a "clean install" at least for major revisions/releases that would work roughly like this:

  • User downloads the latest ISO
  • In a running helloSystem, user double-clicks the ISO
  • User double-clicks "Install FreeBSD", the usual installer opens
  • The disk from which helloSystem is currently booted is shown
  • If the user selects that disk, then the following happens:
    • A new jail/chroot is created that is also a boot environment
    • helloSystem is installed to that jail/chroot
    • /home is the same for the old and the new boot environment (as far as I remember this is even the default)
    • /Applications may need some special treatment (tbd)
  • The new boot environment is selected for the next boot (only)
  • Only if we reach the full graphical desktop in the next boot, then set the new boot environment permanently

Advantages:

  • "Clean install" = predictable results
  • ISO can be tested beforehand
  • More familiar process to Mac users, but using ZFS power

For minor (security) updates, we could still use a more traditional approach.

What do you think?

@vermaden
Copy link

Agreed.

@kettle-7
Copy link
Contributor

What if the base system was a git repository mounted ro and you mounted a separate zfs subvolume for rw folders (like /Users), and in an update you'd just run

mount -o rw,remount / # is remount even necessary on BSD?
cd /
git pull
cd -
mount -o ro /

@probonopd
Copy link
Member Author

I don't think that git is a good match for managing gigabytes of binaries. Plus, git does ask the user questions in the case of merge conflicts.

@kettle-7
Copy link
Contributor

There's always ostree, it's like git but endless os uses it.

@probonopd
Copy link
Member Author

probonopd commented May 25, 2021

Definitely unwelcome technology. Not human-friendly. Cryptic GUID-like names of files. Not "manageable" by hand. Not simple.

@kettle-7
Copy link
Contributor

The other thing I can think of is SystemImageKit and SystemExtensionKit

@probonopd
Copy link
Member Author

SystemImageKit is Linux/GRUB only.

@probonopd
Copy link
Member Author

probonopd commented Oct 16, 2021

tl;dr

This is mainly a summary for my future self:

FreeBSD itself

  • FreeBSD isn't sufficiently described with versions like "12.2". You can have "12.2" and it is still outdated
  • You also need to look at the number that follows RELEASE-.... For me it helps to think of 12.2-RELEASE-p7 as 12.2.7
  • In fact, the kernel and the FreeBSD "userland" can have different versions. freebsd-version -ku can be used to show the kernel version and the userland version
  • Note that "userland" here does not mean anything installed using Ports or Packages
  • To update FreeBSD "itself" (not: ports and packages) in one go without asking questions one can use sudo env PAGER=cat freebsd-update fetch install and then reboot

Thanks to @grahamperrin for being patient enough explaining it to me as long as was needed for me to finally get it.

(still to be found out whether we can prevent this from overwriting our carefully crafted custom config files such as modified rc scripts)

Packages

sudo env PAGER=cat pkg.real update
sudo env PAGER=cat pkg.real upgrade --yes

(still to be found out how to prevent them from overwriting our carefully crafted custom config files)

@grahamperrin
Copy link

grahamperrin commented Oct 16, 2021

… still to be found out how to update those without them asking questions, …

helloSystem/hello#161 (comment) showed:

csh

setenv PAGER cat …

… (Still a bit unclear) sudo env PAGER=cat freebsd-update fetch install may need to be run again after rebooting …

Not required. The advice to run the command was because you did not mention restarting the system.

@probonopd
Copy link
Member Author

probonopd commented Oct 16, 2021

(moved to helloSystem/hello#161 (comment))

@grahamperrin

This comment has been minimized.

@probonopd

This comment has been minimized.

@probonopd probonopd changed the title System Update/Upgrade utility System Update utility Oct 16, 2021
@probonopd
Copy link
Member Author

probonopd commented Oct 16, 2021

For updating packages, we could probably re-use most of the code from our application installer GUI. It already knows how to display a grapical progress bar for pkg, and allows more advanced users to look at the command line output.

@probonopd
Copy link
Member Author

probonopd commented Oct 17, 2021

Create a new BE prior to doing anything (TODO: only if FreeBSD and/or package updates are available).

Then, update FreeBSD:

image

Next, update packages:

image

Anyone volunteers to test?

@probonopd
Copy link
Member Author

Should appear in the "Developer Preview" folder in the next continuous build, 0G25.

@probonopd
Copy link
Member Author

probonopd commented Oct 17, 2021

Known issues

  • computer:///...drive items appear (items for unmounted drives). gvfs to blame?
  • Everything that is contained in FreeBSD packages (but has been modified by helloSystem) gets overwritten. We need to find a way to tell pkg to leave certain files alone. Examples:
    • /usr/local/share/slim/themes/default/background.jpg (wallpaper)
    • /usr/local/sbin/automount (automounter; we use a much newer version than is in packages
  • Files that we forcefully deleted (because we absolutely don't want them on the system but many packages depend on them) re-appear. Examples:
    • /usr/local/share/fonts/dejavu/
    • /usr/local/share/fonts/Liberation/

Essentially much of what script.hello does in terms of customizing the system gets undone when one updates packages.

We'd probably have to rethink (=make more complicated) the way we put the system together if we really want end users to update the system using packages.

In the meantime, sudo pkg lock --yes automount slim gvfs dejavu liberation-fonts-ttf) can somewhat work around this. (There may be more packages that need to be locked as well.)

@probonopd
Copy link
Member Author

probonopd commented Oct 3, 2022

sudo env PAGER=cat freebsd-update upgrade -r 13.1-RELEASE does not silence the questions; still getting

The following components of FreeBSD seem to be installed:
kernel/generic src/src world/base world/lib32

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)?

Would env EDITOR=cat work? Trying sudo env EDITOR=nano PAGER=cat freebsd-update upgrade -r 13.1-RELEASE but having no questions asked at all is what we really need.

@probonopd
Copy link
Member Author

My real life experience.

Thought it would be nice to run the latest version of PrusaSlicer.

Wouldn't it be awesome if this could be done without having to change half the operating system?

FreeBSD% sudo pkg  install PrusaSlicer
Passwort: 
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 45 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        FreeCAD: 0.19.2_3
        frei0r-plugins: 1.7.0.18
        frei0r-plugins-opencv: 1.7.0.18
        gdal: 3.3.3_2
        opencv: 4.5.3_4
        shotcut: 21.03.21_3

New packages to be INSTALLED:
        abseil: 20211102.0 [FreeBSD]
        gcc11: 11.3.0 [FreeBSD]
        libixion: 0.17.0_1 [FreeBSD]
        py39-boost-libs: 1.79.0_1 [FreeBSD]
        py39-numpy: 1.22.4_1,1 [FreeBSD]
        py39-setuptools: 62.1.0_1 [FreeBSD]

Installed packages to be UPGRADED:
        PrusaSlicer: 2.3.3 -> 2.3.3_4 [FreeBSD]
        boost-libs: 1.72.0_6 -> 1.79.0_1 [FreeBSD]
        botan2: 2.19.1 -> 2.19.2 [FreeBSD]
        codeblocks: 20.03_1 -> 20.03_2 [FreeBSD]
        firebird25-client: 2.5.9_1 -> 2.5.9_2 [FreeBSD]
        firefox: 95.0.2_1,2 -> 105.0.1,2 [FreeBSD]
        gnustep-base: 1.27.0_2 -> 1.27.0_6 [FreeBSD]
        gnustep-gui: 0.28.0_2 -> 0.28.0_3 [FreeBSD]
        harfbuzz-icu: 3.2.0 -> 4.4.1_1 [FreeBSD]
        icu: 70.1_1,1 -> 71.1,1 [FreeBSD]
        libcdr01: 0.1.7_1 -> 0.1.7_2 [FreeBSD]
        libcmis: 0.5.2_2 -> 0.5.2_5 [FreeBSD]
        libe-book: 0.1.3_21 -> 0.1.3_24 [FreeBSD]
        libmspub01: 0.1.4_19 -> 0.1.4_20 [FreeBSD]
        liborcus: 0.16.1_1 -> 0.17.2_1 [FreeBSD]
        libqxp: 0.0.0_19 -> 0.0.0_20 [FreeBSD]
        libreoffice: 7.2.5.2 -> 7.3.5.2 [FreeBSD]
        libvisio01: 0.1.7_5 -> 0.1.7_8 [FreeBSD]
        libzmf: 0.0.2_24 -> 0.0.2_25 [FreeBSD]
        openjfx14: 14.0.2.1+1_4 -> 14.0.2.1+1_7 [FreeBSD]
        openvdb: 8.1.0_5 -> 9.1.0 [FreeBSD]
        poppler: 21.12.0 -> 22.06.0 [FreeBSD]
        poppler-glib: 21.12.0 -> 22.06.0 [FreeBSD]
        poppler-qt5: 21.12.0 -> 22.06.0 [FreeBSD]
        poppler-utils: 21.12.0 -> 22.06.0 [FreeBSD]
        qt5-core: 5.15.2p263 -> 5.15.5p165_2 [FreeBSD]
        qt5-webkit: 5.212.0.a4_7 -> 5.212.0.a4_10 [FreeBSD]
        raptor2: 2.0.15_19 -> 2.0.15_22 [FreeBSD]
        sfcgal: 1.4.0 -> 1.4.1_1 [FreeBSD]
        spidermonkey78: 78.9.0_4 -> 78.15.0_2 [FreeBSD]
        tesseract: 5.1.0 -> 5.1.0_1 [FreeBSD]
        thunderbird: 91.9.1 -> 102.3.1_1 [FreeBSD]
        webkit2-gtk3: 2.34.2 -> 2.34.6_3 [FreeBSD]

Number of packages to be removed: 6
Number of packages to be installed: 6
Number of packages to be upgraded: 33

The process will require 46 MiB more space.
535 MiB to be downloaded.

Proceed with this action? [y/N]: 

Chose to sudo pkg upgrade instead. At first it said it would uninstall nothing, so I started to do it.

But then, after having downloaded and installed a bunch of stuff, it said the following. Had I known it would end like this, I would not even have attempted the upgrade.

Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
The following 874 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        drm-fbsd13-kmod: 5.4.144.g20211013
        e2fsprogs-libss: 1.46.4
        hdf-szip: 2.1.1
        p7zip: 16.02_3
        py38-cairo: 1.18.1_2,1
        py38-gobject3: 3.38.0
        py38-markdown: 3.3.4
        py38-matplotlib: 3.4.1
        py38-mutagen: 1.42.0_2
        py38-pygments: 2.7.2
        py38-pyliblo: 0.10.0_2
        py38-pyside2: 5.15.2_2
        py38-qt5-core: 5.15.4_2
        py38-qt5-dbus: 5.15.4_2
        py38-qt5-gui: 5.15.4_1
        py38-qt5-multimedia: 5.15.4_3
        py38-qt5-network: 5.15.4_2
        py38-qt5-printsupport: 5.15.4_3
        py38-qt5-qml: 5.15.4_3
        py38-qt5-svg: 5.15.4_3
        py38-qt5-webchannel: 5.15.4_2
        py38-qt5-webengine: 5.15.4_3
        py38-qt5-widgets: 5.15.4_3
        py38-rdflib: 5.0.0
        py38-shiboken2: 5.15.2_2
        py38-sip: 5.5.0_1,1

Grudgingly accepted. Will probably have to install the py39 equivalents by hand. Mere mortals would be totally lost here. This is why I think package managers are tools for developers, but not for non-technical end users.

sudo pkg install e2fsprogs-libss hdf-szip p7zip py39-cairo py39-gobject3 py39-markdown py39-matplotlib py39-mutagen py39-pygments py39-pyliblo py39-pyside2 py39-qt5-core py39-qt5-dbus py39-qt5-gui py39-qt5-multimedia py39-qt5-network py39-qt5-printsupport py39-qt5-qml py39-qt5-svg py39-qt5-webchannel py39-qt5-webengine py39-qt5-widgets py39-rdflib py39-shiboken2 py39-sip

pkg: No packages available to install matching 'e2fsprogs-libss' have been found in the repositories
pkg: No packages available to install matching 'hdf-szip' have been found in the repositories
pkg: No packages available to install matching 'p7zip' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-core' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-dbus' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-gui' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-multimedia' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-network' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-printsupport' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-qml' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-svg' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-webchannel' have been found in the repositories
pkg: No packages available to install matching 'py39-qt5-widgets' have been found in the repositories

Bummer!

Total breakage. Now what?

sudo pkg install devel/py-qt5

After a reboot, I cannot open many applications anymore, getting

This application requires at least version FBSD_1.7 of libc.so.7 to run.

Please update it and try again.

So far I've been running FreeBSD 13.0-RELEASE. So doing

sudo freebsd-update upgrade -r 13.1-RELEASE

takes forever, hanging on Preparing to download files... for a looong time with no progress indication.
Then got Fetching 18519 patches.

The following file could not be merged automatically: /etc/group
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...

Absolute nightmare!
I don't even know how to get out of vi, much less how to edit anything using it.
Please just leave my files alone!

Typing the cryptic :q! a couple of times gets me out of vi.

Stuff like

+<<<<<<< current version
 video:*:44:user
+=======
+video:*:44:
+realtime:*:47:
+idletime:*:48:
+>>>>>>> 13.1-RELEASE

absolutely makes me fear that Xorg will be broken.

So Does this look reasonable (y/n)? n, retry using sudo env PAGER=cat freebsd-update fetch install.

Does sudo env PAGER=cat freebsd-update upgrade -r 13.1-RELEASE similarly work? No.

Trying sudo env EDITOR=nano PAGER=cat freebsd-update upgrade -r 13.1-RELEASE next.

Had to know a lot about the system to manually edit the files in nano.

Then:

To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
FreeBSD% sudo /usr/sbin/freebsd-update install
Passwort: 
Installing updates...
Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.

After having done that, I now seem to have successfully moved from 13.0 to 13.1, but it is not something a non-technical user could have done.

@probonopd
Copy link
Member Author

EDITOR=edit is even better because it comes with FreeBSD base.txz.

@grahamperrin
Copy link

… nightmare! … vi, …

⚙ D36786 freebsd-update.sh: EDITOR: if not set, prefer ee

@grahamperrin
Copy link

… Would env EDITOR=cat work? …

No. cat(1) is not an editor.

@grahamperrin
Copy link

… PrusaSlicer …

Not part of the operating system (not integral to FreeBSD).

… Total breakage. Now what? …

Boot the boot environment that preceded the breakage.


Questions about pkg(8), and other things that are not part of the operating system, will be easier to answer if asked as questions in Q&A: https://github.com/helloSystem/hello/discussions/categories/q-a

@grahamperrin
Copy link

… Stuff like

+<<<<<<< current version
 video:*:44:user
+=======
+video:*:44:
+realtime:*:47:
+idletime:*:48:
+>>>>>>> 13.1-RELEASE

Think of that as you would think of a merge with Git. From Git - Advanced Merging:

image

@probonopd
Copy link
Member Author

probonopd commented Oct 4, 2022

The purpose of this thread is to show which challenges we have to overcome in oder to arrive at a no-questions-asked upgrade process that we could integrate in the System Update utility.

I fear this would have to be solved by FreeBSD proper.
In the meantime, package-based system upgrades are not suitable for non-technical users.

@grahamperrin
Copy link

grahamperrin commented Oct 6, 2022

NB, my earlier comment:

… I don't recall suggesting freebsd-update(8) as a basis for a System Update/Upgrade utility. …

freebsd-update(8) is, essentially, the norm for binary updates and binary upgrades to supported versions of RELEASE.

I thought that you already decided, long ago, to not use freebsd-update in the context of an update utility for helloSystem.

… package-based system upgrades …

Do you mean PkgBase (for the operating system, FreeBSD)? Or pkg-upgrade(8) (for packages of ports)?

@grahamperrin
Copy link

grahamperrin commented Oct 9, 2022

#33 (comment)

… package-based system upgrades are not suitable for non-technical users.

Maybe true from the helloSystem perspective; not true as a sweeping statement.


From https://www.ghostbsd.org/about for GhostBSD, which takes pkg-based approaches:

… a graphical application to install software and update your system. …

… We try to simplify FreeBSD to lower the entry-level of using FreeBSD on a desktop or laptop. We provide all the benefits of the FreeBSD operating system benefits combined with our in-house GUI tool. …

From #33 (comment) (2021-01-18, the first response to the opening post):

… GhostBSD's Update Station, …

Pictured:

System, Administration, Update Station

Update Manager – packages to be upgraded, installed and reinstalled – plus a snapshot of the ZFS boot environment

The kernel, and other essentials, amongst items to be upgraded:

Update Manager – kernel and other essentials amongst the items to be upgrade

Limitations, maintenance

From helloSystem/hello#161 (comment):

… helloSystem does not want to operate a package repository because it would require infrastructure to be maintained. …

GhostBSD maintains the type of thing that helloSystem does not want to maintain:

Via ghostbsd/ghostbsd-ports@b70c442?diff=split#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R44:

@grahamperrin
Copy link

Is pkg_replace(1) of interest?

I never used it, but it caught my eye.

https://github.com/kdeguchi/pkg_replace#readme | ports-mgmt/pkg_replace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants