WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: extension audit script  (Read 89284 times)

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 385
Re: extension audit script
« Reply #90 on: July 04, 2020, 10:34:51 PM »
Hi aus9

I think it is better to add it to submitqc.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 385
Re: extension audit script
« Reply #91 on: July 14, 2020, 05:37:47 AM »
Hello all !

I have created a patch for submitqc that totally integrates infocreator script inside submitqc. No need of infocreator script. Just apply the patch and run submitqc. I have only changed the "checkinfo()" function inside the original submitqc. I encourage everyone to try it  :D

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: extension audit script
« Reply #92 on: July 31, 2020, 08:53:03 PM »
Hey, all ~ happy isolation-days greetings from Australia =) The pandemic seems to have created some at-home time to revisit old projects!

Sashank999 - thanks for the infocreator work. I'll have to read all the code to see how you've done it - thanks for posting the patch. Obviously, it's a space that deserved some attention! Unless somebody thinks that we shouldn't include some info file options/cleanup inside of submitqc, I think it makes sense to merge/include this.

Thanks also for suggesting not downloading the info.lst.gz if not required. I don't see any arguments against that one.

@aus9, thanks for your build script framework, too. I'll have to go back to submitqc and check how/when I'm running strip.

Re the stripping,

Seeing as it's been ages since I submitted a submitqc update ... it may take me a bit to remind myself how it all fits together! I'll grab the current version from the repo, read the current docs, and make a formal update/submission in the days ahead.

Hope you're all well out there. Stay safe =)

~ Denton

aus9

  • Guest
Re: extension audit script
« Reply #93 on: July 31, 2020, 09:20:35 PM »
Hi welcome back.

My only issue with
Code: [Select]
submitqc --libs is I am unable to work out the correct dir own and perms
and then owner and perms for /usr/local/tce.installed/filename
when you look at your system be it TC64 or TC32 there appears to be some randomness.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 385
Re: extension audit script
« Reply #94 on: July 31, 2020, 10:36:55 PM »
Oops, look like I submitted the wrong patch before. I actually stopped working on it as the last one gone wrong.

I think I should start working on it. Since I know how (some) python modules look, I have also added python things into my info script. I need to work on integrating them into submitqc.

aus9

  • Guest
Re: extension audit script
« Reply #95 on: August 05, 2020, 05:31:14 PM »
@dentonlt

Due to a recent stuff up by me, where I failed to notice I was a missing   
Quote
:
in my info file. Here is a test to prove current submitqc does not check all of the info file structure,
for you consideration.

Code: [Select]
tce-load -i squashfs-tools submitqc
cd /tmp
rm -rf submitqc zzz
P=zzz
mkdir -p $P/usr/local/$P
mksquashfs $P $P.tcz
md5sum $P.tcz > $P.tcz.md5.txt
cd $P
find usr -not -type d > /tmp/$P.tcz.list
sed 's|usr|/usr|g' -i /tmp/$Z.tcz.list
cd /tmp

echo 'Title:          zzz.tcz
Description:    z
Version:        z
Author:         z
Original-site:  z
Copying-policy: z
Size:           4.0K
Extension_by:   z
Tags            z     
Comments:       z

Change-log:     2020/08/06
Current:        2020/08/06  ' > $P.tcz.info

submitqc --libs

# output  SNIP
# submitqc: There are warnings or errors for your extensions. See:  /tmp/submitqc/copyright

I was missing : after tags

I am aware that some people prefer the EOF method of generating an info file where top 2 lines read
cat >> $P.tcz.info <<'EOF'
Title:             something.tcz
SNIP bottom 2 lines read
Current:        2020/08/06 something
EOF

thanks for reading.
« Last Edit: August 05, 2020, 05:33:20 PM by aus9 »

aus9

  • Guest
Re: extension audit script
« Reply #96 on: August 14, 2020, 05:21:48 AM »
I had a look at coreplayers's firefox get latest script. My coding skills need improving so I may be wrong

It appears there is agreement with the create TCE wiki that dir is root:staff for /usr/local/tce.installed
then the script under that dir is tc:staff

which means this part of the wiki may be wrong
Quote
sudo chown -R root:staff /tmp/package/usr/local/tce.installed

I can not remember if I originally wrote that....but feel free to blame me, as I would have based it on something someone said to me. If its wrong, lets fix. If its right then maybe submitqc is wrong?
« Last Edit: August 14, 2020, 05:41:59 AM by aus9 »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12875
Re: extension audit script
« Reply #97 on: August 14, 2020, 06:02:54 AM »
What is important is that /usr/local/tce.installed is root:staff - the file in it can be $USER:staff or root:staff

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: extension audit script
« Reply #98 on: December 21, 2020, 01:13:54 AM »
Damn, I really need to schedule time that's not on school holidays ...
Currently trying to get a gtkpod extension done for TC11 so that I can get my stuff off an old iPod. I'll keep reading through all this to integrate changes.

For all the Christmas-y types out there, Merry Christmas =D

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: extension audit script
« Reply #99 on: December 21, 2020, 01:33:01 AM »
What is important is that /usr/local/tce.installed is root:staff - the file in it can be $USER:staff or root:staff

Umm ... since $USER is pretty much anybody, I guess I have two options for the startup script:
  • check for & allow only root:staff & tc:staff
  • just check the group is staff, accept any user.

I'm thinking the first one is more conservative, so I'm going to do that for now. Happy to take advice/direction otherwise.

I'm also thinking there isn't ever a need for a maintainer to provide an extension startup script that must be run by any user other than tc or root. I am admittedly really rusty, though. Maybe I'm missing a whole slew of cases where a non-root non-tc username is advised?

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: extension audit script
« Reply #100 on: December 21, 2020, 01:43:33 AM »
@dentonlt

Due to a recent stuff up by me, where I failed to notice I was a missing   
Quote
:
in my info file. Here is a test to prove current submitqc does not check all of the info file structure,
for you consideration.

Ahhh, you're very detailed, @aus9! It does mean it probably misses other things, too.
I'll browse both Sashank999's code and the current submitqc. I think I also have some sample/test info files that I used in 2016 ... somewhere ...

Offline vinceASPECT

  • Sr. Member
  • ****
  • Posts: 482
Re: extension audit script
« Reply #101 on: December 21, 2020, 02:09:20 AM »
HEllo forum,

THat feature which consolidates any extensions dep's (in tcl control panel)  seems good.
(check deps)

thx

v :) :) :)