LinuxQuestions.org
Review your favorite Linux distribution.
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 03-04-2014, 04:39 AM   #1
s09
Member
 
Registered: Jan 2014
Distribution: Slackware 14.1 (MLED 32-bit)
Posts: 84

Rep: Reputation: Disabled
Installing a package built via src2pkg: package description do not appear


Having taken extra care to provide a valid slack-desc file in the build directory prior to `src2pkg -CWD source.tar.gz`, when installing (or upgrading) the package it seems that the description does not show up.

Is this a bug or a feature?
 
Old 03-05-2014, 02:41 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Strange, is it being included in the package?
 
Old 03-05-2014, 03:17 AM   #3
s09
Member
 
Registered: Jan 2014
Distribution: Slackware 14.1 (MLED 32-bit)
Posts: 84

Original Poster
Rep: Reputation: Disabled
Yes, the slack-desc is included in the package! I have also generated one using the script found at the slacky.eu wiki just to make sure it is valid.

Then I have re-built a package via src2pkg (as root, to set ownership correctly) and upgradepkg-ed it to check, but the package description is still not displayed:

Code:
# upgradepkg somepackage-i486-src2pkg-3.txz 

+==============================================================================
| Upgrading somepackage-i486-src2pkg-2 package using ./somepackage-i486-src2pkg-3.txz
+==============================================================================

Pre-installing package somepackage-i486-src2pkg-3...

Removing package /var/log/packages/somepackage-i486-src2pkg-2-upgraded-2014-03-05,11:03:23...

Verifying package somepackage-2.1.24-i486-src2pkg-3.txz.
Installing package somepackage-i486-src2pkg-3.txz:
PACKAGE DESCRIPTION:
Executing install script for somepackage-i486-src2pkg-3.txz.
Package somepackage-i486-src2pkg-3.txz installed.

Package somepackage-i486-src2pkg-2 upgraded with new package ./somepackage-i486-src2pkg-3.txz.
EDIT: The slack-desc was, of course, placed in the build directory as referred to in the build command:
Code:
src2pkg -CWD -b=src2pkg-3 source.tar.gz

Last edited by s09; 03-05-2014 at 03:37 AM. Reason: Provided additional details
 
Old 03-05-2014, 03:23 AM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,096

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
I'm just guessing, but have you placed the slack-desc file in the ./install subdirectory of the one you're using to make the package?
makepkg expect it to be there.
 
Old 03-05-2014, 03:33 AM   #5
s09
Member
 
Registered: Jan 2014
Distribution: Slackware 14.1 (MLED 32-bit)
Posts: 84

Original Poster
Rep: Reputation: Disabled
Yes, ponce, src2pkg has placed the slack-desc file there.
 
Old 03-05-2014, 04:29 AM   #6
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
It looks like your package name is messed up (sorry!) and it is confusing upgradepkg.

A valid package name is PRGNAM-VERSION-ARCH-BUILD.t?z, where
PRGNAM can include '-'
VERSION can *not* include '-'
ARCH can *not* include '-'
BUILD (including TAG) can *not* include '-'

Your package name is
PRGNAM='somepackage'
VERSION='i486', which is 'interesting'
ARCH='src2pkg', which is also 'interesting'
BUILD='3'

Any mistake in the package name will confuse upgradepkg. It has to work backwards, starting with the BUILD, because it does not know how many '-' are included in PRGNAM. If upgradepkg calculates the wrong PRGNAM from the package name, then the PRGNAM it calculated will not be the same as the name in the slack-desc, and it will not show the slack-desc properly.

If src2pkg is not giving you a correct package name, you need to set the correct command line arguments so that it does. -b=src2pkg-3 is not correct
 
Old 03-05-2014, 11:20 AM   #7
s09
Member
 
Registered: Jan 2014
Distribution: Slackware 14.1 (MLED 32-bit)
Posts: 84

Original Poster
Rep: Reputation: Disabled
Quote:
It looks like your package name is messed up (sorry!) and it is confusing upgradepkg.
...
Thanks for the suggestion! I have tried with a version number and the result is the same.
 
