LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Reply
  Search this Thread
Old 08-25-2005, 03:30 PM   #1
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
pkgcheck.py: calling for beta testers


Hi all,

I have started coding a Python program that does a sanity check on a Slackware package. I've tried to implement all the rules I have found both here and on linuxpackages.net, and I think I have coded them all except one which requires some more thought.

The objective was
- to check the packages I have created myself before sending them to linuxpackages
- to check packages I download before I install them.
I have only little experience in creating packages so this program is probably far from perfect, but I've tried it on a lot of packages and the results seem consistent to me.

I would appreciate if some of the more experienced people here could perhaps give it a try and could provide me with some feedback on errors or missing functions.

The program is available at http://www.homepages.lu/pu/pkgcheck.html and is only around 9500 bytes long. At this point, it's a simple Python executable without any documentation, but its usage is really straightforward.

Hoping for some feedback,

-pu

Last edited by uselpa; 08-28-2005 at 01:02 PM.
 
Old 08-25-2005, 11:32 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
First of all, I would like to say this program was a very good idea.

I have been thinking of getting into submitting packages to LinuxPackages.net myself (just for my own personal use, I usually pump out 20 packages a week for various programs, so I might as well help other s out while I am at it) and have always been troubled by making sure my packages meet the rules for LP.net (even though I have gotten packages from there that did NOT meet their specified requirements, but that is another story).

Anyway, I have run it on a few of my packages, and so far it looks good.

It picked up the obvious things, like files installed to /usr/local, and no documentation included. I also like that I can easily see the contents of the package.

For some additions to the program, I would suggest:

1. An option to write the results to a file
2. A bit more organized output, for example put in some line breaks or horizontal lines, and perhaps give a summary for problems found, either by default, or make it an option. Something like:

Code:
Results
--------------------------------------------------
Objects in "local" directories:               23

File Checks
--------------------------------------------------
File                                        Status
--------------------------------------------------
install/slack-conflicts                   Missing!
install/slack-desc                        OK
install/slack-suggests                    Missing!
And so on.

Just make it a bit easier to read.

I'll check it out with a few other packages, see what I come up with.

Last edited by MS3FGX; 08-25-2005 at 11:34 PM.
 
Old 08-26-2005, 01:07 AM   #3
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Original Poster
Rep: Reputation: 47
Quote:
Originally posted by MS3FGX
1. An option to write the results to a file
What would this add in comparison to redirecting at the bash level?

Quote:
Originally posted by MS3FGX
2. A bit more organized output, for example put in some line breaks or horizontal lines, and perhaps give a summary for problems found, either by default, or make it an option.
Yes, I've been thinking about this, but I first concentrated on getting the checks done properly.
Likewise, I am not yet convinced on what I consider a simple information message, and what is considered to be a warning. I guess it even depends on the context.

Quote:
Originally posted by MS3FGX
I'll check it out with a few other packages, see what I come up with.
Thanks. I'll shortly add an option to check if binaries and libraries are stripped, that's one feature that is still missing.

Last edited by uselpa; 08-26-2005 at 01:08 AM.
 
Old 08-26-2005, 01:54 AM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
What would this add in comparison to redirecting at the bash level?
Nothing really, but it's a bit more userfriendly for the uninitiated.
 
Old 08-26-2005, 02:29 AM   #5
GlowGlow
Member
 
Registered: Jun 2005
Posts: 111

Rep: Reputation: 15
But do you really want that? Some basics UNIX design rules:

- Silence is golden
- Save trees

(http://en.wikipedia.org/wiki/Unix_philosophy)

Userfriendly output is useless if you want to pipe the results to another program, which would be useful. In the end having just a bunch of \t and \n separated fields would be best, they are easily cut-able and awk-able.
 
Old 08-26-2005, 04:36 AM   #6
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Original Poster
Rep: Reputation: 47
A good reading on this subject is http://catb.org/~esr/writings/taoup/html/.

I have two questions in this context:

1 - What kind of program could parse the output of pkgcheck.py and do something useful? Usually, errors in packages have to be corrected at the SlackBuild level, and that can and should not be automatic (or does anyone have a SlackBuild generator?). So I guess the output is really destined at a person, not a program, and readability could be useful.

2 - Is it useful to run the script on a bunch of packages? Obviously I do that for testing, but in real life it would probably be done package by package. I cannot see any real use for statistics, either for identifying the most common errors or for identifying the most broken package in a lot.

What do you think?
 
Old 08-26-2005, 09:07 AM   #7
GlowGlow
Member
 
Registered: Jun 2005
Posts: 111

Rep: Reputation: 15
Quote:
Originally posted by uselpa
A good reading on this subject is http://catb.org/~esr/writings/taoup/html/.

I have two questions in this context:

1 - What kind of program could parse the output of pkgcheck.py and do something useful? Usually, errors in packages have to be corrected at the SlackBuild level, and that can and should not be automatic (or does anyone have a SlackBuild generator?). So I guess the output is really destined at a person, not a program, and readability could be useful.

2 - Is it useful to run the script on a bunch of packages? Obviously I do that for testing, but in real life it would probably be done package by package. I cannot see any real use for statistics, either for identifying the most common errors or for identifying the most broken package in a lot.

What do you think?
At the moment you may be right, but Slack porting efforts are progressing rapidly. If you have to maintain packages over multiple platforms (e.g. within a company, or for a package repository), it is often useful to do bulk-builds, and a checking package script may be useful to (semi?-)automatically check bulk builds.
 
Old 08-26-2005, 04:32 PM   #8
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Original Poster
Rep: Reputation: 47
I've just put version 0.02 online. The main change is that the script will now also detect non-stripped binaries and libraries.

At this point, I have implemented all the checks that I have been able to find in the various documentation sources. Please feel free to post your suggestions if something is missing.
 
Old 08-28-2005, 07:58 AM   #9
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Original Poster
Rep: Reputation: 47
The official homepage with a proper package for installation and a start of documentation can now be found at http://www.homepages.lu/pu/pkgcheck.html.
 
Old 08-28-2005, 12:17 PM   #10
slackMeUp
Member
 
Registered: Nov 2003
Distribution: Slack-where?
Posts: 654

Rep: Reputation: 30
link seems to be broken for me.
 
Old 08-28-2005, 12:49 PM   #11
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Original Poster
Rep: Reputation: 47
The first does no longer exist, the second is the new home (http://www.homepages.lu/pu/pkgcheck.html).
 
  


Reply



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
[ANN] pkgcheck 0.05 has been released uselpa Slackware 0 09-09-2005 02:03 PM
odd recursion: calling "by hand" vs calling by cronscript... prx Programming 4 02-12-2005 04:59 PM
Oddlabs looking for beta testers for new 3D RTS game Oddlabs Linux - Games 0 07-06-2004 07:41 AM
looking for beta testers grizzly General 5 03-20-2004 11:24 AM
A question to the RC testers Panzerfrost Mandriva 1 09-30-2003 05:25 PM

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

All times are GMT -5. The time now is 04:34 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