Skip to contentSkip to conversation

modutils 2.3.20 and beyond

PATCH In review Jeff V. Merkey 9 participants 18 messages Nov 26, 2000 – Nov 27, 2000

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 modutils 2.3.20 and beyond

Keith,

Please consider the attached patch for inclusion in all future versions of the modutils depmod program for compatiblity with RedHat and RedHat derived Linux distributions. This patch only requires 4 very short changes to depmod.c as opposed to thousands of changes necessary in anaconda and other RedHat compatible programs and scripts to work with your standard depmod programs without these changes.

Thanks

Jeff

depmod/depmod.c renamed from depmod/depmod.c.chmou +9 -1
@@ -188,6 +188,7 @@
 static SYMBOL *symavail;
 static SYMBOL *maxsyms;
 static LIST_SYMBOL *chunk;
+static int ignore_symbol_versions;
 
 static int quiet;	/* Don't print errors */
 static int showerror;	/* Shows undefined symbols */
@@ -1098,7 +1099,9 @@
 		{"errsyms", 0, 0, 'e'},
 		{"filesyms", 1, 0, 'F'},
 		{"help", 0, 0, 'h'},
+		{"ignore-versions", 0, 0, 'i'},
 		{"show", 0, 0, 'n'},
+		{"system-map", 1, 0, 'm'}, /* backward compatibility, same as 'F' */
 		{"quiet", 0, 0, 'q'},
 		{"syslog", 0, 0, 's'},
 		{"verbose", 0, 0, 'v'},
@@ -1109,7 +1112,7 @@
 
 	error_file = "depmod";
 
-	while ((o = getopt_long(argc, argv, "aAb:C:eF:hnqsvVr",
+	while ((o = getopt_long(argc, argv, "aAb:C:eF:him:nqsvVr",
 				&long_opts[0], NULL)) != EOF) {
 		switch (o) {
 		case 'A':
@@ -1132,11 +1135,16 @@
 			return 0;
 			break;
 
+		case 'i':
+			ignore_symbol_versions = 1;
+			break;
+
 		case 'C':
 			conf_file = optarg;
 			break;
 
 		case 'F':
+		case 'm':
 			file_syms = optarg;
 			break;
#1 lore raw

depmod/depmod.c line 1102

Quoted 1 line
depmod/depmod.c renamed from depmod/depmod.c.chmou +1 -0
+		{"ignore-versions", 0, 0, 'i'},

I dont think we should encourage anyone to ignore symbol versions -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Jeff V. Merkey
Quoted 3 lines · Alan Cox

depmod/depmod.c line 1102

Quoted 1 line
depmod/depmod.c renamed from depmod/depmod.c.chmou +1 -0
+		{"ignore-versions", 0, 0, 'i'},

I dont think we should encourage anyone to ignore symbol versions

Anaconda will barf and require over 850+ changes to the scripts without it. If you look at the patch, you will note that it's a silent switch that's only there to avoid a noisy error message from depmod. It actually does nothing other than set a flag that also does nothing. -m simply maps to -F.

:-)

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
In reply to Jeff V. Merkey

I'd rather have Anaconda changed rather than special casing standard utils to account for distro handling.

Quoted 7 lines · Jeff V. Merkey

Anaconda will barf and require over 850+ changes to the scripts without it. If you look at the patch, you will note that it's a silent switch that's only there to avoid a noisy error message from depmod. It actually does nothing other than set a flag that also does nothing. -m simply maps to -F.

Signature · 12 lines
=====================================================================
Mohammad A. Haque                              http://www.haque.net/ 
                                               [email protected]

  "Alcohol and calculus don't mix.             Project Lead
   Don't drink and derive." --Unknown          http://wm.themes.org/
                                               [email protected]
=====================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#4 lore raw
In reply to Jeff V. Merkey
Quoted 2 lines · Mohammad A. Haque

I'd rather have Anaconda changed rather than special casing standard utils to account for distro handling.

Great. Then tell RedHat to rewrite it without the need for these switches. They will say NO. It's a trivial change, and would save me a lot of hours rewriting scripts. I did it once, but if RedHat has standardized on this set of switches, why not add them as alias commands? It's a trivial patch.

Jeff

Quoted 20 lines
Quoted 7 lines · Jeff V. Merkey

Anaconda will barf and require over 850+ changes to the scripts without it. If you look at the patch, you will note that it's a silent switch that's only there to avoid a noisy error message from depmod. It actually does nothing other than set a flag that also does nothing. -m simply maps to -F.

Signature · 8 lines
=====================================================================
Mohammad A. Haque                              http://www.haque.net/ 
                                               [email protected]

  "Alcohol and calculus don't mix.             Project Lead
   Don't drink and derive." --Unknown          http://wm.themes.org/
                                               [email protected]
=====================================================================

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#5 lore raw
In reply to Jeff V. Merkey
Quoted 5 lines · Jeff V. Merkey

Great. Then tell RedHat to rewrite it without the need for these switches. They will say NO. It's a trivial change, and would save me a lot of hours rewriting scripts. I did it once, but if RedHat has standardized on this set of switches, why not add them as alias commands? It's a trivial patch.

I hate to jump in here in the middle of a perfectly good argument but I'd like to point out a few things:
a) If RedHat/RedHat-like distros needs these changes they can include this patch. The plus side is it won't piss off the people that seem to care and don't use said distros the down side is that if/when another security update comes out people will have to hope this patch applies easily still, if they update themselves.
b) Are these switches which used to be valid in modutils 2.3.x? If so, why? It makes perfect sense to keep this patch around until modutils 2.4 (or 2.5 if modutils version is still supposed to match kernel version). If these are old modutils 2.2.x switches, see part a).
And c) Why does it matter if RedHat/etc would have to adapt their scripts. There's always part a, or what debian does for stable sometimes, backporting fixes. Or even lots of sed & awk magic.

