[bug] Upload fails if CONFIG_VERSION_DIST is not set
mikysal78 opened this issue · comments
the output is:
13:15:05 TASK [openwisp.openwisp2-imagegenerator : ./build-images.sh] *******************
13:15:05 Sunday 09 May 2021 13:15:05 +0200 (0:00:00.692) 0:01:05.277 ************
13:18:21 changed: [jenkins.basilicata.nnxx]
13:18:21
13:18:21 TASK [openwisp.openwisp2-imagegenerator : Prepare upload script] ***************
13:18:21 Sunday 09 May 2021 13:18:21 +0200 (0:03:15.321) 0:04:20.599 ************
13:18:21 changed: [jenkins.basilicata.nnxx]
13:18:21
13:18:21 TASK [openwisp.openwisp2-imagegenerator : ./upload_firmware.py] ****************
13:18:21 Sunday 09 May 2021 13:18:21 +0200 (0:00:00.300) 0:04:20.899 ************
13:18:21 fatal: [jenkins.basilicata.nnxx]: FAILED! => changed=true
13:18:21 cmd:
13:18:21 - ./upload_firmware.py
13:18:21 delta: '0:00:00.145079'
13:18:21 end: '2021-05-09 13:18:21.725762'
13:18:21 msg: non-zero return code
13:18:21 rc: 1
13:18:21 start: '2021-05-09 13:18:21.580683'
13:18:21 stderr: |-
13:18:21 Traceback (most recent call last):
13:18:21 File "./upload_firmware.py", line 46, in <module>
13:18:21 VERSION_DIST = find_config_line('CONFIG_VERSION_DIST')
13:18:21 File "./upload_firmware.py", line 37, in find_config_line
13:18:21 raise ValueError(f'{config_name} not found')
13:18:21 ValueError: CONFIG_VERSION_DIST not found
13:18:21 stderr_lines: <omitted>
13:18:21 stdout: ''
13:18:21 stdout_lines: <omitted>
13:18:21
13:18:21 PLAY RECAP *********************************************************************
13:18:21 jenkins.basilicata.nnxx : ok=26 changed=19 unreachable=0 failed=1 skipped=9 rescued=0 ignored=0
on my playbook i have add this code:
openwisp2fw_uploader:
enabled: true
url: "{{ openwisp2fw_controller_url }}"
token: "xXxXx"
category_map:
- organization_name: basilicata
- category_id:
- 9c6c1580-0d89-4a33-b8d9-7c306a482369
- 19e26a37-bece-43ad-8d5b-c5d31a9e7647
- 20c02269-69ef-463f-bf8f-21fee7b83539
- flavour:
- base
- opennds
- chilli
image_types:
- mvebu-cortexa9-linksys_wrt3200acm-squashfs-sysupgrade.bin
No idea @mikysal78.
Happens to me and seems something changed on last OpenWRT build system, even if i set on .config.default
the CONFIG_VERSION... variables, this on make defconfig
is not copied to .config
file
So.... why is this issue closed without a resolution?
@lfdominguez because I couldn't replicate it, if you can please provide more details.
Yup... I set on my playbook this…:
openwisp2fw_source_other_configs:
- CONFIG_BUSYBOX_CUSTOM=y
- CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY=y
- CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
- CONFIG_BUSYBOX_CONFIG_FEATURE_REVERSE_SEARCH=y
- CONFIG_BUSYBOX_CONFIG_FEATURE_VI_UNDO=y
# workaround to avoid conflicts between wpad and wpad-basic
- "# CONFIG_PACKAGE_wpad-basic is not set"
- CONFIG_LUCI_SRCDIET=y
- CONFIG_IMAGEOPT=y
- CONFIG_VERSIONOPT=y
- CONFIG_VERSION_DIST="myFirm"
- CONFIG_VERSION_REPO="https://domain.example/snapshots"
- CONFIG_VERSION_HOME_URL="https://domain.example"
- CONFIG_VERSION_MANUFACTURER="Manuf"
I see how this is added to the .config.default
file of the source directory, but after the make defconfig
all of this CONFIG_IMAGEOPT
and CONFIG_VERSIONOPT
not show and is in no set
mode.
Furthermore, I'm using the openwisp2fw_source_version: openwrt-23.05
and need to change some wrong feeds defaults URLs. So, I'm thinking about something change on last OpenWRT build system.
The upload python script is doing a simple grep to .config
file to search the VERSION there, but right now, that variable is not set.
@lfdominguez I have this which works:
- CONFIG_VERSIONOPT=y
- CONFIG_IMAGEOPT=y
- CONFIG_VERSION_DIST="OWF"
- CONFIG_VERSION_NUMBER="22.03"
@lfdominguez I have this which works:
- CONFIG_VERSIONOPT=y - CONFIG_IMAGEOPT=y - CONFIG_VERSION_DIST="OWF" - CONFIG_VERSION_NUMBER="22.03"
Humm... I didn't set CONFIG_VERSION_NUMBER
'cause I was thinking that the build system fill that variable. Let me test with these variables, thanks.
@lfdominguez I suppose that when providing a custom version identifier you have to provide a custom verion number and the build system won't try to guess it because it wouldn't know how to do this. But I am just supposing as I haven't spent time to verify this.
Resolved, was that CONFIG_IMAGEOPT was not set on my side, thanks. In summary, to be able to get that variable's set must get on config:
- CONFIG_VERSIONOPT=y
- CONFIG_IMAGEOPT=y
@mikysal78 ☝️