Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

pc-updatemanager pkgupdate not creating a new active boot environment #303

Closed
grahamperrin opened this issue Jan 18, 2017 · 24 comments
Closed
Assignees

Comments

@grahamperrin
Copy link

For a failed attempt to update UNSTABLE, the tail of the log:

Running OpenRC Migration...
/.doPkgUp.sh: /usr/local/bin/migrate_rc_openrc: not found
Moving updated pkg repo...
Updating pkgng config...
/.doPkgUp.sh: /usr/local/bin/pc-updatemanager: not found
Destroyed successfully
Error 1: chroot /.updateStage sh /.doPkgUp.sh
ERROR: Error 1: chroot /.updateStage sh /.doPkgUp.sh
Unmounting stage BE...
Copy upgrade.log to new BE...
Running: cp /var/db/pc-updatemanager/.pkgUpdateLog /.updateStage/usr/local/log/pc-updatemanager/upgrade.log
Determine new BE name...
Cleanup mounts...

pc-updatemanager.log.txt

@grahamperrin
Copy link
Author

Enviroment

An HP EliteBook 850 G2, which more often has a CUSTOM package set … but the above failure – with (or attempting to get to) UNSTABLE – is remarkable.

I just realised:

grahamperrin@momh167-gjp4-hpelitebook850g2-trueos ~> sudo rc-update add savecache shutdown
 * service savecache added to runlevel shutdown
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos ~> date ; time ; uname -v
Thu 19 Jan 2017 01:17:09 GMT
FreeBSD 12.0-CURRENT #14 f92c24b(drm-next-4.7): Fri Jan  6 19:28:21 UTC 2017     root@gauntlet:/usr/obj/usr/src/sys/GENERIC 
grahamperrin@momh167-gjp4-hpelitebook850g2-trueos ~> 

– however I do not imagine that (absence of savecache service) being a sole cause of update failures. As far as I recall the service was absent from a MacBookPro11,2 that recently gained CUSTOM updates to the OS without difficulty.

@grahamperrin
Copy link
Author

pc-updatemanager.log.txt

pc-updatemanager: Thu 19 Jan 2017 03:34:46 GMT
…
Running OpenRC Migration...
/.doPkgUp.sh: /usr/local/bin/migrate_rc_openrc: not found
Moving updated pkg repo...
Updating pkgng config...
/.doPkgUp.sh: /usr/local/bin/pc-updatemanager: not found
Destroyed successfully
Error 1: chroot /.updateStage sh /.doPkgUp.sh
ERROR: Error 1: chroot /.updateStage sh /.doPkgUp.sh
Unmounting stage BE...
Copy upgrade.log to new BE...
Running: cp /var/db/pc-updatemanager/.pkgUpdateLog /.updateStage/usr/local/log/pc-updatemanager/upgrade.log
Determine new BE name...
Cleanup mounts...

