WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: extension audit script  (Read 151131 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #45 on: August 31, 2010, 08:56:05 PM »
In addition to some fixes, I added a function that echoes both your name from your info file and the extension maintainers name if the extension you are checking already exists in the repo.  If the names don't match, you need to contact the extension maker if you desire to update the existing extension.  Please use it and make sure that you are not sending an intended new submission or an update for an extension already existing by someone else.  There are 2509 tcz extensions in the repo, and it is easy to overlook one, and this tool will help in that regard.  

I use this script on every extension that comes through, but always more efficient to catch one's own errors before they are sent in.
« Last Edit: August 31, 2010, 08:59:10 PM by Jason W »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #46 on: September 01, 2010, 10:18:31 PM »
Added some small features and improvements, also using /opt/tcemirror for wget command to allow more universal access.  I don't plan on announcing every small change, but I think for now it is where I want it.

Some files that are created to tell you of issues:

/tmp/submitqc/corrupttcz  - lists corrupt tcz extensions
/tmp/submitqc/wrongblocksize  - lists extensions that are not 4096 block size.
/tmp/submitqc/wrongmd5  -   lists extensions that fail md5sum
/tmp/submitqc/tcemaintainer  -  lists extensions being audited that have existing maintainers and maintainer names.
« Last Edit: September 01, 2010, 10:28:27 PM by Jason W »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #47 on: September 02, 2010, 07:14:17 PM »
Added an additional check for extensions in the repo with similar names, so one can make sure that their extension does not already exist in a similarly named format.  For example, running the script on emelfm2-locale.tcz will list these extensions as existing in similar named format:

emelfm.tcz emelfm2.tcz emelfm2-locale.tcz

Then the submitter can look to see if any of those existing extensions are the same as he is about to upload, or if his extension will in any way conflict with those that are already there.  

This information is stored in this file on each run of the audit script:

/tmp/submitqc/similarextensions

Running the script on emelfm.tcz, emelfm2.tcz, and emelfm2-locale.tcz produced this output in the similarextensions file that can be studied after the script is run, handy in the case of auditing a long list of extensions at one time:

Code: [Select]
emelfm.tcz: similar extensions
emelfm2-locale.tcz
emelfm2.tcz
emelfm.tcz
 
emelfm2-locale.tcz: similar extensions
emelfm2-locale.tcz
emelfm2.tcz
emelfm.tcz
 
emelfm2.tcz: similar extensions
emelfm2-locale.tcz
emelfm2.tcz
emelfm.tcz



Also, here is the output of the tcemaintainer file in that same directory:

Code: [Select]
Extension: emelfm.tcz
Maintainer is  juanito
Submitter is  juanito
 
Extension: emelfm2-locale.tcz
Maintainer is  Jason W
Submitter is  Jason W
 
Extension: emelfm2.tcz
Maintainer is  Jason W
Submitter is  Jason W
 
« Last Edit: September 02, 2010, 07:16:41 PM by Jason W »

Offline peterc

  • Newbie
  • *
  • Posts: 36
Added to the wiki
« Reply #48 on: September 03, 2010, 02:01:26 AM »
I just came across this page today, after having submitted several extensions over the past three months. I can't help but wonder who else has missed this. I have therefore added a note to the wiki (http://wiki.tinycorelinux.com/Creating+Extensions#Testing), since that is where people will be looking for information on creating an extension, not the forums.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #49 on: September 03, 2010, 08:12:43 AM »
Thanks!

I also made this a sticky so it doesn't get buried.


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #50 on: September 21, 2010, 09:02:28 PM »
I added the check for the KERNEL variable to see if either a 32 bit or 64 bit version exists of entries in dep files, all entries in dep files that do not exist in the repo are stored in /tmp/submitqc/missingdeps.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #51 on: October 20, 2010, 05:27:17 PM »
Added a check for the readability as user TC of the base squashfs directory, to prevent non-readable extensions from getting through. 

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #52 on: October 30, 2010, 09:17:37 PM »
Added checking for suspicious directory permissions, echoed in the terminal and
stored in /tmp/submitqc/badperm. 

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #53 on: November 11, 2010, 11:09:33 PM »
Added check for wrong startup script name, results echoed in

> /tmp/submitqc/wrongstartscriptname

The extension is automatically rebuilt with proper script name if there is only one file in tce.installed yet it is
not the same name as the extension.  If there are two or more files in tce.installed, then no
automatic rebuilding and renaming takes place since this condition can't be reliably corrected.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: extension audit script
« Reply #54 on: November 17, 2010, 09:30:11 AM »
Code: [Select]
tc@box1:/mnt/hda3/jls/estensioni/pygobject-2.7$ submit3
/home/tc/.local/bin/submit3: line 407: stat: not found
dCore user

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #55 on: November 17, 2010, 10:16:24 AM »
Stat is part of coreutils, but I have also seen that error message as when I boot I see /usr/local/tce.installed/coreutils but the extension itself is not loaded.  It is likely a bug in an extension somewhere and I will look more into it later today, have not had the chance to yet.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: extension audit script
« Reply #56 on: December 03, 2010, 01:52:36 PM »
I think this script should be put in the repo as an extension. That way the deps will be installed with it. Also it will allow for further automation of build scripts.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #57 on: December 03, 2010, 02:34:53 PM »
Though I keep my remaster, fetch-and-package, and other scripts in this section and out of the repo, the audit script is different as it is used as part of the submission process and recommended for extension makers to either use or at least be aware of what is needed to be correct and factor that into their own routines.

With it in the repo, it will be updated each time tce-update is run if I have made any changes to it.  And deps will be automatically installed and ready to go. 

I have a few minor adjustments to make to it and I will ponder placing it in the repo. 

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: extension audit script
« Reply #58 on: December 06, 2010, 10:15:40 PM »
Now in the repo as submitqc.tcz, and the script name is submitqc.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11679
Re: extension audit script
« Reply #59 on: February 11, 2012, 04:19:25 PM »
Hi Jason W
Quote
The graphics-2.6.33.3-tinycore.tcz entry in nvidia-96.43.20-module-2.6.33.3-tinycore.tcz.dep needs to use the KERNEL variable instead of kernel version number.
This message could be a little clearer, since you have to replace more than just the number:
Quote
The graphics-2.6.33.3-tinycore.tcz entry in nvidia-96.43.20-module-2.6.33.3-tinycore.tcz.dep needs to have "version-tinycore" replaced with the word "KERNEL" .
The script also ran into trouble trying to fix one of my errors:
Quote
chown: changing ownership of `nvidia-96.43.20-glx.tcz.123456789/usr/local/tce.installed/nvidia-96.43.20-glx': Operation not permitted
chown: changing ownership of `nvidia-96.43.20-glx.tcz.123456789/usr/local/tce.installed': Operation not permitted
I'm guessing there should be a sudo in front of the chmod and chown commands.
Due to cutting and pasting I introduced a typo in my dependency file:
nvidia-96.43.20-module-KERNEL.tcz.dep  instead of  nvidia-96.43.20-module-KERNEL.tcz
The dependency check did not flag it as a missing dependency.

Overall, a very helpful utility, thank you.