Tiny Core Linux

Tiny Core Extensions => TCE Corepure64 => Topic started by: chiguireitor on January 08, 2017, 08:52:58 AM

Title: Building TCZ extensions for Corepure64
Post by: chiguireitor on January 08, 2017, 08:52:58 AM
Hi all, i've found one extension missing from the corepure64 and i want to build it, however i don't know how to pack it nor test it on my corepure64 vm.

Is there any guide one can follow to build extensions?

Host is Debian 8.
Title: Re: Building TCZ extensions for Corepure64
Post by: Juanito on January 08, 2017, 09:39:08 AM
See here:

http://wiki.tinycorelinux.net/wiki:creating_extensions

Please compile the extension on corepure64 in the vm rather than on the debian host.
Title: Re: Building TCZ extensions for Corepure64
Post by: chiguireitor on January 08, 2017, 01:17:58 PM
Just sent the extension

The process seems fairly easy! Thanks a lot for the suggestion
Title: Building TCZ extensions for Corepure64
Post by: coreplayer2 on January 10, 2017, 03:17:50 AM
To ensure consistency of submitted extensions I use the submitqc.tcz audit script/extension to fix any anomalies with an extension and supporting files.

Code: [Select]
tce-load -i submitqc.tczthen go into the directory containing the new extension and info file, then open a terminal and run
Code: [Select]
submitqc --fix
when finished, tar up the contents of the directory and submit.

good luck
:)
Title: Re: Building TCZ extensions for Corepure64
Post by: andyj on February 16, 2019, 08:15:22 AM
I'm getting an error in submitqc when checking apache2.4:

Code: [Select]
submitqc: apache2.4.tcz binaries have been stripped? /
Some binaries have not been stripped:
usr/local/sbin/suexec
This may be intentional. Else to strip, use --strip.
You have warnings.
/usr/local/bin/submitqc: unset: line 834: ./usr/local/sbin/suexec: bad variable name

At which point the script dies and leaves an unpacked tcz directory.
Title: Re: Building TCZ extensions for Corepure64
Post by: Rich on February 16, 2019, 08:43:59 AM
Hi andyj
Code: [Select]
/usr/local/bin/submitqc: unset: line 834: ./usr/local/sbin/suexec: bad variable name
At which point the script dies and leaves an unpacked tcz directory.

Looking at line 834 it reads:
Code: [Select]
unset $BINI believe it should read:
Code: [Select]
unset BINTry replacing the link   /usr/local/bin/submitqc  with a copy of the file  /tmp/tcloop/submitqc/usr/local/bin/submitqc  and editing
out the extra  $  sign to confirm it fixes the problem. I see a similar issue on line  657  that reads:
Code: [Select]
unset $FOUND
Title: Re: Building TCZ extensions for Corepure64
Post by: Rich on February 16, 2019, 08:50:08 AM
I checked the TC9 x86 version of  submitqc. I suspect the same version is used in TC9 and TC10 for x86 and x86_64.
And possibly  piCore  too.
Title: Re: Building TCZ extensions for Corepure64
Post by: coreplayer2 on February 16, 2019, 11:46:05 AM
Hi andyj
Code: [Select]
/usr/local/bin/submitqc: unset: line 834: ./usr/local/sbin/suexec: bad variable name
At which point the script dies and leaves an unpacked tcz directory.

Looking at line 834 it reads:
Code: [Select]
unset $BINI believe it should read:
Code: [Select]
unset BINTry replacing the link   /usr/local/bin/submitqc  with a copy of the file  /tmp/tcloop/submitqc/usr/local/bin/submitqc  and editing
out the extra  $  sign to confirm it fixes the problem. I see a similar issue on line  657  that reads:
Code: [Select]
unset $FOUND

Thanks for spotting that,    unset command should be as per variable assignment as I understand,  I'll fix that and update

thanks
Title: Re: Building TCZ extensions for Corepure64
Post by: Rich on February 16, 2019, 12:45:07 PM
Hi coreplayer2
...   unset command should be as per variable assignment as I understand,  ...
I suspected as much, especially when I saw the syntax of all the other  unset  commands. :)
Title: Re: Building TCZ extensions for Corepure64
Post by: coreplayer2 on February 16, 2019, 01:33:34 PM
Is first time I've ever seen the error.
Because I was curious , I ran
Code: [Select]
submitqc --fix nvidia-340.96-doc.tczwithout error..

Maybe the first time it ever had to report from checkcopyright() function, or second time the script was run?

Either way I'm curious if the edit fixed andyj's error?
Title: Re: Building TCZ extensions for Corepure64
Post by: Rich on February 16, 2019, 01:46:11 PM
Hi coreplayer2
I think the error occurred because because an unstripped binary was found and  BIN  was set. When the  unset  command
executed it tried to unset the contents of BIN which was:
Code: [Select]
./usr/local/sbin/suexecNormally binaries are stripped so  BIN  is an empty string and no error occurs.
Title: Re: Building TCZ extensions for Corepure64
Post by: coreplayer2 on February 16, 2019, 02:00:49 PM
Hi coreplayer2
I think the error occurred because because an unstripped binary was found and  BIN  was set. When the  unset  command
executed it tried to unset the contents of BIN which was:
Code: [Select]
./usr/local/sbin/suexecNormally binaries are stripped so  BIN  is an empty string and no error occurs.

It's weird that I use this extension extensively without seeing this error before,  but glad we squashed this now
thanks 

PS I'm assuming is fixed..
Title: Re: Building TCZ extensions for Corepure64
Post by: Rich on February 16, 2019, 02:17:26 PM
Hi coreplayer2
This is weird. I just recompiled  watcher  without stripping it. When I ran  submitqc, it reported:
Code: [Select]
submitqc: watcher.tcz file/directory ownerships & permissions ok? Ok.
submitqc: watcher.tcz binaries have been stripped? /
        Some binaries have not been stripped:
                usr/local/bin/watcher
        This may be intentional. Else to strip, use --strip.
        You have warnings.
submitqc: watcher.tcz list file looks ok? Ok.
submitqc: watcher.tcz comparing list to mirror copy. Matches!
but it ran to completion. Maybe it just didn't like the leading  ./  in the example by andyj.
Title: Re: Building TCZ extensions for Corepure64
Post by: andyj on February 16, 2019, 03:21:53 PM
This is the only extension I noticed a fail on in the 109 I ran it against. The strip should work, I use it for just about all of them:

Code: [Select]
for a in $(find $TCZ* -type f); do file -b $a | grep -q '^ELF .*not stripped$' && strip --strip-unneeded $a; done
I'm guessing the suid bit is keeping it from getting stripped. Somehow that's getting lost in the packaging process so I have to fix that too.
Title: Re: Building TCZ extensions for Corepure64
Post by: coreplayer2 on February 16, 2019, 06:15:41 PM
@Andyj.   

Does removing the unset var prefix resolve the first issue?


Sent from my iPhone using Tapatalk
Title: Re: Building TCZ extensions for Corepure64
Post by: andyj on February 17, 2019, 08:55:37 AM
Yes, thank you.
Title: Re: Building TCZ extensions for Corepure64
Post by: coreplayer2 on February 17, 2019, 12:54:42 PM
Yes, thank you.
Great thanks for advising
Regards


Sent from my iPhone using Tapatalk
Title: Re: Building TCZ extensions for Corepure64
Post by: Juanito on February 17, 2019, 10:30:37 PM
updated submitqc posted
Title: Re: Building TCZ extensions for Corepure64
Post by: coreplayer2 on February 18, 2019, 12:48:45 AM
updated submitqc posted
thanks Juanito