Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

Installing perl breaks redhat-config scripts [was: New (well known) printer won't install in RH-9] #6700

Closed p5pRT closed 20 years ago

p5pRT commented 20 years ago

Migrated from rt.perl.org#23304 (status was 'resolved')

Searchable as RT23304$

p5pRT commented 20 years ago

From jos@w3k.org

Gee\, I get to answer my own help request. :-)

The problem (for the searchable record) is that installing a new version of perl breaks redhat configuration scripts. To fix it\, you have to add the Red Hat "vendor libraries" to perl's @​INC path. Otherwise\, perl utilities such as "Foomatic​::Defaults" will not be found by scripts such as /usr/bin/redhat-config-printer. Editing config.sh in the perl source top directory or running Configure interactively there can be used to add the appropriate directories (say 'locate Foomatic' to find out which)\, prior to a 'make install' of perl from source.

My guess is that this bug belongs to the perl installation script which should\, by default\, carry forward any "vendor_perl" directories in the distribution being replaced. If 'vendor_perl' is not a standard directory\, then perhaps redhat should install its utilities in site_perl and use name prefixes to avoid collisions with user utilities. Since 'vendor_perl' is also used in mandrake\, perhaps it is "standard enough" for perl to look for it.

-- jos

At 04​:28 PM 8/12/2003 -0700\, Julius Smith wrote​:

I moved my HP Laser Jet 1220 from an old RH-7.2 machine\, where it was working fine\, to my new RH-9 machine. (It connects to the parallel port.) Kudzu noticed it and "configured" it\, but it does not seem to appear anywhere. I ran "Start Here / System Settings / Printing" and clicked "New". It says "Loading printer information. Please wait . . ."\, and nothing happens after that --- it just hangs with a permanent hourglass.

What is the next step in a situation like this?

Thanks\, Julius

-- redhat-list mailing list unsubscribe mailto​:redhat-list-request@​redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list

_____________________________ Julius O. Smith III \jos@​ccrma\.stanford\.edu Assoc. Prof. of Music and (by courtesy) Electrical Engineering CCRMA\, Stanford University http​://www-ccrma.stanford.edu/~jos/

p5pRT commented 20 years ago

From @rgs

Julius Smith (via RT) wrote​:

The problem (for the searchable record) is that installing a new version of perl breaks redhat configuration scripts. To fix it\, you have to add the Red Hat "vendor libraries" to perl's @​INC path. Otherwise\, perl utilities such as "Foomatic​::Defaults" will not be found by scripts such as /usr/bin/redhat-config-printer.

Don't overwrite the system perl.

A vendor that ships executables with a shebang line like #!/usr/bin/perl exposes its users to that kind of problem. More mature OSes like Solaris provide good built-in protection for their system perl scripts.

Editing config.sh in the perl source top directory or running Configure interactively there can be used to add the appropriate directories (say 'locate Foomatic' to find out which)\, prior to a 'make install' of perl from source.

You can also use the -Dvendorprefix option to Configure (see the INSTALL file.)

My guess is that this bug belongs to the perl installation script which should\, by default\, carry forward any "vendor_perl" directories in the distribution being replaced.

I disagree with that statement. As I was saying before\, upgrade you system's perl with the packages provided by your vendor. Apart from vendor_perl\, there are other configurations options as well that may or may not be needed by some obscure system script (largefiles\, ithreads\, i_db...). Install you own perls in a different location (/opt and /usr/local are popular) that can be found earlier in the PATH.

p5pRT commented 20 years ago

From jos@w3k.org

Thanks for your informative reply.

I suppose the "right thing" regarding the crashing version of perl 5.8.0 in the Red Hat 9 distribution is to report it as a Red Hat bug and let them deal with it.

However\, following your advice\, I do have the remaining problem of having to change /usr/bin/perl to /usr/local/bin/perl in all affected scripts.

Julius

At 09​:21 AM 8/15/2003 +0000\, via RT wrote​:

Julius Smith (via RT) wrote​:

The problem (for the searchable record) is that installing a new version of perl breaks redhat configuration scripts. To fix it\, you have to add the Red Hat "vendor libraries" to perl's @​INC path. Otherwise\, perl utilities such as "Foomatic​::Defaults" will not be found by scripts such as /usr/bin/redhat-config-printer.

Don't overwrite the system perl.

A vendor that ships executables with a shebang line like #!/usr/bin/perl exposes its users to that kind of problem. More mature OSes like Solaris provide good built-in protection for their system perl scripts.

Editing config.sh in the perl source top directory or running Configure interactively there can be used to add the appropriate directories (say 'locate Foomatic' to find out which)\, prior to a 'make install' of perl from source.

You can also use the -Dvendorprefix option to Configure (see the INSTALL file.)

My guess is that this bug belongs to the perl installation script which should\, by default\, carry forward any "vendor_perl" directories in the distribution being replaced.

I disagree with that statement. As I was saying before\, upgrade you system's perl with the packages provided by your vendor. Apart from vendor_perl\, there are other configurations options as well that may or may not be needed by some obscure system script (largefiles\, ithreads\, i_db...). Install you own perls in a different location (/opt and /usr/local are popular) that can be found earlier in the PATH.

_____________________________ Julius O. Smith III \jos@​ccrma\.stanford\.edu Assoc. Prof. of Music and (by courtesy) Electrical Engineering CCRMA\, Stanford University http​://www-ccrma.stanford.edu/~jos/

p5pRT commented 20 years ago

From @rgs

Julius Smith wrote​:

Thanks for your informative reply.

I suppose the "right thing" regarding the crashing version of perl 5.8.0 in the Red Hat 9 distribution is to report it as a Red Hat bug and let them deal with it.

However\, following your advice\, I do have the remaining problem of having to change /usr/bin/perl to /usr/local/bin/perl in all affected scripts.

Why would you do something like this ? The whole point is to keep the original /usr/bin/perl\, to ensure that all system scripts that use it continue to work.

p5pRT commented 20 years ago

From jos@w3k.org

The original perl crashes. That's why I installed a new perl\, hoping to resolve the crash.

At 01​:32 PM 8/16/2003 +0000\, via RT wrote​:

Julius Smith wrote​:

Thanks for your informative reply.

I suppose the "right thing" regarding the crashing version of perl 5.8.0 in the Red Hat 9 distribution is to report it as a Red Hat bug and let them deal with it.

However\, following your advice\, I do have the remaining problem of having to change /usr/bin/perl to /usr/local/bin/perl in all affected scripts.

Why would you do something like this ? The whole point is to keep the original /usr/bin/perl\, to ensure that all system scripts that use it continue to work.

_____________________________ Julius O. Smith III \jos@​ccrma\.stanford\.edu Assoc. Prof. of Music and (by courtesy) Electrical Engineering CCRMA\, Stanford University http​://www-ccrma.stanford.edu/~jos/

p5pRT commented 20 years ago

From @ysth

On Sat\, Aug 16\, 2003 at 07​:25​:17AM -0700\, Julius Smith wrote​:

The original perl crashes. That's why I installed a new perl\, hoping to resolve the crash.

If you must replace the system perl\, you need to figure out how to build it the same way. To start with\, you should do `perl -V​:config_args` to see what args to use with Configure. There should be something there specifying the vendor directories.

p5pRT commented 20 years ago

@rgs - Status changed from 'new' to 'resolved'

p5pRT commented 20 years ago

From jos@w3k.org

That's exactly what I needed to know about (`perl -V​:config_args`). Perhaps the INSTALL file should mention this near the top? Thanks\, Julius

At 12​:18 PM 8/17/2003 -0700\, Yitzchak Scott-Thoennes wrote​:

On Sat\, Aug 16\, 2003 at 07​:25​:17AM -0700\, Julius Smith wrote​:

The original perl crashes. That's why I installed a new perl\, hoping to resolve the crash.

If you must replace the system perl\, you need to figure out how to build it the same way. To start with\, you should do `perl -V​:config_args` to see what args to use with Configure. There should be something there specifying the vendor directories.

_____________________________ Julius O. Smith III \jos@​ccrma\.stanford\.edu Assoc. Prof. of Music and (by courtesy) Electrical Engineering CCRMA\, Stanford University http​://www-ccrma.stanford.edu/~jos/

p5pRT commented 20 years ago

From @ysth

On Mon\, Aug 18\, 2003 at 08​:41​:20AM -0700\, Julius Smith wrote​:

That's exactly what I needed to know about (`perl -V​:config_args`). Perhaps the INSTALL file should mention this near the top?

How about this (1/8th of the way into the file)​:

Inline Patch ```diff --- perl-5.8.x/INSTALL.orig 2003-08-05 06:57:16.000000000 -0700 +++ perl-5.8.x/INSTALL 2003-08-18 17:17:32.000000000 -0700 @@ -319,7 +319,9 @@ find it. It's often a good idea to have both /usr/bin/perl and /usr/local/bin/perl be symlinks to the actual binary. Be especially careful, however, not to overwrite a version of perl supplied by your -vendor unless you are sure you know what you are doing. +vendor unless you are sure you know what you are doing. (If you are +replacing your vendor's perl, useful information on how they configured +it may be found in the config_args line in the output from perl -V.) By default, Configure will not try to link /usr/bin/perl to the current version of perl. You can turn on that behavior by running End of Patch. ```
p5pRT commented 20 years ago

From @schwern

On Mon\, Aug 18\, 2003 at 05​:51​:14PM -0700\, Yitzchak Scott-Thoennes wrote​:

--- perl-5.8.x/INSTALL.orig 2003-08-05 06​:57​:16.000000000 -0700 +++ perl-5.8.x/INSTALL 2003-08-18 17​:17​:32.000000000 -0700 @​@​ -319\,7 +319\,9 @​@​ find it. It's often a good idea to have both /usr/bin/perl and /usr/local/bin/perl be symlinks to the actual binary. Be especially careful\, however\, not to overwrite a version of perl supplied by your -vendor unless you are sure you know what you are doing. +vendor unless you are sure you know what you are doing. (If you are +replacing your vendor's perl\, useful information on how they configured +it may be found in the config_args line in the output from perl -V.)

Maybe $Config{config_args} might be clearer and not require so much cutting and pasting on the part of the user?

-- Michael G Schwern schwern@​pobox.com http​://www.pobox.com/~schwern/ If I got anything to say\, I'll say it with lead.   -- Jon Wayne

p5pRT commented 20 years ago

From @rgarcia

Michael G Schwern wrote​:

Maybe $Config{config_args} might be clearer and not require so much cutting and pasting on the part of the user?

or simply   perl -V​:config_args

p5pRT commented 20 years ago

From jos@w3k.org

That looks perfect to me - would have saved me a lot of time - thanks - Julius

At 05​:51 PM 8/18/2003 -0700\, Yitzchak Scott-Thoennes wrote​:

On Mon\, Aug 18\, 2003 at 08​:41​:20AM -0700\, Julius Smith wrote​:

That's exactly what I needed to know about (`perl -V​:config_args`). Perhaps the INSTALL file should mention this near the top?

How about this (1/8th of the way into the file)​:

--- perl-5.8.x/INSTALL.orig 2003-08-05 06​:57​:16.000000000 -0700 +++ perl-5.8.x/INSTALL 2003-08-18 17​:17​:32.000000000 -0700 @​@​ -319\,7 +319\,9 @​@​ find it. It's often a good idea to have both /usr/bin/perl and /usr/local/bin/perl be symlinks to the actual binary. Be especially careful\, however\, not to overwrite a version of perl supplied by your -vendor unless you are sure you know what you are doing. +vendor unless you are sure you know what you are doing. (If you are +replacing your vendor's perl\, useful information on how they configured +it may be found in the config_args line in the output from perl -V.)

By default\, Configure will not try to link /usr/bin/perl to the current version of perl. You can turn on that behavior by running End of Patch.

_____________________________ Julius O. Smith III \jos@​ccrma\.stanford\.edu Assoc. Prof. of Music and (by courtesy) Electrical Engineering CCRMA\, Stanford University http​://www-ccrma.stanford.edu/~jos/

p5pRT commented 20 years ago

From @doughera88

On Mon\, 18 Aug 2003\, Michael G Schwern wrote​:

On Mon\, Aug 18\, 2003 at 05​:51​:14PM -0700\, Yitzchak Scott-Thoennes wrote​:

[helpful INSTALL patch]

Maybe $Config{config_args} might be clearer and not require so much cutting and pasting on the part of the user?

Yes\, but with the tiny caveat that config_args doesn't correctly preserve spaces in arguments\, so something like

  sh Configure -Doptimize='-O -g' -Dprefix=/usr

wouldn't get correctly rendered.

Here's my suggestion for the patch​:

Inline Patch ```diff --- perl-5.8.x/INSTALL Tue Aug 5 09:57:16 2003 +++ perl-5.8.x-andy/INSTALL Tue Aug 19 10:43:02 2003 @@ -319,7 +319,15 @@ find it. It's often a good idea to have both /usr/bin/perl and /usr/local/bin/perl be symlinks to the actual binary. Be especially careful, however, not to overwrite a version of perl supplied by your -vendor unless you are sure you know what you are doing. +vendor unless you are sure you know what you are doing. If you insist +on replacing your vendor's perl, useful information on how it was +configured may be found with + + perl -V:config_args + +(Check the output carefully, however, since this doesn't preserve +spaces in arguments to Configure. For that, you have to look +carefully at config_arg1, config_arg2, etc.) By default, Configure will not try to link /usr/bin/perl to the current version of perl. You can turn on that behavior by running -- ```

  Andy Dougherty doughera@​lafayette.edu

p5pRT commented 20 years ago

From Robin.Barker@npl.co.uk

The scary solution is​:   perl -MConfig -we 'exec qw(./Configure)\, \   map $Config{"config_arg$_"}\, 1..$Config{config_argc}'

or   perl -MConfig -we 'exec qw(./Configure)\, \   (map $Config{"config_arg$_"}\, 1..$Config{config_argc})\, \   @​ARGV' -- -Dfoobar

if you want to add extra arguments.

Robin

-----Original Message----- From​: Andy Dougherty [mailto​:doughera@​lafayette.edu] Sent​: 19 August 2003 15​:45 To​: Michael G Schwern Cc​: Yitzchak Scott-Thoennes; Perl Porters; Julius Smith Subject​: Re​: [perl #23304] Installing perl breaks redhat-config scripts [was​: New (well known) printer won't install in RH-9]

On Mon\, 18 Aug 2003\, Michael G Schwern wrote​:

On Mon\, Aug 18\, 2003 at 05​:51​:14PM -0700\, Yitzchak Scott-Thoennes wrote​:

[helpful INSTALL patch]

Maybe $Config{config_args} might be clearer and not require so much cutting and pasting on the part of the user?

Yes\, but with the tiny caveat that config_args doesn't correctly preserve spaces in arguments\, so something like

  sh Configure -Doptimize='-O -g' -Dprefix=/usr

wouldn't get correctly rendered.

Here's my suggestion for the patch​:

Inline Patch ```diff --- perl-5.8.x/INSTALL Tue Aug 5 09:57:16 2003 +++ perl-5.8.x-andy/INSTALL Tue Aug 19 10:43:02 2003 @@ -319,7 +319,15 @@ find it. It's often a good idea to have both /usr/bin/perl and /usr/local/bin/perl be symlinks to the actual binary. Be especially careful, however, not to overwrite a version of perl supplied by your -vendor unless you are sure you know what you are doing. +vendor unless you are sure you know what you are doing. If you insist +on replacing your vendor's perl, useful information on how it was +configured may be found with + + perl -V:config_args + +(Check the output carefully, however, since this doesn't preserve +spaces in arguments to Configure. For that, you have to look +carefully at config_arg1, config_arg2, etc.) By default, Configure will not try to link /usr/bin/perl to the current version of perl. You can turn on that behavior by running -- ```

  Andy Dougherty doughera@​lafayette.edu


This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee\, you must not use\, retain or disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No​: 2937881 Registered Office​: Teddington\, Middlesex\, United Kingdom TW11 0LW.


p5pRT commented 20 years ago

From @rgs

Doc patch applied as change 20781.

p5pRT commented 20 years ago

@rgs - Status changed from 'open' to 'resolved'

p5pRT commented 20 years ago

From @ysth

On Tue\, Aug 19\, 2003 at 10​:45​:24AM -0400\, Andy Dougherty wrote​:

On Mon\, 18 Aug 2003\, Michael G Schwern wrote​:

On Mon\, Aug 18\, 2003 at 05​:51​:14PM -0700\, Yitzchak Scott-Thoennes wrote​:

[helpful INSTALL patch]

Maybe $Config{config_args} might be clearer and not require so much cutting and pasting on the part of the user?

Yes\, but with the tiny caveat that config_args doesn't correctly preserve spaces in arguments\, so something like

sh Configure \-Doptimize='\-O \-g' \-Dprefix=/usr

wouldn't get correctly rendered.

Here's my suggestion for the patch​:

--- perl-5.8.x/INSTALL Tue Aug 5 09​:57​:16 2003 +++ perl-5.8.x-andy/INSTALL Tue Aug 19 10​:43​:02 2003 @​@​ -319\,7 +319\,15 @​@​ find it. It's often a good idea to have both /usr/bin/perl and /usr/local/bin/perl be symlinks to the actual binary. Be especially careful\, however\, not to overwrite a version of perl supplied by your -vendor unless you are sure you know what you are doing. +vendor unless you are sure you know what you are doing. If you insist +on replacing your vendor's perl\, useful information on how it was +configured may be found with + + perl -V​:config_args + +(Check the output carefully\, however\, since this doesn't preserve +spaces in arguments to Configure. For that\, you have to look +carefully at config_arg1\, config_arg2\, etc.)

By default\, Configure will not try to link /usr/bin/perl to the current version of perl. You can turn on that behavior by running

Looks good. I was just trying to keep to one sentence in my attempt.

p5pRT commented 20 years ago

@rgs - Status changed from 'open' to 'resolved'