LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Closed Thread
  Search this Thread
Old 09-18-2016, 06:53 PM   #1651
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656

Quote:
Originally Posted by atelszewski View Post
Hi,

Maybe they mean that slackpkg is affected.
pkgtools might still work just fine, but maybe something internal to slackpkg is affected by the locale settings?

That would be my understanding.
Thanks. I totally missed that.

There doesn't seem to be any variables cleared or set in slackpkg for LC_ALL or LC_COLLATE like in pkgtools and {remove,install}pkg, so I can now understand why this would be a problem when using different locales.

So, pkgtools, removepkg, and installpkg all seem to work fine with different locales, however, slackpkg can be affected if LC_COLLATE or LC_ALL is set to something other than C.

This is still a far cry from Rinndalir saying that there's a bug with SBo's package naming. Package naming is fine, it's just slackpkg doesn't always work properly if the locales are changed.
 
Old 09-19-2016, 04:47 AM   #1652
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,
Quote:
Originally Posted by bassmadrigal View Post
Thanks. I totally missed that.

There doesn't seem to be any variables cleared or set in slackpkg for LC_ALL or LC_COLLATE like in pkgtools and {remove,install}pkg, so I can now understand why this would be a problem when using different locales.

So, pkgtools, removepkg, and installpkg all seem to work fine with different locales, however, slackpkg can be affected if LC_COLLATE or LC_ALL is set to something other than C.
Yes. The patch below fixes the issues (see the note #2 in coreutils manual) :



Code:
--- slackpkg.org	2016-09-19 11:50:42.646458844 +0200
+++ slackpkg	2016-09-19 11:50:28.607457496 +0200
@@ -23,6 +23,14 @@
 #
 
 
+# unset LC_COLLATE and LANG, then set LC_ALL to C to prevent potential 
+# issues when sorting data. For more about this read :
+#   gnu.org/software/coreutils/manual/coreutils.html#FOOT2
+#
+unset LC_COLLATE LANG
+export LC_ALL=C
+
+
 #========================================================================
 #
 # LOAD CONFIGURATIONS
Original slackpkg :
Code:
$ LC_ALL=fr_FR.UTF-8 LC_COLLATE=en_US.UTF-8 slackpkg -dialog=off -default_answer=no -batch=on upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... comm: le fichier*2 n'est pas dans l'ordre attendu
DONE

No packages match the pattern for upgrade. Try:

	/usr/sbin/slackpkg install|reinstall
Patched slackpkg :
Code:
$ LC_ALL=fr_FR.UTF-8 LC_COLLATE=en_US.UTF-8 slackpkg -dialog=off -default_answer=no -batch=on upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE

sqlite-3.13.0-x86_64-1.txz

Total package(s): 1

Do you wish to upgrade selected packages (Y/n)? n

--
SeB

Last edited by phenixia2003; 09-19-2016 at 05:06 AM.
 
2 members found this post helpful.
Old 09-19-2016, 06:24 AM   #1653
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,064

Rep: Reputation: Disabled
Well, I doubt that many people manually set LC_CTYPE and anyway I am not in favor of setting LC_ALL as according to POSIX its value "has precedence over any of the other environment variables starting with LC_ (LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and the LANG environment variable." according to the § 8.2 Internationalization Variables of the POSIX specification: this is a little too much in my opinion.

Thus I suggest to set only LC_COLLATE and LC_CTYPE to C instead of LC_ALL.
 
Old 09-19-2016, 07:00 AM   #1654
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Didier Spaier View Post
Well, I doubt that many people manually set LC_CTYPE and anyway I am not in favor of setting LC_ALL as according to POSIX its value "has precedence over any of the other environment variables starting with LC_ (LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and the LANG environment variable." according to the § 8.2 Internationalization Variables of the POSIX specification: this is a little too much in my opinion.

Thus I suggest to set only LC_COLLATE and LC_CTYPE to C instead of LC_ALL.
But, if the user switched their LC_ALL to en_US (the only one I know off the top of my head), it would override LC_COLLATE and LC_CTYPE in the script and the script would still have its issues.

pkgtools and installpkg both just unset all the LC_ variables and exports LANG as C, where removepkg exports LC_ALL to C. I'm not sure if one method is better than the other in these matters.
 
Old 09-19-2016, 07:26 AM   #1655
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,064

Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
But, if the user switched their LC_ALL to en_US (the only one I know off the top of my head), it would override LC_COLLATE and LC_CTYPE in the script and the script would still have its issues.
Valid point.

Quote:
pkgtools and installpkg both just unset all the LC_ variables and exports LANG as C, where removepkg exports LC_ALL to C. I'm not sure if one method is better than the other in these matters.
The reason for the difference is that removepkg calls sort, which runs faster with LC_COLLATE set to C, IIRC.

In all cases it suffice to unset LC_ALL (as LC_CTYPE takes precedence over LANG), then export LC_COLLATE and LC_CTYPE set to C (or to POSIX), I think. Thoughts?

Last edited by Didier Spaier; 09-19-2016 at 07:33 AM.
 
1 members found this post helpful.
Old 09-19-2016, 07:30 AM   #1656
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,064

Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
But, if the user switched their LC_ALL to en_US (the only one I know off the top of my head), it would override LC_COLLATE and LC_CTYPE in the script and the script would still have its issues.
Valid point. I fail to see any good reason for an end user to set LC_ALL, but we can't prevent that anyway.

Quote:
pkgtools and installpkg both just unset all the LC_ variables and exports LANG as C, where removepkg exports LC_ALL to C. I'm not sure if one method is better than the other in these matters.
The reason for the difference is that removepkg calls sort, which runs faster with LC_COLLATE set to C, IIRC.

In all cases it suffice to unset LC_ALL, then export LC_COLLATE and LC_CTYPE, set to C (or to POSIX), I think. Thoughts?

PS Sorry for the duplicate post.

Last edited by Didier Spaier; 09-19-2016 at 07:39 AM. Reason: PS added.
 
1 members found this post helpful.
Old 09-19-2016, 07:35 AM   #1657
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by Didier Spaier View Post
In all cases it suffice to unset LC_ALL, then export LC_COLLATE and LC_CTYPE, set to C (or to POSIX), I think. Thoughts?
Seeems to work well :
Code:
$ LC_ALL=fr_FR.UTF-8 slackpkg -dialog=off -default_answer=no -batch=on upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE

sqlite-3.13.0-x86_64-1.txz

Total package(s): 1

Do you wish to upgrade selected packages (Y/n)? n


$ LANG=en_US LC_ALL=fr_FR.UTF-8 LC_COLLATE=fr_FR.utf-8 slackpkg -dialog=off -default_answer=no -batch=on upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE

sqlite-3.13.0-x86_64-1.txz

Total package(s): 1

Do you wish to upgrade selected packages (Y/n)? n
Here is the patch :
Code:
--- slackpkg.org	2016-09-19 11:50:42.646458844 +0200
+++ slackpkg	2016-09-19 14:03:27.432223621 +0200
@@ -22,6 +22,13 @@
 # Evaldo Gardenali (aka UdontKnow) evaldogardenali@fasternet.com.br
 #
 
+# unset LC_ALL, then set LC_COLLATE and LC_CTYPE to C to prevent potential 
+# issues when sorting data. For more about this read :
+#   gnu.org/software/coreutils/manual/coreutils.html#FOOT2
+#
+unset LC_ALL
+export LC_COLLATE=C
+export LC_CTYPE=C
 
 #========================================================================
 #
--
SeB

Last edited by phenixia2003; 09-19-2016 at 07:43 AM.
 
3 members found this post helpful.
Old 09-19-2016, 07:37 PM   #1658
leeeoooooo
Member
 
Registered: Jan 2009
Distribution: Slackware64 14.2 (current)
Posts: 126

Rep: Reputation: 20
Slashdot said today that there was a major new version of vim released!
 
Old 09-19-2016, 07:59 PM   #1659
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Thanks, I think I'll give it a try.
What's new with Vim....
https://raw.githubusercontent.com/vi...c/version8.txt
https://github.com/vim/vim
 
Old 09-19-2016, 09:38 PM   #1660
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,136

Rep: Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307
Quote:
Originally Posted by leeeoooooo View Post
Slashdot said today that there was a major new version of vim released!

Here you go:

Quote:
Thu Sep 15 22:54:52 UTC 2016
a/bash-4.4.0-x86_64-1.txz: Upgraded.
a/btrfs-progs-v4.7.2-x86_64-1.txz: Upgraded.
a/e2fsprogs-1.43.3-x86_64-1.txz: Upgraded.
a/pkgtools-14.2-noarch-12.txz: Rebuilt.
removepkg: Fixed removing packages with >= 3 hyphens in the package name
when using just the package name rather than the full name including
version, arch, and build.
Thanks to coralfang for the bug report, Jim Hawkins and Stuart Winter for
the patch, and SeB for testing and feedback.
removepkg: Handle filenames that contain backslashes.
Thanks to aaazen for the bug report and patch.
ap/vim-8.0.0005-x86_64-1.txz: Upgraded.
n/curl-7.50.3-x86_64-1.txz: Upgraded.
Fixed heap overflows in four libcurl functions: curl_escape(),
curl_easy_escape(), curl_unescape() and curl_easy_unescape().
For more information, see:
https://curl.haxx.se/docs/adv_20160914.html
http://cve.mitre.org/cgi-bin/cvename...=CVE-2016-7167
(* Security fix *)
xap/vim-gvim-8.0.0005-x86_64-1.txz: Upgraded.
+--------------------------+
Tue Sep 13 18:13:32 UTC 2016
ap/mariadb-10.0.27-x86_64-1.txz: Upgraded.
This update fixes a critical vulnerability which can allow local and
remote attackers to inject malicious settings into MySQL configuration
files (my.cnf). A successful exploitation could allow attackers to
execute arbitrary code with root privileges which would then allow them
to fully compromise the server.
This issue was discovered and reported by Dawid Golunski.
For more information, see:
http://legalhackers.com/advisories/M...2016-6662.html
https://jira.mariadb.org/browse/MDEV-10465
http://cve.mitre.org/cgi-bin/cvename...=CVE-2016-6662
(* Security fix *)
ap/vim-8.0.0003-x86_64-1.txz: Upgraded.
xap/vim-gvim-8.0.0003-x86_64-1.txz: Upgraded.
 
Old 09-20-2016, 11:15 AM   #1661
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,136

Rep: Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307
Firefox-49, with widevine support, has been released.

The release notes, https://www.mozilla.org/en-US/firefo.../releasenotes/

The source, https://ftp.mozilla.org/pub/firefox/....source.tar.xz

Last edited by cwizardone; 09-20-2016 at 03:35 PM. Reason: Added a link to the release notes.
 
Old 09-20-2016, 11:44 AM   #1662
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,112

Rep: Reputation: 4184Reputation: 4184Reputation: 4184Reputation: 4184Reputation: 4184Reputation: 4184Reputation: 4184Reputation: 4184Reputation: 4184Reputation: 4184Reputation: 4184
Quote:
Originally Posted by cwizardone View Post
Firefox-49, with widevine support
I've built it here and tested on this page and it seems to work fine: it downloads and installs an additional plugin, Google Widevine Content Decryption Module.
 
1 members found this post helpful.
Old 09-20-2016, 01:49 PM   #1663
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by cwizardone View Post
ap/vim-8.0.0003-x86_64-1.txz: Upgraded.
xap/vim-gvim-8.0.0003-x86_64-1.txz: Upgraded.
Now that's impressive....
 
Old 09-21-2016, 04:00 AM   #1664
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
libjpeg-turbo 1.5.1 has been released.
 
1 members found this post helpful.
Old 09-21-2016, 03:13 PM   #1665
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,136

Rep: Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307Reputation: 7307
Quote:
Originally Posted by ponce View Post
I've built it here and tested on this page and it seems to work fine: it downloads and installs an additional plugin, Google Widevine Content Decryption Module.
The page linked above does work, but Netflix does not. It keeps asking for the microsoft silverlight plugin.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to show the current time at the top in the current shell Always ? rohitchauhan Linux - General 5 04-09-2014 03:05 PM
Slackware ARM (current) epic mistake: the current Android kernels are kicked out! Darth Vader Slackware 16 08-25-2013 04:36 PM
[SOLVED] setup fails on most current Slackware-current March 26, 2012 AlleyTrotter Slackware 15 04-09-2012 06:05 AM
Observation of Feb -current vs March -current Hangaber Slackware 14 03-12-2010 08:26 AM
cvs diff the most current and second last current version powah Linux - Software 1 03-30-2006 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration