osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: [minix3] Re: Pkgsrc Repository Concerns &
Ideas - msg#00020

List: minix3

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index



On 7 February 2011 09:52, Antoine LECA <Antoine.Leca.1@xxxxxxxxx> wrote:
Ivan Gualandri wrote:
> Now editing the Makefile for pkgsrc (the one in /usr)
> i thought that a little modification that add two variables where the user
> can put the address of repository and the branch name will be useful,
> instead of editing the single lines with command. In that way a user:
> 1. Knows immediately what to change
> 2. And he doesn't need to look inside the file (i know that there are only
> three line of code to be edited!!!)

 3. Can change the behaviour without changing the makefile, like in
       make REPOSITORY=git://git.minix3.org/pkgsrc.git
   versus
       make REPOSITORY=http://github.com/pikpik/minix-pkgsrc.git
   versus
       make REPOSITORY=ssh://ast@xxxxxxxxxxxxxxxx:29418/pkgsrc
   versus
       make REPOSITORY=git@xxxxxxxxxx:pikpik/minix-pkgsrc.git
 After all, it is the very basic reason there are variables in make(1)!

However while writing this, I wonder how useful it would be really when
it comes to the repository.

Ops, true!!! 
> So attached there is my patched Makefile (i tried it and it seems to work).

       cd ${.CURDIR}/pkgsrc && git branch $(BRANCH) origin/$(BRANCH)

I used that way, only because looking on the original makefile it uses the same name in both cases.  But so i think that also remote branch (and maybe local)  should be customizable (for example pikpik repository has different branch name from the gautam repository.Actually in the original Makefile branch name is part of the commands: 
        cd ${.CURDIR}/pkgsrc && git branch minix origin/minix        cd ${.CURDIR}/pkgsrc && git checkout minix
And if you want to change repository you must change the command lines. I think that is more useful and readable to have a Branch variable. Like the repository variable. Maybe the local name should be not needed (you can always use a static name for local branch).  
mixes two uses for $(BRANCH): the first is the name of your local
branch, the one you will be using day-to-day; the seocnd is the name of
the branch as it stands on the remote $(REPOSITORY).


By the way: it seems useful to me to read how this is done in
DragonflyBSD (which seems to be the origin here):
http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/etc/Makefile.usr
  Note the base setup is following _two_ branches for pkgsrc, master
(which itself is replicating NetBSD's CVS) and pkgsrc-20xxQq; the fact
they are presently following 2010Q3 (while 2010Q4 has become reality for
D-BSD) is because of
http://gitweb.dragonflybsd.org/dragonfly.git/commit/fe70af2188eaa0ac0a5268f8c5c8381ca93efb6d?f=etc/Makefile.usr
which is basically introducing the same feature as Ivan asks! :-)
Just notice Matt Dillon is using ?=, which may allow for a default value
to be set in the calling environment.


Yeah, i saw, but that way the branch name are not customizable. My idea is to make the repository choice more customizable.
Actually if you replace the repository name in Makefile, using the pikpik clone you receive an error due to wrong branch name. 

Antoine

Ivan  --
You received this message because you are subscribed to the Google Groups "minix3" group.
To post to this group, send email to minix3@xxxxxxxxxxxxxxxx.
To unsubscribe from this group, send email to minix3+unsubscribe@xxxxxxxxxxxxxxxx.
For more options, visit this group at http://groups.google.com/group/minix3?hl=en.




--
"elen sila lumenn omentielvo"

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To post to this group, send email to minix3@xxxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to minix3+unsubscribe@xxxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/minix3?hl=en.

Thread at a glance:

Previous Message by Date:

[minix3] Re: Pkgsrc Repository Concerns & Ideas

Ivan Gualandri wrote: > Now editing the Makefile for pkgsrc (the one in /usr) > i thought that a little modification that add two variables where the user > can put the address of repository and the branch name will be useful, > instead of editing the single lines with command. In that way a user: > 1. Knows immediately what to change > 2. And he doesn't need to look inside the file (i know that there are only > three line of code to be edited!!!) 3. Can change the behaviour without changing the makefile, like in make REPOSITORY=git://git.minix3.org/pkgsrc.git versus make REPOSITORY=http://github.com/pikpik/minix-pkgsrc.git versus make REPOSITORY=ssh://ast@xxxxxxxxxxxxxxxx:29418/pkgsrc versus make REPOSITORY=git@xxxxxxxxxx:pikpik/minix-pkgsrc.git After all, it is the very basic reason there are variables in make(1)! However while writing this, I wonder how useful it would be really when it comes to the repository. > So attached there is my patched Makefile (i tried it and it seems to work). cd ${.CURDIR}/pkgsrc && git branch $(BRANCH) origin/$(BRANCH) mixes two uses for $(BRANCH): the first is the name of your local branch, the one you will be using day-to-day; the seocnd is the name of the branch as it stands on the remote $(REPOSITORY). By the way: it seems useful to me to read how this is done in DragonflyBSD (which seems to be the origin here): http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/etc/Makefile.usr Note the base setup is following _two_ branches for pkgsrc, master (which itself is replicating NetBSD's CVS) and pkgsrc-20xxQq; the fact they are presently following 2010Q3 (while 2010Q4 has become reality for D-BSD) is because of http://gitweb.dragonflybsd.org/dragonfly.git/commit/fe70af2188eaa0ac0a5268f8c5c8381ca93efb6d?f=etc/Makefile.usr which is basically introducing the same feature as Ivan asks! :-) Just notice Matt Dillon is using ?=, which may allow for a default value to be set in the calling environment. Antoine -- You received this message because you are subscribed to the Google Groups "minix3" group. To post to this group, send email to minix3@xxxxxxxxxxxxxxxxx To unsubscribe from this group, send email to minix3+unsubscribe@xxxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/minix3?hl=en.

Next Message by Date:

Re: [minix3] question about context switch

Colin Nichols wrote: > When an interrupt occurs in Minix, the macro SAVE_PROCESS_CTX() is > called to put the machine context into the proc structure. I'm trying > to understand how the assembly code KNOWS where that proc structure > is. Interesting quest! I hope Tomas will answer with details... > In the file kernel/arch/i386/sconst.h, around line 130 (note: I'm not > using the latest source out of svn), you can see the following line: > > movl (CURR_PROC_PTR + 4 + displ)(%esp), %ebp ;\ > > Around line 43, you can find the line: > > #define CURR_PROC_PTR 20 > > (displ is almost always 0). (The value and meaning of displ is explained by the comment lines 121-122, which I believe is correct). > So, it looks like the interrupt code is getting the address off of the > kernel stack?? Yeah, it is how it seems to work (waiting for correction). [ In the below explanation, "top of stack" refers to the lowest values of the stack pointer, while "bottom of stack" refers to the highest. ] As you know, the kernel is always entered from different (higher) CPL, so before the code is executed, the CPU switches to the PL0 stack and pushes there %ss, %esp, %eflags, %cs and %eip, total 20 bytes. The "bottom" of PL0 stack is extracted from the current TSS, members ss0 and sp0 of struct tss_s as defined in proto.h or arch_proto.h (don't know which is the valid one, the contents are identical anyway). So the above movl is fetching "below the bottom" of the PL0 stack before the CPU switches stacks; this is set up (at process start) at the end of tss_init (around line 150 of protect.c): /* make space for process pointer and cpu id and point to the * first usable word */ t->sp0 = ((unsigned) kernel_stack) - X86_STACK_TOP_RESERVED; See also the bootom of archconst.h: /* defines how many bytes are reserved at the top of the kernel stack * for global information like currently scheduled process [...] */ #define X86_STACK_TOP_RESERVED (2 * sizeof(reg_t)) Now I know what is your next question: "where is that pointer set to its current value?" And I do not know the answer to this one! So I wait for more explanations ;-) Antoine -- You received this message because you are subscribed to the Google Groups "minix3" group. To post to this group, send email to minix3@xxxxxxxxxxxxxxxxx To unsubscribe from this group, send email to minix3+unsubscribe@xxxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/minix3?hl=en.

Previous Message by Thread:

[minix3] Re: Pkgsrc Repository Concerns & Ideas

Ivan Gualandri wrote: > Now editing the Makefile for pkgsrc (the one in /usr) > i thought that a little modification that add two variables where the user > can put the address of repository and the branch name will be useful, > instead of editing the single lines with command. In that way a user: > 1. Knows immediately what to change > 2. And he doesn't need to look inside the file (i know that there are only > three line of code to be edited!!!) 3. Can change the behaviour without changing the makefile, like in make REPOSITORY=git://git.minix3.org/pkgsrc.git versus make REPOSITORY=http://github.com/pikpik/minix-pkgsrc.git versus make REPOSITORY=ssh://ast@xxxxxxxxxxxxxxxx:29418/pkgsrc versus make REPOSITORY=git@xxxxxxxxxx:pikpik/minix-pkgsrc.git After all, it is the very basic reason there are variables in make(1)! However while writing this, I wonder how useful it would be really when it comes to the repository. > So attached there is my patched Makefile (i tried it and it seems to work). cd ${.CURDIR}/pkgsrc && git branch $(BRANCH) origin/$(BRANCH) mixes two uses for $(BRANCH): the first is the name of your local branch, the one you will be using day-to-day; the seocnd is the name of the branch as it stands on the remote $(REPOSITORY). By the way: it seems useful to me to read how this is done in DragonflyBSD (which seems to be the origin here): http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/etc/Makefile.usr Note the base setup is following _two_ branches for pkgsrc, master (which itself is replicating NetBSD's CVS) and pkgsrc-20xxQq; the fact they are presently following 2010Q3 (while 2010Q4 has become reality for D-BSD) is because of http://gitweb.dragonflybsd.org/dragonfly.git/commit/fe70af2188eaa0ac0a5268f8c5c8381ca93efb6d?f=etc/Makefile.usr which is basically introducing the same feature as Ivan asks! :-) Just notice Matt Dillon is using ?=, which may allow for a default value to be set in the calling environment. Antoine -- You received this message because you are subscribed to the Google Groups "minix3" group. To post to this group, send email to minix3@xxxxxxxxxxxxxxxxx To unsubscribe from this group, send email to minix3+unsubscribe@xxxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/minix3?hl=en.

Next Message by Thread:

[minix3] Re: Pkgsrc Repository Concerns & Ideas

Ivan Gualandri wrote: > But so i think that also remote branch (and maybe local) should be > customizable (for example pikpik repository has different branch name from > the gautam repository. Of course, sorry I was unclear: I agree branchnames are "variable" information which will indeed benefit being customizable; in fact I believe it is more useful for the branches than for the repository. My point was, that you probably should allow for both names to be different; probably one depending on the other, unless overriden; like BRANCH ?= minix-master LOCAL_BRANCH ?= $(BRANCH) #... cd ${.CURDIR}/pkgsrc && git branch $(LOCAL_BRANCH) origin/$(BRANCH) Antoine -- You received this message because you are subscribed to the Google Groups "minix3" group. To post to this group, send email to minix3@xxxxxxxxxxxxxxxxx To unsubscribe from this group, send email to minix3+unsubscribe@xxxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/minix3?hl=en.
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!