9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Applying patches to local machine
@ 2007-11-02 10:11 Christian Kellermann
  2007-11-02 10:21 ` Charles Forsyth
  0 siblings, 1 reply; 9+ messages in thread
From: Christian Kellermann @ 2007-11-02 10:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

Hi,

is there an easy way to apply patches from sources to my local machine?

Regards,

Christian

-- 
You may use my gpg key for replies:
pub  1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] Applying patches to local machine
  2007-11-02 10:11 [9fans] Applying patches to local machine Christian Kellermann
@ 2007-11-02 10:21 ` Charles Forsyth
  2007-11-02 10:25   ` Christian Kellermann
  2007-11-02 10:39   ` Anthony Sorace
  0 siblings, 2 replies; 9+ messages in thread
From: Charles Forsyth @ 2007-11-02 10:21 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 73 bytes --]

see http://plan9.bell-labs.com/wiki/plan9/Staying_up_to_date/index.html

[-- Attachment #2: Type: message/rfc822, Size: 3709 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 211 bytes --]

Hi,

is there an easy way to apply patches from sources to my local machine?

Regards,

Christian

-- 
You may use my gpg key for replies:
pub  1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)

[-- Attachment #2.1.2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] Applying patches to local machine
  2007-11-02 10:21 ` Charles Forsyth
@ 2007-11-02 10:25   ` Christian Kellermann
  2007-11-02 10:39   ` Anthony Sorace
  1 sibling, 0 replies; 9+ messages in thread
From: Christian Kellermann @ 2007-11-02 10:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

* Charles Forsyth <forsyth@terzarima.net> [071102 11:22]:
> see http://plan9.bell-labs.com/wiki/plan9/Staying_up_to_date/index.html

I think I should clarify my question: Is there a way to use the
patch/* utilities as a non developer to apply patches in
/n/sources/patch to my local machine? If not how can I do this
easily without copying all files manually?

I was not referring to updating my system.

Thanks for your answer,

Christian

-- 
You may use my gpg key for replies:
pub  1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] Applying patches to local machine
  2007-11-02 10:21 ` Charles Forsyth
  2007-11-02 10:25   ` Christian Kellermann
@ 2007-11-02 10:39   ` Anthony Sorace
  2007-11-02 10:44     ` Christian Kellermann
  1 sibling, 1 reply; 9+ messages in thread
From: Anthony Sorace @ 2007-11-02 10:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I think he's asking whether there's any way to apply not yet
integrated/approved patches to his local source.

It looks like running patch/apply works for everyone, modifying
whatever the local root is (rather than explicitly working on
/n/sources), which is nice. It does require you having write
permissions on (its view of) the patch directory itself:

	:; patch/apply savec/cpu-cec
	.tmp: rc (apply): can't open: '.tmp' permission denied
	:; ramfs && bind -bc /tmp /n/sources/patch/saved/cpu-cec
	:; patch/apply saved/cpu-cec
	merge...backup...cp: can't stat /sys/src/9/port/devcec.c:
'/sys/src/9/port/devcec.c' does not exist
copy...
	to update sources:
		update /sys/src/9/port/portfns.h
		update /sys/src/9/port/devcec.c
		update /sys/src/9/port/devcons.c

That cp error after backup is just because devcec.c isn't an existing
file in the system. I'm not sure whether those update lines are
intended to be executable commands we just don't have (looks like) or
advisory, but either way your local tree is now updated.

This is neat, by the way. I'd never thought to actually check if this
worked or not. Given it's this easy, I think I'll play around with the
rio pie menu stuff. Thanks!

Anthony


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

* Re: [9fans] Applying patches to local machine
  2007-11-02 10:39   ` Anthony Sorace
@ 2007-11-02 10:44     ` Christian Kellermann
  2007-11-02 11:35       ` Christian Kellermann
  0 siblings, 1 reply; 9+ messages in thread
From: Christian Kellermann @ 2007-11-02 10:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

* Anthony Sorace <anothy@gmail.com> [071102 11:41]:

> This is neat, by the way. I'd never thought to actually check if this
> worked or not. Given it's this easy, I think I'll play around with the
> rio pie menu stuff. Thanks!

This is the reason I asked :)

