LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-05-2019, 02:43 PM   #1
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 206
Blog Entries: 1

Rep: Reputation: 86
Installed two LibreOffice helppacks. Now slackpkg thinks I have a broken /var/log/packages.


I installed LibreOffice from SlackBuilds.org, together with the language pack for the en-GB locale and the help pack for the en-US locale. I subsequently added the help pack for the en-GB locale as well.

Now, ‘slackpkg’ complains about a broken ‘/var/log/packages’ because it believes that the help packs are two versions of the same package:
Code:
# slackpkg upgrade-all

Checking local integrity... DONE
You have a broken /var/log/packages - with two versions of the same package.
The list of packages duplicated in your machine are shown below, but don't
worry about this list - when you select your action, slackpkg will show a
better list:

libreoffice-helppack-6.1.4_en_GB-x86_64-1_SBo
libreoffice-helppack-6.1.4_en_US-x86_64-1_SBo

You can (B)lacklist, (R)emove, or (I)gnore these packages.
Select your action (B/R/I): I


Okay - slackpkg won't do anything now, but please, do something to fix it.
Is there any way I can leave the two help packs installed, without getting this error?
 
Old 01-05-2019, 03:23 PM   #2
ZhaoLin1457
Member
 
Registered: Jan 2018
Posts: 198

Rep: Reputation: 175Reputation: 175
Please take a look there: http://www.slackware.com/~alien/slac...pkg64/current/

You will notice that the localized packages like "libreoffice-dict-en-6.1.3-x86_64-2alien.txz" have the language keyword encoded in name, not in version. That permits installing multiple localization packages on parallel.

What happened? Like Hollywood told us, even in a far away galaxy the single language used is American English, so is understandable that our SlackBuilds.org developers have hard time to figure out that someone may will want to install multiple helppacks for LibreOffice.

My suggestion is just to rename those offending packages records by hand, like "libreoffice-helppack-en_GB-6.1.4-x86_64-1_SBo" and "libreoffice-helppack-en_US-6.1.4-x86_64-1_SBo", then to have some discussions with their developers. Just in case.

TBH, I will not bother with compiling the LibreOffice from SBO, but rather I will install it from Alien Bob's repository.

Last edited by ZhaoLin1457; 01-05-2019 at 03:35 PM.
 
2 members found this post helpful.
Old 01-05-2019, 03:42 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,688

Rep: Reputation: Disabled
Hello,

I think that this results of a misnaming of the packages.

The template is $PKGNAME-$PKGVERSION-$PKGARCH-$BUILD$TAG and hyphens are counted from right to left to find what's what by the package management tools, knowing that only $PKGNAME may include hyphens.

In this case we find:
$BUILD$TAG=1_SBo
$PKGARCH=x86_64
$VERSION=helppack-6.1.4_en_GB or helppack-6.1.4_en_US
$PKGNAME=libreoffice-helppack

So slackpkg finds two package with the same name but different versions.

I think that the package should be named instead:
libreoffice-helppack-en_GB-6.1.4-x86_64-1_SBo
libreoffice-helppack-en_US-6.1.4-x86_64-1_SBo

I email the maintainer about that.

EDIT: ZhaoLin1457 was faster.

Last edited by Didier Spaier; 01-05-2019 at 03:50 PM.
 
2 members found this post helpful.
Old 01-05-2019, 04:28 PM   #4
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 206

Original Poster
Blog Entries: 1

Rep: Reputation: 86
Quote:
Originally Posted by ZhaoLin1457 View Post
My suggestion is just to rename those offending packages records by hand, like "libreoffice-helppack-en_GB-6.1.4-x86_64-1_SBo" and "libreoffice-helppack-en_US-6.1.4-x86_64-1_SBo"
Quote:
Originally Posted by Didier Spaier View Post
I think that the package should be named instead:
libreoffice-helppack-en_GB-6.1.4-x86_64-1_SBo
libreoffice-helppack-en_US-6.1.4-x86_64-1_SBo
Will the underscores in what then becomes the package name cause any issues, or are they allowed there?
Also, does the package name, as recorded by the package management tools, get constructed directly from the file name, or is it recorded anywhere else within the packaged archive?

