Discussion:
makepkg(8) restrictions to install/slack-desc file
(too old to reply)
Lew Pitcher
2020-02-23 19:44:18 UTC
Permalink
On Slackware 14.0, with all outstanding patches applied, I am
repackaging a LibreOffice (binary) install from the supplied RPMs
to TXZ files using rpmtotgz, explodepkg and makepkg, and I've run
into a problem with the install/slack-desc file.

As root, I create a directory, explodepkg(8) the tgz file created
by rpmtotgz into it, creat a subdirectory called "install", and a
text file called "install/slack-desc", then makepkg(8) a new txz
file in the grandparent directory. This process works well, and
I've confirmed that the resulting txz files contain the proper
install subdirectory and the expected contents of the slack-desc file.

The slack-desc file looks like
libreoffice6.2-writer: libreoffice6.2-writer
libreoffice6.2-writer: (LibreOffice 6.2.8.2-2 Component)
libreoffice6.2-writer:
libreoffice6.2-writer: https://downloadarchive.documentfoundation.org/libreoffice/old/
libreoffice6.2-writer:
libreoffice6.2-writer: LOCAL PACKAGE

The longest line contains 64 characters, and does not exceed the
"ruler" documented in the slackware wiki
(https://www.slackwiki.com/Slack-desc

I /did/ fold the first line into two; the longest title line /did/
exceed the ruler.

When I installpkg(8) the resulting packages, all the files end up
in the expected directories, with the expected permissions and
ownerships.

However, the DESCRIPTION field reported by installpkg(8), and
the corresponding DESCRIPTION /line/ in the corresponding
/var/adm/packages file /does not/ contain the contents of my
slack-desc. Instead, it contains a single blank line only.

My guess is that I've run into some fundemental, undocumented,
limitation in the length or contents of the package name introducer
found on each line of the slack-desc (eg: "libreoffice6.2-writer:")
Some of these package names get pretty long, for example:
libobasis6.2-extension-javascript-script-provider

Does anyone know what's going on?

Any suggestions, comments, etc will be most welcome.
--
Lew Pitcher
"In Skills, We Trust"
Lew Pitcher
2020-02-23 20:21:24 UTC
Permalink
Post by Lew Pitcher
On Slackware 14.0, with all outstanding patches applied, I am
repackaging a LibreOffice (binary) install from the supplied RPMs
to TXZ files using rpmtotgz, explodepkg and makepkg, and I've run
into a problem with the install/slack-desc file.
Ok, so I found an ancient thread on linuxquestions.org that talks about this
very problem. With hints from that thread, I fixed my issue.

The packages out of rpmtotgz contain excess hyphens that confuse
installpkg(8). makepkg(8) seems OK with them, but installpkg(8) gets so
confused that it ignores the contents of the slack-desc even when only the
package file to be installed contains the excess hyphens.

The solution was, once I divided the target name into an identifier and a
version number, to translate the excess hyphens into underscorses. Thus,
package
libobasis6.2-extension-javascript-script-provider-6.2.8.2-2.i586.tgz
from rpmtotgz becomes
libobasis6.2_extension_javascript_script_provider-6.2.8.2_2.i586.txz
after my repackaging.

And, the resulting install/slack-desc contains lines like
libobasis6.2_extension_javascript_script_provider: libobasis6.2_extension_javascript_script_provider
libobasis6.2_extension_javascript_script_provider: (LibreOffice 6.2.8.2_2 Component)
which, in the /var/adm/packages/libobasis6.2_extension_javascript_script_provider*
file, looks like
PACKAGE NAME: libobasis6.2_extension_javascript_script_provider-6.2.8.2_2-i586-1_lp
COMPRESSED PACKAGE SIZE: 600K
UNCOMPRESSED PACKAGE SIZE: 640K
PACKAGE LOCATION: libobasis6.2_extension_javascript_script_provider-6.2.8.2_2-i586-1_lp.txz
PACKAGE DESCRIPTION:
libobasis6.2_extension_javascript_script_provider: libobasis6.2_extension_javascript_script_provider
libobasis6.2_extension_javascript_script_provider: (LibreOffice 6.2.8.2_2 Component)

Problem solved.
--
Lew Pitcher
"In Skills, We Trust"
Eef Hartman
2020-02-23 21:01:34 UTC
Permalink
Post by Lew Pitcher
Does anyone know what's going on?
Probably UNrelated, but a description file should have at least
11 lines:
You must make exactly 11 lines for the formatting to be correct.
It's also customary to leave one space after the ':'.
(from the slackwiki, at url www.slackwiki.com/Slack-desc)

I _think_ more then 11 is ok, less is NOT, see i.e. the desc file
for proftpd:
proftpd: proftpd (FTP server daemon)
proftpd:
proftpd: ProFTPD is the Professional File Transfer Protocol (FTP) server
proftpd: daemon. ProFTPD grew out of the desire to have a secure and
proftpd: configurable FTP server, and out of a significant admiration of the
proftpd: Apache web server.
proftpd:
proftpd:
proftpd:
proftpd:
proftpd:

See all of the blank lines at the end.
There is a tool to generate desc files, at slack-desc.sourceforge.net

BTW: a package name with a - in it is OK, see i.e. the one for the xorg-server:
xorg-server: xorg-server (The Xorg server, the core of the X Window System)
xorg-server:
xorg-server: Xorg is a full featured X server that was originally designed for UNIX
xorg-server: and UNIX-like operating systems running on Intel x86 hardware. It now
xorg-server: runs on a wider range of hardware and OS platforms. This work was
xorg-server: derived by the X.Org Foundation from the XFree86 Project's XFree86
xorg-server: 4.4rc2 release. The XFree86 release was originally derived from X386
xorg-server: 1.2 by Thomas Roell which was contributed to X11R5 by Snitily Graphics
xorg-server: Consulting Service.
xorg-server:
xorg-server: The home page for the X project is: http://www.x.org
but again it is 11 lines long. The total line length is more than 80 chars,
but the text part is NOT.
Lew Pitcher
2020-02-23 21:23:00 UTC
Permalink
Hi, Eef

Thanks for the reply. I appreciate the effort and concern
Post by Eef Hartman
Post by Lew Pitcher
Does anyone know what's going on?
Probably UNrelated, but a description file should have at least
You must make exactly 11 lines for the formatting to be correct.
It's also customary to leave one space after the ':'.
(from the slackwiki, at url www.slackwiki.com/Slack-desc)
I _think_ more then 11 is ok, less is NOT, see i.e. the desc file
I've experimented quite a bit over the last few days, and my experience
disagrees. You /can/ have fewer than 11 lines (my recent troubles showed
that entries can have as few as 1 lines, albeit not intentionally). And,
I've build a number of packages recently that worked properly with fewer
than 11 lines (my firefox 60.0.1esr entry, for instance has 7 lines). So, it
seems that line count (at least below 12 lines) isn't an issue.

I gather that the 11-line requirement is more for convenient, readable
screen formatting during the base install, and (possibly) when using
pkgtool(8). Fortunately, the packages I'm creating are for my own
consumption only, and I can live with the "off" formatting.

[snip]
--
Lew Pitcher
"In Skills, We Trust"
Henrik Carlqvist
2020-02-24 06:25:15 UTC
Permalink
Post by Eef Hartman
BTW: a package name with a - in it is OK
Yes, the package name itself may contain any number of "-", but the
version string may not as "-" counting from right is used to separate:

* Build number
* Architecture
* Version
* Package name

That is, My-application-with-hyphens-version1.0-x86_64-1_SBo.tgz will be
treated as:

Build number: 1_SBo
Architecture: x86_64
Version: version1.0
Package name: My-application-with-hyphens

But Some_application-version-1.0-with-hyphens-x86_64-1_SBo.tgz will be
treated as:

Build number: 1_SBo
Architecture: x86_64
Version: hyphens
Package name: Some_application-version-1.0-with

regards Henrik
Lew Pitcher
2020-02-24 16:36:01 UTC
Permalink
Hi, Henrik
Post by Henrik Carlqvist
Post by Eef Hartman
BTW: a package name with a - in it is OK
Yes, the package name itself may contain any number of "-", but the
* Build number
* Architecture
* Version
* Package name
Thanks for the detailed explanation; I've archived it in my file of "good
things to know about Slackware".

Do you know if this is documented (at all, or as well) in the Slackbook or
SlackWiki?
Henrik Carlqvist
2020-02-25 07:17:29 UTC
Permalink
Post by Lew Pitcher
Post by Henrik Carlqvist
Yes, the package name itself may contain any number of "-", but the
* Build number
* Architecture
* Version
* Package name
Do you know if this is documented (at all, or as well) in the Slackbook
or SlackWiki?
Unfortunately I don't know if it is documented anywhere, I have found
this the hard way myself when building and installing custom packages. I
did a quick google and one of the better explanations is at
http://www.slackware.com/~mozes/docs/slackware_pkg_presentation.pdf but
even that presentation does not mention where hyphens are allowed and not.

The only true documentation might be the source, but it is not easy to
understand what upgradpkg realy does when it tries to find out which
package is going to get upgraded by a newer version of the same package.
But reading the function package_name() in the script upgradepkg might
give a clue.

regards Henrik
Lew Pitcher
2020-02-25 15:33:48 UTC
Permalink
Post by Henrik Carlqvist
Post by Lew Pitcher
Post by Henrik Carlqvist
Yes, the package name itself may contain any number of "-", but the
* Build number
* Architecture
* Version
* Package name
Do you know if this is documented (at all, or as well) in the Slackbook
or SlackWiki?
Unfortunately I don't know if it is documented anywhere, I have found
this the hard way myself when building and installing custom packages. I
did a quick google and one of the better explanations is at
http://www.slackware.com/~mozes/docs/slackware_pkg_presentation.pdf
Wow! Many thanks for that link; what I know about slackware packages, I've
learned only from installing packages created by others. This will help my
understanding.
Post by Henrik Carlqvist
but
even that presentation does not mention where hyphens are allowed and not.
The only true documentation might be the source, but it is not easy to
understand what upgradpkg realy does when it tries to find out which
package is going to get upgraded by a newer version of the same package.
But reading the function package_name() in the script upgradepkg might
give a clue.
I haven't looked at the source code yet. I'll have to give that a try.

Thanks for the advice
--
Lew Pitcher
"In Skills, We Trust"
Loading...