Thanks Anthony!

-- 
You may use my gpg key for replies:
pub  1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] Applying patches to local machine
  2007-11-02 10:44     ` Christian Kellermann
@ 2007-11-02 11:35       ` Christian Kellermann
  2007-11-02 11:52         ` Anthony Sorace
  0 siblings, 1 reply; 9+ messages in thread
From: Christian Kellermann @ 2007-11-02 11:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

Hi,

the above suggestion does not work for me, the merging cannot copy
files due to permission problems. I haven't looked further into the
issue yet. This happens when running commands not intended for this
purpose :)


-- 
You may use my gpg key for replies:
pub  1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] Applying patches to local machine
  2007-11-02 11:35       ` Christian Kellermann
@ 2007-11-02 11:52         ` Anthony Sorace
  2007-11-02 12:35           ` erik quanstrom
  2007-11-02 18:47           ` Dave Eckhardt
  0 siblings, 2 replies; 9+ messages in thread
From: Anthony Sorace @ 2007-11-02 11:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

all the /bin/patch/* files are just shell scripts, so it's easy to see
what's going on. which stage gives you permission errors? in a default
setup, you'll have to be in group sys, as that's who owns all the
sources.

if you can't be in sys for whatever reason, you'll have a somewhat
more manual process ahead of you. identify the files to be modified,
create local copies (i'm assuming you can at least *read* them,
otherwise this is probably futile), bind them over the system ones,
and re-run the patch command.

of course, i'm largely guessing without an error message.


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

* Re: [9fans] Applying patches to local machine
  2007-11-02 11:52         ` Anthony Sorace
@ 2007-11-02 12:35           ` erik quanstrom
  2007-11-02 18:47           ` Dave Eckhardt
  1 sibling, 0 replies; 9+ messages in thread
From: erik quanstrom @ 2007-11-02 12:35 UTC (permalink / raw)
  To: 9fans

> all the /bin/patch/* files are just shell scripts, so it's easy to see
> what's going on. which stage gives you permission errors? in a default
> setup, you'll have to be in group sys, as that's who owns all the
> sources.
> 
> if you can't be in sys for whatever reason, you'll have a somewhat
> more manual process ahead of you. identify the files to be modified,
> create local copies (i'm assuming you can at least *read* them,
> otherwise this is probably futile), bind them over the system ones,
> and re-run the patch command.
> 
> of course, i'm largely guessing without an error message.

read the source, luke.

patch/apply assumes you are at bell labs with appropriate permissions
to /n/sources.  the script bails if you can't touch files in the patch's
directory.

it is also likely that you'll need to merge the source by hand as
the piemenu patch is very old.

you likely want to make a seperate copy of libdraw and link against
it selectivly by binding the archive on /386/lib/libdraw.a

- erik


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

* Re: [9fans] Applying patches to local machine
  2007-11-02 11:52         ` Anthony Sorace
  2007-11-02 12:35           ` erik quanstrom
@ 2007-11-02 18:47           ` Dave Eckhardt
  1 sibling, 0 replies; 9+ messages in thread
From: Dave Eckhardt @ 2007-11-02 18:47 UTC (permalink / raw)
  To: 9fans

> if you can't be in sys for whatever reason, you'll have a somewhat
> more manual process ahead of you. identify the files to be modified,
> create local copies (i'm assuming you can at least *read* them,
> otherwise this is probably futile), bind them over the system ones,
> and re-run the patch command.

Don't forget about divergefs(*)... "divergefs -p /some/dir /sys" will
let you virtually write all over /sys, including deleting files, and
will also let you resume that environment later.

Dave Eckhardt

(*) Some compilation required.


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

end of thread, other threads:[~2007-11-02 18:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-02 10:11 [9fans] Applying patches to local machine Christian Kellermann
2007-11-02 10:21 ` Charles Forsyth
2007-11-02 10:25   ` Christian Kellermann
2007-11-02 10:39   ` Anthony Sorace
2007-11-02 10:44     ` Christian Kellermann
2007-11-02 11:35       ` Christian Kellermann
2007-11-02 11:52         ` Anthony Sorace
2007-11-02 12:35           ` erik quanstrom
2007-11-02 18:47           ` Dave Eckhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).