Signature · 6 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#6 lore raw
In reply to Jeff V. Merkey
Quoted 5 lines · Jeff V. Merkey

Keith,

Please consider the attached patch for inclusion in all future versions of the modutils depmod program for compatiblity with RedHat and RedHat derived Linux distributions.

I have a big problem with Redhat. They make incompatible changes to utilities, do not feed patches back to maintainers then expect the rest of the world to follow their lead. The -i and -m flags to modutils are not the only example, I recently found IA64 and Sparc patches they had added to modutils code and not bothered to tell me. Other distributors are much better about sending me patches, Debian and SuSe in particular do the right thing.

Since "-F System.map" in modutils is equivalent to "-m System.map -i" and works on all distributions, not just Redhat, the "-m -i" patch is unnecessary. Consider this my protest against bad habits by distributors, they created the mess with their lack of communication and they have to fix it.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#7 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Keith" == Keith Owens <[email protected]> writes:

Keith> On Sun, 26 Nov 2000 16:36:55 -0700, "Jeff V. Merkey"

Quoted 5 lines · Keith> <[email protected]> wrote:
Quoted 5 lines

Keith,

Please consider the attached patch for inclusion in all future versions of the modutils depmod program for compatiblity with RedHat and RedHat derived Linux distributions.

Keith> I have a big problem with Redhat. They make incompatible Keith> changes to utilities, do not feed patches back to maintainers Keith> then expect the rest of the world to follow their lead. The -i Keith> and -m flags to modutils are not the only example, I recently Keith> found IA64 and Sparc patches they had added to modutils code Keith> and not bothered to tell me. Other distributors are much Keith> better about sending me patches, Debian and SuSe in particular Keith> do the right thing.

I don't remember where the ia64 modutils patches come from, there were some floating around between the ia64 developers for a while. The sparc patches I don't have a clue about where come from.

That said I think you are pointing out a very valid problem. The same problem exists within the kernel, I see it every so often that someone decides to hack one a drivers and send the patch to Linus without bothering to even Cc the author a copy. Sometimes this is 'just' to make it compliant with the latest development kernel but Cc'ing the maintainer is not too much to expect.