Quote:
Originally Posted by Didier Spaier View Post
The template is $PKGNAME-$PKGVERSION-$PKGARCH-$BUILD$TAG and hyphens are counted from right to left to find what's what by the package management tools, knowing that only $PKGNAME may include hyphens.
Well, thanks for that info—I didn’t know that. I haven’t looked too deeply into Slackware packaging so far.
I guess I could simply edit the SlackBuild script and append the locale to the name, instead of whatever it is that the script currently does.

Quote:
Originally Posted by ZhaoLin1457 View Post
TBH, I will not bother with compiling the LibreOffice from SBO, but rather I will install it from Alien Bob's repository.
Well, yes, I considered that option, too—and likely will revisit it later on. I was just curious to see how the SlackBuild would do.
By the way, the SlackBuild doesn’t actually compile LibreOffice from source. Instead, it extracts the binaries from the RPM distribution as found on the LibreOffice download area.

In any case, thanks to both of you for your replies!
 
Old 01-05-2019, 04:45 PM   #5
ZhaoLin1457
Member
 
Registered: Jan 2018
Posts: 198

Rep: Reputation: 175Reputation: 175
In the $PKGNAME you can use a whatever number of underscores and hyphens. The hyphens are not allowed on $VERSION and so on.

Regarding adjusting yourself the SlackBuild, I think you have a good idea about adjusting the naming. And if you want to customize "a la carte" the build, you may want to adjust the "slack-desc" like this
Code:
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':' except on otherwise blank lines.

                    |-----handy-ruler------------------------------------------------------|
libreoffice-helppack-@LANG@: libreoffice-helppack (for LibreOffice Productivity Suite)
libreoffice-helppack-@LANG@:
libreoffice-helppack-@LANG@: Built-in Help Pack for LibreOffice productivity suite.
libreoffice-helppack-@LANG@:
libreoffice-helppack-@LANG@: Homepage: https://www.libreoffice.org
libreoffice-helppack-@LANG@:
libreoffice-helppack-@LANG@:
libreoffice-helppack-@LANG@:
libreoffice-helppack-@LANG@:
libreoffice-helppack-@LANG@:
libreoffice-helppack-@LANG@:
Then, with a "sed" command to generate the proper slack-desc at build time, replacing @LANG@ with the current language.

For example using in SlackBuild
Code:
sed 's/@LANG@/${PKG_LANG}/' $CWD/slack-desc > $PKG/install/slack-desc

Last edited by ZhaoLin1457; 01-05-2019 at 06:19 PM.
 
2 members found this post helpful.
Old 01-05-2019, 05:18 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,688

Rep: Reputation: Disabled
Quote:
Originally Posted by luvr View Post
Will the underscores in what then becomes the package name cause any issues, or are they allowed there?
No issue, they are allowed. In my system packages there have names are like that:
Code:
didier[~]$ ls /var/log/packages/|sed 's,-[^-]*-[^-]*-[^-]*$,,'|grep _
aaa_base
aaa_elflibs
aaa_terminfo
libart_lgpl
libnetfilter_acct
libnetfilter_conntrack
libnetfilter_cthelper
libnetfilter_cttimeout
libnetfilter_log
libnetfilter_queue
lm_sensors
sg3_utils
sinhala_lklug-font-ttf
tcp_wrappers
usb_modeswitch
wpa_supplicant
didier[~]$
Quote:
Also, does the package name, as recorded by the package management tools, get constructed directly from the file name, or is it recorded anywhere else within the packaged archive?
It is set in the SlackBuild often but not always from the source archive name.

Last edited by Didier Spaier; 01-06-2019 at 08:57 AM. Reason: s/are names/have names/
 
2 members found this post helpful.
Old 01-05-2019, 10:19 PM   #7
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 3,898

Rep: Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154
The original idea was to make a single script to handle multiple languages, but it's assumed that most people will just install one language and not a mixed one.
 
1 members found this post helpful.
Old 01-06-2019, 03:01 AM   #8
ZhaoLin1457
Member
 
Registered: Jan 2018
Posts: 198

Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by willysr View Post
The original idea was to make a single script to handle multiple languages, but it's assumed that most people will just install one language and not a mixed one.
Or, the root cause of that could be a limitation of the SlackBuilds.org design, where the package name should be identical with the one of SlackBuild?
 
1 members found this post helpful.
Old 01-06-2019, 04:39 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,688

Rep: Reputation: Disabled
A bit of history, for anyone interested:
  • Up to and including Slackware version 8.0, the packages were just named <softwarename>.tgz
  • The (then) new naming scheme was introduced in Slackware 8.1. Quoting UPGRADE.TXT for it:
    Code:
    4.  Remove the old packages.  Since we're using a longer package naming
        scheme now, we know any package with a name shorter than 10 
        characters must be an old package.  Remove them with this command:
    
        cd /var/log/packages
        removepkg ? ?? ??? ???? ????? ?????? ??????? ????????
    
        This will remove all packages with names from 1 to 8 characters long.
  • This was dealt with in removepkg, updated before the release of 8.1:
    Quote:
    # Revision 1.8 Thu Nov 22 14:00:13 PST 2001 volkerding Rel $
    # - Move $TMP underneath $ROOT
    # - Understand the idea of a base package name, so that packages
    # can be removed with any of these notations:
    # removepkg foo-1.0-i386-1.tgz
    # removepkg foo-1.0-i386-1
    # removepkg foo.tgz
    # removepkg foo
  • However, installpkg is still lenient enough to accept the old naming scheme:
    Code:
      if [ "$( grep '^\./' $TMP/$shortname | wc -l | tr -d ' ')" = "1" ]; then
        # Good.  We have a package that meets the Slackware spec.
        cat $TMP/$shortname >> $ADM_DIR/packages/$shortname
      else
        # Some dumb bunny built a package with something other than makepkg.  Bad!
        # Oh well.  Bound to happen.  Par for the course.  Fix it and move on...
        gettext "WARNING:  Package has not been created with 'makepkg'"
        echo
        echo './' >> $ADM_DIR/packages/$shortname
        cat $TMP/$shortname >> $ADM_DIR/packages/$shortname
      fi
  • removepkg follows suite:
    Code:
      # If we don't have a package match here, then we will attempt to find
      # a package using the long name format (name-version-arch-build) for
      # which the base package name was given.  On a properly-managed machine,
      # there should only be one package installed with a given basename, but
      # we don't enforce this policy.  If there's more than one, only one will
      # be removed.  If you want to remove them all, you'll need to run
      # removepkg again until it removes all the same-named packages.
 
2 members found this post helpful.
Old 01-06-2019, 08:43 AM   #10
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 301

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by Didier Spaier View Post
A bit of history, for anyone interested:
  • Up to and including Slackware version 8.0, the packages were just named <softwarename>.tgz
And they were restricted to 8+3 (DOS-type) filenames, so that you could install from (dos-formatted) floppies. Just an example
Code:
libc4-attic:
total 1173
-r--r--r-- 1 hartman beheer 318763 1999-07-29 06:39:17 aoutlibs.tgz
-r--r--r-- 1 hartman beheer 328987 1999-06-27 02:07:00 oldlibs5.tgz
-r--r--r-- 1 hartman beheer 542416 1999-08-24 05:51:18 oldlibs6.tgz
-r--r--r-- 1 hartman beheer   1453 2001-02-20 01:02:01 package_descriptions

libc5-attic:
total 2005
-r--r--r-- 1 hartman beheer 201722 2001-02-20 01:08:51 ldso.tgz
-r--r--r-- 1 hartman beheer 981382 1999-08-22 01:01:12 libc5.tgz
-r--r--r-- 1 hartman beheer 858844 1999-08-24 05:43:34 libc5x.tgz
-r--r--r-- 1 hartman beheer   1460 2001-04-23 07:24:42 package_descriptions
in which package_descriptions was the predecessor of the currrent .txt description files.

In 7.1 and earlier sets like a, n, etc, were split-up too into separate directories, each of floppy size:
Code:
drwxr-xr-x 2 root root   4096 2000-06-21 20:50:59 a1
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:11 a10
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:11 a11
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:12 a12
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:12 a13
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:12 a14
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:43 a15
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:13 a16
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:01 a2
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:03 a3
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:04 a4
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:06 a5
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:07 a6
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:08 a7
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:09 a8
drwxr-xr-x 2 root root   2048 2000-06-21 20:51:10 a9
so you could put each of those directories on a separate floppy.
 
2 members found this post helpful.
Old 01-06-2019, 10:12 AM   #11
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,477

Rep: Reputation: Disabled
You can mix and match languages with my script, granted compiling libreoffice is a requirement...

https://notabug.org/orbea/SlackBuild...ce/libreoffice

Code:
LANGUAGES="en-US en-GB" ./libreoffice.SlackBuild
 
Old 01-06-2019, 11:15 AM   #12
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 206

Original Poster
Blog Entries: 1

Rep: Reputation: 86
Problem solved! Reordered the output package name in the SlackBuild script.

Thank you all for the historical notes!

I was wondering whether I could remove what ‘slackpkg’ considers “two versions of the same package”, without ill effect. My question was answered when I read the following:
Quote:
Originally Posted by Didier Spaier View Post
Code:
  # If we don't have a package match here, then we will attempt to find
  # a package using the long name format (name-version-arch-build) for
  # which the base package name was given.  On a properly-managed machine,
  # there should only be one package installed with a given basename, but
  # we don't enforce this policy.  If there's more than one, only one will
  # be removed.  If you want to remove them all, you'll need to run
  # removepkg again until it removes all the same-named packages.
So, I removed the two packages that made ‘slackpkg’ complain.

Oh, and about the underscores in packages names:
Quote:
Originally Posted by Didier Spaier View Post
No issue, they are allowed. In my system packages there have names are like that
Of course! There are quite a few such packages. I could easily have answered that question myself.

Anyway, my issue is solved now. All it took was a small edit of the ‘libreoffice-helppack.SlackBuild’ script, since the only spot where the full package name gets produced, is at the very end, when the ‘makepkg’ command gets run. I created a patch file to make the modification, and it has the following contents:
Code:
--- libreoffice-helppack.SlackBuild.ORIG	2018-12-22 02:49:30.000000000 +0100
+++ libreoffice-helppack.SlackBuild	2019-01-06 16:09:44.632167140 +0100
@@ -101,4 +101,4 @@
  \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
   -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
 
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}_${PKG_LANG}-${VERSION}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}
While I was at it, I made the same modification to the ‘libreoffice-langpack.SlackBuild’ script, so I can install more than one language pack, too, without making ‘slackpkg’ unhappy:
Code:
--- libreoffice-langpack.SlackBuild.ORIG	2018-12-22 02:49:30.000000000 +0100
+++ libreoffice-langpack.SlackBuild	2019-01-06 16:26:02.523063817 +0100
@@ -116,4 +116,4 @@
   cd $PKG
 fi
 
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}_${PKG_LANG}-${VERSION}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}
 
Old 01-06-2019, 11:53 AM   #13
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 3,898

Rep: Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154Reputation: 1154
Thanks for the patch
it's now merged in my branch
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] iptables troubleshooting icmp and best place to log /var/log/messages or /var/log/iptables JockVSJock Linux - Security 18 02-12-2016 01:31 AM
Slackpkg - /var/log/packages broken croftad1 Slackware 4 12-02-2012 06:21 AM
slackpkg search problem - not using /var/log/packages? plunder Slackware 2 09-21-2010 06:15 PM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 05:13 PM
/var/log/packages and /var/log/setup sunny_5252 Slackware 4 05-17-2007 09:17 PM

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

All times are GMT -5. The time now is 05:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration