freifunk-berlin / falter-builter

build falter images using precompiled openwrt imagebuilders.
6 stars 6 forks source link

build_falter: add profile-name validation #142

Closed Akira25 closed 1 year ago

Akira25 commented 1 year ago

When pasting an invalid (misspelled) profile name into builter, it didn't complain properly, but silently stopped working in the imagebuilder. Fixing that, by giving a proper prompt, when trying to build an invalid profile name.

Noki commented 1 year ago

I tried the following:

./build_falter -p packageset/1.2.3/tunneldigger.txt -v 1.2.3 -t ath79/generic -r glinet_gl-ar1500

The output is as follows:

tobias@ubuntu:~/falter-builter$ ./build_falter -p packageset/1.2.3/tunneldigger.txt -v 1.2.3 -t ath79/generic -r glinet_gl-ar1500
Packagset is: packageset/1.2.3/tunneldigger.txt
Falter-version is: 1.2.3
Target is: ath79/generic
Router is: glinet_gl-ar1500

___.         .__.__   __
\_ |_Freifunk|__|  |_/  |_  Berlin_____
 | __ \|  |  \  |  |\   __\/ __ \_  __ \
 | \_\ \  |  /  |  |_|  | \  ___/|  | \/
 |___  /____/|__|____/__|  \___  >__|
     \/ build your own Falter! \/

cleaning build-directory...
        done.
loading OpenWrt ToH...
/home/tobias/falter-builter/build/toh:553: unescaped " character
/home/tobias/falter-builter/build/toh:553: unescaped " character
/home/tobias/falter-builter/build/toh:553: unescaped " character
/home/tobias/falter-builter/build/toh:588: unescaped " character
/home/tobias/falter-builter/build/toh:553: expected 67 columns but found 31 - filling the rest with NULL
        done.
-> building one packagelist only...
building using: https://downloads.openwrt.org/releases/21.02.7/targets/ath79/generic/openwrt-imagebuilder-21.02.7-ath79-generic.Linux-x86_64.tar.xz
selected branch: 21.02
loading imagebuilder from the internet, if newer...
        done.
pull imagebuilder from cache-dir
        done.
Extracting imagebuilder...
        done.
selected instruction set: mips_24kc
injecting repo line: src/gz openwrt_falter https://firmware.berlin.freifunk.net/feed/1.2.3-snapshot/packages/mips_24kc/falter
loading package-feed key from https://firmware.berlin.freifunk.net/feed/packagefeed_master.pub...
        done.
start building glinet_gl-ar1500...
tobias@ubuntu:~/falter-builter$

There seems to be a problem with processing OpenWRT's ToH and in addition the profile mismatch seems to go unrecognized in this case. I also noticed that -s is deprecated, but the documentation was not updated.

Akira25 commented 1 year ago

Having the prompt you gave, produces this output on my machine:

./build_falter -p packageset/1.2.3/tunneldigger.txt -v 1.2.3 -t ath79/generic -r glinet_gl-ar1500
Packagset is: packageset/1.2.3/tunneldigger.txt
Falter-version is: 1.2.3
Target is: ath79/generic
Router is: glinet_gl-ar1500

___.         .__.__   __
\_ |_Freifunk|__|  |_/  |_  Berlin_____
 | __ \|  |  \  |  |\   __\/ __ \_  __ \
 | \_\ \  |  /  |  |_|  | \  ___/|  | \/
 |___  /____/|__|____/__|  \___  >__|
     \/ build your own Falter! \/

cleaning build-directory...
        done.
loading OpenWrt ToH...
/home/martin/Freifunk/dev/falter-builter/build/toh.csv:553: unescaped " character
/home/martin/Freifunk/dev/falter-builter/build/toh.csv:553: unescaped " character
/home/martin/Freifunk/dev/falter-builter/build/toh.csv:553: unescaped " character
/home/martin/Freifunk/dev/falter-builter/build/toh.csv:588: unescaped " character
/home/martin/Freifunk/dev/falter-builter/build/toh.csv:553: expected 67 columns but found 31 - filling the rest with NULL
        done.
-> building one packagelist only...
building using: https://downloads.openwrt.org/releases/21.02.7/targets/ath79/generic/openwrt-imagebuilder-21.02.7-ath79-generic.Linux-x86_64.tar.xz
selected branch: 21.02
loading imagebuilder from the internet, if newer...
        done.
pull imagebuilder from cache-dir
        done.
Extracting imagebuilder...
        done.
make: TMPDIR value /home/martin/Freifunk/dev/falter-builter/build/ib/tmp: No such file or directory
make: using default temporary directory '/tmp'
Router profile mismatch: There is no router profile "glinet_gl-ar1500".
Please recheck with '-r' that you spelled the profile name right.

Did you check out the right branch?

On the ToH-Issues you are right. Those arise, when people write free text in data fields, that aren't supposed for that.

I'm not sure, how to tackle this, though. As far as I can say, this didn't interfere severely with the process until now.