A few days ago for some reason (I don't have all notes handy, sorry), maybe with attention to beadm, I sensed that my case differed from at least some of the other reported cases.

Now I wonder whether this issue 303 is a duplicate of #291.

@grahamperrin
Copy link
Author

… I sensed that my case differed from at least some of the other reported cases …

Probably true. From #291 (comment):

… workaround is to remove FreeBSD-examples:
pkg delete FreeBSD-examples-\*

As far as I can tell, that's not a workaround for my case:

$ pkg search FreeBSD-examples
FreeBSD-examples-12.0.s20170121141038 examples package
$ pkg info FreeBSD-examples
pkg-static: No package(s) matching FreeBSD-examples
$ uname -v
FreeBSD 12.0-CURRENT #14 f92c24b(drm-next-4.7): Fri Jan  6 19:28:21 UTC 2017     root@gauntlet:/usr/obj/usr/src/sys/GENERIC 
$ 

@pkgdemon
Copy link
Contributor

pkgdemon commented Jan 21, 2017

I have encountered this as well going from custom to stable. I was not able to delete that exact package to workaround it either. The only solution I could find was to revert back to a BE which had stable, and upgrade to stable.

@pkgdemon
Copy link
Contributor

pkgdemon commented Jan 22, 2017

@grahamperrin I tried again, and pkg delete freebsd-examples solved the reboot loop for me this time around. It did not fix it in a past attempt.

@pkgdemon
Copy link
Contributor

pkgdemon commented Jan 22, 2017

The other part of the solution was pkg-static install -f FreeBSD-runtime. Now I can install packages again. It may be important to follow with the reboot command to ensure no further attempts to re-update everything will kick in.

@pkgdemon
Copy link
Contributor

pkg-static: FreeBSD-examples-12.0.s20170118145349 conflicts with FreeBSD-runtime-12.0.s20170118145349 (installs files into the same place). Problematic file: /usr/share/examples/etc/make.conf

@pkgdemon
Copy link
Contributor

FreeBSD-examples was installing /usr/share/examples/etc/make.conf, and that was moved to FreeBSD-runtime. I still had FreeBSD-examples on my system so FreeBSD-runtime could not be upgraded.

@pkgdemon
Copy link
Contributor

Trying to reinstall FreeBSD-examples now wants to downgrade something else:

New packages to be INSTALLED:
        FreeBSD-examples: 12.0.s20170118145349 [trueos-base]

Installed packages to be DOWNGRADED:
        FreeBSD-libbegemot: 12.0.s20170119155052 -> 12.0.s20170118145349 [trueos-base]

@pkgdemon
Copy link
Contributor

pkgdemon commented Jan 22, 2017

Installing FreeBSD-examples at this stage will trash the system:

Installed packages to be REMOVED:
        FreeBSD-runtime-12.0.s20170118145349
        FreeBSD-runtime-development-12.0.s20170119155052
        FreeBSD-autofs-12.0.s20170119155052
        FreeBSD-autofs-debug-12.0.s20170119155052
        FreeBSD-ssh-12.0.s20170119155052
        FreeBSD-ssh-development-12.0.s20170119155052
        FreeBSD-ssh-lib32-profile-12.0.s20170119155052
        FreeBSD-ssh-lib32-development-12.0.s20170119155052
        FreeBSD-ssh-debug-12.0.s20170119155052
        FreeBSD-ssh-lib32-12.0.s20170119155052
        FreeBSD-runtime-lib32-12.0.s20170119155052
        FreeBSD-libproc-12.0.s20170119155052
        FreeBSD-libproc-lib32-12.0.s20170119155052
        FreeBSD-jail-12.0.s20170119155052
        FreeBSD-jail-lib32-12.0.s20170119155052
        FreeBSD-libdpv-12.0.s20170119155052
        FreeBSD-libdpv-lib32-12.0.s20170119155052
        FreeBSD-ssh-profile-12.0.s20170119155052
        FreeBSD-ssh-lib32-debug-12.0.s20170119155052
        FreeBSD-bsdinstall-12.0.s20170119155052
        FreeBSD-bsdinstall-debug-12.0.s20170119155052
        FreeBSD-jail-development-12.0.s20170119155052
        FreeBSD-binutils-12.0.s20170119155052
        FreeBSD-binutils-debug-12.0.s20170119155052
        FreeBSD-jail-lib32-profile-12.0.s20170119155052
        FreeBSD-apm-12.0.s20170119155052
        FreeBSD-apm-debug-12.0.s20170119155052
        FreeBSD-acct-12.0.s20170119155052
        FreeBSD-acct-debug-12.0.s20170119155052
        FreeBSD-bsnmp-12.0.s20170119155052
        FreeBSD-bsnmp-debug-12.0.s20170119155052
        FreeBSD-bsnmp-lib32-12.0.s20170119155052
        FreeBSD-bsnmp-profile-12.0.s20170119155052
        FreeBSD-bsnmp-lib32-debug-12.0.s20170119155052
        FreeBSD-bsnmp-development-12.0.s20170119155052
        FreeBSD-bsnmp-lib32-profile-12.0.s20170119155052
        FreeBSD-bsnmp-lib32-development-12.0.s20170119155052
        FreeBSD-tests-12.0.s20170119155052
        FreeBSD-tests-debug-12.0.s20170119155052
        FreeBSD-bhyve-12.0.s20170119155052
        FreeBSD-bhyve-debug-12.0.s20170119155052
        FreeBSD-groff-12.0.s20170119155052
        FreeBSD-groff-debug-12.0.s20170119155052
        FreeBSD-gdb-12.0.s20170119155052
        FreeBSD-gdb-debug-12.0.s20170119155052
        FreeBSD-acpi-12.0.s20170119155052
        FreeBSD-acpi-debug-12.0.s20170119155052
        FreeBSD-runtime-debug-12.0.s20170119155052
        FreeBSD-rcmds-12.0.s20170119155052
        FreeBSD-rcmds-debug-12.0.s20170119155052
        FreeBSD-ee-12.0.s20170119155052
        FreeBSD-ee-debug-12.0.s20170119155052
        FreeBSD-jail-debug-12.0.s20170119155052
        FreeBSD-jail-lib32-development-12.0.s20170119155052
        FreeBSD-runtime-profile-12.0.s20170119155052
        FreeBSD-amd-12.0.s20170119155052
        FreeBSD-amd-debug-12.0.s20170119155052
        FreeBSD-dma-12.0.s20170119155052
        FreeBSD-dma-debug-12.0.s20170119155052
        FreeBSD-syscons-12.0.s20170119155052
        FreeBSD-vi-12.0.s20170119155052
        FreeBSD-vi-debug-12.0.s20170119155052
        FreeBSD-at-12.0.s20170119155052
        FreeBSD-at-debug-12.0.s20170119155052
        FreeBSD-jail-profile-12.0.s20170119155052
        FreeBSD-jail-lib32-debug-12.0.s20170119155052
        FreeBSD-unbound-12.0.s20170119155052
        FreeBSD-unbound-lib32-profile-12.0.s20170119155052
        FreeBSD-unbound-lib32-development-12.0.s20170119155052
        FreeBSD-unbound-debug-12.0.s20170119155052
        FreeBSD-unbound-lib32-12.0.s20170119155052
        FreeBSD-unbound-profile-12.0.s20170119155052
        FreeBSD-unbound-lib32-debug-12.0.s20170119155052
        FreeBSD-unbound-development-12.0.s20170119155052

@grahamperrin
Copy link
Author

grahamperrin commented Jan 22, 2017

Ping, no freebsd-examples logged in this case. From #303 (comment) above:

pkg-static: No package(s) matching FreeBSD-examples

I wondered about case sensitivity, truly there's no match:

$ pkg info freebsd-examples
pkg-static: No package(s) matching freebsd-examples
$ date ; uptime ; uname -v ; uname -n ; beadm list
Sun 22 Jan 2017 21:26:32 GMT
 9:26p.m.  up  3:58, 1 users, load averages: 0.73, 0.62, 0.60
FreeBSD 12.0-CURRENT #14 f92c24b(drm-next-4.7): Fri Jan  6 19:28:21 UTC 2017     root@gauntlet:/usr/obj/usr/src/sys/GENERIC 
momh167-gjp4-hpelitebook850g2-trueos.university.brighton.ac.uk
BE                              Active Mountpoint  Space Created
12.0-CURRENT-201612152147       -      -            3.8G 2016-12-15 21:47
12.0-CURRENT-up-20170106_204041 NR     /           26.8G 2017-01-06 20:39
$ 

In this case

For example:

pkg-static: openldap-client-2.4.44 conflicts with openldap-sasl-client-2.4.44 (installs files into the same place). Problematic file: /usr/local/bin/ldapadd

– however I can not guess whether such lines are indicative of the root cause of this issue.

@grahamperrin
Copy link
Author

21:59–22:04 UK time:

Tempted to remove ldap packages from trueos.

ldap* packages removed from trueos-desktop. no more worries about those conflciting openldap packages removing trueos-desktop.


I created, activated and booted a new environment
trueos-core-issue-303 (created 2017-01-22 21:49)
then without logging in to a display environment, at a root console:

pkg-static install -f freebsd-runtime

Then a restart of the OS and at a root console,

pc-updatemanager pkgupdate

Result:

  • sorry, no new boot environment.

I'll switch away from the Mac, where I'm writing this post, to the HP. No rush to resolve this issue …

@pkgdemon
Copy link
Contributor

pkgdemon commented Jan 22, 2017

You should be use pc-updatemanager pkgcheck to check for updates. It will take build 172 or higher of "Build All Packages" for the ldap* packages to be removed from trueos-desktop. The next UNSTABLE/STABLE after 2017-17-01 will have the fix for the ldap conflict.

@pkgdemon
Copy link
Contributor

pkgdemon commented Jan 23, 2017

I rebuilt 3dbce2a of drm-next from source, and found that make packages produces FreeBSD-examples-12.0.s20170122235909.txz. Attempting pkg add FreeBSD-examples-12.0.s20170122235909.txz will result in the same conflict. I believe we have an issue that needs to be fixed upstream as well.

@RodMyers
Copy link

you all now have a place to start

@pkgdemon
Copy link
Contributor

[root@joe-laptop] /usr/obj# grep -R '/usr/share/examples/etc/make.conf' *
grep: usr/src/amd64.amd64/worldstage/sys: No such file or directory
usr/src/amd64.amd64/worldstage/runtime.plist:@(root,wheel,0444,) /usr/share/examples/etc/make.conf
usr/src/amd64.amd64/worldstage/METALOG:./usr/share/examples/etc/make.conf type=file uname=root gname=wheel mode=0444 size=10614 tags=package=examples
usr/src/amd64.amd64/worldstage/METALOG:./usr/share/examples/etc/make.conf type=file uname=root gname=wheel mode=0444 size=262 tags=package=runtime
usr/src/amd64.amd64/worldstage/usr/share/games/fortune/freebsd-tips:/usr/share/examples/etc/make.conf.
Binary file usr/src/amd64.amd64/worldstage/usr/share/man/mandoc.db matches
grep: usr/src/amd64.amd64/worldstage/usr/tests/local: No such file or directory
grep: warning: usr/src/amd64.amd64/worldstage/usr/tests/sys/pjdfstest/tests: recursive directory loop
usr/src/amd64.amd64/worldstage/examples.plist:@(root,wheel,0444,) /usr/share/examples/etc/make.conf

@pkgdemon
Copy link
Contributor

@pkgdemon
Copy link
Contributor

@pkgdemon
Copy link
Contributor

@grahamperrin I think I had the issues mixed up when posting to this one. I see this pertains more to your ldap conflict issues. I will move the relevant information about the FreeBSD-examples issue to a related ticket tommorow.

@grahamperrin
Copy link
Author

From #303 (comment):

pc-updatemanager pkgcheck to check for updates. …

OK … from outputs from many runs of pc-updatemanager pkgupdate alone, I assume that it is safe and effective to use the pkgupdate option without first opting for pkgcheck.

If that assumption is false, please let me know. Thanks.

2017-01-23 04-44 pc-updatemanager pkgcheck.txt

Extracts from the top and tail:

All repositories are up-to-date.
Checking for upgrades (2190 candidates): .......... done
Processing candidates (2190 candidates): ..... done
The following 930 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        openldap-sasl-client: 2.4.44 [trueos-major]
Installed packages to be REINSTALLED:
        webfonts-0.30_13 [trueos-major] (options changed)
        py35-atspi-2.18.0 [trueos-major] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:12:*')
        orca-3.18.2 [trueos-major] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:12:*')
        kdewebdev-4.14.3_3 [trueos-major] (needed shared library changed)
        accerciser-3.14.0_1 [trueos-major] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:12:*')

Number of packages to be installed: 1
Number of packages to be upgraded: 924
Number of packages to be reinstalled: 5

The operation will free 75 MiB.
854 MiB to be downloaded.
The following updates are available:
------------------------------------
NAME: System package updates
TYPE: PKGUPDATE

LDAP

Without the PKGUPDATE indicated above:

$ pkg info openldap-sasl-client
pkg-static: No package(s) matching openldap-sasl-client
$ 

That package is not found in FreshPorts. I wonder what requires it.

It will take build 172 or higher of "Build All Packages" for the ldap* packages to be removed from trueos-desktop. The next UNSTABLE/STABLE after 2017-17-01 will have the fix for the ldap conflict.

If I understand correctly:

  • this current installation of the OS will not gain a bootable environment that has build 172 through normal use of pc-updatemanager
  • it might gain what's required through use of -f force with pkg-static at a root console.

I'll create, activate and boot another environment before forcing things.

@grahamperrin
Copy link
Author

Preparation: boot environment trueos-core-issue-303-2017-01-23-a

$ date ; uptime ; beadm list
Mon 23 Jan 2017 05:50:42 GMT
 5:50a.m.  up  6:58, 3 users, load averages: 0.65, 0.73, 0.73
BE                                 Active Mountpoint  Space Created
12.0-CURRENT-201612152147          -      -            3.8G 2016-12-15 21:47
12.0-CURRENT-up-20170106_204041    -      -           45.6M 2017-01-06 20:39
trueos-core-issue-303              N      /          336.0K 2017-01-22 21:49
trueos-core-issue-303-2017-01-23-a R      -           27.4G 2017-01-23 05:48
$ 

@grahamperrin
Copy link
Author

Worked around:

  • I forced an update, without pc-updatemanager, upon test environment trueos-core-issue-303-2017-01-23-a

Given the subsequent issues at and around https://gitter.im/trueos/troubleshooting?at=58868a1496a565f84409f884 I expect to prefer inferior environment trueos-core-issue-303 with drm-next-4.7 for everyday use. For me there's no reason to keep this issue open, feel free to reopen if whatever is wrong will bug other users.

Anecdotally I might have seen, in one of the rooms, someone else report that the announced workaround was not effective in their case.

@grahamperrin
Copy link
Author

$ pkg info -r openldap-client
openldap-client-2.4.44:
        evolution-data-server-3.18.5_5
        libreoffice-5.2.3_5
        kdepimlibs-4.14.10_5
        kdepim-4.14.10_3
        nss_ldap-1.265_12
        ldb-1.1.26
        evolution-3.18.5.1_2
        pam_ldap-1.8.6_3
        seahorse-3.18.0_1
$ 

@grahamperrin
Copy link
Author

This seems to be fixed. Please, in which repo might I find the commit?

From a boot of the environment (12.0-CURRENT-up-20170127_233200) that resulted from the fix:

$ about
  ______                   ____  _____
 /_  __/______  _____     / __ \/ ___/ 
  / / / ___/ / / / _ \   / / / /\__ \ 
 / / / /  / /_/ /  __/  / /_/ /___/ / 
/_/ /_/   \__,_/\___/   \____//____/  

General info:
       Host:...............momh167-gjp4-hpelitebook850g2-trueos.university.brighton.ac.uk
       User:...............grahamperrin
       Uptime:.............8 mins
       FreeBSD kernel ver:.12.0-CURRENT
       FreeBSD world ver:..12.0-CURRENT
       FreeBSD git branch:.drm-next
       FreeBSD git rev:....3dbce2a
       TrueOS ver:.........TrueOS-Desktop-201701261715
       Arch:...............amd64
       Kernel ident:.......GENERIC
       Bootloader:.........BSD
       Bootloader type:....EFI
       CPU:................Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
       CPU cores:..........4
       Memory (free/avail):13529 / 16384 Mb
       Package set:........CUSTOM
       Desktop environment:Lumina
       X11 Driver:.........modesetting_drv.so 
       OSS Driver:.........pcm1: <Realtek (0x0280) (Analog 2.0+HP/2.0)> (play/rec) default
       WIFI Driver:........iwm0
$ 

Note to self, 12.0-CURRENT-up-20170127_233200 is not yet a preferred environment:

$ beadm list
BE                              Active Mountpoint  Space Created
12.0-CURRENT-201612152147       -      -            3.8G 2016-12-15 21:47
trueos-core-issue-303           NR     /           34.3G 2017-01-22 21:49
12.0-CURRENT-up-20170127_233200 -      -           11.2G 2017-01-27 22:55
$ 

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

No branches or pull requests

3 participants