I would also like to encourage people to contact a maintainer if they want to make extensive changes to a bit of code someone else maintains. It is not uncommon that the maintainer already has an idea about how to do something and might even be working on it. It is a waste of his/her (and other peoples') time to have two conflicting development like this going.

Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#8 lore raw
In reply to Keith Owens
Quoted 19 lines · Jes Sorensen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Keith" == Keith Owens <[email protected]> writes:

Keith> On Sun, 26 Nov 2000 16:36:55 -0700, "Jeff V. Merkey"

Quoted 5 lines · Keith> <[email protected]> wrote:
Quoted 5 lines

Keith,

Please consider the attached patch for inclusion in all future versions of the modutils depmod program for compatiblity with RedHat and RedHat derived Linux distributions.

Keith> I have a big problem with Redhat. They make incompatible Keith> changes to utilities, do not feed patches back to maintainers Keith> then expect the rest of the world to follow their lead. The -i Keith> and -m flags to modutils are not the only example, I recently Keith> found IA64 and Sparc patches they had added to modutils code Keith> and not bothered to tell me. Other distributors are much Keith> better about sending me patches, Debian and SuSe in particular Keith> do the right thing.

Quoted 3 lines

I don't remember where the ia64 modutils patches come from, there were some floating around between the ia64 developers for a while. The sparc patches I don't have a clue about where come from.

The sparc patches were not sent just because of lack of time on my part, Jeff Johnson wrote it so that modules compiled with sparc64 gcc 2.96 (basically anything which generates OLO10 relocations) can be inserted and I wanted to review/test it first myself (and did not get to it early enough).

Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#9 lore raw
In reply to Jeff V. Merkey
Followup to:  <[email protected]>
By author:    Alan Cox <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 5 lines

depmod/depmod.c line 1102

Quoted 2 lines
depmod/depmod.c renamed from depmod/depmod.c.chmou +1 -0
+		{"ignore-versions", 0, 0, 'i'},

I dont think we should encourage anyone to ignore symbol versions

No, but sometimes you really want to be able to.

-hpa

Signature · 7 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#10 lore raw
In reply to Jeff V. Merkey
Quoted 10 lines · Jeff V. Merkey
Quoted 3 lines · Alan Cox
Quoted 1 line

+ {"ignore-versions", 0, 0, 'i'},

I dont think we should encourage anyone to ignore symbol versions

Anaconda will barf and require over 850+ changes to the scripts without it. If you look at the patch, you will note that it's a silent switch that's only there to avoid a noisy error message from depmod. It actually does nothing other than set a flag that also does nothing. -m simply maps to -F.

It's still a bad precedent. Anaconda should have been written correctly in the first place.

-d

begin:vcard
n:Ford;David
x-mozilla-html:TRUE
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Blue Labs Developer
x-mozilla-cpt:;14688
fn:David Ford
end:vcard

#11 lore raw
Quoted 8 lines
Quoted 5 lines

Anaconda will barf and require over 850+ changes to the scripts without it. If you look at the patch, you will note that it's a silent switch that's only there to avoid a noisy error message from depmod. It actually does nothing other than set a flag that also does nothing. -m simply maps to -F.

It's still a bad precedent. Anaconda should have been written correctly in the first place.

I don't know if its an Anaconda issue or a limitation in the tools. Keith is the modutils maintainer and its up to the Anaconda hackers to prove to him that he has a problem so I think he is absolutely right in refusing to change it until that is proven

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#12 lore raw
In reply to David Ford
Quoted 6 lines · Alan Cox
Quoted 6 lines
Quoted 5 lines

Anaconda will barf and require over 850+ changes to the scripts without it. If you look at the patch, you will note that it's a silent switch that's only there to avoid a noisy error message from depmod. It actually does nothing other than set a flag that also does nothing. -m simply maps to -F.

Quoted 7 lines
Quoted 2 lines

It's still a bad precedent. Anaconda should have been written correctly in the first place.

I don't know if its an Anaconda issue or a limitation in the tools. Keith is the modutils maintainer and its up to the Anaconda hackers to prove to him that he has a problem so I think he is absolutely right in refusing to change it until that is proven

Oddly, the tools already provide the capability needed by anaconda, just not in the format the anaconda scripts and code expect. i.e., anaconda is using -m in place of -F, and somewhere down the line someone needed to force depmod checks of modules against mismatched kernels (???) which is probably left over from some point when RedHat was shipping default kernels "naked" (without modversions). That's the only justification I can see for having -i at all, and since I come from a binary compatible world, I can kindof understand why someone would have needed this to support loading of binary modules accross versions (before modversions became widely used). I don't know how to take the "anaconda hacker" moniker.

Jeff

Quoted 5 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#13 lore raw
In reply to Jeff V. Merkey
Quoted 9 lines · Jeff V. Merkey
Quoted 2 lines · Mohammad A. Haque

I'd rather have Anaconda changed rather than special casing standard utils to account for distro handling.

Great. Then tell RedHat to rewrite it without the need for these switches. They will say NO. It's a trivial change, and would save me a lot of hours rewriting scripts. I did it once, but if RedHat has standardized on this set of switches, why not add them as alias commands? It's a trivial patch.

Then let RedHat maintain their version of modutils. RedHat isn't the standard, nor should RedHat dictate to authors, nor should other distributions and persons be affected by RedHat's methods.

If you don't like it, replace your depmod with a script that strips that flag before calling the original depmod.

-d

begin:vcard
n:Ford;David
x-mozilla-html:TRUE
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Blue Labs Developer
x-mozilla-cpt:;14688
fn:David Ford
end:vcard

#14 lore raw
In reply to Jeff V. Merkey
Quoted 8 lines · Tom Rini
Quoted 5 lines · Jeff V. Merkey

Great. Then tell RedHat to rewrite it without the need for these switches. They will say NO. It's a trivial change, and would save me a lot of hours rewriting scripts. I did it once, but if RedHat has standardized on this set of switches, why not add them as alias commands? It's a trivial patch.

Quoted 14 lines

I hate to jump in here in the middle of a perfectly good argument but I'd like to point out a few things:
a) If RedHat/RedHat-like distros needs these changes they can include this patch. The plus side is it won't piss off the people that seem to care and don't use said distros the down side is that if/when another security update comes out people will have to hope this patch applies easily still, if they update themselves.
b) Are these switches which used to be valid in modutils 2.3.x? If so, why? It makes perfect sense to keep this patch around until modutils 2.4 (or 2.5 if modutils version is still supposed to match kernel version). If these are old modutils 2.2.x switches, see part a).
And c) Why does it matter if RedHat/etc would have to adapt their scripts. There's always part a, or what debian does for stable sometimes, backporting fixes. Or even lots of sed & awk magic.

