9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] inconsistencies after a sysupdate
@ 2021-06-28 17:18 Xiao-Yong Jin
  2021-06-28 18:33 ` ori
  0 siblings, 1 reply; 5+ messages in thread
From: Xiao-Yong Jin @ 2021-06-28 17:18 UTC (permalink / raw)
  To: 9front

After a sysupdate, I currently have

; git/branch -a
heads/front
remotes/THEM/front
remotes/origin/front
; ls -l .git/
--rw-rw-r-- M 214 glenda sys  22 Jun 23 10:17 .git/HEAD
--rw-rw-r-- M 214 glenda sys 107 Jun  9 12:01 .git/config
--rw-rw-r-- M 214 glenda sys  31 Jun  9 12:03 .git/desc
d-r-xr-xr-x M 254 glenda sys   0 Jun  9 12:03 .git/fs
d-rwxrwxr-x M 214 glenda sys   0 Jun 14 11:31 .git/index9
d-rwxrwxr-x M 214 glenda sys   0 Jun  9 12:01 .git/objects
d-rwxrwxr-x M 214 glenda sys   0 Jun  9 12:01 .git/refs
--rw-rw-r-- M 214 glenda sys   0 Jun  9 12:03 .git/webpublish
; cat .git/HEAD
ref: refs/heads/front
; cat .git/refs/heads/front
658757abed7be283e06bae3b1722fc2703334d74
; git/diff /sys/src/cmd/vt
; git/log|sed 3q
Hash:	658757abed7be283e06bae3b1722fc2703334d74
Author:	Anthony Martin <ality@pbrane.org>
Date:	Sat Jun 26 19:13:58 -0500 2021
; diff -c /.git/fs/object/658757abed7be283e06bae3b1722fc2703334d74/tree/sys/src/cmd/vt /sys/src/cmd/vt
diff -c /.git/fs/object/658757abed7be283e06bae3b1722fc2703334d74/tree/sys/src/cmd/vt/cons.h /sys/src/cmd/vt/cons.h
/.git/fs/object/658757abed7be283e06bae3b1722fc2703334d74/tree/sys/src/cmd/vt/cons.h:54,60 - /sys/src/cmd/vt/cons.h:54,60
  extern int	number(Rune *, int *);
  extern void	shift(int,int,int,int);
  extern void	scroll(int,int,int,int);
- extern void	backup(int);
+ extern int	backup(int);
  extern void	sendnchars(int, char *);
  extern Point	pt(int, int);
  extern Point	pos(Point);
; git/walk sys/src/cmd/vt
T sys/src/cmd/vt/cons.h
T sys/src/cmd/vt/fs.c
T sys/src/cmd/vt/main.c
T sys/src/cmd/vt/mkfile
T sys/src/cmd/vt/termcap
T sys/src/cmd/vt/vt.c


So git/walk is wrong.  How do I fix this?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] inconsistencies after a sysupdate
  2021-06-28 17:18 [9front] inconsistencies after a sysupdate Xiao-Yong Jin
@ 2021-06-28 18:33 ` ori
  2021-06-28 18:57   ` Xiao-Yong Jin
  0 siblings, 1 reply; 5+ messages in thread
From: ori @ 2021-06-28 18:33 UTC (permalink / raw)
  To: 9front

Quoth Xiao-Yong Jin <meta.jxy@gmail.com>:
> After a sysupdate, I currently have
> 

>   extern Point	pos(Point);
> ; git/walk sys/src/cmd/vt
> T sys/src/cmd/vt/cons.h
> T sys/src/cmd/vt/fs.c
> T sys/src/cmd/vt/main.c
> T sys/src/cmd/vt/mkfile
> T sys/src/cmd/vt/termcap
> T sys/src/cmd/vt/vt.c
> 
> 
> So git/walk is wrong.  How do I fix this?


What are the permissions on those files? We had
some issues where we would:

1) set permissions overly tightly when updating
   (644/755, rather than 664, 775), so that
   future updates would not be able to modify
   those files.

   fix: b904edadd8869787b4419ce93c1c29b5beee3556

2) were overly lax in checking for success when
   updating files in git/branch and git/revert,
   and marking them clean when we failed to update.

   fix: 682aabf9f692f310ad910910073d8f9d3839b716

If you were bitten by these bugs, reset the
permissions, and then git/add them to reset
the cache.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] inconsistencies after a sysupdate
  2021-06-28 18:33 ` ori
@ 2021-06-28 18:57   ` Xiao-Yong Jin
  2021-06-30  0:47     ` ori
  0 siblings, 1 reply; 5+ messages in thread
From: Xiao-Yong Jin @ 2021-06-28 18:57 UTC (permalink / raw)
  To: 9front



> On Jun 28, 2021, at 1:33 PM, ori@eigenstate.org wrote:
> 
> Quoth Xiao-Yong Jin <meta.jxy@gmail.com>:
>> 
>> So git/walk is wrong.  How do I fix this?
> 
> 
> What are the permissions on those files? We had
> some issues where we would:
> 
> 1) set permissions overly tightly when updating
>   (644/755, rather than 664, 775), so that
>   future updates would not be able to modify
>   those files.

After going through all the files in .git/fs/object/658757*/tree,
I found out that the permission of the files,
	/sys/src/cmd/?c/reg.c
were 644 with user/group sys/sys, which glenda couldn't write.

So I guess what happened was that, while git/pull, the update
of the files /sys/src/cmd/?c/reg.c failed with permission error,
and likely the error handling was not good enough for this case,
which left the state inconsistent.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] inconsistencies after a sysupdate
  2021-06-28 18:57   ` Xiao-Yong Jin
@ 2021-06-30  0:47     ` ori
  2021-07-04 23:53       ` kvik
  0 siblings, 1 reply; 5+ messages in thread
From: ori @ 2021-06-30  0:47 UTC (permalink / raw)
  To: 9front

Quoth Xiao-Yong Jin <meta.jxy@gmail.com>:
> 
> 
> > On Jun 28, 2021, at 1:33 PM, ori@eigenstate.org wrote:
> > 
> > Quoth Xiao-Yong Jin <meta.jxy@gmail.com>:
> >> 
> >> So git/walk is wrong.  How do I fix this?
> > 
> > 
> > What are the permissions on those files? We had
> > some issues where we would:
> > 
> > 1) set permissions overly tightly when updating
> >   (644/755, rather than 664, 775), so that
> >   future updates would not be able to modify
> >   those files.
> 
> After going through all the files in .git/fs/object/658757*/tree,
> I found out that the permission of the files,
> 	/sys/src/cmd/?c/reg.c
> were 644 with user/group sys/sys, which glenda couldn't write.
> 
> So I guess what happened was that, while git/pull, the update
> of the files /sys/src/cmd/?c/reg.c failed with permission error,
> and likely the error handling was not good enough for this case,
> which left the state inconsistent.
> 

Yeah. That just happened to me on my laptop,
which gets sysupdated less frequently than
my CPU server.

For anyone else that runs into permission
errors when sysupdating:

	chmod g+w /path/to/files
	git/revert /path/to/files

and make sure you update git:

	cd /sys/src/cmd/git && mk install

Apologies for these teething troubles; this
is really the first time we've had a repo
owned by $user, but updated by $otheruser,
and I clearly didn't get permissions right
in that case.

I think these issues have been shaken out
now -- thanks for bearing with me.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] inconsistencies after a sysupdate
  2021-06-30  0:47     ` ori
@ 2021-07-04 23:53       ` kvik
  0 siblings, 0 replies; 5+ messages in thread
From: kvik @ 2021-07-04 23:53 UTC (permalink / raw)
  To: 9front

> For anyone else that runs into permission
> errors when sysupdating:
> 
> 	chmod g+w /path/to/files
> 	git/revert /path/to/files
> 
> and make sure you update git:
> 
> 	cd /sys/src/cmd/git && mk install

Got hit by this issue as well.

Make doubly sure that you have an actually updated git before trying
git/revert following the above instructions:

	git/revert /sys/src/cmd/git
	mk install

To help find the files that need fixing you can use the following:

	fn fucked {walk -fexp $1 | grep '^..rw.r-' | awk '{print $2}'}


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-05 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 17:18 [9front] inconsistencies after a sysupdate Xiao-Yong Jin
2021-06-28 18:33 ` ori
2021-06-28 18:57   ` Xiao-Yong Jin
2021-06-30  0:47     ` ori
2021-07-04 23:53       ` kvik

9front - general discussion about 9front

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9front

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9front 9front/ http://inbox.vuxu.org/9front \
		9front@9front.org
	public-inbox-index 9front

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9front


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git