Re: Lost user database after bungled upgrade

2019-08-28 Thread Ryan Stone
On Wed, Aug 28, 2019 at 6:40 PM Ian Lepore  wrote:
> Or maybe in your case the files are fine and it really is a uid
> problem.  But a "pkg check -s -a" as suggested in the PR couldn't hurt.
> :)

I did have some problems here, but unfortunately re-installing the
affected packages (and confirming that a subsequent run of pkg check
showed no more problems) didn't resolve my issue.  I'm also seeing
errors like this:

pkg: sqlite error while executing UPDATE packages SET name=?1  WHERE
name=?2; in file pkg_jobs.c:1731: UNIQUE constraint
failed: packages.name
pkg: sqlite error while executing UPDATE packages SET name=?1  WHERE
name=?2; in file pkg_jobs.c:1731: UNIQUE constraint
failed: packages.name
pkg: sqlite error while executing UPDATE packages SET name=?1  WHERE
name=?2; in file pkg_jobs.c:1731: UNIQUE constraint
failed: packages.name
pkg: sqlite error while executing UPDATE packages SET name=?1  WHERE
name=?2; in file pkg_jobs.c:1731: UNIQUE constraint
failed: packages.name
pkg: sqlite error while executing UPDATE packages SET name=?1  WHERE
name=?2; in file pkg_jobs.c:1731: UNIQUE constraint
failed: packages.name

So unfortunately it looks like something is corrupted somewhere.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Lost user database after bungled upgrade

2019-08-28 Thread Ian Lepore
On Wed, 2019-08-28 at 18:09 -0400, Ryan Stone wrote:
> Thanks for the hint; I wasn't aware of /var/backups.  Unfortunately
> fixing my user database at this point hasn't fixed pkg.  I'm worried
> that it has some bad data cached somewhere now. I tried restoring the
> pkg databack from /var/backups but that hasn't helped.
> 
> 

PR 223751 suggests that perhaps the assert is a side effect of another
problem such as a missing file, and fixing that may eliminate the
assert.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223751

Or maybe in your case the files are fine and it really is a uid
problem.  But a "pkg check -s -a" as suggested in the PR couldn't hurt.
:)

-- Ian

> On Wed, Aug 28, 2019 at 5:20 PM Gary Palmer 
> wrote:
> > 
> > On Wed, Aug 28, 2019 at 05:09:35PM -0400, Ryan Stone wrote:
> > > Hi everybody,
> > > 
> > > I lost /etc/master.passwd and friends while trying to recover
> > > from an
> > > src upgrade gone wrong.  I'm trying to run "pkg upgrade -f" to
> > > get all
> > > of the users and groups created by packages recreating, but pkg
> > > is
> > > hitting an assert related to uids:
> > > 
> > > Checking integrity...Assertion failed: (strcmp(uid, p->uid) !=
> > > 0),
> > > function pkg_conflicts_check_local_path, file
> > > pkg_jobs_conflicts.c,
> > > line 386.
> > > 
> > > Is there any way to get past this, or is the system toast?
> > 
> > Did you try restoring from the backups under /var/backups?  There
> > should
> > be master.passwd in there which can be restored and /etc/passwd and
> > the DB files regenarated with pwd_mkdb (I think, never tried)
> > 
> > Regards,
> > 
> > Gary
> 
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "
> freebsd-current-unsubscr...@freebsd.org"

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Lost user database after bungled upgrade

2019-08-28 Thread Ryan Stone
Thanks for the hint; I wasn't aware of /var/backups.  Unfortunately
fixing my user database at this point hasn't fixed pkg.  I'm worried
that it has some bad data cached somewhere now. I tried restoring the
pkg databack from /var/backups but that hasn't helped.


On Wed, Aug 28, 2019 at 5:20 PM Gary Palmer  wrote:
>
> On Wed, Aug 28, 2019 at 05:09:35PM -0400, Ryan Stone wrote:
> > Hi everybody,
> >
> > I lost /etc/master.passwd and friends while trying to recover from an
> > src upgrade gone wrong.  I'm trying to run "pkg upgrade -f" to get all
> > of the users and groups created by packages recreating, but pkg is
> > hitting an assert related to uids:
> >
> > Checking integrity...Assertion failed: (strcmp(uid, p->uid) != 0),
> > function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c,
> > line 386.
> >
> > Is there any way to get past this, or is the system toast?
>
> Did you try restoring from the backups under /var/backups?  There should
> be master.passwd in there which can be restored and /etc/passwd and
> the DB files regenarated with pwd_mkdb (I think, never tried)
>
> Regards,
>
> Gary
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Lost user database after bungled upgrade

2019-08-28 Thread Gary Palmer
On Wed, Aug 28, 2019 at 05:09:35PM -0400, Ryan Stone wrote:
> Hi everybody,
> 
> I lost /etc/master.passwd and friends while trying to recover from an
> src upgrade gone wrong.  I'm trying to run "pkg upgrade -f" to get all
> of the users and groups created by packages recreating, but pkg is
> hitting an assert related to uids:
> 
> Checking integrity...Assertion failed: (strcmp(uid, p->uid) != 0),
> function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c,
> line 386.
> 
> Is there any way to get past this, or is the system toast?

Did you try restoring from the backups under /var/backups?  There should
be master.passwd in there which can be restored and /etc/passwd and
the DB files regenarated with pwd_mkdb (I think, never tried)

Regards,

Gary
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Lost user database after bungled upgrade

2019-08-28 Thread Ryan Stone
Hi everybody,

I lost /etc/master.passwd and friends while trying to recover from an
src upgrade gone wrong.  I'm trying to run "pkg upgrade -f" to get all
of the users and groups created by packages recreating, but pkg is
hitting an assert related to uids:

Checking integrity...Assertion failed: (strcmp(uid, p->uid) != 0),
function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c,
line 386.

Is there any way to get past this, or is the system toast?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"