diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..f4990e5972 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Report something that doesn't work well +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug:** +A clear and concise description of what the bug is. + +**Steps to reproduce:** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior:** +A clear and concise description of what you expected to happen. + +**Installation details:** + - qToggleOS version: [e.g. 0.18.1.0] + - Running on: [e.g. Raspberry Pi 3] + - Network connection: [Wi-Fi, wired] + +**Screenshots:** +If applicable, add screenshots to help explain your problem. + +**Log files:** +If applicable, provide log files. Use the [gist](https://gist.github.com/) website instead of pasting the log contents here. + +**Additional context:** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..9158ccc6a3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Suggest a new feature for this project +title: '' +labels: feature +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe:** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like:** +A clear and concise description of what you want to happen. + +**Provide any mockups, sketches or screenshots that clarify your idea:** +Drag your image over the issue template text to attach it. + +**Describe alternatives you've considered:** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context:** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/improvement_proposal.md b/.github/ISSUE_TEMPLATE/improvement_proposal.md new file mode 100644 index 0000000000..f9847d901f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/improvement_proposal.md @@ -0,0 +1,20 @@ +--- +name: Improvement proposal +about: Propose an improvement to an existing feature +title: '' +labels: improvement +assignees: '' + +--- + +**Is your improvement proposal related to a problem? Please describe:** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like:** +A clear and concise description of what you want to happen. + +**Provide any mockups, sketches or screenshots that clarify your idea:** +Drag your image over the issue template text to attach it. + +**Additional context:** +Add any other context or screenshots about the feature request here. diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..8bf4d45d6e --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,6 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000000..3d1654502c --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,62 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000000..105ce2da2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000..b2416d3306 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AngularJS + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..c20a1fc459 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/qtoggleos.iml b/.idea/qtoggleos.iml new file mode 100644 index 0000000000..8a3bb2d58b --- /dev/null +++ b/.idea/qtoggleos.iml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..35eb1ddfbb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Config.in.legacy b/Config.in.legacy index 5b48566f68..07be1dfaef 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -144,6 +144,721 @@ endif ############################################################################### +comment "Legacy options removed in 2023.02" + +config BR2_PACKAGE_DOCKER_PROXY + bool "docker-proxy removed" + select BR2_LEGACY + select BR2_PACKAGE_DOCKER_ENGINE + help + docker-proxy has been dropped by upstream since version + 563fe8. it has been merged into docker-engine (moby). + +config BR2_PACKAGE_PYTHON_BUNCH + bool "python-bunch removed" + select BR2_LEGACY + help + The python-bunch package is unmaintained and is replaced + by the python-munch package. + +config BR2_TARGET_GUMMIBOOT + bool "gummiboot removed" + select BR2_LEGACY + help + gummiboot has been deprecated since 2015, with no further + updates. It became integrated into the systemd project as + systemd-boot. + +config BR2_PACKAGE_IPUTILS_NINFOD + bool "iputils 20221126 removed ninfod" + select BR2_LEGACY + help + iputils 20221126 removed ninfod. + +config BR2_PACKAGE_IPUTILS_RARPD + bool "iputils 20221126 removed rarpd" + select BR2_LEGACY + help + iputils 20221126 removed rarpd. + +config BR2_PACKAGE_IPUTILS_RDISC + bool "iputils 20221126 removed rdisc" + select BR2_LEGACY + help + iputils 20221126 removed rdisc. + +config BR2_PACKAGE_IPUTILS_RDISC_SERVER + bool "iputils 20221126 removed rdisc" + select BR2_LEGACY + help + iputils 20221126 removed rdisc. + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_XINGMUX + bool "xingmux moved" + select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_XINGMUX + help + The xingmux option has been moved to gst1-plugins-good. + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE + bool "videoscale removed" + select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERTSCALE + help + The videoscale option has been combined with videoconvert. + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT + bool "videoconvert removed" + select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERTSCALE + help + The videoconvert option has been combined with videoscale. + +config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + bool "imx-gpu-viv X11 output has been removed" + select BR2_LEGACY + help + The X11 output was dropped by NXP. + +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX_VIV + bool "xf86-video-imx-viv has been removed" + select BR2_LEGACY + help + The X11 output was dropped by NXP. + +config BR2_PACKAGE_QEMU_CUSTOM_TARGETS + string "the QEMU specific targets option has been removed" + help + This option has been replaced by a list of individual targets + for the many architectures supported by QEMU. + +config BR2_PACKAGE_QEMU_CUSTOM_TARGETS_WRAP + bool + default y if BR2_PACKAGE_QEMU_CUSTOM_TARGETS != "" + select BR2_LEGACY + +config BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD + bool "xf86-input-keyboard removed" + select BR2_LEGACY + help + The X.org keyboard input driver no longer support Linux. + +config BR2_TARGET_SUN20I_D1_SPL + bool "sun20-d1-spl removed" + select BR2_LEGACY + help + U-Boot has gained SPL support for D1, so this temporary + bootloader is no longer supported. + +config BR2_PACKAGE_PYTHON_M2R + bool "python-m2r removed" + select BR2_LEGACY + help + The python-m2r package is unmaintained. + +config BR2_PACKAGE_MESA3D_XVMC + bool "mesa Gallium XvMC state tracker removed" + select BR2_LEGACY + help + The Gallium XvMC state tracker was removed upstream. + +config BR2_KERNEL_HEADERS_5_19 + bool "kernel headers version 5.19.x are no longer supported" + select BR2_LEGACY + help + Version 5.19.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TGA + bool "xf86-video-tga removed" + select BR2_LEGACY + help + The X.org xf86-video-tga package was removed. + +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLINT + bool "xf86-video-glint removed" + select BR2_LEGACY + help + The X.org xf86-video-glint package no longer builds with + Xserver 21 and is unmaintained. + +config BR2_PACKAGE_USBREDIR_SERVER + bool "usbredirserver removed" + select BR2_LEGACY + help + usbredirserver has been dropped by upstream since version + 0.13.0. usbredir tools (which include usbredirect binary) can + be used as a replacement. + +comment "Legacy options removed in 2022.11" + +config BR2_PACKAGE_RABBITMQ_SERVER + bool "rabbitmq-server removed" + select BR2_LEGACY + help + Package was removed because it was unmaintained and had + known security issues. + +config BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5 + bool "libopenssl rc5 was never enabled" + select BR2_LEGACY + help + The libopenssl option for rc5 never actually enabled rc5, + which had always been disabled in Buildroot. + +config BR2_PACKAGE_LIBDCADEC + bool "package was deprecated upstream, use ffmpeg instead" + select BR2_LEGACY + help + This decoder has been fully integrated into FFmpeg master + branch and further development will continue there. Using + FFmpeg for DTS decoding is now recommended. + +config BR2_KERNEL_HEADERS_5_17 + bool "kernel headers version 5.17.x are no longer supported" + select BR2_LEGACY + help + Version 5.17.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_iwmmxt + bool "ARM iwmmxt variant removed" + select BR2_LEGACY + help + Support for the ARM iwmmxt architecture variant in GCC has + bitroten and is no longer maintained. GCC maintainers + recommend to no longer use it, and suggest to use "xscale" + as a replacement architecture variant. See + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106972 + +config BR2_PACKAGE_UHD_N230 + bool "uhd N230 support removed" + select BR2_LEGACY + help + uhd N230 support has been dropped by upstream since version + 4.0.0.0. + +config BR2_PACKAGE_UHD_RFNOC + bool "uhd RFNoC support removed" + select BR2_LEGACY + help + uhd RFNoC support has been dropped by upstream since version + 4.0.0.0. + +config BR2_PACKAGE_GPSD_OLDSTYLE + bool "gpsd oldstyle removed" + select BR2_LEGACY + help + gpsd oldstyle option has been removed by upstream in 2015. + +config BR2_GDB_VERSION_9_2 + bool "gdb 9.2 removed" + select BR2_LEGACY + help + Support for GDB 9.2 has been removed. A new version has + automatically been selected. + +comment "Legacy options removed in 2022.08" + +config BR2_ECLIPSE_REGISTER + bool "Eclipse integration removed" + select BR2_LEGACY + help + The Buildroot integration with the Eclipse IDE has been + removed, as the corresponding Eclipse plugin is no longer + maintained, and is no longer usable with current versions of + Eclipse. + +config BR2_csky + bool "csky architecture removed" + select BR2_LEGACY + help + The csky architecture was removed, by lack of toolchain + support. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_I915 + bool "mesa DRI i915 driver removed" + select BR2_LEGACY + help + The DRI i915 driver was removed upstream. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965 + bool "mesa DRI i965 driver removed" + select BR2_LEGACY + help + The DRI i965 driver was removed upstream. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU + bool "mesa DRI nouveau driver removed" + select BR2_LEGACY + help + The DRI radeon nouveau was removed upstream. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON + bool "mesa DRI radeon r100 driver removed" + select BR2_LEGACY + help + The DRI radeon r100 driver was removed upstream. + +config BR2_GCC_VERSION_9_X + bool "gcc 9.x support removed" + select BR2_LEGACY + help + Support for gcc version 9.x has been removed. The current + default version (11.x or later) has been selected instead. + +config BR2_PACKAGE_PHP_EXT_WDDX + bool "php wddx removed" + select BR2_LEGACY + help + The WDDX extension was removed from php. + +config BR2_nds32 + bool "nds32 architecture removed" + select BR2_LEGACY + help + Support for the nds32 architecture has been removed, due to + its support being removed from the upstream Linux kernel, + and its lack of maintenance in Buildroot. + +config BR2_PACKAGE_RTL8723BS + bool "rtl8723bs removed" + select BR2_LEGACY + help + Package was removed because it is not compatible with latest + kernels and is not maintained anymore: code has been removed + in 2017 as driver is available in the linux-next tree. + +comment "Legacy options removed in 2022.05" + +config BR2_PACKAGE_KTAP + bool "ktap removed" + select BR2_LEGACY + help + Package was removed because it is not compatible with latest + kernels and is not maintained anymore (no release since 2013). + +config BR2_KERNEL_HEADERS_5_16 + bool "kernel headers version 5.16.x are no longer supported" + select BR2_LEGACY + help + Version 5.16.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_KERNEL_HEADERS_4_4 + bool "kernel headers version 4.4.x are no longer supported" + select BR2_LEGACY + help + Version 4.4.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_BINUTILS_VERSION_2_32_X + bool "binutils 2.32.x has been removed" + select BR2_LEGACY + help + binutils 2.32 has been removed, use a newer version. + +config BR2_sh2a + bool "sh2a architecture support removed" + select BR2_LEGACY + help + The SuperH 2A (SH2A) architecture was not maintained, and + broken, so its support was dropped. + +config BR2_BINUTILS_VERSION_2_35_X + bool "binutils 2.35.x has been removed" + select BR2_LEGACY + help + binutils 2.35 has been removed, use a newer version. + +config BR2_PACKAGE_BOOST_LAYOUT_TAGGED + bool "boost tagged layout removed" + select BR2_LEGACY + help + Boost tagged layout isn't handled by some packages (e.g. botan + or libcpprestsdk). + +config BR2_PACKAGE_BOOST_LAYOUT_VERSIONED + bool "boost versioned layout removed" + select BR2_LEGACY + help + Boost versioned layout isn't handled by a number of autotools + and cmake packages (e.g. azmq, cc-tool, i2pd). + +comment "Legacy options removed in 2022.02" + +config BR2_TARGET_ROOTFS_OCI_ENTRYPOINT_ARGS + string "entrypoint argumetns has been changed as command" + help + The OCI image BR2_TARGET_ROOTFS_OCI_ENTRYPOINT_ARGS option + has been renamed to BR2_TARGET_ROOTFS_OCI_CMD to better + reflect its relation to the actual 'command' of the OCI + image. + + The new semantic for BR2_TARGET_ROOTFS_OCI_CMD is slightly + differnt in relation to how it is interpreted, so be sure to + review the help entry for it. + + Due to this breaking change, the old value here could not be + set to the new variable. + +config BR2_TARGET_ROOTFS_OCI_ENTRYPOINT_ARGS_WRAP + bool + default y if BR2_TARGET_ROOTFS_OCI_ENTRYPOINT_ARGS != "" + select BR2_LEGACY + +config BR2_PACKAGE_LIBCURL_LIBNSS + bool "libcurl NSS removed" + select BR2_LEGACY + help + NSS was deprecated in libcurl 7.82.0. + +config BR2_PACKAGE_WESTON_DEFAULT_FBDEV + bool "weston fbdev removed" + select BR2_LEGACY + help + fbdev was deprecated in weston 10.0.0. + +config BR2_PACKAGE_WESTON_FBDEV + bool "weston fbdev compositor removed" + select BR2_LEGACY + help + fbdev compositor was deprecated in weston 10.0.0. + +config BR2_PACKAGE_PYTHON_PYCLI + bool "python-pycli removed" + select BR2_LEGACY + help + Package was removed because it is not compatible with python + 3.10 and is not maintained anymore (no release since 2012). + +config BR2_PACKAGE_LINUX_TOOLS_BPFTOOL + bool "bpftool was moved" + select BR2_LEGACY + select BR2_PACKAGE_BPFTOOL + help + The linux-tools bpftool build has been moved out + of the linux-tools package. + +config BR2_TARGET_UBOOT_NEEDS_PYTHON2 + bool "host-python 2.7 support for U-Boot was removed" + select BR2_LEGACY + help + Option was removed together with python 2.7 support. + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBMMS + bool "gst1-plugins-bad plugin libmms was removed" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_LEGACY + help + This plugin was removed with gst1-plugins-bad-1.20.0. + +config BR2_PACKAGE_PYTHON_FUNCTOOLS32 + bool "python-functools32 removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_ENUM34 + bool "python-enum34 removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_ENUM + bool "python-enum removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_DIALOG + bool "python-dialog removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_CONFIGOBJ + bool "python-configobj removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_YIELDFROM + bool "python-yieldfrom removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_TYPING + bool "python-typing removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_SUBPROCESS32 + bool "python-subprocess32 removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_SINGLEDISPATCH + bool "python-singledispatch removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_PYRO + bool "python-pyro removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_PYPCAP + bool "python-pypcap removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_PATHLIB2 + bool "python-pathlib2 removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_PAM + bool "python-pam removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_NFC + bool "python-nfc removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_MAD + bool "python-mad removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_IPADDRESS + bool "python-ipaddress removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_IPADDR + bool "python-ipaddr removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_ID3 + bool "python-id3 removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_FUTURES + bool "python-futures removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_BACKPORTS_SSL_MATCH_HOSTNAME + bool "python-backports-ssl-match-hostname removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_BACKPORTS_SHUTIL_GET_TERMINAL_SIZE + bool "python-backports-shutil-get-terminal-size removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON_BACKPORTS_ABC + bool "python-backports-abc removed" + select BR2_LEGACY + help + Package was removed together with python 2.7 support. + +config BR2_PACKAGE_PYTHON + bool "python2.7 package removed" + select BR2_LEGACY + help + Python 2.7 is EOL since April 2020 and has been removed. + + https://www.python.org/dev/peps/pep-0373/ + +config BR2_TARGET_UBOOT_ZYNQ_IMAGE + bool "Generate image for Xilinx Zynq" + select BR2_LEGACY + help + Since 2016.1, U-Boot can natively generate the Zynq boot + image, and so the Xilinx-specific format and tools have been + removed. Should you still have an older U-Boot that needs + this, a python3 version of the zynq-boot-bin.py script can be + downloaded from the URL below and called from a post-build + script. + + https://gist.githubusercontent.com/jameshilliard/e09235dfc6f96c11418a134e6ebf7890/raw/135b7480c405ae8a77a9db615e495f9a9f2d3242/zynq-boot-bin.py + +config BR2_PACKAGE_RPI_BT_FIRMWARE + bool "rpi-bt-firmware package was renamed" + depends on BR2_arm || BR2_aarch64 + select BR2_LEGACY + select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI + select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_BT + help + Package rpi-bt-firmware was moved as option to + package brcmfmac_sdio-firmware-rpi. + +config BR2_PACKAGE_RPI_WIFI_FIRMWARE + bool "rpi-wifi-firmware package was renamed" + depends on BR2_arm || BR2_aarch64 + select BR2_LEGACY + select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI + select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_WIFI + help + Package rpi-wifi-firmware was moved as option to + package brcmfmac_sdio-firmware-rpi. + +config BR2_PACKAGE_HOST_GDB_PYTHON + bool "GDB Python2 support removed" + select BR2_LEGACY + help + Python2 is deprecated and no longer supported. + Please migrate to Python3. + +config BR2_PACKAGE_GSTREAMER1_MM + bool "gstreamer1-mm package removed" + select BR2_LEGACY + help + This package has been removed as it is not actively + maintained anymore and does not support glibmm-2.68 API. + +config BR2_KERNEL_HEADERS_5_14 + bool "kernel headers version 5.14.x are no longer supported" + select BR2_LEGACY + help + Version 5.14.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_PACKAGE_PYTHON_BACKPORTS_FUNCTOOLS_LRU_CACHE + bool "python-backports-functools-lru-cache package removed" + select BR2_LEGACY + help + This package has been removed as python-setuptools-scm + dropped support of python 2 since version 6.0.0. + +config BR2_PACKAGE_CIVETWEB_WITH_LUA + bool "civetweb lua support option removed" + select BR2_LEGACY + help + Lua support does not depend on a version of Lua bundled + within the Civetweb sources anymore. Lua support is + automatically enabled if an Lua interpreter (lua or luajit) + is enabled in Buildroot. + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER + bool "sunxi-mali-mainline-driver package was renamed" + select BR2_LEGACY + select BR2_PACKAGE_SUNXI_MALI_UTGARD_DRIVER + help + Since the removal of the sunxi-mali-driver package, the + sunxi-mali-mainline-driver package that coexisted became the + only package to provide the Sunxi Mali driver. The "-mainline" + suffix being undescriptive nowadays and before adding new + packages bringing Mali support for other SoCs/GPU flavors, it + is clearer to rename it SUNXI_MALI_UTGARD_DRIVER. + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE + bool "sunxi-mali-mainline package was renamed" + select BR2_LEGACY + select BR2_PACKAGE_SUNXI_MALI_UTGARD + help + Since the removal of the sunxi-mali package, the + sunxi-mali-mainline package that coexisted became the only + package to provide Mali blobs. The "-mainline" suffix being + undescriptive nowadays and before adding new packages bringing + Mali support for other SoCs/GPU flavors, it is clearer to + rename it SUNXI_MALI_UTGARD. + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 + bool "sunxi-mali-mainline-r6p2 was renamed" + select BR2_LEGACY + help + The sunxi-mali-mainline package has been renamed + sunxi-mali-utgard, the suboptions of this package have also + been renamed accordingly. +# Note: BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 is still referenced from +# package/sunxi-mali-utgard/Config.in + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 + bool "sunxi-mali-mainline-r8p1 was renamed" + select BR2_LEGACY + help + The sunxi-mali-mainline package has been renamed + sunxi-mali-utgard, the suboptions of this package have also + been renamed accordingly. +# Note: BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 is still referenced from +# package/sunxi-mali-utgard/Config.in + +config BR2_PACKAGE_QT5WEBKIT_EXAMPLES + bool "qt5webkit-examples removed" + select BR2_LEGACY + help + The qt5webkit-examples package is unmaintained and has been + removed. + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_GLIBC_BLEEDING_EDGE + bool "Bootlin riscv64 glibc bleeding-edge toolchain removed" + select BR2_LEGACY + help + The RISC-V 64-bit LP64 Bootlin toolchains have been removed, + in favor of RISC-V 64-bit LP64D toolchains. + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_MUSL_BLEEDING_EDGE + bool "Bootlin riscv64 musl bleeding-edge toolchain removed" + select BR2_LEGACY + help + The RISC-V 64-bit LP64 Bootlin toolchains have been removed, + in favor of RISC-V 64-bit LP64D toolchains. + +config BR2_PACKAGE_IPUTILS_TFTPD + bool "iputils tftpd option removed" + select BR2_LEGACY + help + tftpd has been removed from iputils since version 20211215. + +config BR2_PACKAGE_IPUTILS_TRACEROUTE6 + bool "iputils traceroute6 option removed" + select BR2_LEGACY + help + traceroute6 has been removed from iputils since version + 20211215. + +config BR2_PACKAGE_LIBMEDIAART_BACKEND_NONE + bool "libmediaart 'none' backend removed" + select BR2_LEGACY + help + 'none' backend has been removed from libmediaart since version + 1.9.5. + +config BR2_PACKAGE_MPD_UPNP + bool "MPD UPnP configuration changed" + select BR2_LEGACY + help + From version 0.23, MPD supports npupnp in addition to pupnp to + provide database access to a UPnP media server. To preserve + the existing functionality, the pupnp option has been selected + in the MPD UPnP configuration. +# Note: BR2_PACKAGE_MPD_UPNP is still referenced from package/mpd/Config.in + comment "Legacy options removed in 2021.11" config BR2_OPENJDK_VERSION_LTS diff --git a/DEVELOPERS b/DEVELOPERS index 88c75aef26..9e12d97b0c 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -35,6 +35,7 @@ F: package/bubblewrap/ F: package/cage/ F: package/cog/ F: package/libepoxy/ +F: package/libmanette/ F: package/libpsl/ F: package/libwpe/ F: package/webkitgtk/ @@ -90,6 +91,9 @@ F: package/minimodem/ N: Alexander Lukichev F: package/openpgm/ +N: Aleksandr Makarov +F: package/libest/ + N: Alexander Mukhin F: package/tinyproxy/ @@ -110,6 +114,9 @@ N: Alexey Brodkin F: board/cubietech/cubieboard2/ F: configs/cubieboard2_defconfig +N: Alexey Lukyanchuk +F: package/zabbix/ + N: Alistair Francis F: board/sifive/ F: boot/opensbi/ @@ -121,23 +128,23 @@ F: package/dcron/ F: package/libxmlrpc/ F: package/python-docopt/ -N: Anders Darander -F: package/ktap/ +N: Anand Gadiyar +F: boot/ti-k3-r5-loader/ N: André Zwing F: package/libkrb5/ -F: package/openal/ F: package/p7zip/ F: package/wine/ N: Andreas Klinger F: package/ply/ +N: Andreas Ziegler +F: package/mpd/ + N: Andrey Smirnov -F: package/python-backports-shutil-get-terminal-size/ F: package/python-decorator/ F: package/python-ipython-genutils/ -F: package/python-pathlib2/ F: package/python-pickleshare/ F: package/python-scandir/ F: package/python-simplegeneric/ @@ -149,6 +156,9 @@ N: Andrey Yurovsky F: package/rauc/ N: Angelo Compagnucci +F: board/sipeed/lichee_rv/ +F: board/sipeed/lichee_rv_dock/ +F: configs/sipeed_lichee_rv* F: package/apparmor/ F: package/corkscrew/ F: package/cups/ @@ -160,6 +170,7 @@ F: package/i2c-tools/ F: package/jq/ F: package/libapparmor/ F: package/libb64/ +F: package/libdill/ F: package/mender/ F: package/mender-artifact/ F: package/mono/ @@ -167,6 +178,7 @@ F: package/mono-gtksharp3/ F: package/monolite/ F: package/openjpeg/ F: package/python-can/ +F: package/python-minimalmodbus/ F: package/python-pillow/ F: package/python-pydal/ F: package/python-spidev/ @@ -174,6 +186,8 @@ F: package/python-web2py/ F: package/qt5/qt5coap/ F: package/qt5/qt5knx/ F: package/qt5/qt5mqtt/ +F: package/rtl8723ds/ +F: package/rtl8723ds-bt/ F: package/sam-ba/ F: package/sshguard/ F: package/sunwait/ @@ -512,10 +526,14 @@ F: package/batman-adv/ F: package/containerd/ F: package/delve/ F: package/docker-cli/ +F: package/docker-compose/ F: package/docker-engine/ -F: package/docker-proxy/ +F: package/embiggen-disk/ F: package/fuse-overlayfs/ F: package/go/ +F: package/go-bootstrap-stage1/ +F: package/go-bootstrap-stage2/ +F: package/gocryptfs/ F: package/mbpfan/ F: package/mosh/ F: package/pkg-golang.mk diff --git a/README.md b/README.md index 22f6fe2a88..26e62268da 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,10 @@ -# What's thingOS? +[![Actions Status](https://github.com/qtoggle/qtoggleserver/workflows/Main/badge.svg)](https://github.com/qtoggle/qtoggleserver/actions) +[![Join us on Discord](https://img.shields.io/discord/742719160865521714)](https://discord.gg/wwYn3jJNPM) +[![Join us on Facebook](https://img.shields.io/badge/chat-facebook-blue)](http://facebook.com/qtoggle) -**thingOS** is a highly customized [BuildRoot](https://buildroot.uclibc.org) that serves as a base for IoT dedicated operating systems. If you want to turn your Raspberry PI board into something that controls your lights, doors, sprinklers or other devices, by designing your own "firmware", thingOS may be a good choice. +--- -# Philosophy -**thingOS** aims to make the development of small dedicated Linux-based OSes an easy task. Deployment, over-the-air updates and backups shouldn't be a pain in the ass. Developers should concentrate on their main goal rather than removing unused packages and services from existing OSes to lighten them up, taking care of network connection reliability or enabling the watchdog. +**qToggleOS** is a lightweight OS that transforms a Raspberry Pi board into a [qToggle](https://github.com/qtoggle/docs) device. -**thingOS** tries to boot as fast as possible. Whenever something goes wrong, we prefer to reboot the system instead of trying to run complex recovery procedures. - -**thingOS** doesn't reinvent the wheel. It uses the amazing infrastructure provided by BuildRoot but comes with customized configurations and init scripts for the supported hardware platforms. - -# Features - - * support for popular single-board computers (see [Supported Single-board Computers](https://github.com/ccrisan/thingos/wiki/Supported-Single-board-Computers)) - * quick boots (see [Boot Process](https://github.com/ccrisan/thingos/wiki/Boot-Process)) - * read-only partitions to minimize corruption risks (see [Partitions](https://github.com/ccrisan/thingos/wiki/Partitions)) - * simple configuration via text files (see [OS Configuration](https://github.com/ccrisan/thingos/wiki/OS-Configuration)) - * over-the-air "firmware" updates (see [Firmware Updates](https://github.com/ccrisan/thingos/wiki/Firmware-Updates)) - * out-of-the box backup and restore mechanism (see [Backup/Restore](https://github.com/ccrisan/thingos/wiki/Backup-Restore)) - * high reliability (see [Reliability](https://github.com/ccrisan/thingos/wiki/Reliability)) - * everything that [BuildRoot](https://buildroot.uclibc.org) has to offer - -# Getting Started - -Just follow the [Getting Started](https://github.com/ccrisan/thingos/wiki/Getting-Started) guide. - -# Supported Boards - -Here's a list of [Supported Single-board Computers](https://github.com/ccrisan/thingos/wiki/Supported-Single-board-Computers). - -# Documentation - -Feel free to browse the [wiki articles](https://github.com/ccrisan/thingos/wiki). +Check out the [Installation](https://github.com/qtoggle/qtoggleos/wiki/Installation) instructions to get started. diff --git a/board/common/cleanup.sh b/board/common/cleanup.sh index 2aa32248bc..d7bc406484 100755 --- a/board/common/cleanup.sh +++ b/board/common/cleanup.sh @@ -199,6 +199,7 @@ rm -f ${TARGET}/etc/init.d/S21rngd rm -f ${TARGET}/etc/init.d/S30cgroupfs rm -f ${TARGET}/etc/init.d/S35iptables rm -f ${TARGET}/etc/init.d/S40bluetooth +rm -f ${TARGET}/etc/init.d/S40bluetoothd rm -f ${TARGET}/etc/init.d/S45connman rm -f ${TARGET}/etc/init.d/S48sntp rm -f ${TARGET}/etc/init.d/S49ntp diff --git a/board/common/overlay-initramfs/init b/board/common/overlay-initramfs/init index 46f3268a28..ac8c4214a9 100755 --- a/board/common/overlay-initramfs/init +++ b/board/common/overlay-initramfs/init @@ -13,13 +13,15 @@ mount -t proc proc /proc ROOT_DEV=$(cat /proc/cmdline | grep -oE 'root=[/a-z0-9]+' | cut -d '=' -f 2) if echo ${ROOT_DEV:-2} | grep -E 'p[0-9]' &>/dev/null; then # e.g. /dev/mmcblk0p2 - DISK_DEV=${ROOT_DEV:0:$((${#ROOT_DEV}-2))} - BOOT_DEV=${DISK_DEV}p1 - DATA_DEV=${DISK_DEV}p3 + ROOT_PART_NO=$(echo ${ROOT_DEV} | grep -oE '[0-9]$') + DISK_DEV=${ROOT_DEV:0:$(( ${#ROOT_DEV} - 2 ))} + BOOT_DEV=${DISK_DEV}p$(( ROOT_PART_NO - 1 )) + DATA_DEV=${DISK_DEV}p$(( ROOT_PART_NO + 1 )) else # e.g. /dev/sdc2 - DISK_DEV=${ROOT_DEV:0:$((${#ROOT_DEV}-1))} - BOOT_DEV=${DISK_DEV}1 - DATA_DEV=${DISK_DEV}3 + ROOT_PART_NO=$(echo ${ROOT_DEV} | grep -oE '[0-9]$') + DISK_DEV=${ROOT_DEV:0:$(( ${#ROOT_DEV} - 1 ))} + BOOT_DEV=${DISK_DEV}$(( ROOT_PART_NO - 1 )) + DATA_DEV=${DISK_DEV}$(( ROOT_PART_NO + 1 )) fi msg "Waiting for sdcard" diff --git a/board/common/overlay/etc/bluetooth.conf b/board/common/overlay/etc/bluetooth.conf new file mode 100644 index 0000000000..1cb660ff8b --- /dev/null +++ b/board/common/overlay/etc/bluetooth.conf @@ -0,0 +1,4 @@ +[General] + +[Policy] +AutoEnable = true diff --git a/board/common/overlay/etc/captive-portal.conf b/board/common/overlay/etc/captive-portal.conf index 02ecd7654c..0e50a00fd4 100644 --- a/board/common/overlay/etc/captive-portal.conf +++ b/board/common/overlay/etc/captive-portal.conf @@ -1,9 +1,9 @@ -CAPTIVE_PORTAL_ENABLED=false -CAPTIVE_PORTAL_TIMEOUT=0 -CAPTIVE_PORTAL_TIMEOUT_REBOOT=false -CAPTIVE_PORTAL_CONFIGURED_CMD= +CAPTIVE_PORTAL_ENABLED=true +CAPTIVE_PORTAL_TIMEOUT=120 +CAPTIVE_PORTAL_TIMEOUT_REBOOT=true +CAPTIVE_PORTAL_CONFIGURED_CMD="ip route | grep -q default" CAPTIVE_PORTAL_START_GPIO= -CAPTIVE_PORTAL_START_INPUT= +CAPTIVE_PORTAL_START_INPUT=${OS_FACTORY_RESET_INPUT} CAPTIVE_PORTAL_START_LEVEL=1 CAPTIVE_PORTAL_START_HOLD_SECONDS=5 diff --git a/board/common/overlay/etc/dnsmasq.conf b/board/common/overlay/etc/dnsmasq.conf new file mode 100644 index 0000000000..44b86ce9e7 --- /dev/null +++ b/board/common/overlay/etc/dnsmasq.conf @@ -0,0 +1,3 @@ +interface=${OS_AP} +dhcp-range=192.168.27.50,192.168.27.150,24h +dhcp-leasefile=/var/lib/dnsmasq.leases diff --git a/board/common/overlay/etc/docker-compose.env b/board/common/overlay/etc/docker-compose.env new file mode 100644 index 0000000000..3d3d5e39cb --- /dev/null +++ b/board/common/overlay/etc/docker-compose.env @@ -0,0 +1,2 @@ +QTOGGLESERVER_VERSION=0.28.0b6 + diff --git a/board/common/overlay/etc/docker-compose.yml b/board/common/overlay/etc/docker-compose.yml new file mode 100644 index 0000000000..96ba8f8f86 --- /dev/null +++ b/board/common/overlay/etc/docker-compose.yml @@ -0,0 +1,12 @@ +services: + qtoggleserver: + image: qtoggle/qtoggleserver:${QTOGGLESERVER_VERSION} + hostname: qtoggleserver + restart: unless-stopped + network_mode: host + uts: host + privileged: true + volumes: + - /data/qtoggleserver:/data + - /etc/qtoggleserver.conf.default:/usr/share/qtoggleserver/qtoggleserver.conf.sample + - /:/host diff --git a/board/common/overlay/etc/fstab.disk b/board/common/overlay/etc/fstab.disk index a5e08129a4..6c5c5d518a 100644 --- a/board/common/overlay/etc/fstab.disk +++ b/board/common/overlay/etc/fstab.disk @@ -1,3 +1,3 @@ # -${disk_dev_prefix}1 /boot vfat ro,defaults 0 0 -${disk_dev_prefix}3 /data ext4 defaults,noatime 0 0 +${boot_dev} /boot vfat ro,defaults 0 0 +${data_dev} /data ext4 defaults,noatime 0 0 diff --git a/board/common/overlay/etc/hostapd.conf b/board/common/overlay/etc/hostapd.conf new file mode 100644 index 0000000000..3383f95bcb --- /dev/null +++ b/board/common/overlay/etc/hostapd.conf @@ -0,0 +1,10 @@ +ssid=${OS_PREFIX}-${BOARD_SN} +wpa_passphrase=12345678 +wpa=2 +wpa_key_mgmt=WPA-PSK +interface=${OS_AP} +channel=1 +driver=nl80211 +hw_mode=g +ieee80211n=1 +ieee80211ac=1 diff --git a/board/common/overlay/etc/init.d/S00datapart b/board/common/overlay/etc/init.d/S00datapart index 4dd38091b7..6a5011f972 100755 --- a/board/common/overlay/etc/init.d/S00datapart +++ b/board/common/overlay/etc/init.d/S00datapart @@ -12,22 +12,26 @@ case "$1" in if [[ "${root_dev}" =~ ^([/a-z0-9]+)(p[0-9])$ ]]; then # e.g. /dev/mmcblk0p2 disk_dev=${BASH_REMATCH[1]} disk_dev_prefix=${disk_dev}p - boot_dev=${disk_dev}p1 - root_dev=${disk_dev}p2 - data_dev=${disk_dev}p3 + root_part_no=$(echo ${root_dev} | grep -oE '[0-9]$') + boot_dev=${disk_dev}p$(( root_part_no - 1 )) + data_dev=${disk_dev}p$(( root_part_no + 1 )) elif [[ "${root_dev}" =~ ^([/a-z0-9]+)([0-9])$ ]]; then # e.g. /dev/sdc2 disk_dev=${BASH_REMATCH[1]} disk_dev_prefix=${disk_dev} - boot_dev=${disk_dev}1 - root_dev=${disk_dev}2 - data_dev=${disk_dev}3 + root_part_no=$(echo ${root_dev} | grep -oE '[0-9]$') + boot_dev=${disk_dev}$(( root_part_no - 1 )) + data_dev=${disk_dev}$(( root_part_no + 1 )) else msg_fail "unknown (${root_dev})" exit 1 fi + part_table_type=$(fdisk -l ${disk_dev} | grep Disklabel | tr -d ' ' | cut -d : -f 2) for ext in disk extra overlay; do sed "s,"'${disk_dev_prefix}'",${disk_dev_prefix},g" /etc/fstab.${ext} > /tmp/fstab.${ext} + sed -i "s,"'${boot_dev}'",${boot_dev},g" /tmp/fstab.${ext} + sed -i "s,"'${root_dev}'",${root_dev},g" /tmp/fstab.${ext} + sed -i "s,"'${data_dev}'",${data_dev},g" /tmp/fstab.${ext} done # Output disk info to /tmp/disk_info @@ -37,6 +41,7 @@ case "$1" in echo "BOOT_DEV=${boot_dev}" echo "ROOT_DEV=${root_dev}" echo "DATA_DEV=${data_dev}" + echo "PART_TABLE_TYPE=${part_table_type}" } > /tmp/disk_info msg_done "${disk_dev}" @@ -62,7 +67,7 @@ case "$1" in data_start=$((DATA_OFFS * 2048)) echo -e "n p - 3 + $(( root_part_no + 1 )) ${data_start} \n w" | /sbin/fdisk ${disk_dev} &>/dev/null diff --git a/board/common/overlay/etc/init.d/S01toemmc b/board/common/overlay/etc/init.d/S01toemmc index 670bc044d6..5c4f129cbc 100755 --- a/board/common/overlay/etc/init.d/S01toemmc +++ b/board/common/overlay/etc/init.d/S01toemmc @@ -3,7 +3,7 @@ TOEMMC_PROG="/sbin/toemmc" TOEMMC_CONF="/boot/toemmc.conf" -test -s ${TOEMMC_CONF} || exit 0 +test -s "${TOEMMC_CONF}" || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base diff --git a/board/common/overlay/etc/init.d/S05cpufreq b/board/common/overlay/etc/init.d/S05cpufreq index 84e31fa53c..679ba74e22 100755 --- a/board/common/overlay/etc/init.d/S05cpufreq +++ b/board/common/overlay/etc/init.d/S05cpufreq @@ -18,9 +18,9 @@ test -d "${CPU_FREQ_DIR}" && test -d "${GOVERNOR_DIR}" || exit 0 # no CPU freq test -n "${OS_VERSION}" || source /etc/init.d/base configure() { - test -s ${SYS_CONF} && source ${SYS_CONF} - test -s ${BOOT_CONF} && source ${BOOT_CONF} - test -s ${CONF} && source ${CONF} + test -s "${SYS_CONF}" && source "${SYS_CONF}" + test -s "${BOOT_CONF}" && source "${BOOT_CONF}" + test -s "${CONF}" && source "${CONF}" echo ${CPU_FREQ_GOVERNOR} > ${CPU_FREQ_DIR}/scaling_governor if [[ ${CPU_FREQ_GOVERNOR} == "ondemand" ]]; then diff --git a/board/common/overlay/etc/init.d/S10sysctl b/board/common/overlay/etc/init.d/S10sysctl index 09e845f7a9..222413b639 100755 --- a/board/common/overlay/etc/init.d/S10sysctl +++ b/board/common/overlay/etc/init.d/S10sysctl @@ -19,14 +19,14 @@ case "$1" in start) if [[ -f ${FIRST_RUN_FILE} ]]; then msg_begin "Applying sysctl parameters (final)" - test -s ${SYS_CONF} && sysctl -q -p ${SYS_CONF} - test -s ${CONF} && sysctl -q -p ${CONF} - test -s ${BOOT_CONF} && sysctl -q -p ${BOOT_CONF} + test -s "${SYS_CONF}" && sysctl -q -p ${SYS_CONF} + test -s "${CONF}" && sysctl -q -p ${CONF} + test -s "${BOOT_CONF}" && sysctl -q -p ${BOOT_CONF} else msg_begin "Applying sysctl parameters" - test -s ${SYS_CONF} && sysctl -e -q -p ${SYS_CONF} - test -s ${CONF} && sysctl -e -q -p ${CONF} - test -s ${BOOT_CONF} && sysctl -e -q -p ${BOOT_CONF} + test -s "${SYS_CONF}" && sysctl -e -q -p ${SYS_CONF} + test -s "${CONF}" && sysctl -e -q -p ${CONF} + test -s "${BOOT_CONF}" && sysctl -e -q -p ${BOOT_CONF} touch ${FIRST_RUN_FILE} fi msg_done diff --git a/board/common/overlay/etc/init.d/S12udev b/board/common/overlay/etc/init.d/S12udev index cfd16b2745..9ea9d77860 100755 --- a/board/common/overlay/etc/init.d/S12udev +++ b/board/common/overlay/etc/init.d/S12udev @@ -10,7 +10,7 @@ test -s ${CONF} || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base -source ${CONF} +source "${CONF}" start() { diff --git a/board/common/overlay/etc/init.d/S13btuart b/board/common/overlay/etc/init.d/S13btuart index 1f803bd28d..381832bac5 100755 --- a/board/common/overlay/etc/init.d/S13btuart +++ b/board/common/overlay/etc/init.d/S13btuart @@ -9,13 +9,13 @@ LOG="/var/log/btuart.log" test -f ${CONF} || test -f ${BOOT_CONF} || test -f ${SYS_CONF} || exit 0 # Bluetooth explicitly disabled by empty bluetooth.conf -test -f ${CONF} && ! test -s ${CONF} && exit 0 +test -f ${CONF} && ! test -s "${CONF}" && exit 0 -test -s ${PLATFORM_BTUART} || exit 0 +test -s "${PLATFORM_BTUART}" || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base -source ${PLATFORM_BTUART} +source "${PLATFORM_BTUART}" case "$1" in start) diff --git a/board/common/overlay/etc/init.d/S13watchdog b/board/common/overlay/etc/init.d/S13watchdog index 0244c44e6e..a7abb1a7f3 100755 --- a/board/common/overlay/etc/init.d/S13watchdog +++ b/board/common/overlay/etc/init.d/S13watchdog @@ -17,9 +17,9 @@ USER_CHECK="/data/etc/watchdog-check" CHECK_LOG="/var/log/watchdog-check.log" CHECK_INTERVAL=10 -test -s ${SYS_CONF} && source ${SYS_CONF} -test -s ${USER_CONF} && source ${USER_CONF} -test -s ${BOOT_CONF} && source ${BOOT_CONF} +test -s "${SYS_CONF}" && source "${SYS_CONF}" +test -s "${USER_CONF}" && source "${USER_CONF}" +test -s "${BOOT_CONF}" && source "${BOOT_CONF}" test -n "${OS_VERSION}" || source /etc/init.d/base diff --git a/board/common/overlay/etc/init.d/S30dbus b/board/common/overlay/etc/init.d/S30dbus index 848e088891..ed41c79e76 100755 --- a/board/common/overlay/etc/init.d/S30dbus +++ b/board/common/overlay/etc/init.d/S30dbus @@ -13,7 +13,7 @@ PROG_UA="/usr/bin/udevadm" test -x ${PROG} || exit 0 # dbus is currently only used by bluez and connman -test -s ${BTCONF} || test -s ${BOOT_BTCONF} || test -s ${SYS_BTCONF} || test -s ${CMCONF} || exit 0 +test -s "${BTCONF}" || test -s "${BOOT_BTCONF}" || test -s "${SYS_BTCONF}" || test -s "${CMCONF}" || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base diff --git a/board/common/overlay/etc/init.d/S31ifalias b/board/common/overlay/etc/init.d/S31ifalias index 557e6cd5a1..5ba11f5631 100755 --- a/board/common/overlay/etc/init.d/S31ifalias +++ b/board/common/overlay/etc/init.d/S31ifalias @@ -9,9 +9,9 @@ test -n "${OS_VERSION}" || source /etc/init.d/base start() { msg_begin "Renaming network interfaces" - test -s ${SYS_CONF} && source ${SYS_CONF} - test -s ${CONF} && source ${CONF} - test -s ${BOOT_CONF} && source ${BOOT_CONF} + test -s "${SYS_CONF}" && source "${SYS_CONF}" + test -s "${CONF}" && source "${CONF}" + test -s "${BOOT_CONF}" && source "${BOOT_CONF}" ifaces=$(ls /sys/class/net 2>/dev/null) test -z "${ifaces}" && return diff --git a/board/common/overlay/etc/init.d/S35wifi b/board/common/overlay/etc/init.d/S35wifi index 493785cd00..5d97b9aed5 100755 --- a/board/common/overlay/etc/init.d/S35wifi +++ b/board/common/overlay/etc/init.d/S35wifi @@ -19,7 +19,7 @@ CONNMAN_CONF="/etc/connman/main.conf" test -x ${PROG} || exit 0 -test -s ${CONNMAN_CONF} && exit 0 +test -s "${CONNMAN_CONF}" && exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base @@ -27,7 +27,7 @@ source ${NETWATCH_CONF} prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF} prepare_conf ${CONF1} ${SYS_CONF1} ${BOOT_CONF1} -test -s ${CONF} || test -s ${CONF1} || exit 0 +test -s "${CONF}" || test -s "${CONF1}" || exit 0 test -n "${OS_WLAN}" && ssid=$(cat ${CONF} 2>/dev/null | grep ssid | grep -v scan_ssid | cut -d '"' -f 2) test -n "${OS_WLAN1}" && ssid1=$(cat ${CONF1} 2>/dev/null | grep ssid | grep -v scan_ssid | cut -d '"' -f 2) diff --git a/board/common/overlay/etc/init.d/S36ppp b/board/common/overlay/etc/init.d/S36ppp index b7edb7b997..dee69b76f6 100755 --- a/board/common/overlay/etc/init.d/S36ppp +++ b/board/common/overlay/etc/init.d/S36ppp @@ -13,7 +13,7 @@ CONNMAN_CONF="/etc/connman/main.conf" test -x ${PROG} || exit 0 -test -s ${CONNMAN_CONF} && exit 0 +test -s "${CONNMAN_CONF}" && exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base diff --git a/board/common/overlay/etc/init.d/S37bluetooth b/board/common/overlay/etc/init.d/S37bluetooth index 4c7417ccd3..c40ae0677b 100755 --- a/board/common/overlay/etc/init.d/S37bluetooth +++ b/board/common/overlay/etc/init.d/S37bluetooth @@ -21,7 +21,7 @@ test -x ${PROG} || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF} -test -s ${CONF} || exit 0 +test -s "${CONF}" || exit 0 function configure() { diff --git a/board/common/overlay/etc/init.d/S40network b/board/common/overlay/etc/init.d/S40network index 501ac4c161..4b581f3b82 100755 --- a/board/common/overlay/etc/init.d/S40network +++ b/board/common/overlay/etc/init.d/S40network @@ -17,7 +17,7 @@ CONNMAN_CONF="/etc/connman/main.conf" LINK_NEGO_TIMEOUT=10 -test -s ${CONNMAN_CONF} && exit 0 +test -s "${CONNMAN_CONF}" && exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base @@ -126,7 +126,7 @@ function start_eth() { # wait for driver w=3 count=0 - while ! ifconfig ${OS_ETH} >/dev/null 2>&1; do + while ! ifconfig ${OS_ETH} up >/dev/null 2>&1; do sleep 1 count=$((${count} + 1)) if [[ ${count} -ge ${w} ]]; then @@ -135,9 +135,6 @@ function start_eth() { fi done - # bring it up - ifconfig ${OS_ETH} up - # wait for link test "${LINK_WATCH}" == "true" || LINK_NEGO_TIMEOUT=5 count=0 diff --git a/board/common/overlay/etc/init.d/S41netwatch b/board/common/overlay/etc/init.d/S41netwatch index b26a327e34..3f932fcde7 100755 --- a/board/common/overlay/etc/init.d/S41netwatch +++ b/board/common/overlay/etc/init.d/S41netwatch @@ -3,9 +3,9 @@ CONF="/etc/netwatch.conf" CP_CONF="/etc/captive-portal.conf" -test -s ${CONF} || exit 0 -source ${CONF} -source ${CP_CONF} +test -s "${CONF}" || exit 0 +source "${CONF}" +source "${CP_CONF}" test -n "${OS_VERSION}" || source /etc/init.d/base diff --git a/board/common/overlay/etc/init.d/S42connman b/board/common/overlay/etc/init.d/S42connman index ed6a94e0d3..64a483c7e7 100755 --- a/board/common/overlay/etc/init.d/S42connman +++ b/board/common/overlay/etc/init.d/S42connman @@ -13,7 +13,7 @@ ONLINE_HANDLER_SCRIPT="/usr/libexec/connman-online-handler" test -x ${PROG} || exit 0 -test -s ${CONF} || exit 0 +test -s "${CONF}" || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base diff --git a/board/common/overlay/etc/init.d/S43firewall b/board/common/overlay/etc/init.d/S43firewall index 10d657daaa..83e5f509d9 100755 --- a/board/common/overlay/etc/init.d/S43firewall +++ b/board/common/overlay/etc/init.d/S43firewall @@ -7,7 +7,7 @@ BOOT_CONF="/boot/firewall.sh" test -n "${OS_VERSION}" || source /etc/init.d/base -test -s ${SYS_CONF} || test -s ${USER_CONF} || test -s ${BOOT_CONF} || exit 0 +test -s "${SYS_CONF}" || test -s "${USER_CONF}" || test -s "${BOOT_CONF}" || exit 0 start() { diff --git a/board/common/overlay/etc/init.d/S44hostapd b/board/common/overlay/etc/init.d/S44hostapd index 9488025be4..db91a5fb6f 100755 --- a/board/common/overlay/etc/init.d/S44hostapd +++ b/board/common/overlay/etc/init.d/S44hostapd @@ -118,7 +118,7 @@ function configure_ifaces() { function assign_iface_ip() { hostapd_conf=/var/run/hostapd.conf - test -s ${DNSMASQ_CONF} || return + test -s "${DNSMASQ_CONF}" || return dnsmasq_ip=$(cat ${DNSMASQ_CONF} | grep range | cut -d '=' -f 2 | cut -d '.' -f 1,2,3).1 dnsmasq_iface=$(cat ${DNSMASQ_CONF} | grep interface | cut -d '=' -f 2) hostapd_iface=$(cat ${hostapd_conf} | grep interface | cut -d '=' -f 2) diff --git a/board/common/overlay/etc/init.d/S50date b/board/common/overlay/etc/init.d/S50date index 33aa81608b..3032228118 100755 --- a/board/common/overlay/etc/init.d/S50date +++ b/board/common/overlay/etc/init.d/S50date @@ -21,7 +21,7 @@ test -n "${OS_VERSION}" || source /etc/init.d/base prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF} prepare_conf ${NTP_CONF} ${SYS_NTP_CONF} ${BOOT_NTP_CONF} -test -s ${CONF} || exit 0 +test -s "${CONF}" || exit 0 test "${OS_NETWORKLESS}" == "true" && exit 0 @@ -66,8 +66,15 @@ set_current_date_ntp() { set_current_date_sntp() { sntp_args="-t ${DATE_TIMEOUT} -K /dev/null -Ss" server=$(cat ${NTP_CONF} | grep pool | head -n 1 | cut -d ' ' -f 2) - ${PROG_SNTP} ${sntp_args} ${server} &>${LOG_SNTP} - if [[ $? == 0 ]]; then + + # Retry command 3 times + truncate -s0 ${LOG_SNTP} + ok=false + for (( i = 0; i < 3; i++ )); do + ${PROG_SNTP} ${sntp_args} ${server} &>>${LOG_SNTP} && { ok=true; break; } + sleep 1 + done + if [[ ${ok} == true ]]; then logger -t date "current system date/time set to $(date) via SNTP" return 0 else @@ -133,7 +140,7 @@ stop_ntp() { start() { # Load saved date first - test -s ${SAVED_DATE_FILE} && date -s $(cat ${SAVED_DATE_FILE}) -D%s >/dev/null + test -s "${SAVED_DATE_FILE}" && date -s $(cat "${SAVED_DATE_FILE}") -D%s >/dev/null if [[ "${DATE_METHOD}" == "http" ]]; then start_http diff --git a/board/common/overlay/etc/init.d/S56cloudflared b/board/common/overlay/etc/init.d/S56cloudflared new file mode 100644 index 0000000000..d68536dd2a --- /dev/null +++ b/board/common/overlay/etc/init.d/S56cloudflared @@ -0,0 +1,89 @@ +#!/bin/bash + +SYS_CONF="/etc/cloudflared.conf" +BOOT_CONF="/boot/cloudflared.conf" +CONF="/data/etc/cloudflared.conf" + +LOG="/var/log/cloudflared.log" + +PROG_COMPRESSED=/usr/libexec/cloudflared.xz +PROG=/var/lib/cloudflared + +NETWATCH_CONF="/etc/netwatch.conf" + +test -s ${PROG_COMPRESSED} || exit 0 + +test -s ${SYS_CONF} || test -s ${BOOT_CONF} || test -s ${CONF} || exit 0 +test -s ${SYS_CONF} && source ${SYS_CONF} +test -s ${BOOT_CONF} && source ${BOOT_CONF} +test -s ${CONF} && source ${CONF} + +test -n "${OS_VERSION}" || source /etc/init.d/base + +source ${NETWATCH_CONF} + + +running() { + killall -0 cloudflared &> /dev/null +} + +watch() { + sleep ${NET_WATCH_DELAY} + + count=0 + NET_WATCH_RETRIES=$((${NET_WATCH_RETRIES} - 1)) + while true; do + sleep ${NET_WATCH_INTERVAL} + if running; then + count=0 + else + if [[ ${count} -lt ${NET_WATCH_RETRIES} ]]; then + logger -t cloudflared "dead" + count=$((${count} + 1)) + continue + else + panic action cloudflared "service dead" + break + fi + fi + done +} + +start() { + msg_begin "Starting cloudflared" + unxz -k -c "${PROG_COMPRESSED}" > "${PROG}" + chmod +x "${PROG}" + + ${PROG} --loglevel info tunnel run --token ${CLOUDFLARED_TOKEN} ${CLOUDFLARED_TUNNEL} &>>${LOG} & + test $? == 0 && msg_done || msg_fail + + if [[ "${LINK_WATCH}" == "true" ]]; then + watch & + fi +} + +stop() { + msg_begin "Stopping cloudflared" + killall $(basename ${PROG}) &>/dev/null + ps | grep $(basename ${PROG}) | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + msg_done +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/board/common/overlay/etc/init.d/S60sshd b/board/common/overlay/etc/init.d/S60sshd index cfa2a36b74..a9970d17a4 100755 --- a/board/common/overlay/etc/init.d/S60sshd +++ b/board/common/overlay/etc/init.d/S60sshd @@ -16,7 +16,7 @@ test -x ${PROG} || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base -test -s ${SYS_CONF} || exit 0 +test -s "${SYS_CONF}" || exit 0 start() { diff --git a/board/common/overlay/etc/init.d/S61proftpd b/board/common/overlay/etc/init.d/S61proftpd index 445a6dda05..cb87e9b149 100755 --- a/board/common/overlay/etc/init.d/S61proftpd +++ b/board/common/overlay/etc/init.d/S61proftpd @@ -9,7 +9,7 @@ test -x ${PROG} || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base test -n "${OS_DEBUG}" || source /etc/init.d/conf -test -s ${CONF} || exit 0 +test -s "${CONF}" || exit 0 start() { diff --git a/board/common/overlay/etc/init.d/S62smb b/board/common/overlay/etc/init.d/S62smb index 2f87a46b7a..07c8a23788 100755 --- a/board/common/overlay/etc/init.d/S62smb +++ b/board/common/overlay/etc/init.d/S62smb @@ -11,7 +11,7 @@ test -x ${PROG} || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base test -n "${OS_DEBUG}" || source /etc/init.d/conf -test -s ${CONF} || exit 0 +test -s "${CONF}" || exit 0 start() { diff --git a/board/common/overlay/etc/init.d/S70mongod b/board/common/overlay/etc/init.d/S70mongod index b4e44106ec..e6464b607d 100755 --- a/board/common/overlay/etc/init.d/S70mongod +++ b/board/common/overlay/etc/init.d/S70mongod @@ -12,7 +12,7 @@ test -x ${PROG} || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF} -test -s ${CONF} || exit 0 +test -s "${CONF}" || exit 0 start() { diff --git a/board/common/overlay/etc/init.d/S71redis b/board/common/overlay/etc/init.d/S71redis index 9a80e27c0a..86abe08708 100755 --- a/board/common/overlay/etc/init.d/S71redis +++ b/board/common/overlay/etc/init.d/S71redis @@ -12,7 +12,7 @@ test -x ${PROG} || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF} -test -s ${CONF} || exit 0 +test -s "${CONF}" || exit 0 start() { diff --git a/board/common/overlay/etc/init.d/S78preparedb b/board/common/overlay/etc/init.d/S78preparedb new file mode 100644 index 0000000000..3a964e3b68 --- /dev/null +++ b/board/common/overlay/etc/init.d/S78preparedb @@ -0,0 +1,40 @@ +#!/bin/bash + +SYS_CONF="/etc/qtoggleserver.conf" +BOOT_CONF="/boot/qtoggleserver.conf" +CONF="/data/etc/qtoggleserver.conf" + +test -n "${OS_VERSION}" || source /etc/init.d/base + +prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF} +test -f ${CONF} || exit 0 + + +DB_NAME="qtoggleserver" +PERSIST_DRIVER_RE="persist[[:space:]]*=?[[:space:]]*\{[^#\}d]*driver[[:space:]]*=[[:space:]]*\"?([a-zA-Z0-9.]+)\"?" +[[ $(<${CONF}) =~ ${PERSIST_DRIVER_RE} ]] && PERSIST_DRIVER=${BASH_REMATCH[1]} + +function prepare_db() { + if [[ "${PERSIST_DRIVER}" =~ PostgresDriver$ ]]; then + if ! psql -U postgres -Altw | grep -q ${DB_NAME}; then + msg_begin "Creating postgres ${DB_NAME} db" + psql -U postgres -Atwq -c "CREATE DATABASE ${DB_NAME}" + test $? == 0 && msg_done || msg_fail + fi + fi +} + +case "$1" in + start) + prepare_db + ;; + + stop) + ;; + + *) + echo "Usage: $0 {start|stop}" + exit 1 +esac + +exit $? diff --git a/board/common/overlay/etc/init.d/S80dockercompose b/board/common/overlay/etc/init.d/S80dockercompose index 72aad7da3d..6368dcd408 100755 --- a/board/common/overlay/etc/init.d/S80dockercompose +++ b/board/common/overlay/etc/init.d/S80dockercompose @@ -4,17 +4,28 @@ SYS_CONF=/etc/docker-compose.yml BOOT_CONF=/boot/docker-compose.yml USER_CONF=/data/etc/docker-compose.yml -PROG=/usr/bin/docker-compose +SYS_ENV=/etc/docker-compose.env +BOOT_ENV=/boot/docker-compose.env +USER_ENV=/data/etc/docker-compose.env + +DOCKER=/usr/bin/docker LOG=/var/log/docker-compose.log PROJ=system RUN_DIR=/var/run/docker-compose +ENV_FILE=/tmp/docker-compose.env -test -x ${PROG} || exit 0 +test -x ${DOCKER} || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base -CONF=$(select_conf ${SYS_CONF} ${BOOT_CONF} ${USER_CONF}) -test -s ${CONF} || exit 0 +CONF=$(append_conf ${SYS_CONF} ${BOOT_CONF} ${USER_CONF}) +test -n "${CONF}" || exit 0 +function make_env_file() { + echo -n > ${ENV_FILE} + for env_file in ${SYS_ENV} ${BOOT_ENV} ${USER_ENV}; do + test -s ${env_file} && cat ${env_file} >> ${ENV_FILE} + done +} function start() { msg_begin "Starting docker-compose" @@ -36,15 +47,23 @@ function start() { mkdir -p ${RUN_DIR} export COMPOSE_HTTP_TIMEOUT=300 - ${PROG} -p ${PROJ} --project-directory ${RUN_DIR} -f ${CONF} pull &>${LOG} - ${PROG} -p ${PROJ} --project-directory ${RUN_DIR} -f ${CONF} up --no-start &>>${LOG} - ${PROG} -p ${PROJ} --project-directory ${RUN_DIR} -f ${CONF} up -d &>>${LOG} + + make_env_file + conf=$(echo ${CONF} | sed 's/ / -f /g') + + ${DOCKER} compose --env-file ${ENV_FILE} -p ${PROJ} --project-directory ${RUN_DIR} -f ${conf} pull &>${LOG} + ${DOCKER} compose --env-file ${ENV_FILE} -p ${PROJ} --project-directory ${RUN_DIR} -f ${conf} up --no-start &>>${LOG} + ${DOCKER} compose --env-file ${ENV_FILE} -p ${PROJ} --project-directory ${RUN_DIR} -f ${conf} up -d &>>${LOG} test $? == 0 && msg_done || msg_fail } function stop() { msg_begin "Stopping docker-compose" - ${PROG} -p ${PROJ} --project-directory ${RUN_DIR} -f ${CONF} stop &>>${LOG} + + make_env_file + conf=$(echo ${CONF} | sed 's/ / -f /g') + + ${DOCKER} compose --env-file ${ENV_FILE} -p ${PROJ} --project-directory ${RUN_DIR} -f ${conf} stop &>>${LOG} test $? == 0 && msg_done || msg_fail } diff --git a/board/common/overlay/etc/init.d/S81socat b/board/common/overlay/etc/init.d/S81socat new file mode 100644 index 0000000000..bc7575d86f --- /dev/null +++ b/board/common/overlay/etc/init.d/S81socat @@ -0,0 +1,67 @@ +#!/bin/bash + +SYS_CONF="/etc/socat.conf" +BOOT_CONF="/boot/socat.conf" +USER_CONF="/data/etc/socat.conf" + +PROG="/usr/bin/socat" +LOG="/var/log/socat-%s.log" + +test -x ${PROG} || exit 0 +test -n "${OS_VERSION}" || source /etc/init.d/base +CONF=$(select_conf ${SYS_CONF} ${BOOT_CONF} ${USER_CONF}) +test -s "${CONF}" || exit 0 + + +function run_socat_daemon() { + while true; do + start_time=$(date +%s) + ${PROG} "$@" + stop_time=$(date +%s) + if (( stop_time - start_time < 2 )); then + # If `socat` exits right away, don't respawn it like crazy + sleep 10 + fi + done +} + +function start() { + source ${CONF} + + index=1 + for config in "${CONFIG[@]}"; do + msg_begin "Starting socat" + log=$(printf ${LOG} ${index}) + run_socat_daemon ${config} &> ${log} & + msg_done "config ${index}" + index=$((index + 1)) + done +} + +function stop() { + msg_begin "Stopping socat" + ps | grep socat | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + killall -q $(basename ${PROG}) + msg_done +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit 0 diff --git a/board/common/overlay/etc/init.d/S97dyndns b/board/common/overlay/etc/init.d/S97dyndns index 4b8e515315..139ea73f56 100755 --- a/board/common/overlay/etc/init.d/S97dyndns +++ b/board/common/overlay/etc/init.d/S97dyndns @@ -4,7 +4,7 @@ PROG="/usr/sbin/dyndns-update" SCRIPT="/data/etc/dyndns-update.sh" -test -s ${SCRIPT} || exit 0 +test -s "${SCRIPT}" || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base diff --git a/board/common/overlay/etc/init.d/S98userinit b/board/common/overlay/etc/init.d/S98userinit index 39f316d8c5..b7dee89406 100755 --- a/board/common/overlay/etc/init.d/S98userinit +++ b/board/common/overlay/etc/init.d/S98userinit @@ -3,7 +3,7 @@ USERINIT="/data/etc/userinit.sh" -test -s ${USERINIT} || exit 0 +test -s "${USERINIT}" || exit 0 test -n "${OS_VERSION}" || source /etc/init.d/base diff --git a/board/common/overlay/etc/init.d/base b/board/common/overlay/etc/init.d/base index ac1264c9f2..0f61afb65a 100644 --- a/board/common/overlay/etc/init.d/base +++ b/board/common/overlay/etc/init.d/base @@ -81,3 +81,27 @@ select_conf() { return 1 } + +append_conf() { + # $1 - system config file + # $2 - boot config file + # $3 - user config file + + # Returns a list of space-separated existing config files (and with size > 0) file, in this order: + # * user config file + # * boot config file + # * system config file + + system_conf="$1" + boot_conf="$2" + user_conf="$3" + + files=$( + test -s "${user_conf}" && echo "${user_conf}" + test -s "${boot_conf}" && echo "${boot_conf}" + test -s "${system_conf}" && echo "${system_conf}" + ) + + echo ${files} +} + diff --git a/board/common/overlay/etc/netwatch.conf b/board/common/overlay/etc/netwatch.conf index 7d3533cf1c..c067e0e193 100644 --- a/board/common/overlay/etc/netwatch.conf +++ b/board/common/overlay/etc/netwatch.conf @@ -4,7 +4,7 @@ LINK_WATCH_TIMEOUT=20 IP_WATCH=true IP_WATCH_TIMEOUT=40 -GW_WATCH=false +GW_WATCH=true GW_WATCH_RETRIES=3 GW_WATCH_INTERVAL=60 diff --git a/board/common/overlay/etc/os.conf b/board/common/overlay/etc/os.conf index d192c3988d..98d9801958 100644 --- a/board/common/overlay/etc/os.conf +++ b/board/common/overlay/etc/os.conf @@ -11,9 +11,9 @@ OS_FACTORY_RESET_GPIO="" OS_FACTORY_RESET_INPUT="" OS_FACTORY_RESET_LEVEL="1" OS_FACTORY_RESET_HOLD_SECONDS="10" -OS_FIRMWARE_LATEST_STABLE="" -OS_FIRMWARE_LATEST_BETA="" -OS_FIRMWARE_URL="" +OS_FIRMWARE_LATEST_STABLE=https://provisioning.qtoggle.io/firmware/\${os_short_name}/latest_\${platform}_stable.json +OS_FIRMWARE_LATEST_BETA=https://provisioning.qtoggle.io/firmware/\${os_short_name}/latest_\${platform}_beta.json +OS_FIRMWARE_URL=https://provisioning.qtoggle.io/firmware/\${os_short_name}/\${version}/\${os_short_name}-\${platform}-\${version}.img.xz OS_FIRMWARE_AUTO_UPDATE="false" OS_FIRMWARE_VERSIONS_STABLE="" OS_FIRMWARE_VERSIONS_BETA="" diff --git a/board/common/overlay/etc/postgresql.conf b/board/common/overlay/etc/postgresql.conf new file mode 100644 index 0000000000..c56ecfe063 --- /dev/null +++ b/board/common/overlay/etc/postgresql.conf @@ -0,0 +1 @@ +synchronous_commit = off diff --git a/board/common/overlay/etc/qtoggleserver.conf.default b/board/common/overlay/etc/qtoggleserver.conf.default new file mode 100644 index 0000000000..40f3a7a6fa --- /dev/null +++ b/board/common/overlay/etc/qtoggleserver.conf.default @@ -0,0 +1,142 @@ + +debug = false + +#public_url = "https://qtoggle.example.com" + +# See https://docs.python.org/3.10/library/logging.config.html#logging-config-dictschema +logging = { + root = { + level = "INFO" + } +} + +core = { + device_name = { + get_cmd = "/host/usr/libexec/qtoggleserver/qs-device-name get" + set_cmd = "/host/usr/libexec/qtoggleserver/qs-device-name set" + } + passwords = { + set_cmd = "/host/usr/libexec/qtoggleserver/qs-password set" + } + + tick_interval = 100 # how often to update everything, in milliseconds + event_queue_size = 1024 # maximum number of queued events in a session + max_client_time_skew = 3600 # maximum accepted time skew when authenticating clients, in seconds + + backup_support = true + history_support = true + history_janitor_interval = 3600 + listen_support = true + sequences_support = true + tls_support = true + virtual_ports = 1024 +} + +server = { + addr = "0.0.0.0" + port = 80 # use 443 for HTTPS + compress_response = true + +# https = { +# cert_file = "/data/etc/ssl/cert.pem" +# key_file = "/data/etc/ssl/privkey.pem" +# } +} + +# JSON persistence driver +#persist = { +# driver = "qtoggleserver.drivers.persist.JSONDriver" +# file_path = "/data/qtoggleserver-data.json" +#} + +# Redis persistence driver +#persist = { +# driver = "qtoggleserver.drivers.persist.RedisDriver" +# host = "127.0.0.1" +# port = 6379 +# db = 0 +#} + +# MongoDB persistence driver +#persist = { +# driver = "qtoggleserver.drivers.persist.MongoDriver" +# host = "host.example.com" +# port = 27017 +# db = "qtoggleserver" +#} + +# Postgres persistence driver +persist = { + driver = "qtoggleserver.drivers.persist.PostgresDriver" + host = "127.0.0.1" + port = 5432 + db = "qtoggleserver" + username = "postgres" +} + +system = { + setup_mode_cmd = "/host/usr/libexec/qtoggleserver/qs-setup-mode" + timezone = { + get_cmd = "/host/usr/libexec/qtoggleserver/qs-timezone get" + set_cmd = "/host/usr/libexec/qtoggleserver/qs-timezone set" + } + net = { + wifi = { + get_cmd = "/host/usr/libexec/qtoggleserver/qs-wifi get" + set_cmd = "/host/usr/libexec/qtoggleserver/qs-wifi set" + } + ip = { + get_cmd = "/host/usr/libexec/qtoggleserver/qs-ip get" + set_cmd = "/host/usr/libexec/qtoggleserver/qs-ip set" + } + } + storage = { + path = "/data" + } + temperature = { + get_cmd = "/host/usr/libexec/qtoggleserver/qs-temperature get" + } + fwupdate = { + driver = "thingos.ThingOSDriver" + } +} + +frontend = { + enabled = true + debug = false +} + +slaves = { + enabled = true + timeout = 10 # timeout, in seconds, when communicating with slaves + keepalive = 10 # long-polling timeout, in seconds, when waiting for slave events + retry_interval = 5 # how often to retry a failed API request, in seconds + retry_count = 3 # max number of retries upon failed API requests + + discover = { + dhcp_timeout = 10 # increase this if your DHCP server responds slowly to queries + ap = { + interface_cmd = "/host/usr/libexec/qtoggleserver/qs-ap-interface" + finish_timeout = 300 # for how long to keep the discovery AP up + } + } +} + +peripherals = [ +# { +# driver = "qtoggleserver.my.peripheral.Driver" +# name = "my_peripheral" +# param1 = "value1" +# } +] + +ports = [ +# { +# driver = "qtoggleserver.drivers.ports.gpio.GPIO" +# no = 10 +# } +] + +port_mappings = { +# "old_id" = "new_id" +} diff --git a/board/common/overlay/etc/redis.conf b/board/common/overlay/etc/redis.conf new file mode 100644 index 0000000000..cd0df6f90c --- /dev/null +++ b/board/common/overlay/etc/redis.conf @@ -0,0 +1,32 @@ +bind 127.0.0.1 +protected-mode yes +port 6379 +tcp-backlog 16 +timeout 0 +tcp-keepalive 300 + +maxmemory 128M +maxmemory-policy noeviction + +daemonize yes +supervised no + +pidfile /var/run/redis.pid +loglevel notice +logfile /var/log/redis.log + +databases 2 +save 10 2 +stop-writes-on-bgsave-error yes +rdbcompression yes +dir /var/lib/redis/ +dbfilename dump.rdb + +appendonly no +appendfilename appendonly.aof +appendfsync everysec +no-appendfsync-on-rewrite no +auto-aof-rewrite-percentage 100 +auto-aof-rewrite-min-size 64mb +aof-load-truncated yes + diff --git a/board/common/overlay/etc/version b/board/common/overlay/etc/version index 6921062dac..3b59f7af07 100644 --- a/board/common/overlay/etc/version +++ b/board/common/overlay/etc/version @@ -1,4 +1,4 @@ -OS_NAME="thingOS" -OS_SHORT_NAME="thingos" -OS_PREFIX="thing" +OS_NAME="qToggleOS" +OS_SHORT_NAME="qtoggleos" +OS_PREFIX="qtos" OS_VERSION="unknown" diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 7408bb90d4..8c386b1865 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -488,13 +488,14 @@ function do_extract() { # TODO verify hash - boot_info=$(fdisk --bytes -l -o device,start,end,size ${FW_FILE_EXTR} | grep "${FW_FILE_EXTR}1") + root_part_no=$(echo ${ROOT_DEV} | grep -oE '[0-9]$') + boot_info=$(fdisk --bytes -l -o device,start,end,size ${FW_FILE_EXTR} | grep "${FW_FILE_EXTR}$(( root_part_no - 1 ))") boot_info=(${boot_info}) boot_start=${boot_info[1]} boot_end=${boot_info[2]} boot_size=$((boot_info[3] / 512)) - root_info=$(fdisk --bytes -l -o device,start,end,size ${FW_FILE_EXTR} | grep "${FW_FILE_EXTR}2") + root_info=$(fdisk --bytes -l -o device,start,end,size ${FW_FILE_EXTR} | grep "${FW_FILE_EXTR}${root_part_no}") root_info=(${root_info}) root_start=${root_info[1]} root_end=${root_info[2]} diff --git a/board/common/overlay/sbin/toemmc b/board/common/overlay/sbin/toemmc index 4b4844dd9a..6a8c5b3770 100755 --- a/board/common/overlay/sbin/toemmc +++ b/board/common/overlay/sbin/toemmc @@ -33,6 +33,10 @@ NET_CONFIG_FILES=( emmc_dev=$1 source /tmp/disk_info +if [[ "${DISK_DEV}" == "${emmc_dev}" ]]; then + msg "SD card and eMMC devices are the same" + exit 1 +fi msg "SD card device is ${DISK_DEV}" @@ -41,11 +45,17 @@ root_info=(${root_info}) root_end_sector=${root_info[2]} total_size=$(((root_end_sector + 1) * 512 / 10485760)) # x 10MB +root_part_no=$(echo ${ROOT_DEV} | grep -oE '[0-9]$') -msg "Unmounting all EMMC partitions" +msg "Unmounting all eMMC partitions" umount ${emmc_dev}* &>/dev/null partx -d ${emmc_dev} &>/dev/null +msg "Wiping any GPT backup from eMMC" +emmc_sectors=$(fdisk -l ${emmc_dev} 2>/dev/null | head -n1 | grep -oE '[[:digit:]]+ sectors' | cut -d ' ' -f 1) +dd if=/dev/zero of=${emmc_dev} seek=$(( emmc_sectors - 34 )) count=34 status=none +sync + msg "Copying ${total_size}0MB from ${DISK_DEV} to ${emmc_dev}" dd if=${DISK_DEV} of=${emmc_dev} bs=10M count=${total_size} status=none sync @@ -53,17 +63,27 @@ partx -a ${emmc_dev} &>/dev/null sleep 1 -msg "Removing data partition from EMMC" -fdisk >/dev/null ${emmc_dev} </dev/null ${emmc_dev} </dev/null ${emmc_dev} < /host/data/etc/hostname + /bin/hostname ${QS_NAME} + echo "127.0.0.1 localhost ${QS_NAME}" > /host/etc/hosts +fi diff --git a/board/common/overlay/usr/libexec/qtoggleserver/qs-ip b/board/common/overlay/usr/libexec/qtoggleserver/qs-ip new file mode 100755 index 0000000000..c36e54643c --- /dev/null +++ b/board/common/overlay/usr/libexec/qtoggleserver/qs-ip @@ -0,0 +1,41 @@ +#!/bin/bash + +STATIC_IP_CONF="/host/data/etc/static_ip.conf" + +if [[ "$1" == "set" ]]; then + echo -n > ${STATIC_IP_CONF} + + if [[ -n "${QS_ADDRESS}" ]] && [[ -n "${QS_NETMASK}" ]]; then + echo "STATIC_IP=${QS_ADDRESS}/${QS_NETMASK}" > ${STATIC_IP_CONF} + fi + if [[ -n "${QS_GATEWAY}" ]]; then + echo "STATIC_GW=${QS_GATEWAY}" >> ${STATIC_IP_CONF} + fi + if [[ -n "${QS_DNS}" ]]; then + echo "STATIC_DNS=${QS_DNS}" >> ${STATIC_IP_CONF} + fi +elif [[ "$1" == "get" ]]; then + test -f ${STATIC_IP_CONF} && source ${STATIC_IP_CONF} + _IFS=${IFS} IFS="/" STATIC_IP=(${STATIC_IP}) IFS=${_IFS} + echo "QS_ADDRESS=${STATIC_IP[0]}" + echo "QS_NETMASK=${STATIC_IP[1]}" + echo "QS_GATEWAY=${STATIC_GW}" + echo "QS_DNS=${STATIC_DNS}" + + # Obtain current IP info + gw_if=$(ip route list | grep default | cut -d ' ' -f 3,5) + if [[ -n "${gw_if}" ]]; then + gw_if=(${gw_if}) + addr_mask=$(ip addr show dev ${gw_if[1]} | grep 'inet ' | tr -s ' ' | cut -d ' ' -f 3) + _IFS=${IFS} IFS="/" addr_mask=(${addr_mask}) IFS=${_IFS} + address_current=${addr_mask[0]} + netmask_current=${addr_mask[1]} + gateway_current=${gw_if[0]} + dns_current=$(cat /etc/resolv.conf | grep nameserver | head -1 | cut -d ' ' -f 2) + fi + + echo "QS_ADDRESS_CURRENT=${address_current}" + echo "QS_NETMASK_CURRENT=${netmask_current}" + echo "QS_GATEWAY_CURRENT=${gateway_current}" + echo "QS_DNS_CURRENT=${dns_current}" +fi diff --git a/board/common/overlay/usr/libexec/qtoggleserver/qs-password b/board/common/overlay/usr/libexec/qtoggleserver/qs-password new file mode 100755 index 0000000000..0b0d4ef8ec --- /dev/null +++ b/board/common/overlay/usr/libexec/qtoggleserver/qs-password @@ -0,0 +1,6 @@ +#!/bin/bash + +if [[ "$1" == "set" ]]; then + test "${QS_USERNAME}" == "admin" || exit 0 + PASSWORD="${QS_PASSWORD}" chroot /host /usr/sbin/adminpasswd +fi diff --git a/board/common/overlay/usr/libexec/qtoggleserver/qs-setup-mode b/board/common/overlay/usr/libexec/qtoggleserver/qs-setup-mode new file mode 100755 index 0000000000..8fc4d99129 --- /dev/null +++ b/board/common/overlay/usr/libexec/qtoggleserver/qs-setup-mode @@ -0,0 +1,3 @@ +#!/bin/bash + +killall -0 hostapd &> /dev/null diff --git a/board/common/overlay/usr/libexec/qtoggleserver/qs-temperature b/board/common/overlay/usr/libexec/qtoggleserver/qs-temperature new file mode 100755 index 0000000000..958ec7c778 --- /dev/null +++ b/board/common/overlay/usr/libexec/qtoggleserver/qs-temperature @@ -0,0 +1,6 @@ +#!/bin/bash + +if [[ "$1" == "get" ]]; then + temp=$( ${WPA_SUPPLICANT_CONF}.tmp + mv ${WPA_SUPPLICANT_CONF}.tmp ${WPA_SUPPLICANT_CONF} + else + if ! grep 'key_mgmt=NONE' ${WPA_SUPPLICANT_CONF} &>/dev/null; then + sed -ri "s/^( *)(ssid=.*)/\1\2\n\1key_mgmt=NONE/" ${WPA_SUPPLICANT_CONF} + fi + + cat ${WPA_SUPPLICANT_CONF} | grep -vE '^ *psk=' > ${WPA_SUPPLICANT_CONF}.tmp + mv ${WPA_SUPPLICANT_CONF}.tmp ${WPA_SUPPLICANT_CONF} + fi +elif [[ "$1" == "get" ]]; then + if [[ -f ${WPA_SUPPLICANT_CONF} ]]; then + ssid=$(cat ${WPA_SUPPLICANT_CONF} | grep -E '^ *ssid=' | cut -d '=' -f 2) + psk=$(cat ${WPA_SUPPLICANT_CONF} | grep -E '^ *psk=' | cut -d '=' -f 2) + bssid=$(cat ${WPA_SUPPLICANT_CONF} | grep -E '^ *bssid=' | cut -d '=' -f 2) + bssid_current=$(iw dev ${OS_WLAN} link | grep -oE 'Connected to [^ ]+' | cut -d ' ' -f 3) + rssi_current=$(iw dev wlan0 link | grep -E "signal: -[[:digit:]]+" | cut -d ' ' -f 2) + fi + + echo "QS_SSID=${ssid}" + echo "QS_PSK=${psk}" + echo "QS_BSSID=${bssid}" + echo "QS_BSSID_CURRENT=${bssid_current}" + echo "QS_RSSI_CURRENT=${rssi_current}" +fi diff --git a/board/common/overlay/usr/share/post-upgrade/0.15.0.0-beta.1.sh b/board/common/overlay/usr/share/post-upgrade/0.15.0.0-beta.1.sh new file mode 100644 index 0000000000..533e0d54f3 --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.15.0.0-beta.1.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# SSH config files and keys have been moved from /data/etc/ to /data/etc/ssh +mkdir -p /data/etc/ssh +test -f /data/etc/ssh_authorized_keys && mv /data/etc/ssh_authorized_keys /data/etc/ssh/authorized_keys +test -f /data/etc/sshd_config && mv /data/etc/sshd_config /data/ssh/etc +test -f /data/etc/sshd_id_rsa && mv /data/etc/ssh_id_rsa /data/ssh/etc +test -f /data/etc/sshd_id_rsa.pub && mv /data/etc/ssh_id_rsa.pub /data/ssh/etc +mv /data/etc/ssh_host* /data/etc/ssh diff --git a/board/common/overlay/usr/share/post-upgrade/0.15.0.0-beta.4.sh b/board/common/overlay/usr/share/post-upgrade/0.15.0.0-beta.4.sh new file mode 100644 index 0000000000..2dc64bbb89 --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.15.0.0-beta.4.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# qtoggleserver.conf: move device_name -> core.device_name +sed -i '/^device_name.*/,+3d' /data/etc/qtoggleserver.conf +sed -ri 's/( tick_interval)/ device_name = {\n set_cmd = "\/usr\/libexec\/qs-device-name set"\n }\n\1/' /data/etc/qtoggleserver.conf + +# qtoggleserver.conf: move password_set_cmd -> core.passwords.set_cmd +sed -i '/^password_set_cmd.*/,+1d' /data/etc/qtoggleserver.conf +sed -ri 's/( tick_interval)/ passwords = {\n set_cmd = "\/usr\/libexec\/qs-password set"\n }\n\n\1/' /data/etc/qtoggleserver.conf diff --git a/board/common/overlay/usr/share/post-upgrade/0.17.0.0-beta.4.sh b/board/common/overlay/usr/share/post-upgrade/0.17.0.0-beta.4.sh new file mode 100644 index 0000000000..03f1841c52 --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.17.0.0-beta.4.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# qtoggleserver.conf: fwupdate_driver -> fwupdate.driver +sed -i 's/fwupdate_driver = "thingos.ThingOSDriver"/fwupdate = {\n driver = "thingos.ThingOSDriver"\n }/' /data/etc/qtoggleserver.conf + +# qtoggleserver.conf: remove date updating support +cat /data/etc/qtoggleserver.conf | tr '\n' '\t' | sed -r 's/date = \{[^\}]+\}\s+//' | tr '\t' '\n' > /data/etc/qtoggleserver.conf.bak +mv /data/etc/qtoggleserver.conf.bak /data/etc/qtoggleserver.conf diff --git a/board/common/overlay/usr/share/post-upgrade/0.18.0.0-beta.1.sh b/board/common/overlay/usr/share/post-upgrade/0.18.0.0-beta.1.sh new file mode 100644 index 0000000000..058e0b4a7d --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.18.0.0-beta.1.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# qtoggleserver.conf: add system.storage +sed -ri 's/(\s+)(fwupdate)/\1storage = {\n\1\1path = "\/data"\n\1}\n\1\2/g' /data/etc/qtoggleserver.conf + +# qtoggleserver.conf: add system.temperature +sed -ri 's/(\s+)(fwupdate)/\1temperature = {\n\1\1get_cmd = "\/usr\/libexec\/qs-temperature get"\n\1}\n\1\2/g' /data/etc/qtoggleserver.conf diff --git a/board/common/overlay/usr/share/post-upgrade/0.21.0.0.sh b/board/common/overlay/usr/share/post-upgrade/0.21.0.0.sh new file mode 100644 index 0000000000..dcf3f3d1a7 --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.21.0.0.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# qtoggleserver.conf: add slaves.discover +discover_section=' discover = { \ + dhcp_timeout = 10 \ + ap = { \ + interface_cmd = "/usr/libexec/qs-ap-interface" \ + finish_timeout = 300 \ + } \ + }' + +sed -ri "s,(\s+retry_count = .*),\1\n${discover_section},g" /data/etc/qtoggleserver.conf diff --git a/board/common/overlay/usr/share/post-upgrade/0.21.12.1.sh b/board/common/overlay/usr/share/post-upgrade/0.21.12.1.sh new file mode 100644 index 0000000000..b97de945db --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.21.12.1.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# remove old ntp.conf (ntpd was replaced by chrony) +rm -f /data/etc/ntp.conf diff --git a/board/common/overlay/usr/share/post-upgrade/0.25.3.0.sh b/board/common/overlay/usr/share/post-upgrade/0.25.3.0.sh new file mode 100644 index 0000000000..5363d4ce18 --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.25.3.0.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# qtoggleserver.conf: add system.setup_mode_cmd +setup_mode_cmd=' setup_mode_cmd = "/usr/libexec/qs-setup-mode"' + +sed -ri "s,(system = \{),\1\n${setup_mode_cmd},g" /data/etc/qtoggleserver.conf diff --git a/board/common/overlay/usr/share/post-upgrade/0.26.0.0.sh b/board/common/overlay/usr/share/post-upgrade/0.26.0.0.sh new file mode 100644 index 0000000000..02891efde6 --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.26.0.0.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Starting with version 0.26, the following Python deps are installed as built-in, +# so we have to remove any user-installed versions. + +rm -rf /data/usr/lib/python3.9/site-packages/argparse* +rm -rf /data/usr/lib/python3.9/site-packages/bleak* +rm -rf /data/usr/lib/python3.9/site-packages/charset* +rm -rf /data/usr/lib/python3.9/site-packages/construct* +rm -rf /data/usr/lib/python3.9/site-packages/dbus* +rm -rf /data/usr/lib/python3.9/site-packages/paradox* +rm -rf /data/usr/lib/python3.9/site-packages/pymodbus* +rm -rf /data/usr/lib/python3.9/site-packages/pyserial* +rm -rf /data/usr/lib/python3.9/site-packages/python_slugify* +rm -rf /data/usr/lib/python3.9/site-packages/*pylontech* +rm -rf /data/usr/lib/python3.9/site-packages/qtoggleserver* +rm -rf /data/usr/lib/python3.9/site-packages/requests* +rm -rf /data/usr/lib/python3.9/site-packages/serial* +rm -rf /data/usr/lib/python3.9/site-packages/slugify* +rm -rf /data/usr/lib/python3.9/site-packages/text_unidecode* +rm -rf /data/usr/lib/python3.9/site-packages/urllib3* + +mount -o remount /usr diff --git a/board/common/overlay/usr/share/post-upgrade/0.26.1.0.sh b/board/common/overlay/usr/share/post-upgrade/0.26.1.0.sh new file mode 100644 index 0000000000..97b950aad1 --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.26.1.0.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# qtoggleserver.conf: add core.device_name.get_cmd +sed -ri 's,(set_cmd = "/usr/libexec/qs-device-name set"),get_cmd = "/usr/libexec/qs-device-name get"\n \1,' /data/etc/qtoggleserver.conf +sed -ri 's/history_janitor_interval = .*/history_janitor_interval = 3600/' /data/etc/qtoggleserver.conf diff --git a/board/common/overlay/usr/share/post-upgrade/0.27-app.sh b/board/common/overlay/usr/share/post-upgrade/0.27-app.sh new file mode 100644 index 0000000000..38b56f0944 --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/0.27-app.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Transform Postgres `value_history` table from the old JSONB format to new time-series (id, oid, ts, val) format. + +function run_psql_cmd() { + psql -U postgres -d qtoggleserver -c "$1" +} + +# Don't perform migration unless: +# - postgres is running +# - our database `qtoggleserver` is present +# - it has table `value_history` +# - table `value_history` has the jsonb content field (i.e. not yet migrated) +run_psql_cmd "\d value_history" 2>/dev/null | grep -q jsonb || exit 0 + +run_psql_cmd "ALTER TABLE value_history RENAME TO value_history_old;" +run_psql_cmd "SELECT id::BIGINT, TRIM((content->'pid')::TEXT, '\"') AS oid, (content->'ts')::BIGINT AS ts, CASE WHEN content->'val' = 'false' THEN 0 WHEN content->'val' = 'true' THEN 1 WHEN content->'val' = 'null' THEN 0 ELSE (content->'val')::double precision END AS val INTO value_history FROM value_history_old;" +run_psql_cmd "ALTER TABLE value_history ALTER COLUMN id SET DEFAULT NEXTVAL('value_history_id_seq');" +run_psql_cmd "ALTER TABLE value_history ADD PRIMARY KEY (id);" diff --git a/board/nanopir1/overlay/etc/init.d/S41netled b/board/nanopir1/overlay/etc/init.d/S41netled index 04548242db..da63f8d3b5 100755 --- a/board/nanopir1/overlay/etc/init.d/S41netled +++ b/board/nanopir1/overlay/etc/init.d/S41netled @@ -1,13 +1,64 @@ #!/bin/bash +NET_LED=LED2 +QS_CONF="/data/etc/qtoggleserver.conf" +PORT_RE="server[[:space:]]*=?[[:space:]]*\{[^#\}p]*port[[:space:]]*=[[:space:]]*([0-9]+)" +CERT_RE="https[[:space:]]*=?[[:space:]]*\{[^#\}c]*cert_file[[:space:]]*=[[:space:]]*([^#\} ]+)" + +QS_PORT=80 +QS_SCHEME="http" +if [[ -s ${QS_CONF} ]]; then + [[ $(<${QS_CONF}) =~ ${PORT_RE} ]] && QS_PORT=${BASH_REMATCH[1]} + [[ $(<${QS_CONF}) =~ ${CERT_RE} ]] && QS_SCHEME="https" +fi + + +function turn_on() { + echo 1 > /sys/class/leds/${NET_LED}/brightness +} + +function turn_off() { + echo 0 > /sys/class/leds/${NET_LED}/brightness +} + +function is_network_ok() { + ip route | grep -q default +} + +function is_hostapd_running() { + killall -0 hostapd &> /dev/null +} + +function is_qtoggleserver_running() { + curl -m 2 --insecure --head "${QS_SCHEME}://127.0.0.1:${QS_PORT}/frontend/static/qtoggleserver-bundle-dark.css" &>/dev/null && return 0 || return 1 +} + +function watch_captive_portal_mode() { + cp_mode=false + blink_on=0 + while true; do + if is_hostapd_running && is_qtoggleserver_running; then + cp_mode=true + test ${blink_on} == 1 && turn_off || turn_on + blink_on=$(( 1- blink_on )) + usleep 500000 + else + cp_mode=false + is_network_ok && turn_on || turn_off + sleep 1 + fi + done +} + + case "$1" in start) - echo 0 > /sys/class/leds/LED2/brightness - echo 1 > /sys/class/leds/LED2/brightness + watch_captive_portal_mode & ;; stop) - true + ps | grep netled | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + turn_off ;; *) diff --git a/build-docker.sh b/build-docker.sh new file mode 100755 index 0000000000..62cf68f46a --- /dev/null +++ b/build-docker.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +DOCKER_BUILDER_IMAGE="ccrisan/thingos-builder" +ENV_FILE=$(mktemp) + +function cleanup() { + rm -f ${ENV_FILE} +} + +trap cleanup EXIT + +cd $(dirname "$0") +printenv | grep -E ^THINGOS > ${ENV_FILE} + +args="${@}" +docker run --privileged -it --rm -u $(id -u):$(id -g) \ + -v "$(pwd)":/os \ + -e TB_CUSTOM_CMD="./build.sh ${args}" \ + --env-file ${ENV_FILE} \ + "${DOCKER_BUILDER_IMAGE}" diff --git a/configs/nanopir1_defconfig b/configs/nanopir1_defconfig index 022b864c23..aa28634fe5 100644 --- a/configs/nanopir1_defconfig +++ b/configs/nanopir1_defconfig @@ -21,7 +21,6 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-nanopi-r1" BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=y BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" -BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_ALSA_UTILS=y BR2_PACKAGE_ALSA_UTILS_APLAY=y BR2_PACKAGE_GZIP=y @@ -42,24 +41,30 @@ BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y +BR2_PACKAGE_GPTFDISK=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_CA_CERTIFICATES=y BR2_PACKAGE_LIBSSH2=y +BR2_PACKAGE_POSTGRESQL=y +BR2_PACKAGE_REDIS=y BR2_PACKAGE_LIBFUSE=y -BR2_PACKAGE_LIBCURL=y -BR2_PACKAGE_LIBCURL_CURL=y BR2_PACKAGE_LIBCAP=y -BR2_PACKAGE_PCRE=y -BR2_PACKAGE_PCRE_UCP=y BR2_PACKAGE_SEMVER_SORT=y BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y +BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y BR2_PACKAGE_CHRONY=y +BR2_PACKAGE_CLOUDFLARED=y BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DEHYDRATED=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_DNSMASQ=y +BR2_PACKAGE_HOSTAPD=y # BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set -BR2_PACKAGE_IPTABLES=y BR2_PACKAGE_IW=y BR2_PACKAGE_NET_TOOLS=y BR2_PACKAGE_NETCAT=y @@ -67,18 +72,22 @@ BR2_PACKAGE_NTP=y BR2_PACKAGE_NTP_SNTP=y # BR2_PACKAGE_NTP_NTPD is not set BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_OPENVPN=y BR2_PACKAGE_PPPD=y +BR2_PACKAGE_SOCAT=y +BR2_PACKAGE_TCPDUMP=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y BR2_PACKAGE_WPA_SUPPLICANT_WPS=y BR2_PACKAGE_WPA_SUPPLICANT_CLI=y -BR2_PACKAGE_BASH=y BR2_PACKAGE_LOGROTATE=y -BR2_PACKAGE_CGROUPFS_MOUNT=y +BR2_PACKAGE_DOCKER_CLI=y +BR2_PACKAGE_DOCKER_COMPOSE=y +BR2_PACKAGE_DOCKER_ENGINE=y +BR2_PACKAGE_HTOP=y BR2_PACKAGE_TAR=y -BR2_PACKAGE_UTIL_LINUX_BINARIES=y BR2_PACKAGE_UTIL_LINUX_LOSETUP=y BR2_PACKAGE_UTIL_LINUX_PARTX=y BR2_PACKAGE_NANO=y diff --git a/configs/radxacm3_defconfig b/configs/radxacm3_defconfig index 93b56e3741..00250686a7 100644 --- a/configs/radxacm3_defconfig +++ b/configs/radxacm3_defconfig @@ -42,6 +42,7 @@ BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y BR2_PACKAGE_RKBIN=y +BR2_PACKAGE_GPTFDISK=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_USB_MODESWITCH_DATA=y BR2_PACKAGE_CA_CERTIFICATES=y diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig index 038639aa04..c80db6dcc1 100644 --- a/configs/raspberrypi2_defconfig +++ b/configs/raspberrypi2_defconfig @@ -45,6 +45,7 @@ BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y BR2_PACKAGE_RPI_WIFI_FIRMWARE=y +BR2_PACKAGE_GPTFDISK=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_RPI_ARMMEM=y BR2_PACKAGE_RPI_USERLAND=y diff --git a/configs/raspberrypi3_defconfig b/configs/raspberrypi3_defconfig index 93aefeaad0..219c264ac6 100644 --- a/configs/raspberrypi3_defconfig +++ b/configs/raspberrypi3_defconfig @@ -45,6 +45,7 @@ BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y BR2_PACKAGE_RPI_WIFI_FIRMWARE=y +BR2_PACKAGE_GPTFDISK=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_RPI_ARMMEM=y BR2_PACKAGE_RPI_USERLAND=y diff --git a/configs/raspberrypi4_defconfig b/configs/raspberrypi4_defconfig index bbf422b2cf..fa64adbe6e 100644 --- a/configs/raspberrypi4_defconfig +++ b/configs/raspberrypi4_defconfig @@ -44,6 +44,7 @@ BR2_PACKAGE_RPI_BT_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y BR2_PACKAGE_RPI_WIFI_FIRMWARE=y +BR2_PACKAGE_GPTFDISK=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_RPI_ARMMEM=y BR2_PACKAGE_RPI_USERLAND=y diff --git a/configs/raspberrypi64_defconfig b/configs/raspberrypi64_defconfig index bdd35d74d1..1cba511a73 100644 --- a/configs/raspberrypi64_defconfig +++ b/configs/raspberrypi64_defconfig @@ -20,7 +20,6 @@ BR2_LINUX_KERNEL_IMAGEGZ=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2837-rpi-3-a-plus broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus broadcom/bcm2710-rpi-cm3 broadcom/bcm2837-rpi-cm3-io3 broadcom/bcm2710-rpi-zero-2 broadcom/bcm2711-rpi-4-b broadcom/bcm2711-rpi-cm4" BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" -BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_ALSA_UTILS=y BR2_PACKAGE_ALSA_UTILS_APLAY=y BR2_PACKAGE_GZIP=y @@ -47,24 +46,31 @@ BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y BR2_PACKAGE_RPI_WIFI_FIRMWARE=y +BR2_PACKAGE_GPTFDISK=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_CA_CERTIFICATES=y BR2_PACKAGE_LIBSSH2=y +BR2_PACKAGE_POSTGRESQL=y +BR2_PACKAGE_REDIS=y +BR2_PACKAGE_SQLITE=y BR2_PACKAGE_LIBFUSE=y -BR2_PACKAGE_LIBCURL=y -BR2_PACKAGE_LIBCURL_CURL=y BR2_PACKAGE_LIBCAP=y -BR2_PACKAGE_PCRE=y -BR2_PACKAGE_PCRE_UCP=y BR2_PACKAGE_SEMVER_SORT=y BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y +BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y BR2_PACKAGE_CHRONY=y +BR2_PACKAGE_CLOUDFLARED=y BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DEHYDRATED=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_DNSMASQ=y +BR2_PACKAGE_HOSTAPD=y # BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set -BR2_PACKAGE_IPTABLES=y BR2_PACKAGE_IW=y BR2_PACKAGE_NET_TOOLS=y BR2_PACKAGE_NETCAT=y @@ -72,18 +78,22 @@ BR2_PACKAGE_NTP=y BR2_PACKAGE_NTP_SNTP=y # BR2_PACKAGE_NTP_NTPD is not set BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_OPENVPN=y BR2_PACKAGE_PPPD=y +BR2_PACKAGE_SOCAT=y +BR2_PACKAGE_TCPDUMP=y BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=y BR2_PACKAGE_WPA_SUPPLICANT_EAP=y BR2_PACKAGE_WPA_SUPPLICANT_WPS=y BR2_PACKAGE_WPA_SUPPLICANT_CLI=y -BR2_PACKAGE_BASH=y BR2_PACKAGE_LOGROTATE=y -BR2_PACKAGE_CGROUPFS_MOUNT=y +BR2_PACKAGE_DOCKER_CLI=y +BR2_PACKAGE_DOCKER_COMPOSE=y +BR2_PACKAGE_DOCKER_ENGINE=y +BR2_PACKAGE_HTOP=y BR2_PACKAGE_TAR=y -BR2_PACKAGE_UTIL_LINUX_BINARIES=y BR2_PACKAGE_UTIL_LINUX_LOSETUP=y BR2_PACKAGE_UTIL_LINUX_PARTX=y BR2_PACKAGE_NANO=y diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig index 680e986091..29dfe7ec6c 100644 --- a/configs/raspberrypi_defconfig +++ b/configs/raspberrypi_defconfig @@ -44,6 +44,7 @@ BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y BR2_PACKAGE_RPI_WIFI_FIRMWARE=y +BR2_PACKAGE_GPTFDISK=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_RPI_ARMMEM=y BR2_PACKAGE_RPI_USERLAND=y diff --git a/configs/rockpi4b_defconfig b/configs/rockpi4b_defconfig index 0d9f359e38..a9a1a5caf5 100644 --- a/configs/rockpi4b_defconfig +++ b/configs/rockpi4b_defconfig @@ -44,6 +44,7 @@ BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y BR2_PACKAGE_RKBIN=y +BR2_PACKAGE_GPTFDISK=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_USB_MODESWITCH_DATA=y BR2_PACKAGE_CA_CERTIFICATES=y diff --git a/package/Config.in b/package/Config.in index e03165022b..4af2010a81 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2165,6 +2165,7 @@ menu "Networking applications" source "package/casync/Config.in" source "package/chrony/Config.in" source "package/civetweb/Config.in" + source "package/cloudflared/Config.in" source "package/connman/Config.in" source "package/connman-gtk/Config.in" source "package/conntrack-tools/Config.in" @@ -2514,7 +2515,6 @@ menu "System tools" source "package/docker-cli/Config.in" source "package/docker-compose/Config.in" source "package/docker-engine/Config.in" - source "package/docker-proxy/Config.in" source "package/earlyoom/Config.in" source "package/efibootmgr/Config.in" source "package/efivar/Config.in" diff --git a/package/Config.in.host b/package/Config.in.host index 6e5a5c5fc5..ae8a4665e0 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -35,7 +35,8 @@ menu "Host utilities" source "package/genpart/Config.in.host" source "package/gnupg/Config.in.host" source "package/go/Config.in.host" - source "package/go-bootstrap/Config.in.host" + source "package/go-bootstrap-stage1/Config.in.host" + source "package/go-bootstrap-stage2/Config.in.host" source "package/google-breakpad/Config.in.host" source "package/gptfdisk/Config.in.host" source "package/imagemagick/Config.in.host" diff --git a/package/bash/0001-bash51-001.patch b/package/bash/0001-bash51-001.patch deleted file mode 100644 index 8f18cccc31..0000000000 --- a/package/bash/0001-bash51-001.patch +++ /dev/null @@ -1,83 +0,0 @@ -[From http://mirror.keystealth.org/gnu/bash/bash-5.1-patches/bash51-001] -Signed-off-by: Peter Seiderer - - BASH PATCH REPORT - ================= - -Bash-Release: 5.1 -Patch-ID: bash51-001 - -Bug-Reported-by: Fazal Majid -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00000.html - -Bug-Description: - -There is a missing dependency on a constructed file, which can cause highly -parellel builds to fail. - -Patch (apply with `patch -p0'): - -*** ../bash-5.1-patched/Makefile.in 2020-12-04 09:51:19.000000000 -0500 ---- b/Makefile.in 2020-12-16 11:28:36.000000000 -0500 -*************** -*** 1316,1319 **** ---- 1316,1320 ---- - bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h - bashline.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -+ bashline.o: ${DEFDIR}/builtext.h - bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h - bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h -*************** -*** 1436,1439 **** ---- 1437,1441 ---- - builtins/evalstring.o: jobs.h builtins.h flags.h input.h execute_cmd.h - builtins/evalstring.o: bashhist.h $(DEFSRC)/common.h pathnames.h -+ builtins/evalstring.o: ${DEFDIR}/builtext.h - builtins/getopt.o: config.h ${BASHINCDIR}/memalloc.h - builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h - -*** ../bash-5.1-patched/builtins/Makefile.in 2019-07-25 08:03:45.000000000 -0400 ---- b/builtins/Makefile.in 2020-12-16 11:29:29.000000000 -0500 -*************** -*** 362,366 **** - evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h - evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h -! evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h - #evalstring.o: $(topdir)/y.tab.h - getopt.o: ../config.h $(BASHINCDIR)/memalloc.h ---- 362,366 ---- - evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h - evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h -! evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h ./builtext.h - #evalstring.o: $(topdir)/y.tab.h - getopt.o: ../config.h $(BASHINCDIR)/memalloc.h - -*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 ---- b/patchlevel.h 2020-10-01 11:01:28.000000000 -0400 -*************** -*** 1,5 **** - /* patchlevel.h -- current bash patch level */ - -! /* Copyright (C) 2001-2016 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. ---- 1,5 ---- - /* patchlevel.h -- current bash patch level */ - -! /* Copyright (C) 2001-2020 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 0 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 1 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0005-input.h-add-missing-include-on-stdio.h.patch b/package/bash/0001-input.h-add-missing-include-on-stdio.h.patch similarity index 100% rename from package/bash/0005-input.h-add-missing-include-on-stdio.h.patch rename to package/bash/0001-input.h-add-missing-include-on-stdio.h.patch diff --git a/package/bash/0002-bash51-002.patch b/package/bash/0002-bash51-002.patch deleted file mode 100644 index c9836082c1..0000000000 --- a/package/bash/0002-bash51-002.patch +++ /dev/null @@ -1,60 +0,0 @@ -[From http://mirror.keystealth.org/gnu/bash/bash-5.1-patches/bash51-002] -Signed-off-by: Peter Seiderer - - BASH PATCH REPORT - ================= - -Bash-Release: 5.1 -Patch-ID: bash51-002 - -Bug-Reported-by: oguzismailuysal@gmail.com -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00037.html - -Bug-Description: - -If there are no jobs, and the `-n' and `-p' options are both supplied to -`wait', bash can assign a value to the variable name specified with `-p' -instead of leaving it unset. - -Patch (apply with `patch -p0'): - -*** ../bash-5.1-patched/builtins/wait.def 2020-04-09 15:13:57.000000000 -0400 ---- b/builtins/wait.def 2020-12-11 09:46:49.000000000 -0500 -*************** -*** 214,222 **** - - status = wait_for_any_job (wflags, &pstat); -- if (status < 0) -- status = 127; -- - if (vname && status >= 0) - bind_var_to_int (vname, pstat.pid); - if (list) - unset_waitlist (); ---- 214,222 ---- - - status = wait_for_any_job (wflags, &pstat); - if (vname && status >= 0) - bind_var_to_int (vname, pstat.pid); -+ -+ if (status < 0) -+ status = 127; - if (list) - unset_waitlist (); - -*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 ---- b/patchlevel.h 2020-10-01 11:01:28.000000000 -0400 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 1 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 2 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0006-locale-fix-typo-local_shiftstates-vs.-locale_shiftst.patch b/package/bash/0002-locale-fix-typo-local_shiftstates-vs.-locale_shiftst.patch similarity index 100% rename from package/bash/0006-locale-fix-typo-local_shiftstates-vs.-locale_shiftst.patch rename to package/bash/0002-locale-fix-typo-local_shiftstates-vs.-locale_shiftst.patch diff --git a/package/bash/0003-bash51-003.patch b/package/bash/0003-bash51-003.patch deleted file mode 100644 index ff13fb0c9f..0000000000 --- a/package/bash/0003-bash51-003.patch +++ /dev/null @@ -1,56 +0,0 @@ -[From http://mirror.keystealth.org/gnu/bash/bash-5.1-patches/bash51-003] -Signed-off-by: Peter Seiderer - - BASH PATCH REPORT - ================= - -Bash-Release: 5.1 -Patch-ID: bash51-003 - -Bug-Reported-by: oguzismailuysal@gmail.com -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00050.html - -Bug-Description: - -Bash does not put a command substitution process that is started to perform an -expansion in a child process into the right process group where it can receive -keyboard-generated signals. - -Patch (apply with `patch -p0'): - -*** ../bash-5.1-patched/subst.c 2020-11-16 10:33:15.000000000 -0500 ---- b/subst.c 2020-12-12 13:50:11.000000000 -0500 -*************** -*** 6357,6362 **** - #if defined (JOB_CONTROL) - old_pipeline_pgrp = pipeline_pgrp; -! /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */ -! if ((subshell_environment & SUBSHELL_PIPE) == 0) - pipeline_pgrp = shell_pgrp; - cleanup_the_pipeline (); ---- 6357,6364 ---- - #if defined (JOB_CONTROL) - old_pipeline_pgrp = pipeline_pgrp; -! /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or -! we've already forked to run a disk command (and are expanding redirections, -! for example). */ -! if ((subshell_environment & (SUBSHELL_FORK|SUBSHELL_PIPE)) == 0) - pipeline_pgrp = shell_pgrp; - cleanup_the_pipeline (); - -*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 ---- b/patchlevel.h 2020-10-01 11:01:28.000000000 -0400 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 2 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 3 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0007-glob-fix-dequote_pathname-vs.-udequote_pathname.patch b/package/bash/0003-glob-fix-dequote_pathname-vs.-udequote_pathname.patch similarity index 100% rename from package/bash/0007-glob-fix-dequote_pathname-vs.-udequote_pathname.patch rename to package/bash/0003-glob-fix-dequote_pathname-vs.-udequote_pathname.patch diff --git a/package/bash/0004-bash51-004.patch b/package/bash/0004-bash51-004.patch deleted file mode 100644 index 48a38645f7..0000000000 --- a/package/bash/0004-bash51-004.patch +++ /dev/null @@ -1,129 +0,0 @@ -[From http://mirror.keystealth.org/gnu/bash/bash-5.1-patches/bash51-004] -Signed-off-by: Peter Seiderer - - BASH PATCH REPORT - ================= - -Bash-Release: 5.1 -Patch-ID: bash51-004 - -Bug-Reported-by: oguzismailuysal@gmail.com -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00039.html - -Bug-Description: - -If a key-value compound array assignment to an associative array is supplied -as an assignment statement argument to the `declare' command that declares the -array, the assignment doesn't perform the correct word expansions. - -This patch makes key-value assignment and subscript assignment perform the -same expansions when they're supplied as an argument to `declare'. - -Patch (apply with `patch -p0'): - -*** ../bash-5.1-patched/arrayfunc.c 2020-10-09 11:38:58.000000000 -0400 ---- b/arrayfunc.c 2020-12-11 15:12:22.000000000 -0500 -*************** -*** 598,601 **** ---- 598,622 ---- - } - } -+ -+ /* Return non-zero if L appears to be a key-value pair associative array -+ compound assignment. */ -+ int -+ kvpair_assignment_p (l) -+ WORD_LIST *l; -+ { -+ return (l && (l->word->flags & W_ASSIGNMENT) == 0 && l->word->word[0] != '['); /*]*/ -+ } -+ -+ char * -+ expand_and_quote_kvpair_word (w) -+ char *w; -+ { -+ char *t, *r; -+ -+ t = w ? expand_assignment_string_to_string (w, 0) : 0; -+ r = sh_single_quote (t ? t : ""); -+ free (t); -+ return r; -+ } - #endif - -*************** -*** 641,645 **** - - #if ASSOC_KVPAIR_ASSIGNMENT -! if (assoc_p (var) && nlist && (nlist->word->flags & W_ASSIGNMENT) == 0 && nlist->word->word[0] != '[') /*]*/ - { - iflags = flags & ~ASS_APPEND; ---- 662,666 ---- - - #if ASSOC_KVPAIR_ASSIGNMENT -! if (assoc_p (var) && kvpair_assignment_p (nlist)) - { - iflags = flags & ~ASS_APPEND; -*** ../bash-5.1-patched/arrayfunc.h 2020-04-29 17:24:15.000000000 -0400 ---- b/arrayfunc.h 2020-12-11 14:23:50.000000000 -0500 -*************** -*** 68,71 **** ---- 68,74 ---- - extern void quote_compound_array_list PARAMS((WORD_LIST *, int)); - -+ extern int kvpair_assignment_p PARAMS((WORD_LIST *)); -+ extern char *expand_and_quote_kvpair_word PARAMS((char *)); -+ - extern int unbind_array_element PARAMS((SHELL_VAR *, char *, int)); - extern int skipsubscript PARAMS((const char *, int, int)); -*** ../bash-5.1-patched/subst.c 2020-11-16 10:33:15.000000000 -0500 ---- b/subst.c 2020-12-11 15:11:10.000000000 -0500 -*************** -*** 11605,11608 **** ---- 11605,11609 ---- - WORD_LIST *l, *nl; - char *t; -+ int kvpair; - - if (flags == 0) -*************** -*** 11619,11622 **** ---- 11620,11627 ---- - /* Associative array */ - l = parse_string_to_word_list (value, 1, "array assign"); -+ #if ASSOC_KVPAIR_ASSIGNMENT -+ kvpair = kvpair_assignment_p (l); -+ #endif -+ - /* For associative arrays, with their arbitrary subscripts, we have to - expand and quote in one step so we don't have to search for the -*************** -*** 11624,11627 **** ---- 11629,11638 ---- - for (nl = l; nl; nl = nl->next) - { -+ #if ASSOC_KVPAIR_ASSIGNMENT -+ if (kvpair) -+ /* keys and values undergo the same set of expansions */ -+ t = expand_and_quote_kvpair_word (nl->word->word); -+ else -+ #endif - if ((nl->word->flags & W_ASSIGNMENT) == 0) - t = sh_single_quote (nl->word->word ? nl->word->word : ""); - -*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 ---- b/patchlevel.h 2020-10-01 11:01:28.000000000 -0400 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 3 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 4 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash.hash b/package/bash/bash.hash index 2e547c8c30..4660e9d38a 100644 --- a/package/bash/bash.hash +++ b/package/bash/bash.hash @@ -1,4 +1,4 @@ # Locally calculated after checking pgp signature from -# http://mirror.keystealth.org/gnu/bash/bash-5.1.tar.gz.sig -sha256 cc012bc860406dcf42f64431bcd3d2fa7560c02915a601aba9cd597a39329baa bash-5.1.tar.gz +# https://ftp.gnu.org/gnu/bash/bash-5.1.16.tar.gz.sig +sha256 5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558 bash-5.1.16.tar.gz sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/bash/bash.mk b/package/bash/bash.mk index 7b853ece08..3aca22898e 100644 --- a/package/bash/bash.mk +++ b/package/bash/bash.mk @@ -4,7 +4,7 @@ # ################################################################################ -BASH_VERSION = 5.1 +BASH_VERSION = 5.1.16 BASH_SITE = $(BR2_GNU_MIRROR)/bash BASH_DEPENDENCIES = ncurses readline host-bison BASH_LICENSE = GPL-3.0+ diff --git a/package/ca-certificates/0001-mozilla-certdata2pem.py-make-cryptography-module-opt.patch b/package/ca-certificates/0001-mozilla-certdata2pem.py-make-cryptography-module-opt.patch new file mode 100644 index 0000000000..b76c1bfd7f --- /dev/null +++ b/package/ca-certificates/0001-mozilla-certdata2pem.py-make-cryptography-module-opt.patch @@ -0,0 +1,59 @@ +From bf18b564122e8f976681a2398862fde1eafd84ba Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 6 Jan 2022 23:15:00 +0100 +Subject: [PATCH] mozilla/certdata2pem.py: make cryptography module optional + +The Python cryptography module is only used to verify if trusted +certificates have expired, but this is only a warning. For some build +systems and distributions, providing Python cryptography is costly, +especially since it's now partly written in Rust. + +As the check is only a warning, it's anyway going to be overlooked by +most people. This commit changes the check to be optional: if the +cryptography Python module is there, we perform the check, otherwise +the check is skipped. + +Signed-off-by: Thomas Petazzoni +--- + mozilla/certdata2pem.py | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/mozilla/certdata2pem.py b/mozilla/certdata2pem.py +index ede23d4..a6261f8 100644 +--- a/mozilla/certdata2pem.py ++++ b/mozilla/certdata2pem.py +@@ -28,9 +28,6 @@ import sys + import textwrap + import io + +-from cryptography import x509 +- +- + objects = [] + + # Dirty file parser. +@@ -122,11 +119,16 @@ for obj in objects: + if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]: + continue + +- cert = x509.load_der_x509_certificate(obj['CKA_VALUE']) +- if cert.not_valid_after < datetime.datetime.now(): +- print('!'*74) +- print('Trusted but expired certificate found: %s' % obj['CKA_LABEL']) +- print('!'*74) ++ try: ++ from cryptography import x509 ++ ++ cert = x509.load_der_x509_certificate(obj['CKA_VALUE']) ++ if cert.not_valid_after < datetime.datetime.now(): ++ print('!'*74) ++ print('Trusted but expired certificate found: %s' % obj['CKA_LABEL']) ++ print('!'*74) ++ except ImportError: ++ pass + + bname = obj['CKA_LABEL'][1:-1].replace('/', '_')\ + .replace(' ', '_')\ +-- +2.33.1 + diff --git a/package/ca-certificates/ca-certificates.mk b/package/ca-certificates/ca-certificates.mk index 7084ab781e..0b6962ab7b 100644 --- a/package/ca-certificates/ca-certificates.mk +++ b/package/ca-certificates/ca-certificates.mk @@ -7,7 +7,7 @@ CA_CERTIFICATES_VERSION = 20211016 CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz CA_CERTIFICATES_SITE = https://snapshot.debian.org/archive/debian/20211022T144903Z/pool/main/c/ca-certificates -CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python3 host-python-cryptography +CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python3 CA_CERTIFICATES_LICENSE = GPL-2.0+ (script), MPL-2.0 (data) CA_CERTIFICATES_LICENSE_FILES = debian/copyright diff --git a/package/cloudflared/Config.in b/package/cloudflared/Config.in new file mode 100644 index 0000000000..018937d640 --- /dev/null +++ b/package/cloudflared/Config.in @@ -0,0 +1,3 @@ +config BR2_PACKAGE_CLOUDFLARED + bool "cloudflared" + diff --git a/package/cloudflared/cloudflared.mk b/package/cloudflared/cloudflared.mk new file mode 100644 index 0000000000..c580112c7d --- /dev/null +++ b/package/cloudflared/cloudflared.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# cloudflared +# +################################################################################ + +CLOUDFLARED_VERSION = 2022.7.1 + +CLOUDFLARED_ARCH = $(call qstrip,$(BR2_ARCH)) +ifeq ($(CLOUDFLARED_ARCH), arm) + CLOUDFLARED_ARCH = armhf +else + ifeq ($(CLOUDFLARED_ARCH), aarch64) + CLOUDFLARED_ARCH = arm64 + endif +endif + +CLOUDFLARED_SITE = https://github.com/cloudflare/cloudflared/releases/download/$(CLOUDFLARED_VERSION) +CLOUDFLARED_SOURCE = cloudflared-linux-$(CLOUDFLARED_ARCH) +CLOUDFLARED_LICENSE = Apache-2.0 + +define CLOUDFLARED_EXTRACT_CMDS + cp "$(CLOUDFLARED_DL_DIR)/$(CLOUDFLARED_SOURCE)" "$(@D)" +endef + +define CLOUDFLARED_BUILD_CMDS + $(TARGET_STRIP) $(@D)/$(CLOUDFLARED_SOURCE) -o $(@D)/cloudflared + xz "$(@D)/cloudflared" -z -c > "$(@D)/cloudflared.xz" +endef + +define CLOUDFLARED_INSTALL_TARGET_CMDS + cp "$(@D)/cloudflared.xz" $(TARGET_DIR)/usr/libexec +endef + +$(eval $(generic-package)) diff --git a/package/containerd/Config.in b/package/containerd/Config.in index 0e3a55ef39..2dd04b109c 100644 --- a/package/containerd/Config.in +++ b/package/containerd/Config.in @@ -5,7 +5,7 @@ config BR2_PACKAGE_CONTAINERD depends on BR2_TOOLCHAIN_HAS_THREADS depends on !BR2_TOOLCHAIN_USES_UCLIBC # runc depends on BR2_USE_MMU # util-linux - select BR2_PACKAGE_RUNC # runtime dependency + select BR2_PACKAGE_RUNC if !BR2_PACKAGE_CRUN # runtime dependency select BR2_PACKAGE_UTIL_LINUX # runtime dependency select BR2_PACKAGE_UTIL_LINUX_BINARIES select BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT @@ -20,12 +20,46 @@ if BR2_PACKAGE_CONTAINERD config BR2_PACKAGE_CONTAINERD_DRIVER_BTRFS bool "btrfs snapshot driver" - depends on BR2_USE_MMU # btrfs-progs - depends on BR2_TOOLCHAIN_HAS_THREADS # btrfs-progs - select BR2_PACKAGE_BTRFS_PROGS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 help Build the btrfs snapshot driver for containerd. +comment "brtfs snapshot driver needs headers >= 4.12" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 + +config BR2_PACKAGE_CONTAINERD_DRIVER_DEVMAPPER + bool "devmapper snapshot driver" + depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2 + depends on BR2_USE_MMU # lvm2 + depends on !BR2_STATIC_LIBS # lvm2 + select BR2_PACKAGE_LVM2 + help + Build the devmapper snapshot driver for containerd. + +comment "devmapper snapshot driver needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_CONTAINERD_DRIVER_ZFS + bool "zfs snapshot driver" + depends on BR2_LINUX_KERNEL # zfs + depends on BR2_PACKAGE_HAS_UDEV # zfs + depends on BR2_USE_MMU # zfs + depends on BR2_TOOLCHAIN_HAS_THREADS # zfs + select BR2_PACKAGE_ZFS + help + Build the zfs snapshot driver for containerd. + +comment "zfs snapshot driver needs a Linux kernel, udev, toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_LINUX_KERNEL || !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_CONTAINERD_CRI + bool "Kubernetes CRI support" + help + Build containerd with Kubernetes CRI support. + endif comment "containerd needs a glibc or musl toolchain w/ threads" diff --git a/package/containerd/containerd.hash b/package/containerd/containerd.hash index 594c56a819..193003e5a3 100644 --- a/package/containerd/containerd.hash +++ b/package/containerd/containerd.hash @@ -1,3 +1,3 @@ # Computed locally -sha256 09be0cedea77568029aa0c7be9a323b89fa6886b402b5d223780a05b8c7cd45a containerd-1.5.7.tar.gz +sha256 ae55b25fb04b45dfbbde8280b034783a48ae7c40350d17fd272be5cbf0284cf1 containerd-1.7.14.tar.gz sha256 4bbe3b885e8cd1907ab4cf9a41e862e74e24b5422297a4f2fe524e6a30ada2b4 LICENSE diff --git a/package/containerd/containerd.mk b/package/containerd/containerd.mk index fdbd2bf3e6..81875f763c 100644 --- a/package/containerd/containerd.mk +++ b/package/containerd/containerd.mk @@ -4,12 +4,11 @@ # ################################################################################ -CONTAINERD_VERSION = 1.5.7 +CONTAINERD_VERSION = 1.7.14 CONTAINERD_SITE = $(call github,containerd,containerd,v$(CONTAINERD_VERSION)) CONTAINERD_LICENSE = Apache-2.0 CONTAINERD_LICENSE_FILES = LICENSE CONTAINERD_CPE_ID_VENDOR = linuxfoundation -CONTAINERD_CPE_ID_PRODUCT = containerd CONTAINERD_GOMOD = github.com/containerd/containerd @@ -24,6 +23,7 @@ CONTAINERD_BUILD_TARGETS = \ cmd/ctr CONTAINERD_INSTALL_BINS = $(notdir $(CONTAINERD_BUILD_TARGETS)) +CONTAINERD_TAGS = no_aufs ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y) CONTAINERD_DEPENDENCIES += libapparmor @@ -35,10 +35,26 @@ CONTAINERD_DEPENDENCIES += libseccomp host-pkgconf CONTAINERD_TAGS += seccomp endif -ifeq ($(BR2_PACKAGE_CONTAINERD_DRIVER_BTRFS),y) -CONTAINERD_DEPENDENCIES += btrfs-progs -else +ifneq ($(BR2_PACKAGE_CONTAINERD_DRIVER_BTRFS),y) CONTAINERD_TAGS += no_btrfs endif +ifneq ($(BR2_PACKAGE_CONTAINERD_DRIVER_DEVMAPPER),y) +CONTAINERD_TAGS += no_devmapper +endif + +ifneq ($(BR2_PACKAGE_CONTAINERD_DRIVER_ZFS),y) +CONTAINERD_TAGS += no_zfs +endif + +ifneq ($(BR2_PACKAGE_CONTAINERD_CRI),y) +CONTAINERD_TAGS += no_cri +endif + +define CONTAINERD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/containerd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/containerd.service + $(SED) 's,/usr/local/bin,/usr/bin,g' $(TARGET_DIR)/usr/lib/systemd/system/containerd.service +endef + $(eval $(golang-package)) diff --git a/package/docker-cli/docker-cli.hash b/package/docker-cli/docker-cli.hash index 6eb9413a11..9b231f03b1 100644 --- a/package/docker-cli/docker-cli.hash +++ b/package/docker-cli/docker-cli.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 d91010813824070dd2380013c8f343e61e6dda170f7853f024bda39b432b64ba docker-cli-20.10.9.tar.gz +sha256 37bc1c71a782fc10d35aa6708c1b3c90a71f3947c33665cb0de68df25dc14d94 docker-cli-23.0.1.tar.gz sha256 2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0 LICENSE diff --git a/package/docker-cli/docker-cli.mk b/package/docker-cli/docker-cli.mk index 3a344bca36..38d903150c 100644 --- a/package/docker-cli/docker-cli.mk +++ b/package/docker-cli/docker-cli.mk @@ -4,7 +4,7 @@ # ################################################################################ -DOCKER_CLI_VERSION = 20.10.9 +DOCKER_CLI_VERSION = 23.0.1 DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION)) DOCKER_CLI_LICENSE = Apache-2.0 @@ -29,6 +29,15 @@ DOCKER_CLI_TAGS += osusergo netgo DOCKER_CLI_GO_ENV = CGO_ENABLED=no endif +# create the go.mod file with language version go1.19 +# remove the conflicting vendor/modules.txt +# https://github.com/moby/moby/issues/44618#issuecomment-1343565705 +define DOCKER_CLI_FIX_VENDORING + printf "module $(DOCKER_CLI_GOMOD)\n\ngo 1.19\n" > $(@D)/go.mod + rm -f $(@D)/vendor/modules.txt +endef +DOCKER_CLI_POST_EXTRACT_HOOKS += DOCKER_CLI_FIX_VENDORING + DOCKER_CLI_INSTALL_BINS = $(notdir $(DOCKER_CLI_BUILD_TARGETS)) $(eval $(golang-package)) diff --git a/package/docker-compose/0001-Strip-up-generic-versions-and-bump-requests.patch b/package/docker-compose/0001-Strip-up-generic-versions-and-bump-requests.patch deleted file mode 100644 index 536a9590dd..0000000000 --- a/package/docker-compose/0001-Strip-up-generic-versions-and-bump-requests.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 2bb1a267aba3ca5fe414d0f79192def668c18bab Mon Sep 17 00:00:00 2001 -From: Ulysses Souza -Date: Tue, 2 Jul 2019 15:49:07 +0200 -Subject: [PATCH] Strip up generic versions and bump requests - -Replaces generic limitations with a next major value -Bump the minimal `requests` to 2.20.0 - -Signed-off-by: Ulysses Souza -(cherry picked from commit ce5451c5b4a3b449ce703168d2a568b0a4d25ee6) -Signed-off-by: Peter Korsgaard ---- - setup.py | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -diff --git a/setup.py b/setup.py -index 8371cc75..61447801 100644 ---- a/setup.py -+++ b/setup.py -@@ -31,31 +31,31 @@ def find_version(*file_paths): - - install_requires = [ - 'cached-property >= 1.2.0, < 2', -- 'docopt >= 0.6.1, < 0.7', -- 'PyYAML >= 3.10, < 4.3', -- 'requests >= 2.6.1, != 2.11.0, != 2.12.2, != 2.18.0, < 2.21', -- 'texttable >= 0.9.0, < 0.10', -- 'websocket-client >= 0.32.0, < 1.0', -- 'docker[ssh] >= 3.7.0, < 4.0', -- 'dockerpty >= 0.4.1, < 0.5', -+ 'docopt >= 0.6.1, < 1', -+ 'PyYAML >= 3.10, < 5', -+ 'requests >= 2.20.0, < 3', -+ 'texttable >= 0.9.0, < 1', -+ 'websocket-client >= 0.32.0, < 1', -+ 'docker[ssh] >= 3.7.0, < 5', -+ 'dockerpty >= 0.4.1, < 1', - 'six >= 1.3.0, < 2', - 'jsonschema >= 2.5.1, < 3', - ] - - - tests_require = [ -- 'pytest', -+ 'pytest < 6', - ] - - - if sys.version_info[:2] < (3, 4): -- tests_require.append('mock >= 1.0.1') -+ tests_require.append('mock >= 1.0.1, < 2') - - extras_require = { - ':python_version < "3.4"': ['enum34 >= 1.0.4, < 2'], -- ':python_version < "3.5"': ['backports.ssl_match_hostname >= 3.5'], -- ':python_version < "3.3"': ['ipaddress >= 1.0.16'], -- ':sys_platform == "win32"': ['colorama >= 0.4, < 0.5'], -+ ':python_version < "3.5"': ['backports.ssl_match_hostname >= 3.5, < 4'], -+ ':python_version < "3.3"': ['ipaddress >= 1.0.16, < 2'], -+ ':sys_platform == "win32"': ['colorama >= 0.4, < 1'], - 'socks': ['PySocks >= 1.5.6, != 1.5.7, < 2'], - } - --- -2.20.1 - diff --git a/package/docker-compose/0002-Bump-texttable-from-0.9.1-to-1.6.2.patch b/package/docker-compose/0002-Bump-texttable-from-0.9.1-to-1.6.2.patch deleted file mode 100644 index 92c2e1f133..0000000000 --- a/package/docker-compose/0002-Bump-texttable-from-0.9.1-to-1.6.2.patch +++ /dev/null @@ -1,41 +0,0 @@ -From e55dd65ba42a17ba4b017b42f14f7ee647efe64f Mon Sep 17 00:00:00 2001 -From: Ulysses Souza -Date: Mon, 8 Jul 2019 14:52:30 +0200 -Subject: [PATCH] Bump texttable from 0.9.1 to 1.6.2 - -Signed-off-by: Ulysses Souza -(cherry picked from commit 0bfa1c34f054d86674434770d4d6340e02508e52) -Signed-off-by: Peter Korsgaard ---- - requirements.txt | 2 +- - setup.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/requirements.txt b/requirements.txt -index 6007ee3f..d868fdeb 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -19,6 +19,6 @@ PySocks==1.6.7 - PyYAML==4.2b1 - requests==2.20.0 - six==1.10.0 --texttable==0.9.1 -+texttable==1.6.2 - urllib3==1.21.1; python_version == '3.3' - websocket-client==0.56.0 -diff --git a/setup.py b/setup.py -index 61447801..c9e4729d 100644 ---- a/setup.py -+++ b/setup.py -@@ -34,7 +34,7 @@ install_requires = [ - 'docopt >= 0.6.1, < 1', - 'PyYAML >= 3.10, < 5', - 'requests >= 2.20.0, < 3', -- 'texttable >= 0.9.0, < 1', -+ 'texttable >= 0.9.0, < 2', - 'websocket-client >= 0.32.0, < 1', - 'docker[ssh] >= 3.7.0, < 5', - 'dockerpty >= 0.4.1, < 1', --- -2.20.1 - diff --git a/package/docker-compose/0003-support-PyYAML-up-to-5.1-version.patch b/package/docker-compose/0003-support-PyYAML-up-to-5.1-version.patch deleted file mode 100644 index ecbd197a51..0000000000 --- a/package/docker-compose/0003-support-PyYAML-up-to-5.1-version.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 3be619b814c16c02a02499e7a157dabd065926dd Mon Sep 17 00:00:00 2001 -From: Sergey Fursov -Date: Sun, 31 Mar 2019 12:45:50 +0700 -Subject: [PATCH] support PyYAML up to 5.1 version - -Signed-off-by: Sergey Fursov -[Upstream: https://github.com/docker/compose/pull/6623] -(cherry picked from commit d2ca096f46a56cd4db494c593ed84e5c255dc15d) -[Peter: allow all 5.x] -Signed-off-by: Peter Korsgaard ---- - requirements.txt | 2 +- - setup.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/requirements.txt b/requirements.txt -index d868fdeb..e3dbc807 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -16,7 +16,7 @@ paramiko==2.4.2 - pypiwin32==219; sys_platform == 'win32' and python_version < '3.6' - pypiwin32==223; sys_platform == 'win32' and python_version >= '3.6' - PySocks==1.6.7 --PyYAML==4.2b1 -+PyYAML==5.1 - requests==2.20.0 - six==1.10.0 - texttable==1.6.2 -diff --git a/setup.py b/setup.py -index c9e4729d..17ab678e 100644 ---- a/setup.py -+++ b/setup.py -@@ -32,7 +32,7 @@ def find_version(*file_paths): - install_requires = [ - 'cached-property >= 1.2.0, < 2', - 'docopt >= 0.6.1, < 1', -- 'PyYAML >= 3.10, < 5', -+ 'PyYAML >= 3.10, < 6', - 'requests >= 2.20.0, < 3', - 'texttable >= 0.9.0, < 2', - 'websocket-client >= 0.32.0, < 1', --- -2.20.1 - diff --git a/package/docker-compose/Config.in b/package/docker-compose/Config.in index 8e16b60521..59128f7a19 100644 --- a/package/docker-compose/Config.in +++ b/package/docker-compose/Config.in @@ -1,29 +1,15 @@ config BR2_PACKAGE_DOCKER_COMPOSE bool "docker-compose" - depends on !BR2_PACKAGE_PYTHON # python-paramiko -> python-bcrypt - depends on BR2_USE_MMU # python - depends on BR2_USE_WCHAR # python - depends on BR2_TOOLCHAIN_HAS_THREADS # python - depends on !BR2_STATIC_LIBS # python - depends on BR2_INSTALL_LIBSTDCPP # python-paramiko -> python-cryptography - select BR2_PACKAGE_PYTHON3 - select BR2_PACKAGE_PYTHON_CACHED_PROPERTY # runtime - select BR2_PACKAGE_PYTHON_DOCOPT # runtime - select BR2_PACKAGE_PYTHON_PARAMIKO # runtime - select BR2_PACKAGE_PYTHON_PYYAML # runtime - select BR2_PACKAGE_PYTHON_REQUESTS # runtime - select BR2_PACKAGE_PYTHON_TEXTTABLE # runtime - select BR2_PACKAGE_PYTHON_WEBSOCKET_CLIENT # runtime - select BR2_PACKAGE_PYTHON_DOCKER # runtime - select BR2_PACKAGE_PYTHON_DOCKERPTY # runtime - select BR2_PACKAGE_PYTHON_SIX # runtime - select BR2_PACKAGE_PYTHON_JSONSCHEMA # runtime + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_DOCKER_CLI help - Multi-container orchestration for Docker. + Multi-container applications with the Docker CLI. - https://www.docker.com/ + https://github.com/docker/compose -comment "docker-compose needs a toolchain w/ C++, wchar, threads, dynamic library" - depends on BR2_USE_MMU - depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ - BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP +comment "docker-compose needs docker-cli and a toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_DOCKER_CLI diff --git a/package/docker-compose/docker-compose.hash b/package/docker-compose/docker-compose.hash index aa29a6d6cb..d55e35eb16 100644 --- a/package/docker-compose/docker-compose.hash +++ b/package/docker-compose/docker-compose.hash @@ -1,5 +1,3 @@ -# from https://pypi.python.org/pypi/docker-compose/json -sha256 a5d58e974fd717e24b0dda6669a46bc03548d9023ef38d965acdc32d4d5fa753 docker-compose-1.24.1.tar.gz - -# locally computed -sha256 552a739c3b25792263f731542238b92f6f8d07e9a488eae27e6c4690038a8243 LICENSE +# Locally computed +sha256 105328838a48dad4a305903c5ae98b928e8a4ea3546e1711690e9eef7e0232be docker-compose-2.26.1.tar.gz +sha256 58d1e17ffe5109a7ae296caafcadfdbe6a7d176f0bc4ab01e12a689b0499d8bd LICENSE diff --git a/package/docker-compose/docker-compose.mk b/package/docker-compose/docker-compose.mk index ec24157c56..66a88ac7e7 100644 --- a/package/docker-compose/docker-compose.mk +++ b/package/docker-compose/docker-compose.mk @@ -4,10 +4,19 @@ # ################################################################################ -DOCKER_COMPOSE_VERSION = 1.24.1 -DOCKER_COMPOSE_SITE = https://files.pythonhosted.org/packages/b6/a4/59c39df6a23144a6252ad33170dfbf781af5953651e4587e8ea5f995f95e -DOCKER_COMPOSE_SETUP_TYPE = setuptools +DOCKER_COMPOSE_VERSION = 2.26.1 +DOCKER_COMPOSE_SITE = $(call github,docker,compose,v$(DOCKER_COMPOSE_VERSION)) DOCKER_COMPOSE_LICENSE = Apache-2.0 DOCKER_COMPOSE_LICENSE_FILES = LICENSE -$(eval $(python-package)) +DOCKER_COMPOSE_BUILD_TARGETS = cmd +DOCKER_COMPOSE_GOMOD = github.com/docker/compose/v2 +DOCKER_COMPOSE_LDFLAGS = \ + -X github.com/docker/compose/v2/internal.Version=$(DOCKER_COMPOSE_VERSION) + +define DOCKER_COMPOSE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/bin/cmd \ + $(TARGET_DIR)/usr/lib/docker/cli-plugins/docker-compose +endef + +$(eval $(golang-package)) diff --git a/package/docker-engine/Config.in b/package/docker-engine/Config.in index 911cbfe428..570b2ff681 100644 --- a/package/docker-engine/Config.in +++ b/package/docker-engine/Config.in @@ -5,11 +5,12 @@ config BR2_PACKAGE_DOCKER_ENGINE depends on BR2_TOOLCHAIN_HAS_THREADS depends on !BR2_TOOLCHAIN_USES_UCLIBC # containerd -> runc depends on BR2_USE_MMU # containerd + depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS # libseccomp + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # libseccomp select BR2_PACKAGE_CGROUPFS_MOUNT if !BR2_PACKAGE_SYSTEMD # runtime dependency select BR2_PACKAGE_CONTAINERD # runtime dependency - select BR2_PACKAGE_DOCKER_PROXY # runtime dependency select BR2_PACKAGE_IPTABLES # runtime dependency - select BR2_PACKAGE_SQLITE # runtime dependency + select BR2_PACKAGE_LIBSECCOMP help Docker is a platform to build, ship, and run applications as lightweight containers. @@ -50,8 +51,11 @@ config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS endif -comment "docker-engine needs a glibc or musl toolchain w/ threads" +comment "docker-engine needs a glibc or musl toolchain w/ threads, headers >= 3.17" depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_UCLIBC + depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_TOOLCHAIN_USES_UCLIBC || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 depends on BR2_USE_MMU diff --git a/package/docker-engine/docker-engine.hash b/package/docker-engine/docker-engine.hash index 5e15842859..092ec989cf 100644 --- a/package/docker-engine/docker-engine.hash +++ b/package/docker-engine/docker-engine.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 359e8854d0d51bc884d434f182f64ca62f25fbbe7b9c6a336eb09f212fe8cc9a docker-engine-20.10.9.tar.gz +sha256 f502eba135828ae52cefb12f1c74092c8865e39cb94f5daed0f3f6717a8d50a3 docker-engine-23.0.5.tar.gz sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk index 84366d9334..f904793aa2 100644 --- a/package/docker-engine/docker-engine.mk +++ b/package/docker-engine/docker-engine.mk @@ -4,13 +4,13 @@ # ################################################################################ -DOCKER_ENGINE_VERSION = 20.10.9 +DOCKER_ENGINE_VERSION = 23.0.5 DOCKER_ENGINE_SITE = $(call github,moby,moby,v$(DOCKER_ENGINE_VERSION)) DOCKER_ENGINE_LICENSE = Apache-2.0 DOCKER_ENGINE_LICENSE_FILES = LICENSE -DOCKER_ENGINE_DEPENDENCIES = host-pkgconf +DOCKER_ENGINE_DEPENDENCIES = host-pkgconf libseccomp DOCKER_ENGINE_GOMOD = github.com/docker/docker DOCKER_ENGINE_CPE_ID_VENDOR = docker @@ -24,16 +24,10 @@ DOCKER_ENGINE_LDFLAGS = \ -X $(DOCKER_ENGINE_GOMOD)/dockerversion.Version="$(DOCKER_ENGINE_VERSION)" DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs -DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd +DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd cmd/docker-proxy ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y) DOCKER_ENGINE_DEPENDENCIES += libapparmor -DOCKER_ENGINE_TAGS += apparmor -endif - -ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) -DOCKER_ENGINE_TAGS += seccomp -DOCKER_ENGINE_DEPENDENCIES += libseccomp endif ifeq ($(BR2_INIT_SYSTEMD),y) @@ -62,6 +56,15 @@ else DOCKER_ENGINE_TAGS += exclude_graphdriver_vfs endif +# create the go.mod file with language version go1.19 +# remove the conflicting vendor/modules.txt +# https://github.com/moby/moby/issues/44618#issuecomment-1343565705 +define DOCKER_ENGINE_FIX_VENDORING + printf "module $(DOCKER_ENGINE_GOMOD)\n\ngo 1.19\n" > $(@D)/go.mod + rm -f $(@D)/vendor/modules.txt +endef +DOCKER_ENGINE_POST_EXTRACT_HOOKS += DOCKER_ENGINE_FIX_VENDORING + DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS)) define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD @@ -124,10 +127,6 @@ define DOCKER_ENGINE_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_TARGET_MASQUERADE) $(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE) $(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE) - $(call KCONFIG_ENABLE_OPT,CONFIG_DUMMY) - $(call KCONFIG_ENABLE_OPT,CONFIG_MACVLAN) - $(call KCONFIG_ENABLE_OPT,CONFIG_IPVLAN) - $(call KCONFIG_ENABLE_OPT,CONFIG_VXLAN) $(call KCONFIG_ENABLE_OPT,CONFIG_VETH) $(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS) $(call KCONFIG_ENABLE_OPT,CONFIG_KEYS) diff --git a/package/docker-proxy/Config.in b/package/docker-proxy/Config.in deleted file mode 100644 index 7e40536537..0000000000 --- a/package/docker-proxy/Config.in +++ /dev/null @@ -1,19 +0,0 @@ -config BR2_PACKAGE_DOCKER_PROXY - bool "docker-proxy" - depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS - depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS - depends on BR2_TOOLCHAIN_HAS_THREADS - help - Libnetwork is a Container Network Model that provides a - consistent programming interface and the required network - abstractions for applications. - - This package provides docker-proxy, a run-time dependency of - Docker. - - https://github.com/docker/libnetwork - -comment "docker-proxy needs a toolchain w/ threads" - depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS - depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS - depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/docker-proxy/docker-proxy.hash b/package/docker-proxy/docker-proxy.hash deleted file mode 100644 index 58de697929..0000000000 --- a/package/docker-proxy/docker-proxy.hash +++ /dev/null @@ -1,3 +0,0 @@ -# Locally calculated -sha256 866c8d196b9396a383b437b0d775476459ed7c11f527c4f6bbf1fd08524b461d docker-proxy-55685ba49593e67f5e1c8180539379b16736c25e.tar.gz -sha256 cb5e8e7e5f4a3988e1063c142c60dc2df75605f4c46515e776e3aca6df976e14 LICENSE diff --git a/package/docker-proxy/docker-proxy.mk b/package/docker-proxy/docker-proxy.mk deleted file mode 100644 index 6600b24ed9..0000000000 --- a/package/docker-proxy/docker-proxy.mk +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################ -# -# docker-proxy -# -################################################################################ - -DOCKER_PROXY_VERSION = 55685ba49593e67f5e1c8180539379b16736c25e -DOCKER_PROXY_SITE = $(call github,docker,libnetwork,$(DOCKER_PROXY_VERSION)) - -DOCKER_PROXY_LICENSE = Apache-2.0 -DOCKER_PROXY_LICENSE_FILES = LICENSE - -DOCKER_PROXY_DEPENDENCIES = host-pkgconf - -DOCKER_PROXY_BUILD_TARGETS = cmd/proxy - -define DOCKER_PROXY_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 0755 $(@D)/bin/proxy $(TARGET_DIR)/usr/bin/docker-proxy -endef - -$(eval $(golang-package)) diff --git a/package/fakeroot/0001-skip-doc-subdirs.patch b/package/fakeroot/0001-skip-doc-subdirs.patch deleted file mode 100644 index 91663fb64d..0000000000 --- a/package/fakeroot/0001-skip-doc-subdirs.patch +++ /dev/null @@ -1,14 +0,0 @@ -For some reason, version 1.25 and up is missing all localized doc, -and thus fails on the install stage. - -Skip the directories. - -Signed-off-by: Norbert Lange ---- fakeroot-1.25.1.org/doc/Makefile.am 2020-09-22 23:52:20.000000000 +0200 -+++ fakeroot-1.25.1/doc/Makefile.am 2020-09-24 11:05:27.611298673 +0200 -@@ -1,5 +1,4 @@ - AUTOMAKE_OPTIONS=foreign --SUBDIRS = de es fr nl pt sv - - man_MANS = faked.1 fakeroot.1 - diff --git a/package/fakeroot/0002-libfakeroot.c-define-_STAT_VER-if-not-already-define.patch b/package/fakeroot/0002-libfakeroot.c-define-_STAT_VER-if-not-already-define.patch deleted file mode 100644 index 574e55e33a..0000000000 --- a/package/fakeroot/0002-libfakeroot.c-define-_STAT_VER-if-not-already-define.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 03bc0ee07fb6e293d081ffd8af1654788b434f6a Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy -Date: Thu, 11 Feb 2021 20:59:25 -0800 -Subject: [PATCH] libfakeroot.c: define _STAT_VER if not already defined -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -glibc 2.33 does does declare `_STAT_VER` anymore. - -Based on patch from Jan Pazdziora: -https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/ - -Backported from: feda578ca3608b7fc9a28a3a91293611c0ef47b7 - -Signed-off-by: Ilya Lipnitskiy -Signed-off-by: Jörg Krause ---- - libfakeroot.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/libfakeroot.c b/libfakeroot.c -index 3e80e38..14cdbc4 100644 ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -90,6 +90,16 @@ - #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b) - #endif - -+#ifndef _STAT_VER -+ #if defined (__aarch64__) -+ #define _STAT_VER 0 -+ #elif defined (__x86_64__) -+ #define _STAT_VER 1 -+ #else -+ #define _STAT_VER 3 -+ #endif -+#endif -+ - /* - These INT_* (which stands for internal) macros should always be used when - the fakeroot library owns the storage of the stat variable. --- -2.30.1 - diff --git a/package/fakeroot/0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch b/package/fakeroot/0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch deleted file mode 100644 index 8115598d64..0000000000 --- a/package/fakeroot/0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch +++ /dev/null @@ -1,80 +0,0 @@ -From feda578ca3608b7fc9a28a3a91293611c0ef47b7 Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy -Date: Thu, 11 Feb 2021 21:00:04 -0800 -Subject: [PATCH] libfakeroot.c: add wrappers for new glibc 2.33+ symbols -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch add wrappers for newly exported symbols in glibc 2.33. - -Backported from: feda578ca3608b7fc9a28a3a91293611c0ef47b7 - -Signed-off-by: Ilya Lipnitskiy -Signed-off-by: Jörg Krause ---- - libfakeroot.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - -diff --git a/libfakeroot.c b/libfakeroot.c -index 14cdbc4..d75c51f 100644 ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -1352,6 +1352,54 @@ int renameat(int olddir_fd, const char *oldpath, - #endif /* HAVE_FSTATAT */ - - -+#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33) -+/* Glibc 2.33 exports symbols for these functions in the shared lib */ -+ int lstat(const char *file_name, struct stat *statbuf) { -+ return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf); -+ } -+ int stat(const char *file_name, struct stat *st) { -+ return WRAP_STAT STAT_ARG(_STAT_VER, file_name, st); -+ } -+ int fstat(int fd, struct stat *st) { -+ return WRAP_FSTAT FSTAT_ARG(_STAT_VER, fd, st); -+ } -+ -+ #ifdef HAVE_FSTATAT -+ int fstatat(int dir_fd, const char *path, struct stat *st, int flags) { -+ return WRAP_FSTATAT FSTATAT_ARG(_STAT_VER, dir_fd, path, st, flags); -+ } -+ #endif -+ -+ #ifdef STAT64_SUPPORT -+ int lstat64(const char *file_name, struct stat64 *st) { -+ return WRAP_LSTAT64 LSTAT64_ARG(_STAT_VER, file_name, st); -+ } -+ int stat64(const char *file_name, struct stat64 *st) { -+ return WRAP_STAT64 STAT64_ARG(_STAT_VER, file_name, st); -+ } -+ int fstat64(int fd, struct stat64 *st) { -+ return WRAP_FSTAT64 FSTAT64_ARG(_STAT_VER, fd, st); -+ } -+ -+ #ifdef HAVE_FSTATAT -+ int fstatat64(int dir_fd, const char *path, struct stat64 *st, int flags) { -+ return WRAP_FSTATAT64 FSTATAT64_ARG(_STAT_VER, dir_fd, path, st, flags); -+ } -+ #endif -+ #endif -+ -+ int mknod(const char *pathname, mode_t mode, dev_t dev) { -+ return WRAP_MKNOD MKNOD_ARG(_STAT_VER, pathname, mode, &dev); -+ } -+ -+ #if defined(HAVE_FSTATAT) && defined(HAVE_MKNODAT) -+ int mknodat(int dir_fd, const char *pathname, mode_t mode, dev_t dev) { -+ return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev); -+ } -+ #endif -+#endif /* GLIBC_PREREQ */ -+ -+ - #ifdef FAKEROOT_FAKENET - pid_t fork(void) - { --- -2.30.1 - diff --git a/package/fakeroot/0004-configure.ac-fix-__xmknod-at-pointer-argument.patch b/package/fakeroot/0004-configure.ac-fix-__xmknod-at-pointer-argument.patch deleted file mode 100644 index 38dfea868b..0000000000 --- a/package/fakeroot/0004-configure.ac-fix-__xmknod-at-pointer-argument.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 432dd46e662772020306a2ce8b1be38321697e69 Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy -Date: Sat, 13 Feb 2021 19:32:08 -0800 -Subject: [PATCH] configure.ac: fix __xmknod{,at} pointer argument -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Switch default to assume * and not the absence of *. - -On glibc 2.33+, there is no definition for these functions in header -files, so the compile test doesn't work. But, we can default to using -the pointer (as is the case with newer glibc), and use the header file -on older platforms to fail the test and use no pointer. - -Backported from: c3eebec293e35b997bb46c22fb5a4e114afb5e7f - -Signed-off-by: Ilya Lipnitskiy -Signed-off-by: Jörg Krause ---- - configure.ac | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 73415d2..d85566f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -183,13 +183,13 @@ AC_MSG_CHECKING([for type of arg of __xmknod]) - ]], [[ - int __xmknod ( int ver, - const char *pathname , -- mode_t mode , dev_t dev); -+ mode_t mode , dev_t *dev); - ]])],[ -- AC_DEFINE(XMKNOD_FRTH_ARG,) -- AC_MSG_RESULT([no extra *]) -- ],[ - AC_DEFINE(XMKNOD_FRTH_ARG,[*]) - AC_MSG_RESULT([needs *]) -+ ],[ -+ AC_DEFINE(XMKNOD_FRTH_ARG,) -+ AC_MSG_RESULT([no extra *]) - - ]) - -@@ -210,13 +210,13 @@ AC_MSG_CHECKING([for type of arg of __xmknodat]) - int __xmknodat ( int ver, - int dirfd, - const char *pathname , -- mode_t mode , dev_t dev); -+ mode_t mode , dev_t *dev); - ]])],[ -- AC_DEFINE(XMKNODAT_FIFTH_ARG,) -- AC_MSG_RESULT([no extra *]) -- ],[ - AC_DEFINE(XMKNODAT_FIFTH_ARG,[*]) - AC_MSG_RESULT([needs *]) -+ ],[ -+ AC_DEFINE(XMKNODAT_FIFTH_ARG,) -+ AC_MSG_RESULT([no extra *]) - - ]) - --- -2.30.1 - diff --git a/package/fakeroot/0005-fix-build-regression-on-macOS.patch b/package/fakeroot/0005-fix-build-regression-on-macOS.patch deleted file mode 100644 index d5589a79f5..0000000000 --- a/package/fakeroot/0005-fix-build-regression-on-macOS.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 3590b817df703a256f2c1de9a5f5469eaa1c86e9 Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy -Date: Mon, 15 Feb 2021 11:07:56 -0800 -Subject: [PATCH] fix build regression on macOS - -Signed-off-by: Felix Fietkau -Signed-off-by: Ilya Lipnitskiy -[Ryan: backported from 8090dffdad8fda86dccd47ce7a7db8840bdf7d7b] -Signed-off-by: Ryan Barnett ---- - configure.ac | 6 ++++++ - libfakeroot.c | 4 +++- - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index d85566f..d635df1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -181,6 +181,9 @@ AC_MSG_CHECKING([for type of arg of __xmknod]) - #include - #include - ]], [[ -+#ifndef __GLIBC__ -+#error no extra * -+#endif - int __xmknod ( int ver, - const char *pathname , - mode_t mode , dev_t *dev); -@@ -207,6 +210,9 @@ AC_MSG_CHECKING([for type of arg of __xmknodat]) - #include - #include - ]], [[ -+#ifndef __GLIBC__ -+#error no extra * -+#endif - int __xmknodat ( int ver, - int dirfd, - const char *pathname , -diff --git a/libfakeroot.c b/libfakeroot.c -index d75c51f..ec4e577 100644 ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -1352,7 +1352,8 @@ int renameat(int olddir_fd, const char *oldpath, - #endif /* HAVE_FSTATAT */ - - --#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33) -+#if defined(__GLIBC__) -+#if __GLIBC_PREREQ(2,33) - /* Glibc 2.33 exports symbols for these functions in the shared lib */ - int lstat(const char *file_name, struct stat *statbuf) { - return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf); -@@ -1397,6 +1398,7 @@ int renameat(int olddir_fd, const char *oldpath, - return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev); - } - #endif -+#endif /* __GLIBC__ */ - #endif /* GLIBC_PREREQ */ - - --- -2.25.1 - diff --git a/package/fakeroot/fakeroot.hash b/package/fakeroot/fakeroot.hash index 1a23d9e8d8..5c50c83e13 100644 --- a/package/fakeroot/fakeroot.hash +++ b/package/fakeroot/fakeroot.hash @@ -1,4 +1,4 @@ -# From http://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.25.3-1.dsc -sha256 8e903683357f7f5bcc31b879fd743391ad47691d4be33d24a76be3b6c21e956c fakeroot_1.25.3.orig.tar.gz +# From https://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.30.1-1.dsc +sha256 32ebb1f421aca0db7141c32a8c104eb95d2b45c393058b9435fbf903dd2b6a75 fakeroot_1.30.1.orig.tar.gz # License files, locally calculated sha256 fc82ca8b6fdb18d4e3e85cfd8ab58d1bcd3f1b29abe782895abd91d64763f8e7 COPYING diff --git a/package/fakeroot/fakeroot.mk b/package/fakeroot/fakeroot.mk index c3312b777b..20c75d6966 100644 --- a/package/fakeroot/fakeroot.mk +++ b/package/fakeroot/fakeroot.mk @@ -4,9 +4,9 @@ # ################################################################################ -FAKEROOT_VERSION = 1.25.3 +FAKEROOT_VERSION = 1.30.1 FAKEROOT_SOURCE = fakeroot_$(FAKEROOT_VERSION).orig.tar.gz -FAKEROOT_SITE = https://snapshot.debian.org/archive/debian/20201008T205817Z/pool/main/f/fakeroot +FAKEROOT_SITE = https://snapshot.debian.org/archive/debian/20221120T030258Z/pool/main/f/fakeroot HOST_FAKEROOT_DEPENDENCIES = host-acl # Force capabilities detection off @@ -15,14 +15,7 @@ HOST_FAKEROOT_DEPENDENCIES = host-acl HOST_FAKEROOT_CONF_ENV = \ ac_cv_header_sys_capability_h=no \ ac_cv_func_capset=no -# patching configure.ac in patch 0003 -HOST_FAKEROOT_AUTORECONF = YES FAKEROOT_LICENSE = GPL-3.0+ FAKEROOT_LICENSE_FILES = COPYING -define HOST_FAKEROOT_BUILD_AUX - mkdir -p $(@D)/build-aux -endef -HOST_FAKEROOT_POST_PATCH_HOOKS += HOST_FAKEROOT_BUILD_AUX - $(eval $(host-autotools-package)) diff --git a/package/go-bootstrap-stage1/Config.in.host b/package/go-bootstrap-stage1/Config.in.host new file mode 100644 index 0000000000..56a743caf9 --- /dev/null +++ b/package/go-bootstrap-stage1/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE1_ARCH_SUPPORTS + bool + # See src/cmd/dist/unix.c for the list of supported architectures + default y if BR2_HOSTARCH = "x86" + default y if BR2_HOSTARCH = "x86_64" + default y if BR2_HOSTARCH = "arm" diff --git a/package/go-bootstrap/go-bootstrap.hash b/package/go-bootstrap-stage1/go-bootstrap-stage1.hash similarity index 100% rename from package/go-bootstrap/go-bootstrap.hash rename to package/go-bootstrap-stage1/go-bootstrap-stage1.hash diff --git a/package/go-bootstrap-stage1/go-bootstrap-stage1.mk b/package/go-bootstrap-stage1/go-bootstrap-stage1.mk new file mode 100644 index 0000000000..3e4ee57432 --- /dev/null +++ b/package/go-bootstrap-stage1/go-bootstrap-stage1.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# go-bootstrap-stage1 +# +################################################################################ + +# Use last C-based Go compiler: v1.4.x +# See https://golang.org/doc/install/source#bootstrapFromSource +GO_BOOTSTRAP_STAGE1_VERSION = 1.4-bootstrap-20171003 +GO_BOOTSTRAP_STAGE1_SITE = https://dl.google.com/go +GO_BOOTSTRAP_STAGE1_SOURCE = go$(GO_BOOTSTRAP_STAGE1_VERSION).tar.gz + +GO_BOOTSTRAP_STAGE1_LICENSE = BSD-3-Clause +GO_BOOTSTRAP_STAGE1_LICENSE_FILES = LICENSE + +HOST_GO_BOOTSTRAP_STAGE1_ROOT = $(HOST_DIR)/lib/go-$(GO_BOOTSTRAP_STAGE1_VERSION) + +# The go build system is not compatible with ccache, so use +# HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685. +HOST_GO_BOOTSTRAP_STAGE1_MAKE_ENV = \ + GOOS=linux \ + GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_STAGE1_ROOT)" \ + GOROOT="$(@D)" \ + GOBIN="$(@D)/bin" \ + CC=$(HOSTCC_NOCCACHE) \ + CGO_ENABLED=0 + +define HOST_GO_BOOTSTRAP_STAGE1_BUILD_CMDS + cd $(@D)/src && $(HOST_GO_BOOTSTRAP_STAGE1_MAKE_ENV) ./make.bash +endef + +define HOST_GO_BOOTSTRAP_STAGE1_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_BOOTSTRAP_STAGE1_ROOT)/bin/go + $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_BOOTSTRAP_STAGE1_ROOT)/bin/gofmt + + cp -a $(@D)/lib $(HOST_GO_BOOTSTRAP_STAGE1_ROOT)/ + cp -a $(@D)/pkg $(HOST_GO_BOOTSTRAP_STAGE1_ROOT)/ + + # The Go sources must be installed to the host/ tree for the Go stdlib. + cp -a $(@D)/src $(HOST_GO_BOOTSTRAP_STAGE1_ROOT)/ +endef + +$(eval $(host-generic-package)) diff --git a/package/go-bootstrap-stage2/Config.in.host b/package/go-bootstrap-stage2/Config.in.host new file mode 100644 index 0000000000..967ddaed1d --- /dev/null +++ b/package/go-bootstrap-stage2/Config.in.host @@ -0,0 +1,4 @@ +config BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS + bool + default y + depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE1_ARCH_SUPPORTS diff --git a/package/go-bootstrap-stage2/go-bootstrap-stage2.hash b/package/go-bootstrap-stage2/go-bootstrap-stage2.hash new file mode 100644 index 0000000000..874737ea2d --- /dev/null +++ b/package/go-bootstrap-stage2/go-bootstrap-stage2.hash @@ -0,0 +1,3 @@ +# From https://go.dev/dl +sha256 13755bcce529747d5f2930dee034730c86d02bd3e521ab3e2bbede548d3b953f go1.19.10.src.tar.gz +sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 LICENSE diff --git a/package/go-bootstrap-stage2/go-bootstrap-stage2.mk b/package/go-bootstrap-stage2/go-bootstrap-stage2.mk new file mode 100644 index 0000000000..477c24299c --- /dev/null +++ b/package/go-bootstrap-stage2/go-bootstrap-stage2.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# go-bootstrap-stage2 +# +################################################################################ + +# Use last Go version that go-bootstrap-stage1 can build: v1.19.x +# See https://golang.org/doc/install/source#bootstrapFromSource +GO_BOOTSTRAP_STAGE2_VERSION = 1.19.10 +GO_BOOTSTRAP_STAGE2_SITE = https://storage.googleapis.com/golang +GO_BOOTSTRAP_STAGE2_SOURCE = go$(GO_BOOTSTRAP_STAGE2_VERSION).src.tar.gz + +GO_BOOTSTRAP_STAGE2_LICENSE = BSD-3-Clause +GO_BOOTSTRAP_STAGE2_LICENSE_FILES = LICENSE + +# Use go-bootstrap-stage1 to bootstrap. +HOST_GO_BOOTSTRAP_STAGE2_DEPENDENCIES = host-go-bootstrap-stage1 + +HOST_GO_BOOTSTRAP_STAGE2_ROOT = $(HOST_DIR)/lib/go-$(GO_BOOTSTRAP_STAGE2_VERSION) + +# The go build system is not compatible with ccache, so use +# HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685. +HOST_GO_BOOTSTRAP_STAGE2_MAKE_ENV = \ + GO111MODULE=off \ + GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE1_ROOT) \ + GOROOT_FINAL=$(HOST_GO_BOOTSTRAP_STAGE2_ROOT) \ + GOROOT="$(@D)" \ + GOBIN="$(@D)/bin" \ + GOOS=linux \ + CC=$(HOSTCC_NOCCACHE) \ + CXX=$(HOSTCXX_NOCCACHE) \ + CGO_ENABLED=0 + +define HOST_GO_BOOTSTRAP_STAGE2_BUILD_CMDS + cd $(@D)/src && \ + $(HOST_GO_BOOTSTRAP_STAGE2_MAKE_ENV) ./make.bash $(if $(VERBOSE),-v) +endef + +define HOST_GO_BOOTSTRAP_STAGE2_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_BOOTSTRAP_STAGE2_ROOT)/bin/go + $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_BOOTSTRAP_STAGE2_ROOT)/bin/gofmt + + cp -a $(@D)/lib $(HOST_GO_BOOTSTRAP_STAGE2_ROOT)/ + + mkdir -p $(HOST_GO_BOOTSTRAP_STAGE2_ROOT)/pkg + cp -a $(@D)/pkg/include $(@D)/pkg/linux_* $(HOST_GO_BOOTSTRAP_STAGE2_ROOT)/pkg/ + cp -a $(@D)/pkg/tool $(HOST_GO_BOOTSTRAP_STAGE2_ROOT)/pkg/ + + # The Go sources must be installed to the host/ tree for the Go stdlib. + cp -a $(@D)/src $(HOST_GO_BOOTSTRAP_STAGE2_ROOT)/ +endef + +$(eval $(host-generic-package)) diff --git a/package/go-bootstrap/Config.in.host b/package/go-bootstrap/Config.in.host deleted file mode 100644 index fab80d24b4..0000000000 --- a/package/go-bootstrap/Config.in.host +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS - bool - # See src/cmd/dist/unix.c for the list of support - # architectures - default y if BR2_HOSTARCH = "x86" - default y if BR2_HOSTARCH = "x86_64" - default y if BR2_HOSTARCH = "arm" diff --git a/package/go-bootstrap/go-bootstrap.mk b/package/go-bootstrap/go-bootstrap.mk deleted file mode 100644 index 71696a1540..0000000000 --- a/package/go-bootstrap/go-bootstrap.mk +++ /dev/null @@ -1,50 +0,0 @@ -################################################################################ -# -# go-bootstrap -# -################################################################################ - -# Use last C-based Go compiler: v1.4.x -# See https://golang.org/doc/install/source#bootstrapFromSource -GO_BOOTSTRAP_VERSION = 1.4-bootstrap-20171003 -GO_BOOTSTRAP_SITE = https://dl.google.com/go -GO_BOOTSTRAP_SOURCE = go$(GO_BOOTSTRAP_VERSION).tar.gz - -GO_BOOTSTRAP_LICENSE = BSD-3-Clause -GO_BOOTSTRAP_LICENSE_FILES = LICENSE - -# To build programs that need cgo support the toolchain needs to be -# available, so the toolchain is not needed to build host-go-bootstrap -# itself, but needed by other packages that depend on -# host-go-bootstrap. -HOST_GO_BOOTSTRAP_DEPENDENCIES = toolchain - -HOST_GO_BOOTSTRAP_ROOT = $(HOST_DIR)/lib/go-$(GO_BOOTSTRAP_VERSION) - -# The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE -# here. See https://github.com/golang/go/issues/11685. -HOST_GO_BOOTSTRAP_MAKE_ENV = \ - GOOS=linux \ - GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \ - GOROOT="$(@D)" \ - GOBIN="$(@D)/bin" \ - CC=$(HOSTCC_NOCCACHE) \ - CGO_ENABLED=0 - -define HOST_GO_BOOTSTRAP_BUILD_CMDS - cd $(@D)/src && $(HOST_GO_BOOTSTRAP_MAKE_ENV) ./make.bash -endef - -define HOST_GO_BOOTSTRAP_INSTALL_CMDS - $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_BOOTSTRAP_ROOT)/bin/go - $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_BOOTSTRAP_ROOT)/bin/gofmt - - cp -a $(@D)/lib $(HOST_GO_BOOTSTRAP_ROOT)/ - cp -a $(@D)/pkg $(HOST_GO_BOOTSTRAP_ROOT)/ - - # There is a known issue which requires the go sources to be installed - # https://golang.org/issue/2775 - cp -a $(@D)/src $(HOST_GO_BOOTSTRAP_ROOT)/ -endef - -$(eval $(host-generic-package)) diff --git a/package/go/0001-build.go-explicit-option-for-crosscompilation.patch b/package/go/0001-build.go-explicit-option-for-crosscompilation.patch index f76c5b1d03..992a83a644 100644 --- a/package/go/0001-build.go-explicit-option-for-crosscompilation.patch +++ b/package/go/0001-build.go-explicit-option-for-crosscompilation.patch @@ -1,4 +1,4 @@ -From e1382a731a726293e30901038c6870fa77ef6095 Mon Sep 17 00:00:00 2001 +From 6aed475557032a7ff9009e9b4b691b40b561876a Mon Sep 17 00:00:00 2001 From: Angelo Compagnucci Date: Tue, 8 May 2018 16:08:44 +0200 Subject: [PATCH] build.go: explicit option for crosscompilation @@ -17,10 +17,10 @@ Signed-off-by: Anisse Astier 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go -index 99d1db5..eb4097f 100644 +index 7c44c4a605..03500920c4 100644 --- a/src/cmd/dist/build.go +++ b/src/cmd/dist/build.go -@@ -252,12 +252,13 @@ func xinit() { +@@ -286,12 +286,13 @@ func xinit() { // $CC_FOR_goos_goarch, if set, applies only to goos/goarch. func compilerEnv(envName, def string) map[string]string { m := map[string]string{"": def} @@ -36,5 +36,5 @@ index 99d1db5..eb4097f 100644 } m[""] = env -- -2.7.4 +2.35.1 diff --git a/package/go/0002-cmd-dist-set-buildvcs-false-when-building-go-bootstr.patch b/package/go/0002-cmd-dist-set-buildvcs-false-when-building-go-bootstr.patch new file mode 100644 index 0000000000..4f53356ffc --- /dev/null +++ b/package/go/0002-cmd-dist-set-buildvcs-false-when-building-go-bootstr.patch @@ -0,0 +1,73 @@ +From 6b05378097c6a386ed9912d2471976dc39504e86 Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Thu, 27 Jul 2023 21:28:47 -0700 +Subject: [PATCH] cmd/dist: set buildvcs=false when building go-bootstrap + +When building go-bootstrap as part of the make.bash process, the cmd/dist +invokes the bootstrap Go compiler to build the go_bootstrap tool: + +${GOROOT_BOOTSTRAP}/bin/go install -tags=math_big_pure_go compiler_bootstrap purego bootstrap/cmd/... + +If there is an invalid .git directory in a parent of ${GOROOT_BOOTSTRAP}, +make.bash will fail. Reproduction of the issue: + + mkdir go-issue-61620 + cd ./go-issue-61620 + wget https://go.dev/dl/go1.19.11.src.tar.gz + mkdir go-bootstrap + tar -xf go1.19.11.src.tar.gz -C ./go-bootstrap --strip-components=1 + cd ./go-bootstrap/src/ + bash make.bash + cd ../../ + wget https://go.dev/dl/go1.20.6.src.tar.gz + mkdir go + tar -xf go1.20.6.src.tar.gz -C ./go/ --strip-components=1 + printf "gitdir: ../../does/not/exist/.git" > ./.git + cd ./go/src/ + GOROOT_BOOTSTRAP=$(pwd)/../../go-bootstrap/ bash make.bash + +The build fails with the following error: + + Building Go toolchain1 using [snip]/go-1.19.10. + error obtaining VCS status: exit status 128 + Use -buildvcs=false to disable VCS stamping. + go tool dist: FAILED: [snip]/go-1.19.10/bin/go install -tags=math_big_pure_go \ + compiler_bootstrap purego bootstrap/cmd/...: exit status 1 + +This change unconditionally sets -buildvcs=false when compiling go-bootstrap. We +don't need the revision information in those binaries anyway. Setting this flag +was previously not done as we were unsure if the go-bootstrap compiler would be +new enough to support the buildvcs build flag. Since Go 1.20.x, Go 1.19.x is the +minimum version for go-bootstrap, and supports -buildvcs=false. We can now set +-buildvcs=false without worrying about compatibility. + +Related: https://github.com/golang/go/issues/54852 +Fixes: https://github.com/golang/go/issues/61620 + +--- + +Upstream: https://github.com/golang/go/pull/61621 + +Signed-off-by: Christian Stewart + +--- + src/cmd/dist/buildtool.go | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go +index a528d7aa76..3b411d6ebb 100644 +--- a/src/cmd/dist/buildtool.go ++++ b/src/cmd/dist/buildtool.go +@@ -221,6 +221,9 @@ func bootstrapBuildTools() { + cmd := []string{ + pathf("%s/bin/go", goroot_bootstrap), + "install", ++ // Fixes cases where an invalid .git is present in a parent of GOROOT_BOOTSTRAP. ++ // See: https://github.com/golang/go/issues/61620 ++ "-buildvcs=false", + "-tags=math_big_pure_go compiler_bootstrap purego", + } + if vflag > 0 { +-- +2.41.0 + diff --git a/package/go/Config.in.host b/package/go/Config.in.host index e82ab6e81a..b87b862cec 100644 --- a/package/go/Config.in.host +++ b/package/go/Config.in.host @@ -2,13 +2,21 @@ config BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS bool default y - depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS + # See https://go.dev/doc/install/source#environment + # See src/go/build/syslist.go for the list of supported architectures depends on (BR2_arm && BR2_TOOLCHAIN_SUPPORTS_PIE) || BR2_aarch64 \ || BR2_i386 || BR2_x86_64 || BR2_powerpc64le \ - || BR2_mips64 || BR2_mips64el || BR2_s390x + || BR2_mips64 || BR2_mips64el || BR2_riscv || BR2_s390x depends on !BR2_ARM_CPU_ARMV4 # MIPS R6 support in Go has not yet been developed. depends on !BR2_MIPS_CPU_MIPS64R6 + # Go doesn't support Risc-v 32-bit. + depends on !BR2_RISCV_32 + # Go requires the following Risc-v General (G) features: + depends on !BR2_riscv || (BR2_RISCV_ISA_RVI && \ + BR2_RISCV_ISA_RVM && BR2_RISCV_ISA_RVA && \ + BR2_RISCV_ISA_RVF && BR2_RISCV_ISA_RVD) config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS bool @@ -22,4 +30,4 @@ config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS bool default y - depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE2_ARCH_SUPPORTS diff --git a/package/go/go.hash b/package/go/go.hash index 9031c33d8a..b1aed10c7c 100644 --- a/package/go/go.hash +++ b/package/go/go.hash @@ -1,3 +1,3 @@ -# From https://golang.org/dl/ -sha256 705c64251e5b25d5d55ede1039c6aa22bea40a7a931d14c370339853643c3df0 go1.17.3.src.tar.gz +# From https://go.dev/dl +sha256 dc806cf75a87e1414b5b4c3dcb9dd3e9cc98f4cfccec42b7af617d5a658a3c43 go1.21.8.src.tar.gz sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 LICENSE diff --git a/package/go/go.mk b/package/go/go.mk index 59177e54db..3ca055b25d 100644 --- a/package/go/go.mk +++ b/package/go/go.mk @@ -4,7 +4,7 @@ # ################################################################################ -GO_VERSION = 1.17.3 +GO_VERSION = 1.21.8 GO_SITE = https://storage.googleapis.com/golang GO_SOURCE = go$(GO_VERSION).src.tar.gz @@ -12,11 +12,11 @@ GO_LICENSE = BSD-3-Clause GO_LICENSE_FILES = LICENSE GO_CPE_ID_VENDOR = golang -HOST_GO_DEPENDENCIES = host-go-bootstrap -HOST_GO_GOPATH = $(HOST_DIR)/usr/share/go-path -HOST_GO_HOST_CACHE = $(HOST_DIR)/usr/share/host-go-cache +HOST_GO_DEPENDENCIES = host-go-bootstrap-stage2 +HOST_GO_GOPATH = $(HOST_DIR)/share/go-path +HOST_GO_HOST_CACHE = $(HOST_DIR)/share/host-go-cache HOST_GO_ROOT = $(HOST_DIR)/lib/go -HOST_GO_TARGET_CACHE = $(HOST_DIR)/usr/share/go-cache +HOST_GO_TARGET_CACHE = $(HOST_DIR)/share/go-cache # We pass an empty GOBIN, otherwise "go install: cannot install # cross-compiled binaries when GOBIN is set" @@ -25,7 +25,10 @@ HOST_GO_COMMON_ENV = \ GOFLAGS=-mod=vendor \ GOROOT="$(HOST_GO_ROOT)" \ GOPATH="$(HOST_GO_GOPATH)" \ + GOCACHE="$(HOST_GO_TARGET_CACHE)" \ + GOMODCACHE="$(HOST_GO_GOPATH)/pkg/mod" \ GOPROXY=off \ + GOTOOLCHAIN=local \ PATH=$(BR_PATH) \ GOBIN= \ CGO_ENABLED=$(HOST_GO_CGO_ENABLED) @@ -63,6 +66,8 @@ else ifeq ($(BR2_mips64),y) GO_GOARCH = mips64 else ifeq ($(BR2_mips64el),y) GO_GOARCH = mips64le +else ifeq ($(BR2_riscv),y) +GO_GOARCH = riscv64 else ifeq ($(BR2_s390x),y) GO_GOARCH = s390x endif @@ -71,8 +76,8 @@ endif HOST_GO_TOOLDIR = $(HOST_GO_ROOT)/pkg/tool/linux_$(GO_GOARCH) HOST_GO_TARGET_ENV = \ $(HOST_GO_COMMON_ENV) \ + GOOS="linux" \ GOARCH=$(GO_GOARCH) \ - GOCACHE="$(HOST_GO_TARGET_CACHE)" \ CC="$(TARGET_CC)" \ CXX="$(TARGET_CXX)" \ CGO_CFLAGS="$(TARGET_CFLAGS)" \ @@ -85,6 +90,7 @@ HOST_GO_TARGET_ENV = \ # any target package needing cgo support must include # 'depends on BR2_TOOLCHAIN_HAS_THREADS' in its config file. ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +HOST_GO_DEPENDENCIES += toolchain HOST_GO_CGO_ENABLED = 1 else HOST_GO_CGO_ENABLED = 0 @@ -93,6 +99,7 @@ endif HOST_GO_CROSS_ENV = \ CC_FOR_TARGET="$(TARGET_CC)" \ CXX_FOR_TARGET="$(TARGET_CXX)" \ + GOOS="linux" \ GOARCH=$(GO_GOARCH) \ $(if $(GO_GO386),GO386=$(GO_GO386)) \ $(if $(GO_GOARM),GOARM=$(GO_GOARM)) \ @@ -107,6 +114,7 @@ endif # BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS # For the convenience of host golang packages HOST_GO_HOST_ENV = \ $(HOST_GO_COMMON_ENV) \ + GOOS="" \ GOARCH="" \ GOCACHE="$(HOST_GO_HOST_CACHE)" \ CC="$(HOSTCC_NOCCACHE)" \ @@ -120,7 +128,7 @@ HOST_GO_HOST_ENV = \ HOST_GO_MAKE_ENV = \ GO111MODULE=off \ GOCACHE=$(HOST_GO_HOST_CACHE) \ - GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_ROOT) \ + GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE2_ROOT) \ GOROOT_FINAL=$(HOST_GO_ROOT) \ GOROOT="$(@D)" \ GOBIN="$(@D)/bin" \ @@ -139,21 +147,21 @@ define HOST_GO_INSTALL_CMDS $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_ROOT)/bin/go $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_ROOT)/bin/gofmt + mkdir -p $(HOST_DIR)/bin ln -sf ../lib/go/bin/go $(HOST_DIR)/bin/ ln -sf ../lib/go/bin/gofmt $(HOST_DIR)/bin/ cp -a $(@D)/lib $(HOST_GO_ROOT)/ mkdir -p $(HOST_GO_ROOT)/pkg - cp -a $(@D)/pkg/include $(@D)/pkg/linux_* $(HOST_GO_ROOT)/pkg/ + cp -a $(@D)/pkg/include $(HOST_GO_ROOT)/pkg/ cp -a $(@D)/pkg/tool $(HOST_GO_ROOT)/pkg/ - # There is a known issue which requires the go sources to be installed - # https://golang.org/issue/2775 + # The Go sources must be installed to the host/ tree for the Go stdlib. cp -a $(@D)/src $(HOST_GO_ROOT)/ - # Set all file timestamps to prevent the go compiler from rebuilding any - # built in packages when programs are built. + # Set file timestamps to prevent the Go compiler from rebuilding the stdlib + # when compiling other programs. find $(HOST_GO_ROOT) -type f -exec touch -r $(@D)/bin/go {} \; endef diff --git a/package/m4/m4.hash b/package/m4/m4.hash index a81f4fab9c..a5b8456cc2 100644 --- a/package/m4/m4.hash +++ b/package/m4/m4.hash @@ -1,4 +1,4 @@ # Locally calculated after checking pgp signature -sha256 63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96 m4-1.4.19.tar.xz +sha256 e236ea3a1ccf5f6c270b1c4bb60726f371fa49459a8eaaebc90b216b328daf2b m4-1.4.20.tar.xz # License files, locally calculated sha256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 COPYING diff --git a/package/m4/m4.mk b/package/m4/m4.mk index 3a12092971..396c2bbee2 100644 --- a/package/m4/m4.mk +++ b/package/m4/m4.mk @@ -4,11 +4,10 @@ # ################################################################################ -M4_VERSION = 1.4.19 +M4_VERSION = 1.4.20 M4_SOURCE = m4-$(M4_VERSION).tar.xz M4_SITE = $(BR2_GNU_MIRROR)/m4 M4_LICENSE = GPL-3.0+ M4_LICENSE_FILES = COPYING -HOST_M4_CONF_OPTS = --disable-static $(eval $(host-autotools-package)) diff --git a/package/python-autobahn/Config.in b/package/python-autobahn/Config.in index f719dcc8f1..92ddad0ea4 100644 --- a/package/python-autobahn/Config.in +++ b/package/python-autobahn/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_AUTOBAHN bool "python-autobahn" - depends on BR2_INSTALL_LIBSTDCPP # python-cryptography -> python-pyasn + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography depends on BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_CFFI # runtime select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime @@ -11,7 +11,3 @@ config BR2_PACKAGE_PYTHON_AUTOBAHN framework. https://pypi.python.org/pypi/autobahn - -comment "python-autobahn needs a toolchain w/ C++" - depends on !BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_PYTHON3 diff --git a/package/python-channels-redis/Config.in b/package/python-channels-redis/Config.in index 8946670180..bab801d2a9 100644 --- a/package/python-channels-redis/Config.in +++ b/package/python-channels-redis/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_PYTHON_CHANNELS_REDIS bool "python-channels-redis" - depends on BR2_INSTALL_LIBSTDCPP # python-channels -> python-daphne + # python-channels -> python-daphne -> python-autobahn -> python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS depends on BR2_PACKAGE_PYTHON3 # python-channels select BR2_PACKAGE_PYTHON_AIOREDIS # runtime select BR2_PACKAGE_PYTHON_ASGIREF # runtime @@ -12,7 +13,3 @@ config BR2_PACKAGE_PYTHON_CHANNELS_REDIS sharded configurations, as well as group support. http://github.com/django/channels_redis/ - -comment "python-channels-redis needs a toolchain w/ C++" - depends on !BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_PYTHON3 diff --git a/package/python-channels/Config.in b/package/python-channels/Config.in index 5c70f20d1c..6cd6e5f60d 100644 --- a/package/python-channels/Config.in +++ b/package/python-channels/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_PYTHON_CHANNELS bool "python-channels" - depends on BR2_INSTALL_LIBSTDCPP # python-daphne -> python-autobahn -> python-cryptography + # python-daphne -> python-autobahn -> python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS depends on BR2_PACKAGE_PYTHON3 # python-daphne select BR2_PACKAGE_PYTHON_ASGIREF # runtime select BR2_PACKAGE_PYTHON_DAPHNE # runtime @@ -14,7 +15,3 @@ config BR2_PACKAGE_PYTHON_CHANNELS own protocols and needs. http://github.com/django/channels - -comment "python-channels needs a toolchain w/ C++" - depends on !BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_PYTHON3 diff --git a/package/python-crossbar/Config.in b/package/python-crossbar/Config.in index 50b70b8e02..b72d64c19d 100644 --- a/package/python-crossbar/Config.in +++ b/package/python-crossbar/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_CROSSBAR bool "python-crossbar" - depends on BR2_INSTALL_LIBSTDCPP # python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography depends on BR2_PACKAGE_PYTHON3 # All the following dependencies are runtime dependencies select BR2_PACKAGE_PYTHON_ATTRS @@ -48,7 +48,3 @@ config BR2_PACKAGE_PYTHON_CROSSBAR components that can talk in real-time with each other. https://pypi.python.org/pypi/crossbar - -comment "python-crossbar needs a toolchain w/ C++" - depends on !BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_PYTHON3 diff --git a/package/python-cryptography/Config.in b/package/python-cryptography/Config.in index da4252d6da..07a22bf846 100644 --- a/package/python-cryptography/Config.in +++ b/package/python-cryptography/Config.in @@ -1,21 +1,11 @@ config BR2_PACKAGE_PYTHON_CRYPTOGRAPHY bool "python-cryptography" - depends on BR2_PACKAGE_PYTHON3 # python-idna - depends on BR2_INSTALL_LIBSTDCPP # python-pyasn + depends on BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_PYTHON_CFFI # runtime - select BR2_PACKAGE_PYTHON_IDNA # runtime - select BR2_PACKAGE_PYTHON_ASN1CRYPTO # runtime - select BR2_PACKAGE_PYTHON3_PYEXPAT # runtime - select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime - select BR2_PACKAGE_PYTHON_SIX # runtime - select BR2_PACKAGE_PYTHON3_SSL # runtime help cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. https://cryptography.io - -comment "python-cryptography needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-cryptography/python-cryptography.hash b/package/python-cryptography/python-cryptography.hash index 7cb38c8d3d..1219fa9b5f 100644 --- a/package/python-cryptography/python-cryptography.hash +++ b/package/python-cryptography/python-cryptography.hash @@ -1,6 +1,5 @@ -# md5, sha256 from https://pypi.org/pypi/cryptography/json -md5 e2ce2ec8a63965fad351f36ed70fde4b cryptography-3.3.2.tar.gz -sha256 5a60d3780149e13b7a6ff7ad6526b38846354d11a15e21068e57073e29e19bed cryptography-3.3.2.tar.gz +# Locally calculated after vendoring +sha256 196bba703cebc052a19f5353614fcfa9d680471990c10305f110adcc05744eeb cryptography-36.0.1.tar.gz # Locally computed sha256 checksums sha256 43dad2cc752ab721cd9a9f36ece70fb53ab7713551f2d3d8694d8e8c5a06d6e2 LICENSE sha256 aac73b3148f6d1d7111dbca32099f68d26c644c6813ae1e4f05f6579aa2663fe LICENSE.APACHE diff --git a/package/python-cryptography/python-cryptography.mk b/package/python-cryptography/python-cryptography.mk index 081dfc06a0..fc1686af9a 100644 --- a/package/python-cryptography/python-cryptography.mk +++ b/package/python-cryptography/python-cryptography.mk @@ -4,20 +4,22 @@ # ################################################################################ -PYTHON_CRYPTOGRAPHY_VERSION = 3.3.2 +PYTHON_CRYPTOGRAPHY_VERSION = 36.0.1 PYTHON_CRYPTOGRAPHY_SOURCE = cryptography-$(PYTHON_CRYPTOGRAPHY_VERSION).tar.gz -PYTHON_CRYPTOGRAPHY_SITE = https://files.pythonhosted.org/packages/d4/85/38715448253404186029c575d559879912eb8a1c5d16ad9f25d35f7c4f4c +PYTHON_CRYPTOGRAPHY_SITE = https://files.pythonhosted.org/packages/f9/4b/1cf8e281f7ae4046a59e5e39dd7471d46db9f61bb564fddbff9084c4334f PYTHON_CRYPTOGRAPHY_SETUP_TYPE = setuptools PYTHON_CRYPTOGRAPHY_LICENSE = Apache-2.0 or BSD-3-Clause PYTHON_CRYPTOGRAPHY_LICENSE_FILES = LICENSE LICENSE.APACHE LICENSE.BSD PYTHON_CRYPTOGRAPHY_CPE_ID_VENDOR = cryptography_project PYTHON_CRYPTOGRAPHY_CPE_ID_PRODUCT = cryptography -PYTHON_CRYPTOGRAPHY_DEPENDENCIES = host-python-cffi openssl -HOST_PYTHON_CRYPTOGRAPHY_NEEDS_HOST_PYTHON = python3 -HOST_PYTHON_CRYPTOGRAPHY_DEPENDENCIES = \ - host-python3-cffi \ - host-python3-six \ - host-openssl +PYTHON_CRYPTOGRAPHY_DEPENDENCIES = host-python-setuptools-rust host-python-cffi host-rustc +PYTHON_CRYPTOGRAPHY_ENV = \ + $(PKG_CARGO_ENV) \ + PYO3_CROSS_LIB_DIR="$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)" +# We need to vendor the Cargo crates at download time +PYTHON_CRYPTOGRAPHY_DOWNLOAD_POST_PROCESS = cargo +PYTHON_CRYPTOGRAPHY_DOWNLOAD_DEPENDENCIES = host-rustc +PYTHON_CRYPTOGRAPHY_DL_ENV = \ + BR_CARGO_MANIFEST_PATH=src/rust/Cargo.toml $(eval $(python-package)) -$(eval $(host-python-package)) diff --git a/package/python-daphne/Config.in b/package/python-daphne/Config.in index 601b2e1db8..c4479417e9 100644 --- a/package/python-daphne/Config.in +++ b/package/python-daphne/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_PYTHON_DAPHNE bool "python-daphne" - depends on BR2_INSTALL_LIBSTDCPP # python-autobahn -> python-cryptography + # python-autobahn -> python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS depends on BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_ASGIREF # runtime select BR2_PACKAGE_PYTHON_AUTOBAHN # runtime @@ -14,7 +15,3 @@ config BR2_PACKAGE_PYTHON_DAPHNE versus HTTP endpoints. https://github.com/django/daphne - -comment "python-daphne needs a toolchain w/ C++" - depends on !BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_PYTHON3 diff --git a/package/python-jinja2/Config.in b/package/python-jinja2/Config.in index 8ba2fa4df8..ac188d96bb 100644 --- a/package/python-jinja2/Config.in +++ b/package/python-jinja2/Config.in @@ -8,4 +8,4 @@ config BR2_PACKAGE_PYTHON_JINJA2 provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. - http://jinja.pocoo.org/ + https://jinja.palletsprojects.com diff --git a/package/python-jinja2/python-jinja2.hash b/package/python-jinja2/python-jinja2.hash index ea7fe71a35..2ab343cce6 100644 --- a/package/python-jinja2/python-jinja2.hash +++ b/package/python-jinja2/python-jinja2.hash @@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/jinja2/json -md5 b76ae2f0647abebc81e7c03f5fb7b00f Jinja2-3.0.3.tar.gz -sha256 611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 Jinja2-3.0.3.tar.gz +md5 d31148abd89c1df1cdb077a55db27d02 Jinja2-3.1.2.tar.gz +sha256 31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 Jinja2-3.1.2.tar.gz # Locally computed sha256 checksums sha256 3b49dcee4105eb37bac10faf1be260408fe85d252b8e9df2e0979fc1e094437b LICENSE.rst diff --git a/package/python-jinja2/python-jinja2.mk b/package/python-jinja2/python-jinja2.mk index 752daf653c..7cbf73a9b6 100644 --- a/package/python-jinja2/python-jinja2.mk +++ b/package/python-jinja2/python-jinja2.mk @@ -4,9 +4,9 @@ # ################################################################################ -PYTHON_JINJA2_VERSION = 3.0.3 +PYTHON_JINJA2_VERSION = 3.1.2 PYTHON_JINJA2_SOURCE = Jinja2-$(PYTHON_JINJA2_VERSION).tar.gz -PYTHON_JINJA2_SITE = https://files.pythonhosted.org/packages/91/a5/429efc6246119e1e3fbf562c00187d04e83e54619249eb732bb423efa6c6 +PYTHON_JINJA2_SITE = https://files.pythonhosted.org/packages/7a/ff/75c28576a1d900e87eb6335b063fab47a8ef3c8b4d88524c4bf78f670cce PYTHON_JINJA2_SETUP_TYPE = setuptools PYTHON_JINJA2_LICENSE = BSD-3-Clause PYTHON_JINJA2_LICENSE_FILES = LICENSE.rst diff --git a/package/python-keyring/Config.in b/package/python-keyring/Config.in index f7bb1ae820..61cb98952f 100644 --- a/package/python-keyring/Config.in +++ b/package/python-keyring/Config.in @@ -1,7 +1,8 @@ config BR2_PACKAGE_PYTHON_KEYRING bool "python-keyring" + # python-secretstorage -> python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS depends on BR2_PACKAGE_PYTHON3 - depends on BR2_INSTALL_LIBSTDCPP # python-secretstorage select BR2_PACKAGE_PYTHON_ENTRYPOINTS # runtime select BR2_PACKAGE_PYTHON_SECRETSTORAGE # runtime help @@ -9,7 +10,3 @@ config BR2_PACKAGE_PYTHON_KEYRING system keyring service from Python. https://pypi.python.org/pypi/keyring - -comment "python-keyring needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-opcua-asyncio/Config.in b/package/python-opcua-asyncio/Config.in index 3700e00e1d..95715fdd08 100644 --- a/package/python-opcua-asyncio/Config.in +++ b/package/python-opcua-asyncio/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_PYTHON_OPCUA_ASYNCIO bool "python-opcua-asyncio" + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography depends on BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_AIOFILES # runtime select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime diff --git a/package/python-paramiko/Config.in b/package/python-paramiko/Config.in index 4b8495d76d..e44237b0c2 100644 --- a/package/python-paramiko/Config.in +++ b/package/python-paramiko/Config.in @@ -1,7 +1,7 @@ config BR2_PACKAGE_PYTHON_PARAMIKO bool "python-paramiko" - depends on BR2_PACKAGE_PYTHON3 # python-bcrypt - depends on BR2_INSTALL_LIBSTDCPP # python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography + depends on BR2_PACKAGE_PYTHON3 # python-bcrypt, python-cryptography select BR2_PACKAGE_PYTHON_BCRYPT # runtime select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime select BR2_PACKAGE_PYTHON_PYNACL # runtime @@ -10,7 +10,3 @@ config BR2_PACKAGE_PYTHON_PARAMIKO SSH2 protocol library. https://github.com/paramiko/paramiko/ - -comment "python-paramiko needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pyopenssl/Config.in b/package/python-pyopenssl/Config.in index 99ea4e9408..65d516813f 100644 --- a/package/python-pyopenssl/Config.in +++ b/package/python-pyopenssl/Config.in @@ -1,14 +1,10 @@ config BR2_PACKAGE_PYTHON_PYOPENSSL bool "python-pyopenssl" - depends on BR2_PACKAGE_PYTHON3 # python-cryptography -> python-idna - depends on BR2_INSTALL_LIBSTDCPP # python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography + depends on BR2_PACKAGE_PYTHON3 # python-cryptography select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime select BR2_PACKAGE_PYTHON_SIX # runtime help Python wrapper module around the OpenSSL library. https://github.com/pyca/pyopenssl - -comment "python-pyopenssl needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pysftp/Config.in b/package/python-pysftp/Config.in index 5d5b731f33..de2d2df63d 100644 --- a/package/python-pysftp/Config.in +++ b/package/python-pysftp/Config.in @@ -1,13 +1,8 @@ config BR2_PACKAGE_PYTHON_PYSFTP bool "python-pysftp" depends on BR2_PACKAGE_PYTHON3 # python-paramiko -> python-bcrypt - depends on BR2_INSTALL_LIBSTDCPP # python-paramiko select BR2_PACKAGE_PYTHON_PARAMIKO # runtime help A friendly face on SFTP. https://bitbucket.org/dundeemt/pysftp - -comment "python-pysftp needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-secretstorage/Config.in b/package/python-secretstorage/Config.in index 8ae8c2d598..059ea097bb 100644 --- a/package/python-secretstorage/Config.in +++ b/package/python-secretstorage/Config.in @@ -1,13 +1,9 @@ config BR2_PACKAGE_PYTHON_SECRETSTORAGE bool "python-secretstorage" depends on BR2_PACKAGE_PYTHON3 - depends on BR2_INSTALL_LIBSTDCPP # python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime help Python bindings to FreeDesktop.org Secret Service API. https://github.com/mitya57/secretstorage - -comment "python-secretstorage needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-service-identity/Config.in b/package/python-service-identity/Config.in index ab012347dc..c571065e92 100644 --- a/package/python-service-identity/Config.in +++ b/package/python-service-identity/Config.in @@ -1,7 +1,9 @@ config BR2_PACKAGE_PYTHON_SERVICE_IDENTITY bool "python-service-identity" - depends on BR2_PACKAGE_PYTHON3 # python-pyopenssl -> python-cryptography -> python-idna - depends on BR2_INSTALL_LIBSTDCPP # python-pyopenssl + # python-pyopenssl -> python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS + # python-pyopenssl -> python-cryptography + depends on BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_ATTRS # runtime select BR2_PACKAGE_PYTHON_CHARACTERISTIC # runtime select BR2_PACKAGE_PYTHON_PYASN1 # runtime @@ -11,7 +13,3 @@ config BR2_PACKAGE_PYTHON_SERVICE_IDENTITY Service identity verification for pyOpenSSL. https://pypi.python.org/pypi/service_identity - -comment "python-service-identify needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-treq/Config.in b/package/python-treq/Config.in index 02c26a53f7..6e54c19e16 100644 --- a/package/python-treq/Config.in +++ b/package/python-treq/Config.in @@ -1,7 +1,9 @@ config BR2_PACKAGE_PYTHON_TREQ bool "python-treq" - depends on BR2_PACKAGE_PYTHON3 # python-idna - depends on BR2_INSTALL_LIBSTDCPP # python-pyopenssl + # python-pyopenssl -> python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS + # python-idna, python-pyopenssl -> python-cryptography + depends on BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_ATTRS # runtime select BR2_PACKAGE_PYTHON_IDNA # runtime select BR2_PACKAGE_PYTHON_INCREMENTAL # runtime @@ -16,7 +18,3 @@ config BR2_PACKAGE_PYTHON_TREQ API for making HTTP requests when using Twisted. https://github.com/twisted/treq - -comment "python-treq needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-twisted/Config.in b/package/python-twisted/Config.in index 29536ecf9d..89298b2e0c 100644 --- a/package/python-twisted/Config.in +++ b/package/python-twisted/Config.in @@ -23,12 +23,10 @@ config BR2_PACKAGE_PYTHON_TWISTED_HTTP2 config BR2_PACKAGE_PYTHON_TWISTED_TLS bool "TLS support" - depends on BR2_INSTALL_LIBSTDCPP # python-{pyopenssl,service-identity} + # python-{pyopenssl,service-identity} + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS select BR2_PACKAGE_PYTHON_IDNA # runtime select BR2_PACKAGE_PYTHON_PYOPENSSL # runtime select BR2_PACKAGE_PYTHON_SERVICE_IDENTITY # runtime -comment "TLS support needs a toolchain w/ C++" - depends on !BR2_INSTALL_LIBSTDCPP - endif diff --git a/package/python-txdbus/Config.in b/package/python-txdbus/Config.in index c7de322f91..ffd00f153e 100644 --- a/package/python-txdbus/Config.in +++ b/package/python-txdbus/Config.in @@ -1,6 +1,9 @@ config BR2_PACKAGE_PYTHON_TXDBUS bool "python-txdbus" - depends on BR2_PACKAGE_PYTHON3 # python-twisted -> python-cryptography -> python-idna + # python-twisted -> python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS + # python-twisted -> python-cryptography + depends on BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_TWISTED # runtime select BR2_PACKAGE_PYTHON_SIX # runtime help diff --git a/package/python-txtorcon/Config.in b/package/python-txtorcon/Config.in index e8a1a233db..0606e5f442 100644 --- a/package/python-txtorcon/Config.in +++ b/package/python-txtorcon/Config.in @@ -1,7 +1,8 @@ config BR2_PACKAGE_PYTHON_TXTORCON bool "python-txtorcon" + # python-pyopenssl -> python-cryptography + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS depends on BR2_PACKAGE_PYTHON3 # python-idna - depends on BR2_INSTALL_LIBSTDCPP # python-pyopenssl, python-service-identity select BR2_PACKAGE_PYTHON_AUTOMAT # runtime select BR2_PACKAGE_PYTHON_IDNA # runtime select BR2_PACKAGE_PYTHON_INCREMENTAL # runtime @@ -14,7 +15,3 @@ config BR2_PACKAGE_PYTHON_TXTORCON configuration abstractions. https://github.com/meejah/txtorcon - -comment "python-txtorcon needs a toolchain w/ C++" - depends on BR2_PACKAGE_PYTHON3 - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/resources/icon.png b/resources/icon.png new file mode 100644 index 0000000000..36abebd07e Binary files /dev/null and b/resources/icon.png differ diff --git a/support/scripts/mkimage.sh b/support/scripts/mkimage.sh index c8d8a16de6..79a023bbb6 100755 --- a/support/scripts/mkimage.sh +++ b/support/scripts/mkimage.sh @@ -24,6 +24,7 @@ BOARD=$1 BINARIES_DIR=$(dirname $0)/../../output/${BOARD}/images/ BOARD_DIR=$(dirname $0)/../../board/${BOARD} COMMON_DIR=$(dirname $0)/../../board/common +HOST_DIR=$(dirname $0)/../../output/${BOARD}/host/ BOOT_START=${BOOT_START:-1} # MB @@ -36,7 +37,7 @@ ROOT_START="100" # MB ROOT_SRC=${BINARIES_DIR}/rootfs.tar ROOT=${BINARIES_DIR}/.root ROOT_IMG=${BINARIES_DIR}/root.img -ROOT_SIZE="200" # MB +ROOT_SIZE="400" # MB GUARD_SIZE="10" # MB DISK_SIZE=$((ROOT_START + ROOT_SIZE + GUARD_SIZE)) @@ -74,6 +75,10 @@ msg "copying boot filesystem contents" cp -r ${BOOT_SRC}/* ${BOOT} sync +if [[ "${USE_SYSLINUX}" == true ]]; then + ${HOST_DIR}/sbin/extlinux --install ${BOOT} +fi + msg "unmounting boot filesystem" umount ${BOOT} @@ -141,15 +146,6 @@ fi # disk image msg "creating disk loop device ${LOOP_DEV}" dd if=/dev/zero of=${DISK_IMG} bs=1M count=${DISK_SIZE} -if [[ -n "${BOOT_BIN}" ]]; then - for boot_bin in "${BOOT_BIN[@]}"; do - IFS=@ boot_bin=(${boot_bin}); unset IFS - bin=${boot_bin[0]} - seek=${boot_bin[1]} - msg "copying boot binary ${bin} @ ${seek}" - dd conv=notrunc if=${bin} of=${DISK_IMG} bs=512 seek=${seek} - done -fi loop_dev=$(losetup --show ${LOOP_DEV} ${DISK_IMG}) msg "partitioning disk" @@ -176,6 +172,8 @@ a 1 w END + boot_part_no=1 + root_part_no=2 elif [[ ${PART_TABLE_TYPE} == gpt ]]; then fdisk -u=sectors ${loop_dev} <