Oh well. Look like %patch -p1 in the rpm for now.

Jeff

Quoted 4 lines
Signature · 3 lines
-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#15 lore raw
In reply to Jeff V. Merkey
Quoted 16 lines · Keith Owens
Quoted 5 lines · Jeff V. Merkey

Keith,

Please consider the attached patch for inclusion in all future versions of the modutils depmod program for compatiblity with RedHat and RedHat derived Linux distributions.

I have a big problem with Redhat. They make incompatible changes to utilities, do not feed patches back to maintainers then expect the rest of the world to follow their lead. The -i and -m flags to modutils are not the only example, I recently found IA64 and Sparc patches they had added to modutils code and not bothered to tell me. Other distributors are much better about sending me patches, Debian and SuSe in particular do the right thing.

Quoted 5 lines

Since "-F System.map" in modutils is equivalent to "-m System.map -i" and works on all distributions, not just Redhat, the "-m -i" patch is unnecessary. Consider this my protest against bad habits by distributors, they created the mess with their lack of communication and they have to fix it.

Well Keith, I will never fail to post back changes to you, as evidenced by the fact I did send you one. Anconda is open sourced, and as such, is no longer owned by any distributor. The question is whether to diverge it from theirs. I would like to not do this, since, as you point out, it generates changes back the other way.

It's your call. I can keep the patch around because I really don't want to diverge anaconda any more than I have to. At some point, perhaps they will get changes to you more timely.

:-)

Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#16 lore raw
In reply to Jeff V. Merkey
Quoted 12 lines · David Ford
Quoted 9 lines · Jeff V. Merkey
Quoted 2 lines · Mohammad A. Haque

I'd rather have Anaconda changed rather than special casing standard utils to account for distro handling.

Great. Then tell RedHat to rewrite it without the need for these switches. They will say NO. It's a trivial change, and would save me a lot of hours rewriting scripts. I did it once, but if RedHat has standardized on this set of switches, why not add them as alias commands? It's a trivial patch.

Quoted 6 lines

Then let RedHat maintain their version of modutils. RedHat isn't the standard, nor should RedHat dictate to authors, nor should other distributions and persons be affected by RedHat's methods.

If you don't like it, replace your depmod with a script that strips that flag before calling the original depmod.

Anaconda is open sourced, so it's not technically tied to any one distributor any more....

Jeff

Quoted 3 lines

-d

Content-Description: Card for David Ford

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#17 lore raw
In reply to Jeff V. Merkey
Quoted 2 lines · Jeff V. Merkey

Anaconda is open sourced, so it's not technically tied to any one distributor any more....

<NIT>
Technically, yes it is opensourced. But one of the things that does kinda distinguish one distro from another is the installer[1]. </NIT>
So yes, it is opensource. So, counter-question. Why should this non
distro owned program require a specific distro's program? :) But this all
of course a moot point.

[1] The sum difference between YellowDogLinux 1.0, LinuxPPC, Inc 1999 and LinuxPPC Reference Release was that two changed/help port the installer the 3rd did, which was RedHat's newt-based installer. Some confusion ensused.

Signature · 6 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/