Old 03-05-2014, 12:33 PM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Yeah, that's the problem. Show us the slack-desc and the output from when you run src2pkg. You have named the package somepackage, so the slack-desc should have lines like:
somepackage:
somepackage:
...

src2pkg tries to guess a correct name for the package -based on the name of the sources. It doesn't always get it correct, in which case you need to supply the name and version for it. As pointed out, you have weirdness in the arch and versions, too. Are you building from source or using src2pkg to re-package an already-created package? What are the names of these things, and what src2pkg command-line options are you using? Have you created entries in the src2pkg.conf file which are confusing things?
 
Old 03-06-2014, 02:57 AM   #9
s09
Member
 
Registered: Jan 2014
Distribution: Slackware 14.1 (MLED 32-bit)
Posts: 84

Original Poster
Rep: Reputation: Disabled
Well, here is the whole process documented once again with a different package:

Code:
# ls
slack-desc  udunits-2.1.24.tar.gz

# src2pkg -b=src2pkg-1 udunits-2.1.24.tar.gz
hostname: Unknown host
Found source archive: udunits-2.1.24.tar.gz
Creating working directories:
   PKG_DIR=/tmp/udunits-2.1.24-i486-src2pkg-1
   SRC_DIR=/tmp/udunits-2.1.24-src-src2pkg-1
Unpacking source archive - Done
Correcting source permissions - Done
Checking for patches - None found
Found configure script - Done
Configuring sources using:
 LDFLAGS="-Wl,-O1,-L/lib,-L/usr/lib" CFLAGS="-O2 -m32 -march=i486 -mtune=i686" ./configure --prefix=/usr
Configuration has been - Successful!
Compiling sources - Using: 'make'
Compiling has been - Successful!
Checking for Makefile rule: 'install' Okay
Checking support for DESTDIR (or similar) - Found DESTDIR
Creating package content using:
   make DESTDIR=/tmp/udunits-2.1.24-i486-src2pkg-1 install
Installation in DESTDIR - Successful
Processing package content:
Correcting libtool files - Done
Correcting package permissions - Done
Stripping ELF binaries - Using: strip -p --strip-unneeded Done
Stripping static archives - Using: strip -p --strip-debug Done
Stripping shared libraries - Using: strip -p --strip-unneeded Done
   Notice - Moving docs installed under usr/share/doc to usr/doc.
   Notice - Renaming doc directory installed without a version number.
Checking for standard documents - Done
   Notice - Moving info pages installed under usr/share/info to /usr/info
Compressing info pages - Done
Verified slack-desc found - Inserting in package as PKG_DIR/install/slack-desc
Rechecking package correctness:
Checking for misplaced dirs - Done
Rechecking package permissions - Done
Checking for dead links in PKG_DIR - Done
Searching for links in: udunits-2.1.24-i486-src2pkg-1 - Done
Adding links to doinst.sh - Adding links-creation to the doinst.sh
   Notice - Adding 'install-info ' routine to doinst.sh
Deleting symbolic links - Removing links from the package directory
Creating package: udunits-2.1.24-i486-src2pkg-1.txz - Done
Package Creation - Successful! Package Location:
/tmp/udunits-2.1.24-i486-src2pkg-1.txz

# installpkg /tmp/udunits-2.1.24-i486-src2pkg-1.txz 
Verifying package udunits-2.1.24-i486-src2pkg-1.txz.
Installing package udunits-2.1.24-i486-src2pkg-1.txz:
PACKAGE DESCRIPTION:
Executing install script for udunits-2.1.24-i486-src2pkg-1.txz.
Package udunits-2.1.24-i486-src2pkg-1.txz installed.

# cat slack-desc 
# 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 ':'.

       |----handy-ruler-------------------------------------------------------|
