* [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
@ 2006-04-02 17:34 Mattia Dongili
2006-04-02 18:29 ` Geert Uytterhoeven
0 siblings, 1 reply; 12+ messages in thread
From: Mattia Dongili @ 2006-04-02 17:34 UTC (permalink / raw)
To: UML-devel
[-- Attachment #1: Type: text/plain, Size: 613 bytes --]
Hello,
some time ago it's been proposed to let uml_net live in /usr/lib/uml to
comply the FHS (I have version 2.3 at hand):
/usr/lib includes object files, libraries, and internal binaries that
are not intended to be executed directly by users or shell scripts.
see chapter 4.7.1
The attached patch implements it and keeps backward compatibility.
It's kind of brutal because putenv will wipe any user-defined PATH, if
this is a problem I can provide an improved patch that appends
/usr/lib/uml to the existing PATH. Is this the way to go?
Signed-off-by: Mattia Dongili <malattia@linux.it>
--
mattia
:wq!
[-- Attachment #2: 01_uml_net.diff --]
[-- Type: text/plain, Size: 656 bytes --]
--- a/arch/um/os-Linux/helper.c 2006-04-02 16:32:38.340801686 +0200
+++ b/arch/um/os-Linux/helper.c 2006-04-02 16:34:13.454745936 +0200
@@ -22,6 +22,9 @@ struct helper_data {
int fd;
};
+/* PATH variable to find uml helpers installed in FHS compliant locations */
+static char *alt_path = "PATH=:/bin:/usr/bin:/usr/lib/uml";
+
/* Debugging aid, changed only from gdb */
int helper_pause = 0;
@@ -41,6 +44,7 @@ static int helper_child(void *arg)
}
if(data->pre_exec != NULL)
(*data->pre_exec)(data->pre_data);
+ putenv(alt_path);
execvp(argv[0], argv);
errval = errno;
printk("execvp of '%s' failed - errno = %d\n", argv[0], errno);
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-02 17:34 [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH Mattia Dongili
@ 2006-04-02 18:29 ` Geert Uytterhoeven
2006-04-02 19:54 ` Mattia Dongili
0 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2006-04-02 18:29 UTC (permalink / raw)
To: Mattia Dongili; +Cc: UML-devel
On Sun, 2 Apr 2006, Mattia Dongili wrote:
> some time ago it's been proposed to let uml_net live in /usr/lib/uml to
> comply the FHS (I have version 2.3 at hand):
>
> /usr/lib includes object files, libraries, and internal binaries that
> are not intended to be executed directly by users or shell scripts.
>
> see chapter 4.7.1
> The attached patch implements it and keeps backward compatibility.
> It's kind of brutal because putenv will wipe any user-defined PATH, if
> this is a problem I can provide an improved patch that appends
> /usr/lib/uml to the existing PATH. Is this the way to go?
>
> Signed-off-by: Mattia Dongili <malattia@linux.it>
> --- a/arch/um/os-Linux/helper.c 2006-04-02 16:32:38.340801686 +0200
> +++ b/arch/um/os-Linux/helper.c 2006-04-02 16:34:13.454745936 +0200
> @@ -22,6 +22,9 @@ struct helper_data {
> int fd;
> };
>
> +/* PATH variable to find uml helpers installed in FHS compliant locations */
> +static char *alt_path = "PATH=:/bin:/usr/bin:/usr/lib/uml";
^
Woops, this puts the current directory first in your path, which is probably
not what you want (Never bitten by people leaving evil `ls' variants in /tmp?).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-02 18:29 ` Geert Uytterhoeven
@ 2006-04-02 19:54 ` Mattia Dongili
2006-04-04 0:39 ` Blaisorblade
0 siblings, 1 reply; 12+ messages in thread
From: Mattia Dongili @ 2006-04-02 19:54 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: UML-devel
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
On Sun, Apr 02, 2006 at 08:29:12PM +0200, Geert Uytterhoeven wrote:
> On Sun, 2 Apr 2006, Mattia Dongili wrote:
[...]
> > --- a/arch/um/os-Linux/helper.c 2006-04-02 16:32:38.340801686 +0200
> > +++ b/arch/um/os-Linux/helper.c 2006-04-02 16:34:13.454745936 +0200
> > @@ -22,6 +22,9 @@ struct helper_data {
> > int fd;
> > };
> >
> > +/* PATH variable to find uml helpers installed in FHS compliant locations */
> > +static char *alt_path = "PATH=:/bin:/usr/bin:/usr/lib/uml";
> ^
> Woops, this puts the current directory first in your path, which is probably
Urgh! that was just the default path straight from the execle manpage.
The attached patch reimplements the thing appending /usr/lib/uml only
once before starting UML. Still using the above PATH if no PATH variable
exists as execle behaves in the same way.
Signed-off-by: Mattia Dongili <malattia@linux.it>
--
mattia
:wq!
[-- Attachment #2: uml_net.diff --]
[-- Type: text/plain, Size: 1090 bytes --]
--- arch/um/os-Linux/main.c~clean 2006-04-02 21:08:26.782461831 +0200
+++ arch/um/os-Linux/main.c 2006-04-02 21:37:45.548377831 +0200
@@ -74,6 +74,31 @@ static void last_ditch_exit(int sig)
exit(1);
}
+static void setup_env_path(void) {
+ char *new_path = NULL;
+ char *old_path = NULL;
+ int path_len = 0;
+
+ old_path = getenv("PATH");
+ if (!old_path) {
+ /* if no PATH variable is set, just use
+ * the default + /usr/lib/uml
+ */
+ putenv("PATH=:/bin:/usr/bin/:/usr/lib/uml");
+ return;
+ }
+
+ /* append /usr/lib/uml to the existing path */
+ path_len = strlen(old_path) + 19;
+ new_path = malloc(path_len * sizeof(char));
+ if (!new_path) {
+ perror("coudn't malloc to set a new PATH");
+ return;
+ }
+ snprintf(new_path, path_len, "PATH=%s:/usr/lib/uml", old_path);
+ putenv(new_path);
+}
+
extern int uml_exitcode;
extern void scan_elf_aux( char **envp);
@@ -114,6 +139,8 @@ int main(int argc, char **argv, char **e
set_stklim();
+ setup_env_path();
+
new_argv = malloc((argc + 1) * sizeof(char *));
if(new_argv == NULL){
perror("Mallocing argv");
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-02 19:54 ` Mattia Dongili
@ 2006-04-04 0:39 ` Blaisorblade
2006-04-05 21:11 ` Mattia Dongili
0 siblings, 1 reply; 12+ messages in thread
From: Blaisorblade @ 2006-04-04 0:39 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Mattia Dongili, Geert Uytterhoeven, Jeff Dike
On Sunday 02 April 2006 21:54, Mattia Dongili wrote:
> On Sun, Apr 02, 2006 at 08:29:12PM +0200, Geert Uytterhoeven wrote:
> > On Sun, 2 Apr 2006, Mattia Dongili wrote:
>
> [...]
>
> > > --- a/arch/um/os-Linux/helper.c 2006-04-02 16:32:38.340801686 +0200
> > > +++ b/arch/um/os-Linux/helper.c 2006-04-02 16:34:13.454745936 +0200
> > > @@ -22,6 +22,9 @@ struct helper_data {
> > > int fd;
> > > };
> > >
> > > +/* PATH variable to find uml helpers installed in FHS compliant
> > > locations */ +static char *alt_path =
> > > "PATH=:/bin:/usr/bin:/usr/lib/uml";
> >
> > ^
> > Woops, this puts the current directory first in your path, which is
> > probably
>
> Urgh! that was just the default path straight from the execle manpage.
> The attached patch reimplements the thing appending /usr/lib/uml only
> once before starting UML. Still using the above PATH if no PATH variable
> exists as execle behaves in the same way.
Thanks for the patch, we'll possibly apply it, but we need to reimplement (or
copy and fix from glibc) a two-phase execvp(). I've not done it because I've
felt unconfortable with the idea but it's the better I could think of for
now.
In practice, we must avoid any memory allocation after a fork or clone on the
host, because we use the kernel allocator and after a fork() it can't be
used.
I'm unsure whether using the libc allocator would work in that case but mixing
two memory allocators is something I'd never do unless impossible to avoid
(and indeed, the current code does that and I haven't many ideas; however,
int this case it can be avoided, by performing the PATH lookup before the
fork()).
However, probably the patch can be merged anyway, or at least its idea...
*) I'd agree with Geert, but you're indeed correct for that...
*) Saying "19" gets a "NO".
#define UML_LIB_PATH ":/usr/lib/uml"
19 -> strlen(UML_LIB_PATH)
in snprintf, "PATH=%s:/usr/lib/uml" -> "PATH=%s" UML_LIB_PATH
(using string literal concatenation)
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
http://it.messenger.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-04 0:39 ` Blaisorblade
@ 2006-04-05 21:11 ` Mattia Dongili
2006-04-07 6:45 ` Blaisorblade
0 siblings, 1 reply; 12+ messages in thread
From: Mattia Dongili @ 2006-04-05 21:11 UTC (permalink / raw)
To: Blaisorblade; +Cc: user-mode-linux-devel, Geert Uytterhoeven, Jeff Dike
[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]
On Tue, Apr 04, 2006 at 02:39:44AM +0200, Blaisorblade wrote:
> On Sunday 02 April 2006 21:54, Mattia Dongili wrote:
[...]
> Thanks for the patch, we'll possibly apply it, but we need to reimplement (or
> copy and fix from glibc) a two-phase execvp(). I've not done it because I've
> felt unconfortable with the idea but it's the better I could think of for
> now.
Hmm. I see.
> However, probably the patch can be merged anyway, or at least its idea...
[...]
> *) I'd agree with Geert, but you're indeed correct for that...
> *) Saying "19" gets a "NO"
I'm sorry... damn lazy programmers :)
>
> #define UML_LIB_PATH ":/usr/lib/uml"
what about a config option instead? CONFIG_UML_NET_PATH
> 19 -> strlen(UML_LIB_PATH)
> in snprintf, "PATH=%s:/usr/lib/uml" -> "PATH=%s" UML_LIB_PATH
>
> (using string literal concatenation)
here's an updated patch, I added a check for current PATH=="" to avoid
touching the PATH variable when empty (again, kind of keeping the same
behaviour of a clean execvp, I mean it makes no sense to append
/usr/lib/uml and not /bin:/usr/bin too).
Description:
append /usr/lib/uml to the existing PATH environment variable to let
execvp search uml_net in FHS compliant locations.
Signed-off-by: Mattia Dongili <malattia@linux.it>
--
mattia
:wq!
[-- Attachment #2: uml_net-2.diff --]
[-- Type: text/plain, Size: 1280 bytes --]
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 2878e89..774a3d7 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -74,6 +74,38 @@ static void last_ditch_exit(int sig)
exit(1);
}
+#define UML_LIB_PATH ":/usr/lib/uml"
+
+static void setup_env_path(void) {
+ char *new_path = NULL;
+ char *old_path = NULL;
+ int path_len = 0;
+
+ old_path = getenv("PATH");
+ if (!old_path) {
+ /* if no PATH variable is set, just use
+ * the default + /usr/lib/uml
+ */
+ putenv("PATH=:/bin:/usr/bin/" UML_LIB_PATH);
+ return;
+ }
+
+ /* do nothing if the PATH variable exists but is empty */
+ path_len = strlen(old_path);
+ if (!path_len)
+ return;
+
+ /* append /usr/lib/uml to the existing path */
+ path_len += strlen("PATH=" UML_LIB_PATH) + 1;
+ new_path = malloc(path_len * sizeof(char));
+ if (!new_path) {
+ perror("coudn't malloc to set a new PATH");
+ return;
+ }
+ snprintf(new_path, path_len, "PATH=%s" UML_LIB_PATH, old_path);
+ putenv(new_path);
+}
+
extern int uml_exitcode;
extern void scan_elf_aux( char **envp);
@@ -114,6 +146,8 @@ int main(int argc, char **argv, char **e
set_stklim();
+ setup_env_path();
+
new_argv = malloc((argc + 1) * sizeof(char *));
if(new_argv == NULL){
perror("Mallocing argv");
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-05 21:11 ` Mattia Dongili
@ 2006-04-07 6:45 ` Blaisorblade
2006-04-07 16:52 ` Mattia Dongili
0 siblings, 1 reply; 12+ messages in thread
From: Blaisorblade @ 2006-04-07 6:45 UTC (permalink / raw)
To: Mattia Dongili; +Cc: user-mode-linux-devel, Geert Uytterhoeven, Jeff Dike
On Wednesday 05 April 2006 23:11, Mattia Dongili wrote:
> On Tue, Apr 04, 2006 at 02:39:44AM +0200, Blaisorblade wrote:
> > On Sunday 02 April 2006 21:54, Mattia Dongili wrote:
>
> [...]
>
> > Thanks for the patch, we'll possibly apply it, but we need to reimplement
> > (or copy and fix from glibc) a two-phase execvp(). I've not done it
> > because I've felt unconfortable with the idea but it's the better I could
> > think of for now.
>
> Hmm. I see.
>
> > However, probably the patch can be merged anyway, or at least its idea...
>
> [...]
> > *) I'd agree with Geert, but you're indeed correct for that...
> > *) Saying "19" gets a "NO"
> I'm sorry... damn lazy programmers :)
> > #define UML_LIB_PATH ":/usr/lib/uml"
> what about a config option instead? CONFIG_UML_NET_PATH
Don't think so, that's not supposed to be changed according to any config
option or I can't see that. Unless on 64-bit system that's /usr/lib64/uml,
and in that case it makes sense to have CONFIG_XXX =
"/usr/lib/uml" (without :, add them only in the source, i.e. insulate details
away).
> > 19 -> strlen(UML_LIB_PATH)
> > in snprintf, "PATH=%s:/usr/lib/uml" -> "PATH=%s" UML_LIB_PATH
> >
> > (using string literal concatenation)
> here's an updated patch, I added a check for current PATH=="" to avoid
> touching the PATH variable when empty (again, kind of keeping the same
> behaviour of a clean execvp, I mean it makes no sense to append
> /usr/lib/uml and not /bin:/usr/bin too).
In that case, you should append both IMHO - empty PATH and no PATH should be
treated the same way, I think.
I'm not sure we need to cope with such strange settings, but doing it isn't
bad.
Btw, as a last note - we don't use sizeof(char), I don't know if that size is
mandated by the C standard but anyway I've never seen anything like
sizeof(char) in the Linux kernel.
> Description:
> append /usr/lib/uml to the existing PATH environment variable to let
> execvp search uml_net in FHS compliant locations.
> Signed-off-by: Mattia Dongili <malattia@linux.it>
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-07 6:45 ` Blaisorblade
@ 2006-04-07 16:52 ` Mattia Dongili
2006-04-09 12:52 ` Stefano Melchior
2006-04-21 21:18 ` Blaisorblade
0 siblings, 2 replies; 12+ messages in thread
From: Mattia Dongili @ 2006-04-07 16:52 UTC (permalink / raw)
To: Blaisorblade; +Cc: user-mode-linux-devel, Geert Uytterhoeven, Jeff Dike
[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]
On Fri, Apr 07, 2006 at 08:45:38AM +0200, Blaisorblade wrote:
> On Wednesday 05 April 2006 23:11, Mattia Dongili wrote:
> > On Tue, Apr 04, 2006 at 02:39:44AM +0200, Blaisorblade wrote:
[...]
> > > #define UML_LIB_PATH ":/usr/lib/uml"
>
> > what about a config option instead? CONFIG_UML_NET_PATH
>
> Don't think so, that's not supposed to be changed according to any config
> option or I can't see that. Unless on 64-bit system that's /usr/lib64/uml,
> and in that case it makes sense to have CONFIG_XXX =
> "/usr/lib/uml" (without :, add them only in the source, i.e. insulate details
> away).
Yes, that was what I meant. However it's probably not worth the effort
yet.
> > > 19 -> strlen(UML_LIB_PATH)
> > > in snprintf, "PATH=%s:/usr/lib/uml" -> "PATH=%s" UML_LIB_PATH
> > >
> > > (using string literal concatenation)
>
> > here's an updated patch, I added a check for current PATH=="" to avoid
> > touching the PATH variable when empty (again, kind of keeping the same
> > behaviour of a clean execvp, I mean it makes no sense to append
> > /usr/lib/uml and not /bin:/usr/bin too).
>
> In that case, you should append both IMHO - empty PATH and no PATH should be
> treated the same way, I think.
updated patch attached, I hope you like the if-statement .
Description:
append /usr/lib/uml to the existing PATH environment variable to let
execvp search uml_net in FHS compliant locations.
Signed-off-by: Mattia Dongili <malattia@linux.it>
--
mattia
:wq!
[-- Attachment #2: uml_net-2.diff --]
[-- Type: text/plain, Size: 1203 bytes --]
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 2878e89..02cf668 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -74,6 +74,33 @@ static void last_ditch_exit(int sig)
exit(1);
}
+#define UML_LIB_PATH ":/usr/lib/uml"
+
+static void setup_env_path(void) {
+ char *new_path = NULL;
+ char *old_path = NULL;
+ int path_len = 0;
+
+ old_path = getenv("PATH");
+ /* if no PATH variable is set or it has an empty value
+ * just use the default + /usr/lib/uml
+ */
+ if (!old_path || (path_len = strlen(old_path)) == 0) {
+ putenv("PATH=:/bin:/usr/bin/" UML_LIB_PATH);
+ return;
+ }
+
+ /* append /usr/lib/uml to the existing path */
+ path_len += strlen("PATH=" UML_LIB_PATH) + 1;
+ new_path = malloc(path_len);
+ if (!new_path) {
+ perror("coudn't malloc to set a new PATH");
+ return;
+ }
+ snprintf(new_path, path_len, "PATH=%s" UML_LIB_PATH, old_path);
+ putenv(new_path);
+}
+
extern int uml_exitcode;
extern void scan_elf_aux( char **envp);
@@ -114,6 +141,8 @@ int main(int argc, char **argv, char **e
set_stklim();
+ setup_env_path();
+
new_argv = malloc((argc + 1) * sizeof(char *));
if(new_argv == NULL){
perror("Mallocing argv");
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-07 16:52 ` Mattia Dongili
@ 2006-04-09 12:52 ` Stefano Melchior
2006-04-19 9:52 ` Blaisorblade
2006-04-21 21:18 ` Blaisorblade
1 sibling, 1 reply; 12+ messages in thread
From: Stefano Melchior @ 2006-04-09 12:52 UTC (permalink / raw)
To: Mattia Dongili
Cc: Blaisorblade, user-mode-linux-devel, Geert Uytterhoeven,
Jeff Dike
[-- Attachment #1: Type: text/plain, Size: 2036 bytes --]
On Fri, Apr 07, 2006 at 06:52:05PM +0200, Mattia Dongili wrote:
Dear all,
> > > > #define UML_LIB_PATH ":/usr/lib/uml"
> >
> > > what about a config option instead? CONFIG_UML_NET_PATH
> >
> > Don't think so, that's not supposed to be changed according to any config
> > option or I can't see that. Unless on 64-bit system that's /usr/lib64/uml,
> > and in that case it makes sense to have CONFIG_XXX =
> > "/usr/lib/uml" (without :, add them only in the source, i.e. insulate details
> > away).
>
> Yes, that was what I meant. However it's probably not worth the effort
> yet.
>
> > > > 19 -> strlen(UML_LIB_PATH)
> > > > in snprintf, "PATH=%s:/usr/lib/uml" -> "PATH=%s" UML_LIB_PATH
> > > >
> > > > (using string literal concatenation)
> >
> > > here's an updated patch, I added a check for current PATH=="" to avoid
> > > touching the PATH variable when empty (again, kind of keeping the same
> > > behaviour of a clean execvp, I mean it makes no sense to append
> > > /usr/lib/uml and not /bin:/usr/bin too).
> >
> > In that case, you should append both IMHO - empty PATH and no PATH should be
> > treated the same way, I think.
>
> updated patch attached, I hope you like the if-statement .
>
> Description:
> append /usr/lib/uml to the existing PATH environment variable to let
> execvp search uml_net in FHS compliant locations.
at this point, is it the case to have also this patch for the
uml-utilities in order to install uml-net directly on the FHS complaint
path (uml-net):
--- uml_net/Makefile 2003-02-08 05:04:55.000000000 +0100
+++ uml_net/Makefile 2006-04-09 12:48:27.000000000 +0200
@@ -3,7 +3,7 @@
BIN = uml_net
CFLAGS = -g -Wall $(TUNTAP)
-BIN_DIR ?= /usr/bin
+BIN_DIR ?= /usr/lib/uml
OBJS = ethertap.o host.o output.o slip.o uml_net.o
What do you think?
Cheers
SteX
--
Stefano Melchior, GPG key = D52DF829 - <stefano.melchior@openlabs.it>
http://etinarcadiaego.dyndns.org -- http://www.stex.name
Skype ID "stefanomelchior"
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 309 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-09 12:52 ` Stefano Melchior
@ 2006-04-19 9:52 ` Blaisorblade
2006-04-19 19:07 ` Mattia Dongili
0 siblings, 1 reply; 12+ messages in thread
From: Blaisorblade @ 2006-04-19 9:52 UTC (permalink / raw)
To: user-mode-linux-devel, stefano.melchior
Cc: Mattia Dongili, Geert Uytterhoeven, Jeff Dike
On Sunday 09 April 2006 14:52, Stefano Melchior wrote:
> On Fri, Apr 07, 2006 at 06:52:05PM +0200, Mattia Dongili wrote:
> Dear all,
> > > > > #define UML_LIB_PATH ":/usr/lib/uml"
> > > > what about a config option instead? CONFIG_UML_NET_PATH
> > > Don't think so, that's not supposed to be changed according to any
> > > config option or I can't see that. Unless on 64-bit system that's
> > > /usr/lib64/uml, and in that case it makes sense to have CONFIG_XXX =
> > > "/usr/lib/uml" (without :, add them only in the source, i.e. insulate
> > > details away).
> > Yes, that was what I meant. However it's probably not worth the effort
> > yet.
> > Description:
> > append /usr/lib/uml to the existing PATH environment variable to let
> > execvp search uml_net in FHS compliant locations.
>
> at this point, is it the case to have also this patch for the
> uml-utilities in order to install uml-net directly on the FHS complaint
> path (uml-net):
It is likely a correct patch (didn't proof-read, seems very reasonable) but:
a) make sure it can work on amd64 (/usr/lib or /usr/lib64?)
b) I'll do this in at least 6 months from now, or users will scream - or I'll
add a compatibility symlink in /usr/bin for a while.
Debian did it the hard way IIRC (don't remember if only for the default
location of uml_switch socket or also for this), and problems resulted for
people with self-compiled kernels.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-19 9:52 ` Blaisorblade
@ 2006-04-19 19:07 ` Mattia Dongili
2006-04-21 18:34 ` Blaisorblade
0 siblings, 1 reply; 12+ messages in thread
From: Mattia Dongili @ 2006-04-19 19:07 UTC (permalink / raw)
To: Blaisorblade
Cc: user-mode-linux-devel, stefano.melchior, Geert Uytterhoeven,
Jeff Dike
On Wed, Apr 19, 2006 at 11:52:10AM +0200, Blaisorblade wrote:
[...]
> Debian did it the hard way IIRC (don't remember if only for the default
> location of uml_switch socket or also for this), and problems resulted for
currently we ship unmodified uml_socket and modified uml_net paths :)
oh, and modified tunctl path too (installs in /usr/sbin/).
Anyway I'm preparing an email summarizing Debian's current
modifications, I've seen your call for help on the website and I hope I
can help someway.
> people with self-compiled kernels.
exactely, and this is the main reason why it would really be great to
see the add-/usr/lib/uml-to-path in mainline kernels.
Thanks
--
mattia
:wq!
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-19 19:07 ` Mattia Dongili
@ 2006-04-21 18:34 ` Blaisorblade
0 siblings, 0 replies; 12+ messages in thread
From: Blaisorblade @ 2006-04-21 18:34 UTC (permalink / raw)
To: user-mode-linux-devel
Cc: Mattia Dongili, stefano.melchior, Geert Uytterhoeven, Jeff Dike
On Wednesday 19 April 2006 21:07, Mattia Dongili wrote:
> On Wed, Apr 19, 2006 at 11:52:10AM +0200, Blaisorblade wrote:
> [...]
>
> > Debian did it the hard way IIRC (don't remember if only for the default
> > location of uml_switch socket or also for this), and problems resulted
> > for
>
> currently we ship unmodified uml_socket and modified uml_net paths :)
> oh, and modified tunctl path too (installs in /usr/sbin/).
> Anyway I'm preparing an email summarizing Debian's current
> modifications, I've seen your call for help on the website and I hope I
> can help someway.
>
> > people with self-compiled kernels.
>
> exactely, and this is the main reason why it would really be great to
> see the add-/usr/lib/uml-to-path in mainline kernels.
Yep, that's now merged in my personal tree and will go upstream on my next
merge.
For uml_utilities, I'll maybe add the patch (but leaving a compat symlink) for
next release (which includes Mattia's fixlet).
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
2006-04-07 16:52 ` Mattia Dongili
2006-04-09 12:52 ` Stefano Melchior
@ 2006-04-21 21:18 ` Blaisorblade
1 sibling, 0 replies; 12+ messages in thread
From: Blaisorblade @ 2006-04-21 21:18 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Mattia Dongili, Geert Uytterhoeven, Jeff Dike
On Friday 07 April 2006 18:52, Mattia Dongili wrote:
> On Fri, Apr 07, 2006 at 08:45:38AM +0200, Blaisorblade wrote:
> > On Wednesday 05 April 2006 23:11, Mattia Dongili wrote:
> > In that case, you should append both IMHO - empty PATH and no PATH should
> > be treated the same way, I think.
>
> updated patch attached, I hope you like the if-statement .
>
> Description:
> append /usr/lib/uml to the existing PATH environment variable to let
> execvp search uml_net in FHS compliant locations.
> Signed-off-by: Mattia Dongili <malattia@linux.it>
Ok, very well done - thanks for your patience (I hadn't the time to apply my
suggestions myself, but I realise I must have been fairly annoying), you've
followed the (informal) process very well.
You'll probably later see that, especially when people on the other side have
little time or are important, care to the way you communicate is also
important.
Meanwhile I merged it as I said in another mail - sorry for the long delay,
but I've been very busy.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-04-21 21:19 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-02 17:34 [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH Mattia Dongili
2006-04-02 18:29 ` Geert Uytterhoeven
2006-04-02 19:54 ` Mattia Dongili
2006-04-04 0:39 ` Blaisorblade
2006-04-05 21:11 ` Mattia Dongili
2006-04-07 6:45 ` Blaisorblade
2006-04-07 16:52 ` Mattia Dongili
2006-04-09 12:52 ` Stefano Melchior
2006-04-19 9:52 ` Blaisorblade
2006-04-19 19:07 ` Mattia Dongili
2006-04-21 18:34 ` Blaisorblade
2006-04-21 21:18 ` Blaisorblade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox