WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Understanding submitqc  (Read 7106 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: Understanding submitqc
« Reply #15 on: October 05, 2020, 10:14:16 AM »
This will also create a clean list:
Code: [Select]
$ for file in *.tcz; do unsquashfs -ll -d '' "$file" | grep -v '^d' | sed -e 's#.* /#/#' -e 's# -> .*##' -e 1,3d > "$file".list ; done
« Last Edit: October 05, 2020, 10:16:20 AM by Juanito »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: Understanding submitqc
« Reply #16 on: October 05, 2020, 11:33:31 AM »
Hi Juanito
You left out a pipe through the  sort  command. I periodically find  .list  files that are improperly or reverse sorted. Or does
that command guarantee a sorted output?
« Last Edit: October 05, 2020, 11:44:07 AM by Rich »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1244
Re: Understanding submitqc
« Reply #17 on: October 05, 2020, 11:47:35 AM »
I always create the list from the file system before squashing.   Just straight output from

Code: [Select]
find * -not -type d

Which will definitely clash with the script doing a plain diff comparison.

submitqc never ran properly for arm, so I never even looked at it.  Where is the latest iteration of the script.?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: Understanding submitqc
« Reply #18 on: October 05, 2020, 12:48:48 PM »
Hi Sashank999
...
I don't know what other unwanted file extensions (or names with no extensions) could pop up, do you?
We want 2 types of ELF files, so that's what it makes sense to search for.
Well, look at the object we are grepping - '\.o$' - I don't think any others will pop up because we are
- adding \ to that special . to make it an ordinary one
- using $ to designate the end of line
- using single quotes so that $ doesn't get substituted ...
I guess my wording wasn't clear. I wasn't questioning your syntax. I was questioning your assumption that all object files
would always have a  .o  extension. The  -o (output)  option lets you specify any name and extension you want:
Code: [Select]
gcc -c xyz.c -o abc.obj
Quote
... Yes. As we have dependency chaining system (I don't remember what it is called), I think direct deps check is enough.
I don't think we need to check for entire dependency tree. ...
Since submitqc is intended to check the extension being submitted, checking direct dependencies to make sure the  .dep
file is OK makes sense. Since  binutils  is a dependency of  submitqc , readelf  is already present anyway.

... I also got this command working on creating .tcz.list without unsquashing it. Any suggestions on it ?
Code: [Select]
unsquashfs -ll ${F} | grep -v '^l' | tee /tmp/submitqc/.${F}.list # For checking with the given one
if diff -u /tmp/submitqc/.${F}.list ${F}.list ; then
echo -en "${RED}${F}.tcz.list is incorrect. ${GREEN}Corrected.${NORMAL}"
cp -f /tmp/submitqc/.${F}.list ./${F}.list
fi
Only one. Just create the list automatically and skip the remaining steps since that's what the list has to look like anyway.

The script is already quite long. The conditional logic to fix and spit out a message saying  "you did it wrong and i fixed it"
adds no value. It simply adds noise to an already lengthy script.

I would suggest the same holds true of other items that are automatically fixed, such as MD5s, permissions, etc.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: Understanding submitqc
« Reply #19 on: October 05, 2020, 12:53:08 PM »
Hi Paul_123
I do something similar:
Code: [Select]
tc@E310:~/BuildTCZs/GPicView/package/gpicview$ find . -not -type d | cut -c 2- | sort
/usr/local/bin/gpicview
/usr/local/share/applications/gpicview.desktop
/usr/local/share/doc/gpicview/COPYING
/usr/local/share/gpicview/pixmaps/object-flip-horizontal.png
/usr/local/share/gpicview/pixmaps/object-flip-vertical.png
/usr/local/share/gpicview/pixmaps/object-rotate-left.png
/usr/local/share/gpicview/pixmaps/object-rotate-right.png
/usr/local/share/gpicview/ui/pref-dlg.ui
/usr/local/share/pixmaps/gpicview.png
tc@E310:~/BuildTCZs/GPicView/package/gpicview$
The  cut  removes the leading dot but leaves a leading slash. Your version omits the leading slash.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1244
Re: Understanding submitqc
« Reply #20 on: October 05, 2020, 02:39:46 PM »
I guess that is another case of standardization......from what I've seen  the leading slash is always dropped

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: Understanding submitqc
« Reply #21 on: October 05, 2020, 04:46:02 PM »
Hi Paul_123
I've come across:
1. Without leading slash.
2. With leading slash.
3. With leading dot and slash.

Online Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Understanding submitqc
« Reply #22 on: October 05, 2020, 11:16:47 PM »
Guys, we have to follow some standards and submitqc should be the qualication test for those standards.
Some of those standards (I think):
1. Always maintain the leading slashes in tcz.list. They should not have ./ or start with letters directly.
2. Check the order of fields in info file and also check if all fields are non-empty.
3. Check if there are child deps in dep file.
4. Check the content and validity(if its a valid gzip) of tgz to be submitted.
5. Add syntax checking (sh -n <SCRIPT>) to startup scripts and build scripts.
6. Check for files that should be in -dev.tcz (.h, .a, .la, .m4, .pc), -doc.tcz (.1 - .9), -locale.tcz (if there are files in usr/local/share/locale/*), -gir.tcz (.gir and .typelib).
7. And basically any other suggestions the repo maintainers, admins or other volunteers give here.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: Understanding submitqc
« Reply #23 on: November 09, 2020, 04:11:38 AM »
It took a while, but submitqc has been added to tinycorelinux git: https://github.com/tinycorelinux/submitqc

Offline polikuo

  • Hero Member
  • *****
  • Posts: 725
Re: Understanding submitqc
« Reply #24 on: November 09, 2020, 05:20:43 AM »
It took a while, but submitqc has been added to tinycorelinux git: https://github.com/tinycorelinux/submitqc

What about aarch64 ?

Code: [Select]
--- /usr/local/bin/submitqc     2019-02-18 18:15:53.000000000 +0800
+++ /tmp/submitqc       2020-10-03 11:42:16.585520507 +0800
@@ -182,6 +182,7 @@
    i686) BASELIBS="$BASELIBS ld-linux.so.2 linux-gate.so.1"; ARCH="x86" ;;
    x86) BASELIBS="$BASELIBS ld-linux.so.2 linux-gate.so.1" ;;
    armv7l) BASELIBS="$BASELIBS ld-linux-armhf.so.3 linux-vdso.1"; ARCH="armv7";;
+   aarch64) BASELIBS="$BASELIBS ld-linux-aarch64.so.1 linux-vdso.1"; ARCH="aarch64";;
    *) echo "$SCRIPT: Unrecognized architecture '$ARCH'. See --help." && exit 1 ;;
 esac

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: Understanding submitqc
« Reply #25 on: November 09, 2020, 06:08:27 AM »
change made - thanks