udunits: udunits (The UDUNITS package supports units of physical quantities.)
udunits:
udunits: The UDUNITS package supports units of physical quantities. Its
udunits: C library provides for arithmetic manipulation of units and for
udunits: conversion of numeric values between compatible units. The package
udunits: contains an extensive unit database, which is in XML format and
udunits: user-extendable. The package also contains a command-line utility
udunits: for investigating units and converting values.
udunits:
udunits: (http://www.unidata.ucar.edu/software/udunits/)
udunits:
BTW, now I've also noticed that src2pkg has problems finding the hostname, although it is the default one:

Code:
# hostname 
darkstar
I hope now the case is perfectly clear.
 
Old 03-06-2014, 05:38 AM   #10
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by s09 View Post
# src2pkg -b=src2pkg-1 udunits-2.1.24.tar.gz

[...]

Creating package: udunits-2.1.24-i486-src2pkg-1.txz - Done
Package Creation - Successful! Package Location:
/tmp/udunits-2.1.24-i486-src2pkg-1.txz
I *told* you not to do "-b=src2pkg-1"
and that is the exact cause of your problem

installpkg / upgradepkg parses your package name 'udunits-2.1.24-i486-src2pkg-1.txz' as:

PRGNAM udunits-2.1.24 => wrong, should be udunits
VERSION i486 => wrong, should be 2.1.24
ARCH src2pkg => wrong, should be i486
BUILD 1 => ok, but I guess you want something like '1_src2pkg'?

DO NOT USE '-' IN THE BUILD. NOT EVER. USE '_' INSTEAD.

I hope now the case is perfectly clear...
 
1 members found this post helpful.
Old 03-06-2014, 12:24 PM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Yeah, use -b=1_src2pkg or -b=src2pkg_1 if that's what you want.
As to hostname, that's not all necessary anyway. What's the output of `hostname -s` on your system? That's what src2pkg is running, but the -s option may be unsupported with your version of hostname.
 
1 members found this post helpful.
Old 03-07-2014, 04:19 AM   #12
s09
Member
 
Registered: Jan 2014
Distribution: Slackware 14.1 (MLED 32-bit)
Posts: 84

Original Poster
Rep: Reputation: Disabled
Quote:
Yeah, use -b=1_src2pkg or -b=src2pkg_1 if that's what you want.
As to hostname, that's not all necessary anyway. What's the output of `hostname -s` on your system? That's what src2pkg is running, but the -s option may be unsupported with your version of hostname.
The suggested build-tag fixed the issue! Thank you both, 55020 and gnashley!

Code:
hostname -s
gives

Code:
hostname: Unknown host
 
Old 03-07-2014, 12:00 PM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
"hostname: Unknown host" I'll fix that for the next version, thanks for reporting. Does MLED use an alternative hostname than Slackware -or is this happening on Slackware also?
 
Old 03-07-2014, 02:39 PM   #14
s09
Member
 
Registered: Jan 2014
Distribution: Slackware 14.1 (MLED 32-bit)
Posts: 84

Original Poster
Rep: Reputation: Disabled
Quote:
"hostname: Unknown host" I'll fix that for the next version, thanks for reporting. Does MLED use an alternative hostname than Slackware -or is this happening on Slackware also?
I think it's the standard hostname from Slackware:
Code:
> ack -i bin/hostname /var/log/packages/

/var/log/packages/util-linux-2.21.2-i486-6
29:bin/hostname

/var/log/packages/net-tools-1.60.20120726git-i486-1
22:bin/hostname
 
  


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] centos rpm package description list? hadimotamedi Linux - Newbie 2 09-04-2011 04:05 AM
[SOLVED] Self-built Slackware package "PACKAGE DESCRIPTION" shows nothing catkin Slackware 5 10-24-2010 01:39 PM
Installpkg of a package built w/ src2pkg places the executable in /tmp/... Alexvader Slackware 20 11-05-2009 09:06 AM
Preventing aptitude installing a package that I have built manually Simon Fisher Debian 3 06-30-2006 04:48 AM
Package Description hus Linux - Software 6 05-16-2005 12:59 PM

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

All times are GMT -5. The time now is 06:57 PM.

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